1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e72ad01e"],{"4c6f":function(t,e,n){"use strict";n.r(e);var l=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"boxDel"},[n("div",{staticClass:"upload-main"},[n("div",{staticClass:"upload-container"},[n("el-upload",{attrs:{action:"",accept:".xls,.xlsx","show-file-list":!1,"http-request":t.handleImport}},[n("div",[n("div",{staticStyle:{position:"relative"}},[n("el-input",{staticClass:"input",attrs:{type:"span",placeholder:"点击上传文件"},model:{value:t.import_name,callback:function(e){t.import_name=e},expression:"import_name"}},[n("i",{staticClass:"el-icon-upload2",attrs:{slot:"append"},slot:"append"})]),t._v(" "),n("i",{staticClass:"block"})],1)])])],1)]),t._v(" "),t.show?n("div",{staticClass:"btn"},[n("el-button",{attrs:{type:"danger"},on:{click:t.batch}},[t._v("批量删除")])],1):t._e(),t._v(" "),n("el-table",{ref:"multipleTable",staticStyle:{margin:"20px 0"},attrs:{data:t.list,"header-cell-style":{background:"#f8fbfc"},border:"",stripe:"","tooltip-effect":"dark"},on:{"selection-change":t.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),t._v(" "),n("el-table-column",{attrs:{prop:"express_number",label:"快递单号",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{prop:"express_com",label:"快递名称",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"订单号",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[t._v("\n "+t._s(n.get_order&&n.get_order.order_num)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"created_at",label:"创建时间",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{prop:"note",label:"尺码",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{prop:"total",label:"数量",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var l=e.row;return[n("el-button",{attrs:{type:"danger",size:"small"},on:{click:function(e){return t.batchd(l.id)}}},[t._v("删除")])]}}])})],1)],1)},a=[],i=(n("7f7f"),n("20d6"),n("0bbe")),s={data:function(){return{multipleSelection:[],import_name:"",import_file:null,list:[],show:!1,ids:[]}},methods:{handleSelectionChange:function(t){this.multipleSelection=t.map((function(t){return t.id}))},batch:function(){var t=this;if(0===this.multipleSelection.length)return this.$message.error("请选择需要批量删除的单号!"),!1;this.$confirm("确定要删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var e=t.multipleSelection;Object(i["a"])({id:e}).then((function(n){if(200===n.code){for(var l=t.list,a=0;a<e.length;a++){var i=l.findIndex((function(t){return t.id===e[a]}));l.splice(i,1)}t.list=l,t.$message.success("删除成功")}else t.$message.error(n.message||"删除失败")}))})).catch((function(){t.$refs.multipleTable.clearSelection()}))},batchd:function(t){var e=this;this.ids=[t],this.$confirm("确定要删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t=e.ids;Object(i["a"])({id:t}).then((function(n){if(200===n.code){var l=e.list.findIndex((function(e){return e.id===t}));e.list.splice(l,1),e.$message.success("删除成功")}else e.$message.error(n.message||"删除失败")}))})).catch((function(){}))},handleImport:function(t){var e=this,n=t.file;if(n){this.import_name=n.name,this.import_file=n;var l=new FormData;l.append("file",this.import_file),this.loadingFull=!0;try{this.$request(Object(i["f"])(l),(function(t){for(var n=[],l=0;l<t.length;l++)n=n.concat(t[l]);e.list=n,e.show=!0}))}catch(a){this.$message.error("上传失败")}finally{this.loadingFull=!1}}}}},r=s,c=(n("f1d3"),n("2877")),o=Object(c["a"])(r,l,a,!1,null,"3fcb9ecb",null);e["default"]=o.exports},c2b4:function(t,e,n){},f1d3:function(t,e,n){"use strict";n("c2b4")}}]);
|