|
@@ -70,8 +70,15 @@ |
|
@@ -70,8 +70,15 @@ |
|
70
|
<div class="table-operator">
|
70
|
<div class="table-operator">
|
|
71
|
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
71
|
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
|
72
|
<a-button type="primary" icon="download" @click="handleExportXls('贸易招标信息')">导出</a-button> -->
|
72
|
<a-button type="primary" icon="download" @click="handleExportXls('贸易招标信息')">导出</a-button> -->
|
|
73
|
- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
|
|
|
|
74
|
- @change="handleImportExcel">
|
73
|
+ <!-- 修改导入按钮部分 -->
|
|
|
|
74
|
+ <a-upload
|
|
|
|
75
|
+ name="file"
|
|
|
|
76
|
+ :showUploadList="false"
|
|
|
|
77
|
+ :multiple="false"
|
|
|
|
78
|
+ :headers="tokenHeader"
|
|
|
|
79
|
+ :action="importExcelUrl"
|
|
|
|
80
|
+ :beforeUpload="beforeUploadCheck"
|
|
|
|
81
|
+ @change="handleImportExcel">
|
|
75
|
<a-button type="primary" icon="import">导入招标信息</a-button>
|
82
|
<a-button type="primary" icon="import">导入招标信息</a-button>
|
|
76
|
</a-upload>
|
83
|
</a-upload>
|
|
77
|
<!-- 高级查询区域 -->
|
84
|
<!-- 高级查询区域 -->
|
|
@@ -160,7 +167,7 @@ |
|
@@ -160,7 +167,7 @@ |
|
160
|
|
167
|
|
|
161
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
168
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
162
|
import TblTradeTenderInfoModal from './modules/TblTradeTenderInfoModal'
|
169
|
import TblTradeTenderInfoModal from './modules/TblTradeTenderInfoModal'
|
|
163
|
-import { getAction } from '@/api/manage'
|
170
|
+import { checkeFile, getAction } from '@/api/manage'
|
|
164
|
import TblTradeTenderInfoTab2List from './TblTradeTenderInfoTab2List.vue'
|
171
|
import TblTradeTenderInfoTab2List from './TblTradeTenderInfoTab2List.vue'
|
|
165
|
import TblTradeTenderInfoTab6List from './TblTradeTenderInfoTab6List.vue'
|
172
|
import TblTradeTenderInfoTab6List from './TblTradeTenderInfoTab6List.vue'
|
|
166
|
import '@/assets/less/TableExpand.less'
|
173
|
import '@/assets/less/TableExpand.less'
|
|
@@ -498,6 +505,49 @@ export default { |
|
@@ -498,6 +505,49 @@ export default { |
|
498
|
fieldList.push({ type: 'string', value: 'xjjhwcsj', text: '询价计划完成日期', dictCode: '' })
|
505
|
fieldList.push({ type: 'string', value: 'xjjhwcsj', text: '询价计划完成日期', dictCode: '' })
|
|
499
|
fieldList.push({ type: 'string', value: 'bdlx', text: '标的类型', dictCode: '' })
|
506
|
fieldList.push({ type: 'string', value: 'bdlx', text: '标的类型', dictCode: '' })
|
|
500
|
this.superFieldList = fieldList
|
507
|
this.superFieldList = fieldList
|
|
|
|
508
|
+ },
|
|
|
|
509
|
+ // 添加 beforeUploadCheck 方法
|
|
|
|
510
|
+ beforeUploadCheck(file) {
|
|
|
|
511
|
+ return new Promise((resolve, reject) => {
|
|
|
|
512
|
+ // 创建FormData对象
|
|
|
|
513
|
+ const formData = new FormData()
|
|
|
|
514
|
+ formData.append('file', file)
|
|
|
|
515
|
+
|
|
|
|
516
|
+ // 使用axios发送请求
|
|
|
|
517
|
+ this.$http({
|
|
|
|
518
|
+ url: '/trade/tblTradeTenderInfo/checkTenderNo',
|
|
|
|
519
|
+ method: 'post',
|
|
|
|
520
|
+ data: formData,
|
|
|
|
521
|
+ headers: {
|
|
|
|
522
|
+ 'Content-Type': 'multipart/form-data'
|
|
|
|
523
|
+ }
|
|
|
|
524
|
+ }).then(res => {
|
|
|
|
525
|
+ if (res.success) {
|
|
|
|
526
|
+ if (res.result.exist) {
|
|
|
|
527
|
+ this.$confirm({
|
|
|
|
528
|
+ title: '提示',
|
|
|
|
529
|
+ content: `标书号 ${res.result.tenderNo} 已存在,继续导入将删除原有数据。是否继续?`,
|
|
|
|
530
|
+ okText: '确定',
|
|
|
|
531
|
+ cancelText: '取消',
|
|
|
|
532
|
+ onOk: () => {
|
|
|
|
533
|
+ resolve(true)
|
|
|
|
534
|
+ },
|
|
|
|
535
|
+ onCancel: () => {
|
|
|
|
536
|
+ reject(new Error('用户取消导入'))
|
|
|
|
537
|
+ }
|
|
|
|
538
|
+ })
|
|
|
|
539
|
+ } else {
|
|
|
|
540
|
+ resolve(true)
|
|
|
|
541
|
+ }
|
|
|
|
542
|
+ } else {
|
|
|
|
543
|
+ this.$message.error(res.message || '检查标书号失败')
|
|
|
|
544
|
+ reject(new Error('检查标书号失败'))
|
|
|
|
545
|
+ }
|
|
|
|
546
|
+ }).catch(err => {
|
|
|
|
547
|
+ this.$message.error('检查标书号失败: ' + (err.message || err))
|
|
|
|
548
|
+ reject(err)
|
|
|
|
549
|
+ })
|
|
|
|
550
|
+ })
|
|
501
|
}
|
551
|
}
|
|
502
|
}
|
552
|
}
|
|
503
|
}
|
553
|
}
|