客户字段调整
This commit is contained in:
@ -15,7 +15,15 @@ export const searchFormSchema: FormSchema[] = [
|
|||||||
{
|
{
|
||||||
field: 'approCode',
|
field: 'approCode',
|
||||||
label: '审批状态',
|
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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="集团编码" name="cuName">
|
<a-form-item label="集团编码" name="cuMcode">
|
||||||
<a-input v-model:value="formState.cuName" :disabled="isDisable" placeholder="请输入集团编码" />
|
<a-input v-model:value="formState.cuMcode" :disabled="isDisable" placeholder="请输入集团编码" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="企业性质" name="cuMcode">
|
<a-form-item label="企业性质" name="natureCode">
|
||||||
<a-select v-model:value="formState.cuMcode" :disabled="isDisable" placeholder="请选择企业性质" style="width: 100%" allow-clear>
|
<a-select v-model:value="formState.natureCode" :disabled="isDisable" placeholder="请选择企业性质" style="width: 100%" allow-clear>
|
||||||
<a-select-option v-for="item in optionSelect.cuMcodeList" :key="item.code" :value="item.code">
|
<a-select-option v-for="item in optionSelect.natureCodeList" :key="item.code" :value="item.code">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="客户名称" name="cuSname" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
<a-form-item label="客户名称" name="cuName" :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-textarea v-model:value="formState.cuName" :disabled="isDisable" placeholder="请输入客户名称" :auto-size="{ minRows: 1, maxRows: 5 }"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="客户简称" name="di">
|
<a-form-item label="客户简称" name="cuSName">
|
||||||
<a-input v-model:value="formState.di" :disabled="isDisable" placeholder="请输入客户简称" />
|
<a-input v-model:value="formState.cuSName" :disabled="isDisable" placeholder="请输入客户简称" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="国内/国际" name="natureCode">
|
<a-form-item label="国内/国际" name="di">
|
||||||
<a-select v-model:value="formState.natureCode" :disabled="isDisable" placeholder="请选择国内/国际" style="width: 100%" allow-clear>
|
<a-select v-model:value="formState.di" :disabled="isDisable" placeholder="请选择国内/国际" style="width: 100%" allow-clear>
|
||||||
<a-select-option v-for="item in optionSelect.natureCodeList" :key="item.code" :value="item.code">
|
<a-select-option v-for="item in optionSelect.diList" :key="item.code" :value="item.code">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@ -242,8 +242,8 @@
|
|||||||
{{ (optionSelect.docCpList.find(v=>v.code == record.docTypeCode) || {}).fullName }}
|
{{ (optionSelect.docCpList.find(v=>v.code == record.docTypeCode) || {}).fullName }}
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'operation'">
|
<template v-if="column.dataIndex === 'operation'">
|
||||||
<a style="margin-right: 10px" @click="btnCheck('certificate', 'edit', record, index)">编辑</a>
|
<a v-if="!isDisable" 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', 'delete', record, index)">删除</a>
|
||||||
<a style="margin-right: 10px" @click="btnCheck('certificate', 'view', record)">查看</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)" />
|
<ArrowUpOutlined style="margin-right: 10px;" class="btn" @click="btnCheck('certificate', 'up', record, index)" />
|
||||||
<ArrowDownOutlined class="btn" @click="btnCheck('certificate', 'down', record, index)" />
|
<ArrowDownOutlined class="btn" @click="btnCheck('certificate', 'down', record, index)" />
|
||||||
@ -316,7 +316,7 @@
|
|||||||
<template v-if="column.dataIndex === 'fileOrg'">
|
<template v-if="column.dataIndex === 'fileOrg'">
|
||||||
<a :href="record.filePath" :download="record.fileOrg" target="_blank">{{record.fileOrg}}</a>
|
<a :href="record.filePath" :download="record.fileOrg" target="_blank">{{record.fileOrg}}</a>
|
||||||
</template>
|
</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" />
|
<a-input :placeholder="t('请输入附件说明')" :disabled="isDisable" v-model:value="record.docDesc" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'operation'">
|
<template v-if="column.dataIndex === 'operation'">
|
||||||
@ -409,7 +409,7 @@
|
|||||||
const rules: Record<string, Rule[]> = {
|
const rules: Record<string, Rule[]> = {
|
||||||
cuMcode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
cuMcode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
di: [{ 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'}],
|
natureCode: [{ required: true, message: "该项为必填项", trigger: 'change'}],
|
||||||
classCode: [{ required: true, message: "该项为必填项", trigger: 'change'}],
|
classCode: [{ required: true, message: "该项为必填项", trigger: 'change'}],
|
||||||
typeCode: [{ required: true, message: "该项为必填项", trigger: 'change'}],
|
typeCode: [{ required: true, message: "该项为必填项", trigger: 'change'}],
|
||||||
@ -461,8 +461,8 @@
|
|||||||
const dataFile = reactive([]);
|
const dataFile = reactive([]);
|
||||||
const dataContact= reactive([]);
|
const dataContact= reactive([]);
|
||||||
let optionSelect= reactive({
|
let optionSelect= reactive({
|
||||||
cuMcodeList: [],
|
|
||||||
natureCodeList: [],
|
natureCodeList: [],
|
||||||
|
diList: [],
|
||||||
validList: [],
|
validList: [],
|
||||||
approCodeList: [],
|
approCodeList: [],
|
||||||
classCodeList: [],
|
classCodeList: [],
|
||||||
@ -486,6 +486,14 @@
|
|||||||
() => props.disabled,
|
() => props.disabled,
|
||||||
(val) => {
|
(val) => {
|
||||||
isDisable.value = 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
|
immediate: true
|
||||||
@ -512,8 +520,8 @@
|
|||||||
Object.assign(dataFile, formState.lngFileUploadList || [])
|
Object.assign(dataFile, formState.lngFileUploadList || [])
|
||||||
}
|
}
|
||||||
async function getOption() {
|
async function getOption() {
|
||||||
optionSelect.cuMcodeList = await getDictionary('LNG_ENT_PR')
|
optionSelect.natureCodeList = await getDictionary('LNG_ENT_PR')
|
||||||
optionSelect.natureCodeList = await getDictionary('LNG_NATURE')
|
optionSelect.diList = await getDictionary('LNG_NATURE')
|
||||||
optionSelect.classCodeList = await getDictionary('LNG_CLASS')
|
optionSelect.classCodeList = await getDictionary('LNG_CLASS')
|
||||||
optionSelect.typeCodeList = await getDictionary('LNG_CU_TYP')
|
optionSelect.typeCodeList = await getDictionary('LNG_CU_TYP')
|
||||||
optionSelect.propCodeList = await getDictionary('LNG_CU_RPT')
|
optionSelect.propCodeList = await getDictionary('LNG_CU_RPT')
|
||||||
|
|||||||
@ -15,6 +15,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
|
<template v-if="column.dataIndex === 'approCode'">
|
||||||
|
{{ record.approName }}
|
||||||
|
</template>
|
||||||
<template v-if="column.dataIndex === 'action'">
|
<template v-if="column.dataIndex === 'action'">
|
||||||
<TableAction :actions="getActions(record)" />
|
<TableAction :actions="getActions(record)" />
|
||||||
</template>
|
</template>
|
||||||
@ -74,9 +77,9 @@
|
|||||||
|
|
||||||
const tableRef = ref();
|
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(()=>{
|
const buttonConfigs = computed(()=>{
|
||||||
return filterButtonAuth(buttons.value);
|
return filterButtonAuth(buttons.value);
|
||||||
})
|
})
|
||||||
@ -99,6 +102,7 @@
|
|||||||
schemaIdComputedRef.value = currentRoute.value.meta.schemaId
|
schemaIdComputedRef.value = currentRoute.value.meta.schemaId
|
||||||
const visibleLookProcessRef = ref(false);
|
const visibleLookProcessRef = ref(false);
|
||||||
const processIdRef = ref('');
|
const processIdRef = ref('');
|
||||||
|
const selectedKeys = ref<string[]>([]);
|
||||||
|
|
||||||
const visibleLaunchProcessRef = ref(false);
|
const visibleLaunchProcessRef = ref(false);
|
||||||
const schemaIdRef = ref('');
|
const schemaIdRef = ref('');
|
||||||
@ -243,16 +247,17 @@
|
|||||||
deleteList([record.id]);
|
deleteList([record.id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleEnable() {
|
function handleEnable(record: Recordable) {
|
||||||
if (!selectedKeys.value.length) {
|
// if (!selectedKeys.value.length) {
|
||||||
notification.warning({
|
// notification.warning({
|
||||||
message: 'Tip',
|
// message: 'Tip',
|
||||||
description: t('请选择需要启用的数据'),
|
// description: t('请选择需要启用的数据'),
|
||||||
});
|
// });
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
let ids = selectedKeys.value;
|
// let ids = selectedKeys.value;
|
||||||
|
let ids = [record.id]
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: '提示信息',
|
title: '提示信息',
|
||||||
icon: createVNode(ExclamationCircleOutlined),
|
icon: createVNode(ExclamationCircleOutlined),
|
||||||
@ -272,15 +277,16 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
function handleDisable() {
|
function handleDisable(record: Recordable) {
|
||||||
if (!selectedKeys.value.length) {
|
let ids = [record.id]
|
||||||
notification.warning({
|
// if (!selectedKeys.value.length) {
|
||||||
message: 'Tip',
|
// notification.warning({
|
||||||
description: t('请选择需要禁用的数据'),
|
// message: 'Tip',
|
||||||
});
|
// description: t('请选择需要禁用的数据'),
|
||||||
return;
|
// });
|
||||||
}
|
// return;
|
||||||
let ids = selectedKeys.value;
|
// }
|
||||||
|
// let ids = selectedKeys.value;
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: '提示信息',
|
title: '提示信息',
|
||||||
icon: createVNode(ExclamationCircleOutlined),
|
icon: createVNode(ExclamationCircleOutlined),
|
||||||
@ -357,7 +363,7 @@
|
|||||||
let editAndDelBtn: ActionItem[] = [];
|
let editAndDelBtn: ActionItem[] = [];
|
||||||
let hasFlowRecord = false;
|
let hasFlowRecord = false;
|
||||||
actionButtonConfig.value?.map((button) => {
|
actionButtonConfig.value?.map((button) => {
|
||||||
if (['view', 'copyData'].includes(button.code)) {
|
if (['view', 'copyData', 'enable', 'disable'].includes(button.code)) {
|
||||||
actionsList.push({
|
actionsList.push({
|
||||||
icon: button?.icon,
|
icon: button?.icon,
|
||||||
tooltip: button?.name,
|
tooltip: button?.name,
|
||||||
@ -387,6 +393,14 @@
|
|||||||
actionsList = actionsList.concat(editAndDelBtn);
|
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;
|
return actionsList;
|
||||||
}
|
}
|
||||||
function handleStartwork(record: Recordable) {
|
function handleStartwork(record: Recordable) {
|
||||||
|
|||||||
Reference in New Issue
Block a user