diff --git a/src/api/oa/erp/contractInfo/types.ts b/src/api/oa/erp/contractInfo/types.ts
index f867900..c5edbdc 100644
--- a/src/api/oa/erp/contractInfo/types.ts
+++ b/src/api/oa/erp/contractInfo/types.ts
@@ -14,6 +14,11 @@ export interface ContractInfoVO {
*/
contractCode: string;
+ /**
+ * 客户合同编号
+ */
+ customerContractCode: string;
+
/**
* 合同名称
*/
@@ -167,6 +172,11 @@ export interface ContractInfoForm extends BaseEntity {
*/
contractCode?: string;
+ /**
+ * 客户合同编号
+ */
+ customerContractCode?: string;
+
/**
* 合同名称
*/
@@ -323,6 +333,11 @@ export interface ContractInfoQuery extends PageQuery {
*/
contractCode?: string;
+ /**
+ * 客户合同编号
+ */
+ customerContractCode?: string;
+
/**
* 合同名称
*/
diff --git a/src/views/oa/base/printTemplate/index.vue b/src/views/oa/base/printTemplate/index.vue
index 4dc3029..de7c346 100644
--- a/src/views/oa/base/printTemplate/index.vue
+++ b/src/views/oa/base/printTemplate/index.vue
@@ -90,12 +90,12 @@
{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
-
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
diff --git a/src/views/oa/erp/contractInfo/edit.vue b/src/views/oa/erp/contractInfo/edit.vue
index 382b913..3e73655 100644
--- a/src/views/oa/erp/contractInfo/edit.vue
+++ b/src/views/oa/erp/contractInfo/edit.vue
@@ -1,6 +1,6 @@
-
+
@@ -15,6 +15,8 @@
:pageType="routeParams.type"
:mode="false"
/>
+
+
@@ -25,7 +27,7 @@
-
+
生成合同编号
@@ -40,7 +42,7 @@
-
+
@@ -160,7 +162,7 @@
-
+
合同物料管理
@@ -533,6 +535,7 @@ const data = reactive<{ form: ContractInfoFormEx; rules: any }>({
form: { ...initFormData },
rules: {
contractFlag: [{ required: true, message: '有无合同不能为空', trigger: 'blur' }],
+ contractCode: [{ required: true, message: '合同编号不能为空', trigger: 'blur' }],
contractName: [{ required: true, message: '合同名称不能为空', trigger: 'blur' }],
paymentMethod: [{ required: true, message: '付款方式不能为空', trigger: 'blur' }],
}
@@ -852,6 +855,7 @@ onMounted(async () => {
if (userInfoRes.data?.user?.deptId && !form.value.contractDeptId) {
form.value.contractDeptId = userInfoRes.data.user.deptId;
}
+ form.value.contractCategory = routeParams.value.contractCategory as string;
} catch (error) {
console.error('获取用户信息失败:', error);
}
@@ -874,7 +878,7 @@ const handleApprovalRecord = () => {
// 提交回调
const submitCallback = async () => {
- await proxy.$tab.closePage(proxy.$route);
+ await proxy.$tab.closePage(route);
router.go(-1);
};
diff --git a/src/views/oa/erp/contractInfo/index.vue b/src/views/oa/erp/contractInfo/index.vue
index 21c1669..6853ffd 100644
--- a/src/views/oa/erp/contractInfo/index.vue
+++ b/src/views/oa/erp/contractInfo/index.vue
@@ -3,7 +3,7 @@
-
+
@@ -12,6 +12,9 @@
+
+
+
@@ -33,11 +36,11 @@
-
-
-
-
-
+
+
+
+
+
@@ -54,11 +57,22 @@
- 新增
+
+
+ 新增
+
+
+
+
+ {{ dict.label }}
+
+
+
+
- 修改
+ 维护合同信息
@@ -83,7 +97,7 @@
-
+
@@ -143,6 +157,11 @@
未上传
+
+
+
+
+
@@ -163,19 +182,19 @@
-
+
-
-
-
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -225,6 +276,7 @@ const { contract_category, business_direction, active_flag, contract_flag, contr
const approvalRecordRef = ref>();
const contractInfoList = ref([]);
+const selectedRows = ref([]);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref>([]);
@@ -268,7 +320,12 @@ const columns = ref([
{ key: 29, label: `创建时间`, visible: false },
{ key: 30, label: `更新人`, visible: false },
{ key: 31, label: `更新时间`, visible: false },
- { key: 32, label: `终版合同`, visible: true }
+ { key: 32, label: `终版合同`, visible: true },
+ { key: 33, label: `客户合同编号`, visible: true },
+ { key: 34, label: `内部合同号`, visible: true },
+ { key: 35, label: `外部合同号`, visible: true },
+ { key: 36, label: `订单号`, visible: true },
+ { key: 37, label: `项目号`, visible: true }
]);
const data = reactive<{ queryParams: ContractInfoQuery }>({
@@ -277,6 +334,7 @@ const data = reactive<{ queryParams: ContractInfoQuery }>({
pageSize: 10,
contractFlag: undefined,
contractCode: undefined,
+ customerContractCode: undefined,
contractName: undefined,
contractCategory: undefined,
contractType: undefined,
@@ -314,6 +372,22 @@ const uploadDialog = reactive({
}
});
+const maintainDialog = reactive({
+ visible: false,
+ loading: false,
+ form: {
+ contractId: undefined as any,
+ contractName: undefined as string | undefined,
+ contractCode: undefined as string | undefined,
+ customerContractCode: undefined as string | undefined,
+ internalContractCode: undefined as string | undefined,
+ externalContractCode: undefined as string | undefined,
+ orderContractCode: undefined as string | undefined,
+ projectContractCode: undefined as string | undefined
+ }
+});
+const maintainFormRef = ref();
+
/** 查询合同信息列表 */
const getList = async () => {
loading.value = true;
@@ -340,15 +414,17 @@ const handleSelectionChange = (selection: ContractInfoVO[]) => {
ids.value = selection.map((item) => item.contractId);
single.value = selection.length != 1;
multiple.value = !selection.length;
+ selectedRows.value = selection;
};
/** 新增按钮操作 */
-const handleAdd = () => {
+const handleAdd = (contractCategory?: string | number) => {
proxy.$tab.closePage(route);
router.push({
path: '/contract/contractInfo/edit',
query: {
- type: 'add'
+ type: 'add',
+ contractCategory: contractCategory as string
}
});
};
@@ -411,6 +487,45 @@ const openUploadFinalDialog = (row?: ContractInfoVO) => {
uploadDialog.visible = true;
};
+const openMaintainDialog = () => {
+ if (selectedRows.value.length !== 1) {
+ proxy?.$modal.msgWarning('请选择一条数据进行维护');
+ return;
+ }
+ const row = selectedRows.value[0];
+ Object.assign(maintainDialog.form, {
+ contractId: row.contractId as any,
+ contractName: row.contractName,
+ contractCode: row.contractCode,
+ customerContractCode: row.customerContractCode,
+ internalContractCode: (row as any).internalContractCode,
+ externalContractCode: (row as any).externalContractCode,
+ orderContractCode: (row as any).orderContractCode,
+ projectContractCode: (row as any).projectContractCode
+ });
+ maintainDialog.visible = true;
+};
+
+const submitMaintain = async () => {
+ if (!maintainDialog.form.contractId) return;
+ maintainDialog.loading = true;
+ try {
+ await updateContractInfo({
+ contractId: maintainDialog.form.contractId,
+ customerContractCode: maintainDialog.form.customerContractCode,
+ internalContractCode: maintainDialog.form.internalContractCode,
+ externalContractCode: maintainDialog.form.externalContractCode,
+ orderContractCode: maintainDialog.form.orderContractCode,
+ projectContractCode: maintainDialog.form.projectContractCode
+ } as any);
+ proxy?.$modal.msgSuccess('维护成功');
+ maintainDialog.visible = false;
+ await getList();
+ } finally {
+ maintainDialog.loading = false;
+ }
+};
+
// 确认上传,保存签字合同附件
const confirmUploadFinal = async () => {
uploadDialog.loading = true;
@@ -442,4 +557,9 @@ const contractView = (e) => {
console.log(e);
router.push({ path: '/contract/contractView', query: { templateId: e.templateId, contractId: e.contractId } });
};
+
+/** 判断是否可以查看详情 */
+const canViewDetail = (row: ContractInfoVO) => {
+ return row.contractStatus !== '1';
+};
diff --git a/src/views/oa/erp/projectInfo/index.vue b/src/views/oa/erp/projectInfo/index.vue
index e4ea7a2..dd93eef 100644
--- a/src/views/oa/erp/projectInfo/index.vue
+++ b/src/views/oa/erp/projectInfo/index.vue
@@ -60,10 +60,13 @@
- 销售项目(实施、物流)
- 销售项目(备件)
- 研发项目
- 预投项目
+
+ {{ dict.label }}
+
@@ -141,7 +144,7 @@
-
+
diff --git a/src/views/oa/erp/projectPurchase/index.vue b/src/views/oa/erp/projectPurchase/index.vue
index 0caaddb..a5cd435 100644
--- a/src/views/oa/erp/projectPurchase/index.vue
+++ b/src/views/oa/erp/projectPurchase/index.vue
@@ -84,8 +84,8 @@
-
-
+
+