chunk-05e86406.cb5db50f.js 73 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-05e86406"],{"539f":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-form",{ref:"form",attrs:{model:e.form,rules:e.addressRules,"label-width":"80px"}},[r("el-form-item",{attrs:{label:"收货人:",prop:"username"}},[r("el-input",{attrs:{placeholder:"收货人"},model:{value:e.form.username,callback:function(t){e.$set(e.form,"username",t)},expression:"form.username"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"手机号:",prop:"mobile"}},[r("el-input",{attrs:{placeholder:"手机号",minlength:"11",maxlength:"11","show-word-limit":""},model:{value:e.form.mobile,callback:function(t){e.$set(e.form,"mobile",t)},expression:"form.mobile"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"省市区:",prop:"address"}},[r("VDistpicker",{attrs:{province:e.address.province,city:e.address.city,area:e.address.area},on:{province:e.province,city:e.city,area:e.area}})],1),e._v(" "),r("el-form-item",{attrs:{label:"地址:",prop:"address"}},[r("el-input",{attrs:{type:"textarea",placeholder:"地址",maxlength:"50","show-word-limit":""},model:{value:e.form.address,callback:function(t){e.$set(e.form,"address",t)},expression:"form.address"}})],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{size:"mini"},on:{click:e.handleCancel}},[e._v("\n 取消\n ")]),e._v(" "),r("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.handleSubmit}},[e._v("\n 修改\n ")])],1)],1)],1)},s=[],i=(r("96cf"),r("1da1")),n=r("784f"),o=r.n(n),l=r("09d8"),c={components:{VDistpicker:o.a},props:{form:{type:Object,default:function(){return{id:"",username:"",mobile:"",address:""}}}},data:function(){return{addressRules:{username:[{required:!0,message:"请输入收货人姓名",trigger:"blur"}],mobile:[{required:!0,message:"请输入收货人手机号",trigger:"blur"},{min:11,max:11,message:"手机号格式不正确",trigger:"blur"}],address:[{required:!0,message:"请输入收货人地址",trigger:"blur"},{max:50,message:"地址长度超出",trigger:"blur"}]},address:{province:this.form.province,city:this.form.city,area:this.form.town}}},methods:{province:function(e){var t=e.value;this.address.province=t},city:function(e){var t=e.value;this.address.city=t},area:function(e){var t=e.value;this.address.area=t},handleCancel:function(){this.$refs.form.resetFields(),this.$emit("update:cancel")},handleSubmit:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return!1;var r=e.form,a=r.id,s=r.username,i=r.mobile,n=r.address,o=e.address,l=o.province,c=o.city,d=o.area;e.updateOrderAddress({address_id:a,province:l,city:c,town:d,username:s,mobile:i,address:n})}))},updateOrderAddress:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t){var r,a,s,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(l["h"])(t);case 2:r=e.sent;try{a=r.message,s=r.code,200===s?(this.$message.success(a),this.$refs.form.resetFields(),this.$emit("update:success")):this.$message.error(a)}catch(n){i=r.message?r.message:n.message,i=n.message?n.message:"请求失败",this.$message.error(i)}case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}},d=c,m=r("2877"),u=Object(m["a"])(d,a,s,!1,null,"5f5dd381",null);t["default"]=u.exports},a7c0:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container",attrs:{id:"order_list"}},[r("div",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:e.loadingFull,expression:"loadingFull",modifiers:{fullscreen:!0,lock:!0}}]}),e._v(" "),[r("el-tabs",{on:{"tab-click":e.handleTagToggle},model:{value:e.listQuery.order_status,callback:function(t){e.$set(e.listQuery,"order_status",t)},expression:"listQuery.order_status"}},[r("el-tab-pane",{attrs:{name:"-1"}},[r("span",{attrs:{slot:"label"},slot:"label"},[e._v("全部订单 "),r("span",{staticClass:"num"},[e._v(e._s(e.tableTotal))])])]),e._v(" "),r("el-tab-pane",{attrs:{name:"6"}},[r("span",{attrs:{slot:"label"},slot:"label"},[e._v("待付款 "),r("span",{staticClass:"num"},[e._v(e._s(e.num_2))])])]),e._v(" "),r("el-tab-pane",{attrs:{name:"0"}},[r("span",{attrs:{slot:"label"},slot:"label"},[e._v("待订单审核 "),r("span",{staticClass:"num"},[e._v(e._s(e.num_3))])])]),e._v(" "),r("el-tab-pane",{attrs:{name:"1"}},[r("span",{attrs:{slot:"label"},slot:"label"},[e._v("待财务审核 "),r("span",{staticClass:"num"},[e._v(e._s(e.num_4))])])]),e._v(" "),r("el-tab-pane",{attrs:{name:"2"}},[r("span",{attrs:{slot:"label"},slot:"label"},[e._v("待发货审核 "),r("span",{staticClass:"num"},[e._v(e._s(e.num_5))])])]),e._v(" "),r("el-tab-pane",{attrs:{name:"3"}},[r("span",{attrs:{slot:"label"},slot:"label"},[e._v("待收货 "),r("span",{staticClass:"num"},[e._v(e._s(e.num_6))])])]),e._v(" "),r("el-tab-pane",{attrs:{name:"4"}},[r("span",{attrs:{slot:"label"},slot:"label"},[e._v("已完成 "),r("span",{staticClass:"num"},[e._v(e._s(e.num_7))])])]),e._v(" "),r("el-tab-pane",{attrs:{name:"5"}},[r("span",{attrs:{slot:"label"},slot:"label"},[e._v("已作废 "),r("span",{staticClass:"num"},[e._v(e._s(e.num_8))])])])],1)],e._v(" "),r("div",{staticClass:"search-container"},[r("div",{staticClass:"search-flex"},[e.highSearchFlag?r("div",[r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.resetSeniorSearch(),e.highSearchFlag=!1}}},[e._v("清除搜索")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialog.export=!0}}},[e._v("继续搜索")])],1):r("div",[r("el-date-picker",{staticClass:"filter-item",staticStyle:{width:"400px"},attrs:{"value-format":"yyyy-MM-dd HH:mm",format:"yyyy-MM-dd HH:mm",type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.listQuery.time,callback:function(t){e.$set(e.listQuery,"time",t)},expression:"listQuery.time"}}),e._v(" "),r("el-input",{staticClass:"filter-item filter-input",staticStyle:{display:"inline-block",width:"240px"},attrs:{placeholder:"订单编号"},nativeOn:{keydown:function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.listQuery.page_index=1,e.getList()}},model:{value:e.listQuery.order_no,callback:function(t){e.$set(e.listQuery,"order_no",t)},expression:"listQuery.order_no"}}),e._v(" "),r("el-input",{staticClass:"filter-item filter-input",staticStyle:{display:"inline-block",width:"300px"},attrs:{placeholder:"下单人昵称/姓名/手机号"},nativeOn:{keydown:function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.listQuery.page_index=1,e.getList()}},model:{value:e.listQuery.search_name,callback:function(t){e.$set(e.listQuery,"search_name",t)},expression:"listQuery.search_name"}}),e._v(" "),r("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:function(t){e.listQuery.page_index=1,e.getList()}}},[e._v("搜索")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.clearSearch}},[e._v("清除")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialog.export=!0}}},[e._v("高级搜索")])],1),e._v(" "),r("el-button",{directives:[{name:"permit",rawName:"v-permit",value:0,expression:"0"}],staticClass:"filter-item",attrs:{"roles-permit":e.roles,type:"primary",icon:"el-icon-edit"},on:{click:e.handleAddOrder}},[e._v("代下单")])],1),e._v(" "),r("div",[r("el-button",{directives:[{name:"permit",rawName:"v-permit",value:0,expression:"0"}],staticClass:"bg1",attrs:{"roles-permit":e.roles,type:"primary"},on:{click:function(t){return e.machExamine(0)}}},[e._v("订单审核")]),e._v(" "),r("el-button",{directives:[{name:"permit",rawName:"v-permit",value:1,expression:"1"}],staticClass:"bg2",attrs:{"roles-permit":e.roles,type:"primary"},on:{click:function(t){return e.machExamine(1)}}},[e._v("财务审核")]),e._v(" "),r("el-button",{directives:[{name:"permit",rawName:"v-permit",value:2,expression:"2"}],staticClass:"bg3",attrs:{"roles-permit":e.roles,type:"primary"},on:{click:function(t){return e.machExamine(2)}}},[e._v("发货审核")]),e._v(" "),r("el-button",{directives:[{name:"permit",rawName:"v-permit",value:3,expression:"3"}],attrs:{"roles-permit":e.roles,type:"primary"},on:{click:e.showMergeOrder}},[e._v("合并订单")]),e._v(" "),r("el-popover",{attrs:{placement:"bottom",width:"230",trigger:"hover"}},[r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialog.import_wuliu=!0}}},[e._v("导入单号")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialog.import_wuliunew=!0}}},[e._v("修改单号")]),e._v(" "),r("el-button",{directives:[{name:"permit",rawName:"v-permit",value:2,expression:"2"}],attrs:{slot:"reference","roles-permit":e.roles,type:"primary",icon:"el-icon-upload2"},on:{click:function(t){e.dialog.lead_order=!0}},slot:"reference"},[e._v("导入")])],1),e._v(" "),r("el-popover",{attrs:{placement:"bottom",width:"330",trigger:"hover"}},[r("el-button",{attrs:{type:"primary"},on:{click:e.exportOrder}},[e._v("订单明细")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.exporOrdertOrder}},[e._v("拆单明细")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.exportMoney}},[e._v("订单金额")]),e._v(" "),r("el-button",{directives:[{name:"permit",rawName:"v-permit",value:[0,1,2],expression:"[0,1,2]"}],attrs:{slot:"reference","roles-permit":e.roles,type:"primary",icon:"el-icon-download"},on:{click:function(t){e.dialog.export_order=!0}},slot:"reference"},[e._v("导出")])],1)],1)]),e._v(" "),r("el-dialog",{attrs:{title:"合并订单",visible:e.mergeOrderVis,"close-on-click-modal":!1,"before-close":e.cancelMergeOrderInfo},on:{"update:visible":function(t){e.mergeOrderVis=t}}},[r("el-form",{attrs:{"label-width":"80px"}},[r("el-form-item",{attrs:{label:"订单1:"}},[r("el-input",{attrs:{type:"text",placeholder:"请输入待合并的订单1"},model:{value:e.mergeOrderForm.master_num,callback:function(t){e.$set(e.mergeOrderForm,"master_num",t)},expression:"mergeOrderForm.master_num"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"订单2:"}},[r("el-input",{attrs:{type:"text",placeholder:"请输入待合并的订单2"},model:{value:e.mergeOrderForm.slave_num,callback:function(t){e.$set(e.mergeOrderForm,"slave_num",t)},expression:"mergeOrderForm.slave_num"}})],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.getMergeOrderInfo}},[e._v("合并")]),e._v(" "),r("el-button",{on:{click:e.cancelMergeOrderInfo}},[e._v("取消")])],1)],1)],1),e._v(" "),r("el-dialog",{attrs:{title:"确认合并",visible:e.sureMergeVis,"close-on-click-modal":!1,"before-close":e.cancelToMergeOrder},on:{"update:visible":function(t){e.sureMergeVis=t}}},[e.mergeOrdersInfo.order_master&&e.mergeOrdersInfo.order_slave?r("el-form",{attrs:{"label-width":"100px"}},[r("el-form-item",{attrs:{label:"订单详情:"}},[r("div",{staticClass:"merger_order_container"},[r("div",{staticClass:"flex"},[r("p",{staticClass:"order_nav"},[e._v("订单号")]),e._v(" "),r("div",{staticClass:"order_main"},[r("p",[e._v(e._s(e.mergeOrdersInfo.order_master.order_num))])]),e._v(" "),r("div",{staticClass:"order_main"},[r("p",[e._v(e._s(e.mergeOrdersInfo.order_slave.order_num))])])]),e._v(" "),r("div",{staticClass:"flex"},[r("p",{staticClass:"order_nav"},[e._v("收货地址")]),e._v(" "),r("div",{staticClass:"order_main"},[r("p",[e._v(e._s(e.mergeOrdersInfo.order_master.get_address.username||""))]),e._v(" "),r("p",[e._v(e._s(e.mergeOrdersInfo.order_master.get_address.mobile||""))]),e._v(" "),r("p",[e._v("\n "+e._s(""+(e.mergeOrdersInfo.order_master.get_address.province||""))+"\n "+e._s(""+(e.mergeOrdersInfo.order_master.get_address.city||""))+"\n "+e._s(""+(e.mergeOrdersInfo.order_master.get_address.town||""))+"\n "+e._s(""+(e.mergeOrdersInfo.order_master.get_address.address||""))+"\n ")])]),e._v(" "),r("div",{staticClass:"order_main"},[r("p",[e._v(e._s(e.mergeOrdersInfo.order_slave.get_address.username||""))]),e._v(" "),r("p",[e._v(e._s(e.mergeOrdersInfo.order_slave.get_address.mobile||""))]),e._v(" "),r("p",[e._v("\n "+e._s(""+(e.mergeOrdersInfo.order_slave.get_address.province||""))+"\n "+e._s(""+(e.mergeOrdersInfo.order_slave.get_address.city||""))+"\n "+e._s(""+(e.mergeOrdersInfo.order_slave.get_address.town||""))+"\n "+e._s(""+(e.mergeOrdersInfo.order_slave.get_address.address||""))+"\n ")])])]),e._v(" "),r("div",{staticClass:"flex"},[r("p",{staticClass:"order_nav"},[e._v("订单详情")]),e._v(" "),r("div",{staticClass:"order_main"},e._l(e.mergeOrdersInfo.order_master.goods_detail,(function(t){return r("p",{key:t.id},[e._v("\n "+e._s(t.name)+"-("+e._s(t.size)+")-("+e._s(t.num)+e._s(t.unit)+")\n ")])})),0),e._v(" "),r("div",{staticClass:"order_main"},e._l(e.mergeOrdersInfo.order_slave.goods_detail,(function(t){return r("p",{key:t.id},[e._v("\n "+e._s(t.name)+"-("+e._s(t.size)+")-("+e._s(t.num)+e._s(t.unit)+")\n ")])})),0)]),e._v(" "),r("div",{staticClass:"flex"},[r("p",{staticClass:"order_nav"},[e._v("下单时间")]),e._v(" "),r("div",{staticClass:"order_main"},[r("p",[e._v(e._s(e.mergeOrdersInfo.order_master.created_at))])]),e._v(" "),r("div",{staticClass:"order_main"},[r("p",[e._v(e._s(e.mergeOrdersInfo.order_slave.created_at))])])])])]),e._v(" "),r("el-form-item",{attrs:{label:"设置主订单:"}},[r("el-radio-group",{model:{value:e.mergeOrderForm.main,callback:function(t){e.$set(e.mergeOrderForm,"main",t)},expression:"mergeOrderForm.main"}},[r("el-radio",{attrs:{label:e.mergeOrdersInfo.order_master.order_num}},[e._v(e._s(e.mergeOrdersInfo.order_master.order_num))]),e._v(" "),r("el-radio",{attrs:{label:e.mergeOrdersInfo.order_slave.order_num}},[e._v(e._s(e.mergeOrdersInfo.order_slave.order_num))])],1),e._v(" "),r("div",[r("i",{staticClass:"el-icon-warning"},[e._v("合并结果将保留主订单")])])],1),e._v(" "),r("el-form-item",{attrs:{label:"备注:"}},[r("el-input",{attrs:{type:"textarea",autosize:""},model:{value:e.mergeOrderForm.remark,callback:function(t){e.$set(e.mergeOrderForm,"remark",t)},expression:"mergeOrderForm.remark"}})],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.submitToMergeOrder}},[e._v("合并订单")]),e._v(" "),r("el-button",{on:{click:e.cancelToMergeOrder}},[e._v("取消")])],1)],1):e._e()],1),e._v(" "),r("div",{staticClass:"table-wrapper"},[r("el-table",{ref:"listTable",staticClass:"tableBorder table-fixed",attrs:{id:"table",height:e.tableHeight+"px",data:e.table,"header-cell-style":{background:"#f8fbfc"},border:"",stripe:""},on:{"selection-change":e.orderMulSelect}},[r("el-table-column",{attrs:{type:"selection",width:"50",align:"center","show-overflow-tooltip":!0}}),e._v(" "),r("el-table-column",{attrs:{prop:"order_num",label:"订单编号",width:"210"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[r("span",{staticStyle:{cursor:"pointer",color:"#1890FF"},on:{click:function(t){return e.toOrderWxamine(a)}}},[e._v(e._s(a.order_num))]),e._v(" "),r("br"),e._v(" "),a.get_store?r("span",{staticClass:"tag sub-tag"},[e._v(e._s(a.get_store.name.slice(0,2)))]):e._e(),e._v(" "),1===a.order_type?r("p",{staticClass:"tag sub-tag"},[e._v("代下单")]):e._e(),e._v(" "),1===a.is_back?r("p",{staticClass:"tag return-tag"},[e._v("退回")]):e._e(),e._v(" "),1===a.is_merge?r("p",{staticClass:"tag sub-tag"},[e._v("合并")]):e._e()]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"created_at",align:"center",label:"下单时间",width:"160","show-overflow-tooltip":!0}}),e._v(" "),r("el-table-column",{attrs:{label:"所属政委",width:"150",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row.get_user;return[e._v("\n "+e._s(r&&r.warea&&r.warea.admin_name)+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"get_user",label:"下单人昵称",align:"center",width:"150","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[e._v(e._s(r.get_user&&r.get_user.nickname))]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"get_user",label:"下单人姓名",align:"center",width:"120","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[e._v(e._s(r.get_user&&r.get_user.realname))]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"status",align:"center",label:"订单状态",width:"110","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row,s=a.is_deleted,i=a.status;return[1===s?r("el-tag",{attrs:{type:"info"}},[e._v("已作废")]):r("el-tag",{staticStyle:{color:"#ffffff"},attrs:{color:e.orderStatus(i).color}},[e._v(e._s(e.orderStatus(i).name))])]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"pay_status",align:"center",label:"支付状态",width:"90","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[r("span",{style:"color: "+e.payStatus(a.pay_status).color},[e._v(e._s(e.payStatus(a.pay_status).name))])]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"total",label:"数量合计",align:"center",width:"80","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[r("span",{staticStyle:{cursor:"pointer",color:"#1890FF"},on:{click:function(t){return e.toDialogOrderWxamine(a)}}},[e._v(e._s(a.total))])]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"money",label:"订单总额",align:"center",width:"120","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[e._v(e._s("¥"+r.money))]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"get_address",label:"收货人",align:"center",width:"120","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[e._v(e._s(r.get_address&&r.get_address.username))]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"get_address",label:"联系方式",align:"center",width:"120","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[e._v(e._s(r.get_address&&r.get_address.mobile))]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"get_address",label:"收货地址",align:"center",width:"200","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row.get_address;return[e._v(e._s(r&&r.province+r.city+r.town+r.address))]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"remark",label:"订单备注",align:"center",width:"160","show-overflow-tooltip":!0}}),e._v(" "),r("el-table-column",{attrs:{label:"操作",width:"50",align:"center",fixed:"right","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[r("el-popover",{attrs:{placement:"left",width:"60",trigger:"hover"}},[r("div",{staticClass:"popover"},[r("i",{staticClass:"el-icon-document cursor",on:{click:function(t){return e.toOrderWxamine(a)}}},[e._v("订单详情")]),e._v(" "),2===a.status?r("i",{directives:[{name:"permit",rawName:"v-permit",value:2,expression:"2"}],staticClass:"el-icon-s-promotion cursor",attrs:{"roles-permit":e.roles},on:{click:function(t){return e.handleOrderSpend(a)}}},[e._v("发货")]):e._e(),e._v(" "),a.express?r("i",{staticClass:"el-icon-truck cursor",on:{click:function(t){return e.showExpress(a)}}},[e._v("物流详情")]):e._e(),e._v(" "),1!==a.status||1!==a.pay_status&&0!==a.pay_status?e._e():r("i",{directives:[{name:"permit",rawName:"v-permit",value:1,expression:"1"}],staticClass:"el-icon-s-finance cursor",attrs:{"roles-permit":e.roles},on:{click:function(t){return e.accountBalance(a)}}},[e._v("添加收款记录")]),e._v(" "),r("i",{staticClass:"el-icon-s-promotion cursor",on:{click:function(t){return e.handleStoreOrder(a)}}},[e._v("体验店订单")]),e._v(" "),r("i",{staticClass:"el-icon-s-release cursor",on:{click:function(t){return e.cancelStoreOrder(a)}}},[e._v("取消体验店订单")]),e._v(" "),1!==a.is_deleted&&0===a.status?r("i",{staticClass:"el-icon-delete-solid cursor",on:{click:function(t){return e.setVoidOrder(a)}}},[e._v("作废订单")]):e._e()]),e._v(" "),r("i",{staticClass:"el-icon-more cursor",attrs:{slot:"reference"},slot:"reference"})])]}}])},[r("template",{slot:"header"},[r("i",{staticClass:"el-icon-s-operation",staticStyle:{transform:"rotate(90deg)"}})])],2)],1)],1),e._v(" "),e.highSearchFlag?r("pagination",{attrs:{total:e.exportForm.total,limit:e.exportForm.page_size,page:e.exportForm.page_index},on:{pagination:e.SeniorChangePagination,"update:limit":e.SeniorChangePagination}}):r("pagination",{attrs:{total:e.tableTotal,limit:e.listQuery.page_size,page:e.listQuery.page_index},on:{pagination:e.changePagination,"update:limit":e.changePagination}}),e._v(" "),r("el-dialog",{staticClass:"dialog_remark dialog_void",attrs:{title:"订单作废确认",visible:e.visible.void,"show-close":!1,"close-on-click-modal":!1,width:"520px"},on:{"update:visible":function(t){return e.$set(e.visible,"void",t)}}},[r("p",[e._v("确认将订货单"),r("span",{staticClass:"red"},[e._v(e._s(e.voidOrderInfo.order_num))]),e._v("作废 ? 订单作废后状态不可回退 ,"),r("span",{staticClass:"red"},[e._v("如有关联的出库单将一并作废,相应的库存将退回原有仓库。")]),e._v(" 如确定作废,请填写作废原因 :")]),e._v(" "),r("el-form",[r("el-form-item",{attrs:{label:"常用作废原因: "}},[r("el-select",{model:{value:e.voidTypeId,callback:function(t){e.voidTypeId=t},expression:"voidTypeId"}},e._l(e.voidList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.content,value:e.id}})})),1),e._v(" "),r("el-popover",{attrs:{placement:"bottom-end"},model:{value:e.visible.add_void,callback:function(t){e.$set(e.visible,"add_void",t)},expression:"visible.add_void"}},[r("el-input",{attrs:{type:"textarea",resize:"none",autosize:{minRows:6,maxRows:8},placeholder:"请添写常用作废原因"},model:{value:e.addVoidContent,callback:function(t){e.addVoidContent=t},expression:"addVoidContent"}}),e._v(" "),r("div",{staticStyle:{float:"right","margin-top":"15px"}},[r("el-button",{attrs:{plain:"",size:"mini"},on:{click:e.resetAddVoid}},[e._v("取消")]),e._v(" "),r("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.submitAddVoid}},[e._v("添加")])],1),e._v(" "),r("template",{slot:"reference"},[r("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"text"}},[e._v("添加其他常用原因")])],1)],2)],1),e._v(" "),r("el-form-item",{attrs:{label:"其他作废原因: "}},[r("el-input",{attrs:{type:"textarea",resize:"none",autosize:{minRows:6,maxRows:8}},model:{value:e.remark.void,callback:function(t){e.$set(e.remark,"void",t)},expression:"remark.void"}})],1)],1),e._v(" "),r("div",{staticClass:"dialog_btn_box"},[r("el-button",{attrs:{size:"small"},on:{click:function(t){e.visible.void=!1}}},[e._v("取消")]),e._v(" "),r("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.submitOrderVoid}},[e._v("确定")])],1)],1),e._v(" "),r("el-dialog",{attrs:{title:"修改收货信息",visible:e.visible.address},on:{"update:visible":function(t){return e.$set(e.visible,"address",t)}}},[r("change-address",{attrs:{form:e.update.address},on:{"update:cancel":function(t){e.visible.address=!1},"update:success":function(){e.visible.address=!1,e.getList()}}})],1),e._v(" "),r("el-drawer",{attrs:{title:"订单: "+e.orderInfo.ordersn,visible:e.visible.goods,direction:"rtl"},on:{"update:visible":function(t){return e.$set(e.visible,"goods",t)}}},[e.visible.goods?r("div",{staticClass:"orderInfo"},[r("p",[e._v("收货信息")]),e._v(" "),r("el-form",{attrs:{"label-width":"100px"}},[r("el-form-item",{attrs:{label:"收货人姓名:"}},[e._v(e._s(e.orderInfo.address.username))]),e._v(" "),r("el-form-item",{attrs:{label:"收货人手机:"}},[e._v(e._s(e.orderInfo.address.mobile))]),e._v(" "),r("el-form-item",{attrs:{label:"收货人地址:"}},[e._v(e._s(e.orderInfo.address.address))]),e._v(" "),r("el-form-item",{attrs:{label:"订单备注:"}},[e._v(e._s(e.orderInfo.desc?e.orderInfo.desc:"代理未填写备注"))]),e._v(" "),r("el-form-item",{attrs:{label:"下单时间:"}},[e._v(e._s(e.orderInfo.created_at))]),e._v(" "),r("el-form-item",{attrs:{label:"当前订单状态:"}},[e._v(e._s(e.orderStatus(e.orderInfo.status).name))])],1),e._v(" "),r("p",[e._v("商品详情:")]),e._v(" "),r("ul",{staticClass:"orderGoodsList"},e._l(e.orderInfo.ordergoods,(function(t){return r("li",{key:t.id,staticClass:"orderGoodsItem"},[r("div",{staticClass:"orderGoodsHeader"},[r("el-image",{staticStyle:{width:"60px",height:"60px","margin-right":"15px"},attrs:{src:t.imgurl,fit:"cover"}}),e._v(" "),r("p",[e._v(e._s(t.goodsname))])],1),e._v(" "),e._l(t.goodssku,(function(t,a){return r("div",{key:a,staticClass:"orderGoodsSku"},[r("p",[e._v(e._s(t.type+"+"+t.size))]),e._v(" "),r("p",[e._v("数量: "+e._s(t.num)+"件")]),e._v(" "),r("p",[e._v("总价: "+e._s(Number(t.price)*Number(t.num)))])])}))],2)})),0)],1):e._e()]),e._v(" "),r("el-dialog",{staticClass:"dialog_spending",attrs:{title:"发货",visible:e.dialog.spending,"show-close":!1,"close-on-click-modal":!1},on:{"update:visible":function(t){return e.$set(e.dialog,"spending",t)}}},[r("el-form",{ref:"spendform",attrs:{"label-width":"80px",model:e.spendForm,rules:e.spendRules}},[r("el-form-item",{attrs:{label:"物流日期",prop:"track_time"}},[r("el-date-picker",{attrs:{type:"datetime",placeholder:"选择日期时间","value-format":"yyyy-MM-dd"},model:{value:e.spendForm.track_time,callback:function(t){e.$set(e.spendForm,"track_time",t)},expression:"spendForm.track_time"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"物流公司",prop:"track_company"}},[e.toggle.company?r("el-select",{attrs:{placeholder:"请选择"},model:{value:e.spendForm.track_company,callback:function(t){e.$set(e.spendForm,"track_company",t)},expression:"spendForm.track_company"}},[r("el-option",{attrs:{label:"德邦物流",value:"德邦物流"}}),e._v(" "),r("el-option",{attrs:{label:"中通快递",value:"中通快递"}}),e._v(" "),r("el-option",{attrs:{label:"中国邮政快递",value:"中国邮政快递"}})],1):r("el-input",{attrs:{type:"text"},model:{value:e.spendForm.track_company,callback:function(t){e.$set(e.spendForm,"track_company",t)},expression:"spendForm.track_company"}}),e._v(" "),r("br"),e._v(" "),e.toggle.company?r("span",{staticClass:"handCompony",on:{click:function(t){e.toggle.company=!1}}},[e._v("手动填写")]):r("span",{staticClass:"handCompony",on:{click:function(t){e.toggle.company=!0}}},[e._v("选择公司")])],1),e._v(" "),r("el-form-item",{attrs:{label:"物流单号",prop:"track_number"}},[r("el-input",{attrs:{type:"text"},model:{value:e.spendForm.track_number,callback:function(t){e.$set(e.spendForm,"track_number",t)},expression:"spendForm.track_number"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"物流备注"}},[r("el-input",{attrs:{type:"textarea"},model:{value:e.spendForm.track_remark,callback:function(t){e.$set(e.spendForm,"track_remark",t)},expression:"spendForm.track_remark"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"自动收货",prop:"day"}},[r("el-input",{attrs:{type:"number",min:"1"},model:{value:e.spendForm.day,callback:function(t){e.$set(e.spendForm,"day",t)},expression:"spendForm.day"}},[r("span",{attrs:{slot:"append"},slot:"append"},[e._v("天")])])],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialog.spending=!1}}},[e._v("取消")]),e._v(" "),r("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.submitOrderSpend}},[e._v("确定")])],1)],1)],1),e._v(" "),r("el-dialog",{staticClass:"dialog_export",attrs:{title:"高级搜索",visible:e.dialog.export,"show-close":!1,"close-on-click-modal":!1,top:"50px"},on:{"update:visible":function(t){return e.$set(e.dialog,"export",t)}}},[r("el-form",{attrs:{"label-width":"80px"}},[r("el-form-item",{attrs:{label:"订单编号"}},[r("el-input",{staticStyle:{width:"400px"},attrs:{type:"text",placeholder:"请输入订货单号"},model:{value:e.exportForm.order_num,callback:function(t){e.$set(e.exportForm,"order_num",t)},expression:"exportForm.order_num"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"下单人"}},[r("el-input",{staticStyle:{width:"400px"},attrs:{type:"text",placeholder:"请输入下单人昵称/姓名/手机号"},model:{value:e.exportForm.name,callback:function(t){e.$set(e.exportForm,"name",t)},expression:"exportForm.name"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"下单时间"}},[r("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd HH:mm",format:"yyyy-MM-dd HH:mm",type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.exportForm.time,callback:function(t){e.$set(e.exportForm,"time",t)},expression:"exportForm.time"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"活动名称"}},[r("el-select",{staticStyle:{width:"400px"},model:{value:e.exportForm.activity_id,callback:function(t){e.$set(e.exportForm,"activity_id",t)},expression:"exportForm.activity_id"}},[r("el-option",{attrs:{label:"全部",value:""}}),e._v(" "),e._l(e.activitys,(function(e){return r("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})}))],2)],1),e._v(" "),r("el-form-item",{attrs:{label:"收货信息"}},[r("el-input",{staticStyle:{width:"400px"},attrs:{type:"text",placeholder:"收货人/收货电话"},model:{value:e.exportForm.address,callback:function(t){e.$set(e.exportForm,"address",t)},expression:"exportForm.address"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"收货地址"}},[r("VDistpicker",{attrs:{province:e.exportForm.provice,city:e.exportForm.city,area:e.exportForm.area},on:{province:function(t){return e.exportForm.provice=t.value},city:function(t){return e.exportForm.city=t.value},area:function(t){return e.exportForm.area=t.value}}})],1),e._v(" "),r("el-form-item",{attrs:{label:"商品信息"}},[r("el-input",{staticStyle:{width:"400px"},attrs:{type:"text",placeholder:"输入商品名称"},model:{value:e.exportForm.good,callback:function(t){e.$set(e.exportForm,"good",t)},expression:"exportForm.good"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"订单状态"}},[r("div",{staticStyle:{display:"flex"}},[r("div",{staticStyle:{"margin-right":"20px"}},[r("el-checkbox",{attrs:{indeterminate:e.isIndeterminate},on:{change:e.handleCheckAllChange},model:{value:e.checkAll,callback:function(t){e.checkAll=t},expression:"checkAll"}},[e._v("全选")])],1),e._v(" "),r("el-checkbox-group",{on:{change:e.handleCheckedCitiesChange},model:{value:e.exportForm.order_status,callback:function(t){e.$set(e.exportForm,"order_status",t)},expression:"exportForm.order_status"}},e._l(e.statusTree,(function(t,a){return r("el-checkbox",{key:a,attrs:{value:t.id,label:t.id}},[e._v(e._s(t.label))])})),1)],1)]),e._v(" "),r("el-form-item",{attrs:{label:"支付状态"}},[r("div",{staticStyle:{display:"flex"}},[r("div",{staticStyle:{"margin-right":"20px"}},[r("el-checkbox",{attrs:{indeterminate:e.isIndeterminates},on:{change:e.handleCheckAllChanges},model:{value:e.checkAlls,callback:function(t){e.checkAlls=t},expression:"checkAlls"}},[e._v("全选")])],1),e._v(" "),r("el-checkbox-group",{on:{change:e.handleCheckedCitiesChanges},model:{value:e.exportForm.pay_status,callback:function(t){e.$set(e.exportForm,"pay_status",t)},expression:"exportForm.pay_status"}},e._l(e.paystatusTree,(function(t,a){return r("el-checkbox",{key:a,attrs:{value:t.id,label:t.id}},[e._v(e._s(t.label))])})),1)],1)]),e._v(" "),r("el-form-item",{attrs:{label:"下单方式"}},[r("el-radio-group",{model:{value:e.exportForm.type,callback:function(t){e.$set(e.exportForm,"type",t)},expression:"exportForm.type"}},[r("el-radio",{attrs:{label:-1}},[e._v("全部")]),e._v(" "),r("el-radio",{attrs:{label:0}},[e._v("自主下单")]),e._v(" "),r("el-radio",{attrs:{label:1}},[e._v("代下单")])],1)],1),e._v(" "),r("el-form-item",[r("el-button",{on:{click:function(t){e.dialog.export=!1}}},[e._v("取消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.highSearchFlag=!0,e.submitExport()}}},[e._v("搜索")])],1)],1)],1),e._v(" "),r("el-dialog",{staticClass:"dialog_export",attrs:{title:"物流详情",visible:e.dialog.express,"show-close":!1,width:"80%",top:"66px"},on:{"update:visible":function(t){return e.$set(e.dialog,"express",t)}}},[r("iframe",{staticStyle:{width:"100%",height:"456px"},attrs:{src:e.express,frameborder:"0"}}),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialog.express=!1}}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialog.express=!1}}},[e._v("确 定")])],1)]),e._v(" "),r("el-dialog",{staticClass:"dialog_receive",attrs:{title:"添加收款记录",visible:e.dialog.receive,"show-close":!1,"close-on-click-modal":!1},on:{"update:visible":function(t){return e.$set(e.dialog,"receive",t)}}},[r("p",{staticClass:"title_1"},[e._v("待支付:"+e._s(e.parseMoney(e.addRechargeItem&&e.addRechargeItem.no_pay_money)))]),e._v(" "),r("div",{staticClass:"title_2"},[r("span",[e._v("订单金额:"+e._s(e.parseMoney(e.addRechargeItem&&e.addRechargeItem.money)))]),e._v(" "),r("span",[e._v("已付款:"+e._s(e.parseMoney(e.addRechargeItem&&e.addRechargeItem.pay_money)))]),e._v(" "),r("span",[e._v(e._s(e.addRechargeItem&&e.addRechargeItem.order_num))])]),e._v(" "),r("el-form",{ref:"rechargeform",attrs:{"label-width":"80px",model:e.rechargeForm,rules:e.rechargeRules}},[r("div",{staticClass:"pay_form"},[r("p",{staticClass:"fixedH2"},[e._v("账户余额")]),e._v(" "),r("div",{staticClass:"pay_from_body balance_body"},[r("el-form-item",{staticStyle:{width:"300px","margin-bottom":"0"},attrs:{label:"付款金额",prop:"money"}},[r("el-input",{attrs:{type:"text"},model:{value:e.rechargeForm.money,callback:function(t){e.$set(e.rechargeForm,"money",t)},expression:"rechargeForm.money"}})],1),e._v(" "),r("span",{staticClass:"balance"},[e._v("余额: "+e._s(e.parseMoney(e.agentBanlance)))])],1)]),e._v(" "),r("div",{staticClass:"pay_form"},[r("p",{staticClass:"fixedH2 morefixedH"},[e._v("线下付款")]),e._v(" "),r("div",{staticClass:"pay_from_body"},[r("el-form-item",{staticStyle:{width:"300px"},attrs:{label:"付款金额",prop:"p_money"}},[r("el-input",{attrs:{type:"text"},model:{value:e.rechargeForm.p_money,callback:function(t){e.$set(e.rechargeForm,"p_money",t)},expression:"rechargeForm.p_money"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"备注"}},[r("el-input",{staticStyle:{width:"300px"},attrs:{type:"textarea"},model:{value:e.rechargeForm.remark,callback:function(t){e.$set(e.rechargeForm,"remark",t)},expression:"rechargeForm.remark"}})],1)],1)]),e._v(" "),r("el-form-item",[r("el-button",{attrs:{size:"small"},on:{click:e.resetDialogRecharge}},[e._v("取消")]),e._v(" "),r("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.handleSubmitRecharge}},[e._v("确定")])],1)],1)],1),e._v(" "),r("el-dialog",{staticClass:"dialog_receive",attrs:{title:"选择体验店",visible:e.dialog.store,"show-close":!1,"close-on-click-modal":!1},on:{"update:visible":function(t){return e.$set(e.dialog,"store",t)}}},[e._l(e.storeList,(function(t){return r("el-radio",{key:t.id,attrs:{label:t.id},model:{value:e.storeOrder.store_id,callback:function(t){e.$set(e.storeOrder,"store_id",t)},expression:"storeOrder.store_id"}},[e._v(e._s(t.name))])})),e._v(" "),r("br"),e._v(" "),r("div",{staticStyle:{"margin-top":"15px"}},[r("el-button",{on:{click:e.resetStoreOrder}},[e._v("取消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.addStoreOrder}},[e._v("确定")])],1)],2),e._v(" "),r("el-dialog",{attrs:{title:"导入单号",visible:e.dialog.import_wuliu,"before-close":e.resetImport},on:{"update:visible":function(t){return e.$set(e.dialog,"import_wuliu",t)}}},[r("div",{staticClass:"upload-main",staticStyle:{height:"400px"}},[r("div",{staticClass:"upload-container"},[r("el-button",{staticClass:"download",attrs:{type:"text"},on:{click:e.exportTemp}},[e._v("拆单模板")]),e._v(" "),r("el-upload",{attrs:{action:"","show-file-list":!1,"http-request":e.handleImport}},[r("div",[r("div",{staticStyle:{position:"relative"}},[r("el-input",{staticClass:"input",attrs:{type:"text"},model:{value:e.import_name,callback:function(t){e.import_name=t},expression:"import_name"}},[r("i",{staticClass:"el-icon-upload2",attrs:{slot:"append"},slot:"append"})]),e._v(" "),r("i",{staticClass:"block"})],1)])])],1),e._v(" "),r("div",{staticClass:"upload-container"},[r("p",{staticStyle:{color:"red"}},[e._v("单次最多上传5000条")])]),e._v(" "),r("div",{staticClass:"upload-container"},[r("el-button",{staticStyle:{"margin-right":"10px"},attrs:{size:"small"},on:{click:e.resetImport}},[e._v("取消")]),e._v(" "),r("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.importTempChaiDan}},[e._v("导入")])],1)])]),e._v(" "),r("el-dialog",{attrs:{title:"修改单号",visible:e.dialog.import_wuliunew,"before-close":e.resetImportnew},on:{"update:visible":function(t){return e.$set(e.dialog,"import_wuliunew",t)}}},[r("div",{staticClass:"upload-main",staticStyle:{height:"400px"}},[r("div",{staticClass:"upload-container"},[r("el-button",{staticClass:"download",attrs:{type:"text"},on:{click:e.exportTempnew}},[e._v("物流模板")]),e._v(" "),r("el-upload",{attrs:{action:"","show-file-list":!1,"http-request":e.handleImportnew}},[r("div",[r("div",{staticStyle:{position:"relative"}},[r("el-input",{staticClass:"input",attrs:{type:"text"},model:{value:e.importnew_name,callback:function(t){e.importnew_name=t},expression:"importnew_name"}},[r("i",{staticClass:"el-icon-upload2",attrs:{slot:"append"},slot:"append"})]),e._v(" "),r("i",{staticClass:"block"})],1)])])],1),e._v(" "),r("div",{staticClass:"upload-container"}),e._v(" "),r("div",{staticClass:"upload-container"},[r("el-button",{staticStyle:{"margin-right":"10px"},attrs:{size:"small"},on:{click:e.resetImportnew}},[e._v("取消")]),e._v(" "),r("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.importTempwuliu}},[e._v("导入")])],1)])]),e._v(" "),r("el-dialog",{attrs:{title:"导出数据",visible:e.dialog.export_order,width:"520px"},on:{"update:visible":function(t){return e.$set(e.dialog,"export_order",t)}}},[r("el-form",{attrs:{"label-width":"120"}},[r("el-form-item",{attrs:{label:"导出类型"}},[r("el-button",{attrs:{type:"primary"},on:{click:e.exportOrder}},[e._v("订单明细")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.exporOrdertOrder}},[e._v("拆单明细")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.exportMoney}},[e._v("订单金额")])],1)],1)],1),e._v(" "),r("el-dialog",{attrs:{title:"导入",visible:e.dialog.lead_order,width:"520px"},on:{"update:visible":function(t){return e.$set(e.dialog,"lead_order",t)}}},[r("el-form",{attrs:{"label-width":"120"}},[r("el-form-item",{attrs:{label:"导入类型"}},[r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialog.import_wuliu=!0}}},[e._v("导入单号")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialog.import_wuliunew=!0}}},[e._v("修改单号")])],1)],1)],1),e._v(" "),e.order_examine_dialog?r("el-dialog",{attrs:{title:"订单详情",visible:e.order_examine_dialog,width:"80%",top:"50px"},on:{"update:visible":function(t){e.order_examine_dialog=t}}},[r("examine",{attrs:{"order-num":e.examine_order_num}})],1):e._e()],2)},s=[],i=(r("28a5"),r("96cf"),r("1da1")),n=(r("ac6a"),r("456d"),r("7514"),r("7f7f"),r("c5f6"),r("0bbe")),o=r("09d8"),l=r("44f1"),c=r("539f"),d=r("8975"),m=r("1491"),u=r("4764"),_=r("ed08"),p=r("784f"),v=r.n(p),g=r("d359"),h=/^\d+(\.\d{1,2})?$/,f={"快递公司":"","快递公司代码":"","旧物流单号":"","新物流单号":""},b={"订单编号":"","下单时间":"","所属政委":"","寄件人":"大卫博士","联系方式":"4006867733","发件人详细地址":"河南省郑州市经开区","下单人昵称":"","下单人姓名":"","下单人手机号":"","收件人":"","电话":"","收件人省":"","收件人市":"","收件人区":"","收件人街道地址":"",L:"",XL:"",XXL:"",XXXL:"","女M":"","女L":"","女XL":"","女XXL":"","女XXXL":"","5XL":"","数据求和":"","所属":"","备注":"","赠品":"","快递单号":"","快递公司":"","快递公司代码":"","发货状态":""},y={name:"OrderList",components:{ChangeAddress:c["default"],VDistpicker:v.a,examine:g["default"]},data:function(){var e=this,t=function(t,r,a){return r||(e.rechargeForm.money=0,a()),h.test(r)?(r=Number(r),0===r&&0===Number(e.rechargeForm.p_money)?a(new Error("余额金额和线下付款金额不能都为0")):r>e.agentBanlance?a(new Error("充值金额不能大于余额")):r+Number(e.rechargeForm.p_money)>Number(e.addRechargeItem.no_pay_money)?a(new Error("充值金额不能大于待支付金额")):void a()):a(new Error("请输入正确的金额"))},r=function(t,r,a){return r||(e.rechargeForm.p_money=0,a()),h.test(r)?(r=Number(r),0===r&&0===Number(e.rechargeForm.money)?a(new Error("线下付款金额和余额金额不能都为0")):r+Number(e.rechargeForm.money)>Number(e.addRechargeItem.no_pay_money)?a(new Error("充值金额不能大于待支付金额")):void a()):a(new Error("请输入正确的金额"))};return{num_1:0,num_2:0,num_3:0,num_4:0,num_5:0,num_6:0,num_7:0,num_8:0,role:this.$store.state.user.name,roles:this.$route.meta.buttonAuthList?this.$route.meta.buttonAuthList:[],authList:this.$route.meta.authList,listQuery:{order_status:"-1",order_no:"",page_index:1,page_size:20,time:"",search_name:"",activity_id:""},tableHeight:0,toggle:{company:!1},table:[],tableTotal:0,visible:{address:!1,goods:!1,void:!1,add_void:!1},update:{address:{}},orderInfo:{ordersn:"",name:"",desc:"",ordergoods:[],address:{username:"",mobile:"",address:""}},loadingFull:!1,downloadLoading:!1,temp:[{"订单编号":"","物流单号":"","物流公司":"","物流日期":"","物流备注":""}],dialog:{spending:!1,lead_order:!1,export:!1,express:!1,receive:!1,store:!1,import_wuliu:!1,import_wuliunew:!1,export_order:!1,export_order_type:"0"},express:"",spendForm:{order_num:"",day:15,track_number:"",track_company:"",track_remark:"",track_time:""},spendRules:{day:[{required:!0,message:"请填写自动收货时间",trigger:"blur"}],track_number:[{required:!0,message:"请填写物流单号",trigger:"blur"}],track_company:[{required:!0,message:"请填写物流公司",trigger:"blur"}],track_time:[{required:!0,message:"请选择发货时间",trigger:"blur"}]},statusTree:[{id:0,label:"待订单审核"},{id:1,label:"待财务审核"},{id:2,label:"待发货审核"},{id:3,label:"待收货"},{id:4,label:"已完成"},{id:5,label:"已作废"}],paystatusTree:[{id:0,label:"未付款"},{id:1,label:"部分付款"},{id:2,label:"已付款"},{id:3,label:"待退款"}],isIndeterminate:!1,isIndeterminates:!1,checkAlls:!1,checkAll:!1,oreder_status:[],checkedCities:[],exportForm:{order_num:"",name:"",time:"",good:"",address:"",status:[],order_status:[],pay_status:[],type:-1,page_size:10,page_index:1,total:0,provice:"",city:"",area:"",activity_id:""},highSearchFlag:!1,orderMulSelection:[],chooseList:[],kefuNum:0,caiwuNum:0,wuliuNum:0,exportMulSelection:[],rechargeForm:{money:0,p_money:0,remark:""},rechargeRules:{money:[{validator:t,trigger:"blur"}],p_money:[{validator:r,trigger:"blur"}]},agentBanlance:0,addRechargeItem:{},storeList:[],storeOrder:{order_id:"",store_id:""},activitys:[],expressData:{},import_name:"",importnew_name:"",import_file:null,export_type:"0",order_examine_dialog:!1,examine_order_num:"",mergeOrderVis:!1,mergeOrderForm:{master_num:"",slave_num:"",remark:"",main:""},mergeOrdersInfo:{order_master:null,order_slave:null},sureMergeVis:!1,needMergeOrderList:[],voidOrderInfo:{},voidList:[],voidTypeId:"",addVoidContent:"",remark:{void:""}}},watch:{"listQuery.time":function(e,t){!e&&t&&(this.listQuery.time=[],this.getList())},"dialog.export_order":function(e,t){e||(this.dialog.export_order_type="0")},"visible.void":function(e){e?this.getVoidList():this.resetVoidRemark()}},created:function(){var e=this;this.orderStatus=l["c"],this.payStatus=l["e"],this.parseMoney=_["g"],this.activityList((function(){e.getList()})),this.getStore()},mounted:function(){var e=this;this.$nextTick((function(){e.tableHeight=document.getElementsByClassName("table-wrapper")[0].offsetHeight}))},methods:{handleCheckAllChange:function(e){var t=this.statusTree.map((function(e){return e.id}));this.exportForm.order_status=e?t:[],this.isIndeterminate=!1},handleCheckedCitiesChange:function(e){var t=e.length;this.checkAll=t===this.statusTree.length,this.isIndeterminate=t>0&&t<this.statusTree.length},handleCheckAllChanges:function(e){var t=this.paystatusTree.map((function(e){return e.id}));this.exportForm.pay_status=e?t:[],this.isIndeterminates=!1},handleCheckedCitiesChanges:function(e){var t=e.length;this.checkAlls=t===this.paystatusTree.length,this.isIndeterminates=t>0&&t<this.paystatusTree.length},getVoidList:function(){var e=this,t=this.$loading();u["k"]().then((function(r){t.close(),200===r.code?e.voidList=r.data:e.$message.error(r.message||"获取订单作废原因失败")})).catch((function(){t.close(),e.$message.error("获取订单作废原因失败")}))},setVoidOrder:function(e){Object.assign(this.voidOrderInfo,e),this.visible.void=!0},resetVoidRemark:function(){this.voidList=[],this.remark.void="",this.voidTypeId="",this.voidOrderInfo={},this.visible.void=!1},submitOrderVoid:function(){var e=this;if(!this.voidTypeId&&!this.remark.void)return this.$message.error("请选择作废原因或填写作废原因"),!1;var t=this.voidTypeId&&this.voidList.length>0?this.voidList.find((function(t){var r=t.id;return+r===e.voidTypeId})).content:"";this.loadingFull=!0,u["o"]({order_num:this.voidOrderInfo.order_num,remark:"".concat(t).concat(this.remark.void)}).then((function(t){e.loadingFull=!1,200===t.code?(e.resetVoidRemark(),e.getList(),e.$message.success(t.message)):e.$message.error(t.message)})).catch((function(t){e.loadingFull=!1}))},submitAddVoid:function(){var e=this;if(!this.addVoidContent)return this.$message.error("请添加作废原因"),!1;var t=this.$loading();u["d"]({content:this.addVoidContent}).then((function(r){t.close(),200===r.code?(e.resetAddVoid(),e.getVoidList()):e.$message.error(r.message||"添加作废原因失败")})).catch((function(){t.close(),e.$message.error("添加作废原因失败")}))},resetAddVoid:function(){this.visible.add_void=!1,this.addVoidContent=""},showMergeOrder:function(){var e=this.needMergeOrderList.length;if(2!==e)return this.$message.error("请选择2个订单"),!1;this.mergeOrderForm.master_num=this.needMergeOrderList[0].order_num,this.mergeOrderForm.slave_num=this.needMergeOrderList[1].order_num,this.mergeOrderVis=!0},submitToMergeOrder:function(){var e=this;if(!this.mergeOrderForm.main)return this.$message.error("请选择主订单"),!1;this.$confirm("确认将2个订单合并为1个,并将订单:".concat(this.mergeOrderForm.main,"设为主订单?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loadingFull=!0,Object(n["p"])(e.mergeOrderForm).then((function(t){e.loadingFull=!1,200===t.code?(e.$message.success("订单合并成功"),e.cancelToMergeOrder(),e.cancelMergeOrderInfo(),e.getList()):e.$message.error(t.message||"订单合并失败")})).catch((function(){e.loadingFull=!1,e.$message.error("订单合并失败")}))})).catch((function(){}))},cancelToMergeOrder:function(){this.mergeOrdersInfo={order_master:null,order_slave:null},this.mergeOrderForm.remark="",this.mergeOrderForm.main="",this.sureMergeVis=!1,this.mergeOrderVis=!0},cancelMergeOrderInfo:function(){this.mergeOrderForm={master_num:"",slave_num:"",remark:"",main:""},this.mergeOrderVis=!1},getMergeOrderInfo:function(){var e=this;this.loadingFull=!0,Object(n["k"])({master_num:this.mergeOrderForm.master_num,slave_num:this.mergeOrderForm.slave_num}).then((function(t){e.loadingFull=!1,200===t.code?(e.mergeOrdersInfo=t.data,e.mergeOrderVis=!1,e.sureMergeVis=!0):e.$message.error(t.message||"获取合并订单失败")})).catch((function(){e.loadingFull=!1,e.$message.error("获取合并订单失败")}))},toDialogOrderWxamine:function(e){this.order_examine_dialog=!0,this.examine_order_num=e.order_num},cancelStoreOrder:function(e){var t=this;this.$confirm("确定取消店铺订单?","提示").then((function(){Object(n["c"])({order_id:e.id}).then((function(e){200===e.code?(t.$message.success("成功"),t.getList()):t.$message.error(e.message||"取消店铺订单失败")}))}))},toExportOrder:function(){var e=this.dialog.export_order_type;"0"===e?this.exportOrder():this.exporOrdertOrder()},handleImport:function(e){var t=e.file;t&&(this.import_name=t.name,this.import_file=t)},handleImportnew:function(e){var t=e.file;t&&(this.importnew_name=t.name,this.import_file=t)},resetImport:function(){this.import_name="",this.import_file=null,this.dialog.import_wuliu=!1,this.export_type="0"},resetImportnew:function(){this.importnew_name="",this.import_file=null,this.dialog.import_wuliunew=!1},showExpress:function(e){var t=e.express;t&&(this.dialog.express=!0,this.express=t)},exportTemp:function(){Promise.all([r.e("chunk-5bdd67a2"),r.e("chunk-2c21b5a5")]).then(r.bind(null,"4bf8d")).then((function(e){e.export_json_to_excel({header:Object.keys(b),data:[],filename:"拆单模板",bookType:"xlsx"})}))},exportTempnew:function(){Promise.all([r.e("chunk-5bdd67a2"),r.e("chunk-2c21b5a5")]).then(r.bind(null,"4bf8d")).then((function(e){e.export_json_to_excel({header:Object.keys(f),data:[],filename:"更新物流模板",bookType:"xlsx"})}))},importTempChaiDan:function(){var e=this;if(!this.import_file)return this.$message.error("请上传导入文件"),!1;var t=new FormData;t.append("file",this.import_file),this.loadingFull=!0;try{this.$request(Object(n["m"])(t),(function(){e.getList(),e.$message.success("上传成功"),e.dialog.lead_order=!1}))}catch(r){this.$message.error("导入拆单失败")}finally{this.loadingFull=!1}},importTempwuliu:function(){var e=this;if(!this.import_file)return this.$message.error("请上传导入文件"),!1;var t=new FormData;t.append("file",this.import_file),this.loadingFull=!0;try{this.$request(Object(n["a"])(t),(function(){e.getList(),e.$message.success("上传成功"),e.dialog.lead_order=!1})),this.resetImportnew(),this.getList()}catch(r){}finally{this.loadingFull=!1}},pass:function(e,t,r){var a=this;this.$confirm("此操作将通过审核, 是否继续?","提示").then((function(){a.$request(Object(n["l"])({order_num:e,status:t}),(function(e){a.$message.success("操作成功"),r.status++}))})).catch((function(){}))},reject:function(e,t,r){var a=this;this.$confirm("此操作将驳回审核, 是否继续?","提示").then((function(){a.$request(Object(n["n"])({order_num:e,status:t}),(function(e){a.$message.success("操作成功"),r.status+=5}))})).catch((function(){}))},handleTagToggle:function(e){this.listQuery.status=e.name,this.chooseList=[],this.getList()},getList:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){var t,r,a,s,i,o,l,c,d,m,u,_,p,v,g,h,f,b,y,x,k,w;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.loadingFull=!0,e.prev=1,t=this.listQuery,r=t.order_status,a=t.order_no,s=t.page_index,i=t.page_size,o=t.time,l=t.search_name,c=t.activity_id,e.next=5,Object(n["g"])({order_status:r,order_no:a,page_index:s,page_size:i,start_time:o.length>0?o[0]:"",end_time:o.length>0?o[1]:"",search_name:l,activity_id:c});case 5:d=e.sent,m=d.message,u=d.code,200===u?(_=d.data,p=_.list,v=_.total,g=_.num_1,h=_.num_2,f=_.num_3,b=_.num_4,y=_.num_5,x=_.num_6,k=_.num_7,w=_.num_8,this.tableTotal=v,this.table=p,this.num_1=g,this.num_2=h,this.num_3=f,this.num_4=b,this.num_5=y,this.num_6=x,this.num_7=k,this.num_8=w):this.$message.error(m),e.next=12;break;case 10:e.prev=10,e.t0=e["catch"](1);case 12:this.loadingFull=!1;case 13:case"end":return e.stop()}}),e,this,[[1,10]])})));function t(){return e.apply(this,arguments)}return t}(),changePagination:function(e){var t=e.page,r=e.limit;this.listQuery.page_size=r,this.listQuery.page_index=t,this.getList()},handleAddOrder:function(){this.$router.push({name:"order_add"})},handleCancelOrder:function(e){var t=this;this.$confirm("是否确认取消该订单?","取消订单",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var r=e.id;t.cancelOrder(r)}))},cancelOrder:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t){var r,a,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(o["b"])({id:t});case 2:r=e.sent;try{a=r.message,s=r.code,200===s?(this.$message.success(a),this.highSearchFlag?this.submitExport():this.getList()):this.$message.error(a)}catch(i){}case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),handleUpdataAddress:function(e){var t=e.address;this.update.address=t,this.visible.address=!0},handleSeeAllGoods:function(e){this.orderInfo=e,this.visible.goods=!0},exportOrder:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){var t,a,s,i,o,l,c,m,u,_,p,v,g,h,f,b,y,x,k,w,O,F,C,$,S=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.chooseList.length)this.$request(Object(n["e"])({id:this.chooseList.map((function(e){return e.id}))}),(function(e){var t=e.list;Promise.all([r.e("chunk-5bdd67a2"),r.e("chunk-2c21b5a5")]).then(r.bind(null,"4bf8d")).then((function(e){e.export_json_to_excel({header:Object.keys(t[0]),data:t.map((function(e){return Object.keys(t[0]).map((function(t){return e[t]}))})),filename:"".concat(Object(d["formatter"])(new Date,"yyyy-MM-dd"),"订单"),bookType:"xlsx"}),S.dialog.export_order=!1}))}));else{if(t={},this.highSearchFlag){try{_=this.$refs.status_tree.getCheckedKeys(),-1!==_.indexOf(-1)&&(_=[-1]),p=this.$refs.pay_status_tree.getCheckedKeys(),-1!==p.indexOf(-1)&&(p=[-1])}catch(I){_=[],p=[]}v=this.exportForm,g=v.page_index,h=v.page_size,f=v.order_num,b=v.time,y=v.name,x=v.address,k=v.good,w=v.type,O=v.provice,F=v.city,C=v.area,$=v.activity_id,t={page_index:g,page_size:h,order_no:f,start_time:b.length>0?b[0]:"",end_time:b.length>0?b[1]:"",user_name:y,receive_info:x,goods_info:k,order_status:_,pay_status:p,order_type:w,provice:O||"",city:F||"",area:C||"",activity_id:$}}else a=this.listQuery,s=a.order_status,i=a.order_no,o=a.page_index,l=a.page_size,c=a.search_name,m=a.time,u=a.activity_id,t={order_status:s,order_no:i,page_index:o,page_size:l,search_name:c,start_time:m.length>0?m[0]:"",end_time:m.length>0?m[1]:"",activity_id:u};this.$request(Object(n["e"])(t),(function(e){var t=e.list;Promise.all([r.e("chunk-5bdd67a2"),r.e("chunk-2c21b5a5")]).then(r.bind(null,"4bf8d")).then((function(e){e.export_json_to_excel({header:Object.keys(t[0]),data:t.map((function(e){return Object.keys(t[0]).map((function(t){return e[t]}))})),filename:"".concat(Object(d["formatter"])(new Date,"yyyy-MM-dd"),"订单"),bookType:"xlsx"}),S.dialog.export_order=!1}))}))}case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),exportMoney:function(){var e=this;if(this.chooseList.length)this.$request(Object(n["d"])({id:this.chooseList.map((function(e){return e.id}))}),(function(t){var a=t.list;Promise.all([r.e("chunk-5bdd67a2"),r.e("chunk-2c21b5a5")]).then(r.bind(null,"4bf8d")).then((function(t){var r=["序号","下单时间","所属政委","下单人昵称","下单人姓名","订单状态","支付状态","数量合计","订单总额","所属者姓名","所属者手机号","收货人","联系方式","收货地址","订单备注"],s=["index","updated_at","admin_name","nickname","realname","status","pay_status","total","money","belong_realname","belong_mobile","username","mobile","address","remark"],i=a.map((function(e,t){var r={index:t+1,updated_at:e.updated_at||"",admin_name:e.get_user&&e.get_user.warea&&e.get_user.warea.admin_name,nickname:e.get_user.nickname||"",realname:e.get_user.realname||"",status:Object(l["c"])(e.status).name||"",pay_status:Object(l["e"])(e.pay_status).name,total:e.total||"",money:e.money||"",username:e.get_address.username||"",mobile:+e.get_address.mobile,belong_realname:e.belong_user&&e.belong_user.realname,belong_mobile:e.belong_user&&e.belong_user.mobile,address:e.get_address.province+e.get_address.city+e.get_address.town+e.get_address.address,remark:e.remark||""};return r})),n=i.map((function(e){return s.map((function(t){return e[t]}))}));t.export_json_to_excel({header:r,data:n,filename:"".concat(Object(d["formatter"])(new Date,"yyyy-MM-dd"),"订单金额"),autoWidth:!0,bookType:"xlsx"}),e.dialog.export_order=!1}))}));else{var t={};if(this.highSearchFlag){var a,s;try{a=this.$refs.status_tree.getCheckedKeys(),-1!==a.indexOf(-1)&&(a=[-1]),s=this.$refs.pay_status_tree.getCheckedKeys(),-1!==s.indexOf(-1)&&(s=[-1])}catch(I){a=[],s=[]}var i=this.exportForm,o=i.page_index,c=i.page_size,m=i.order_num,u=i.time,_=i.name,p=i.address,v=i.good,g=i.type,h=i.provice,f=i.city,b=i.area,y=i.activity_id;t={page_index:o,page_size:c,order_no:m,start_time:u.length>0?u[0]:"",end_time:u.length>0?u[1]:"",user_name:_,receive_info:p,goods_info:v,order_status:a,pay_status:s,order_type:g,provice:h||"",city:f||"",area:b||"",activity_id:y}}else{var x=this.listQuery,k=x.order_status,w=x.order_no,O=x.page_index,F=x.page_size,C=x.search_name,$=x.time,S=x.activity_id;t={order_status:k,order_no:w,page_index:O,page_size:F,search_name:C,start_time:$.length>0?$[0]:"",end_time:$.length>0?$[1]:"",activity_id:S}}this.$request(Object(n["d"])(t),(function(t){var a=t.list;Promise.all([r.e("chunk-5bdd67a2"),r.e("chunk-2c21b5a5")]).then(r.bind(null,"4bf8d")).then((function(t){var r=["序号","下单时间","所属政委","下单人昵称","下单人姓名","订单状态","支付状态","数量合计","订单总额","所属者姓名","所属者手机号","收货人","联系方式","收货地址","订单备注"],s=["index","updated_at","admin_name","nickname","realname","status","pay_status","total","money","belong_realname","belong_mobile","username","mobile","address","remark"],i=a.map((function(e,t){var r={index:t+1,updated_at:e.updated_at||"",admin_name:e.get_user&&e.get_user.warea&&e.get_user.warea.admin_name,nickname:e.get_user.nickname||"",realname:e.get_user.realname||"",status:Object(l["c"])(e.status).name||"",pay_status:Object(l["e"])(e.pay_status).name,total:e.total||"",money:e.money||"",username:e.get_address.username||"",mobile:+e.get_address.mobile,belong_realname:e.belong_user&&e.belong_user.realname,belong_mobile:e.belong_user&&e.belong_user.mobile,address:e.get_address.province+e.get_address.city+e.get_address.town+e.get_address.address,remark:e.remark||""};return r})),n=i.map((function(e){return s.map((function(t){return e[t]}))}));t.export_json_to_excel({header:r,data:n,filename:"".concat(Object(d["formatter"])(new Date,"yyyy-MM-dd"),"订单金额"),autoWidth:!0,bookType:"xlsx"}),e.dialog.export_order=!1}))}))}},exporOrdertOrder:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){var t,a,s,i,o,l,c,d,m,u,_,p,v,g,h,f,y,x,k,w,O,F,C,$,S=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.chooseList.length)this.$request(Object(n["o"])({id:this.chooseList.map((function(e){return e.id}))}),(function(e){S.expressData=e;var t=S.getExportModule();Promise.all([r.e("chunk-5bdd67a2"),r.e("chunk-2c21b5a5")]).then(r.bind(null,"4bf8d")).then((function(e){e.export_json_to_excel({header:Object.keys(b),data:t.map((function(e){return Object.keys(t[0]).map((function(t){return e[t]}))})),filename:"".concat((new Date).toLocaleDateString(),"快递单导出"),bookType:"xlsx",isCSV:!0}),S.dialog.export_order=!1}))}));else{if(t={},this.highSearchFlag){try{u=this.$refs.status_tree.getCheckedKeys(),-1!==u.indexOf(-1)&&(u=[-1]),_=this.$refs.pay_status_tree.getCheckedKeys(),-1!==_.indexOf(-1)&&(_=[-1])}catch(I){u=[],_=[]}p=this.exportForm,v=p.page_index,g=p.page_size,h=p.order_num,f=p.time,y=p.name,x=p.address,k=p.good,w=p.type,O=p.provice,F=p.city,C=p.area,$=p.activity_id,t={page_index:v,page_size:g,order_no:h,start_time:f.length>0?f[0]:"",end_time:f.length>0?f[1]:"",user_name:y,receive_info:x,goods_info:k,order_status:u,pay_status:_,order_type:w,provice:O||"",city:F||"",area:C||"",activity_id:$}}else a=this.listQuery,s=a.order_status,i=a.order_no,o=a.page_index,l=a.page_size,c=a.search_name,d=a.time,m=a.activity_id,t={order_status:s,order_no:i,page_index:o,page_size:l,search_name:c,start_time:d.length>0?d[0]:"",end_time:d.length>0?d[1]:"",activity_id:m};this.$request(Object(n["o"])(t),(function(e){S.expressData=e;var t=S.getExportModule();Promise.all([r.e("chunk-5bdd67a2"),r.e("chunk-2c21b5a5")]).then(r.bind(null,"4bf8d")).then((function(e){e.export_json_to_excel({header:Object.keys(b),data:t.map((function(e){return Object.keys(t[0]).map((function(t){return e[t]}))})),filename:"".concat((new Date).toLocaleDateString(),"快递单导出"),bookType:"xlsx",isCSV:!0}),S.dialog.export_order=!1}))}))}case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),getExportModule:function(){var e=this.expressData,t=[];for(var r in e){var a=e[r],s=a.data,i=0,n=0,o=0,l=0;while(i<a["精装"].length){var c=Object.assign({},b);c["订单编号"]=r,c["下单时间"]=s.created_at,c["所属政委"]=s.admin_name,c["下单人昵称"]=s.u_nickname,c["下单人姓名"]=s.u_name,c["下单人手机号"]=s.u_mobile,c["收件人"]=s.username,c["电话"]=s.mobile,c["收件人省"]=s.province,c["收件人市"]=s.city,c["收件人区"]=s.town,c["收件人街道地址"]=s.address,c["备注"]=s.remark,c["所属"]=s.belong,c["赠品"]=s.gift.map((function(e){return"".concat(e.name).concat(e.num)})).join(";");var d=0;if("男女款"===a["精装"][i].sec_attr){var m=a["精装"][i].size.split("-")[0],u=a["精装"][i].size.split("-")[1];u="3XL"===u?"XXXL":u,"男款"===m?(c[u]="".concat(a["精装"][i].num).concat(a["精装"][i].main_attr),d+=a["精装"][i].num):(c["女"+u]="".concat(a["精装"][i].num).concat(a["精装"][i].main_attr),d+=a["精装"][i].num)}else"3XL"===a["精装"][i].size&&(a["精装"][i].size="XXXL"),"男款"===a["精装"][i].sec_attr&&(c[a["精装"][i].size]="".concat(a["精装"][i].num).concat(a["精装"][i].main_attr),d+=a["精装"][i].num),"女款"===a["精装"][i].sec_attr&&(c["女"+a["精装"][i].size]="".concat(a["精装"][i].num).concat(a["精装"][i].main_attr),d+=a["精装"][i].num);c["数据求和"]=d,t.push(c),i++}while(n<a["普通"].length){var _=Object.assign({},b);_["订单编号"]=r,_["下单时间"]=s.created_at,_["所属政委"]=s.admin_name,_["下单人昵称"]=s.u_nickname,_["下单人姓名"]=s.u_name,_["下单人手机号"]=s.u_mobile,_["收件人"]=s.username,_["电话"]=s.mobile,_["收件人省"]=s.province,_["收件人市"]=s.city,_["收件人区"]=s.town,_["收件人街道地址"]=s.address,_["备注"]=s.remark,_["所属"]=s.belong,_["赠品"]=s.gift.map((function(e){return"".concat(e.name).concat(e.num)})).join(";");var p=0;if("男女款"===a["普通"][n].sec_attr){var v=a["普通"][n].size.split("-")[0],g=a["普通"][n].size.split("-")[1];g="3XL"===g?"XXXL":g,"男款"===v?(_[g]="".concat(a["普通"][n].num).concat(a["普通"][n].main_attr),p+=a["普通"][n].num):(_["女"+g]="".concat(a["普通"][n].num).concat(a["普通"][n].main_attr),p+=a["普通"][n].num)}else"3XL"===a["普通"][n].size&&(a["普通"][n].size="XXXL"),"男款"===a["普通"][n].sec_attr&&(_[a["普通"][n].size]="".concat(a["普通"][n].num).concat(a["普通"][n].main_attr),p+=a["普通"][n].num),"女款"===a["普通"][n].sec_attr&&(_["女"+a["普通"][n].size]="".concat(a["普通"][n].num).concat(a["普通"][n].main_attr),p+=a["普通"][n].num);_["数据求和"]=p,t.push(_),n++}while(o<a["精装混合"].length){var h=Object.assign({},b);h["订单编号"]=r,h["下单时间"]=s.created_at,h["所属政委"]=s.admin_name,h["下单人昵称"]=s.u_nickname,h["下单人姓名"]=s.u_name,h["下单人手机号"]=s.u_mobile,h["收件人"]=s.username,h["电话"]=s.mobile,h["收件人省"]=s.province,h["收件人市"]=s.city,h["收件人区"]=s.town,h["收件人街道地址"]=s.address,h["备注"]=s.remark,h["所属"]=s.belong,h["赠品"]=s.gift.map((function(e){return"".concat(e.name).concat(e.num)})).join(";");for(var f=0,y=0;y<a["精装混合"][o].length;y++)if("男女款"===a["精装混合"][o][y].sec_attr){var x=a["精装混合"][o][y].size.split("-")[0],k=a["精装混合"][o][y].size.split("-")[1];k="3XL"===k?"XXXL":k,"男款"===x?(h[k]+="".concat(a["精装混合"][o][y].num).concat(a["精装混合"][o][y].main_attr),f+=a["精装混合"][o][y].num):(h["女"+k]+="".concat(a["精装混合"][o][y].num).concat(a["精装混合"][o][y].main_attr),f+=a["精装混合"][o][y].num)}else"3XL"===a["精装混合"][o][y].size?"男款"===a["精装混合"][o][y].sec_attr&&(h["XXXL"]+="".concat(a["精装混合"][o][y].num).concat(a["精装混合"][o][y].main_attr),f+=a["精装混合"][o][y].num):("男款"===a["精装混合"][o][y].sec_attr&&(h[a["精装混合"][o][y].size]+="".concat(a["精装混合"][o][y].num).concat(a["精装混合"][o][y].main_attr),f+=a["精装混合"][o][y].num),"女款"===a["精装混合"][o][y].sec_attr&&(h["女"+a["精装混合"][o][y].size]+="".concat(a["精装混合"][o][y].num).concat(a["精装混合"][o][y].main_attr),f+=a["精装混合"][o][y].num));h["数据求和"]=f,t.push(h),o++}while(l<a["普通混合"].length){var w=Object.assign({},b);w["订单编号"]=r,w["下单时间"]=s.created_at,w["所属政委"]=s.admin_name,w["下单人昵称"]=s.u_nickname,w["下单人姓名"]=s.u_name,w["下单人手机号"]=s.u_mobile,w["收件人"]=s.username,w["电话"]=s.mobile,w["收件人省"]=s.province,w["收件人市"]=s.city,w["收件人区"]=s.town,w["收件人街道地址"]=s.address,w["备注"]=s.remark,w["所属"]=s.belong,w["赠品"]=s.gift.map((function(e){return"".concat(e.name).concat(e.num)})).join(";");for(var O=0,F=0;F<a["普通混合"][l].length;F++)if("男女款"===a["普通混合"][l][F].sec_attr){var C=a["普通混合"][l][F].size.split("-")[0],$=a["普通混合"][l][F].size.split("-")[1];$="3XL"===$?"XXXL":$,"男款"===C?(w[$]+="".concat(a["普通混合"][l][F].num).concat(a["普通混合"][l][F].main_attr),O+=a["普通混合"][l][F].num):(w["女"+$]+="".concat(a["普通混合"][l][F].num).concat(a["普通混合"][l][F].main_attr),O+=a["普通混合"][l][F].num)}else"3XL"===a["普通混合"][l][F].size?"男款"===a["普通混合"][l][F].sec_attr&&(w["XXXL"]+="".concat(a["普通混合"][l][F].num).concat(a["普通混合"][l][F].main_attr),O+=a["普通混合"][l][F].num):("男款"===a["普通混合"][l][F].sec_attr&&(w[a["普通混合"][l][F].size]+="".concat(a["普通混合"][l][F].num).concat(a["普通混合"][l][F].main_attr),O+=a["普通混合"][l][F].num),"女款"===a["普通混合"][l][F].sec_attr&&(w["女"+a["普通混合"][l][F].size]+="".concat(a["普通混合"][l][F].num).concat(a["普通混合"][l][F].main_attr),O+=a["普通混合"][l][F].num));w["数据求和"]=O,t.push(w),l++}}return t},getExportMoney:function(){},formatJson:function(e,t){return t.map((function(t){return e.map((function(e){return t[e]}))}))},toOrderWxamine:function(e){this.$router.push({name:"order_examine",params:{order:e.order_num}})},submitOrderSpend:function(){var e=this;this.$refs.spendform.validate((function(t){if(!t)return!1;e.loadingFull=!0,Object(n["m"])({order_num:[e.spendForm.order_num],day:[e.spendForm.day],track_number:[e.spendForm.track_number],track_company:[e.spendForm.track_company],track_remark:[e.spendForm.track_remark],track_time:[e.spendForm.track_time]}).then((function(t){e.loadingFull=!1,200===t.code?(e.highSearchFlag?e.submitExport():e.getList(),e.resetOrderSpend(),e.$message.success(t.message)):e.$message.error(t.message)})).catch((function(t){e.loadingFull=!1}))}))},resetOrderSpend:function(){this.spendForm={order_num:"",day:15,track_number:"",track_company:"",track_remark:"",track_time:""},this.dialog.spending=!1},handleOrderSpend:function(e){this.spendForm.order_num=e.order_num,this.dialog.spending=!0},orderMulSelect:function(e){var t=this;this.caiwuNum=0,this.kefuNum=0,this.wuliuNum=0,this.chooseList=e;var r=[];e.filter((function(e){return 1!==e.is_deleted&&(0===e.status||1===e.status||2===e.status)})).map((function(e){r.push(e.id),0===e.status?t.kefuNum+=1:1===e.status?t.caiwuNum+=1:t.wuliuNum+=1})),this.orderMulSelection=r,this.needMergeOrderList=e},machExamine:function(e){var t=this;if(0===e&&0===this.kefuNum)this.$message.error("暂无符合客服订单待审核");else if(1===e&&0===this.caiwuNum)this.$message.error("暂无符合财务订单待审核");else if(2===e&&0===this.wuliuNum)this.$message.error("暂无符合物流订单待审核");else{var r="";r=0===e?"当前有".concat(this.kefuNum,"个客服订单待审核"):1===e?"当前有".concat(this.caiwuNum,"个财务订单待审核"):"当前有".concat(this.wuliuNum,"个发货订单待审核"),this.$confirm(r,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.loadingFull=!0,Object(n["j"])({data:t.orderMulSelection,status:e}).then((function(e){if(t.loadingFull=!1,200===e.code){if(t.highSearchFlag)t.submitExport();else{var r=Math.ceil(t.tableTotal/t.listQuery.page_size);t.listQuery.page_index===r?(t.listQuery.page_index=t.listQuery.page_index-1,t.getList()):t.getList()}t.resetMulSelect(),t.$message.success(e.message)}else t.$message.error(e.message)})).catch((function(e){t.loadingFull=!1}))}))}},resetMulSelect:function(){this.kefuNum=0,this.caiwuNum=0,this.wuliuNum=0,this.orderMulSelection=[]},SeniorChangePagination:function(e){var t=e.page,r=e.limit;this.exportForm.page_size=r,this.exportForm.page_index=t,this.submitExport()},submitExport:function(){var e=this,t=this.exportForm.order_status;-1!==t.indexOf(-1)&&(t=[-1]);var r=this.exportForm.pay_status;-1!==r.indexOf(-1)&&(r=[-1]);var a=this.exportForm,s=a.page_index,i=a.page_size,o=a.order_num,l=a.time,c=a.name,d=a.address,m=a.good,u=a.type,_=a.provice,p=a.city,v=a.area,g=a.activity_id;this.loadingFull=!0,Object(n["i"])({page_index:s,page_size:i,order_no:o,start_time:l.length>0?l[0]:"",end_time:l.length>0?l[1]:"",user_name:c,receive_info:d,goods_info:m,order_status:t,pay_status:r,order_type:u,provice:_||"",city:p||"",area:v||"",activity_id:g}).then((function(t){e.loadingFull=!1,200===t.code?(e.dialog.export=!1,e.table=t.data.list,e.exportForm.total=t.data.total?t.data.total:0):e.$message.error(t.message)})).catch((function(t){e.loadingFull=!1}))},resetSeniorSearch:function(){this.exportForm={order_num:"",name:"",time:"",good:"",address:"",status:[],order_status:[],pay_status:[],type:-1,page_size:10,page_index:1,provice:"",city:"",area:"",activity_id:""},this.dialog.export=!1,this.listQuery.page_index=1,this.listQuery.page_size=10,this.getList()},accountBalance:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t){var r=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.loadingFull=!0,this.addRechargeItem=t,e.next=4,Object(u["a"])({order_id:t.id}).then((function(e){r.loadingFull=!1,200===e.code?(r.agentBanlance=e.data,r.agentBanlance>0&&(r.agentBanlance>t.no_pay_money?r.rechargeForm.money=t.no_pay_money:r.rechargeForm.money=r.agentBanlance),r.dialog.receive=!0):r.$message.error(e.message)})).catch((function(e){r.loadingFull=!1}));case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),handleSubmitRecharge:function(){var e=this;this.$refs.rechargeform.validate((function(t){return!!t&&(0===Number(e.rechargeForm.money)&&0===Number(e.rechargeForm.p_money)?(e.$message.error("充值金额不能都为0"),!1):(e.loadingFull=!0,void Object(u["b"])({order_id:e.addRechargeItem.id,money:e.rechargeForm.money,p_money:e.rechargeForm.p_money,remark:e.rechargeForm.remark}).then((function(t){e.loadingFull=!1,200===t.code?(e.resetDialogRecharge(),e.highSearchFlag?e.submitExport():e.getList(),e.$message.success(t.message)):e.$message.error(t.message)})).catch((function(t){e.loadingFull=!1}))))}))},resetDialogRecharge:function(){this.rechargeForm={money:0,p_money:0,remark:""},this.agentBanlance=0,this.addRechargeItem={},this.dialog.receive=!1},clearSearch:function(){this.listQuery={order_no:"",page_index:1,page_size:20,time:"",search_name:"",activity_id:""},this.getList()},getStore:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.loadingFull=!0,e.next=3,Object(n["h"])().then((function(e){t.loadingFull=!1,200===e.code&&(t.storeList=e.data.list)})).catch((function(e){t.loadingFull=!1}));case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),handleStoreOrder:function(e){this.storeOrder.order_id=e.id,this.dialog.store=!0},resetStoreOrder:function(){this.storeOrder={order_id:"",store_id:""},this.dialog.store=!1},addStoreOrder:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.storeOrder.store_id){e.next=4;break}this.$message.error("请选择体验店"),e.next=7;break;case 4:return this.loadingFull=!0,e.next=7,Object(n["b"])(this.storeOrder).then((function(e){t.loadingFull=!1,200===e.code?(t.resetStoreOrder(),t.highSearchFlag?t.submitExport():t.getList(),t.$message.success(e.message)):t.$message.error(e.message)})).catch((function(e){t.loadingFull=!1}));case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),activityList:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t){var r=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.loadingFull=!0,e.next=3,Object(m["a"])().then((function(e){r.loadingFull=!1,200===e.code&&(r.activitys=e.data,e.data.map((function(e){1===e.is_ing&&(r.exportForm.activity_id=e.id)}))),t&&t()})).catch((function(e){r.loadingFull=!1,t&&t()}));case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}},x=y,k=(r("f42b"),r("2877")),w=Object(k["a"])(x,a,s,!1,null,"f75537aa",null);t["default"]=w.exports},f42b:function(e,t,r){"use strict";var a=r("fbab"),s=r.n(a);s.a},fbab:function(e,t,r){}}]);