客户字段调整
This commit is contained in:
@ -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,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@ -31,33 +31,33 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="集团编码" name="cuName">
|
||||
<a-input v-model:value="formState.cuName" :disabled="isDisable" placeholder="请输入集团编码" />
|
||||
<a-form-item label="集团编码" name="cuMcode">
|
||||
<a-input v-model:value="formState.cuMcode" :disabled="isDisable" placeholder="请输入集团编码" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="企业性质" name="cuMcode">
|
||||
<a-select v-model:value="formState.cuMcode" :disabled="isDisable" placeholder="请选择企业性质" style="width: 100%" allow-clear>
|
||||
<a-select-option v-for="item in optionSelect.cuMcodeList" :key="item.code" :value="item.code">
|
||||
<a-form-item label="企业性质" name="natureCode">
|
||||
<a-select v-model:value="formState.natureCode" :disabled="isDisable" placeholder="请选择企业性质" style="width: 100%" allow-clear>
|
||||
<a-select-option v-for="item in optionSelect.natureCodeList" :key="item.code" :value="item.code">
|
||||
{{ item.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="客户名称" name="cuSname" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||
<a-textarea v-model:value="formState.cuSname" :disabled="isDisable" placeholder="请输入客户名称" :auto-size="{ minRows: 1, maxRows: 5 }"/>
|
||||
<a-form-item label="客户名称" name="cuName" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||
<a-textarea v-model:value="formState.cuName" :disabled="isDisable" placeholder="请输入客户名称" :auto-size="{ minRows: 1, maxRows: 5 }"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="客户简称" name="di">
|
||||
<a-input v-model:value="formState.di" :disabled="isDisable" placeholder="请输入客户简称" />
|
||||
<a-form-item label="客户简称" name="cuSName">
|
||||
<a-input v-model:value="formState.cuSName" :disabled="isDisable" placeholder="请输入客户简称" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="国内/国际" name="natureCode">
|
||||
<a-select v-model:value="formState.natureCode" :disabled="isDisable" placeholder="请选择国内/国际" style="width: 100%" allow-clear>
|
||||
<a-select-option v-for="item in optionSelect.natureCodeList" :key="item.code" :value="item.code">
|
||||
<a-form-item label="国内/国际" name="di">
|
||||
<a-select v-model:value="formState.di" :disabled="isDisable" placeholder="请选择国内/国际" style="width: 100%" allow-clear>
|
||||
<a-select-option v-for="item in optionSelect.diList" :key="item.code" :value="item.code">
|
||||
{{ item.name }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
@ -242,8 +242,8 @@
|
||||
{{ (optionSelect.docCpList.find(v=>v.code == record.docTypeCode) || {}).fullName }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'operation'">
|
||||
<a style="margin-right: 10px" @click="btnCheck('certificate', 'edit', record, index)">编辑</a>
|
||||
<a style="margin-right: 10px" @click="btnCheck('certificate', 'delete', record, index)">删除</a>
|
||||
<a v-if="!isDisable" style="margin-right: 10px" @click="btnCheck('certificate', 'edit', record, index)">编辑</a>
|
||||
<a v-if="!isDisable" style="margin-right: 10px" @click="btnCheck('certificate', 'delete', record, index)">删除</a>
|
||||
<a style="margin-right: 10px" @click="btnCheck('certificate', 'view', record)">查看</a>
|
||||
<ArrowUpOutlined style="margin-right: 10px;" class="btn" @click="btnCheck('certificate', 'up', record, index)" />
|
||||
<ArrowDownOutlined class="btn" @click="btnCheck('certificate', 'down', record, index)" />
|
||||
@ -316,7 +316,7 @@
|
||||
<template v-if="column.dataIndex === 'fileOrg'">
|
||||
<a :href="record.filePath" :download="record.fileOrg" target="_blank">{{record.fileOrg}}</a>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'docDesc'">
|
||||
<template v-if="column.dataIndex === 'docDesc' && !isDisable">
|
||||
<a-input :placeholder="t('请输入附件说明')" :disabled="isDisable" v-model:value="record.docDesc" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'operation'">
|
||||
@ -409,7 +409,7 @@
|
||||
const rules: Record<string, Rule[]> = {
|
||||
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')
|
||||
|
||||
@ -15,6 +15,9 @@
|
||||
</template>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.dataIndex === 'approCode'">
|
||||
{{ record.approName }}
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
<TableAction :actions="getActions(record)" />
|
||||
</template>
|
||||
@ -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<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord']);
|
||||
const actionButtons = ref<string[]>(['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<string[]>([]);
|
||||
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user