瀏覽代碼

添加“客户是否有特殊要求” ,导入放到其他页面。

@zhangxiaoyu122 3 年之前
父節點
當前提交
397ffb0122

+ 36 - 1
src/views/energyPlan/components/supplyAndDemand/planProjectBuildingMaterialsWaterSlag.vue

@@ -88,6 +88,20 @@
                                     @click="but_del_plural()"
                                     :loading="loading"
                                 >删除</el-button>
+                                <el-upload
+                                  v-if="butPrivilege.IMPORT"
+                                  style="display: inline-block;margin-left:5px"
+                                  action=""
+                                  :on-progress='beforeUpload'
+                                  :multiple='false'
+                                  :limit="1"
+                                  accept=".xls"
+                                  :show-file-list="false"
+                                  ><el-button
+                                  size="mini"
+                                  type="primary"
+                                  :loading='loading'>导入</el-button>
+                                  </el-upload>
                             </el-col>
                             <el-col :span="8">
                                 <div style="float:right; text-align: right;">
@@ -675,7 +689,8 @@ export default {
                 QUERY: false,
                 PUT: false,
                 CHECK: false,
-                UNDOCHECK: false
+                UNDOCHECK: false,
+                IMPORT: false
             },
             loginName: getCookie('loginName')
         }
@@ -1450,6 +1465,26 @@ export default {
                 let target = this.focusTarget;
                 $(target).find('input').focus();
             });
+        },
+        // 导入方法
+        beforeUpload (event, file, fileList) {
+          let _this = this
+          let formData = new FormData();
+          formData.append('file', file.raw)
+          _this.loading = true
+          this.axios.post('pass/ems/v1/emsprodplanyears/excelimport/', formData, {
+            headers: {'Content-Type': 'multipart/form-data'}
+          }).then(res => {
+            if (res.code === '200') {
+              this.$message.success('操作成功')
+              _this.getTableData();
+            } else {
+              this.$message.error(res.message)
+            }
+            _this.loading = false
+          }).catch(() => {
+            _this.loading = false
+          })
         }
     }
 }

+ 61 - 27
src/views/energyPlan/components/supplyAndDemand/planProjectCBD.vue

@@ -131,7 +131,7 @@
                                     style="margin-left: 20px;"
                                     @click="but_add"
                                     :loading="loading"
-                                    v-if="butPrivilege.PUT && !isCheck"
+                                    v-if="butPrivilege.ADD && !isCheck"
                                 >新增</el-button>
                                 <el-upload
                                   style="display: inline-block;margin-left:5px"
@@ -190,7 +190,7 @@
                                     type="danger"
                                     size="mini"
                                     icon="el-icon-delete"
-                                    v-if="butPrivilege.PUT && !isCheck"
+                                    v-if="butPrivilege.DELETE && !isCheck"
                                     @click="but_del_plural()"
                                     :loading="loading"
                                 >删除</el-button>
@@ -255,7 +255,7 @@
                         <el-table-column
                         sortable
                             prop="id"
-                            label="编号"
+                            label="国贸计划编号"
                             fixed="left"
                             align="center"
                             width="120px"
@@ -385,6 +385,7 @@
                             :show-overflow-tooltip="true"
                             v-if="filterForm.data.gx!='GX'"
                         >
+
                         <template slot-scope="scope">
                                 <el-form-item
                                     v-if="!isCheck && scope.row.isSelection"
@@ -401,6 +402,16 @@
                                 <span v-else>{{scope.row.lengths}}</span>
                         </template>
                         </el-table-column>
+                        <el-table-column
+                             sortable
+                            prop="teshu"
+                            label="客户是否有特殊要求"
+                            align="center"
+                            width="140px"
+                            :show-overflow-tooltip="true"
+                        >
+                        </el-table-column>
+
                         <el-table-column
                          align="center"
                          label="添加化学成分信息"
@@ -415,7 +426,7 @@
                             width="600"
                             :ref="'popover-' + scope.row.id"
                             trigger="click"
-                            @show="gethxcfDate(scope.row)"
+                            @show="gethxcfDate1(scope.row)"
                         >
                               <div style="float:left">
                                  <el-button
@@ -1399,6 +1410,8 @@ export default {
                 }
             },
             butPrivilege: {
+                ADD: false,
+                DELETE: false,
                 QUERY: false,
                 PUT: false,
                 CHECK: false,
@@ -1519,10 +1532,27 @@ export default {
                     }
                 });
         },
-        gethxcfDate(row){
+        gethxcfDate1 (row) {
+          let that = this;
+          let arr = [];
+          that.gridDataLoading = true;
+          for (let i = 0; i < row.dataByGmid.length; i++) {
+              let item = row.dataByGmid[i];
+              arr.push({
+                  seq: i,
+                  gmid: item.gmid,
+                  chemcode: item.chemCode,
+                  nkstdmin: item.nkStdMin,
+                  nkstdmax: item.nkStdMax
+              })
+          }
+          that.gridData = arr;
+          that.gridDataLoading = false;
+        },
+         gethxcfDate (row) {
          let that = this;
          let url = 'pass/ems/v1/chemicalconstituentss/getDataByGmid';
-         let params ={};
+         let params = {};
          params = {
              gmid: row.id
          }
@@ -1532,7 +1562,7 @@ export default {
             }).then(function (res) {
                 if (res.code === '0') {
                     let arr = [];
-                    for(let i = 0 ; i < res.data.length; i++){
+                    for (let i = 0; i < res.data.length; i++) {
                         let item = res.data[i];
                         arr.push({
                             seq: i,
@@ -1551,11 +1581,11 @@ export default {
                 that.leftTableLoading = false;
             });
         },
-        addhxcf(row){
+
+        addhxcf (row) {
             let that = this;
-            if (that.hxcfSelection.length > 0){
+            if (that.hxcfSelection.length > 0) {
                that.$refs['dialog_form_hxcf'].validate((valid, obj) => {
-
                     if (valid) {
                         let SubmitData = [];
                          for (let key in that.hxcfDataObj) {
@@ -1587,7 +1617,6 @@ export default {
             } else {
                 this.$message.error('至少要选择一条数据');
             }
-
         },
         gethxcf () {
             let that = this;
@@ -1645,8 +1674,8 @@ export default {
         let that = this;
         let seq = that.gridData.length;
         var list = {
-            seq:seq+1,
-            chemcode:'',
+            seq: seq + 1,
+            chemcode: '',
             nkstdmin: 0,
             nkstdmax: 0
           }
@@ -1655,8 +1684,8 @@ export default {
       delData () {
           let that = this;
           let gridData = that.gridData;
-          //let val = that.hxcfSelection;
-          if( that.hxcfSelection.length >0 ){
+          // let val = that.hxcfSelection;
+          if (that.hxcfSelection.length > 0) {
               let SubmitData = [];
               for (let item of that.hxcfSelection) {
                     SubmitData.push({
@@ -1682,7 +1711,7 @@ export default {
                         }
                     })
                 })
-                 //this.$refs.multipleTable.clearSelection();
+                 // this.$refs.multipleTable.clearSelection();
             }
         });
             //   that.$confirm('是否删除已选数据?', '提示', {
@@ -1770,7 +1799,7 @@ export default {
                 });
         },
         // 获取炼钢规格
-        getSpecificationsAsLg() {
+        getSpecificationsAsLg () {
             let that = this
             let url = 'pass/product/v1/emsvqcmbasespecbillet/getbasespecbillet';
             that.axios.get(url)
@@ -1997,7 +2026,11 @@ export default {
                         let arr = [];
                         for (let i = 0; i < res.data.list.length; i++) {
                             let item = res.data.list[i];
+                            let that = this;
+
                             arr.push({
+                                dataByGmid: item.dataByGmid,
+                                teshu: item.dataByGmid != null && item.dataByGmid.length > 0 ? '是' : '否',
                                 seq: i,
                                 id: item.id,
                                 jhTime: item.jhTime,
@@ -2025,6 +2058,7 @@ export default {
                                 gmReviewer: item.gmReviewer,
                                 gmReviewerTime: item.gmReviewerTime,
                                 tag: item.tag ? item.tag : '0'
+
                             });
                         }
                         that.total = res.data.total;
@@ -2083,8 +2117,8 @@ export default {
             that.dialog.editorBox.form.data.lengthTimesWidth = '';
             that.dialog.editorBox.form.data.memo = '';
             that.dialog.editorBox.form.data.tag = '0';
-            that.dialog.editorBox.form.data.deliveryDate = formatDate(new Date(),'yyyy-MM-dd');
-            that.dialog.editorBox.form.data.jhTime = formatDate(new Date(),'yyyy-MM-dd');
+            that.dialog.editorBox.form.data.deliveryDate = formatDate(new Date(), 'yyyy-MM-dd');
+            that.dialog.editorBox.form.data.jhTime = formatDate(new Date(), 'yyyy-MM-dd');
             that.dialog.editorBox.form.data.dateEnable = false;
             that.dialog.editorBox.show = true;
              setTimeout(() => {
@@ -2178,9 +2212,9 @@ export default {
                 return true;
             }
         },
-        //成分标准选择
-        checkboxTcf(row, index){
-          if(row.isSelection){
+        // 成分标准选择
+        checkboxTcf (row, index) {
+          if (row.isSelection) {
               return true
           }
           return false;
@@ -2550,7 +2584,7 @@ export default {
             // 把每一行的索引放进row
             row.index = rowIndex;
         },
-        cellClickHxcf(row, column, cell, event){
+        cellClickHxcf (row, column, cell, event) {
           let _this = this;
             this.rowIndex = row.index;
             this.columnId = column.id;
@@ -2599,18 +2633,18 @@ export default {
           })
         },
         // 订单类型下拉框选择事件
-        isMileageCardOrder(val){
+        isMileageCardOrder (val) {
           let that = this;
           if (val == '1') {
            that.dialog.editorBox.form.data.deliveryDate = '2020-01-01';
            that.dialog.editorBox.form.data.jhTime = '2020-01-01';
            that.dialog.editorBox.form.data.dateEnable = true;
           } else {
-            that.dialog.editorBox.form.data.deliveryDate = formatDate(new Date(),'yyyy-MM-dd');
-            that.dialog.editorBox.form.data.jhTime = formatDate(new Date(),'yyyy-MM-dd');
+            that.dialog.editorBox.form.data.deliveryDate = formatDate(new Date(), 'yyyy-MM-dd');
+            that.dialog.editorBox.form.data.jhTime = formatDate(new Date(), 'yyyy-MM-dd');
             that.dialog.editorBox.form.data.dateEnable = false;
           }
-        },
+        }
     }
 }
 function sortNumber (a, b) {

+ 36 - 1
src/views/energyPlan/components/supplyAndDemand/planProjectCleanCoal.vue

@@ -88,6 +88,20 @@
                                     @click="but_del_plural()"
                                     :loading="loading"
                                 >删除</el-button>
+                                <el-upload
+                                  v-if="butPrivilege.IMPORT"
+                                  style="display: inline-block;margin-left:5px"
+                                  action=""
+                                  :on-progress='beforeUpload'
+                                  :multiple='false'
+                                  :limit="1"
+                                  accept=".xls"
+                                  :show-file-list="false"
+                                  ><el-button
+                                  size="mini"
+                                  type="primary"
+                                  :loading='loading'>导入</el-button>
+                                  </el-upload>
                             </el-col>
                             <el-col :span="8">
                                 <div style="float:right; text-align: right;">
@@ -675,7 +689,8 @@ export default {
                 QUERY: false,
                 PUT: false,
                 CHECK: false,
-                UNDOCHECK: false
+                UNDOCHECK: false,
+                IMPORT: false
             },
             loginName: getCookie('loginName')
         }
@@ -1450,6 +1465,26 @@ export default {
                 let target = this.focusTarget;
                 $(target).find('input').focus();
             });
+        },
+        // 导入方法
+        beforeUpload (event, file, fileList) {
+          let _this = this
+          let formData = new FormData();
+          formData.append('file', file.raw)
+          _this.loading = true
+          this.axios.post('pass/ems/v1/emsprodplanyears/excelimport/', formData, {
+            headers: {'Content-Type': 'multipart/form-data'}
+          }).then(res => {
+            if (res.code === '200') {
+              this.$message.success('操作成功')
+              _this.getTableData();
+            } else {
+              this.$message.error(res.message)
+            }
+            _this.loading = false
+          }).catch(() => {
+            _this.loading = false
+          })
         }
     }
 }

+ 37 - 2
src/views/energyPlan/components/supplyAndDemand/planProjectCoke.vue

@@ -97,7 +97,21 @@
                                     @click="upState()"
                                     :loading="loading"
                                     v-if="butPrivilege.CHECK && isCheck"
-                                >审核</el-button>
+                                >审核</el-button>
+                                <el-upload
+                                  v-if="butPrivilege.IMPORT"
+                                  style="display: inline-block;margin-left:5px"
+                                  action=""
+                                  :on-progress='beforeUpload'
+                                  :multiple='false'
+                                  :limit="1"
+                                  accept=".xls"
+                                  :show-file-list="false"
+                                  ><el-button
+                                  size="mini"
+                                  type="primary"
+                                  :loading='loading'>导入</el-button>
+                                </el-upload>
                                 <el-button
                                     class="button"
                                     size="mini"
@@ -869,7 +883,8 @@ export default {
                 QUERY: false,
                 PUT: false,
                 CHECK: false,
-                UNDOCHECK: false
+                UNDOCHECK: false,
+                IMPORT: false
             },
             loginName: getCookie('loginName')
         }
@@ -1749,6 +1764,26 @@ export default {
                 }
             }
             return result;
+        },
+        // 导入方法
+        beforeUpload (event, file, fileList) {
+          let _this = this
+          let formData = new FormData();
+          formData.append('file', file.raw)
+          _this.loading = true
+          this.axios.post('pass/ems/v1/emsprodplanyears/excelimport/', formData, {
+            headers: {'Content-Type': 'multipart/form-data'}
+          }).then(res => {
+            if (res.code === '200') {
+              this.$message.success('操作成功')
+              _this.getTableData();
+            } else {
+              this.$message.error(res.message)
+            }
+            _this.loading = false
+          }).catch(() => {
+            _this.loading = false
+          })
         }
     }
 }

+ 39 - 4
src/views/energyPlan/components/supplyAndDemand/planProjectGeneration.vue

@@ -98,6 +98,20 @@
                                     :loading="loading"
                                     v-if="butPrivilege.CHECK && isCheck"
                                 >审核</el-button>
+                                <el-upload
+                                  v-if="butPrivilege.IMPORT"
+                                  style="display: inline-block;margin-left:5px"
+                                  action=""
+                                  :on-progress='beforeUpload'
+                                  :multiple='false'
+                                  :limit="1"
+                                  accept=".xls"
+                                  :show-file-list="false"
+                                  ><el-button
+                                  size="mini"
+                                  type="primary"
+                                  :loading='loading'>导入</el-button>
+                                </el-upload>
                                 <el-button
                                     class="button"
                                     size="mini"
@@ -944,7 +958,8 @@ export default {
                 QUERY: false,
                 PUT: false,
                 CHECK: false,
-                UNDOCHECK: false
+                UNDOCHECK: false,
+                IMPORT: false
             },
             loginName: getCookie('loginName')
         }
@@ -1061,8 +1076,8 @@ export default {
                     lineTotal3 += Number(weiItem);
                 });
             };
-            sums[index] = (index % 9 === 0) ? lineTotal5 : ((index % 8 === 0) ? lineTotal6 :
-            (index % 7 === 0) ? lineTotal4 : (index % 6 === 0) ? lineTotal3 : (index % 5 === 0) ? lineTotal1 : lineTotal);
+            sums[index] = (index % 9 === 0) ? lineTotal5 : ((index % 8 === 0) ? lineTotal6
+            : (index % 7 === 0) ? lineTotal4 : (index % 6 === 0) ? lineTotal3 : (index % 5 === 0) ? lineTotal1 : lineTotal);
             break;
             default:
             break;
@@ -1631,7 +1646,7 @@ export default {
                                     zt: that.tableFormDataObj[key].zt,
                                     parentid: that.filterForm.data.parentid,
                                     yearmonth: that.tableFormDataObj[key].yearmonth,
-                                    line: that.tableFormDataObj[key].line[i][i],
+                                    line: that.tableFormDataObj[key].line[i][i]
                                     });
                                 };
                             };
@@ -1831,6 +1846,26 @@ export default {
                 }
             }
             return result;
+        },
+        // 导入方法
+        beforeUpload (event, file, fileList) {
+          let _this = this
+          let formData = new FormData();
+          formData.append('file', file.raw)
+          _this.loading = true
+          this.axios.post('pass/ems/v1/emsprodplanyears/excelimport/', formData, {
+            headers: {'Content-Type': 'multipart/form-data'}
+          }).then(res => {
+            if (res.code === '200') {
+              this.$message.success('操作成功')
+              _this.getTableData();
+            } else {
+              this.$message.error(res.message)
+            }
+            _this.loading = false
+          }).catch(() => {
+            _this.loading = false
+          })
         }
     }
 }

+ 37 - 1
src/views/energyPlan/components/supplyAndDemand/planProjectLimePowder.vue

@@ -98,6 +98,20 @@
                                     :loading="loading"
                                     v-if="butPrivilege.CHECK && isCheck"
                                 >审核</el-button>
+                                <el-upload
+                                  v-if="butPrivilege.IMPORT"
+                                  style="display: inline-block;margin-left:5px"
+                                  action=""
+                                  :on-progress='beforeUpload'
+                                  :multiple='false'
+                                  :limit="1"
+                                  accept=".xls"
+                                  :show-file-list="false"
+                                  ><el-button
+                                  size="mini"
+                                  type="primary"
+                                  :loading='loading'>导入</el-button>
+                                  </el-upload>
                                 <el-button
                                     class="button"
                                     size="mini"
@@ -107,6 +121,7 @@
                                     v-if="butPrivilege.UNDOCHECK && isCheck"
                                 >撤销审核</el-button>
                             </el-col>
+
                             <el-col :span="8">
                                 <div style="float:right; text-align: right;">
                                     <el-button
@@ -844,7 +859,8 @@ export default {
                 QUERY: false,
                 PUT: false,
                 CHECK: false,
-                UNDOCHECK: false
+                UNDOCHECK: false,
+                IMPORT: false
             },
             loginName: getCookie('loginName')
         }
@@ -1712,6 +1728,26 @@ export default {
                 }
             }
             return result;
+        },
+        // 导入方法
+        beforeUpload (event, file, fileList) {
+          let _this = this
+          let formData = new FormData();
+          formData.append('file', file.raw)
+          _this.loading = true
+          this.axios.post('pass/ems/v1/emsprodplanyears/excelimport/', formData, {
+            headers: {'Content-Type': 'multipart/form-data'}
+          }).then(res => {
+            if (res.code === '200') {
+              this.$message.success('操作成功')
+              _this.getTableData();
+            } else {
+              this.$message.error(res.message)
+            }
+            _this.loading = false
+          }).catch(() => {
+            _this.loading = false
+          })
         }
     }
 }

+ 36 - 1
src/views/energyPlan/components/supplyAndDemand/planProjectMachineCoke.vue

@@ -98,6 +98,20 @@
                                     :loading="loading"
                                     v-if="butPrivilege.CHECK && isCheck"
                                 >审核</el-button>
+                                <el-upload
+                                  v-if="butPrivilege.IMPORT"
+                                  style="display: inline-block;margin-left:5px"
+                                  action=""
+                                  :on-progress='beforeUpload'
+                                  :multiple='false'
+                                  :limit="1"
+                                  accept=".xls"
+                                  :show-file-list="false"
+                                  ><el-button
+                                  size="mini"
+                                  type="primary"
+                                  :loading='loading'>导入</el-button>
+                                  </el-upload>
                                 <el-button
                                     class="button"
                                     size="mini"
@@ -1153,7 +1167,8 @@ export default {
                 QUERY: false,
                 PUT: false,
                 CHECK: false,
-                UNDOCHECK: false
+                UNDOCHECK: false,
+                IMPORT: false
             },
             loginName: getCookie('loginName')
         }
@@ -2179,6 +2194,26 @@ export default {
                 };
             }
             return result;
+        },
+        // 导入方法
+        beforeUpload (event, file, fileList) {
+          let _this = this
+          let formData = new FormData();
+          formData.append('file', file.raw)
+          _this.loading = true
+          this.axios.post('pass/ems/v1/emsprodplanyears/excelimport/', formData, {
+            headers: {'Content-Type': 'multipart/form-data'}
+          }).then(res => {
+            if (res.code === '200') {
+              this.$message.success('操作成功')
+              _this.getTableData();
+            } else {
+              this.$message.error(res.message)
+            }
+            _this.loading = false
+          }).catch(() => {
+            _this.loading = false
+          })
         }
     },
     computed: {

+ 37 - 2
src/views/energyPlan/components/supplyAndDemand/planProjectPuddling.vue

@@ -88,7 +88,21 @@
                                     @click="upState()"
                                     :loading="loading"
                                     v-if="butPrivilege.CHECK && isCheck"
-                                >审核</el-button>
+                                >审核</el-button>
+                                <el-upload
+                                  v-if="butPrivilege.IMPORT"
+                                  style="display: inline-block;margin-left:5px"
+                                  action=""
+                                  :on-progress='beforeUpload'
+                                  :multiple='false'
+                                  :limit="1"
+                                  accept=".xls"
+                                  :show-file-list="false"
+                                  ><el-button
+                                  size="mini"
+                                  type="primary"
+                                  :loading='loading'>导入</el-button>
+                                  </el-upload>
                                 <el-button
                                     class="button"
                                     size="mini"
@@ -844,7 +858,8 @@ export default {
                 QUERY: false,
                 PUT: false,
                 CHECK: false,
-                UNDOCHECK: false
+                UNDOCHECK: false,
+                IMPORT: false
             },
             loginName: getCookie('loginName')
         }
@@ -1728,6 +1743,26 @@ export default {
                 }
             }
             return result;
+        },
+        // 导入方法
+        beforeUpload (event, file, fileList) {
+          let _this = this
+          let formData = new FormData();
+          formData.append('file', file.raw)
+          _this.loading = true
+          this.axios.post('pass/ems/v1/emsprodplanyears/excelimport/', formData, {
+            headers: {'Content-Type': 'multipart/form-data'}
+          }).then(res => {
+            if (res.code === '200') {
+              this.$message.success('操作成功')
+              _this.getTableData();
+            } else {
+              this.$message.error(res.message)
+            }
+            _this.loading = false
+          }).catch(() => {
+            _this.loading = false
+          })
         }
     }
 }

+ 37 - 2
src/views/energyPlan/components/supplyAndDemand/planProjectSinter.vue

@@ -97,7 +97,21 @@
                                     @click="upState()"
                                     :loading="loading"
                                     v-if="butPrivilege.CHECK && isCheck"
-                                >审核</el-button>
+                                >审核</el-button>
+                                 <el-upload
+                                  v-if="butPrivilege.IMPORT"
+                                  style="display: inline-block;margin-left:5px"
+                                  action=""
+                                  :on-progress='beforeUpload'
+                                  :multiple='false'
+                                  :limit="1"
+                                  accept=".xls"
+                                  :show-file-list="false"
+                                  ><el-button
+                                  size="mini"
+                                  type="primary"
+                                  :loading='loading'>导入</el-button>
+                                </el-upload>
                                 <el-button
                                     class="button"
                                     size="mini"
@@ -815,7 +829,8 @@ export default {
                 QUERY: false,
                 PUT: false,
                 CHECK: false,
-                UNDOCHECK: false
+                UNDOCHECK: false,
+                IMPORT: false
             },
             loginName: getCookie('loginName')
         }
@@ -1709,6 +1724,26 @@ export default {
                 };
             }
             return result;
+        },
+        // 导入方法
+        beforeUpload (event, file, fileList) {
+          let _this = this
+          let formData = new FormData();
+          formData.append('file', file.raw)
+          _this.loading = true
+          this.axios.post('pass/ems/v1/emsprodplanyears/excelimport/', formData, {
+            headers: {'Content-Type': 'multipart/form-data'}
+          }).then(res => {
+            if (res.code === '200') {
+              this.$message.success('操作成功')
+              _this.getTableData();
+            } else {
+              this.$message.error(res.message)
+            }
+            _this.loading = false
+          }).catch(() => {
+            _this.loading = false
+          })
         }
     }
 }

+ 37 - 2
src/views/energyPlan/components/supplyAndDemand/planProjectSteelRolling.vue

@@ -97,7 +97,21 @@
                                     @click="upState()"
                                     :loading="loading"
                                     v-if="butPrivilege.CHECK && isCheck"
-                                >审核</el-button>
+                                >审核</el-button>
+                                <el-upload
+                                  v-if="butPrivilege.IMPORT"
+                                  style="display: inline-block;margin-left:5px"
+                                  action=""
+                                  :on-progress='beforeUpload'
+                                  :multiple='false'
+                                  :limit="1"
+                                  accept=".xls"
+                                  :show-file-list="false"
+                                  ><el-button
+                                  size="mini"
+                                  type="primary"
+                                  :loading='loading'>导入</el-button>
+                                </el-upload>
                                 <el-button
                                     class="button"
                                     size="mini"
@@ -802,7 +816,8 @@ export default {
                 QUERY: false,
                 PUT: false,
                 CHECK: false,
-                UNDOCHECK: false
+                UNDOCHECK: false,
+                IMPORT: false
             },
             loginName: getCookie('loginName')
         }
@@ -1680,6 +1695,26 @@ export default {
                 }
             }
             return result;
+        },
+        // 导入方法
+        beforeUpload (event, file, fileList) {
+          let _this = this
+          let formData = new FormData();
+          formData.append('file', file.raw)
+          _this.loading = true
+          this.axios.post('pass/ems/v1/emsprodplanyears/excelimport/', formData, {
+            headers: {'Content-Type': 'multipart/form-data'}
+          }).then(res => {
+            if (res.code === '200') {
+              this.$message.success('操作成功')
+              _this.getTableData();
+            } else {
+              this.$message.error(res.message)
+            }
+            _this.loading = false
+          }).catch(() => {
+            _this.loading = false
+          })
         }
     }
 }