Compare commits
2 Commits
6f77396748
...
5c416d7559
| Author | SHA1 | Date |
|---|---|---|
|
|
5c416d7559 | |
|
|
14f8ebe30a |
|
|
@ -653,6 +653,20 @@ export const dynamicRoutes = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/analysisRule',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
permissions: ['analysis:rule:list'],
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'index',
|
||||||
|
component: () => import('@/views/template/templateInfo/components/AnalysisRule'),
|
||||||
|
name: 'AnalysisRule',
|
||||||
|
meta: { title: '解析规则', activeMenu: '/template', noCache: true }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
// 防止连续点击多次路由报错
|
// 防止连续点击多次路由报错
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,6 @@ export default {
|
||||||
formData.files.push(...statementFiles) // 加入统一文件列表
|
formData.files.push(...statementFiles) // 加入统一文件列表
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('123',formData.files)
|
|
||||||
|
|
||||||
// 处理财务报表的删除文件列表
|
// 处理财务报表的删除文件列表
|
||||||
if (financialStatementData.delFileList && financialStatementData.delFileList.length) {
|
if (financialStatementData.delFileList && financialStatementData.delFileList.length) {
|
||||||
|
|
@ -141,10 +140,9 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.type === 'add') {
|
if (this.type === 'add') {
|
||||||
console.log('asdad',formData)
|
|
||||||
await addFinance(formData)
|
await addFinance(formData)
|
||||||
} else {
|
} else {
|
||||||
console.log('年份编辑',formData)
|
console.log('编辑内容',formData)
|
||||||
await updateFinance(formData)
|
await updateFinance(formData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
placeholder="文件上传后自动提取"
|
placeholder="文件上传后自动提取"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
maxlength="32"
|
maxlength="64"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -86,7 +86,8 @@ export default {
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
fileList: [
|
fileList: [
|
||||||
{ required: true, message: '请上传财务报告附件', trigger: 'change' }
|
{ required: true, message: '请上传财务报告附件', trigger: 'change' },
|
||||||
|
{ type: 'string', max: 64, message: '长度不能超过64个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
fileName: [
|
fileName: [
|
||||||
{ required: true, message: '文件名需等待文件上传后自动提取', trigger: 'blur' }
|
{ required: true, message: '文件名需等待文件上传后自动提取', trigger: 'blur' }
|
||||||
|
|
@ -116,13 +117,8 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
handleUploadFail() {
|
handleUploadFail() {
|
||||||
|
|
||||||
|
|
||||||
// 将文件名和报告年份置空
|
|
||||||
this.formData.fileName = '';
|
this.formData.fileName = '';
|
||||||
this.formData.reportYear = '';
|
this.formData.reportYear = '';
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
handleDocxContent(text) {
|
handleDocxContent(text) {
|
||||||
|
|
@ -176,7 +172,7 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
setFormData(data) {
|
setFormData(data) {
|
||||||
// 财务报告文件:不手动生成uid
|
// 财务报告文件
|
||||||
const financeFiles = Array.isArray(data.fileList)
|
const financeFiles = Array.isArray(data.fileList)
|
||||||
? data.fileList.filter(file => file && file.businessType === 'finance_report')
|
? data.fileList.filter(file => file && file.businessType === 'finance_report')
|
||||||
.map(file => ({
|
.map(file => ({
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@
|
||||||
class="form-control auto-input"
|
class="form-control auto-input"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
maxlength="16"
|
maxlength="16"
|
||||||
|
@input="handleNumberInput('operatingIncome', 2)"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -51,6 +52,7 @@
|
||||||
class="form-control auto-input"
|
class="form-control auto-input"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
maxlength="16"
|
maxlength="16"
|
||||||
|
@input="handleNumberInput('currentAssets', 2)"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -62,6 +64,7 @@
|
||||||
class="form-control auto-input"
|
class="form-control auto-input"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
maxlength="16"
|
maxlength="16"
|
||||||
|
@input="handleNumberInput('currentLiabilities', 2)"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -76,6 +79,7 @@
|
||||||
class="form-control auto-input"
|
class="form-control auto-input"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
maxlength="16"
|
maxlength="16"
|
||||||
|
@input="handleNumberInput('currentRatio', 2)"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -87,8 +91,7 @@
|
||||||
class="form-control auto-input"
|
class="form-control auto-input"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
maxlength="16"
|
maxlength="16"
|
||||||
:precision="2"
|
@input="handleNumberInput('netProfit', 2)"
|
||||||
@change="handleNumberInput('netProfit')"
|
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -100,6 +103,7 @@
|
||||||
class="form-control auto-input"
|
class="form-control auto-input"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
maxlength="16"
|
maxlength="16"
|
||||||
|
@input="handleNumberInput('shareholdersEquity', 2)"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -114,6 +118,7 @@
|
||||||
class="form-control auto-input"
|
class="form-control auto-input"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
maxlength="16"
|
maxlength="16"
|
||||||
|
@input="handleNumberInput('returnOnNetAssets', 2)"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -125,6 +130,8 @@
|
||||||
class="form-control auto-input"
|
class="form-control auto-input"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
maxlength="16"
|
maxlength="16"
|
||||||
|
@input="handleNumberInput('totalLiabilities', 2)"
|
||||||
|
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -134,10 +141,9 @@
|
||||||
v-model="formData.totalAssets"
|
v-model="formData.totalAssets"
|
||||||
placeholder="自动提取"
|
placeholder="自动提取"
|
||||||
class="form-control auto-input"
|
class="form-control auto-input"
|
||||||
:precision="2"
|
|
||||||
@change="handleNumberInput('totalAssets')"
|
|
||||||
show-word-limit
|
show-word-limit
|
||||||
maxlength="16"
|
maxlength="16"
|
||||||
|
@input="handleNumberInput('totalAssets', 2)"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -152,6 +158,8 @@
|
||||||
class="form-control auto-input"
|
class="form-control auto-input"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
maxlength="16"
|
maxlength="16"
|
||||||
|
@input="handleNumberInput('assetLiabilityRatio', 2)"
|
||||||
|
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -204,37 +212,47 @@ export default {
|
||||||
{ required: true, message: '请上传财务报表附件', trigger: 'change' }
|
{ required: true, message: '请上传财务报表附件', trigger: 'change' }
|
||||||
],
|
],
|
||||||
operatingIncome: [
|
operatingIncome: [
|
||||||
{ required: true, message: '营业收入为必填项', trigger: 'change' }
|
{ required: true, message: '营业收入为必填项', trigger: 'change' },
|
||||||
|
{ type: 'string', max: 16, message: '长度不能超过16个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
netProfit: [
|
netProfit: [
|
||||||
{ required: true, message: '净利润为必填项', trigger: 'change' }
|
{ required: true, message: '净利润为必填项', trigger: 'change' },
|
||||||
|
{ type: 'string', max: 16, message: '长度不能超过16个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
returnOnNetAssets: [
|
returnOnNetAssets: [
|
||||||
{ required: true, message: '净资产收益率为必填项', trigger: 'change' },
|
{ required: true, message: '净资产收益率为必填项', trigger: 'change' },
|
||||||
{ pattern: /^\d+(\.\d+)?%?$/, message: '请输入有效的净资产收益率(如1或1%)', trigger: 'blur' }
|
{ pattern: /^\d+(\.\d+)?%?$/, message: '请输入有效的净资产收益率(如1或1%)', trigger: 'blur' },
|
||||||
|
{ type: 'string', max: 16, message: '长度不能超过16个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
currentAssets: [
|
currentAssets: [
|
||||||
{ required: true, message: '流动资产为必填项', trigger: 'blur' }
|
{ required: true, message: '流动资产为必填项', trigger: 'blur' },
|
||||||
|
{ type: 'string', max: 16, message: '长度不能超过16个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
currentLiabilities: [
|
currentLiabilities: [
|
||||||
{ required: true, message: '流动负债为必填项', trigger: 'blur' }
|
{ required: true, message: '流动负债为必填项', trigger: 'blur' },
|
||||||
|
{ type: 'string', max: 16, message: '长度不能超过16个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
currentRatio: [
|
currentRatio: [
|
||||||
{ required: true, message: '流动比率为必填项', trigger: 'blur' },
|
{ required: true, message: '流动比率为必填项', trigger: 'blur' },
|
||||||
{ pattern: /^\d+(\.\d+)?%?$/, message: '请输入有效的流动比率(如1或1%)', trigger: 'blur' }
|
{ pattern: /^\d+(\.\d+)?%?$/, message: '请输入有效的流动比率(如1或1%)', trigger: 'blur' },
|
||||||
|
{ type: 'string', max: 16, message: '长度不能超过16个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
shareholdersEquity: [
|
shareholdersEquity: [
|
||||||
{ required: true, message: '股东权益为必填项', trigger: 'blur' }
|
{ required: true, message: '股东权益为必填项', trigger: 'blur' },
|
||||||
|
{ type: 'string', max: 16, message: '长度不能超过16个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
totalLiabilities: [
|
totalLiabilities: [
|
||||||
{ required: true, message: '负债总额为必填项', trigger: 'blur' }
|
{ required: true, message: '负债总额为必填项', trigger: 'blur' },
|
||||||
|
{ type: 'string', max: 16, message: '长度不能超过16个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
totalAssets: [
|
totalAssets: [
|
||||||
{ required: true, message: '资产总额为必填项', trigger: 'blur' }
|
{ required: true, message: '资产总额为必填项', trigger: 'blur' },
|
||||||
|
{ type: 'string', max: 16, message: '长度不能超过16个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
assetLiabilityRatio: [
|
assetLiabilityRatio: [
|
||||||
{ required: true, message: '资产负债率为必填项', trigger: 'blur' },
|
{ required: true, message: '资产负债率为必填项', trigger: 'blur' },
|
||||||
{ pattern: /^\d+(\.\d+)?%?$/, message: '请输入有效的资产负债率(如1或1%)', trigger: 'blur' }
|
{ pattern: /^\d+(\.\d+)?%?$/, message: '请输入有效的资产负债率(如1或1%)', trigger: 'blur' },
|
||||||
|
{ type: 'string', max: 16, message: '长度不能超过16个字符', trigger: 'blur' },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
isReplacingFile: false // 新增:标记是否正在替换文件
|
isReplacingFile: false // 新增:标记是否正在替换文件
|
||||||
|
|
@ -517,10 +535,39 @@ export default {
|
||||||
* 处理数字输入框的change事件,确保格式正确
|
* 处理数字输入框的change事件,确保格式正确
|
||||||
* @param {string} fieldName - 表单字段名
|
* @param {string} fieldName - 表单字段名
|
||||||
*/
|
*/
|
||||||
handleNumberInput(fieldName) {
|
handleNumberInput(fieldName, decimalPlaces) {
|
||||||
this.formData[fieldName] = this.formatToTwoDecimalPlaces(this.formData[fieldName]);
|
let value = this.formData[fieldName];
|
||||||
|
|
||||||
|
if (value === null || value === undefined) {
|
||||||
|
value = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 1. 转为字符串并清除所有非数字和非小数点的字符
|
||||||
|
// 对于允许输入百分比的字段,可以加上 %,如 /[^\d.%]/g
|
||||||
|
value = value.toString().replace(/[^\d.]/g, '');
|
||||||
|
|
||||||
|
// 2. 只保留第一个小数点
|
||||||
|
const parts = value.split('.');
|
||||||
|
if (parts.length > 2) {
|
||||||
|
value = parts[0] + '.' + parts.slice(1).join('');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 限制小数点后的位数
|
||||||
|
if (decimalPlaces > 0 && parts.length === 2) {
|
||||||
|
value = parts[0] + '.' + parts[1].substring(0, decimalPlaces);
|
||||||
|
} else if (decimalPlaces === 0) {
|
||||||
|
// 如果不允许小数,则取整数部分
|
||||||
|
value = parts[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 严格控制总长度不超过 maxlength (16)
|
||||||
|
if (value.length > 16) {
|
||||||
|
value = value.substring(0, 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5. 将处理后的值赋回给 v-model
|
||||||
|
this.formData[fieldName] = value;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import UploadFile from '@/views/common/UploadFile.vue'
|
import UploadFile from '@/views/common/UploadFile.vue'
|
||||||
|
import {convertChineseDate} from '@/utils/bonus'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CompletionAndBidInfo',
|
name: 'CompletionAndBidInfo',
|
||||||
|
|
@ -237,7 +238,11 @@ export default {
|
||||||
Object.keys(chatRes).forEach(key => {
|
Object.keys(chatRes).forEach(key => {
|
||||||
const field = this.ocrResultParams[key]
|
const field = this.ocrResultParams[key]
|
||||||
if (field && chatRes[key]) {
|
if (field && chatRes[key]) {
|
||||||
this.formData[field] = chatRes[key]
|
if (field === 'completionTime' || field === 'startTime') {
|
||||||
|
this.formData[field] = convertChineseDate(chatRes[key]);
|
||||||
|
} else {
|
||||||
|
this.formData[field] = chatRes[key];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.$message.success('竣工信息识别成功,已自动填充')
|
this.$message.success('竣工信息识别成功,已自动填充')
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
placeholder="请输入项目名称"
|
placeholder="请输入项目名称"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
maxlength="32"
|
maxlength="64"
|
||||||
@input="handleInputTest"
|
@input="handleInputTest"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -115,6 +115,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import UploadFile from '@/views/common/UploadFile.vue'
|
import UploadFile from '@/views/common/UploadFile.vue'
|
||||||
|
import {convertChineseDate} from '@/utils/bonus'
|
||||||
export default {
|
export default {
|
||||||
name: 'ContractInfo',
|
name: 'ContractInfo',
|
||||||
components: { UploadFile },
|
components: { UploadFile },
|
||||||
|
|
@ -131,7 +132,7 @@ export default {
|
||||||
"合同金额": "contractAmount",
|
"合同金额": "contractAmount",
|
||||||
"建设地点": "constructionSite",
|
"建设地点": "constructionSite",
|
||||||
"建设单位": "constructionUnit",
|
"建设单位": "constructionUnit",
|
||||||
"建设单位联系方式": "constructionPhone"
|
"建设单位电话": "constructionPhone"
|
||||||
},
|
},
|
||||||
formData: {
|
formData: {
|
||||||
fileList: [],
|
fileList: [],
|
||||||
|
|
@ -282,6 +283,9 @@ export default {
|
||||||
if (formField === 'contractAmount') {
|
if (formField === 'contractAmount') {
|
||||||
value = value.replace(/[^\d.]/g, '')
|
value = value.replace(/[^\d.]/g, '')
|
||||||
}
|
}
|
||||||
|
if (formField === 'contractSigningTime') {
|
||||||
|
value = convertChineseDate(value);
|
||||||
|
}
|
||||||
this.formData[formField] = value
|
this.formData[formField] = value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="建设单位联系方式">
|
<el-form-item label="建设单位电话">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="detailData.constructionPhone"
|
v-model="detailData.constructionPhone"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container" :class="{ 'no-pointer-events': showUploadAnimation || showSaveAnimation }">
|
<div class="drawer-content-wrapper" :class="{ 'no-pointer-events': showUploadAnimation || showSaveAnimation }">
|
||||||
<!-- 文件上传动画 -->
|
<!-- 文件上传动画 -->
|
||||||
<div v-if="showUploadAnimation" class="global-upload-animation">
|
<div v-if="showUploadAnimation" class="global-upload-animation">
|
||||||
<div class="animation-mask"></div>
|
<div class="animation-mask"></div>
|
||||||
|
|
@ -20,11 +20,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 可滚动的内容区域 -->
|
||||||
|
<div class="drawer-scrollable-content">
|
||||||
<div class="content-body">
|
<div class="content-body">
|
||||||
<QualificationFormChild ref="qualificationFormChild" />
|
<QualificationFormChild ref="qualificationFormChild" />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 操作栏 -->
|
<!-- 固定在底部的操作栏 -->
|
||||||
<div class="action-footer">
|
<div class="action-footer">
|
||||||
<el-button class="reset-btn" @click="$emit('cancel')" :disabled="showSaveAnimation">取消</el-button>
|
<el-button class="reset-btn" @click="$emit('cancel')" :disabled="showSaveAnimation">取消</el-button>
|
||||||
<el-button class="search-btn" @click="handleSave()" :loading="showSaveAnimation">保存</el-button>
|
<el-button class="search-btn" @click="handleSave()" :loading="showSaveAnimation">保存</el-button>
|
||||||
|
|
@ -81,17 +84,12 @@ export default {
|
||||||
|
|
||||||
// 2. 组装完整的文件元数据(提取fileRes中的信息)
|
// 2. 组装完整的文件元数据(提取fileRes中的信息)
|
||||||
const fileList = safeGetArray(formData.files);
|
const fileList = safeGetArray(formData.files);
|
||||||
const completeFiles = fileList.map(file => {
|
const completeFiles = fileList.map(file =>
|
||||||
const fileRes = file.response?.fileRes || {};
|
file.response?.fileRes ? {...file.response.fileRes} : null
|
||||||
return {
|
).filter(Boolean)
|
||||||
...fileRes,
|
|
||||||
businessType: 'qualification_certificate',
|
|
||||||
};
|
|
||||||
}).filter(Boolean); // 过滤无效文件
|
|
||||||
|
|
||||||
// 3. 处理删除文件列表
|
// 3. 处理删除文件列表
|
||||||
const delFiles = [...new Set(safeGetArray(formData.delFileList))];
|
const delFiles = [...new Set(safeGetArray(formData.delFileList))];
|
||||||
console.log('删除', delFiles)
|
|
||||||
|
|
||||||
// 4. 构建最终提交数据
|
// 4. 构建最终提交数据
|
||||||
const submitData = {
|
const submitData = {
|
||||||
|
|
@ -101,8 +99,6 @@ export default {
|
||||||
delFileList: undefined // 移除临时字段
|
delFileList: undefined // 移除临时字段
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log('1123123',submitData.files)
|
|
||||||
|
|
||||||
// 5. 区分新增/编辑接口提交
|
// 5. 区分新增/编辑接口提交
|
||||||
if (this.type === 'add') {
|
if (this.type === 'add') {
|
||||||
await addDataAPI(submitData);
|
await addDataAPI(submitData);
|
||||||
|
|
@ -205,15 +201,51 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.app-container {
|
// 抽屉内容总容器(flex布局)
|
||||||
|
.drawer-content-wrapper {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
background: #fff;
|
position: relative; // 用于定位动画元素
|
||||||
min-height: 100%;
|
}
|
||||||
position: relative;
|
|
||||||
|
// 可滚动内容区域(占满剩余空间)
|
||||||
|
.drawer-scrollable-content {
|
||||||
|
flex: 1;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding-right: 12px; // 预留滚动条空间,避免内容被遮挡
|
||||||
|
|
||||||
|
// 滚动条样式优化
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 6px;
|
||||||
|
}
|
||||||
|
&::-webkit-scrollbar-track {
|
||||||
|
background: #f5f5f5;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
&::-webkit-scrollbar-thumb {
|
||||||
|
background: #c0c4cc;
|
||||||
|
border-radius: 3px;
|
||||||
|
&:hover {
|
||||||
|
background: #909399;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 操作栏(固定在底部)
|
||||||
|
.action-footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 12px;
|
||||||
|
padding-top: 16px;
|
||||||
|
margin-top: 16px;
|
||||||
|
border-top: 1px solid #f5f5f5; // 添加分割线,区分内容和操作栏
|
||||||
|
flex-shrink: 0; // 防止被压缩
|
||||||
}
|
}
|
||||||
|
|
||||||
.global-upload-animation {
|
.global-upload-animation {
|
||||||
position: fixed;
|
position: absolute; // 相对于drawer-content-wrapper定位
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
@ -292,7 +324,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-body {
|
.content-body {
|
||||||
padding-bottom: 50px;
|
padding-bottom: 20px; // 与底部操作栏保持间距
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-row {
|
.content-row {
|
||||||
|
|
@ -312,16 +344,6 @@ export default {
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 右下角操作栏样式
|
|
||||||
.action-footer {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 24px;
|
|
||||||
right: 24px;
|
|
||||||
display: flex;
|
|
||||||
gap: 12px;
|
|
||||||
z-index: 20;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-btn {
|
.search-btn {
|
||||||
background: #409EFF;
|
background: #409EFF;
|
||||||
border-color: #409EFF;
|
border-color: #409EFF;
|
||||||
|
|
@ -368,6 +390,11 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 禁止点击样式
|
||||||
|
.no-pointer-events {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes spin {
|
@keyframes spin {
|
||||||
0% { transform: rotate(0deg); }
|
0% { transform: rotate(0deg); }
|
||||||
100% { transform: rotate(360deg); }
|
100% { transform: rotate(360deg); }
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import UploadFile from '@/views/common/UploadFile.vue'
|
import UploadFile from '@/views/common/UploadFile.vue'
|
||||||
|
import {convertChineseDate} from '@/utils/bonus'
|
||||||
|
|
||||||
// 工具函数:安全获取数组
|
// 工具函数:安全获取数组
|
||||||
const safeGetArray = (value) => Array.isArray(value) ? value : []
|
const safeGetArray = (value) => Array.isArray(value) ? value : []
|
||||||
|
|
@ -201,24 +202,16 @@ export default {
|
||||||
// 接收父组件数据并回显(优化:确保文件路径完整)
|
// 接收父组件数据并回显(优化:确保文件路径完整)
|
||||||
setFormData(data) {
|
setFormData(data) {
|
||||||
// 1. 过滤“资质证书类型”的文件
|
// 1. 过滤“资质证书类型”的文件
|
||||||
const qualificationFiles = safeGetArray(data.fileList)
|
const qualificationFiles = Array.isArray(data.fileList)
|
||||||
.filter(file => file && file.businessType === 'qualification_certificate')
|
? data.fileList.filter(file => file && file.businessType === 'qualification_certificate')
|
||||||
.map(file => ({
|
.map(file => ({
|
||||||
...file,
|
name: file.name || file.fileName || '未知文件',
|
||||||
uid: file.uid || Date.now() + Math.random().toString(36).substr(2, 9), // 唯一ID
|
filePath: file.filePath,
|
||||||
name: file.fileName || file.name || '未命名文件',
|
lsFilePath: file.lsFilePath,
|
||||||
lsFilePath: file.lsFilePath || file.fileUrl || '', // 预览路径
|
fileType: file.fileType,
|
||||||
filePath: file.filePath || file.uploadPath || '', // 存储路径(用于删除)
|
businessType: 'qualification_certificate'
|
||||||
status: 'success', // 标记为已上传
|
}))
|
||||||
// 补充上传组件所需的响应结构(删除时需要)
|
: [];
|
||||||
response: {
|
|
||||||
fileRes: {
|
|
||||||
uploadPath: file.filePath || file.uploadPath || '',
|
|
||||||
filePath: file.filePath || file.uploadPath || ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
// 2. 赋值表单数据
|
// 2. 赋值表单数据
|
||||||
this.formData = {
|
this.formData = {
|
||||||
...data,
|
...data,
|
||||||
|
|
@ -367,8 +360,13 @@ export default {
|
||||||
Object.keys(chat_res).forEach(key => {
|
Object.keys(chat_res).forEach(key => {
|
||||||
const formField = this.ocrResultParams[key];
|
const formField = this.ocrResultParams[key];
|
||||||
if (formField && chat_res[key]) {
|
if (formField && chat_res[key]) {
|
||||||
|
if (formField === 'certificateDate' || formField === 'certificateEndDate') {
|
||||||
|
// 单独处理毕业日期
|
||||||
|
this.formData[formField] = convertChineseDate(chat_res[key]);
|
||||||
|
} else {
|
||||||
this.formData[formField] = chat_res[key];
|
this.formData[formField] = chat_res[key];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.$message.success('OCR识别成功,已自动填充证书信息');
|
this.$message.success('OCR识别成功,已自动填充证书信息');
|
||||||
// 触发表单验证
|
// 触发表单验证
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@
|
||||||
direction="rtl"
|
direction="rtl"
|
||||||
size="40%"
|
size="40%"
|
||||||
:before-close="handleDrawerClose"
|
:before-close="handleDrawerClose"
|
||||||
custom-class="custom-qualification-drawer"
|
custom-class="custom-qualification-drawer qualification-drawer"
|
||||||
>
|
>
|
||||||
<QualificationForm
|
<QualificationForm
|
||||||
ref="qualificationForm"
|
ref="qualificationForm"
|
||||||
|
|
@ -160,7 +160,7 @@
|
||||||
direction="rtl"
|
direction="rtl"
|
||||||
size="40%"
|
size="40%"
|
||||||
:before-close="handleDetailDrawerClose"
|
:before-close="handleDetailDrawerClose"
|
||||||
custom-class="custom-qualification-drawer"
|
custom-class="custom-qualification-drawer qualification-drawer"
|
||||||
>
|
>
|
||||||
<QualificationDetailComp
|
<QualificationDetailComp
|
||||||
ref="qualificationDetail"
|
ref="qualificationDetail"
|
||||||
|
|
@ -362,14 +362,35 @@ export default {
|
||||||
.app-container {
|
.app-container {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
|
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
|
||||||
min-height: calc(100vh - 85px);
|
height: calc(100vh - 85px); /* 占满可视区高度,减去顶部导航栏高度 */
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
overflow: hidden; /* 禁止整体页面滚动 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 抽屉公共样式(关键修改:让抽屉内容区支持flex布局)
|
||||||
|
::v-deep .qualification-drawer {
|
||||||
|
.el-drawer__header {
|
||||||
|
padding: 20px 24px;
|
||||||
|
border-bottom: 1px solid #f5f5f5;
|
||||||
|
.el-drawer__title {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-drawer__body {
|
||||||
|
padding: 0; // 移除默认内边距,由子组件控制
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%; // 占满抽屉高度
|
||||||
|
overflow: hidden; // 隐藏溢出内容
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 自定义抽屉样式(保持原有其他样式)
|
||||||
::v-deep .custom-qualification-drawer {
|
::v-deep .custom-qualification-drawer {
|
||||||
.el-drawer__body {
|
.el-drawer__body {
|
||||||
padding: 0;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
.el-drawer__header {
|
.el-drawer__header {
|
||||||
|
|
@ -460,24 +481,23 @@ export default {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(5, 1fr);
|
grid-template-columns: repeat(5, 1fr);
|
||||||
gap: 24px;
|
gap: 24px;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 20px; /* 与分页保持间距 */
|
||||||
max-height: calc(100vh - 280px);
|
|
||||||
overflow-y: auto;
|
|
||||||
padding: 20px 6px 20px 0px;
|
padding: 20px 6px 20px 0px;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
|
flex: 1; /* 自动填充剩余高度 */
|
||||||
|
overflow-y: auto; /* 仅纵向滚动 */
|
||||||
|
overflow-x: hidden; /* 禁止横向滚动 */
|
||||||
|
|
||||||
|
/* 滚动条样式保持不变 */
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
width: 6px;
|
width: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::-webkit-scrollbar-track {
|
&::-webkit-scrollbar-track {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::-webkit-scrollbar-thumb {
|
&::-webkit-scrollbar-thumb {
|
||||||
background: rgba(0, 0, 0, 0.2);
|
background: rgba(0, 0, 0, 0.2);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: rgba(0, 0, 0, 0.3);
|
background: rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
|
|
@ -700,21 +720,4 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .qualification-drawer {
|
|
||||||
.el-drawer__header {
|
|
||||||
padding: 20px 24px;
|
|
||||||
border-bottom: 1px solid #f5f5f5;
|
|
||||||
.el-drawer__title {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.el-drawer__body {
|
|
||||||
padding: 24px;
|
|
||||||
overflow-y: auto;
|
|
||||||
max-height: calc(100vh - 100px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.loading.close()
|
this.loading.close()
|
||||||
this.$modal.msgError('操作失败:' + error)
|
this.$modal.msgError('废标项已存在')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -309,8 +309,9 @@ export default {
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.rejection-item-container {
|
.rejection-item-container {
|
||||||
height: calc(100vh - 84px);
|
height: calc(100vh - 84px);
|
||||||
overflow: hidden;
|
overflow: auto;
|
||||||
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
|
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
|
||||||
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.back-container {
|
.back-container {
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,6 @@ export default {
|
||||||
handleTreeNodeClick(data) {
|
handleTreeNodeClick(data) {
|
||||||
const allNodeIds = this.collectAllNodeIds(data)
|
const allNodeIds = this.collectAllNodeIds(data)
|
||||||
this.tableSendParams.nodeIds = allNodeIds // 此时是字符串
|
this.tableSendParams.nodeIds = allNodeIds // 此时是字符串
|
||||||
console.log(666,this.tableSendParams.nodeIds)
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.handleQuery()
|
this.handleQuery()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
type="card"
|
type="card"
|
||||||
class="file-tabs"
|
class="file-tabs"
|
||||||
@tab-remove="handleRemoveTab"
|
@tab-remove="handleRemoveTab"
|
||||||
@tab-click="handleTabChange"
|
v-on="isEditMode ? { 'tab-click': handleTabChange } : {}"
|
||||||
>
|
>
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
v-for="(tab, index) in fileTabs"
|
v-for="(tab, index) in fileTabs"
|
||||||
|
|
@ -103,6 +103,11 @@ export default {
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '模板组成-项目文件'
|
default: '模板组成-项目文件'
|
||||||
|
},
|
||||||
|
|
||||||
|
isEditMode: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue