(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/send-goods/send-goods"],{"0166":function(e,t,o){"use strict";o.r(t);var n=o("70fb"),s=o.n(n);for(var a in n)"default"!==a&&function(e){o.d(t,e,(function(){return n[e]}))}(a);t["default"]=s.a},"0eb4":function(e,t,o){"use strict";var n=o("2e2b"),s=o.n(n);s.a},"2e2b":function(e,t,o){},6869:function(e,t,o){"use strict";o.r(t);var n=o("8a8f"),s=o("0166");for(var a in s)"default"!==a&&function(e){o.d(t,e,(function(){return s[e]}))}(a);o("0eb4");var i,d=o("f0c5"),r=Object(d["a"])(s["default"],n["b"],n["c"],!1,null,"d565adba",null,!1,n["a"],i);t["default"]=r.exports},"70fb":function(e,t,o){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o("057a"),s={data:function(){var e=this.getDate({format:!0});return{num:"",logs:[],logsName:"",logsCode:"",order_no:"",index:0,date:e,startDay:"2020-01-01",user_id:"",address:"",defaultAds:"",ads:{province:"",city:"",area:"",location:""},userName:"",userPhone:"",userAds:"",express_phone:"",showGuide:!0}},onLoad:function(e){this.order_no=e.order_no,this.user_id=e.user_id,this.getCode()},methods:{scanCode:function(){var t=this;this.showGuide=!1,e.scanCode({success:function(e){var o=e.result;console.log(e,2222),t.getExpress(o)},fail:function(t){console.log(t,1111),e.showModal({content:"扫码失败",showCancel:!1})}})},getExpress:function(t){var o=this;e.showLoading({title:"识别中...",mask:!0}),(0,n.getExpress)({expressCode:t}).then((function(t){if(200==t.code){if(!t.data.Success)return e.showModal({content:"请重新扫码或手动选择输入",showCancel:!1}),!1;if(o.num=t.data.LogisticCode,t.data.Shippers){var n=t.data.Shippers[0],s=n.ShipperName,a=n.ShipperCode;o.logsName=s,o.logsCode=a}else e.showModal({content:"请重新扫码或手动选择输入",showCancel:!1}),o.logsName=o.logsCode=""}else e.showModal({content:t.data||"获取数据失败",showCancel:!1});e.hideLoading()})).catch((function(t){e.hideLoading()}))},addressList:function(){e.navigateTo({url:"../ads-list/ads-list?user_id="+this.user_id})},getCode:function(){var t=this;(0,n.getLogsCode)().then((function(o){if(200==o.code){var n=o.data;for(var s in n)t.logs.push({code:s,name:n[s]})}else e.showModal({content:o.data||"获取物流公司失败",showCancel:!1})}))},bindPickerChange:function(e){var t=e.detail.value;this.index=t,this.logsName=this.logs[t].name,this.logsCode=this.logs[t].code},bindDateChange:function(e){this.date=e.target.value,console.log(this.date)},getDate:function(e){var t=new Date,o=t.getFullYear(),n=t.getMonth()+1,s=t.getDate();return"start"===e?o-=60:"end"===e&&(o+=2),n=n>9?n:"0"+n,s=s>9?s:"0"+s,"".concat(o,"-").concat(n,"-").concat(s)},submit:function(){return this.num?"请选择物流公司"==this.logsName?(e.showModal({content:"物流名称不能为空",showCancel:!1}),!1):"顺丰速运"!=this.logsName||this.express_phone?this.date?(e.showLoading({title:"提交中...."}),void(0,n.addLogs)({order_no:this.order_no,express_no:this.num,express_code:this.logsCode,express_company:this.logsName,express_time:this.date,address_id:this.address.id||this.defaultAds.id||"",express_phone:this.express_phone}).then((function(t){200==t.code?e.showModal({content:"发货成功",showCancel:!1,success:function(t){t.confirm&&e.reLaunch({url:"../order-manage/order-manage?status=3"})}}):e.showModal({content:t.data||"发货失败",showCancel:!1}),e.hideLoading()})).catch((function(t){e.hideLoading()}))):(e.showModal({content:"发货日期不能为空",showCancel:!1}),!1):(e.showModal({content:"请输入收货人手机号",showCancel:!1}),!1):(e.showModal({content:"物流单号不能为空",showCancel:!1}),!1)}}};t.default=s}).call(this,o("543d")["default"])},"8a8f":function(e,t,o){"use strict";var n;o.d(t,"b",(function(){return s})),o.d(t,"c",(function(){return a})),o.d(t,"a",(function(){return n}));var s=function(){var e=this,t=e.$createElement;e._self._c;e._isMounted||(e.e0=function(t){e.showGuide=!1})},a=[]},fb4d:function(e,t,o){"use strict";(function(e){o("fdf4");n(o("66fd"));var t=n(o("6869"));function n(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=o,e(t.default)}).call(this,o("543d")["createPage"])}},[["fb4d","common/runtime","common/vendor"]]]);