Kaynağa Gözat

物联网稽核模版

sunyize 2 yıl önce
ebeveyn
işleme
08452a7506

BIN
public/static/lotExcel.xlsx


+ 28 - 4
src/views/smscheck/modules/TaskImport.vue

@@ -72,7 +72,7 @@
 <script>
 
 import {JeecgListMixin} from '@/mixins/JeecgListMixin'
-import { downFile, getAction, httpAction } from '@api/manage'
+import { downFile, getAction, httpAction, postAction } from '@api/manage'
 
 export default {
   name: 'TaskImport',
@@ -177,6 +177,7 @@ export default {
           dataIndex: 'errorMsg'
         },
       ],
+      type:'',
       batchNo:"",
       url: {
         importExcel: window._CONFIG['domainURL'] + "/smsCheck/task/importCustomerExcel",
@@ -189,9 +190,25 @@ export default {
   created() {
     this.task.id = this.$route.query.id;
     this.queryInfoById(this.task.id);
-
+    this.getTask(this.task.id);
   },
   methods: {
+    getTask(id){
+      var that = this;
+      var data = {
+        "id": id,
+      }
+      postAction('/smsTurck/customerData/query/getTaskType', data).then((res) => {
+        if (res.success) {
+          // Line("1", "行短稽核"),
+          //   Business("2", "物联网业务稽核"),
+          //   Reopening("3", "复开审批"),
+          //   TrunkLineAudit("4", "中继线稽核");
+          // that.taskId=res.result.taskId;
+          that.type=res.result.type;
+        }
+      })
+    },
     handleExportXls(fileName){
       if(!fileName || typeof fileName != "string"){
         fileName = "导出文件"
@@ -226,9 +243,16 @@ export default {
     /**下载模版*/
     downloadTemplat(){
       const a = document.createElement('a')
-      a.href = '/web/tnc/static/taskModel.xlsx'
+      if (this.type==='2'){
+        a.href = '/web/tnc/static/lotExcel.xlsx'
+        a.setAttribute('download', '物联网稽核模版.xlsx')
+      }
+      if (this.type==='1'){
+        a.href = '/web/tnc/static/taskModel.xlsx'
+        a.setAttribute('download', '行短稽核模版.xlsx')
+      }
       //a.href = '/static/taskModel.xlsx'
-      a.setAttribute('download', '行短稽核模版.xlsx')
+
       a.click();
       a.remove();
     },