(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-admin-delivery-index"],{3222:function(e,t,i){"use strict";i.r(t);var r=i("77b7"),n=i.n(r);for(var a in r)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(a);t["default"]=n.a},"3c86":function(e,t,i){"use strict";i("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.checkPhone=function(e){return!!/^1(3|4|5|6|7|8|9)\d{9}$/.test(e)},t.isEmailAvailable=function(e){return!!/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/.test(e)},t.isMoney=function(e){return!!/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(e)},i("ac1f"),i("00b4")},"475c":function(e,t,i){"use strict";var r=i("5b68"),n=i.n(r);n.a},"5b68":function(e,t,i){var r=i("b096");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var n=i("4f06").default;n("5d74d71a",r,!0,{sourceMap:!1,shadowMode:!1})},"77b7":function(e,t,i){"use strict";i("7a82");var r=i("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i("c7eb")),a=r(i("1da1"));i("14d9"),i("d3b7"),i("159b"),i("d81d"),i("ac1f"),i("00b4"),i("1276");var o=i("ed0f"),s=i("26cb"),d=i("a60b"),u=(i("3c86"),i("8342")),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(i){1==e?(t.delivery_type=3,t.types=[{type:3,title:"虚拟发货"}]):(1==i.data.crmeb_serve_dump&&t.types.push({type:4,title:"电子面单"}),1==i.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,i){t.temp_id!=e.mer_config_temp_id||(e.expIndex=i)}))},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_num0?[i("v-uni-view",{staticClass:"list"},[1==e.delivery_type?[i("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[i("v-uni-view",[e._v("快递公司")]),i("v-uni-view",{staticClass:"select-box"},[i("v-uni-picker",{staticClass:"pickerBox",attrs:{value:e.seIndex,range:e.logistics,"range-key":"label"},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.bindPickerChange.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"uni-input"},[e._v(e._s(e.logistics[e.seIndex].label))])],1)],1)],1),i("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[i("v-uni-view",[e._v("快递单号")]),i("v-uni-input",{staticClass:"mode",attrs:{type:"text",placeholder:"填写快递单号"},model:{value:e.delivery_id,callback:function(t){e.delivery_id=t},expression:"delivery_id"}}),e.isWeixin?i("v-uni-text",{staticClass:"iconfont icon-xiangji",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.scanCode.apply(void 0,arguments)}}}):e._e()],1)]:e._e(),4==e.delivery_type?[i("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[i("v-uni-view",[e._v("快递公司")]),i("v-uni-view",{staticClass:"select-box"},[i("v-uni-picker",{staticClass:"pickerBox",attrs:{value:e.seIndex,range:e.logistics,"range-key":"label"},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.bindPickerChange.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"uni-input"},[e._v(e._s(e.logistics[e.seIndex].label))])],1)],1)],1),e.expTemp.length>0&&4==e.delivery_type?i("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[i("v-uni-view",[e._v("电子面单")]),i("div",{staticStyle:{display:"flex","align-items":"center"}},[i("v-uni-picker",{staticClass:"pickerBox",attrs:{value:e.expIndex,range:e.expTemp,"range-key":"title"},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.bindTempChange.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"uni-input input-inline"},[e._v(e._s(e.expTemp[e.expIndex].title))])],1),i("div",{staticClass:"look",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.previewImage.apply(void 0,arguments)}}},[e._v("预览")])],1)],1):e._e(),i("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[i("v-uni-view",[e._v("寄件人姓名")]),i("v-uni-input",{staticClass:"mode",attrs:{type:"text",placeholder:"填写寄件人姓名"},model:{value:e.from_name,callback:function(t){e.from_name=t},expression:"from_name"}})],1),i("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[i("v-uni-view",[e._v("寄件人电话")]),i("v-uni-input",{staticClass:"mode",attrs:{type:"text",placeholder:"填写寄件人电话"},model:{value:e.from_tel,callback:function(t){e.from_tel=t},expression:"from_tel"}})],1),i("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[i("v-uni-view",[e._v("寄件人地址")]),i("v-uni-input",{staticClass:"mode",attrs:{type:"text",placeholder:"填写寄件人地址"},model:{value:e.from_addr,callback:function(t){e.from_addr=t},expression:"from_addr"}})],1)]:e._e()],2)]:e._e(),2==e.delivery_type?i("v-uni-view",{staticClass:"list"},[i("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[i("v-uni-view",[e._v("送货人姓名")]),i("v-uni-input",{staticClass:"mode",attrs:{type:"text",placeholder:"填写送货人姓名",maxlength:"10"},model:{value:e.to_name,callback:function(t){e.to_name=t},expression:"to_name"}})],1),i("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[i("v-uni-view",[e._v("送货人电话")]),i("v-uni-input",{staticClass:"mode",attrs:{type:"text",placeholder:"填写送货人电话"},model:{value:e.to_phone,callback:function(t){e.to_phone=t},expression:"to_phone"}})],1)],1):e._e(),5==e.delivery_type?[i("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[i("v-uni-view",[e._v("发货点")]),i("v-uni-view",{staticClass:"select-box"},[i("v-uni-picker",{staticClass:"pickerBox",attrs:{value:e.storeIndex,range:e.storeList,"range-key":"label"},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.bindStoreChange.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"uni-input"},[e._v(e._s(e.storeList[e.storeIndex]&&e.storeList[e.storeIndex].label))])],1)],1)],1),i("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[i("v-uni-view",[e._v("包裹重量")]),i("v-uni-input",{staticClass:"mode",attrs:{type:"number",placeholder:"填写包裹重量"},model:{value:e.cargo_weight,callback:function(t){e.cargo_weight=t},expression:"cargo_weight"}})],1),i("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[i("v-uni-view",[e._v("配送备注")]),i("v-uni-input",{staticClass:"mode textarea",attrs:{type:"textarea",placeholder:"填写配送备注"},model:{value:e.mark,callback:function(t){e.mark=t},expression:"mark"}})],1)]:e._e(),i("v-uni-view",{staticClass:"list"},[i("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[i("v-uni-view",[e._v("发货备注")]),i("v-uni-input",{staticClass:"mode textarea",attrs:{type:"textarea",placeholder:"填写发货备注"},model:{value:e.remark,callback:function(t){e.remark=t},expression:"remark"}})],1)],1),e.delivery.orderProduct&&(e.delivery.orderProduct.length>1||1==e.delivery.orderProduct.length&&e.delivery.orderProduct[0]["refund_num"]>1)&&2!=e.activity_type?[i("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[i("v-uni-view",[e._v("分单发货")]),i("v-uni-view",{staticClass:"mode acea-row row-middle row-right"},e._l(e.splitList,(function(t,r){return i("v-uni-view",{key:r,staticClass:"goods",class:e.curSplit===t.key?"on":"",on:{click:function(i){arguments[0]=i=e.$handleEvent(i),e.changeSplit(t,r)}}},[i("span",{staticClass:"iconfont icon-xuanzhong2"}),e._v(e._s(t.title))])})),1)],1),e.curSplit?e._l(e.delivery.orderProduct,(function(t,r){return i("v-uni-view",[i("v-uni-view",{staticClass:"pro_list acea-row"},[i("v-uni-view",{staticClass:"checkbox",on:{click:function(i){i.stopPropagation(),arguments[0]=i=e.$handleEvent(i),e.checkedChange(t)}}},[t.checked?i("v-uni-text",{staticClass:"iconfont icon-xuanzhong1"}):i("v-uni-text",{staticClass:"iconfont icon-weixuanzhong"})],1),t.cart_info&&t.cart_info.product?i("v-uni-view",{staticClass:"picture"},[i("v-uni-image",{attrs:{src:t.cart_info.product.image}})],1):e._e(),t.cart_info&&t.cart_info.product?i("v-uni-view",{staticClass:"info"},[i("v-uni-view",{staticClass:"name line2"},[e._v(e._s(t.cart_info.product.store_name))]),t.cart_info&&t.cart_info.productAttr?i("v-uni-view",{staticClass:"info_sku"},[e._v(e._s(t.cart_info.productAttr.sku))]):e._e(),t.cart_info&&t.cart_info.productAttr?i("v-uni-view",{staticClass:"info_price"},[e._v("¥"),i("v-uni-text",[e._v(e._s(t.cart_info.productAttr.price))])],1):e._e(),i("v-uni-view",{staticClass:"carnum acea-row row-center-wrapper"},[i("v-uni-view",{staticClass:"reduce",class:t.numSub?"on":"",on:{click:function(i){i.stopPropagation(),arguments[0]=i=e.$handleEvent(i),e.subCart(t)}}},[e._v("-")]),i("v-uni-view",{staticClass:"num"},[e._v(e._s(t.split_num))]),i("v-uni-view",{staticClass:"plus",class:t.numAdd?"on":"",on:{click:function(i){i.stopPropagation(),arguments[0]=i=e.$handleEvent(i),e.addCart(t)}}},[e._v("+")])],1)],1):e._e()],1)],1)})):e._e()]:e._e(),e.curSplit?e._e():[e.delivery.orderProduct?i("v-uni-view",{staticClass:"pro_count"},[i("v-uni-view",{staticClass:"title"},[e._v("共"+e._s(e.delivery.orderProduct.length)+"件商品")]),e._l(e.delivery.orderProduct,(function(t,r){return i("v-uni-view",[i("v-uni-view",{staticClass:"pro_list acea-row"},[t.cart_info&&t.cart_info.product?i("v-uni-view",{staticClass:"picture"},[i("v-uni-image",{attrs:{src:t.cart_info.product.image}})],1):e._e(),t.cart_info&&t.cart_info.product?i("v-uni-view",{staticClass:"info pro_info"},[i("v-uni-view",{staticClass:"name line2"},[e._v(e._s(t.cart_info.product.store_name))]),t.cart_info&&t.cart_info.productAttr?i("v-uni-view",{staticClass:"info_sku"},[e._v(e._s(t.cart_info.productAttr.sku))]):e._e()],1):e._e(),t.cart_info&&t.cart_info.productAttr?i("v-uni-view",{staticClass:"pro_price"},[i("v-uni-view",{staticClass:"info_price"},[e._v("¥"+e._s(t.cart_info.productAttr.price))]),i("v-uni-view",{staticClass:"info_num"},[e._v("x"+e._s(t.product_num))]),t.product_num-t.refund_num>0?i("v-uni-view",{staticClass:"refund_num"},[e._v(e._s(t.product_num-t.refund_num)+"件"+e._s(1==t.is_refund?"退款中":2==t.is_refund?"已退款":3==t.is_refund?"全部退款":""))]):e._e()],1):e._e()],1)],1)})),i("v-uni-view",{staticClass:"footer"},[e._v("共"+e._s(e.delivery.orderProduct.length)+"件商品,应支付"),i("v-uni-text",[e._v("¥"+e._s(e.delivery.pay_price))]),e._v("(运费¥"+e._s(e.delivery.pay_postage)+")")],1)],2):e._e()]],2),i("v-uni-view",{staticStyle:{height:"5.4rem"}}),i("v-uni-view",{staticClass:"confirm_btn"},[i("v-uni-view",{staticClass:"confirm",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.saveInfo.apply(void 0,arguments)}}},[e._v("确认提交")])],1)],1)},n=[]}}]);