From a568c3040ed7d1762c83024e5b0578543834d618 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com>
Date: Fri, 28 Nov 2025 17:14:19 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=AD=97=E6=AE=B5=E8=B0=83?=
=?UTF-8?q?=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/sales/Customer/components/config.ts | 10 +-
.../sales/Customer/components/createForm.vue | 46 ++++---
src/views/sales/Customer/index.vue | 130 ++++++++++--------
3 files changed, 108 insertions(+), 78 deletions(-)
diff --git a/src/views/sales/Customer/components/config.ts b/src/views/sales/Customer/components/config.ts
index f65de30..e43dab7 100644
--- a/src/views/sales/Customer/components/config.ts
+++ b/src/views/sales/Customer/components/config.ts
@@ -15,7 +15,15 @@ export const searchFormSchema: FormSchema[] = [
{
field: 'approCode',
label: '审批状态',
- component: 'Input',
+ component: 'XjrSelect',
+ componentProps: {
+ datasourceType: 'dic',
+ params: { itemId: '1990669393069129729' },
+ labelField: 'name',
+ valueField: 'value',
+
+ getPopupContainer: () => document.body,
+ },
},
];
diff --git a/src/views/sales/Customer/components/createForm.vue b/src/views/sales/Customer/components/createForm.vue
index 321e15c..0c9011d 100644
--- a/src/views/sales/Customer/components/createForm.vue
+++ b/src/views/sales/Customer/components/createForm.vue
@@ -31,33 +31,33 @@
-
-
+
+
-
-
-
+
+
+
{{ item.name }}
-
-
+
+
-
-
+
+
-
-
-
+
+
+
{{ item.name }}
@@ -242,8 +242,8 @@
{{ (optionSelect.docCpList.find(v=>v.code == record.docTypeCode) || {}).fullName }}
- 编辑
- 删除
+ 编辑
+ 删除
查看
@@ -316,7 +316,7 @@
{{record.fileOrg}}
-
+
@@ -409,7 +409,7 @@
const rules: Record = {
cuMcode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
di: [{ required: true, message: "该项为必填项", trigger: 'change' }],
- cuSname: [{ required: true, message: "该项为必填项", trigger: 'change'}],
+ cuName: [{ required: true, message: "该项为必填项", trigger: 'change'}],
natureCode: [{ required: true, message: "该项为必填项", trigger: 'change'}],
classCode: [{ required: true, message: "该项为必填项", trigger: 'change'}],
typeCode: [{ required: true, message: "该项为必填项", trigger: 'change'}],
@@ -461,8 +461,8 @@
const dataFile = reactive([]);
const dataContact= reactive([]);
let optionSelect= reactive({
- cuMcodeList: [],
natureCodeList: [],
+ diList: [],
validList: [],
approCodeList: [],
classCodeList: [],
@@ -486,6 +486,14 @@
() => props.disabled,
(val) => {
isDisable.value = val
+ if (val) {
+ let idx = columnsBank.value.findIndex(v =>v.dataIndex == 'operation')
+ idx>-1 && columnsBank.value.splice(idx, 1)
+ let idx1 = columnsContact.value.findIndex(v =>v.dataIndex == 'operation')
+ idx1>-1 && columnsContact.value.splice(idx1, 1)
+ let idx2 = columnsFile.value.findIndex(v =>v.dataIndex == 'operation')
+ idx2>-1 && columnsFile.value.splice(idx2, 1)
+ }
},
{
immediate: true
@@ -512,8 +520,8 @@
Object.assign(dataFile, formState.lngFileUploadList || [])
}
async function getOption() {
- optionSelect.cuMcodeList = await getDictionary('LNG_ENT_PR')
- optionSelect.natureCodeList = await getDictionary('LNG_NATURE')
+ optionSelect.natureCodeList = await getDictionary('LNG_ENT_PR')
+ optionSelect.diList = await getDictionary('LNG_NATURE')
optionSelect.classCodeList = await getDictionary('LNG_CLASS')
optionSelect.typeCodeList = await getDictionary('LNG_CU_TYP')
optionSelect.propCodeList = await getDictionary('LNG_CU_RPT')
diff --git a/src/views/sales/Customer/index.vue b/src/views/sales/Customer/index.vue
index dbc2bf4..a678ff2 100644
--- a/src/views/sales/Customer/index.vue
+++ b/src/views/sales/Customer/index.vue
@@ -15,6 +15,9 @@
+
+ {{ record.approName }}
+
@@ -74,9 +77,9 @@
const tableRef = ref();
//所有按钮
- const buttons = ref([{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"启用","code":"enable","icon":"ant-design:form-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"作废","code":"disable","icon":"ant-design:stop-outlined","isDefault":true,"type":"dashed"},{"isUse":true,"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true},{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true}]);
+ const buttons = ref([{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"启用","code":"enable","icon":"ant-design:form-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"作废","code":"disable","icon":"ant-design:stop-outlined","isDefault":true,"type":"dashed"},{"isUse":true,"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true},{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true}]);
//展示在列表内的按钮
- const actionButtons = ref(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord']);
+ const actionButtons = ref(['view', 'edit','datalog', 'copyData', 'enable', 'disable', 'startwork','flowRecord']);
const buttonConfigs = computed(()=>{
return filterButtonAuth(buttons.value);
})
@@ -99,6 +102,7 @@
schemaIdComputedRef.value = currentRoute.value.meta.schemaId
const visibleLookProcessRef = ref(false);
const processIdRef = ref('');
+ const selectedKeys = ref([]);
const visibleLaunchProcessRef = ref(false);
const schemaIdRef = ref('');
@@ -243,62 +247,64 @@
deleteList([record.id]);
}
- function handleEnable() {
- if (!selectedKeys.value.length) {
- notification.warning({
- message: 'Tip',
- description: t('请选择需要启用的数据'),
- });
- return;
- }
+ function handleEnable(record: Recordable) {
+ // if (!selectedKeys.value.length) {
+ // notification.warning({
+ // message: 'Tip',
+ // description: t('请选择需要启用的数据'),
+ // });
+ // return;
+ // }
- let ids = selectedKeys.value;
- Modal.confirm({
- title: '提示信息',
- icon: createVNode(ExclamationCircleOutlined),
- content: '是否确认启用?',
- okText: '确认',
- cancelText: '取消',
- onOk() {
- enableLngCustomer(ids).then((_) => {
- handleSuccess();
- notification.success({
- message: 'Tip',
- description: t('启用成功!'),
- });
- });
- },
- onCancel() {},
- });
-
- }
- function handleDisable() {
- if (!selectedKeys.value.length) {
- notification.warning({
- message: 'Tip',
- description: t('请选择需要禁用的数据'),
- });
- return;
- }
- let ids = selectedKeys.value;
- Modal.confirm({
- title: '提示信息',
- icon: createVNode(ExclamationCircleOutlined),
- content: '是否确认禁用?',
- okText: '确认',
- cancelText: '取消',
- onOk() {
- disableLngCustomer(ids).then((_) => {
- handleSuccess();
- notification.success({
- message: 'Tip',
- description: t('禁用成功!'),
- });
- });
- },
- onCancel() {},
- });
- }
+ // let ids = selectedKeys.value;
+ let ids = [record.id]
+ Modal.confirm({
+ title: '提示信息',
+ icon: createVNode(ExclamationCircleOutlined),
+ content: '是否确认启用?',
+ okText: '确认',
+ cancelText: '取消',
+ onOk() {
+ enableLngCustomer(ids).then((_) => {
+ handleSuccess();
+ notification.success({
+ message: 'Tip',
+ description: t('启用成功!'),
+ });
+ });
+ },
+ onCancel() {},
+ });
+
+ }
+ function handleDisable(record: Recordable) {
+ let ids = [record.id]
+ // if (!selectedKeys.value.length) {
+ // notification.warning({
+ // message: 'Tip',
+ // description: t('请选择需要禁用的数据'),
+ // });
+ // return;
+ // }
+ // let ids = selectedKeys.value;
+ Modal.confirm({
+ title: '提示信息',
+ icon: createVNode(ExclamationCircleOutlined),
+ content: '是否确认禁用?',
+ okText: '确认',
+ cancelText: '取消',
+ onOk() {
+ disableLngCustomer(ids).then((_) => {
+ handleSuccess();
+ notification.success({
+ message: 'Tip',
+ description: t('禁用成功!'),
+ });
+ });
+ },
+ onCancel() {},
+ });
+ }
function deleteList(ids) {
Modal.confirm({
title: '提示信息',
@@ -357,7 +363,7 @@
let editAndDelBtn: ActionItem[] = [];
let hasFlowRecord = false;
actionButtonConfig.value?.map((button) => {
- if (['view', 'copyData'].includes(button.code)) {
+ if (['view', 'copyData', 'enable', 'disable'].includes(button.code)) {
actionsList.push({
icon: button?.icon,
tooltip: button?.name,
@@ -387,6 +393,14 @@
actionsList = actionsList.concat(editAndDelBtn);
}
}
+ if (record.approCode === 'YSP') {
+ let idx = actionsList.findIndex(v =>v.tooltip == '作废')
+ idx>-1 && actionsList.splice(idx, 1)
+ } else {
+ let idx = actionsList.findIndex(v =>v.tooltip == '启用')
+ idx>-1 && actionsList.splice(idx, 1)
+ }
+
return actionsList;
}
function handleStartwork(record: Recordable) {