1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d0bd5d4"],{"2c4a":function(e,t,a){"use strict";a.r(t);var n=a("a34a"),i=a.n(n),o=a("f8b7"),s=a("2f62"),l=a("2e83");function r(e,t,a,n,i,o,s){try{var l=e[o](s),r=l.value}catch(e){return void a(e)}l.done?t(r):Promise.resolve(r).then(n,i)}function u(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function c(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var g={data:function(){return{modal:!1,columns1:[{title:"ID",key:"id"},{title:"操作时间",key:"add_time"},{title:"发货单数",key:"total_num"},{title:"成功发货单数",key:"success_num"},{title:"发货类型",key:"title"},{title:"状态",key:"status_cn"},{title:"操作",slot:"action",width:150,align:"center"}],data1:[],page1:{total:0,pageNum:1,pageSize:10},formValidate:{type:"",status:"",data:""},options:{shortcuts:[{text:"今天",value:function(){var e=new Date,t=new Date;return t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),[t,e]}},{text:"昨天",value:function(){var e=new Date,t=new Date;return t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),[t,e]}},{text:"最近7天",value:function(){var e=new Date,t=new Date;return t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-6))),[t,e]}},{text:"最近30天",value:function(){var e=new Date,t=new Date;return t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-29))),[t,e]}},{text:"上月",value:function(){var e=new Date,t=new Date,a=new Date(t.getFullYear(),t.getMonth(),0).getDate();return t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,1))),e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,a))),[t,e]}},{text:"本月",value:function(){var e=new Date,t=new Date;return t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),[t,e]}},{text:"本年",value:function(){var e=new Date,t=new Date;return t.setTime(t.setTime(new Date((new Date).getFullYear(),0,1))),[t,e]}}]},timeVal:[],typeList:[{label:"批量删除订单",value:"6"},{label:"批量手动发货",value:"7"},{label:"批量打印电子面单",value:"8"},{label:"批量配送",value:"9"},{label:"批量虚拟发货",value:"10"}],statusList:[{label:"未处理",value:"0"},{label:"处理中",value:"1"},{label:"已完成",value:"2"},{label:"处理失败",value:"3"}],columns2:[{title:"订单ID",key:"order_id"},{title:"物流公司",key:"delivery_name"},{title:"物流单号",key:"delivery_id"},{title:"处理状态",key:"status_cn"},{title:"异常原因",key:"error"}],columns3:[{title:"订单ID",key:"order_id"},{title:"备注",key:"fictitious_content"},{title:"处理状态",key:"status_cn"},{title:"异常原因",key:"error"}],columns5:[{title:"订单ID",key:"order_id"},{title:"配送员",key:"delivery_name"},{title:"配送员电话",key:"delivery_id"},{title:"处理状态",key:"status_cn"},{title:"异常原因",key:"error"}],columns4:[],data2:[],page2:{total:0,pageNum:1,pageSize:12},modal1:!1,deliveryLog:null,deliveryLogId:0,deliveryLogType:"",loading:!1,loading2:!1}},computed:function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?u(a,!0).forEach((function(t){c(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):u(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},Object(s.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getQueue()},methods:{getQueue:function(){var e=this,t={page:this.page1.pageNum,limit:this.page1.pageSize};this.formValidate.status&&(t.status=this.formValidate.status),this.formValidate.type&&(t.type=this.formValidate.type),this.formValidate.data&&(t.data=this.formValidate.data),this.loading=!0,Object(o.O)(t).then((function(t){e.loading=!1,e.data1=t.data.list,e.page1.total=t.data.count})).catch((function(t){e.loading=!1}))},pageChange:function(e){this.page1.pageNum=e,this.getQueue()},pageChange2:function(e){this.page2.pageNum=e,this.getDeliveryLog()},limitChange:function(e){this.page1.pageSize=e,this.getQueue()},limitChange2:function(e){this.page2.pageSize=e,this.getDeliveryLog()},onchangeTime:function(e){this.timeVal=e,this.formValidate.data=this.timeVal[0]?this.timeVal.join("-"):"",this.page1.pageNum=1,this.getQueue()},typeSearchs:function(){this.page1.pageNum=1,this.getQueue()},statusSearchs:function(){this.page1.pageNum=1,this.getQueue()},getDeliveryLog:function(){var e=this;this.loading2=!0,Object(o.c)(this.deliveryLogId,this.deliveryLogType,{page:this.page2.pageNum,limit:this.page2.pageSize}).then((function(t){e.loading2=!1,e.data2=t.data.list,e.page2.total=t.data.count})).catch((function(t){e.loading2=!1}))},deliveryLook:function(e){switch(this.modal1=!0,this.deliveryLogId=e.id,this.deliveryLogType=e.cache_type,this.deliveryLog=e,e.type){case 7:case 8:this.columns4=this.columns2;break;case 9:this.columns4=this.columns5;break;case 10:this.columns4=this.columns3}this.getDeliveryLog()},changeMenu:function(e,t){var a=this;switch(t){case"1":this.exports(e.id,e.type,e.cache_type);break;case"2":this.queueAgain(e.id,e.type);break;case"3":this.$Modal.confirm({title:"谨慎操作",content:"<p>确认停止该任务?</p>",onOk:function(){a.stopQueue(e.id)}});break;case"4":this.queueDel(e.id,e.type)}},exports:function(){var e,t=(e=i.a.mark((function e(t,a,n){var o,s,r,u,c;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=[],s=[],r=[],u="",e.next=3,this.getExcelData(t,a,n);case 3:c=e.sent,u||(u=c.filename),s.length||(s=c.filekey),o.length||(o=c.header),r=c.export,Object(l.a)(o,s,u,r);case 9:case"end":return e.stop()}}),e,this)})),function(){var t=this,a=arguments;return new Promise((function(n,i){var o=e.apply(t,a);function s(e){r(o,n,i,s,l,"next",e)}function l(e){r(o,n,i,s,l,"throw",e)}s(void 0)}))});return function(e,a,n){return t.apply(this,arguments)}}(),getExcelData:function(e,t,a){return new Promise((function(n,i){Object(o.a)(e,t,a).then((function(e){return n(e.data)}))}))},queueAgain:function(e,t){var a=this;Object(o.M)(e,t).then((function(e){a.$Message.success(e.msg),a.getQueue()})).catch((function(e){a.$Message.error(e.msg)}))},queueDel:function(e,t){var a=this;Object(o.N)(e,t).then((function(e){a.$Message.success(e.msg),a.getQueue()})).catch((function(e){a.$Message.error(e.msg)}))},stopQueue:function(e){var t=this;Object(o.V)(e).then((function(e){t.$Message.success(e.msg),t.getQueue()})).catch((function(e){t.$Message.error(e.msg)}))}}},d=a("2877"),h=Object(d.a)(g,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("Modal",{attrs:{title:"任务列表",width:"1000","footer-hide":"","class-name":"vertical-center-modal"},model:{value:e.modal,callback:function(t){e.modal=t},expression:"modal"}},[e.modal?a("Card",{attrs:{bordered:!1,"dis-hover":""}},[a("Form",{ref:"formValidate",staticClass:"tabform",attrs:{inline:"",model:e.formValidate,"label-width":e.labelWidth,"label-position":e.labelPosition},nativeOn:{submit:function(e){e.preventDefault()}}},[a("FormItem",{attrs:{label:"操作时间:"}},[a("DatePicker",{staticClass:"width20",attrs:{editable:!1,value:e.timeVal,format:"yyyy/MM/dd",type:"datetimerange",placement:"bottom-start",placeholder:"自定义时间",options:e.options},on:{"on-change":e.onchangeTime}})],1),a("FormItem",{attrs:{label:"类型:"}},[a("Select",{staticClass:"width20",attrs:{clearable:""},on:{"on-change":e.typeSearchs},model:{value:e.formValidate.type,callback:function(t){e.$set(e.formValidate,"type",t)},expression:"formValidate.type"}},e._l(e.typeList,(function(t){return a("Option",{key:t.value,attrs:{value:t.value}},[e._v(e._s(t.label))])})),1)],1),a("FormItem",{attrs:{label:"状态:"}},[a("Select",{staticClass:"width20",attrs:{clearable:""},on:{"on-change":e.statusSearchs},model:{value:e.formValidate.status,callback:function(t){e.$set(e.formValidate,"status",t)},expression:"formValidate.status"}},e._l(e.statusList,(function(t){return a("Option",{key:t.value,attrs:{value:t.value}},[e._v(e._s(t.label))])})),1)],1)],1),a("Table",{staticClass:"mt25",attrs:{height:"500",columns:e.columns1,data:e.data1,loading:e.loading},scopedSlots:e._u([{key:"action",fn:function(t){var n=t.row;return t.index,[n.is_show_log?[a("a",{on:{click:function(t){return e.deliveryLook(n)}}},[e._v("查看")]),a("Divider",{attrs:{type:"vertical"}})]:e._e(),[a("Dropdown",{on:{"on-click":function(t){return e.changeMenu(n,t)}}},[a("a",[e._v("更多"),a("Icon",{attrs:{type:"ios-arrow-down"}})],1),a("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[[7,8,9,10].includes(n.type)?a("DropdownItem",{attrs:{name:"1"}},[e._v("下载")]):e._e(),1==n.status?a("DropdownItem",{attrs:{name:"2"}},[e._v("重新执行")]):e._e(),n.is_stop_button?a("DropdownItem",{attrs:{name:"3"}},[e._v("停止任务")]):e._e(),a("DropdownItem",{attrs:{name:"4"}},[e._v("清除任务")])],1)],1)]]}}],null,!1,2501981875)}),a("div",{staticClass:"acea-row row-right page"},[a("Page",{attrs:{total:e.page1.total,current:e.page1.pageNum,"show-elevator":"","show-total":"","page-size":e.page1.pageSize,"show-sizer":""},on:{"on-change":e.pageChange,"on-page-size-change":e.limitChange}})],1)],1):e._e(),a("Modal",{attrs:{width:"900","footer-hide":""},model:{value:e.modal1,callback:function(t){e.modal1=t},expression:"modal1"}},[a("Table",{staticClass:"mt25",attrs:{height:"500",columns:e.columns4,data:e.data2,loading:e.loading2}}),a("div",{staticClass:"acea-row row-right page"},[a("Page",{attrs:{total:e.page2.total,current:e.page2.pageNum,"show-elevator":"","show-total":"","page-size":e.page2.pageSize,"show-sizer":""},on:{"on-change":e.pageChange2,"on-page-size-change":e.limitChange2}})],1)],1)],1)}),[],!1,null,null,null);t.default=h.exports}}]);
|