diff --git a/src/api/system/area/index.ts b/src/api/system/area/index.ts
index e91a4997c..32c94269d 100644
--- a/src/api/system/area/index.ts
+++ b/src/api/system/area/index.ts
@@ -9,3 +9,13 @@ export const getAreaTree = async () => {
export const getAreaByIp = async (ip: string) => {
return await request.get({ url: '/system/area/get-by-ip?ip=' + ip })
}
+
+// 获得选择的地区
+export const getChooseAreaTree = async () => {
+ return await request.get({ url: '/crm/area/getChooseAreaTree' })
+}
+
+// 获得选择的地区
+export const setChooseAreaTree = async (data: any) => {
+ return await request.put({ url: 'crm/area/update', data })
+}
diff --git a/src/views/crm/contact/ContactForm.vue b/src/views/crm/contact/ContactForm.vue
index 15267b8bb..eb41717f1 100644
--- a/src/views/crm/contact/ContactForm.vue
+++ b/src/views/crm/contact/ContactForm.vue
@@ -336,7 +336,6 @@ const submitForm = async () => {
const changeCustomerId = (val) => {
let arr = customerList.value.filter(v => v.id === val)
- console.log('%csrc/views/crm/contact/ContactForm.vue:341 arr', 'color: #007acc;', arr,customerList.value);
if(arr.length) formData.value.registeredAddress = arr[0]['registeredAddress']
}
diff --git a/src/views/crm/contact/index.vue b/src/views/crm/contact/index.vue
index 23f3003e2..3955a010d 100644
--- a/src/views/crm/contact/index.vue
+++ b/src/views/crm/contact/index.vue
@@ -176,7 +176,7 @@
v-hasPermi="['crm:contact:update']"
link
type="primary"
- @click="openForm('update', scope.row.id)"
+ @click="openForm('update', scope.row.id, scope.row.customerId)"
>
编辑
@@ -269,8 +269,8 @@ const handleTabClick = (tab: TabsPaneContext) => {
/** 添加/修改操作 */
const formRef = ref()
-const openForm = (type: string, id?: number) => {
- formRef.value.open(type, id)
+const openForm = (type: string, id?: number, customerId?: number) => {
+ formRef.value.open(type, id, customerId)
}
/** 删除按钮操作 */
diff --git a/src/views/crm/contract/ContractChange.vue b/src/views/crm/contract/ContractChange.vue
index 464f24392..4ab31bd36 100644
--- a/src/views/crm/contract/ContractChange.vue
+++ b/src/views/crm/contract/ContractChange.vue
@@ -106,14 +106,14 @@
甲方授权人
-
+
@@ -245,7 +245,8 @@ const formData = ref({
deptId: undefined,
quotationTimes: undefined,
changeItem: 1,
- products: []
+ products: [],
+ contractAAuthorizedCompanysHis: []
})
const formRules = reactive({
name: [{ required: true, message: '合同名称不能为空', trigger: 'blur' }],
@@ -290,6 +291,7 @@ const open = async (type: string) => {
try {
let data = await ContractApi.getContract(type)
data.agreementDeadline = moment(data.endTime).format('YYYY-MM-DD')
+ formData.value.contractAAuthorizedCompanysHis = JSON.parse(JSON.stringify(data.contractAAuthorizedPersons))
if(!route.query.id) delete data.customerId
@@ -390,11 +392,11 @@ if(contractFormRef.value) {
data.changeAmount = dataFormList.changeAmount
data.changeAmountDeadline = dataFormList.changeAmountDeadline
} else if(formData.value.changeItem == 2) {
- let ids = []
- dataFormList.map(item => {
- ids.push(item.customerContactId)
- })
- data.afterAuthorizerId = ids.join(',')
+ // let ids = []
+ // dataFormList.map(item => {
+ // ids.push(item.customerContactId)
+ // })
+ data.afterAuthorizerId = JSON.stringify(dataFormList)
} else if(formData.value.changeItem == 3) {
data.agreementDeadline = dataFormList.agreementDeadline
data.extensionYears = dataFormList.extensionYears
@@ -407,7 +409,7 @@ if(contractFormRef.value) {
} else if(formData.value.changeItem == 5) {
let ids = []
dataFormList.map(item => {
- ids.push(item.id)
+ ids.push(item.customerCompanyId)
})
data.afterAffiliateCompanyId = ids.join(',')
} else if(formData.value.changeItem == 6) {
diff --git a/src/views/crm/contract/ContractForm.vue b/src/views/crm/contract/ContractForm.vue
index d9884239e..731993045 100644
--- a/src/views/crm/contract/ContractForm.vue
+++ b/src/views/crm/contract/ContractForm.vue
@@ -901,7 +901,8 @@ const handleQuotationChange = async (quotationId: number) => {
if (!quotationId) return
try {
const quotation = await QuotationApi.getQuotation(quotationId)
- formData.value.products = quotation.products;
+
+ if(!formType.value) formData.value.products = quotation.products;
// formData.value.customerId = quotation.customerId;
formData.value.invoiceTemplateId = quotation.invoiceTemplateId;
diff --git a/src/views/crm/contract/components/ContractAAuthorizedCompanyForm.vue b/src/views/crm/contract/components/ContractAAuthorizedCompanyForm.vue
index ff311e6ba..8643f8c27 100644
--- a/src/views/crm/contract/components/ContractAAuthorizedCompanyForm.vue
+++ b/src/views/crm/contract/components/ContractAAuthorizedCompanyForm.vue
@@ -80,7 +80,8 @@ const getList = async (val) => {
companyBank: v.companyBank,
companyAccount: v.companyAccount,
companyAddress: v.companyAddress,
- id: v.id
+ // id: v.id,
+ customerCompanyId: v.id
})
})
formData.value = newList
diff --git a/src/views/crm/contract/components/ContractAuthPersonInfo.vue b/src/views/crm/contract/components/ContractAuthPersonInfo.vue
index 3b8d48fc4..99768ce83 100644
--- a/src/views/crm/contract/components/ContractAuthPersonInfo.vue
+++ b/src/views/crm/contract/components/ContractAuthPersonInfo.vue
@@ -1,18 +1,22 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+