徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
17 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d0bd5d4"],{"2c4a":function(t,e,n){"use strict";n.r(e);var r=n("f8b7"),a=n("2f62"),o=n("2e83");function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */l=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),l=new P(r||[]);return a(i,"_invoke",{value:T(t,n,l)}),i}function g(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",m="executing",y="completed",v={};function w(){}function b(){}function D(){}var _={};h(_,s,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(V([])));L&&L!==n&&r.call(L,s)&&(_=L);var O=D.prototype=w.prototype=Object.create(_);function x(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(a,o,l,s){var u=g(t[a],t,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==i(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,l,s)}),(function(t){n("throw",t,l,s)})):e.resolve(h).then((function(t){c.value=t,l(c)}),(function(t){return n("throw",t,l,s)}))}s(u.arg)}var o;a(this,"_invoke",{value:function(t,r){function a(){return new e((function(e,a){n(t,r,e,a)}))}return o=o?o.then(a,a):a()}})}function T(e,n,r){var a=p;return function(o,i){if(a===m)throw Error("Generator is already running");if(a===y){if("throw"===o)throw i;return{value:t,done:!0}}for(r.method=o,r.arg=i;;){var l=r.delegate;if(l){var s=S(l,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===p)throw a=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=m;var u=g(e,n,r);if("normal"===u.type){if(a=r.done?y:d,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(a=y,r.method="throw",r.arg=u.arg)}}}function S(e,n){var r=n.method,a=e.iterator[r];if(a===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=g(a,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function V(e){if(e||""===e){var n=e[s];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,o=function n(){for(;++a<e.length;)if(r.call(e,a))return n.value=e[a],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(i(e)+" is not iterable")}return b.prototype=D,a(O,"constructor",{value:D,configurable:!0}),a(D,"constructor",{value:b,configurable:!0}),b.displayName=h(D,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,D):(t.__proto__=D,h(t,c,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},x(j.prototype),h(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new j(f(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},x(O),h(O,c,"Generator"),h(O,s,(function(){return this})),h(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=V,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function a(r,a){return l.type="throw",l.arg=e,n.next=r,a&&(n.method="next",n.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;M(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:V(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function s(t,e,n,r,a,o,i){try{var l=t[o](i),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,a)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){h(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function h(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==i(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f={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 t=new Date,e=new Date;return e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),[e,t]}},{text:"昨天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),[e,t]}},{text:"最近7天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-6))),[e,t]}},{text:"最近30天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-29))),[e,t]}},{text:"上月",value:function(){var t=new Date,e=new Date,n=new Date(e.getFullYear(),e.getMonth(),0).getDate();return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,n))),[e,t]}},{text:"本月",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),[e,t]}},{text:"本年",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),0,1))),[e,t]}}]},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:c(c({},Object(a.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 t=this,e={page:this.page1.pageNum,limit:this.page1.pageSize};this.formValidate.status&&(e.status=this.formValidate.status),this.formValidate.type&&(e.type=this.formValidate.type),this.formValidate.data&&(e.data=this.formValidate.data),this.loading=!0,Object(r.O)(e).then((function(e){t.loading=!1,t.data1=e.data.list,t.page1.total=e.data.count})).catch((function(e){t.loading=!1}))},pageChange:function(t){this.page1.pageNum=t,this.getQueue()},pageChange2:function(t){this.page2.pageNum=t,this.getDeliveryLog()},limitChange:function(t){this.page1.pageSize=t,this.getQueue()},limitChange2:function(t){this.page2.pageSize=t,this.getDeliveryLog()},onchangeTime:function(t){this.timeVal=t,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 t=this;this.loading2=!0,Object(r.c)(this.deliveryLogId,this.deliveryLogType,{page:this.page2.pageNum,limit:this.page2.pageSize}).then((function(e){t.loading2=!1,t.data2=e.data.list,t.page2.total=e.data.count})).catch((function(e){t.loading2=!1}))},deliveryLook:function(t){switch(this.modal1=!0,this.deliveryLogId=t.id,this.deliveryLogType=t.cache_type,this.deliveryLog=t,t.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(t,e){var n=this;switch(e){case"1":this.exports(t.id,t.type,t.cache_type);break;case"2":this.queueAgain(t.id,t.type);break;case"3":this.$Modal.confirm({title:"谨慎操作",content:"<p>确认停止该任务?</p>",onOk:function(){n.stopQueue(t.id)}});break;case"4":this.queueDel(t.id,t.type)}},exports:function(){var t,e=(t=l().mark((function t(e,n,r){var a,i,s,u,c;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=[],i=[],s=[],u="",t.next=3,this.getExcelData(e,n,r);case 3:c=t.sent,u||(u=c.filename),i.length||(i=c.filekey),a.length||(a=c.header),s=c.export,Object(o.a)(a,i,u,s);case 9:case"end":return t.stop()}}),t,this)})),function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function i(t){s(o,r,a,i,l,"next",t)}function l(t){s(o,r,a,i,l,"throw",t)}i(void 0)}))});return function(t,n,r){return e.apply(this,arguments)}}(),getExcelData:function(t,e,n){return new Promise((function(a,o){Object(r.a)(t,e,n).then((function(t){return a(t.data)}))}))},queueAgain:function(t,e){var n=this;Object(r.M)(t,e).then((function(t){n.$Message.success(t.msg),n.getQueue()})).catch((function(t){n.$Message.error(t.msg)}))},queueDel:function(t,e){var n=this;Object(r.N)(t,e).then((function(t){n.$Message.success(t.msg),n.getQueue()})).catch((function(t){n.$Message.error(t.msg)}))},stopQueue:function(t){var e=this;Object(r.V)(t).then((function(t){e.$Message.success(t.msg),e.getQueue()})).catch((function(t){e.$Message.error(t.msg)}))}}},g=n("2877"),p=Object(g.a)(f,(function(){var t=this,e=t._self._c;return e("Modal",{attrs:{title:"任务列表",width:"1000","footer-hide":"","class-name":"vertical-center-modal"},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[t.modal?e("Card",{attrs:{bordered:!1,"dis-hover":""}},[e("Form",{ref:"formValidate",staticClass:"tabform",attrs:{inline:"",model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:"操作时间:"}},[e("DatePicker",{staticClass:"width20",attrs:{editable:!1,value:t.timeVal,format:"yyyy/MM/dd",type:"datetimerange",placement:"bottom-start",placeholder:"自定义时间",options:t.options},on:{"on-change":t.onchangeTime}})],1),e("FormItem",{attrs:{label:"类型:"}},[e("Select",{staticClass:"width20",attrs:{clearable:""},on:{"on-change":t.typeSearchs},model:{value:t.formValidate.type,callback:function(e){t.$set(t.formValidate,"type",e)},expression:"formValidate.type"}},t._l(t.typeList,(function(n){return e("Option",{key:n.value,attrs:{value:n.value}},[t._v(t._s(n.label))])})),1)],1),e("FormItem",{attrs:{label:"状态:"}},[e("Select",{staticClass:"width20",attrs:{clearable:""},on:{"on-change":t.statusSearchs},model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},t._l(t.statusList,(function(n){return e("Option",{key:n.value,attrs:{value:n.value}},[t._v(t._s(n.label))])})),1)],1)],1),e("Table",{staticClass:"mt25",attrs:{height:"500",columns:t.columns1,data:t.data1,loading:t.loading},scopedSlots:t._u([{key:"action",fn:function(n){var r=n.row;return n.index,[r.is_show_log?[e("a",{on:{click:function(e){return t.deliveryLook(r)}}},[t._v("查看")]),e("Divider",{attrs:{type:"vertical"}})]:t._e(),[e("Dropdown",{on:{"on-click":function(e){return t.changeMenu(r,e)}}},[e("a",[t._v("更多"),e("Icon",{attrs:{type:"ios-arrow-down"}})],1),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[[7,8,9,10].includes(r.type)?e("DropdownItem",{attrs:{name:"1"}},[t._v("下载")]):t._e(),1==r.status?e("DropdownItem",{attrs:{name:"2"}},[t._v("重新执行")]):t._e(),r.is_stop_button?e("DropdownItem",{attrs:{name:"3"}},[t._v("停止任务")]):t._e(),e("DropdownItem",{attrs:{name:"4"}},[t._v("清除任务")])],1)],1)]]}}],null,!1,2501981875)}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:t.page1.total,current:t.page1.pageNum,"show-elevator":"","show-total":"","page-size":t.page1.pageSize,"show-sizer":""},on:{"on-change":t.pageChange,"on-page-size-change":t.limitChange}})],1)],1):t._e(),e("Modal",{attrs:{width:"900","footer-hide":""},model:{value:t.modal1,callback:function(e){t.modal1=e},expression:"modal1"}},[e("Table",{staticClass:"mt25",attrs:{height:"500",columns:t.columns4,data:t.data2,loading:t.loading2}}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:t.page2.total,current:t.page2.pageNum,"show-elevator":"","show-total":"","page-size":t.page2.pageSize,"show-sizer":""},on:{"on-change":t.pageChange2,"on-page-size-change":t.limitChange2}})],1)],1)],1)}),[],!1,null,null,null);e.default=p.exports}}]);