客户组

This commit is contained in:
‘huanghaiixia’
2025-12-17 16:06:44 +08:00
parent 1eee4dcd60
commit a27bf90e9d
16 changed files with 2773 additions and 615 deletions

View File

@ -284,26 +284,7 @@
<span style="font-size: 12px;font-weight: normal;">上传公司财报等附件</span>
</div>
</template>
<Upload v-if="!isDisable" style="margin-bottom: 10px;" :file-list="dataFile" :showUploadList="false"
v-model:value="formState.filePath" v-model:tableName="tableName" v-model:columnName="columnName"
:btnTip="btnTip" @change="changeUplod" :multiple="true" :dataDelete="true"
:showDownloadIcon="false"
/>
<a-table :columns="columnsFile" :data-source="dataFile" >
<template #bodyCell="{ column,record,index, text }">
<template v-if="column.dataIndex === 'fileOrg'">
<a @click="handleDownload(record)">{{record.fileOrg}}</a>
</template>
<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'">
<a style="margin-right: 10px" @click="btnCheck('file', 'delete', record, index)">删除</a>
<ArrowUpOutlined style="margin-right: 10px;" class="btn" @click="btnCheck('file', 'up', record, index)" />
<ArrowDownOutlined class="btn" @click="btnCheck('file', 'down', record, index)" />
</template>
</template>
</a-table>
<UploadList ref="uploadFile" :disabled="isDisable" :file-list="dataFile" :value="formState.filePath" :tableName="tableName" :columnName="columnName"/>
</a-card>
</a-form>
</div>
@ -332,15 +313,14 @@
import dayjs from 'dayjs';
import { getAppEnvConfig } from '/@/utils/env';
import { message } from 'ant-design-vue';
import Upload from '/@/components/Form/src/components/Upload.vue';
import { parseDownloadUrl} from '/@/api/system/file';
import { downloadByUrl } from '/@/utils/file/download';
import UploadList from '/@/components/Form/src/components/UploadList.vue';
const tableName = '1';
const columnName = '1'
const formType = ref('2'); // 0 新建 1 修改 2 查看
const formRef = ref();
const uploadFile = ref()
const props = defineProps({
disabled: false,
id: ''
@ -427,12 +407,6 @@
{ title: t('备注'), dataIndex: 'note', sorter: true},
{ title: t('操作'), dataIndex: 'operation', sorter: true},
]);
const columnsFile = ref([
{ title: t('序号'), dataIndex: 'index', sorter: true, customRender: (column) => `${column.index + 1}`},
{ title: t('附件名称'), dataIndex: 'fileOrg', sorter: true},
{ title: t('附件说明'), dataIndex: 'docDesc', sorter: true},
{ title: t('操作'), dataIndex: 'operation', sorter: true},
]);
const dataCertificate= reactive([]);
const dataBank= reactive([]);
const dataFile = ref([]);
@ -468,8 +442,6 @@
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)
}
},
{
@ -483,11 +455,6 @@
}
});
const handleDownload = (info) => {
const url = parseDownloadUrl(info.response ? info.response.data.fileUrl : info.fileUrl);
const fileName = info.response ? info.response.data.fileOrg : info.fileOrg;
downloadByUrl({ url, fileName: fileName});
};
async function getList(id) {
spinning.value = true
try {
@ -588,24 +555,6 @@
}
}
// 附件
if (type == 'file') {
if (btn == 'delete') {
dataFile.value.splice(index, 1)
}
if (btn == 'up') {
if (index === 0) {
return
}
dataFile.value[index] = dataFile.value.splice(index-1, 1, dataFile.value[index])[0];
}
if (btn == 'down') {
if (index === dataFile.value.length - 1) {
return
}
dataFile.value[index] = dataFile.value.splice(index+1, 1, dataFile.value[index])[0];
}
}
}
const handleSuccessCertificate = (val) => {
// 编辑
@ -633,16 +582,6 @@
}
dataBank.push(val)
}
function changeUplod (val) {
dataFile.value = []
val.forEach(v => {
v.fileOrg = v.fileOrg || v.fileName,
v.filePath = v.filePath || v.fileUrl,
v.fileSize = v.fileSize
dataFile.value.push(v)
})
console.log(val, 532, dataFile.value)
}
function close() {
tabStore.closeTab(currentRoute.value, router);
}
@ -677,23 +616,16 @@
arrCertificate.forEach(v => {
v.dateFrom = v.dateFrom ? dayjs(v.dateFrom ).format('YYYY-MM-DD HH:mm:ss') : '';
v.dateTo = v.dateTo ? dayjs(v.dateTo ).format('YYYY-MM-DD HH:mm:ss'): '';
(v.fileList || []).forEach(i => {
i.id = ''
})
})
let arrUploadList = JSON.parse(JSON.stringify(dataFile.value))
arrUploadList.forEach(v => {
v.id= ''
})
let file = await uploadFile.value.getFileList()
let obj = {
...formState,
lngCustomerBankList: dataBank,
lngCustomerDocList: arrCertificate,
lngCustomerContactList: dataContact,
lngFileUploadList: arrUploadList
lngFileUploadList: file
}
console.log(arrCertificate, 'arrCertificate')
spinning.value = true;
let request = !formState.id ? addLngCustomer :updateLngCustomer