diff --git a/src/api/wms/supplierdeliverRequestMain/index.ts b/src/api/wms/supplierdeliverRequestMain/index.ts index dddc0c3a1..b85ae51c6 100644 --- a/src/api/wms/supplierdeliverRequestMain/index.ts +++ b/src/api/wms/supplierdeliverRequestMain/index.ts @@ -96,6 +96,12 @@ export const genLabel = async (data:SupplierdeliverRequestMainVO) => { return await request.post({ url: `/wms/supplierdeliver-request-main/genLabel`,data }) } +// 校验是否修改了包装数量 +export const checkPackQty = async (data:SupplierdeliverRequestMainVO) => { + return await request.post({ url: `/wms/supplierdeliver-request-main/checkPackQty`,data }) +} + + // 生成记录 export const genRecordsSupplierdeliverRequestMain = async (id) => { return await request.post({ url: `/wms/supplierdeliver-request-main/genRecords?id=` + id }) diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index 8716cb4cf..a1b887cfa 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -774,6 +774,7 @@ export default { 物品包装信息:'Item packaging information', 系统提示:'System Prompt', 是否为此数据生成标签:'Do you generate labels for this data?', + 是否修改物料包装标包数量:'Do you want to modify the quantity of material packaging?', 是否处理所选中数据:'Do you process the selected data?', 发货:'shipments', 标签信息:'Label information', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index ea7b03a7d..285b29a13 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -774,6 +774,7 @@ export default { 物品包装信息:'物品包装信息', 系统提示:'系统提示', 是否为此数据生成标签:'是否为此数据生成标签', + 是否修改物料包装标包数量:'是否修改物料包装标包数量', 是否处理所选中数据:'是否处理所选中数据', 发货:'发货', 标签信息:'标签信息', diff --git a/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts b/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts index 01de70af0..90263f8d8 100644 --- a/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts +++ b/src/views/qms/inspectionRecord/inspectionRecordMain.data.ts @@ -2,7 +2,7 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter2 } from '@/utils/formatTime' import { validateHanset, validateEmail } from '@/utils/validator' import { dateFormatter } from '@/utils/formatTime' -import {validateTwoNum } from '@/utils/validator' +import {validateTwoNum,validateSixNum } from '@/utils/validator' const { t } = useI18n() // 国际化 /** @@ -716,18 +716,18 @@ export const InspectionRecordPackage = useCrudSchemas(reactive([ export const InspectionRecordPackageRules = reactive({ qualifiedAmount: [ required, - { validator:validateTwoNum, message: '小数点后最多6位', trigger: 'blur'} + { validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'} ], frozenAmount: [ required, - { validator:validateTwoNum, message: '小数点后最多6位', trigger: 'blur'} + { validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'} ], destroyAmount: [ required, - { validator:validateTwoNum, message: '小数点后最多6位', trigger: 'blur'} + { validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'} ], noQualifiedAmount: [ required, - { validator:validateTwoNum, message: '小数点后最多6位', trigger: 'blur'} + { validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'} ], }) diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index 502d4cfe0..c6ca17db8 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -1013,7 +1013,10 @@ export const UnplannedreceiptRequestDetailRules = reactive({ ], qadProjectCode:[ { required: true, message: '请选择科目代码', trigger: 'change' } - ] + ], + singlePrice:[ + { required: true, message: '请维护标准成本价格', trigger: 'blur' } + ], }) diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue index 47f9ad915..f364551b9 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue @@ -210,7 +210,7 @@ const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row const searchTableSuccess = async(formField, searchField, val, formRef, type, row) => { console.log('searchTableSuccess',formField, searchField, val, formRef, type, row) - + console.log('searchTableSuccess123',val) nextTick( async () => { if (type == 'tableForm') { @@ -263,7 +263,7 @@ const searchTableSuccess = async(formField, searchField, val, formRef, type, row let params = { itemCode: row.itemCode, batch: row.batch, - locationCode:val.code + locationCode:val[0]['code'] } let aa = await BalanceApi.getSumByConditions(params); console.log('23423423',aa); @@ -826,8 +826,13 @@ const tableSelectionDelete = (selection) => { // 主子数据 提交 const submitForm = async (formType, data) => { - if(tableData.value.find(item=>Number(item.returnedQty)>Number(item.receiptQty))){ - message.warning("退货数量不能大于收获数量") + console.log('submitForm',tableData.value) + // if(tableData.value.find(item=>Number(item.returnedQty)>Number(item.receiptQty))){ + // message.warning("退货数量不能大于收获数量") + // return; + // } + if(tableData.value.find(item=>Number(item.qty)>Number(item.inventoryBalance))){ + message.warning("退货数量不能大于库存余额") return; } data.subList = tableData.value // 拼接子表数据参数 diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index feda09164..58ebb27b9 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -788,11 +788,27 @@ const submitFormLabel = async (formType, data) => { console.log("formType==",formType) console.log("data==",data) data.subList = detatableData.tableList - console.log("detatableData",detatableData) - await message.confirm(t('ts.是否为此数据生成标签?')) - await SupplierdeliverRequestMainApi.genLabel(data) - isCreateLabel.value = true - message.success(t('ts.创建标签成功')) + // 校验物料包装规格数量是否修改 + let flag = false; + await SupplierdeliverRequestMainApi.checkPackQty(data).then(async res => { + if(res){ + await message.confirm(t('ts.是否修改物料包装标包数量')+'?').then(()=>{ + flag = true; //修改标包数量 + }).catch(() =>{ + flag = false + }) + }else{ + flag = true; //修改标包数量 + } + }) + console.log("返回结果",flag); + if(flag){ + console.log("detatableData",detatableData) + await message.confirm(t('ts.是否为此数据生成标签?')) + await SupplierdeliverRequestMainApi.genLabel(data) + isCreateLabel.value = true + message.success(t('ts.创建标签成功')) + } getList() } finally { formLabelRef.value.formLoading = false