From 4dfd531b4a32c94598080d085cfeb3c453a51e64 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Tue, 25 Jun 2024 13:54:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E7=94=B3=E8=AF=B7--bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierinvoiceRequestMain/index.vue | 107 ++++++++++++++++-- 1 file changed, 95 insertions(+), 12 deletions(-) diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index 4eaeb8d8a..47e2b3da1 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -293,6 +293,14 @@ const basicFormFooter = computed(()=>{ }) } else { + // 切换供应商代码 + if(formField=='supplierCode'&&val[0][searchField]!=searchFormRef.formModel.supplierCode){ + tableData.value = [] + } + // 切换订单类型 + if(formField=='orderType'&&val[0][searchField]!=searchFormRef.formModel.orderType){ + tableData.value = [] + } const setV = {} setV[formField] = val[0][searchField] searchFormRef.setValues(setV) @@ -474,11 +482,19 @@ const handleImport = () => { const formRef = ref() const openForm = async (type : string, row ?: number) => { if(type=='update'){ + //编辑 SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => { + // 供应商代码 + if(item.field == 'supplierCode'){ + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + // 订单类型 if(item.field == 'orderType'){ item.componentProps.disabled = true } - if(row.status=='1'){ + // 根据状态判断 + if(row.status=='1'||row.status=='6'){ if(item.field == 'procurementCreator'){ // 采购价格审批人 item.componentProps.disabled = false @@ -487,13 +503,53 @@ const handleImport = () => { // 税率 item.componentProps.disabled = false } + // 调整价差 + if(item.field == 'discountAmount'){ + item.componentProps.disabled = false + } + // 调整税额 + if(item.field == 'adjustingTaxAmount'){ + item.componentProps.disabled = false + } + // 折扣金额 + if(item.field == 'discountAmount1'){ + item.componentProps.disabled = false + } + // 金税票号 + if(item.field == 'goldenTaxInvoiceNumber'){ + item.componentProps.disabled = false + } + // 开票日期 + if(item.field == 'invoiceTime'){ + item.componentProps.disabled = false + } }else{ + // 采购价格审批人 if(item.field == 'procurementCreator'){ - // 采购价格审批人 item.componentProps.disabled = true } + // 税率 if(item.field == 'taxRate'){ - // 税率 + item.componentProps.disabled = true + } + // 调整价差 + if(item.field == 'discountAmount'){ + item.componentProps.disabled = true + } + // 调整税额 + if(item.field == 'adjustingTaxAmount'){ + item.componentProps.disabled = true + } + // 折扣金额 + if(item.field == 'discountAmount1'){ + item.componentProps.disabled = true + } + // 金税票号 + if(item.field == 'goldenTaxInvoiceNumber'){ + item.componentProps.disabled = true + } + // 开票日期 + if(item.field == 'invoiceTime'){ item.componentProps.disabled = true } } @@ -501,20 +557,47 @@ const handleImport = () => { }) }else{ + // 新增 SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => { - if(item.field == 'orderType'){ - item.componentProps.disabled = false - } + + // 供应商代码 if(item.field == 'supplierCode'){ //默认供应商代码 item.value = defaultSupplierCode.value + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + // 订单类型 + if(item.field == 'orderType'){ + item.componentProps.disabled = false } + + //采购价格审批人 if(item.field == 'procurementCreator'){ - //采购价格审批人 item.componentProps.disabled = false } + // 税率 if(item.field == 'taxRate'){ - // 税率 + item.componentProps.disabled = false + } + // 调整价差 + if(item.field == 'discountAmount'){ + item.componentProps.disabled = false + } + // 调整税额 + if(item.field == 'adjustingTaxAmount'){ + item.componentProps.disabled = false + } + // 折扣金额 + if(item.field == 'discountAmount1'){ + item.componentProps.disabled = false + } + // 金税票号 + if(item.field == 'goldenTaxInvoiceNumber'){ + item.componentProps.disabled = false + } + // 开票日期 + if(item.field == 'invoiceTime'){ item.componentProps.disabled = false } }) @@ -902,10 +985,10 @@ const handleImport = () => { message.warning(t('ts.请添明细数据')) return; } - if(data.subList.length > 999){ - message.warning(t('ts.明细数据条数已超过最大数量限制【999条】')) - return; - } + // if(data.subList.length > 999){ + // message.warning(t('ts.明细数据条数已超过最大数量限制【999条】')) + // return; + // } await SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain(data) message.success(t('common.createSuccess')) } else {