Browse Source

字段显示

master_hella_20240701
yufei0306 7 months ago
parent
commit
097b4df621
  1. 23
      src/views/wms/productionManage/productionplan/productionMain/index.vue
  2. 6
      src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts
  3. 24
      src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue
  4. 1
      src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts
  5. 29
      src/views/wms/productionManage/productredress/productredressRequestMain/index.vue
  6. 1
      src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts

23
src/views/wms/productionManage/productionplan/productionMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="ProductionMainRules" :rules="ProductionMainRules"
:formAllSchemas="ProductionMain.allSchemas" :formAllSchemas="ProductionMain.allSchemas"
@ -106,14 +108,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(async() => { nextTick(async() => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
await ItemBasicApi.getItembasicPage({ // await ItemBasicApi.getItembasicPage({
code: row['itemCode'] // code: row['itemCode']
}).then(res => { // }).then(res => {
row['uom'] = res?.list[0].uom // row['uom'] = res?.list[0].uom
}).catch(err =>{ // }).catch(err =>{
console.log(err); // console.log(err);
}) // })
if(formField=='itemCode'){
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
val.forEach(item=>{
if(tableData.value.find(item1=>item1['id'] == item['id'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
tableData.value.push(newRow)
})
}
} else { } else {
const setV = {} const setV = {}
if(formField == 'workshop'){ if(formField == 'workshop'){

6
src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts

@ -635,6 +635,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
tableForm:{ tableForm:{
multiple:true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
@ -740,7 +741,10 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
tableForm:{ tableForm:{
type: 'Select' type: 'Select',
disabled: true,
dictType: DICT_TYPE.UOM,
dictClass: 'string'
} }
}, },
{ {

24
src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="ProductputawayRequestMainRules" :rules="ProductputawayRequestMainRules"
:formAllSchemas="ProductputawayRequestMain.allSchemas" :formAllSchemas="ProductputawayRequestMain.allSchemas"
@ -106,14 +108,20 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
row[formField] = val[0][searchField] if(tableData.value.find(item1=>item1['id'] == item['id'])) return
row['poLine'] = val[0]['itemCode'] val.forEach(item=>{
row['packingNumber'] = val[0]['packingNumber'] const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
row['containerNumber'] = val[0]['containerNumber'] newRow[formField] = item[searchField]
row['batch'] = val[0]['batch'] newRow['poLine'] = item['itemCode']
row['uom'] = val[0]['uom'] newRow['packingNumber'] = item['packingNumber']
row['inventoryStatus'] = val[0]['inventoryStatus'] newRow['containerNumber'] = item['containerNumber']
row['fromLocationCode'] = val[0]['locationCode'] newRow['batch'] = item['batch']
newRow['uom'] = item['uom']
newRow['qty'] = item['qty']
newRow['inventoryStatus'] = item['inventoryStatus']
newRow['fromLocationCode'] = item['locationCode']
tableData.value.push(newRow)
})
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]

1
src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts

@ -447,6 +447,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150 width: 150
}, },
tableForm:{ tableForm:{
multiple:true,
isInpuFocusShow: true, isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本

29
src/views/wms/productionManage/productredress/productredressRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="ProductredressRequestMainRules" :rules="ProductredressRequestMainRules"
:formAllSchemas="ProductredressRequestMain.allSchemas" :formAllSchemas="ProductredressRequestMain.allSchemas"
@ -123,19 +125,24 @@ const tableColumns = ref([...ProductredressRequestMain.allSchemas.tableColumns,.
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if (formField == 'itemCode') {
row['itemCode'] = val[0]['itemCode']
row['qty'] = val[0]['qty']
row['uom'] = val[0]['uom']
row['packingNumber'] = val[0]['packingNumber']
row['batch'] = val[0]['batch']
row['packQty'] = val[0]['packQty']
row['packUnit'] = val[0]['packUnit']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['toLocationCode'] = val[0]['locationCode']
}
// //
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
if (formField == 'itemCode') {
if(tableData.value.find(item1=>item1['id'] == item['id'])) return
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['itemCode'] = item['itemCode']
newRow['qty'] = item['qty']
newRow['uom'] = item['uom']
newRow['packingNumber'] = item['packingNumber']
newRow['batch'] = item['batch']
newRow['packQty'] = item['packQty']
newRow['packUnit'] = item['packUnit']
newRow['inventoryStatus'] = item['inventoryStatus']
newRow['toLocationCode'] = item['locationCode']
tableData.value.push(newRow)
})
}
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]

1
src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts

@ -332,6 +332,7 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
} }
}, },
tableForm:{ tableForm:{
multiple:true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段

Loading…
Cancel
Save