徐总多门店
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
7.5 KiB

require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/admin/delivery/index"],{1384:function(e,t,i){},"2ba5":function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return s})),i.d(t,"a",(function(){}));var r=function(){var e=this.$createElement,t=(this._self._c,this.logistics.length),i=t>0&&2==this.curExpress?this.expTemp.length:null,r=this.postPeople.length;this.$mp.data=Object.assign({},{$root:{g0:t,g1:i,g2:r}})},s=[]},"32fa":function(e,t,i){"use strict";(function(e){var r=i("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=r(i("7eb4")),n=r(i("ee10")),o=i("e727"),a={name:"GoodsDeliver",components:{splitOrder:function(){i.e("components/splitOrder/index").then(function(){return resolve(i("b530"))}.bind(null,i)).catch(i.oe)}},props:{},data:function(){return{types:[{type:"express",title:"发货",key:1,show:!0},{type:"send",title:"送货",key:2,show:!0},{type:"fictitious",title:"无需物流",key:3,show:!0}],expressType:[{title:"手动填写",key:1},{title:"电子面单打印",key:2}],orderGoods:[{title:"开启",key:1},{title:"关闭",key:0}],curExpress:1,active:0,order_id:"",delivery:[],logistics:[],delivery_type:"1",delivery_name:"",delivery_id:"",seIndex:0,expIndex:0,expTemp:[],to_name:"",to_tel:"",to_addr:"",postPeople:[],postIndex:0,fictitious_content:"",listId:0,curGoods:0,splitGoods:[],cartIds:[],totalNum:0,productType:0,storeNum:1}},watch:{"$route.params.oid":function(e){void 0!=e&&(this.order_id=e,this.getIndex())}},onLoad:function(e){if(this.storeNum=parseInt(e.storeNum),this.order_id=e.id,this.listId=e.listId,this.totalNum=e.totalNum,this.comeType=e.comeType,this.productType=e.productType,3==this.productType){for(var t=0;t<this.types.length;t++)this.types[t].show=2==t;this.delivery_type=3,this.active=2}8!=e.orderStatus&&4!=e.orderStatus&&9!=e.orderStatus||(this.curGoods=1,this.orderGoods.pop(),this.splitList()),this.getIndex(),this.getLogistics(),this.orderDeliveryInfo(),this.geTorderOrderDelivery()},methods:{getList:function(e){this.splitGoods=e;var t=[];e.forEach((function(e){if(e.checked){var i={cart_id:e.cart_id,cart_num:e.surplus_num};t.push(i)}})),this.cartIds=t},splitList:function(){var e=this,t="";t=this.storeNum?o.orderSplitInfo:o.storeOrderSplitInfo,t(this.listId).then((function(t){var i=t.data;i.forEach((function(e){e.checked=!1,e.numShow=e.surplus_num})),e.splitGoods=i})).catch((function(t){return e.$util.Tips({title:t})}))},changeGoods:function(){this.curGoods=this.curGoods?0:1,this.curGoods&&this.splitList()},scanCode:function(){var t=this;e.scanCode({scanType:["barCode"],success:function(e){t.delivery_id=e.result}})},previewImage:function(){e.previewImage({urls:[this.expTemp[this.expIndex].pic],success:function(){},fail:function(e){}})},geTorderOrderDelivery:function(){var e=this,t="";t=o.orderOrderDelivery,t().then((function(t){e.postPeople=t.data}))},bindPostChange:function(e){this.postIndex=e.detail.value},changeExpTpe:function(e,t){this.curExpress=e.key,this.getLogistics(t||"")},changeType:function(e,t){this.active=t,this.delivery_type=e.key},getIndex:function(){var e=this,t="";t=o.getAdminOrderDelivery,t(e.order_id).then((function(t){e.delivery=t.data}),(function(t){e.$util.Tips({title:t})}))},getLogistics:function(e){var t=this;(0,o.getLogistics)({status:e}).then((function(e){t.logistics=e.data,t.getExpTemp(e.data[0].code)}),(function(e){t.$util.Tips({title:e})}))},saveInfo:function(){var e=this;return(0,n.default)(s.default.mark((function t(){var i,r,n,o,a,d,u;return s.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=e,r=i.delivery_type,i.logistics[i.seIndex].name,n=i.delivery_id,i.delivery_name,o={},o.delivery_type=r,o.delivery_code=i.logistics[i.seIndex].code,o.delivery_name=i.logistics[i.seIndex].name,o.type=i.active+1,1!=r||1!=e.curExpress){t.next=11;break}if(n){t.next=8;break}return t.abrupt("return",e.$util.Tips({title:"请填写快递单号"}));case 8:o.express_record_type=i.curExpress,o.delivery_id=n,i.curGoods?i.setSplitInfo(o):i.setInfo(o);case 11:if(1!=r||2!=e.curExpress){t.next=28;break}if(i.to_name){t.next=14;break}return t.abrupt("return",e.$util.Tips({title:"请填写寄件人姓名"}));case 14:if(i.to_tel){t.next=16;break}return t.abrupt("return",e.$util.Tips({title:"请填写寄件人手机号码"}));case 16:if(/^1[3456789]\d{9}$/.test(i.to_tel)){t.next=18;break}return t.abrupt("return",e.$util.Tips({title:"请填写寄件人手机号码"}));case 18:if(i.to_addr){t.next=20;break}return t.abrupt("return",e.$util.Tips({title:"请填写寄件人地址"}));case 20:if(0!=i.expTemp.length){t.next=22;break}return t.abrupt("return",e.$util.Tips({title:"请选择电子面单"}));case 22:o.express_record_type=i.curExpress,o.to_name=i.to_name,o.to_tel=i.to_tel,o.to_addr=i.to_addr,o.express_temp_id=i.expTemp[i.expIndex].temp_id,i.curGoods?i.setSplitInfo(o):i.setInfo(o);case 28:if(2!=r){t.next=38;break}if(i.postPeople.length){t.next=31;break}return t.abrupt("return",e.$util.Tips({title:"请在平台后台添加送货人"}));case 31:a=e.postPeople[e.postIndex],d={},d.type=i.delivery_type,d.sh_delivery_name=a.wx_name,d.sh_delivery_id=a.phone,d.sh_delivery_uid=a.uid,i.curGoods?i.setSplitInfo(d):i.setInfo(d);case 38:3==r&&(u={},u.type=i.delivery_type,u.fictitious_content=i.fictitious_content,i.curGoods?i.setSplitInfo(u):i.setInfo(u));case 39:case"end":return t.stop()}}),t)})))()},setInfo:function(t){var i=this,r=this,s="";s=o.setAdminOrderDelivery,s(r.delivery.id,t).then((function(t){r.$util.Tips({title:t.msg,icon:"success",mask:!0}),setTimeout((function(t){2==i.comeType?e.navigateTo({url:"/pages/admin/orderDetail/index?id="+i.order_id+"&storeNum="+i.storeNum}):e.navigateTo({url:"/pages/admin/orderList/index?types=1"})}),2e3)}),(function(e){r.$util.Tips({title:e})}))},setSplitInfo:function(t){var i=this;if(!this.cartIds.length)return this.$util.Tips({title:"请选择发货商品"});t.cart_ids=this.cartIds;var r="";r=this.storeNum?o.orderSplitDelivery:o.storeOrderSplitDelivery,r(this.delivery.id,t).then((function(t){i.$util.Tips({title:t.msg,icon:"success",mask:!0}),setTimeout((function(t){2==i.comeType?e.navigateTo({url:"/pages/admin/orderDetail/index?id="+i.order_id+"&storeNum="+i.storeNum}):e.navigateTo({url:"/pages/admin/orderList/index?types=1"})}),2e3)})).catch((function(e){i.$util.Tips({title:e})}))},bindPickerChange:function(e){this.seIndex=e.detail.value,this.getExpTemp(this.logistics[e.detail.value].code)},bindTempChange:function(e){this.expIndex=e.detail.value},getExpTemp:function(e){var t=this,i="";i=this.storeNum?o.orderExportTemp:o.storeOrderExportTemp,i({com:e}).then((function(e){t.expTemp=e.data.data}))},orderDeliveryInfo:function(){var e=this,t="";t=o.orderDeliveryInfo,t().then((function(t){e.to_name=t.data.to_name,e.to_tel=t.data.to_tel,e.to_addr=t.data.to_add}))}}};t.default=a}).call(this,i("df3c")["default"])},"439a":function(e,t,i){"use strict";i.r(t);var r=i("2ba5"),s=i("6519");for(var n in s)["default"].indexOf(n)<0&&function(e){i.d(t,e,(function(){return s[e]}))}(n);i("5331");var o=i("828b"),a=Object(o["a"])(s["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);t["default"]=a.exports},5331:function(e,t,i){"use strict";var r=i("1384"),s=i.n(r);s.a},6519:function(e,t,i){"use strict";i.r(t);var r=i("32fa"),s=i.n(r);for(var n in r)["default"].indexOf(n)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(n);t["default"]=s.a},fee2:function(e,t,i){"use strict";(function(e,t){var r=i("47a9");i("7561");r(i("3240"));var s=r(i("439a"));e.__webpack_require_UNI_MP_PLUGIN__=i,t(s.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])}},[["fee2","common/runtime","common/vendor"]]]);