|
|
@@ -467,6 +467,23 @@
|
|
|
>
|
|
|
</el-progress>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog :visible.sync="importVisible" title="批量导入" width="25%">
|
|
|
+ <el-upload
|
|
|
+ style="margin-bottom: 10px"
|
|
|
+ action="#"
|
|
|
+ class="upload-demo"
|
|
|
+ :limit="1"
|
|
|
+ :auto-upload="false"
|
|
|
+ :on-change="drivinguploadExcel"
|
|
|
+ ref="upload4"
|
|
|
+ :file-list="excelFileList"
|
|
|
+ >
|
|
|
+ <el-button size="small" type="primary">点击上传</el-button>
|
|
|
+ </el-upload>
|
|
|
+ <el-button size="small" type="primary" @click="templateDownload(1)"
|
|
|
+ >模板下载</el-button
|
|
|
+ >
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -485,6 +502,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ excelFileList: [],
|
|
|
confirmDisabled: false,
|
|
|
riskcodeList: [],
|
|
|
formListbatch: [
|
|
|
@@ -997,7 +1015,14 @@ export default {
|
|
|
return this.handExport();
|
|
|
},
|
|
|
},
|
|
|
+ {
|
|
|
+ name: "增加类型导入",
|
|
|
+ click: (row, index) => {
|
|
|
+ return this.addTypeImport();
|
|
|
+ },
|
|
|
+ },
|
|
|
],
|
|
|
+ importVisible: false,
|
|
|
tableData: [],
|
|
|
dialogVisible: false,
|
|
|
pageData: {
|
|
|
@@ -1082,6 +1107,32 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ drivinguploadExcel(file, fileList) {
|
|
|
+ this.progressPercent = 0;
|
|
|
+ const params = new FormData(); // 声明formData数据类型
|
|
|
+
|
|
|
+ params.append("file", file.raw);
|
|
|
+ params.append("type", "1");
|
|
|
+
|
|
|
+ this.$api.task.addTypeImportExcel(params).then((res) => {
|
|
|
+ if (res.code == "200") {
|
|
|
+ this.excelFileList = fileList;
|
|
|
+ this.progressPercent = 100;
|
|
|
+ this.findPage();
|
|
|
+ this.importVisible = false;
|
|
|
+ } else {
|
|
|
+ this.excelFileList = [];
|
|
|
+ this.progressPercent = 0;
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ this.findPage();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //增加类型批量导入
|
|
|
+ addTypeImport() {
|
|
|
+ this.importVisible = true;
|
|
|
+ this.excelFileList = [];
|
|
|
+ },
|
|
|
agrmentlist() {
|
|
|
this.$api.task.findPtlAgreementListNew({ type: "2" }).then((res) => {
|
|
|
this.agreementTypeoptions = res.data;
|
|
|
@@ -1519,10 +1570,16 @@ export default {
|
|
|
handleSearchListbatch(data) {
|
|
|
this.findPagegbatch(data);
|
|
|
},
|
|
|
- templateDownload() {
|
|
|
- let a = document.createElement("a");
|
|
|
- a.href = `${process.env.BASE_URL}/template/handlingFeeTemplate.xlsx`;
|
|
|
- a.click();
|
|
|
+ templateDownload(type) {
|
|
|
+ if (type != 1) {
|
|
|
+ let a = document.createElement("a");
|
|
|
+ a.href = `${process.env.BASE_URL}/template/handlingFeeTemplate.xlsx`;
|
|
|
+ a.click();
|
|
|
+ } else {
|
|
|
+ let a = document.createElement("a");
|
|
|
+ a.href = `${process.env.BASE_URL}/template/js/cxsxf.xls`;
|
|
|
+ a.click();
|
|
|
+ }
|
|
|
},
|
|
|
haldUpload(row) {
|
|
|
this.formDataId = row.id;
|
|
|
@@ -1560,6 +1617,9 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
+.upload-demo {
|
|
|
+ /* display: inline-block; */
|
|
|
+}
|
|
|
.customStyle {
|
|
|
margin-bottom: 20px;
|
|
|
font-size: 14px;
|