diff --git a/src/api/wms/location/index.ts b/src/api/wms/location/index.ts index 4b5dc96f2..3ab55c6cc 100644 --- a/src/api/wms/location/index.ts +++ b/src/api/wms/location/index.ts @@ -180,3 +180,9 @@ export const enableOption = async (id: number) => { export const disableOption = async (id: number) => { return await request.disable({ url: `/wms/location/disable?id=` + id }) } + +// 查询库位组列表 +export const getFromWarehouseCode = async (code: string) => { + return await request.get({ url: `/wms/location/getFromWarehouseCode?code=` + code }) +} + diff --git a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts index 510dde581..8aa858867 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts @@ -103,6 +103,10 @@ export const DeliverJobMain = useCrudSchemas( table: { width: 180 }, + isSearch: true, + search: { + component: 'Input', + }, isTable: true, isForm: true, form: { diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts index 5f3197726..aa1ef591c 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts @@ -70,6 +70,10 @@ export const DeliverRecordMain = useCrudSchemas( table: { width: 180 }, + isSearch: true, + search: { + component: 'Input', + }, isTable: true, isForm: true, form: { diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts index f9462bbb7..e79517839 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts @@ -276,6 +276,10 @@ export const DeliverRequestMain = useCrudSchemas( table: { width: 180 }, + isSearch: true, + search: { + component: 'Input', + }, isTable: true, isForm: true, form: { @@ -960,7 +964,6 @@ export const DeliverRequestDetail = useCrudSchemas(reactive([ isForm: false, isTableForm: false }, - { label: '批次', field: 'batch', diff --git a/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts b/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts index d3bfd6929..2c67e9075 100644 --- a/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts @@ -72,6 +72,13 @@ export const DeliverRecordMain = useCrudSchemas( }, isTable: true, isForm: true, + isSearch: true, + search: { + component: 'Input', + componentProps: { + + } + }, form: { component: 'Input', componentProps: { @@ -439,6 +446,9 @@ export const DeliverRecordMainRules = reactive({ customerDockCode: [ { required: true, message: '请选择客户月台代码', trigger: 'change' } ], + customerOrderNumber: [ + { required: true, message: '请填写客户订单号', trigger: 'change' } + ], fromWarehouseCode: [ { required: true, message: '请选择从仓库代码', trigger: 'change' } ], diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index 55baaee6a..efc6bd122 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -114,6 +114,7 @@ import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' import * as ruleApi from '@/api/wms/rule/index' +import * as LocationApi from '@/api/wms/location' const { loadStart, loadDone } = usePageLoading() // 生产退料申请 defineOptions({ name: 'ProductionreturnRequestMain' }) @@ -238,11 +239,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => newRow['inventoryStatus'] = item['inventoryStatus'] newRow['qty'] = item['qty'] // 如果有批次 赋值库存余额批次 无批次 赋值 000000 - if (item['batch'] != '') { + // if (item['batch'] != '') { newRow['batch'] = item['batch'] - }else{ - newRow['batch'] = getFormattedDate(); // 获取 YYYYMMDD 格式的日期 - } + // }else{ + // newRow['batch'] = getFormattedDate(); // 获取 YYYYMMDD 格式的日期 + // } // else { // newRow['batch'] = '000000' @@ -324,6 +325,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => // 来源工位代码 setV['workStationCode'] = val[0]['code'] setV['fromLocationCode'] = val[0]['rawLocationCode'] + let locationInfo = await LocationApi.getFromWarehouseCode(val[0]['rawLocationCode']) + setV['toWarehouseCode'] = locationInfo.warehouseCode tableData.value = [] // 重置明细数据 } formRef.setValues(setV) @@ -556,32 +559,32 @@ const buttonTableClick = async (val, row) => { if (res.list[0].enableMake == "FALSE") { // 修改 tableform 属性 detailListTableColumns.tableFormColumns.map(itemColumns => { - if(itemColumns.field == 'productionLineCodePackage') { - itemColumns.tableForm.isInpuFocusShow = false - itemColumns.tableForm.disabled = true - ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false - } - if(itemColumns.field == 'supplierItemCode') { - itemColumns.tableForm.isInpuFocusShow = true - itemColumns.tableForm.disabled = false - ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true - } - }) + if(itemColumns.field == 'productionLineCodePackage') { + itemColumns.tableForm.isInpuFocusShow = false + itemColumns.tableForm.disabled = true + ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false + } + if(itemColumns.field == 'supplierItemCode') { + itemColumns.tableForm.isInpuFocusShow = true + itemColumns.tableForm.disabled = false + ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true + } + }) } else { // 修改 tableform 属性 detailListTableColumns.tableFormColumns.map(itemColumns => { - if(itemColumns.field == 'supplierItemCode') { - itemColumns.tableForm.isInpuFocusShow = false - itemColumns.tableForm.disabled = true - ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false - } - if(itemColumns.field == 'productionLineCodePackage') { - item.productionLineCodePackage = item.productionLineCode - itemColumns.tableForm.isInpuFocusShow = true - itemColumns.tableForm.disabled = true - ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true - } - }) + if(itemColumns.field == 'supplierItemCode') { + itemColumns.tableForm.isInpuFocusShow = false + itemColumns.tableForm.disabled = true + ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false + } + if(itemColumns.field == 'productionLineCodePackage') { + item.productionLineCodePackage = item.productionLineCode + itemColumns.tableForm.isInpuFocusShow = true + itemColumns.tableForm.disabled = true + ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true + } + }) } } else { message.warning('没有查询到物料代码:【' + item.itemCode + '】') diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index 45c155ce0..6a58a794b 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -296,29 +296,33 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive }, isForm:true, form: { - // labelMessage: '信息提示说明!!!', + component: 'Input', componentProps: { - enterSearch: true, - isSearchList: true, - searchListPlaceholder: '请选择仓库代码', - searchField: 'code', - searchTitle: '仓库信息', - searchAllSchemas: Warehouse.allSchemas, - searchPage: WarehouseApi.getWarehousePage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }], - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 + disabled: true } + // labelMessage: '信息提示说明!!!', + // componentProps: { + // enterSearch: true, + // isSearchList: true, + // searchListPlaceholder: '请选择仓库代码', + // searchField: 'code', + // searchTitle: '仓库信息', + // searchAllSchemas: Warehouse.allSchemas, + // searchPage: WarehouseApi.getWarehousePage, + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }], + // verificationParams: [{ + // key: 'code', + // action: '==', + // value: '', + // isMainValue: false, + // isSearch: true, + // isFormModel: true, + // }], // 失去焦点校验参数 + // } } }, { @@ -1377,9 +1381,9 @@ export const ProductionreturnRequestDetailRules = reactive({ qty:[ { validator:validateQty, message: '数量必须大于0', trigger: 'change'} ], - batch: [ - { required: true, message: '请输入批次', trigger: 'blur' } - ], + // batch: [ + // { required: true, message: '请输入批次', trigger: 'blur' } + // ], inventoryStatus: [ { required: true, message: '请选择库存状态', trigger: 'change' } ], @@ -1521,6 +1525,22 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive