Browse Source

YT-2441号口品生产任务按数量管理

intex_online20250427
张立 6 days ago
parent
commit
38ad1daf9f
  1. 47
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  2. 3
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts

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

@ -159,6 +159,8 @@ import * as WorkshopApi from '@/api/wms/workshop'
import * as ConfigApi from '@/api/infra/config'
import { usePageLoading } from '@/hooks/web/usePageLoading'
import * as ruleApi from '@/api/wms/rule/index'
import * as AreaApi from '@/api/wms/areabasic'
import * as LocationApi from '@/api/wms/location'
const { loadStart, loadDone } = usePageLoading()
//
//
@ -226,7 +228,7 @@ const onChange = (field, cur) => {
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
console.log('searchTableSuccess',formField, searchField, val, formRef, type, row)
nextTick(() => {
nextTick(async() => {
if (type == 'tableForm') {
if (formField == 'secondPackUnit') {
row['secondPackUnit'] = val[0]['packUnit']
@ -243,6 +245,49 @@ 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') {
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') {
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/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts

@ -1170,6 +1170,9 @@ export const ProductreceiptRequestDetail = useCrudSchemas(
sortTableDefault: 1006,
table: {
width: 150
},
tableForm: {
disabled:false
}
},
{

Loading…
Cancel
Save