From 129d1380614f230bbbc9c1e3891a926fd144845f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com>
Date: Wed, 14 Jan 2026 17:44:36 +0800
Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E8=AE=A1=E9=87=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/dayPlan/PngMeasureSalesPur/index.ts | 3 +-
src/components/common/approStatusModal.vue | 63 +++++++++++++++++
.../common/contractFactUserModal.vue | 20 ++++--
.../ContractFact/components/createForm.vue | 5 +-
.../dayPlan/PngAppro/components/config.ts | 6 +-
src/views/dayPlan/PngAppro/index.vue | 30 ++++++---
.../PngMeasureSalesPur/components/config.ts | 28 ++++----
.../dayPlan/PngMeasureSalesPur/index.vue | 67 ++++++++++++++++---
8 files changed, 177 insertions(+), 45 deletions(-)
create mode 100644 src/components/common/approStatusModal.vue
diff --git a/src/api/dayPlan/PngMeasureSalesPur/index.ts b/src/api/dayPlan/PngMeasureSalesPur/index.ts
index 853041c..4b45bba 100644
--- a/src/api/dayPlan/PngMeasureSalesPur/index.ts
+++ b/src/api/dayPlan/PngMeasureSalesPur/index.ts
@@ -3,7 +3,8 @@ import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
- Page = '/dayPlan/pngMeasureSalesPur/page',
+ // Page = '/dayPlan/pngMeasureSalesPur/page',
+ Page = '/magic-api/dayPlan/pngMeasureSalesPurPageList',
List = '/dayPlan/pngMeasureSalesPur/list',
Info = '/dayPlan/pngMeasureSalesPur/info',
LngPngMeasureSalesPur = '/dayPlan/pngMeasureSalesPur',
diff --git a/src/components/common/approStatusModal.vue b/src/components/common/approStatusModal.vue
new file mode 100644
index 0000000..3c40515
--- /dev/null
+++ b/src/components/common/approStatusModal.vue
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/common/contractFactUserModal.vue b/src/components/common/contractFactUserModal.vue
index 0cd8f7d..57e307f 100644
--- a/src/components/common/contractFactUserModal.vue
+++ b/src/components/common/contractFactUserModal.vue
@@ -4,7 +4,7 @@
-
+
@@ -14,7 +14,7 @@
-
+
{{ item.bankName }}
@@ -53,7 +53,7 @@
-
+
@@ -84,6 +84,7 @@ const getTitle = computed(() => (!unref(isUpdate) ? t('新增相对方') : t('
let formState = reactive({
});
const list = ref()
+const curIdx = ref()
const rules = {
cpName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
cpBankCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
@@ -119,8 +120,8 @@ const bankChange = (val) => {
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate;
- isDisable.value = data?.btnType == 'view' ? true : false
list.value = data.list
+ curIdx.value = data.curIdx
if (unref(isUpdate)) {
Object.assign(formState, {...data.record})
getBankInfo(formState.cpCode, formState.cpTableName, 'code')
@@ -137,6 +138,17 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
const handleSubmit = async () => {
try {
await formRef.value.validate();
+ let arr = []
+ list.value.forEach(v=> {
+ if (v.cpCode == formState.cpCode) {
+ arr.push(v)
+ }
+ })
+ let isFlag = ( curIdx.value != null && formState.cpCode!==list.value[curIdx.value].cpCode)
+ if (arr.length > 0 && (curIdx.value == null || isFlag)) {
+ message.warning('相对方名称:'+ arr[0].cpName + '已重复')
+ return
+ }
emit('success', formState);
notification.success({
message: t('操作'),
diff --git a/src/views/contract/ContractFact/components/createForm.vue b/src/views/contract/ContractFact/components/createForm.vue
index 272a9d9..c757ac8 100644
--- a/src/views/contract/ContractFact/components/createForm.vue
+++ b/src/views/contract/ContractFact/components/createForm.vue
@@ -476,7 +476,8 @@
openModalAppro(true,{isUpdate: false})
}
const addUser = (val)=> {
- openModalUser(true,{isUpdate: false})
+ curIdx.value = null
+ openModalUser(true,{isUpdate: false,list: dataList.value, curIdx: curIdx.value})
}
const handleSuccess = (val) => {
@@ -529,7 +530,7 @@
}
if (btn == 'edit') {
curIdx.value = index
- openModalUser(true, {record: record,isUpdate: true});
+ openModalUser(true, {record: record,isUpdate: true, list: dataList.value, curIdx: curIdx.value});
}
}
diff --git a/src/views/dayPlan/PngAppro/components/config.ts b/src/views/dayPlan/PngAppro/components/config.ts
index ae9527a..8024004 100644
--- a/src/views/dayPlan/PngAppro/components/config.ts
+++ b/src/views/dayPlan/PngAppro/components/config.ts
@@ -140,7 +140,7 @@ export const columns: BasicColumn[] = [
title: '变更',
componentType: 'input',
align: 'left',
-
+ width: 100,
sorter: true,
},
@@ -154,11 +154,11 @@ export const columns: BasicColumn[] = [
},
{
- dataIndex: 'approCode',
+ dataIndex: 'approName',
title: '审批状态',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
];
diff --git a/src/views/dayPlan/PngAppro/index.vue b/src/views/dayPlan/PngAppro/index.vue
index b52e370..6bbe9a5 100644
--- a/src/views/dayPlan/PngAppro/index.vue
+++ b/src/views/dayPlan/PngAppro/index.vue
@@ -15,6 +15,9 @@
+
+ {{ record.approName }}
+
@@ -22,6 +25,7 @@
+