diff --git a/src/views/crm/contract/ContractForm.vue b/src/views/crm/contract/ContractForm.vue index bd1bab397..7054dfb6d 100644 --- a/src/views/crm/contract/ContractForm.vue +++ b/src/views/crm/contract/ContractForm.vue @@ -123,7 +123,7 @@ - + - + - + - + @@ -153,7 +153,7 @@ - + - + - + - + - + - + - + @@ -277,14 +277,14 @@ - + - + - + - + @@ -416,6 +416,7 @@ const formData = ref({ const formRules = reactive({ name: [{ required: true, message: '合同名称不能为空', trigger: 'blur' }], customerId: [{ required: true, message: '客户不能为空', trigger: 'blur' }], + quotationId: [{ required: true, message: '报价单编号不能为空', trigger: 'blur' }], orderDate: [{ required: true, message: '下单日期不能为空', trigger: 'blur' }], ownerUserId: [{ required: true, message: '负责人不能为空', trigger: 'blur' }] }) @@ -478,8 +479,30 @@ const submitForm = async () => { const valid = await formRef.value.validate() if (!valid) return // 提交请求 + if(contractAAuthorizedCompanyFormRef.value.getData().length) { + const contractAAuthorizedCompanyValid = await contractAAuthorizedCompanyFormRef.value.validate() + if (!contractAAuthorizedCompanyValid) return message.warning('请完善合同甲方关联单位') + } else { + return message.warning('请完善合同甲方关联单位') + } + + if(contractAAuthorizedPersonFormRef.value.getData().length) { + const contractAAuthorizedPerson = await contractAAuthorizedPersonFormRef.value.validate() + if (!contractAAuthorizedPerson) return message.warning('请完善合同甲方授权人信息') + } else { + return message.warning('请完善合同甲方授权人信息') + } + + if(contractBAuthorizedPersonFormRef.value.getData().length) { + const contractBAuthorizedPersonPerson = await contractBAuthorizedPersonFormRef.value.validate() + if (!contractBAuthorizedPersonPerson) return message.warning('请完善合同乙方授权人信息') + } else { + return message.warning('请完善合同乙方授权人信息') + } + + return formLoading.value = true - productFormRef.value.validate() + try { const data = unref(formData.value) as unknown as ContractApi.ContractVO // 拼接子表的数据 diff --git a/src/views/crm/contract/components/ContractProductForm.vue b/src/views/crm/contract/components/ContractProductForm.vue index 20b1f9b55..398a98b80 100644 --- a/src/views/crm/contract/components/ContractProductForm.vue +++ b/src/views/crm/contract/components/ContractProductForm.vue @@ -168,7 +168,6 @@ defineExpose({ validate }) /** 初始化 */ onMounted(async () => { - console.log('%csrc/views/crm/contract/components/ContractProductForm.vue:171 props.type', 'color: #007acc;', props.type); productList.value = await ProductApi.getProductSimpleList() }) diff --git a/src/views/crm/contract/detail/ContractDetail.vue b/src/views/crm/contract/detail/ContractDetail.vue index 3edf2545c..ac26ca990 100644 --- a/src/views/crm/contract/detail/ContractDetail.vue +++ b/src/views/crm/contract/detail/ContractDetail.vue @@ -283,12 +283,12 @@ - + - + diff --git a/src/views/crm/quotation/QuotationForm.vue b/src/views/crm/quotation/QuotationForm.vue index 5405e1bf8..865c4531e 100644 --- a/src/views/crm/quotation/QuotationForm.vue +++ b/src/views/crm/quotation/QuotationForm.vue @@ -112,48 +112,48 @@ - - + + - - + + - - + + - - + + - - + + - - + + @@ -174,28 +174,28 @@ - - + + - - + + - - + + - + - - + + @@ -368,7 +368,7 @@ - +
@@ -511,6 +511,10 @@ const onCustomerChange = async (customerId: string) => { try { formLoading.value = true; const customerRes = await CustomerApi.getCustomer(customerId); + formData.value.actualCapital = customerRes.actualCapital + formData.value.socialEmployeeNum = customerRes.socialEmployeeNum + formData.value.startDate = customerRes.startDate + formData.value.actualCapital = customerRes.actualCapital formData.value.cooperationType = customerRes.cooperationType; formData.value.companyType = customerRes.companyType; formData.value.listingStatus = customerRes.listingStatus; @@ -538,11 +542,11 @@ const onPartnerChange = async (id: string) => { try { formLoading.value = true; const res = await ContractApi.getOrgInfo(id); - formData.value.bBankName = res.bankName; - formData.value.bBankAccount = res.bankAccount; - formData.value.bLegalRepresentative = res.legalRepresentative; - formData.value.bBusinessLicenseNumber = res.businessLicenseNumber; - formData.value.bBusinessLicense = res.businessLicense; + formData.value.bankName = res.bankName; + formData.value.bankAccount = res.bankAccount; + formData.value.legalRepresentative = res.legalRepresentative; + formData.value.businessLicenseNumber = res.businessLicenseNumber; + formData.value.businessLicense = res.businessLicense; // formData.value.partnerCompanyId = res.partnerCompanyId; } catch (err) { } finally { diff --git a/src/views/crm/quotation/components/QuotationProductForm.vue b/src/views/crm/quotation/components/QuotationProductForm.vue index cd2c94d5d..97fdb40e7 100644 --- a/src/views/crm/quotation/components/QuotationProductForm.vue +++ b/src/views/crm/quotation/components/QuotationProductForm.vue @@ -96,8 +96,8 @@