diff --git a/src/api/crm/contract/index.ts b/src/api/crm/contract/index.ts
index 017567137..94116ae52 100644
--- a/src/api/crm/contract/index.ts
+++ b/src/api/crm/contract/index.ts
@@ -78,6 +78,11 @@ export const getContract = async (id: number) => {
return await request.get({ url: `/crm/contract/get?id=` + id })
}
+// 查询 CRM 合同详情
+export const getChangeContract = async (id: number) => {
+ return await request.get({ url: `/crm/contract/getChangeContract?contractChangeId=` + id })
+}
+
// 查询 CRM 合同下拉列表
export const getContractSimpleList = async (customerId: number) => {
return await request.get({
@@ -115,6 +120,11 @@ export const transferContract = async (data: TransferReqVO) => {
return await request.put({ url: '/crm/contract/transfer', data })
}
+// 合同变更
+export const changeContract = async (data: TransferReqVO) => {
+ return await request.put({ url: '/crm/contract/changeContract', data })
+}
+
// 获得待审核合同数量
export const getAuditContractCount = async () => {
return await request.get({ url: '/crm/contract/audit-count' })
diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts
index a5b12161e..fe7b18fee 100644
--- a/src/router/modules/remaining.ts
+++ b/src/router/modules/remaining.ts
@@ -636,7 +636,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
component: () => import('@/views/crm/contract/ContractForm.vue')
},
{
- path: 'contract/change',
+ path: 'contract/ContractChange',
name: 'CrmContractChange',
meta: {
title: '合同变更',
@@ -646,6 +646,18 @@ const remainingRouter: AppRouteRecordRaw[] = [
},
component: () => import('@/views/crm/contract/ContractChange.vue')
},
+ {
+ path: 'contract/detail/ContractChangeDetail',
+ name: 'CrmContractChangeDetail',
+ meta: {
+ title: '合同变更详情',
+ noCache: true,
+ canTo: true,
+ hidden: true,
+ activeMenu: '/crm/contract'
+ },
+ component: () => import('@/views/crm/contract/detail/ContractChangeDetail.vue')
+ },
{
path: 'contract/detail/index',
name: 'CrmContractDetail',
diff --git a/src/views/crm/backlog/index.vue b/src/views/crm/backlog/index.vue
index 883238c9c..7c91b3c75 100644
--- a/src/views/crm/backlog/index.vue
+++ b/src/views/crm/backlog/index.vue
@@ -113,13 +113,13 @@ const getCount = () => {
(count) => (customerPutPoolRemindCount.value = count)
)
CustomerApi.getFollowCustomerCount().then((count) => (customerFollowCount.value = count))
- ClueApi.getFollowClueCount().then((count) => (clueFollowCount.value = count))
+ // ClueApi.getFollowClueCount().then((count) => (clueFollowCount.value = count))
ContractApi.getAuditContractCount().then((count) => (contractAuditCount.value = count))
- ContractApi.getRemindContractCount().then((count) => (contractRemindCount.value = count))
- ReceivableApi.getAuditReceivableCount().then((count) => (receivableAuditCount.value = count))
- ReceivablePlanApi.getReceivablePlanRemindCount().then(
- (count) => (receivablePlanRemindCount.value = count)
- )
+ // ContractApi.getRemindContractCount().then((count) => (contractRemindCount.value = count))
+ // ReceivableApi.getAuditReceivableCount().then((count) => (receivableAuditCount.value = count))
+ // ReceivablePlanApi.getReceivablePlanRemindCount().then(
+ // (count) => (receivablePlanRemindCount.value = count)
+ // )
}
/** 激活时 */
diff --git a/src/views/crm/business/BusinessForm.vue b/src/views/crm/business/BusinessForm.vue
index eac81292a..cb0d323bd 100644
--- a/src/views/crm/business/BusinessForm.vue
+++ b/src/views/crm/business/BusinessForm.vue
@@ -279,7 +279,7 @@ const formData = ref({
creditMethod: undefined,
creditCalcCycle: undefined,
creditLimit: undefined,
- techSupport: undefined,
+ techSupport: 1,
products: []
});
const formRules = reactive({
diff --git a/src/views/crm/contract/ContractChange.vue b/src/views/crm/contract/ContractChange.vue
index 655616f3e..7c306ac56 100644
--- a/src/views/crm/contract/ContractChange.vue
+++ b/src/views/crm/contract/ContractChange.vue
@@ -48,7 +48,7 @@
-
+
+
+
+
+ 额度
+ 授权人
+ 延期
+ 终止
+ 甲方关联单位
+ 重签
+
+
+
- 变更项目
-
-
-
-
-
-
- 甲方现授权人信息
-
-
-
- 甲方授权人
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ 甲方现授权人信息
+
+
+
+ 甲方授权人
+
+
+
+
+
+
+
@@ -124,7 +124,7 @@ import * as ContractApi from '@/api/crm/contract'
import * as ContactApi from '@/api/crm/contact'
import * as UserApi from '@/api/system/user'
import { QuotationApi,QuotationVO } from '@/api/crm/quotation'
-import { erpPriceMultiply, erpPriceInputFormatter } from '@/utils'
+import { erpPriceMultiply, erpPriceInputFormatter, jsonParse } from '@/utils'
import { useUserStore } from '@/store/modules/user'
import ContractChangeLimit from '@/views/crm/contract/components/ContractChangeLimit.vue'
import ContractAuthPersonInfo from '@/views/crm/contract/components/ContractAuthPersonInfo.vue'
@@ -179,6 +179,7 @@ const formData = ref({
partnerCompanyId: undefined,
deptId: undefined,
quotationTimes: undefined,
+ radio: 1,
products: []
})
const formRules = reactive({
@@ -221,7 +222,8 @@ const open = async (type: string) => {
if (type) {
formLoading.value = true
try {
- formData.value = await ContractApi.getContract(type)
+ let data = await ContractApi.getContract(type)
+ formData.value = Object.assign(formData.value, data)
} finally {
formLoading.value = false
}
@@ -244,11 +246,18 @@ const submitForm = async () => {
// const Authalid1 = await contractAAuthorizedCompanyFormRef1.value.validate()
// if (!Authalid1) return
- // const limitValid = await limitFormRef.value.validate()
- // if (!limitValid) return
+if(limitFormRef.value) {
+ const limitValid = await limitFormRef.value.validate()
+ if (!limitValid) return
+}
+
+if(contractExtensionFormRef.value) {
const extensionValid = await contractExtensionFormRef.value.validate()
if (!extensionValid) return
+}
+
+
// const stopValid = await contractStopFormRef.value.validate()
// if (!stopValid) return
@@ -262,20 +271,18 @@ const submitForm = async () => {
// 提交请求
formLoading.value = true
try {
- const data = unref(formData.value) as unknown as ContractApi.ContractVO
+ const data = unref(JSON.parse(JSON.stringify(formData.value))) as unknown as ContractApi.ContractVO
// 拼接子表的数据
data.contractAAuthorizedCompanys = limitFormRef.value.getData()
data.contractAAuthorizedCompanys = contractExtensionFormRef.value.getData()
data.contractAAuthorizedCompanys = contractStopFormRef.value.getData()
data.contractAAuthorizedCompanys = contractFormRef.value.getData()
data.contractAAuthorizedCompanys = contractAAuthorizedCompanyFormRef.value.getData()
- if (!formType.value ) {
- await ContractApi.createContract(data)
- message.success(t('common.createSuccess'))
- } else {
- await ContractApi.updateContract(data)
- message.success(t('common.updateSuccess'))
- }
+ data.contractId = data.id
+ delete data.id
+ await ContractApi.changeContract(data)
+ message.success(t('common.createSuccess'))
+
dialogVisible.value = false
// 发送操作成功的事件
emit('success')
@@ -327,6 +334,7 @@ const resetForm = () => {
partnerCompanyId: undefined,
deptId: undefined,
quotationTimes: undefined,
+ radio: 1,
products: []
}
formRef.value?.resetFields()
diff --git a/src/views/crm/contract/ContractForm.vue b/src/views/crm/contract/ContractForm.vue
index 321e313f2..5aab20345 100644
--- a/src/views/crm/contract/ContractForm.vue
+++ b/src/views/crm/contract/ContractForm.vue
@@ -452,9 +452,7 @@ const open = async (type: string) => {
if (type) {
formLoading.value = true
try {
- console.log('%csrc/views/crm/contract/ContractForm.vue:456 type', 'color: #007acc;', type);
formData.value = await ContractApi.getContract(type)
- console.log('%csrc/views/crm/contract/ContractForm.vue:458 formData.value', 'color: #007acc;', formData.value);
} finally {
formLoading.value = false
}
diff --git a/src/views/crm/contract/components/ContracStop.vue b/src/views/crm/contract/components/ContracStop.vue
index 0dff9a8e1..43c48e36c 100644
--- a/src/views/crm/contract/components/ContracStop.vue
+++ b/src/views/crm/contract/components/ContracStop.vue
@@ -12,6 +12,7 @@
-
+
合同到期
甲方违反协议
乙方不可抗力
@@ -32,7 +33,7 @@
-
+
@@ -50,6 +51,7 @@ import * as CustomerApi from '@/api/crm/customer'
import * as UserApi from '@/api/system/user'
import * as DeptApi from '@/api/system/dept'
import * as BusinessApi from '@/api/crm/business'
+import { propTypes } from '@/utils/propTypes'
/** CRM 方案报价 表单 */
defineOptions({ name: 'QuotationForm' })
@@ -63,7 +65,9 @@ const businessList = ref([])
const deptTree = ref() // 部门树形结构
const deptList = ref() // 部门
const orgList = ref([])
-
+const props = defineProps({
+ type: propTypes.string.def('')
+})
const invoiceTemplateList = ref([])
const { proxy }: any = getCurrentInstance();
diff --git a/src/views/crm/contract/components/ContractAAuthorizedCompanyForm.vue b/src/views/crm/contract/components/ContractAAuthorizedCompanyForm.vue
index 8b58a9aef..a7144a89a 100644
--- a/src/views/crm/contract/components/ContractAAuthorizedCompanyForm.vue
+++ b/src/views/crm/contract/components/ContractAAuthorizedCompanyForm.vue
@@ -58,23 +58,26 @@
-
+
—
-
+
+ 添加
diff --git a/src/views/crm/contract/components/QuotationList.vue b/src/views/crm/contract/components/QuotationList.vue
index 93b5e17ea..59cea07cd 100644
--- a/src/views/crm/contract/components/QuotationList.vue
+++ b/src/views/crm/contract/components/QuotationList.vue
@@ -112,7 +112,6 @@ const exportLoading = ref(false) // 导出的加载中
const getList = async () => {
loading.value = true
try {
- console.log('%csrc/views/crm/contract/components/QuotationList.vue:112 props.bizId', 'color: #007acc;', props.bizId);
queryParams.customerId = props.bizId
const data = await QuotationApi.getQuotationPage(queryParams)
list.value = data.list
diff --git a/src/views/crm/contract/detail/ContractChangeDetail.vue b/src/views/crm/contract/detail/ContractChangeDetail.vue
new file mode 100644
index 000000000..2f6aa62c1
--- /dev/null
+++ b/src/views/crm/contract/detail/ContractChangeDetail.vue
@@ -0,0 +1,429 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 额度
+ 授权人
+ 延期
+ 终止
+ 甲方关联单位
+ 重签
+
+
+
+
+
+
+
+
+
+
+
+ 甲方现授权人信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/crm/contract/detail/ContractDetail.vue b/src/views/crm/contract/detail/ContractDetail.vue
new file mode 100644
index 000000000..3edf2545c
--- /dev/null
+++ b/src/views/crm/contract/detail/ContractDetail.vue
@@ -0,0 +1,652 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/crm/contract/detail/index.vue b/src/views/crm/contract/detail/index.vue
index 8d57b1aa4..feaca2572 100644
--- a/src/views/crm/contract/detail/index.vue
+++ b/src/views/crm/contract/detail/index.vue
@@ -6,12 +6,12 @@
-
+
-
+
+
{
}
}
+const previewFile = (fileUrls) => {
+ // 假设 fileUrls 是一个字符串,包含文件的完整 URL
+ if (!fileUrls) {
+ message.error('没有附件');
+ return;
+ }
+
+ // 检查文件类型
+ const fileExtension = fileUrls.split('.').pop().toLowerCase();
+ switch (fileExtension) {
+ case 'pdf':
+ // 预览 PDF 文件
+ window.open(fileUrls, '_blank');
+ break;
+ case 'xlsx':
+ case 'xls':
+ // 预览 Excel 文件
+ window.open(fileUrls, '_blank');
+ break;
+ case 'doc':
+ case 'docx':
+ // 预览 Word 文件
+ window.open(fileUrls, '_blank');
+ break;
+ default:
+ message.error('不支持的文件类型');
+ break;
+ }
+};
+
/** 初始化 **/
onMounted(() => {
getList()
diff --git a/src/views/crm/quotation/components/QuotationProductForm.vue b/src/views/crm/quotation/components/QuotationProductForm.vue
index 7042e2b67..f8aaad70e 100644
--- a/src/views/crm/quotation/components/QuotationProductForm.vue
+++ b/src/views/crm/quotation/components/QuotationProductForm.vue
@@ -34,7 +34,7 @@
-
+