(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/edit-logisitics/edit-logisitics"],{"12ce":function(e,s,o){"use strict";(function(e){Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0;var t=o("057a"),n={data:function(){return{num:"",logs:[],order_no:"",index:0,startDay:"2020-01-01",date:"",express_phone:"",express_company:"",express_code:"",express_no:"",img:"",showGuide:!0}},onLoad:function(e){var s=JSON.parse(decodeURIComponent(e.data));this.order_no=s.order_no,this.img=s.img,this.express_company=s.express_company,this.express_code=s.express_code,this.express_no=s.express_no,this.express_phone=s.express_phone,this.date=s.express_time,this.getCode()},methods:{getExpress:function(s){var o=this;(0,t.getExpress)({expressCode:s}).then((function(s){if(200==s.code){if(!s.data.Success)return e.showModal({content:"请重新扫码或手动选择输入",showCancel:!1}),!1;if(o.express_no=s.data.LogisticCode,s.data.Shippers){var t=s.data.Shippers[0],n=t.ShipperName,a=t.ShipperCode;o.express_company=n,o.express_code=a}else e.showModal({content:"请重新扫码或手动选择输入",showCancel:!1}),o.logsName=o.logsCode=""}else e.showModal({content:s.data||"获取数据失败",showCancel:!1})}))},getCode:function(){var s=this;(0,t.getLogsCode)().then((function(o){if(200==o.code){var t=o.data;for(var n in t)s.logs.push({code:n,name:t[n]})}else e.showModal({content:o.data||"获取物流公司失败",showCancel:!1})}))},bindPickerChange:function(e){var s=e.detail.value;this.index=s,this.express_company=this.logs[s].name,this.express_code=this.logs[s].code,console.log(this.express_code)},bindDateChange:function(e){this.date=e.target.value},submit:function(){var s=this;return this.express_no?"请选择物流公司"==this.express_company?(e.showModal({content:"物流名称不能为空",showCancel:!1}),!1):"顺丰速运"!=this.express_company||this.express_phone?this.date?void(0,t.editLog)({order_no:this.order_no,express_no:this.express_no,express_code:this.express_code,express_company:this.express_company,express_time:this.date,express_phone:this.express_phone}).then((function(o){200==o.code?e.showModal({content:"修改成功",showCancel:!1,success:function(o){o.confirm&&e.reLaunch({url:"../logistics-detail/logistics-detail?order_no="+s.order_no+"&img="+s.img})}}):e.showModal({content:o.data||"修改失败",showCancel:!1})})):(e.showModal({content:"发货日期不能为空",showCancel:!1}),!1):(e.showModal({content:"请输入收货人手机号",showCancel:!1}),!1):(e.showModal({content:"物流单号不能为空",showCancel:!1}),!1)}}};s.default=n}).call(this,o("543d")["default"])},"58b1":function(e,s,o){"use strict";o.r(s);var t=o("c1d8"),n=o("684c");for(var a in n)"default"!==a&&function(e){o.d(s,e,(function(){return n[e]}))}(a);o("768f");var i,r=o("f0c5"),c=Object(r["a"])(n["default"],t["b"],t["c"],!1,null,"0ffe4560",null,!1,t["a"],i);s["default"]=c.exports},6222:function(e,s,o){},"684c":function(e,s,o){"use strict";o.r(s);var t=o("12ce"),n=o.n(t);for(var a in t)"default"!==a&&function(e){o.d(s,e,(function(){return t[e]}))}(a);s["default"]=n.a},"768f":function(e,s,o){"use strict";var t=o("6222"),n=o.n(t);n.a},c1d8:function(e,s,o){"use strict";var t;o.d(s,"b",(function(){return n})),o.d(s,"c",(function(){return a})),o.d(s,"a",(function(){return t}));var n=function(){var e=this,s=e.$createElement;e._self._c;e._isMounted||(e.e0=function(s){e.showGuide=!1})},a=[]},e630:function(e,s,o){"use strict";(function(e){o("fdf4");t(o("66fd"));var s=t(o("58b1"));function t(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=o,e(s.default)}).call(this,o("543d")["createPage"])}},[["e630","common/runtime","common/vendor"]]]);