(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/examine/index"],{1972:function(e,t,i){"use strict";i.r(t);var n=i("fc6c"),r=i("75b0");for(var a in r)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return r[e]}))}(a);i("88e6");var o=i("828b"),u=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"4a905164",null,!1,n["a"],void 0);t["default"]=u.exports},3560:function(e,t,i){"use strict";(function(e,n){var r=i("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(i("7eb4")),o=r(i("7ca3")),u=r(i("ee10")),s=i("c8e5"),c=r(i("8dcb")),l=r(i("3500")),m=r(i("da42"));function d(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function f(e){for(var t=1;t0)return!0;if(0==e.dictValue){if(this.mapList["1"]&&0==this.mapList["1"].length)return!0;if(e.count>0)return!0}else if(this.mapList["0"]&&0==this.mapList["0"].length)return!0;return!1},getBtnSuccess:function(e){return 1==e.dictValue&&e.count>0||(0==e.dictValue&&e.count>0||(4==e.dictValue&&e.count>0||(5==e.dictValue&&e.count>0||(8==e.dictValue&&e.count>0||100==e.dictValue&&e.count>0))))},getDictList:function(){var e=this;return(0,u.default)(a.default.mark((function t(){var i,n,r,o,u;return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,s.getcarType)("fee_type");case 2:return i=t.sent,e.range=i.map((function(e){return{value:e.dictValue,text:e.dictLabel}})),t.next=6,(0,s.getcarType)("sys_currency");case 6:return n=t.sent,e.currencyRange=n.map((function(e){return{value:e.dictValue,text:e.dictLabel}})),t.next=10,(0,s.getcarType)("trip_type");case 10:return r=t.sent,e.actionButtonRows=r||[],t.next=14,(0,s.tmsTripList)(e.formData.id);case 14:if(t.t0=t.sent,t.t0){t.next=17;break}t.t0=[];case 17:o=t.t0,u=p(o,"tripType"),e.actionButtonRows.forEach((function(e){e.count=u[e.dictValue]?u[e.dictValue].length:0})),e.$forceUpdate(),e.mapList=u,e.tmsTripTables=o;case 23:case"end":return t.stop()}}),t)})))()},getDispatch:function(){var e=this,t=[];this.ishowDisplay?(this.infoList=[{label:"调度单号",value:""},{label:"运输工具号码",value:""},{label:"路线",value:""},{label:"客户",value:""},{label:"当前状态",value:"待发车",status:!0},{label:"要求最晚发车时间",value:""},{label:"装货地",value:""},{label:"卸货地",value:""}],t={dispatchNo:"调度单号",licensePlate:"运输工具号码",transportLine:"路线",customerName:"客户",statusStr:"当前状态",latestDeparture:"要求最晚发车时间",shipperAddress:"装货地",receiverAddress:"卸货地"}):(this.infoList=[{label:"调度单号",value:""},{label:"运输工具号码",value:""},{label:"路线",value:""},{label:"客户",value:""},{label:"完成时间",value:""},{label:"装货地",value:""},{label:"卸货地",value:""}],t={dispatchNo:"调度单号",licensePlate:"运输工具号码",transportLine:"路线",customerName:"客户",okTime:"完成时间",shipperAddress:"装货地",receiverAddress:"卸货地"}),(0,s.getcarDispatch)(this.formData.id).then((function(i){e.newForm=i,e.infoList=e.infoList.map((function(e){var n=Object.keys(t).find((function(i){return t[i]===e.label}));return n&&void 0!==i[n]?f(f({},e),{},{value:i[n]}):e}))})).catch((function(e){console.error("获取调度信息失败:",e)}))},getCurrentDateTime:function(){var e=new Date,t=e.getFullYear(),i=(e.getMonth()+1).toString().padStart(2,"0"),n=e.getDate().toString().padStart(2,"0"),r=e.getHours().toString().padStart(2,"0"),a=e.getMinutes().toString().padStart(2,"0"),o=e.getSeconds().toString().padStart(2,"0");return t+"-"+i+"-"+n+" "+r+":"+a+":"+o},goThistory:function(){var t=this;setTimeout((function(){e.$u.route("/pages/travelItinerary/index?id="+t.formData.id+"&name=行程历史&statusStr="+t.formData.statusStr+"&router=/pages/examine/index")}),1e3)},getList:function(){var e=this;(0,s.getcarType)("trip_type").then((function(t){e.actionButtonRows=t,t.length>0&&(0,s.tmsTripList)(e.formData.id).then((function(t){e.historyList=t,console.log(e.historyList,"this.historyList"),e.historyList.forEach((function(t){var i=e.actionButtonArray.find((function(e){return e.dictValue==t.tripType}));t.statusStr=i?i.dictLabel:""}))})).catch((function(e){console.error("获取调度信息失败:",e)}))})).catch((function(e){})),(0,s.getcarType)("fee_type").then((function(t){e.feeTypeList=t,e.range=t.map((function(e){return{value:e.dictValue,text:e.dictLabel}}))})).catch((function(e){})),(0,s.getcarType)("sys_currency").then((function(t){e.currencyList=t,e.currencyRange=t.map((function(e){return{value:e.dictValue,text:e.dictLabel}}))})).catch((function(e){}))},getLocation:function(){var e=this;n.getLocation({type:"gcj02",success:function(t){var i=t.latitude,n=t.longitude;e.getAddress(i,n)},fail:function(e){console.error("获取位置失败:",e),n.showToast({title:"获取位置失败"+e,icon:"none"})}})},getAddress:function(e,t){var i=this;this.amapPlugin.getRegeo({location:"".concat(t,",").concat(e),success:function(e){i.form.address=e[0].name},fail:function(i){console.error("SDK调用失败:",i),n.showToast({title:"地址解析失败"+JSON.stringify(i)+e+t,icon:"none"})}})},switchTab:function(e){this.activeTab=e,this.form={address:"",tripTime:"",odometer:0,tripType:"",actualFeeAmount:0},this.fileList=[],this.selectedAction=""},closeAction:function(){this.show=!1},selectAction:function(e){var t=this;if(this.getBtnSuccess(e))return this.activeActive=this.mapList[e.dictValue][0],this.activeActive.voucherUrl?this.activeActive.feeVoucherUrl=this.activeActive.voucherUrl.split(",").filter((function(e){return""!==e.trim()})):this.activeActive.feeVoucherUrl=[],void(this.show=!0);if(!this.getBtnDisabled(e)){var i=e.dictValue;if(this.selectedAction=i,console.log(i),this.uploadAreas="0"==i?[{name:"仪表盘",imageUrl:"",required:!0},{name:"左前方",imageUrl:"",required:!0},{name:"右前方",imageUrl:"",required:!0},{name:"后方",imageUrl:"",required:!0},{name:"开箱检查",imageUrl:"",required:!0}]:"1"==i?[{name:"血压酒精",imageUrl:"",required:!0},{name:"登记表",imageUrl:"",required:!0}]:"2"==i||"6"==i?[{name:"车头",imageUrl:"",required:!0},{name:"车尾(非必填)",imageUrl:"",required:!1},{name:"仪表盘(非必填)",imageUrl:"",required:!1}]:"3"==i||"7"==i?[{name:"车头",imageUrl:"",required:!0},{name:"车尾",imageUrl:"",required:!0},{name:"仪表盘(非必填)",imageUrl:"",required:!1}]:"4"==i||"5"==i?[{name:"仪表盘(非必填)",imageUrl:"",required:!1},{name:"车头(非必填)",imageUrl:"",required:!1},{name:"车尾(非必填)",imageUrl:"",required:!1}]:[{name:"车头",imageUrl:"",required:!0},{name:"仪表盘",imageUrl:"",required:!0},{name:"车尾",imageUrl:"",required:!0}],this.form.tripType=i,"1"!==i){if(["3","5","7"].includes(i)){var n=this.tmsTripTables[0]||{};this.form.odometer=n.odometer}else this.form.odometer=0;this.$nextTick((function(){t.showPopup=!0}))}}},maskClick:function(){},afterRead:function(e){var t=this;return(0,u.default)(a.default.mark((function i(){var n,r,o,u,s;return a.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:n=[].concat(e.file),r=t.fileList.length,n.map((function(e){t.fileList.push(f(f({},e),{},{status:"success",message:"上传中"}))})),o=0;case 4:if(!(o0,a=e.getBtnDisabled(t),o=e.getBtnSuccess(t);return{$orig:n,g0:r,m0:a,m1:o}})):null),n=!e.activeActive.feeVoucherUrl||0===e.activeActive.feeVoucherUrl.length;e._isMounted||(e.e0=function(t){e.showPopup=!1},e.e1=function(t){e.showPopup=!1}),e.$mp.data=Object.assign({},{$root:{l0:i,g1:n}})},a=[]}},[["8e4a","common/runtime","common/vendor"]]]);