rev:托盘拣选出库流程
This commit is contained in:
@@ -42,7 +42,7 @@ public class AppRun implements CommandLineRunner {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(String... args) {
|
public void run(String... args) {
|
||||||
HeartClientServer heartServer = new HeartClientServer(new InetSocketAddress("192.168.8.218", 20889));
|
// HeartClientServer heartServer = new HeartClientServer(new InetSocketAddress("192.168.8.218", 20889));
|
||||||
System.out.println("--------项目启动完成--------");
|
System.out.println("--------项目启动完成--------");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class PalletInStorageTask extends AbstractTask {
|
|||||||
throw new BadRequestException("申请任务失败:载具"+vehicle_code+"物料信息不存在");
|
throw new BadRequestException("申请任务失败:载具"+vehicle_code+"物料信息不存在");
|
||||||
}
|
}
|
||||||
MdPbVehicleMaterVo vehicleMater = item.get(0);
|
MdPbVehicleMaterVo vehicleMater = item.get(0);
|
||||||
|
//拣选回库流程
|
||||||
BussEventMulticaster.Publish(
|
BussEventMulticaster.Publish(
|
||||||
new FlowStartEvent("pallet_in",
|
new FlowStartEvent("pallet_in",
|
||||||
(proc_inst_id,empPlace) -> iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
|
(proc_inst_id,empPlace) -> iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public class DeviceManageController {
|
|||||||
if (vehicleMater == null){
|
if (vehicleMater == null){
|
||||||
throw new BadRequestException(String.format(vehicleCode+"载具组盘信息不存在"));
|
throw new BadRequestException(String.format(vehicleCode+"载具组盘信息不存在"));
|
||||||
}
|
}
|
||||||
wmsToAcsService.toCommand(device_code,form.getMode(),vehicleInfo.getH());
|
wmsToAcsService.toCommand(device_code,"1",vehicleInfo.getH());
|
||||||
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ import org.nl.wms.flow_manage.flow.service.execution.dao.ActRuExecution;
|
|||||||
import org.nl.wms.md_manage.vehicleMater.service.IMdPbVehicleMaterService;
|
import org.nl.wms.md_manage.vehicleMater.service.IMdPbVehicleMaterService;
|
||||||
import org.nl.wms.md_manage.vehicleMater.service.dao.MdPbVehicleMater;
|
import org.nl.wms.md_manage.vehicleMater.service.dao.MdPbVehicleMater;
|
||||||
import org.nl.wms.pda_manage.palletio.service.PalletIostorinvService;
|
import org.nl.wms.pda_manage.palletio.service.PalletIostorinvService;
|
||||||
|
import org.nl.wms.pm_manage.form_data.service.IPmFormDataService;
|
||||||
|
import org.nl.wms.pm_manage.form_data.service.dao.PmFormData;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
@@ -41,6 +43,8 @@ public class IOStorageController {
|
|||||||
private IMdPbVehicleMaterService iMdPbVehicleMaterService;
|
private IMdPbVehicleMaterService iMdPbVehicleMaterService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IActRuExecutionService iActRuExecutionService;
|
private IActRuExecutionService iActRuExecutionService;
|
||||||
|
@Autowired
|
||||||
|
private IPmFormDataService iPmFormDataService;
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("out")
|
@PostMapping("out")
|
||||||
@@ -52,6 +56,7 @@ public class IOStorageController {
|
|||||||
.eq("vehicle_code", vehicle_code)
|
.eq("vehicle_code", vehicle_code)
|
||||||
.eq("is_delete", false));
|
.eq("is_delete", false));
|
||||||
if (one!=null){
|
if (one!=null){
|
||||||
|
//流程校验
|
||||||
String proc_inst_id = one.getProc_inst_id();
|
String proc_inst_id = one.getProc_inst_id();
|
||||||
if (!StringUtils.isEmpty(proc_inst_id)){
|
if (!StringUtils.isEmpty(proc_inst_id)){
|
||||||
String parent_id = iActRuExecutionService.getParentByChild(proc_inst_id);
|
String parent_id = iActRuExecutionService.getParentByChild(proc_inst_id);
|
||||||
@@ -62,6 +67,14 @@ public class IOStorageController {
|
|||||||
throw new BadRequestException(String.format("当前载具%s业务流程%s未完成",vehicle_code,parent_id));
|
throw new BadRequestException(String.format("当前载具%s业务流程%s未完成",vehicle_code,parent_id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//单据校验"针对托盘库拣选
|
||||||
|
int count = iPmFormDataService.count(new QueryWrapper<PmFormData>()
|
||||||
|
.eq("form_type", "Picking")
|
||||||
|
.eq("vehicle_code", vehicle_code)
|
||||||
|
.lt("status", StatusEnum.FORM_STATUS.code("完成")));
|
||||||
|
if (count>0){
|
||||||
|
throw new BadRequestException(String.format("当前载具%s为拣选出库请先进行拣选操作",vehicle_code));
|
||||||
|
}
|
||||||
iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
|
iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
|
||||||
.set("is_delete",true)
|
.set("is_delete",true)
|
||||||
.set("proc_inst_id",null)
|
.set("proc_inst_id",null)
|
||||||
|
|||||||
@@ -157,8 +157,8 @@ public class PmFormDataServiceImpl extends ServiceImpl<PmFormDataMapper, PmFormD
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<PmFormDataDto> queryTree(FormDataQuery query, PageQuery pageQuery) {
|
public List<PmFormDataDto> queryTree(FormDataQuery query, PageQuery pageQuery) {
|
||||||
Page page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
// Page page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||||
page.setOrderBy("id DESC");
|
// page.setOrderBy("id DESC");
|
||||||
List<PmFormDataDto> pmFormDataDtos = this.baseMapper.queryTree(query);
|
List<PmFormDataDto> pmFormDataDtos = this.baseMapper.queryTree(query);
|
||||||
return pmFormDataDtos;
|
return pmFormDataDtos;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -296,7 +296,16 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvOutMapp
|
|||||||
iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
|
iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
|
||||||
.set("frozen_qty", 0)
|
.set("frozen_qty", 0)
|
||||||
.in("id", Arrays.asList(split)));
|
.in("id", Arrays.asList(split)));
|
||||||
|
//更新点位锁定
|
||||||
|
String vehicleCodes = iostorinvdtls.stream().map(StIvtIostorinvdtl::getVehicle_code).collect(Collectors.joining(","));
|
||||||
|
String[] vehicleCodeSplit = vehicleCodes.split(",");
|
||||||
|
iStIvtStructattrService
|
||||||
|
.update(new UpdateWrapper<StIvtStructattr>()
|
||||||
|
.set("lock_type",StatusEnum.LOCK.code("无锁"))
|
||||||
|
.in("vehicle_code", Arrays.asList(vehicleCodeSplit))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.update(new UpdateWrapper<StIvtIostorinv>()
|
this.update(new UpdateWrapper<StIvtIostorinv>()
|
||||||
.set("status", StatusEnum.FORM_STATUS.code("取消"))
|
.set("status", StatusEnum.FORM_STATUS.code("取消"))
|
||||||
.eq("id", id));
|
.eq("id", id));
|
||||||
|
|||||||
@@ -189,17 +189,15 @@ public class PickingService {
|
|||||||
|
|
||||||
PickingService pickingService = SpringContextHolder.getBean(this.getClass());
|
PickingService pickingService = SpringContextHolder.getBean(this.getClass());
|
||||||
pickingService.disGroup(mst);
|
pickingService.disGroup(mst);
|
||||||
|
iFormDataService.update(new UpdateWrapper<PmFormData>()
|
||||||
|
.set("status",StatusEnum.FORM_STATUS.code("执行中"))
|
||||||
|
.eq("id",mst.getId()));
|
||||||
//只有透传才有vehicle_code参数否则只有inst_id
|
//只有透传才有vehicle_code参数否则只有inst_id
|
||||||
FlowContinueEvent continueEvent = new FlowContinueEvent(mst.getProc_inst_id(), (PermeateFunction<String, String>) (inst_id, vehicle_code) -> iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
|
FlowContinueEvent continueEvent = new FlowContinueEvent(mst.getProc_inst_id(), (PermeateFunction<String, String>) (inst_id, vehicle_code) -> iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
|
||||||
.set("proc_inst_id",inst_id)
|
.set("proc_inst_id",inst_id)
|
||||||
.eq("is_delete",false)
|
.eq("is_delete",false)
|
||||||
.eq("vehicle_code",vehicle_code)), null)
|
.eq("vehicle_code",vehicle_code)), null)
|
||||||
.setDto(dto);
|
.setDto(dto);
|
||||||
continueEvent.setCallback(emp->{
|
|
||||||
iFormDataService.update(new UpdateWrapper<PmFormData>()
|
|
||||||
.set("status",StatusEnum.FORM_STATUS.code("执行中"))
|
|
||||||
.eq("id",mst.getId()));
|
|
||||||
});
|
|
||||||
BussEventMulticaster.Publish(continueEvent);
|
BussEventMulticaster.Publish(continueEvent);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ spring:
|
|||||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
# url: jdbc:mysql://${DB_HOST:192.168.8.218}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
# url: jdbc:mysql://${DB_HOST:192.168.8.218}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||||
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
url: jdbc:mysql://${DB_HOST:192.168.81.251}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
password: ${DB_PWD:123456}
|
password: ${DB_PWD:123456}
|
||||||
|
|
||||||
|
|||||||
@@ -95,16 +95,15 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="parent_id" width="200" label="父流程" />
|
<el-table-column prop="parent_id" width="200" label="父流程" />
|
||||||
<el-table-column prop="def_name" width="200" label="部署名称" />
|
<el-table-column prop="def_name" width="200" label="部署名称" />
|
||||||
<el-table-column prop="def_model_key" width="200" label="模型KEY" />
|
<!-- <el-table-column prop="def_description" width="200" label="部署描述" />-->
|
||||||
<!-- <el-table-column prop="def_description" width="200" label="部署描述" />-->
|
|
||||||
<el-table-column v-if="false" prop="deployment_id" label="流程部署ID" />
|
<el-table-column v-if="false" prop="deployment_id" label="流程部署ID" />
|
||||||
<!-- <el-table-column-->
|
<!-- <el-table-column-->
|
||||||
<!-- prop="deployment_name"-->
|
<!-- prop="deployment_name"-->
|
||||||
<!-- show-overflow-tooltip-->
|
<!-- show-overflow-tooltip-->
|
||||||
<!-- show-tooltip-when-overflow-->
|
<!-- show-tooltip-when-overflow-->
|
||||||
<!-- width="130"-->
|
<!-- width="130"-->
|
||||||
<!-- label="流程模型"-->
|
<!-- label="流程模型"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<el-table-column v-if="false" prop="activity_id" label="当前节点ID" />
|
<el-table-column v-if="false" prop="activity_id" label="当前节点ID" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="activity_name"
|
prop="activity_name"
|
||||||
@@ -113,23 +112,24 @@
|
|||||||
width="130"
|
width="130"
|
||||||
label="当前节点"
|
label="当前节点"
|
||||||
/>
|
/>
|
||||||
<el-table-column prop="is_active" label="启用">
|
<!-- <el-table-column prop="is_active" label="启用">-->
|
||||||
<template slot-scope="scope">
|
<!-- <template slot-scope="scope">-->
|
||||||
<el-switch
|
<!-- <el-switch-->
|
||||||
v-model="scope.row.is_active"
|
<!-- v-model="scope.row.is_active"-->
|
||||||
active-color="#13ce66"
|
<!-- active-color="#13ce66"-->
|
||||||
:active-value="true"
|
<!-- :active-value="true"-->
|
||||||
:inactive-value="false"
|
<!-- :inactive-value="false"-->
|
||||||
inactive-color="#ff4949"
|
<!-- inactive-color="#ff4949"-->
|
||||||
@change="changeActive(scope.row)"
|
<!-- @change="changeActive(scope.row)"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column prop="status" label="实例状态">
|
<el-table-column prop="status" label="实例状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ statusEnum.label.FLOW_STATUS[scope.row.status] }}
|
{{ statusEnum.label.FLOW_STATUS[scope.row.status] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="def_model_key" width="200" label="模型KEY" />
|
||||||
<el-table-column prop="remark" show-overflow-tooltip show-tooltip-when-overflow label="备注" />
|
<el-table-column prop="remark" show-overflow-tooltip show-tooltip-when-overflow label="备注" />
|
||||||
<el-table-column prop="form_type" show-overflow-tooltip show-tooltip-when-overflow width="130" label="表单类型" />
|
<el-table-column prop="form_type" show-overflow-tooltip show-tooltip-when-overflow width="130" label="表单类型" />
|
||||||
<el-table-column prop="form_id" show-overflow-tooltip show-tooltip-when-overflow width="130" label="表单id" />
|
<el-table-column prop="form_id" show-overflow-tooltip show-tooltip-when-overflow width="130" label="表单id" />
|
||||||
|
|||||||
@@ -54,8 +54,9 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<template v-for="(col,index) in cols">
|
<template v-for="(col,index) in cols">
|
||||||
<el-form-item label="col.lable" prop="bill_code">
|
<el-form-item label="col.lable" prop="bill_code">
|
||||||
<label slot="label">{{col.lable}}:</label>
|
<label slot="label">{{ col.lable }}:</label>
|
||||||
<el-select v-if="col.value == 'product_area'"
|
<el-select
|
||||||
|
v-if="col.value == 'product_area'"
|
||||||
v-model="form.form_data[col.value]"
|
v-model="form.form_data[col.value]"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
@@ -127,8 +128,13 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="160">
|
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="160">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-select v-model="tableData[scope.$index].unit_id"
|
<el-select
|
||||||
class="filter-item" placeholder="单位" size="small" style="width: 90px">
|
v-model="tableData[scope.$index].unit_id"
|
||||||
|
class="filter-item"
|
||||||
|
placeholder="单位"
|
||||||
|
size="small"
|
||||||
|
style="width: 90px"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in unitDict"
|
v-for="item in unitDict"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -169,7 +175,8 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-for="(item, index) in dtlCols" :key="item.value" :label="item.lable" width="160">
|
<el-table-column v-for="(item, index) in dtlCols" :key="item.value" :label="item.lable" width="160">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-select v-if="item.value == 'product_area'"
|
<el-select
|
||||||
|
v-if="item.value == 'product_area'"
|
||||||
v-model="tableData[scope.$index].form_data[item.value]"
|
v-model="tableData[scope.$index].form_data[item.value]"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
@@ -184,14 +191,14 @@
|
|||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input v-if="item.value != 'product_area'" disabled v-model="tableData[scope.$index].form_data[item.value]" class="input-with-select" />
|
<el-input v-if="item.value != 'product_area'" v-model="tableData[scope.$index].form_data[item.value]" disabled class="input-with-select" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<label slot="label">备 注:</label>
|
<label slot="label">备 注:</label>
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-input v-model="tableData[scope.$index].remark" rows="2" type="textarea"/>
|
<el-input v-model="tableData[scope.$index].remark" rows="2" type="textarea" />
|
||||||
</template>
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
||||||
@@ -230,7 +237,6 @@ import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
|||||||
import measureunit from '@/views/wms/base_manage/measure/measureunit'
|
import measureunit from '@/views/wms/base_manage/measure/measureunit'
|
||||||
import crudProductIn from '@/views/wms/stor_manage/out/storinvout'
|
import crudProductIn from '@/views/wms/stor_manage/out/storinvout'
|
||||||
|
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
id: '',
|
id: '',
|
||||||
code: '',
|
code: '',
|
||||||
@@ -249,10 +255,10 @@ const defaultForm = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddDialog',
|
name: 'AddDialog',
|
||||||
components: { formstruc, MaterDialog,measureunit, FormDialog },
|
components: { formstruc, MaterDialog, measureunit, FormDialog },
|
||||||
mixins: [crud(), form(defaultForm)],
|
mixins: [crud(), form(defaultForm)],
|
||||||
statusEnums: [ 'FORM_STATUS', 'IOBILL_TYPE_OUT', 'PRODUCT_AREA' ],
|
statusEnums: ['FORM_STATUS', 'IOBILL_TYPE_OUT', 'PRODUCT_AREA'],
|
||||||
tableEnums: [ 'st_ivt_bsrealstorattr#stor_name#stor_code' ],
|
tableEnums: ['st_ivt_bsrealstorattr#stor_name#stor_code'],
|
||||||
props: {
|
props: {
|
||||||
dialogShow: {
|
dialogShow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -264,9 +270,9 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
cols:[],
|
cols: [],
|
||||||
dtlCols:[],
|
dtlCols: [],
|
||||||
tableData:[],
|
tableData: [],
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
materShow: false,
|
materShow: false,
|
||||||
id: '',
|
id: '',
|
||||||
@@ -279,7 +285,7 @@ export default {
|
|||||||
rules: {
|
rules: {
|
||||||
bill_type: [
|
bill_type: [
|
||||||
{ required: true, message: '单据类型不能为空', trigger: 'blur' }
|
{ required: true, message: '单据类型不能为空', trigger: 'blur' }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -299,7 +305,7 @@ export default {
|
|||||||
formstruc.getHeader('st_ivt_iostorinv').then(res => {
|
formstruc.getHeader('st_ivt_iostorinv').then(res => {
|
||||||
this.cols = res
|
this.cols = res
|
||||||
res.forEach(a => {
|
res.forEach(a => {
|
||||||
this.form.form_data[a.value,'']
|
this.form.form_data[a.value, '']
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
formstruc.getHeader('st_ivt_iostorinvdtl').then(res => {
|
formstruc.getHeader('st_ivt_iostorinvdtl').then(res => {
|
||||||
@@ -319,7 +325,6 @@ export default {
|
|||||||
this.$emit('AddChanged')
|
this.$emit('AddChanged')
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
insertEvent(row) {
|
insertEvent(row) {
|
||||||
this.materShow = true
|
this.materShow = true
|
||||||
},
|
},
|
||||||
@@ -332,9 +337,9 @@ export default {
|
|||||||
this.materShow = true
|
this.materShow = true
|
||||||
},
|
},
|
||||||
|
|
||||||
areaChange(val){
|
areaChange(val) {
|
||||||
if (this.tableData.length>0) {
|
if (this.tableData.length > 0) {
|
||||||
this.tableData.forEach(a=>{
|
this.tableData.forEach(a => {
|
||||||
this.$set(a.form_data, 'product_area', val)
|
this.$set(a.form_data, 'product_area', val)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -355,7 +360,7 @@ export default {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
for (let i = 0; i < this.tableData.length; i++) {
|
for (let i = 0; i < this.tableData.length; i++) {
|
||||||
let itemDtl = this.tableData[i];
|
const itemDtl = this.tableData[i]
|
||||||
if (!itemDtl.unit_id) {
|
if (!itemDtl.unit_id) {
|
||||||
this.crud.notify('单位不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('单位不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
return false
|
return false
|
||||||
@@ -392,34 +397,34 @@ export default {
|
|||||||
data.source_form_id = ''
|
data.source_form_id = ''
|
||||||
data.unit_id = row.unit_id
|
data.unit_id = row.unit_id
|
||||||
data.form_data = {}
|
data.form_data = {}
|
||||||
this.dtlCols.forEach(a=>{
|
this.dtlCols.forEach(a => {
|
||||||
let item = ''
|
let item = ''
|
||||||
if (a.value in data) {
|
if (a.value in data) {
|
||||||
item = data[a.value];
|
item = data[a.value]
|
||||||
}
|
}
|
||||||
this.$set(data.form_data,a.value,item)
|
this.$set(data.form_data, a.value, item)
|
||||||
})
|
})
|
||||||
this.$set(data.form_data,'product_area',this.form.form_data.product_area)
|
this.$set(data.form_data, 'product_area', this.form.form_data.product_area)
|
||||||
this.tableData.splice(-1, 0, data)
|
this.tableData.splice(-1, 0, data)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
tableDtlMaterial2(data) {
|
tableDtlMaterial2(data) {
|
||||||
let mst = data['t'];
|
const mst = data['t']
|
||||||
let rows = [];
|
let rows = []
|
||||||
this.form.source_form_type = mst.form_type
|
this.form.source_form_type = mst.form_type
|
||||||
this.form.source_form_id = mst.id
|
this.form.source_form_id = mst.id
|
||||||
let mst_form_data = mst.form_data;
|
const mst_form_data = mst.form_data
|
||||||
if (data['item'] ==null || data['item'].length == 0){
|
if (data['item'] == null || data['item'].length == 0) {
|
||||||
rows.push(mst)
|
rows.push(mst)
|
||||||
}else {
|
} else {
|
||||||
rows = data['item']
|
rows = data['item']
|
||||||
}
|
}
|
||||||
this.cols.forEach(a=>{
|
this.cols.forEach(a => {
|
||||||
let item = ''
|
let item = ''
|
||||||
if (a.value in mst_form_data) {
|
if (a.value in mst_form_data) {
|
||||||
item = mst_form_data[a.value];
|
item = mst_form_data[a.value]
|
||||||
}
|
}
|
||||||
this.$set(this.form.form_data,a.value,item)
|
this.$set(this.form.form_data, a.value, item)
|
||||||
})
|
})
|
||||||
rows.forEach((row) => {
|
rows.forEach((row) => {
|
||||||
const data = {}
|
const data = {}
|
||||||
@@ -430,16 +435,18 @@ export default {
|
|||||||
data.single_weight = row.single_weight
|
data.single_weight = row.single_weight
|
||||||
data.source_form_type = row.form_type
|
data.source_form_type = row.form_type
|
||||||
data.source_form_id = row.id
|
data.source_form_id = row.id
|
||||||
|
data.pcsn = row.pcsn
|
||||||
|
data.qty = row.qty
|
||||||
data.unit_id = row.unit_id
|
data.unit_id = row.unit_id
|
||||||
data.form_data = {}
|
data.form_data = {}
|
||||||
let fowFormData = row.form_data;
|
const fowFormData = row.form_data
|
||||||
let row_form_data = {...fowFormData,...data};
|
const row_form_data = { ...fowFormData, ...data }
|
||||||
this.dtlCols.forEach(a=>{
|
this.dtlCols.forEach(a => {
|
||||||
let item = ''
|
let item = ''
|
||||||
if (a.value in row_form_data) {
|
if (a.value in row_form_data) {
|
||||||
item = row_form_data[a.value];
|
item = row_form_data[a.value]
|
||||||
}
|
}
|
||||||
this.$set(data.form_data,a.value,item)
|
this.$set(data.form_data, a.value, item)
|
||||||
})
|
})
|
||||||
this.tableData.splice(-1, 0, data)
|
this.tableData.splice(-1, 0, data)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user