1 line
30 KiB
JavaScript
1 line
30 KiB
JavaScript
![]() |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-admin-delivery-index"],{"2b32":function(e,t,r){"use strict";r("7a82");var i=r("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r("c7eb")),a=i(r("1da1"));r("14d9"),r("d3b7"),r("159b"),r("d81d"),r("ac1f"),r("00b4"),r("1276");var o=r("8a83"),s=r("26cb"),d=r("736a"),u=(r("366b"),r("3093")),c={name:"GoodsDeliver",components:{},props:{},data:function(){return{types:[{type:1,title:"发货"},{type:2,title:"送货"},{type:3,title:"无需物流"}],splitList:[{title:"开启",key:1},{title:"关闭",key:0}],curSplit:0,curExpress:1,active:0,order_id:"",delivery:{user:{}},logistics:[],delivery_type:1,delivery_name:"",to_phone:"",to_name:"",remark:"",mark:"",cargo_weight:0,delivery_id:"",mer_config_temp_id:"",mer_from_com:"",seIndex:0,storeIndex:0,merId:"",expIndex:0,expTemp:[],from_name:"",from_tel:"",from_addr:"",fictitious_content:"",isTemp:!1,isDelivery:!1,is_virtual:0,splitProducts:[],storeList:[],activity_type:0,domain:u.HTTP_REQUEST_URL,isWeixin:this.$wechat.isWeixin()}},watch:{"$route.params.oid":function(e){void 0!=e&&(this.order_id=e,this.getIndex())}},computed:(0,s.mapGetters)(["viewColor"]),onLoad:function(e){this.order_id=e.id,this.merId=e.merId,this.getIndex(),this.expressList(),this.orderDeliveryInfo()},methods:{scanCode:function(){this.$wechat.isWeixin()&&this.$wechat.wechatEvevt("scanQRCode",{needResult:1,scanType:["barCode"]}).then((function(e){var t=e.resultStr.split(",");that.delivery_id=1==t.length?t[0]:t[1]}))},previewImage:function(){uni.previewImage({urls:[this.expTemp[this.expIndex].pic],success:function(){},fail:function(e){}})},isOpenDeliveryTemp:function(e){var t=this;(0,o.getTempAndDelivery)(t.merId).then((function(r){1==e?(t.delivery_type=3,t.types=[{type:3,title:"虚拟发货"}]):(1==r.data.crmeb_serve_dump&&t.types.push({type:4,title:"电子面单"}),1==r.data.delivery_status&&t.types.push({type:5,title:"同城配送"}))}),(function(e){t.$util.Tips({title:e})}))},getDump:function(){var e=this;e.expTemp.forEach((function(t,r){t.temp_id!=e.mer_config_temp_id||(e.expIndex=r)}))},getStoreList:function(){var e=this;(0,o.getDeliveryStoreLst)(this.merId).then((function(t){e.storeList=t.data})).catch((function(t){e.$util.Tips({title:t})}))},changeType:function(e,t){this.active=t,this.delivery_type=e.type,this.delivery_name="",this.delivery_id="",5==e.type&&this.getStoreList()},changeSplit:function(e,t){this.curSplit=e.key},getIndex:function(){var e=this;(0,o.getAdminOrderDetail)(e.merId,e.order_id).then((function(t){t.data.orderProduct.forEach((function(e,t){e.checked=!0,e.split_num=e.refund_num})),e.delivery=t.data,e.activity_type=t.data.activity_type,e.is_virtual=t.data.is_virtual,e.isOpenDeliveryTemp(e.is_virtual)}),(function(t){e.$util.Tips({title:t})}))},expressList:function(){var e=this;(0,d.expressList)().then((function(t){e.logistics=t.data,e.getExpTemp(t.data[0].value)}),(function(t){e.$util.Tips({title:t})}))},checkedChange:function(e){e.checked=!e.checked},getSplitProduct:function(){var e=[];return this.delivery.orderProduct.map((function(t){t.checked&&e.push({id:t.order_product_id,num:t.split_num})})),e},subCart:function(e){e.split_num>1&&e.split_num--},addCart:function(e){e.split_num<e.refund_num&&e.split_num++},saveInfo:function(){var e=this;return(0,a.default)((0,n.default)().mark((function t(){var r,i,a,o,s;return(0,n.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=e,i=r.delivery_type,a=r.logistics[r.seIndex].value,o=r.delivery_id,s={},s.delivery_name=a,s.delivery_type=i,s.is_split=r.curSplit,!r.curSplit){t.next=8;break}if(r.splitProducts=r.getSplitProduct(),0!=r.splitProducts.length){t.next=8;break}return t.abrupt("return",e.$util.Tips({title:"请选择分单商品"}));case 8:if(s.split=r.splitProducts,1!=i){t.next=14;break}if(o){t.next=12;break}return t.abrupt("return",e.$util.Tips({title:"请填写快递单号"}));case 12:s.delivery_id=o,r.setInfo(s);case 14:if(2!=i){t.next=24;break}if(r.to_name){t.next=17;break}return t.abrupt("return",e.$util.Tips({title:"请填<EFBFBD><EFBFBD>
|