12 |
- webpackJsonp([47],{Ohqx:function(e,t){},YEDJ:function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=l("fZjL"),r=l.n(n),i=l("FWz8"),a=["顺丰快递","圆通快递","中通快递","韵达快递"],s={name:"deliverOrderList",data:function(){return{list:[],listError:[],dialogVisible:!1,companyOptions:a}},created:function(){this.list=this.$route.query.list,this.list instanceof Array==!1&&(this.list=[]),console.log(this.list)},methods:{tableRowClassName:function(e){return e.row.isError?"warning-row":""},handleViewRemove:function(e,t){console.log(this.list,e,t),this.list.splice(e,1)},cancel:function(){this.$router.back()},confirm:function(){var e=this;this.$confirm("是否要进行发货操作?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.c)(e.list).then(function(t){var l=t.data;if(!l||r()(l).length<=0)e.$router.back(),e.$message({type:"success",message:"发货成功!"});else{e.list.forEach(function(e){l[e.orderSn]&&(e.isError=!0)}),e.dialogVisible=!0;var n=[];for(var i in l)n.push({id:i,text:l[i]});e.listError=n}})}).catch(function(){e.$message({type:"info",message:"已取消发货"})})}}},o={render:function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("div",{staticClass:"app-container"},[l("el-card",{staticClass:"operate-container",attrs:{shadow:"never"}},[l("i",{staticClass:"el-icon-tickets"}),e._v(" "),l("span",[e._v("发货列表")])]),e._v(" "),l("div",{staticClass:"table-container"},[l("el-table",{ref:"deliverOrderTable",staticStyle:{width:"100%"},attrs:{data:e.list,border:"","row-class-name":e.tableRowClassName}},[l("el-table-column",{attrs:{label:"订单编号",width:"180",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.orderSn))]}}])}),e._v(" "),l("el-table-column",{attrs:{label:"收货人",width:"180",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.receiverName))]}}])}),e._v(" "),l("el-table-column",{attrs:{label:"手机号码",width:"160",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.receiverPhone))]}}])}),e._v(" "),l("el-table-column",{attrs:{label:"邮政编码",width:"160",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.receiverPostCode))]}}])}),e._v(" "),l("el-table-column",{attrs:{label:"收货地址",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.address)+"\n ")]}}])}),e._v(" "),l("el-table-column",{attrs:{label:"配送方式",width:"160",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-select",{attrs:{placeholder:"请选择物流公司",size:"small"},model:{value:t.row.deliveryCompany,callback:function(l){e.$set(t.row,"deliveryCompany",l)},expression:"scope.row.deliveryCompany"}},e._l(e.companyOptions,function(e){return l("el-option",{key:e,attrs:{label:e,value:e}})}))]}}])}),e._v(" "),l("el-table-column",{attrs:{label:"物流单号",width:"180",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-input",{attrs:{size:"small"},model:{value:t.row.deliverySn,callback:function(l){e.$set(t.row,"deliverySn",l)},expression:"scope.row.deliverySn"}})]}}])}),e._v(" "),l("el-table-column",{attrs:{label:"操作",width:"180",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("p",{staticClass:"table-btn-group"},[l("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(l){e.handleViewRemove(t.$index,t.row)}}},[e._v("移除")])],1)]}}])})],1),e._v(" "),l("div",{staticStyle:{"margin-top":"15px","text-align":"center"}},[l("el-button",{on:{click:e.cancel}},[e._v("取消")]),e._v(" "),l("el-button",{attrs:{disabled:e.list.length<=0,type:"primary"},on:{click:e.confirm}},[e._v("确定")])],1)],1),e._v(" "),l("el-dialog",{attrs:{title:"提示",visible:e.dialogVisible,width:"50%"},on:{"update:visible":function(t){e.dialogVisible=t}}},[l("el-table",{staticStyle:{width:"100%"},attrs:{data:e.listError,border:""}},[l("el-table-column",{attrs:{label:"编号",width:"180",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.id))]}}])}),e._v(" "),l("el-table-column",{attrs:{label:"内容",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.text))]}}])})],1)],1)],1)},staticRenderFns:[]};var c=l("VU/8")(s,o,!1,function(e){l("Ohqx")},null,null);t.default=c.exports}});
- //# sourceMappingURL=47.965d72d1bc8a9c76d7c7.js.map
|