Browse Source

YT-2441补给品按数量

intex_online20250427
张立 6 days ago
parent
commit
326a66d2a0
  1. 25
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  2. 3
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
  3. 36
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

25
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -265,7 +265,7 @@ function addDay(date: Date | number, addDay: number) {
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
nextTick(async() => {
if (type == 'tableForm') {
if (formField == 'secondPackUnit') {
row['secondPackUnit'] = val[0]['packUnit']
@ -282,6 +282,29 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
}
const index1 = 0
setTableFormsValues(val, index1)
} else if (formField == 'workStationCode') {
//
const res = await ruleApi.getManagementPrecision({
itemCodes: [row['itemCode']],
locationCode:val[0]['fgLocationCode']
})
if (res[0].ManagementPrecision == 'BY_BATCH') {
row['batch'] = formatTime(new Date(), 'yyyyMMdd')
ProductreceiptRequestDetail.allSchemas.tableFormColumns.forEach(item => {
if(item.field == 'batch')
item.tableForm.disabled = false
})
ProductreceiptRequestDetailRules.batch[0].required = true
//
} else if (res[0].ManagementPrecision == 'BY_QUANTITY') {
ProductreceiptRequestDetail.allSchemas.tableFormColumns.forEach(item => {
if(item.field == 'batch')
item.tableForm.disabled = true
})
row['batch'] = ''
ProductreceiptRequestDetailRules.batch[0].required = false
}
row[formField] = val[0][searchField]
} else {
row[formField] = val[0][searchField]
}

3
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

@ -1113,6 +1113,9 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
tableForm: {
disabled: false
}
},
{
label: '品名',

36
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

@ -246,39 +246,20 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const index1 = 0
setTableFormsValues(val, index1)
} else if (formField == 'workStationCode') {
const params = {
available: 'TRUE',
pageSize: 20,
pageNo: 1,
code: val[0]['fgLocationCode'],
name: '',
areaCode: '',
sort: '',
by: 'ASC',
}
const res = await LocationApi.getLocationPage(params)
console.log(222,res)
const params1 = {
available: 'TRUE',
pageSize: 20,
pageNo: 1,
code: res.list[0].areaCode,
name: '',
type: '',
manageMode:'' ,
sort: '',
by: 'ASC',
}
const res1 = await AreaApi.getAreaPage(params1)
if (res1.list[0].manageMode == 'BY_BATCH') {
//
const res = await ruleApi.getManagementPrecision({
itemCodes: [row['itemCode']],
locationCode:val[0]['fgLocationCode']
})
if (res[0].ManagementPrecision == 'BY_BATCH') {
row['batch'] = formatTime(new Date(), 'yyyyMMdd')
ProductreceiptRequestDetail.allSchemas.tableFormColumns.forEach(item => {
if(item.field == 'batch')
item.tableForm.disabled = false
})
ProductreceiptRequestDetailRules.batch[0].required = true
} else if (res1.list[0].manageMode == 'BY_QUANTITY') {
//
} else if (res[0].ManagementPrecision == 'BY_QUANTITY') {
ProductreceiptRequestDetail.allSchemas.tableFormColumns.forEach(item => {
if(item.field == 'batch')
item.tableForm.disabled = true
@ -286,7 +267,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['batch'] = ''
ProductreceiptRequestDetailRules.batch[0].required = false
}
row[formField] = val[0][searchField]
} else{
row[formField] = val[0][searchField]

Loading…
Cancel
Save