diff --git a/src/components/BasicForm/src/BasicFormWmsCount.vue b/src/components/BasicForm/src/BasicFormWmsCount.vue index 398f38994..6ae5c8320 100644 --- a/src/components/BasicForm/src/BasicFormWmsCount.vue +++ b/src/components/BasicForm/src/BasicFormWmsCount.vue @@ -789,16 +789,16 @@ const submitForm = async () => { if (!valid) return // 针对主子表 明细校验 if (props.isBusiness) { - formLoading.value = true + // formLoading.value = true if (formType.value == 'create') { const validateForm = await tableFormRef.value.validateForm() if (!validateForm && props.tableFormDataLength) { if (props.tableData.length == 0) { message.warning('请填写明细信息!') - formLoading.value = false + // formLoading.value = false return } - formLoading.value = false + // formLoading.value = false return } // 主子表——提交请求 @@ -807,7 +807,7 @@ const submitForm = async () => { const data1 = unref(formRef1)?.formModel emit('submitForm', formType.value, { ...data, ...data1 }) } finally { - formLoading.value = false + // formLoading.value = false } } else { // 编辑 @@ -816,17 +816,17 @@ const submitForm = async () => { const data1 = unref(formRef1)?.formModel emit('submitForm', formType.value, { ...data }) } finally { - formLoading.value = false + // formLoading.value = false } } } else { // 基础数据单表——提交请求 - formLoading.value = true + // formLoading.value = true try { const data = unref(formRef)?.formModel emit('success', formType.value, data) } finally { - formLoading.value = false + // formLoading.value = false } } } diff --git a/src/views/qms/inspectionQ2/index.vue b/src/views/qms/inspectionQ2/index.vue index a246fd85d..acdb4c3f6 100644 --- a/src/views/qms/inspectionQ2/index.vue +++ b/src/views/qms/inspectionQ2/index.vue @@ -700,19 +700,36 @@ const handleSend = async (id: number) => { /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + if (row && row.claimAddress?.trim()) { row.filePathList = row.claimAddress.split(',') } + if (row && row.claimAddressName?.trim()) { + row.claimAddressNameList = row.claimAddressName.split(','); + } if (row && row.filePathList && row.filePathList.length > 0) { - row.filePathListView = row.filePathList.map((item) => { + row.filePathListView = row.filePathList.map((item, index) => { return { - name: item, + name: row.claimAddressNameList ? row.claimAddressNameList[index] || item : item, url: item } }) } + // if (row && row.claimAddress?.trim()) { + // row.filePathList = row.claimAddress.split(',') + // } + // + // if (row && row.filePathList && row.filePathList.length > 0) { + // row.filePathListView = row.filePathList.map((item) => { + // return { + // name: item, + // url: item + // } + // }) + // } + basicFormRef.value.open(type, row) if (!row || !row.claimAmount) { nextTick(() => { diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts index 3c7194833..dbb4ae1da 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts @@ -1312,6 +1312,6 @@ export const ScrapRequestDetailRules = reactive({ ], reason: [ { required: true, message: '请输入报废原因', trigger: 'change' }, - { max: 200, message: '不得超过200个字符', trigger: 'blur' } + { max: 24, message: '不得超过24个字符', trigger: 'blur' } ], }) diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts index f74e664fa..71006c7dc 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts @@ -660,7 +660,7 @@ export const UnplannedissueRequestMainRules = reactive({ ], remarkMain: [ { required: true, message: '请输入单据备注', trigger: 'blur' }, - { max: 50, message: '不得超过50个字符', trigger: 'blur' } + { max: 24, message: '不得超过24个字符', trigger: 'blur' } ], usageDescription:[ { required: true, message: '请选择领用描述', trigger: 'blur' } diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index 79d3b6643..64ad37286 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -205,15 +205,15 @@ const clearSearchInput = (formField) => { // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { - console.log('searchTableSuccess',formRef.formModel) + console.log('searchTableSuccess',formField, searchField, val, formRef, type, row) nextTick(async () => { if (type == 'tableForm') { // 明细查询页赋值 if(formField == 'itemCode') { - if(tableData.value.find(item1=>item1['itemCode'] == val[0]['itemCode'])){ - message.warning(`物料${val[0]['itemCode']}已经存在`) - return - } + // if(tableData.value.find(item1=>item1['itemCode'] == val[0]['itemCode'])){ + // message.warning(`物料${val[0]['itemCode']}已经存在`) + // return + // } let enableBuy = val[0]['enableBuy'] if(tableData.value.length>0){ enableBuy = tableData.value[0]['enableBuy'] @@ -227,6 +227,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } val = val.filter(item=>item['enableBuy']==enableBuy) + let messageItemCodes = [] val.forEach(item=>{ const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) newRow['itemCode'] = item['itemCode'] @@ -242,8 +243,17 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } newRow['packUnit'] = item['packUnit'] newRow['packQty'] = item['packQty'] - tableData.value.push(newRow) + if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])){ + messageItemCodes.push(item['itemCode']) + }else{ + tableData.value.push(newRow) + } }) + if(messageItemCodes.length>0){ + message.warning(`物料${messageItemCodes.join(',')}已经存在`) + } + + // HL-4885 聂喜婷:@邱晨 @王宇飞 先把数量的校验拿掉 // 修改 tableform 属性 数量最大值设置为库存余额中数量 @@ -291,8 +301,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => // 来源工位代码 setV['workStationCode'] = val[0]['code'] setV['fromLocationCode'] = val[0]['rawLocationCode'] + tableData.value = [] // 重置明细数据 } - tableData.value = [] // 重置明细数据 formRef.setValues(setV) } }) diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/index.vue index c058e8296..fe72a010c 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/index.vue @@ -193,7 +193,7 @@ import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' const { loadStart, loadDone } = usePageLoading() -// 采购退货申请 +// M类型采购退货申请 defineOptions({ name: 'PurchasereturnRequestMainNew' }) const message = useMessage() // 消息弹窗 @@ -994,7 +994,12 @@ const submitForm = async (formType, submitData) => { tableData.value.forEach((row, index) => { row['expireDate'] = row['expireTime']?addDay(row['produceDate'],row['expireTime']).valueOf():dayjs('2099-12-31').valueOf() }) - data.subList = tableData.value // 拼接子表数据参数 + // data.subList = tableData.value // 拼接子表数据参数 + data.subList = tableData.value.filter(item=>Number(item['qty'])>0) // 拼接子表数据参数 + if(data.subList.length<1){ + message.warning('至少有一条数据') + return + } formRef.value.formLoading = true try { if (formType === 'create') { diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMOrderTypeMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMOrderTypeMain.data.ts index fb8af115e..aa8b29ec4 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMOrderTypeMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMOrderTypeMain/purchasereturnRequestMOrderTypeMain.data.ts @@ -279,14 +279,14 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive