diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index 90e330482..4c195e17d 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -1325,6 +1325,7 @@ export default { 退回:'Return', 作废成功: 'Invalid successfully', '索赔金额不能为0,请修改后提交。': 'The claim amount cannot be 0, please modify and submit.', + '发货数量必须大于0': 'The shipment quantity must be greater than 0', 新增班次: 'Create Shift', 更多:'More', 批量重试:'Batch retry', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 50ebd2930..4fa544df5 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -1324,6 +1324,7 @@ export default { 作废成功:'作废成功', 退回: '退回', '索赔金额不能为0,请修改后提交。': '索赔金额不能为0,请修改后提交。', + '发货数量必须大于0': '发货数量必须大于0', 新增班次:'新增班次', 更多:'更多', 批量重试:'批量重试', diff --git a/src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue b/src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue index 25ac3a5db..a67edd609 100644 --- a/src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue +++ b/src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue @@ -148,8 +148,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => } const setV = {} setV[formField] = val[0][searchField] - if (formField == 'modelShow') { - setV['modelShow'] = val.map(item=>item.model).join(',') + if (formField == 'model') { + setV['model'] = val.map(item=>item.model).join(',') } if (formField == 'supplierCode') { @@ -182,7 +182,7 @@ const submitForm = async (formType, submitData) => { if (data.masterId) { data.id = data.masterId } - data.model =data.modelShow[0] + // data.model =data.modelShow[0] // data.model =data.modelShow.join(',') data.yearAndMonth =data.yearAndMonthShow.join(',') data.subList = tableData.value // 拼接子表数据参数 @@ -327,23 +327,25 @@ const openForm = async (type: string, row?: any) => { item.componentProps.isSearchList = false item.componentProps.disabled = true } - if (item.field == 'modelShow') { + if (item.field == 'model') { item.componentProps.disabled = true + item.componentProps.isSearchList = false } if (item.field == 'yearAndMonthShow') { item.componentProps.disabled = true } }) row.yearAndMonthShow =row.yearAndMonth.split(',') - row.modelShow =row.model.split(',') + // row.modelShow =row.model.split(',') } else { ModelDeliTime.allSchemas.formSchema.forEach((item) => { if (item.field == 'supplierCode') { item.componentProps.isSearchList = true item.componentProps.disabled = false } - if (item.field == 'modelShow') { + if (item.field == 'model') { item.componentProps.disabled = false + item.componentProps.isSearchList = true } if (item.field == 'yearAndMonthShow') { item.componentProps.disabled = false diff --git a/src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts b/src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts index 5a742fd1f..b796c0be4 100644 --- a/src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts +++ b/src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts @@ -106,11 +106,11 @@ export const ModelDeliTime = useCrudSchemas(reactive([ // }, { label: '受入号', - field: 'modelShow', + field: 'model', sort: 'custom', isSearch: true, - isTable: false, - isDetail: false, + isTable: true, + isDetail: true, // form: { // component: 'Select', // componentProps: { @@ -156,14 +156,14 @@ export const ModelDeliTime = useCrudSchemas(reactive([ } } }, - { - label: '受入号', - field: 'model', - sort: 'custom', - isTable: true, - isDetail: true, - isForm: false, - }, + // { + // label: '受入号', + // field: 'model', + // sort: 'custom', + // isTable: true, + // isDetail: true, + // isForm: false, + // }, { label: '年月', field: 'yearAndMonthShow', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue index e5c5e95b3..d23616ea3 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue @@ -532,7 +532,7 @@ const isShowMainButton1 = (row, val) => { formRef.value.open(type, row) if('create'==type){ nextTick(async () => { - formRef.value.formRef.setValues({deliveryDate:dayjs().valueOf()}) + formRef.value.formRef.setValues({deliveryDate:dayjs().valueOf(),schdShipDate:dayjs().valueOf()}) }) PurchasePlanMain.allSchemas.formSchema.forEach((item) => { // 供应商代码 diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts index 0a469d1cc..8f4158efd 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts @@ -233,6 +233,41 @@ export const PurchasePlanMain = useCrudSchemas( dateFormat:'YYYY-MM-DD' } }, + { + label: '取货日期', + sortTableDefault:5, + field: 'schdShipDate', + sort: 'custom', + isDetail: true, + isTable: true, + isForm: true, + isTableForm: false, + isSearch: true, + sortSearchDefault: 3, + formatter: dateFormatter2, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 '), new Date('1 ')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + format: 'YYYY-MM-DD', + valueFormat: 'x', + defaultTime: [new Date('1 '), new Date('1 ')] + } + }, + table: { + width: 150 + }, + detail: { + dateFormat:'YYYY-MM-DD' + } + }, { label: '便次', field: 'deliNo', @@ -592,6 +627,7 @@ export const PurchasePlanMainRules = reactive({ supplierCode: [{ required: true, message: '请选择供应商代码', trigger: 'change' }], poNumber: [{ required: true, message: '请选择采购订单号', trigger: 'change' }], deliveryDate: [{ required: true, message: '请选择送达时间', trigger: 'change' }], + schdShipDate: [{ required: true, message: '请选择取货日期', trigger: 'change' }], status: [{ required: true, message: '请选择状态', trigger: 'change' }], number: [{ required: true, message: '请输入单据号', trigger: 'blur' }], businessType: [{ required: true, message: '请输入业务类型', trigger: 'blur' }], diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue index fe656f047..9aba3b5e3 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue @@ -312,8 +312,11 @@ const getSearchTableData = async (number,formField,searchField,isAll)=>{ let produceDateStr = formatDate(newRow['produceDate'],'YYYYMMDD'); newRow['batch'] = produceDateStr newRow['supplierBatch'] = produceDateStr - newRow.expireDate = row['expireTime']?addDay(newRow['produceDate'],row['expireTime']).valueOf():dayjs('2099-12-31').valueOf() - + newRow.expireDate = row['expireTime'] ? addDay(newRow['produceDate'], row['expireTime']).valueOf() : dayjs('2099-12-31').valueOf() + // 可以允许超发 + if (newRow['allowOverShipment'] == 'TRUE') { + newRow['qty'] =0 + } tableData.value.push(newRow) itemCodes.push(row['itemCode']) }) @@ -356,9 +359,9 @@ const submitForm = async (formType, submitData) => { // data.subList = tableData.value // 拼接子表数据参数 data.subList = [] for (let item of tableData.value) { - if(item.qty>0){ + // if(item.qty>0){ data.subList.push(item) // 拼接子表数据参数 - } + // } } let isHave = data.subList.some((item) => { @@ -374,6 +377,9 @@ const submitForm = async (formType, submitData) => { // 2.2. 如果物料不允许超发,申请发货数量不能大于 计划数量 - 已发货数量 let itemCodes = [] let itemCodeSum = [] + // 2.3 如果物料发货是0,不可以提交 + let itemCodesQtyIsZ = [] + console.log(222, data.subList) data.subList.forEach(item=>{ if(item['allowOverShipment']!='TRUE'){ let qtyDefault = item['planQty'] - item['shippedQty'] @@ -395,7 +401,22 @@ const submitForm = async (formType, submitData) => { } } } + console.log(item['qty']) + if(!item['qty']||item['qty']==0){ + itemCodesQtyIsZ.push({ + itemCode:item['itemCode'], + poLine:item['poLine'] + }) + } }) + if(itemCodesQtyIsZ.length>0){ + let str = '' + itemCodesQtyIsZ.forEach(cur => { + str += `【物料号${cur.itemCode}-订单行${cur.poLine}】` + }) + message.error(`${str}${t('ts.发货数量必须大于0')}`) + return + } if(itemCodes.length>0){ let str = '' itemCodes.forEach(cur => { diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts index ec864c70c..990692578 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts @@ -257,6 +257,42 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( } }, }, + { + label: '取货日期', + sortTableDefault:5, + field: 'schdShipDate', + sort: 'custom', + isDetail: true, + isTable: true, + isForm: true, + isTableForm: false, + isSearch: true, + sortSearchDefault: 3, + formatter: dateFormatter2, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 '), new Date('1 ')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + disabled: true, + format: 'YYYY-MM-DD', + valueFormat: 'x', + defaultTime: [new Date('1 '), new Date('1 ')] + } + }, + table: { + width: 150 + }, + detail: { + dateFormat:'YYYY-MM-DD' + } + }, { label: '便次', field: 'deliNo',