style(contract): 优化附件上传按钮样式及必填提示

- 为“上传附件”和“上传变更材料”按钮添加图标及主色调样式
- 在变更原因标题及输入框添加“必填”提示文字

style(customer-archive): 调整客户档案页面细节排版和格式
- 修复联系人列表相关代码缩进及注释格式
-
This commit is contained in:
2026-09-03 16:06:43 +08:00
parent 397490a165
commit 42e4925fd6
3 changed files with 69 additions and 77 deletions
@@ -79,10 +79,10 @@
<section class="change-section attachment-section">
<div class="section-head"><div class="dialog-section-title">其它附件</div><el-button type="primary" plain>批量下载</el-button></div>
<el-table :data="attachments" border class="change-table"><el-table-column type="index" label="序号" width="70" /><el-table-column label="文件名" min-width="240"><template #default="{ row }"><el-link type="primary" @click="previewAttachment(row, attachments)">{{ row.originalName || row.name }}</el-link></template></el-table-column><el-table-column prop="description" label="附件描述" min-width="240" /><el-table-column prop="size" label="文件大小" width="120" /><el-table-column prop="userName" label="上传人" width="140" /><el-table-column prop="uploadTime" label="上传时间" width="180" /><el-table-column label="操作" width="100"><template #default="{ $index }"><el-link type="danger" @click="attachments.splice($index, 1)">删除</el-link></template></el-table-column></el-table>
<el-upload action="#" :auto-upload="false" multiple :show-file-list="false" @change="handleAttachment"><el-button plain>上传附件</el-button></el-upload>
<el-upload action="#" :auto-upload="false" multiple :show-file-list="false" @change="handleAttachment"><el-button type="primary" plain icon="el-icon-upload">上传附件</el-button></el-upload>
</section>
<section class="change-section change-reason-section"><div class="dialog-section-title">变更原因</div><el-form-item prop="changeReason"><el-input v-model="form.changeReason" type="textarea" :rows="2" maxlength="2000" show-word-limit placeholder="请输入变更原因" /></el-form-item><div class="dialog-section-title">变更材料</div><el-upload action="#" :auto-upload="false" multiple :show-file-list="false" @change="handleChangeMaterial"><el-button plain>上传变更材料</el-button></el-upload></section>
<section class="change-section change-reason-section"><div class="dialog-section-title">变更原因必填</div><el-form-item prop="changeReason"><el-input v-model="form.changeReason" type="textarea" :rows="2" maxlength="2000" show-word-limit placeholder="请输入变更原因(必填)" /></el-form-item><div class="dialog-section-title">变更材料</div><el-upload action="#" :auto-upload="false" multiple :show-file-list="false" @change="handleChangeMaterial"><el-button type="primary" plain icon="el-icon-upload">上传变更材料</el-button></el-upload></section>
<div class="page-footer">
<el-button @click="$router.back()">取消</el-button>
<el-button type="primary" @click="submit">提交</el-button>
+60 -68
View File
@@ -497,38 +497,37 @@
>新增联系人</el-button
>
</div>
<el-table :data="contactTableData" border class="contact-table">
<el-table-column label="序号" prop="__index" width="90" align="center" />
<el-table-column label="联系人姓名" prop="contactName" min-width="150" />
<el-table-column label="联系人电话" prop="contactPhone" min-width="150" />
<el-table-column label="邮箱" prop="email" min-width="180" />
<el-table-column label="联系地址" min-width="240">
<template #default="{ row }">
<span>{{ formatContactAddress(row) || '-' }}</span>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" min-width="180" />
<el-table-column label="所属分公司/事业部" min-width="170">
<template #default="{ row }">
<span>{{ row.branchName || archiveForm.deptName || '-' }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="130" align="center" v-if="!readonly">
<template #default="{ row }">
<el-link type="primary" @click="openContact(row.__raw, row.__rawIndex)">
修改
</el-link>
<el-link type="danger" @click="deleteContact(row.__rawIndex)">删除</el-link>
</template>
</el-table-column>
</el-table>
<empty-pagination
:page="contactPaginationPage"
always-show
@size-change="size => handleDetailSizeChange('contact', size)"
@current-change="page => handleDetailCurrentChange('contact', page)"
/>
<el-table :data="contactTableData" border class="contact-table">
<el-table-column label="序号" prop="__index" width="90" align="center" />
<el-table-column label="联系人姓名" prop="contactName" min-width="150" />
<el-table-column label="联系人电话" prop="contactPhone" min-width="150" />
<el-table-column label="邮箱" prop="email" min-width="180" />
<el-table-column label="联系地址" min-width="240">
<template #default="{ row }">
<span>{{ formatContactAddress(row) || '-' }}</span>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" min-width="180" />
<el-table-column label="所属分公司/事业部" min-width="170">
<template #default="{ row }">
<span>{{ row.branchName || archiveForm.deptName || '-' }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="130" align="center" v-if="!readonly">
<template #default="{ row }">
<el-link type="primary" @click="openContact(row.__raw, row.__rawIndex)">
修改
</el-link>
<el-link type="danger" @click="deleteContact(row.__rawIndex)">删除</el-link>
</template>
</el-table-column>
</el-table>
<empty-pagination
:page="contactPaginationPage"
always-show
@size-change="size => handleDetailSizeChange('contact', size)"
@current-change="page => handleDetailCurrentChange('contact', page)"
/>
</el-tab-pane>
<el-tab-pane label="收款信息" name="receiptAccounts">
<div class="tab-table-toolbar" v-if="!readonly">
@@ -607,7 +606,9 @@
</template>
<template #extra>
<div class="section-actions">
<el-button icon="el-icon-download" @click="downloadAttachments">批量下载</el-button>
<el-button type="primary" plain icon="el-icon-download" @click="downloadAttachments"
>批量下载</el-button
>
<vehicle-attachment-upload
v-if="!readonly"
v-model="ocrQualificationUploadFiles"
@@ -817,9 +818,7 @@
<div class="archive-form__footer">
<!-- 次要:独立页返回 / 只读关闭 / 弹窗取消 -->
<el-button @click="closeArchive">{{
readonly ? '关闭' : '取消'
}}</el-button>
<el-button @click="closeArchive">{{ readonly ? '关闭' : '取消' }}</el-button>
<el-button type="primary" plain v-if="!readonly" @click="saveArchive">保存</el-button>
<el-button type="primary" v-if="!readonly" @click="saveAndSubmitArchive">提交</el-button>
</div>
@@ -1145,7 +1144,7 @@
</el-col>
<el-col :span="6">
<el-form-item label="最大资金使用额度">
<el-input :model-value="formatScoreValue(currentScore.maxCreditLimit)" disabled >
<el-input :model-value="formatScoreValue(currentScore.maxCreditLimit)" disabled>
<template #suffix>万元</template>
</el-input>
</el-form-item>
@@ -1245,7 +1244,7 @@
</el-input>
</template>
<template v-else>
<!-- <div class="score-standard-cell__label">请选择:</div>-->
<!-- <div class="score-standard-cell__label">请选择:</div>-->
<el-select
v-model="detail.selectedOption"
filterable
@@ -1419,12 +1418,7 @@ import { normalizeSearchRangeParams } from '@/utils/search-range';
import { ArrowRight, Location } from '@element-plus/icons-vue';
import { ElImageViewer, ElLoading } from 'element-plus';
import { OpenFileViewer } from '@open-file-viewer/vue';
import {
fallbackPlugin,
imagePlugin,
officePlugin,
textPlugin,
} from '@open-file-viewer/core';
import { fallbackPlugin, imagePlugin, officePlugin, textPlugin } from '@open-file-viewer/core';
import '@open-file-viewer/core/style.css';
import pdfWorkerSrc from 'pdfjs-dist/build/pdf.worker.mjs?url';
import { mapGetters } from 'vuex';
@@ -1482,7 +1476,9 @@ export default {
}
};
const validateUnifiedCreditCode = (rule, value, callback) => {
const code = String(value || '').trim().toUpperCase();
const code = String(value || '')
.trim()
.toUpperCase();
const charset = '0123456789ABCDEFGHJKLMNPQRTUWXY';
const weights = [1, 3, 9, 27, 19, 26, 16, 17, 20, 29, 25, 13, 8, 24, 10, 30, 28];
if (!code) {
@@ -1865,10 +1861,7 @@ export default {
this.initScoreQuantificationOptions();
if (this.isArchivePage) {
const readonly = this.$route.query.view === '1' || this.$route.query.view === 'true';
this.openArchive(
this.$route.query.id ? { id: this.$route.query.id } : null,
readonly
);
this.openArchive(this.$route.query.id ? { id: this.$route.query.id } : null, readonly);
}
},
computed: {
@@ -1917,8 +1910,8 @@ export default {
const ids = Array.isArray(this.archiveForm.deptId)
? this.archiveForm.deptId
: this.archiveForm.deptId
? [this.archiveForm.deptId]
: [];
? [this.archiveForm.deptId]
: [];
const currentId = ids.length ? String(ids[ids.length - 1]) : '';
if (!currentId) return [];
return this.findDeptPath(currentId) || [currentId];
@@ -2596,15 +2589,10 @@ export default {
});
},
initBusinessDictionaries() {
this.loadDictOptions(
'nature_of_client',
'customerNatureOptions',
[],
options => {
const customerNatureColumn = this.findColumn(this.option.column, 'customerNature');
customerNatureColumn.dicData = [{ label: '全部', value: '' }, ...options];
}
);
this.loadDictOptions('nature_of_client', 'customerNatureOptions', [], options => {
const customerNatureColumn = this.findColumn(this.option.column, 'customerNature');
customerNatureColumn.dicData = [{ label: '全部', value: '' }, ...options];
});
this.loadDictOptions('customer_type', 'customerTypeOptions', ['客户', '承运商'], options => {
const customerTypeColumn = this.findColumn(this.option.column, 'customerType');
customerTypeColumn.dicData = [{ label: '全部', value: '' }, ...options];
@@ -3605,7 +3593,11 @@ export default {
: this.splitValue(customerType);
const requiredTypes = ['营业执照', '法人身份证'];
const includesCarrier = customerTypes.some(item =>
['承运商', 'carrier'].includes(String(item || '').trim().toLowerCase())
['承运商', 'carrier'].includes(
String(item || '')
.trim()
.toLowerCase()
)
);
if (includesCarrier) requiredTypes.push('运输许可证');
return requiredTypes;
@@ -3656,10 +3648,7 @@ export default {
}
files.forEach((item, index) => {
window.setTimeout(() => {
downloadFileByUrl(
item.url,
item.originalName || item.name || `客商材料${index + 1}`
);
downloadFileByUrl(item.url, item.originalName || item.name || `客商材料${index + 1}`);
}, index * 300);
});
},
@@ -4155,7 +4144,9 @@ export default {
const changeLabel = item.changeType === 'decrease' ? '每减少' : '每增加';
const scoreLabel = item.scoreType === 'subtract' ? '减' : '加';
const generatedLabel = isScoreOption
? `${changeLabel}${item.changeValue || ''}${item.changeUnit || ''}${scoreLabel}${item.score || ''}分`
? `${changeLabel}${item.changeValue || ''}${item.changeUnit || ''}${scoreLabel}${
item.score || ''
}分`
: '';
const label = item.label || item.optionName || item.value || generatedLabel;
return {
@@ -4359,7 +4350,8 @@ export default {
calculateScore(score) {
const details = score.details || [];
details.forEach(detail => {
if (!this.isScoreTypeDetail(detail) || String(detail.scoreInput ?? '').trim() === '') return;
if (!this.isScoreTypeDetail(detail) || String(detail.scoreInput ?? '').trim() === '')
return;
const calculatedScore = this.getScoreTypeCalculatedScore(detail);
if (calculatedScore !== null) detail.selfScore = calculatedScore;
});
@@ -5316,7 +5308,7 @@ export default {
max-height: 72vh;
overflow: auto;
}
.el-col{
.el-col {
margin-bottom: 0;
}
.el-form-item {