|
|
@ -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] |
|
|
|
} |
|
|
|