(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-1f81"],{"HT/P":function(t,e,i){"use strict";var a=i("Ifti");i.n(a).a},Ifti:function(t,e,i){},jV7F:function(t,e,i){"use strict";i.r(e);var a=i("P2sY"),r=i.n(a),o=i("QbLZ"),n=i.n(o),l=i("t3Un");function s(t){return Object(l.a)({method:"get",params:{_gp:"admin.order",_mt:"detail",orderId:t}})}var d=i("Mz3J"),u=i("Q2AE");var c={10:"未付款",12:"正在拼团",20:"待出库",30:"待收货",40:"待评价",50:"已完成",60:"退款中",70:"已退款",80:"已取消",90:"已取消(系统)"},p={NONE:"无需物流公司",SF:"顺丰速运",HTKY:"百世快递",ZTO:"中通快递",STO:"申通快递",YTO:"圆通速递",YD:"韵达速递",YZPY:"邮政快递包裹",EMS:"EMS",HHTT:"天天快递",JD:"京东快递",UC:"优速快递",DBL:"德邦快递",ZJS:"宅急送",TNT:"TNT快递"},m={WX:"微信支付",ALI:"支付宝",OFFLINE:"线下支付"},f={name:"Order",components:{Pagination:d.a},filters:{orderStatusFilter:function(t){return c[t]},payChannelFilter:function(t){var e=m[t];return e||"未支付"},shipCodeFilter:function(t){return t?p[t]:"未发货"}},data:function(){return{excelData:{barcode:void 0,name:void 0,specifications:void 0,unit:void 0,num:void 0,address:void 0},excelDataList:[],downData:{status:"",gmtStart:void 0,gmtEnd:void 0},shipCodeMap:p,list:void 0,total:0,listLoading:!0,listQuery:{page:1,limit:20,id:void 0,name:void 0,orderStatusArray:[],sort:"id",order:"desc"},statusMap:c,orderDialogVisible:!1,orderDetail:{},refundForm:{orderNo:void 0,type:"0"},refundDialogVisible:!1,refundSubmiting:!1,downloadLoading:!1,shipForm:{orderNo:void 0,shipCode:"NONE",shipNo:void 0},shipDialogVisible:!1,shipSubmiting:!1,refundRules:{orderNo:[{required:!0,message:"请使用非IE浏览器重试",trigger:"blur"}],type:[{required:!0,message:"请选择退货类型",trigger:"blur"}]},shipRules:{shipCode:[{required:!0,message:"请选择物流类型",trigger:"blur"}],orderNo:[{required:!0,message:"请使用非IE浏览器重试",trigger:"blur"}]}}},created:function(){this.getList()},methods:{checkPermission:function(t){if(t&&t instanceof Array&&t.length>0){var e=u.a.getters&&u.a.getters.perms,i=t;return!!(e.indexOf("*")>=0||e.some(function(t){return i.includes(t)}))}return console.error("need perms! Like v-permission=\"['GET /aaa','POST /bbb']\""),!1},getList:function(){var t=this;this.listLoading=!0,function(t){return Object(l.a)({method:"get",params:n()({_gp:"admin.order",_mt:"list"},t)})}(this.listQuery).then(function(e){t.list=e.data.data.items,t.total=e.data.data.total,t.listLoading=!1}).catch(function(){t.list=[],t.total=0,t.listLoading=!1})},handleFilter:function(){this.listQuery.page=1,this.getList()},handleDetail:function(t){var e=this;s(t.id).then(function(t){e.orderDetail=t.data.data}),this.orderDialogVisible=!0},handleShip:function(t){this.shipDialogVisible=!0,this.shipForm.orderNo=t.orderNo},confirmShip:function(){var t=this;this.$refs.shipForm.validate(function(e){e&&(t.shipSubmiting=!0,"NONE"===t.shipForm.shipCode||t.shipForm.shipNo?function(t){return Object(l.a)({method:"post",params:n()({_gp:"admin.order",_mt:"ship"},t)})}(t.shipForm).then(function(e){t.shipSubmiting=!1,t.shipDialogVisible=!1,t.$notify.success({title:"成功",message:"确认发货成功!"}),t.getList()}).catch(function(e){t.shipSubmiting=!1,t.$notify.error({title:"失败",message:e.data.errmsg})}):t.$notify.error({title:"失败",message:"请填写运单号"}))})},handleRefund:function(t){this.refundForm.orderNo=t.orderNo,this.refundDialogVisible=!0,this.shipForm.shipCode="NONE"},confirmRefund:function(){var t=this;this.$refs.refundForm.validate(function(e){e&&(t.refundSubmiting=!0,function(t){return Object(l.a)({method:"post",params:n()({_gp:"admin.order",_mt:"refund"},t)})}(t.refundForm).then(function(e){t.refundSubmiting=!1,t.refundDialogVisible=!1,t.$notify.success({title:"成功",message:"确认退款成功!"}),t.getList()}).catch(function(e){t.refundSubmiting=!1,t.$notify.error({title:"失败",message:e.data.errmsg})}))})},downOrderExcelBtn:function(t){var e=this;s(t.id).then(function(t){var i=t.data.data;e.downData.address=i.province+i.city+i.county+i.address;for(var a=0;a0,expression:"total>0"}],attrs:{total:t.total,page:t.listQuery.page,limit:t.listQuery.limit},on:{"update:page":function(e){t.$set(t.listQuery,"page",e)},"update:limit":function(e){t.$set(t.listQuery,"limit",e)},pagination:t.getList}}),t._v(" "),i("el-dialog",{attrs:{visible:t.orderDialogVisible,title:"订单详情",width:"800"},on:{"update:visible":function(e){t.orderDialogVisible=e}}},[i("el-form",{attrs:{data:t.orderDetail,"label-position":"left"}},[i("el-form-item",{attrs:{label:"订单编号"}},[i("span",[t._v(t._s(t.orderDetail.orderNo))])]),t._v(" "),i("el-form-item",{attrs:{label:"用户Id"}},[i("span",[t._v(t._s(t.orderDetail.userId))])]),t._v(" "),i("el-form-item",{attrs:{label:"订单渠道"}},[i("span",[t._v(t._s(t.orderDetail.channel))])]),t._v(" "),i("el-form-item",{attrs:{label:"订单状态"}},[[i("el-tag",[t._v(t._s(t._f("orderStatusFilter")(t.orderDetail.status)))])]],2),t._v(" "),i("el-form-item",{attrs:{label:"支付渠道"}},[[i("el-tag",[t._v(t._s(t._f("payChannelFilter")(t.orderDetail.payChannel)))])]],2),t._v(" "),i("el-form-item",{attrs:{label:"用户留言"}},[i("span",[t._v(t._s(t.orderDetail.mono))])]),t._v(" "),i("el-form-item",{attrs:{label:"收货信息"}},[i("span",[t._v("(收货人)"+t._s(t.orderDetail.consignee))]),t._v(" "),i("span",[t._v("(手机号)"+t._s(t.orderDetail.phone))]),t._v(" "),i("span",[t._v("(地址)"+t._s(t.orderDetail.province)+t._s(t.orderDetail.city)+t._s(t.orderDetail.county)+t._s(t.orderDetail.address)+t._s(t.orderDetail.address))])]),t._v(" "),i("el-form-item",{attrs:{label:"商品信息"}},[i("el-table",{attrs:{data:t.orderDetail.skuList,size:"small",border:"",fit:"","highlight-current-row":""}},[i("el-table-column",{attrs:{align:"center",label:"名称",prop:"spuTitle"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",label:"规格",prop:"title"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",label:"商品数量",prop:"num"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",label:"单位",prop:"unit"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",label:"总价(单价*数量)"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("span",[t._v(t._s(e.row.price*e.row.num/100))])]}}])})],1)],1)],1)],1),t._v(" "),i("el-dialog",{attrs:{visible:t.shipDialogVisible,title:"发货"},on:{"update:visible":function(e){t.shipDialogVisible=e}}},[i("el-form",{ref:"shipForm",staticStyle:{width:"400px","margin-left":"50px"},attrs:{model:t.shipForm,rules:t.shipRules,"status-icon":"","label-position":"left","label-width":"100px"}},[i("el-form-item",{attrs:{label:"快递公司",prop:"shipCode"}},[i("el-select",{attrs:{placeholder:"请选择快递公司"},model:{value:t.shipForm.shipCode,callback:function(e){t.$set(t.shipForm,"shipCode",e)},expression:"shipForm.shipCode"}},t._l(t.shipCodeMap,function(t,e){return i("el-option",{key:t,attrs:{label:t,value:e}})}))],1),t._v(" "),i("el-form-item",{attrs:{label:"快递编号",prop:"shipNo"}},[i("el-input",{attrs:{disabled:"NONE"===t.shipForm.shipCode},model:{value:t.shipForm.shipNo,callback:function(e){t.$set(t.shipForm,"shipNo",e)},expression:"shipForm.shipNo"}})],1)],1),t._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.shipDialogVisible=!1}}},[t._v("取消")]),t._v(" "),i("el-button",{attrs:{disabled:t.shipSubmiting,type:"primary"},on:{click:t.confirmShip}},[t._v("确定")])],1)],1),t._v(" "),i("el-dialog",{attrs:{visible:t.refundDialogVisible,title:"退款"},on:{"update:visible":function(e){t.refundDialogVisible=e}}},[i("el-form",{ref:"refundForm",staticStyle:{width:"400px","margin-left":"50px"},attrs:{model:t.refundForm,rules:t.refundRules,"status-icon":"","label-position":"left","label-width":"100px"}},[i("el-form-item",{attrs:{label:"tips"}},[i("span",[t._v("允许退款后钱会退回对方账户,请确认您已经收到退货")])]),t._v(" "),i("el-form-item",{attrs:{label:"操作"}},[i("el-radio",{attrs:{label:"0"},model:{value:t.refundForm.type,callback:function(e){t.$set(t.refundForm,"type",e)},expression:"refundForm.type"}},[t._v("拒绝退款")]),t._v(" "),i("el-radio",{attrs:{label:"1"},model:{value:t.refundForm.type,callback:function(e){t.$set(t.refundForm,"type",e)},expression:"refundForm.type"}},[t._v("允许退款")])],1)],1),t._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.refundDialogVisible=!1}}},[t._v("取消")]),t._v(" "),i("el-button",{attrs:{disabled:t.refundSubmiting,type:"primary"},on:{click:t.confirmRefund}},[t._v("确定")])],1)],1)],1)},[],!1,null,null,null);v.options.__file="order.vue";e.default=v.exports}}]);