diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts index e253572c9..745515889 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts @@ -81,7 +81,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ form: { // labelMessage: '信息提示说明!!!', componentProps: { - disabled: true, + enterSearch: true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择客户代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 @@ -148,6 +148,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch: true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择发货计划单号', // 输入框占位文本 searchField: 'number', // 查询弹窗赋值字段 @@ -691,6 +692,7 @@ export const DeliverRequestDetail = useCrudSchemas(reactive([ width: 150 }, tableForm:{ + multiple:true, isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '请选择物料代码', searchField: 'itemCode', diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue index 7e93906b9..9394880ba 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue @@ -43,6 +43,8 @@ nextTick(() => { if (type == 'tableForm') { if(formField == 'itemCode') { - row['itemCode'] = val[0]['itemCode'] - row['uom'] = val[0]['customerUom'] - }else { + const tableFormKeys = {} + DeliverRequestDetail.allSchemas.tableFormColumns.forEach(item => { + tableFormKeys[item.field] = item.default ? item.default : '' + }) + console.log('tableData.value',tableData.value) + val.forEach(item=>{ + if(tableData.value.find(item1=>item1['id'] == item['id'])) return + const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) + newRow['uom'] = item['customerUom'] + tableData.value.push(newRow) + }) + }else{ row[formField] = val[0][searchField] } } else { @@ -129,54 +140,54 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => setV[formField] = val[0][searchField] if(formField == 'deliverPlanNumber') { setV['deliverPlanNumber'] = val[0]['number'] - if(setV['deliverPlanNumber'] != null){ - isShowButton.value = false - } + // if(setV['deliverPlanNumber'] != null){ + // isShowButton.value = false + // } setV['customerCode'] = val[0]['customerCode'] // 获取子表数据 getBomDisassemble - DeliverPlanDetailApi.selectDetailByMasterID(val[0]['id']) - .then(res => { - res.forEach(item => { - item.qty = item.planQty - }) - if (res) tableData.value = res - // 修改 tableform 属性 - DeliverRequestDetail.allSchemas.tableFormColumns.map(item => { - if(item.field == 'itemCode') { - item.isInpuFocusShow = false - item.tableForm.isInpuFocusShow = false - item.tableForm.disabled = true - } - if(item.field == 'uom') { - item.tableForm.disabled = true - } - }) - // 修改 tableform 属性 - if(formField == 'customerCode'){ - console.log(1111,val); - customerCode.value = val[0]['code'] - console.log(11112,customerCode.value); - } - DeliverRequestMain.allSchemas.tableFormColumns.map(item => { - if(item.field == 'customerDockCode') { - item.tableForm.searchCondition = [ - { - key: 'customerCode', - value: customerCode.value , - isMainValue: true - }] - item.form.componentProps.searchCondition = [ - { - key: 'customerCode', - value: customerCode.value , - isMainValue: true - }]} - else { - delete item.tableForm.searchCondition - delete item.form.componentProps.searchCondition - } - }) - }) + // DeliverPlanDetailApi.selectDetailByMasterID(val[0]['id']) + // .then(res => { + // res.forEach(item => { + // item.qty = item.planQty + // }) + // if (res) tableData.value = res + // // 修改 tableform 属性 + // DeliverRequestDetail.allSchemas.tableFormColumns.map(item => { + // if(item.field == 'itemCode') { + // item.isInpuFocusShow = false + // item.tableForm.isInpuFocusShow = false + // item.tableForm.disabled = true + // } + // if(item.field == 'uom') { + // item.tableForm.disabled = true + // } + // }) + // // 修改 tableform 属性 + // if(formField == 'customerCode'){ + // console.log(1111,val); + // customerCode.value = val[0]['code'] + // console.log(11112,customerCode.value); + // } + // DeliverRequestMain.allSchemas.tableFormColumns.map(item => { + // if(item.field == 'customerDockCode') { + // item.tableForm.searchCondition = [ + // { + // key: 'customerCode', + // value: customerCode.value , + // isMainValue: true + // }] + // item.form.componentProps.searchCondition = [ + // { + // key: 'customerCode', + // value: customerCode.value , + // isMainValue: true + // }]} + // else { + // delete item.tableForm.searchCondition + // delete item.form.componentProps.searchCondition + // } + // }) + // }) if(formField == 'itemCode'){ console.log( val[0]); row['uom'] = val[0]['customerUom']