Browse Source

字段显示

master_hella_20240701
yufei0306 5 months ago
parent
commit
097b4df621
  1. 25
      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

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList"
:rules="ProductionMainRules"
:formAllSchemas="ProductionMain.allSchemas"
@ -106,14 +108,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(async() => {
if (type == 'tableForm') {
//
await ItemBasicApi.getItembasicPage({
code: row['itemCode']
}).then(res => {
row['uom'] = res?.list[0].uom
}).catch(err =>{
console.log(err);
})
row[formField] = val[0][searchField]
// await ItemBasicApi.getItembasicPage({
// code: row['itemCode']
// }).then(res => {
// row['uom'] = res?.list[0].uom
// }).catch(err =>{
// console.log(err);
// })
if(formField=='itemCode'){
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 {
const setV = {}
if(formField == 'workshop'){

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

@ -635,6 +635,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
tableForm:{
multiple:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
@ -740,7 +741,10 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
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
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList"
:rules="ProductputawayRequestMainRules"
:formAllSchemas="ProductputawayRequestMain.allSchemas"
@ -106,14 +108,20 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['poLine'] = val[0]['itemCode']
row['packingNumber'] = val[0]['packingNumber']
row['containerNumber'] = val[0]['containerNumber']
row['batch'] = val[0]['batch']
row['uom'] = val[0]['uom']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['fromLocationCode'] = val[0]['locationCode']
if(tableData.value.find(item1=>item1['id'] == item['id'])) return
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['poLine'] = item['itemCode']
newRow['packingNumber'] = item['packingNumber']
newRow['containerNumber'] = item['containerNumber']
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 {
const setV = {}
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
},
tableForm:{
multiple:true,
isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList"
:rules="ProductredressRequestMainRules"
:formAllSchemas="ProductredressRequestMain.allSchemas"
@ -123,19 +125,24 @@ const tableColumns = ref([...ProductredressRequestMain.allSchemas.tableColumns,.
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
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]
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 {
const setV = {}
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:{
multiple:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段

Loading…
Cancel
Save