chunk-2136.b35745cc.js 15 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2136"],{"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;a<i.skuList.length;a++){var o=i.skuList[a];e.downData.unit=o.unit,e.downData.num=o.num,e.downData.specifications=o.title,e.downData.barcode=o.barCode,e.downData.name=o.spuTitle;var n=r()({},e.downData);e.excelDataList.push(n)}e.handleDownload(e.excelDataList),e.excelDataList=[]})},downExcelBtn:function(){var t=this;this.downloadLoading=!0,function(t){return Object(l.a)({method:"post",params:n()({_gp:"admin.order",_mt:"queryToExcel"},t)})}(r()({},{status:this.downData.status,gmtStart:this.downData.gmtStart.getTime(),gmtEnd:this.downData.gmtEnd.getTime()})).then(function(e){null==e.data.data&&t.$notify.error({title:"失败",message:"没有信息可以打印"});for(var i=e.data.data,a=0;a<i.length;a++){var o=i[a];t.downData.address=o.province+o.city+o.county+o.address;for(var n=0;n<o.skuList.length;n++){var l=o.skuList[n];t.downData.unit=l.unit,t.downData.num=l.num,t.downData.specifications=l.title,t.downData.barcode=l.barCode,t.downData.name=l.spuTitle;var s=r()({},t.downData);t.excelDataList.push(s)}}t.handleDownload(t.excelDataList),t.excelDataList=[],t.downloadLoading=!1}).catch(function(e){t.downloadLoading=!1,t.$notify.error({title:"失败",message:e.data.errmsg})})},handleDownload:function(t){Promise.all([i.e("chunk-04d5"),i.e("chunk-17d0")]).then(i.bind(null,"S/jZ")).then(function(e){e.export_json_to_excel2(["商品编码","国际条码","商品名称","规格","单位","包装系数","配送数量","件数","配送机构","备注","配送规格","零售价"],t,["productCode","barcode","name","specifications","unit","coefficient","num","num","address","note","deliveryLine","retailPrice"],"订单信息")})}}},h=(i("HT/P"),i("KHd+")),v=Object(h.a)(f,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"app-container"},[i("div",{staticClass:"filter-container"},[i("el-input",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{clearable:"",placeholder:"请输入订单编号"},model:{value:t.listQuery.orderNo,callback:function(e){t.$set(t.listQuery,"orderNo",e)},expression:"listQuery.orderNo"}}),t._v(" "),i("el-select",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{placeholder:"请选择订单状态"},model:{value:t.listQuery.status,callback:function(e){t.$set(t.listQuery,"status",e)},expression:"listQuery.status"}},t._l(t.statusMap,function(t,e){return i("el-option",{key:t,attrs:{label:t,value:e}})})),t._v(" "),i("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["operation:order:list"],expression:"['operation:order:list']"}],staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.handleFilter}},[t._v("查找")]),t._v("\n       \n "),i("br"),t._v(" "),i("el-date-picker",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{type:"datetime","default-time":"00:00:00",placeholder:"选择开始日期"},model:{value:t.downData.gmtStart,callback:function(e){t.$set(t.downData,"gmtStart",e)},expression:"downData.gmtStart"}}),t._v("\n 至\n "),i("el-date-picker",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{type:"datetime","default-time":"00:00:00",placeholder:"选择结束日期"},model:{value:t.downData.gmtEnd,callback:function(e){t.$set(t.downData,"gmtEnd",e)},expression:"downData.gmtEnd"}}),t._v(" "),i("el-select",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{placeholder:"待出库"},model:{value:t.downData.status,callback:function(e){t.$set(t.downData,"status",e)},expression:"downData.status"}},t._l(t.statusMap,function(t,e){return i("el-option",{key:t,attrs:{label:t,value:e}})})),t._v(" "),i("el-button",{staticClass:"filter-item",attrs:{loading:t.downloadLoading,type:"primary",icon:"el-icon-download"},on:{click:t.downExcelBtn}},[t._v("导出")])],1),t._v(" "),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.list,size:"small","element-loading-text":"正在查询中。。。",border:"",fit:"","highlight-current-row":""}},[i("el-table-column",{attrs:{align:"center",width:"180",label:"订单编号",prop:"orderNo"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",width:"80",label:"用户ID",prop:"userId"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",width:"120",label:"订单状态",prop:"status"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-tag",[t._v(t._s(t._f("orderStatusFilter")(e.row.status)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{align:"center",width:"110",label:"支付渠道",prop:"payChannel"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-tag",[t._v(t._s(t._f("payChannelFilter")(e.row.payChannel)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{align:"center",width:"100",label:"订单金额",prop:"actualPrice"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("¥ "+t._s(e.row.actualPrice/100))]}}])}),t._v(" "),i("el-table-column",{attrs:{align:"center",width:"140",label:"创建时间",prop:"gmtCreate"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t._f("formatTime")(e.row.gmtCreate)))]}}])}),t._v(" "),i("el-table-column",{attrs:{align:"center",width:"140",label:"物流渠道",prop:"shipCode"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-tag",[t._v(t._s(t._f("shipCodeFilter")(e.row.shipCode)))])]}}])}),t._v(" "),i("el-table-column",{attrs:{align:"center",width:"200",label:"物流单号",prop:"shipCode"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",width:"200",label:"备注",prop:"mono"}}),t._v(" "),i("el-table-column",{attrs:{align:"center",label:"操作",width:"300","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["operation:order:detail"],expression:"['operation:order:detail']"}],attrs:{type:"primary",size:"mini"},on:{click:function(i){t.handleDetail(e.row)}}},[t._v("详情")]),t._v(" "),20===e.row.status?i("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["operation:order:detail"],expression:"['operation:order:detail']"}],attrs:{type:"primary",size:"mini"},on:{click:function(i){t.downOrderExcelBtn(e.row)}}},[t._v("配送单")]):t._e(),t._v(" "),20===e.row.status?i("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["operation:order:ship"],expression:"['operation:order:ship']"}],attrs:{type:"primary",size:"mini"},on:{click:function(i){t.handleShip(e.row)}}},[t._v("发货")]):t._e(),t._v(" "),60===e.row.status?i("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["operation:order:refund"],expression:"['operation:order:refund']"}],attrs:{type:"primary",size:"mini"},on:{click:function(i){t.handleRefund(e.row)}}},[t._v("退款")]):t._e()]}}])})],1),t._v(" "),i("pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,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}}]);