rev:托盘拣选出库流程
This commit is contained in:
@@ -42,7 +42,7 @@ public class AppRun implements CommandLineRunner {
|
||||
|
||||
@Override
|
||||
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("--------项目启动完成--------");
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class PalletInStorageTask extends AbstractTask {
|
||||
throw new BadRequestException("申请任务失败:载具"+vehicle_code+"物料信息不存在");
|
||||
}
|
||||
MdPbVehicleMaterVo vehicleMater = item.get(0);
|
||||
|
||||
//拣选回库流程
|
||||
BussEventMulticaster.Publish(
|
||||
new FlowStartEvent("pallet_in",
|
||||
(proc_inst_id,empPlace) -> iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
|
||||
|
||||
@@ -101,7 +101,7 @@ public class DeviceManageController {
|
||||
if (vehicleMater == null){
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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.dao.MdPbVehicleMater;
|
||||
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.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -41,6 +43,8 @@ public class IOStorageController {
|
||||
private IMdPbVehicleMaterService iMdPbVehicleMaterService;
|
||||
@Autowired
|
||||
private IActRuExecutionService iActRuExecutionService;
|
||||
@Autowired
|
||||
private IPmFormDataService iPmFormDataService;
|
||||
|
||||
|
||||
@PostMapping("out")
|
||||
@@ -52,6 +56,7 @@ public class IOStorageController {
|
||||
.eq("vehicle_code", vehicle_code)
|
||||
.eq("is_delete", false));
|
||||
if (one!=null){
|
||||
//流程校验
|
||||
String proc_inst_id = one.getProc_inst_id();
|
||||
if (!StringUtils.isEmpty(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));
|
||||
}
|
||||
}
|
||||
//单据校验"针对托盘库拣选
|
||||
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>()
|
||||
.set("is_delete",true)
|
||||
.set("proc_inst_id",null)
|
||||
|
||||
@@ -157,8 +157,8 @@ public class PmFormDataServiceImpl extends ServiceImpl<PmFormDataMapper, PmFormD
|
||||
|
||||
@Override
|
||||
public List<PmFormDataDto> queryTree(FormDataQuery query, PageQuery pageQuery) {
|
||||
Page page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
page.setOrderBy("id DESC");
|
||||
// Page page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
// page.setOrderBy("id DESC");
|
||||
List<PmFormDataDto> pmFormDataDtos = this.baseMapper.queryTree(query);
|
||||
return pmFormDataDtos;
|
||||
}
|
||||
|
||||
@@ -296,7 +296,16 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvOutMapp
|
||||
iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
|
||||
.set("frozen_qty", 0)
|
||||
.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>()
|
||||
.set("status", StatusEnum.FORM_STATUS.code("取消"))
|
||||
.eq("id", id));
|
||||
|
||||
@@ -189,17 +189,15 @@ public class PickingService {
|
||||
|
||||
PickingService pickingService = SpringContextHolder.getBean(this.getClass());
|
||||
pickingService.disGroup(mst);
|
||||
iFormDataService.update(new UpdateWrapper<PmFormData>()
|
||||
.set("status",StatusEnum.FORM_STATUS.code("执行中"))
|
||||
.eq("id",mst.getId()));
|
||||
//只有透传才有vehicle_code参数否则只有inst_id
|
||||
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)
|
||||
.eq("is_delete",false)
|
||||
.eq("vehicle_code",vehicle_code)), null)
|
||||
.setDto(dto);
|
||||
continueEvent.setCallback(emp->{
|
||||
iFormDataService.update(new UpdateWrapper<PmFormData>()
|
||||
.set("status",StatusEnum.FORM_STATUS.code("执行中"))
|
||||
.eq("id",mst.getId()));
|
||||
});
|
||||
BussEventMulticaster.Publish(continueEvent);
|
||||
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ spring:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
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: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}
|
||||
password: ${DB_PWD:123456}
|
||||
|
||||
|
||||
@@ -95,16 +95,15 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="parent_id" 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-->
|
||||
<!-- prop="deployment_name"-->
|
||||
<!-- show-overflow-tooltip-->
|
||||
<!-- show-tooltip-when-overflow-->
|
||||
<!-- width="130"-->
|
||||
<!-- label="流程模型"-->
|
||||
<!-- />-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="deployment_name"-->
|
||||
<!-- show-overflow-tooltip-->
|
||||
<!-- show-tooltip-when-overflow-->
|
||||
<!-- width="130"-->
|
||||
<!-- label="流程模型"-->
|
||||
<!-- />-->
|
||||
<el-table-column v-if="false" prop="activity_id" label="当前节点ID" />
|
||||
<el-table-column
|
||||
prop="activity_name"
|
||||
@@ -113,23 +112,24 @@
|
||||
width="130"
|
||||
label="当前节点"
|
||||
/>
|
||||
<el-table-column prop="is_active" label="启用">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.is_active"
|
||||
active-color="#13ce66"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
inactive-color="#ff4949"
|
||||
@change="changeActive(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="is_active" label="启用">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-switch-->
|
||||
<!-- v-model="scope.row.is_active"-->
|
||||
<!-- active-color="#13ce66"-->
|
||||
<!-- :active-value="true"-->
|
||||
<!-- :inactive-value="false"-->
|
||||
<!-- inactive-color="#ff4949"-->
|
||||
<!-- @change="changeActive(scope.row)"-->
|
||||
<!-- />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="status" label="实例状态">
|
||||
<template slot-scope="scope">
|
||||
{{ statusEnum.label.FLOW_STATUS[scope.row.status] }}
|
||||
</template>
|
||||
</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="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" />
|
||||
@@ -306,12 +306,12 @@ export default {
|
||||
})
|
||||
},
|
||||
flowConfirm(proc_inst_id) {
|
||||
curdExecution.flowConfirm(proc_inst_id).then(res => {
|
||||
curdExecution.flowConfirm(proc_inst_id).then(res => {
|
||||
crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
this.crud.toQuery()
|
||||
},
|
||||
async load(tree, treeNode, resolve) {
|
||||
async load(tree, treeNode, resolve) {
|
||||
curdExecution.queryByParentId(tree.proc_inst_id).then(res => {
|
||||
resolve(res)
|
||||
})
|
||||
|
||||
@@ -44,25 +44,26 @@
|
||||
<el-input v-model="form.status" disabled placeholder="生成" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="源单类型" prop="source_form_type">
|
||||
<el-input v-model="form.source_form_type" clearable style="width: 150px" />
|
||||
<el-input v-model="form.source_form_type" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="源单id" prop="source_form_id">
|
||||
<el-input v-model="form.source_form_id" clearable style="width: 150px" />
|
||||
<el-input v-model="form.source_form_id" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="源单时间" prop="source_form_date">
|
||||
<el-input v-model="form.source_form_date" clearable style="width: 150px" />
|
||||
<el-input v-model="form.source_form_date" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item label="col.lable" prop="bill_code">
|
||||
<label slot="label">{{col.lable}}:</label>
|
||||
<el-select v-if="col.value == 'product_area'"
|
||||
v-model="form.form_data[col.value]"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="车间"
|
||||
class="filter-item"
|
||||
style="width: 120px"
|
||||
@change="areaChange"
|
||||
<label slot="label">{{ col.lable }}:</label>
|
||||
<el-select
|
||||
v-if="col.value == 'product_area'"
|
||||
v-model="form.form_data[col.value]"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="车间"
|
||||
class="filter-item"
|
||||
style="width: 120px"
|
||||
@change="areaChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusEnum.PRODUCT_AREA"
|
||||
@@ -76,7 +77,7 @@
|
||||
</template>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" />
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -84,14 +85,14 @@
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="insertEvent()"
|
||||
>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="insertEvent()"
|
||||
>
|
||||
添加物料
|
||||
</el-button>
|
||||
<el-button
|
||||
@@ -120,15 +121,20 @@
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="物料批次" width="160" align="center">
|
||||
<template scope="scope"><el-input v-model="tableData[scope.$index].pcsn" class="input-with-select" /></template>
|
||||
<template scope="scope"><el-input v-model="tableData[scope.$index].pcsn" class="input-with-select" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="qty" label="计划数量" width="160" align="center">
|
||||
<template scope="scope"><el-input-number v-model="tableData[scope.$index].qty" class="input-with-select" /></template>
|
||||
<template scope="scope"><el-input-number v-model="tableData[scope.$index].qty" class="input-with-select" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="tableData[scope.$index].unit_id"
|
||||
class="filter-item" placeholder="单位" size="small" style="width: 90px">
|
||||
<el-select
|
||||
v-model="tableData[scope.$index].unit_id"
|
||||
class="filter-item"
|
||||
placeholder="单位"
|
||||
size="small"
|
||||
style="width: 90px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in unitDict"
|
||||
:key="item.value"
|
||||
@@ -159,23 +165,24 @@
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" label="源单类型" width="190" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].source_form_type" class="input-with-select" />
|
||||
<el-input v-model="tableData[scope.$index].source_form_type" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" label="源单id" width="190" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].source_form_id" class="input-with-select" />
|
||||
<el-input v-model="tableData[scope.$index].source_form_id" class="input-with-select" />
|
||||
</template>
|
||||
</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">
|
||||
<el-select v-if="item.value == 'product_area'"
|
||||
v-model="tableData[scope.$index].form_data[item.value]"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="车间"
|
||||
class="filter-item"
|
||||
style="width: 120px"
|
||||
<el-select
|
||||
v-if="item.value == 'product_area'"
|
||||
v-model="tableData[scope.$index].form_data[item.value]"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="车间"
|
||||
class="filter-item"
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusEnum.PRODUCT_AREA"
|
||||
@@ -184,14 +191,14 @@
|
||||
:value="item.value"
|
||||
/>
|
||||
</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>
|
||||
</el-table-column>
|
||||
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<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>
|
||||
</el-form-item>
|
||||
<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 crudProductIn from '@/views/wms/stor_manage/out/storinvout'
|
||||
|
||||
|
||||
const defaultForm = {
|
||||
id: '',
|
||||
code: '',
|
||||
@@ -249,10 +255,10 @@ const defaultForm = {
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { formstruc, MaterDialog,measureunit, FormDialog },
|
||||
components: { formstruc, MaterDialog, measureunit, FormDialog },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
statusEnums: [ 'FORM_STATUS', 'IOBILL_TYPE_OUT', 'PRODUCT_AREA' ],
|
||||
tableEnums: [ 'st_ivt_bsrealstorattr#stor_name#stor_code' ],
|
||||
statusEnums: ['FORM_STATUS', 'IOBILL_TYPE_OUT', 'PRODUCT_AREA'],
|
||||
tableEnums: ['st_ivt_bsrealstorattr#stor_name#stor_code'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -264,9 +270,9 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
dtlCols:[],
|
||||
tableData:[],
|
||||
cols: [],
|
||||
dtlCols: [],
|
||||
tableData: [],
|
||||
dialogVisible: false,
|
||||
materShow: false,
|
||||
id: '',
|
||||
@@ -279,7 +285,7 @@ export default {
|
||||
rules: {
|
||||
bill_type: [
|
||||
{ required: true, message: '单据类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -299,15 +305,15 @@ export default {
|
||||
formstruc.getHeader('st_ivt_iostorinv').then(res => {
|
||||
this.cols = res
|
||||
res.forEach(a => {
|
||||
this.form.form_data[a.value,'']
|
||||
this.form.form_data[a.value, '']
|
||||
})
|
||||
})
|
||||
formstruc.getHeader('st_ivt_iostorinvdtl').then(res => {
|
||||
this.dtlCols = res
|
||||
}),
|
||||
measureunit.getSelect().then(res => {
|
||||
this.unitDict = res.content
|
||||
})
|
||||
measureunit.getSelect().then(res => {
|
||||
this.unitDict = res.content
|
||||
})
|
||||
if (this.id !== '' && this.id !== null && this.id !== undefined) {
|
||||
crudProductIn.getIosInvDtl(this.id).then(res => {
|
||||
this.tableData = res
|
||||
@@ -319,7 +325,6 @@ export default {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
|
||||
|
||||
insertEvent(row) {
|
||||
this.materShow = true
|
||||
},
|
||||
@@ -332,9 +337,9 @@ export default {
|
||||
this.materShow = true
|
||||
},
|
||||
|
||||
areaChange(val){
|
||||
if (this.tableData.length>0) {
|
||||
this.tableData.forEach(a=>{
|
||||
areaChange(val) {
|
||||
if (this.tableData.length > 0) {
|
||||
this.tableData.forEach(a => {
|
||||
this.$set(a.form_data, 'product_area', val)
|
||||
})
|
||||
}
|
||||
@@ -355,7 +360,7 @@ export default {
|
||||
return false
|
||||
}
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
let itemDtl = this.tableData[i];
|
||||
const itemDtl = this.tableData[i]
|
||||
if (!itemDtl.unit_id) {
|
||||
this.crud.notify('单位不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
@@ -382,7 +387,7 @@ export default {
|
||||
|
||||
tableDtlMaterial(rows) {
|
||||
rows.forEach((row) => {
|
||||
const data = {}
|
||||
const data = {}
|
||||
data.material_name = row.material_name
|
||||
data.material_code = row.material_code
|
||||
data.material_id = row.material_id
|
||||
@@ -392,34 +397,34 @@ export default {
|
||||
data.source_form_id = ''
|
||||
data.unit_id = row.unit_id
|
||||
data.form_data = {}
|
||||
this.dtlCols.forEach(a=>{
|
||||
this.dtlCols.forEach(a => {
|
||||
let item = ''
|
||||
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)
|
||||
})
|
||||
},
|
||||
tableDtlMaterial2(data) {
|
||||
let mst = data['t'];
|
||||
let rows = [];
|
||||
const mst = data['t']
|
||||
let rows = []
|
||||
this.form.source_form_type = mst.form_type
|
||||
this.form.source_form_id = mst.id
|
||||
let mst_form_data = mst.form_data;
|
||||
if (data['item'] ==null || data['item'].length == 0){
|
||||
const mst_form_data = mst.form_data
|
||||
if (data['item'] == null || data['item'].length == 0) {
|
||||
rows.push(mst)
|
||||
}else {
|
||||
} else {
|
||||
rows = data['item']
|
||||
}
|
||||
this.cols.forEach(a=>{
|
||||
this.cols.forEach(a => {
|
||||
let item = ''
|
||||
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) => {
|
||||
const data = {}
|
||||
@@ -430,16 +435,18 @@ export default {
|
||||
data.single_weight = row.single_weight
|
||||
data.source_form_type = row.form_type
|
||||
data.source_form_id = row.id
|
||||
data.pcsn = row.pcsn
|
||||
data.qty = row.qty
|
||||
data.unit_id = row.unit_id
|
||||
data.form_data = {}
|
||||
let fowFormData = row.form_data;
|
||||
let row_form_data = {...fowFormData,...data};
|
||||
this.dtlCols.forEach(a=>{
|
||||
const fowFormData = row.form_data
|
||||
const row_form_data = { ...fowFormData, ...data }
|
||||
this.dtlCols.forEach(a => {
|
||||
let item = ''
|
||||
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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user