(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/send-goods/send-goods"],{112:function(e,n,t){"use strict";(function(e,n){var o=t(4);t(26);o(t(25));var s=o(t(113));e.__webpack_require_UNI_MP_PLUGIN__=t,n(s.default)}).call(this,t(1)["default"],t(2)["createPage"])},113:function(e,n,t){"use strict";t.r(n);var o=t(114),s=t(116);for(var a in s)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return s[e]}))}(a);t(118);var i,r=t(32),d=Object(r["default"])(s["default"],o["render"],o["staticRenderFns"],!1,null,"2ef5c2a6",null,!1,o["components"],i);d.options.__file="pages/send-goods/send-goods.vue",n["default"]=d.exports},114:function(e,n,t){"use strict";t.r(n);var o=t(115);t.d(n,"render",(function(){return o["render"]})),t.d(n,"staticRenderFns",(function(){return o["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return o["recyclableRender"]})),t.d(n,"components",(function(){return o["components"]}))},115:function(e,n,t){"use strict";var o;t.r(n),t.d(n,"render",(function(){return s})),t.d(n,"staticRenderFns",(function(){return i})),t.d(n,"recyclableRender",(function(){return a})),t.d(n,"components",(function(){return o}));var s=function(){var e=this,n=e.$createElement;e._self._c;e._isMounted||(e.e0=function(n){e.showGuide=!1})},a=!1,i=[];s._withStripped=!0},116:function(e,n,t){"use strict";t.r(n);var o=t(117),s=t.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(a);n["default"]=s.a},117:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=t(71),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 n=this;this.showGuide=!1,e.scanCode({success:function(e){var t=e.result;console.log(e,2222),n.getExpress(t)},fail:function(n){console.log(n,1111),e.showModal({content:"扫码失败",showCancel:!1})}})},getExpress:function(n){var t=this;e.showLoading({title:"识别中...",mask:!0}),(0,o.getExpress)({expressCode:n}).then((function(n){if(200==n.code){if(!n.data.Success)return e.showModal({content:"请重新扫码或手动选择输入",showCancel:!1}),!1;if(t.num=n.data.LogisticCode,n.data.Shippers){var o=n.data.Shippers[0],s=o.ShipperName,a=o.ShipperCode;t.logsName=s,t.logsCode=a}else e.showModal({content:"请重新扫码或手动选择输入",showCancel:!1}),t.logsName=t.logsCode=""}else e.showModal({content:n.data||"获取数据失败",showCancel:!1});e.hideLoading()})).catch((function(n){e.hideLoading()}))},addressList:function(){e.navigateTo({url:"../ads-list/ads-list?user_id="+this.user_id})},getCode:function(){var n=this;(0,o.getLogsCode)().then((function(t){if(200==t.code){var o=t.data;for(var s in o)n.logs.push({code:s,name:o[s]})}else e.showModal({content:t.data||"获取物流公司失败",showCancel:!1})}))},bindPickerChange:function(e){var n=e.detail.value;this.index=n,this.logsName=this.logs[n].name,this.logsCode=this.logs[n].code},bindDateChange:function(e){this.date=e.target.value,console.log(this.date)},getDate:function(e){var n=new Date,t=n.getFullYear(),o=n.getMonth()+1,s=n.getDate();return"start"===e?t-=60:"end"===e&&(t+=2),o=o>9?o:"0"+o,s=s>9?s:"0"+s,"".concat(t,"-").concat(o,"-").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,o.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(n){200==n.code?e.showModal({content:"发货成功",showCancel:!1,success:function(n){n.confirm&&e.reLaunch({url:"../order-manage/order-manage?status=3"})}}):e.showModal({content:n.data||"发货失败",showCancel:!1}),e.hideLoading()})).catch((function(n){e.hideLoading()}))):(e.showModal({content:"发货日期不能为空",showCancel:!1}),!1):(e.showModal({content:"请输入收货人手机号",showCancel:!1}),!1):(e.showModal({content:"物流单号不能为空",showCancel:!1}),!1)}}};n.default=s}).call(this,t(2)["default"])},118:function(e,n,t){"use strict";t.r(n);var o=t(119),s=t.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(a);n["default"]=s.a},119:function(e,n,t){}},[[112,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/send-goods/send-goods.js.map