+
-
-
+
+
@@ -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 @@
-
-
+
+
-
-
+
+
-
-
+
+
()
const formLoading = ref(false) // 表单的加载中
const formData = ref([])
@@ -170,9 +171,9 @@ const formRules = reactive({
onlinePrice: [{ required: true, message: '线上价格不能为空', trigger: 'blur' }],
offlinePrice: [{ required: true, message: '线下价格不能为空', trigger: 'blur' }],
totalPrice: [{ required: true, message: '总计价格不能为空', trigger: 'blur' }],
- productInvoiceItems: [{ required: true, message: '产品开具项目不能为空', trigger: 'blur' }],
- serviceFeeInvoice: [{ required: true, message: '服务费票据不能为空', trigger: 'blur' }],
- serviceFeeInvoiceItems: [{ required: true, message: '服务开具项目不能为空', trigger: 'blur' }],
+ productInvoiceItem: [{ required: true, message: '产品开具项目不能为空', trigger: 'blur' }],
+ serviceInvoice: [{ required: true, message: '服务费票据不能为空', trigger: 'blur' }],
+ serviceInvoiceItem: [{ required: true, message: '服务开具项目不能为空', trigger: 'blur' }],
productInvoice: [{ required: true, message: '产品票据不能为空', trigger: 'blur' }],
})
const formRef = ref() // 表单 Ref
@@ -189,6 +190,7 @@ watch(
}
try {
formLoading.value = true
+ console.log('%csrc/views/crm/quotation/components/QuotationProductForm.vue:214 1111', 'color: #007acc;', 2222);
// if(val.quotationId) {
// formData.value = await QuotationApi.getQuotationProductListByQuotationId(val.quotationId)
// } else if(val.businessId) {
@@ -199,7 +201,7 @@ watch(
formLoading.value = false
}
},
- { immediate: true }
+ // { immediate: true }
)
watch(
@@ -211,6 +213,7 @@ watch(
}
try {
formLoading.value = true
+ console.log('%csrc/views/crm/quotation/components/QuotationProductForm.vue:214 1111', 'color: #007acc;', 1111);
// if(val.quotationId) {
// formData.value = await QuotationApi.getQuotationProductListByQuotationId(val.quotationId)
// } else if(val.businessId) {
@@ -223,9 +226,9 @@ watch(
let foundItem = formData.value.find(item => item.productId == data.productId);
if (foundItem) {
foundItem.productInvoice = data.productInvoice
- foundItem.productInvoiceItems = data.productInvoiceItems
- foundItem.serviceFeeInvoice = data.serviceFeeInvoice
- foundItem.serviceFeeInvoiceItems = data.serviceFeeInvoiceItems
+ foundItem.productInvoiceItem = data.productInvoiceItems
+ foundItem.serviceInvoice = data.serviceFeeInvoice
+ foundItem.serviceInvoiceItem = data.serviceFeeInvoiceItems
}
}
// formData.value = business
@@ -234,7 +237,7 @@ watch(
formLoading.value = false
}
},
- { immediate: true }
+ // { immediate: true }
)
// 监听合同产品变化,计算合同产品总价
watch(
@@ -254,6 +257,20 @@ watch(
},
{ deep: true }
);
+
+watch(
+ () => props.products,
+ (val) => {
+ if (!val || val.length === 0) {
+ return;
+ }
+ nextTick(() => {
+ formData.value = val
+ })
+ },
+ { immediate: true }
+
+);
/** 新增按钮操作 */
const handleAdd = () => {
const row = {
@@ -266,8 +283,8 @@ const handleAdd = () => {
offlinePrice: undefined,
totalPrice: undefined,
productInvoice: undefined,
- productInvoiceItems: undefined,
- serviceFeeInvoice: undefined,
+ productInvoiceItem: undefined,
+ serviceInvoice: undefined,
serviceFeeInvoiceItems: undefined
}
row.quotationId = props.quotationId