Browse Source

主子表合并,字段显示

master_hella_20240701
yufei0306 7 months ago
parent
commit
81a6320155
  1. 12
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue
  2. 83
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  3. 21
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts

12
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
:rules="DeliverPlanMainRules" :rules="DeliverPlanMainRules"
:formAllSchemas="DeliverPlanMain.allSchemas" :formAllSchemas="DeliverPlanMain.allSchemas"
:tableAllSchemas="DeliverPlanDetail.allSchemas" :tableAllSchemas="DeliverPlanDetail.allSchemas"
@ -124,8 +126,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}) })
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField == 'itemCode') { if(formField == 'itemCode') {
row['uom'] = val[0]['customerUom'] 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)
})
} }
// if(formField == 'itemCode') {
// row['uom'] = val[0]['customerUom']
// }
// //
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} else { } else {

83
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

@ -104,7 +104,53 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>
} }
}, },
}, },
{
label: '生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'workshopCode',
value: 'workshopCode',
message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示
isMainValue: true
}]
}
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'workshopCode',
value: 'workshopCode',
message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示
isMainValue: true
}]
},
},
{ {
label: '申请时间', label: '申请时间',
field: 'requestTime', field: 'requestTime',
@ -458,6 +504,8 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
table: { table: {
width: 150 width: 150
}, },
hiddenInMain: true,
isTableForm: false,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
@ -572,12 +620,14 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
searchTitle: '库存余额信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法 searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法
searchCondition:[{ searchCondition:[
key: 'locationCode', // {
value: 'fromLocationCode', // key: 'locationCode',
message: '请填写从库位代码!', // value: 'fromLocationCode',
isMainValue: true // message: '请填写从库位代码!',
},{ // isMainValue: true
// },
{
key: 'inventoryStatus', key: 'inventoryStatus',
value: 'OK', value: 'OK',
isMainValue: false isMainValue: false
@ -591,12 +641,14 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
searchTitle: '库存余额信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法 searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法
searchCondition:[{ searchCondition:[
key: 'locationCode', // {
value: 'fromLocationCode', // key: 'locationCode',
message: '请填写从库位代码!', // value: 'fromLocationCode',
isMainValue: true // message: '请填写从库位代码!',
},{ // isMainValue: true
// },
{
key: 'inventoryStatus', key: 'inventoryStatus',
value: 'OK', value: 'OK',
isMainValue: false isMainValue: false
@ -729,6 +781,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
dictType: DICT_TYPE.INVENTORY_STATUS, dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string', dictClass: 'string',
isTable: true, isTable: true,
isTableForm: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -750,6 +803,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
tableForm: { tableForm: {
disabled: true disabled: true
}, },
@ -861,6 +915,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
width: 120 width: 120
}, },
isTable:false, isTable:false,
isTableForm: false,
tableForm:{ tableForm:{
isInpuFocusShow: true, isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
@ -910,6 +965,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
width: 120 width: 120
}, },
isTable:false, isTable:false,
isTableForm: false,
tableForm:{ tableForm:{
disabled: true disabled: true
}, },
@ -928,6 +984,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
width: 150 width: 150
}, },
isTable:false, isTable:false,
isTableForm: false,
tableForm: { tableForm: {
disabled: true disabled: true
}, },

21
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts

@ -29,6 +29,8 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
hiddenInMain: true,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
@ -162,12 +164,14 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
searchTitle: '库存余额信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法 searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法
searchCondition:[{ searchCondition:[
key: 'locationCode', // {
value: 'fromLocationCode', // key: 'locationCode',
message: '请填写从库位代码!', // value: 'fromLocationCode',
isMainValue: true // message: '请填写从库位代码!',
},{ // isMainValue: true
// },
{
key: 'inventoryStatus', key: 'inventoryStatus',
value: 'OK', value: 'OK',
isMainValue: false isMainValue: false
@ -300,6 +304,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
dictType: DICT_TYPE.INVENTORY_STATUS, dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string', dictClass: 'string',
isTable: true, isTable: true,
isTableForm: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -321,6 +326,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
table: { table: {
width: 150 width: 150
}, },
isTableForm:false,
tableForm: { tableForm: {
disabled: true disabled: true
}, },
@ -431,6 +437,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
width: 120 width: 120
}, },
isTable: false, isTable: false,
isTableForm: false,
tableForm:{ tableForm:{
isInpuFocusShow: true, isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
@ -480,6 +487,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
width: 120 width: 120
}, },
isTable: false, isTable: false,
isTableForm: false,
tableForm:{ tableForm:{
disabled: true disabled: true
}, },
@ -497,6 +505,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
width: 150 width: 150
}, },
isTable: false, isTable: false,
isTableForm: false,
tableForm: { tableForm: {
disabled: true disabled: true
}, },

Loading…
Cancel
Save