1 |
- require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/subPackages/todo/dispatch"],{"10b6":function(e,t,a){"use strict";(function(e,t){var i=a("4ea4");a("1416"),a("4a2a");i(a("66fd"));var n=i(a("140d"));e.__webpack_require_UNI_MP_PLUGIN__=a,t(n.default)}).call(this,a("bc2e")["default"],a("543d")["createPage"])},"140d":function(e,t,a){"use strict";a.r(t);var i=a("919f"),n=a("6936");for(var s in n)["default"].indexOf(s)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(s);a("5f41");var r=a("f0c5"),o=Object(r["a"])(n["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);t["default"]=o.exports},5227:function(e,t,a){},"5f41":function(e,t,a){"use strict";var i=a("5227"),n=a.n(i);n.a},6936:function(e,t,a){"use strict";a.r(t);var i=a("9ef1"),n=a.n(i);for(var s in i)["default"].indexOf(s)<0&&function(e){a.d(t,e,(function(){return i[e]}))}(s);t["default"]=n.a},"919f":function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return n})),a.d(t,"a",(function(){}));var i=function(){var e=this,t=e.$createElement;e._self._c;e._isMounted||(e.e0=function(t){e.showPicker=!0},e.e1=function(t){return e.onSelect(t)},e.e2=function(t){e.showPicker=!1})},n=[]},"9ef1":function(e,t,a){"use strict";(function(e,i){var n=a("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=n(a("2eee")),r=n(a("c973")),o=a("7982"),l={data:function(){return{getUserLocalStorageInfo:(0,o.getUserLocalStorageInfo)(),showPicker:!1,dc_key:["QUICK_SELECTION"],isCheck:!1,isCheck2:!1,detail:{},checkList:[],fileList:[],optionsType:"2",timeNow:"",value:"5",id:"",dic_SelectList:[],explainAnnexList:[],stepActive:"0",dispatchPerson:[],params:{id:"",status:"acceptance",dispatchUserId:(0,o.getUserLocalStorageInfo)().userId,dispatchUserName:(0,o.getUserLocalStorageInfo)().username,handleUserName:"",dispatchTime:this.$common.transServDate(new Date),handleUserId:"",remark:""},handleParams:{id:"",status:"processed",handleUrl:"",handleTime:"",handleUserId:(0,o.getUserLocalStorageInfo)().userId,handleUserName:(0,o.getUserLocalStorageInfo)().username},handler:"",handleUrlList:[]}},onLoad:function(t){var a=JSON.parse(t.item);this.id=a.id,"待处理"===t.type?e.setNavigationBarTitle({title:"报修处理"}):"已处理"===t.type?e.setNavigationBarTitle({title:"报修详情"}):e.setNavigationBarTitle({title:"报修派单"}),this.getByCodes()},mounted:function(){this.getTime(),this.getDispatch()},methods:{onConfirm:function(t){if("1"==this.optionsType){if(null==this.params.handleUserId||""===this.params.handleUserId)return void e.showToast({title:"请选择处理人",icon:"none",mask:!0,duration:1e3});this.params.id=this.id,(0,o.editRepair)(this.params).then((function(t){200===t.code?(e.showToast({title:"派单成功",icon:"none",mask:!0,duration:1e3}),e.navigateBack({})):e.showToast({title:t.msg,icon:"none",mask:!0,duration:1e3})}))}else{if(this.fileList.length<=0||!this.fileList)return void e.showToast({title:"请上传处理图片",icon:"none",mask:!0,duration:1e3});"待受理"===this.stepActive&&(this.handleParams.dispatchUserId=this.getUserLocalStorageInfo.userId,this.handleParams.dispatchUserName=this.getUserLocalStorageInfo.username,this.handleParams.dispatchTime=this.$common.transServDate(new Date),this.handleParams.remark=null),this.handleParams.id=this.id,this.handleParams.handleUrl=JSON.stringify(this.fileList),this.handleParams.handleTime=this.$common.transServDate(new Date),(0,o.editRepair)(this.handleParams).then((function(t){200===t.code?(e.showToast({title:"处理成功",icon:"none",mask:!0,duration:1e3}),e.navigateBack({})):e.showToast({title:t.msg,icon:"none",mask:!0,duration:1e3})}))}},changeRemark:function(e){this.params.remark=e.detail},onSelect:function(e){this.handler=e.detail.value.text,this.params.handleUserId=e.detail.value.value,this.params.handleUserName=e.detail.value.text,this.showPicker=!1},changeHandle:function(e){this.optionsType=e.detail},getDispatch:function(){var e=this;(0,o.getDispatchToPerson)({}).then((function(t){e.dispatchPerson=t.data}))},clickImg:function(e){i.previewImage({urls:[e],current:"",success:function(e){},fail:function(e){},complete:function(e){}})},getByCodes:function(){var e=this;return(0,r.default)(s.default.mark((function t(){var a;return s.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,o.getByCodes)(JSON.stringify(e.dc_key));case 2:a=t.sent,e.dic_SelectList=e.$common.handleDicList(a),e.checkList=e.dic_SelectList.QUICK_SELECTION,e.getById();case 6:case"end":return t.stop()}}),t)})))()},getById:function(){var e=this,t=this;(0,o.getRepairDispatchById)(this.id).then((function(a){if(a.data){var i=t.getItemJson(a.data);e.detail=i,e.explainAnnexList=i.fileUrlList,e.handleUrlList=i.handleUrlList,e.detailStatus=i.status}}))},getTime:function(){(new Date).getTime(),(new Date).toLocaleDateString();var e=new Date,t=e.getFullYear(),a=e.getMonth()+1,i=e.getDate(),n=e.getHours(),s=e.getMinutes(),r="".concat(t,"-").concat(a,"-").concat(i," ").concat(n,":").concat(s<10?"0"+s:s);return console.log(r),this.timeNow=r,r},getItemJson:function(e){e.releaseTime=this.$common.transDate(e.releaseTime),e.createdAt=this.$common.transDate(e.createdAt);var t=this.dic_SelectList.QUICK_SELECTION.reduce((function(e,t){return e[t.value]=t.label,e}),{});if(e.serviceType=t[e.serviceType],e.userId){var a=e.userId.split("-");e.userPhone=a[1]+"-"+a[2],e.phone=a[2]}if(e.handleUserId){var i=e.handleUserId.split("-");e.handleUserId=i[1]+"-"+i[2],e.hanleUserPhone=i[2]}switch(e.status){case"unAcceptance":this.stepActive="待受理";break;case"acceptance":this.stepActive="已受理";break;case"processed":this.stepActive="已处理";break;case"unSubmit":this.stepActive="暂存";break}if(e.fileUrl){var n=JSON.parse(e.fileUrl),s=[];n.forEach((function(e){s.push({imgUrl:e.imgUrl,id:e.id,url:e.url,type:e.type})})),e.fileUrlList=s}if(e.handleUrl){var r=JSON.parse(e.handleUrl),o=[];r.forEach((function(e){o.push({imgUrl:e.imgUrl,id:e.id,url:e.url,type:e.type})})),e.handleUrlList=o}var l=JSON.parse(e.handleUrl),c=[];return null!==l&&l.length>0&&l.forEach((function(e){if(e.url){var t={type:"image",url:e.url.replace("/server","/smartParkH5Server")};c.push(t)}})),e.handleUrlList=c,console.log("item",e),e},closePage:function(){e.navigateBack({})},deleteRYXXZP:function(e){this.fileList.splice(e.detail.index,1),this.$forceUpdate()},uploadRYXXZP:function(t){var a=this,i=t.detail.file;e.uploadFile({url:a.$constant.BASE_URI+"/wx/fileController/upload",filePath:i.url,name:"file",formData:{user:"test"},success:function(e){var t=JSON.parse(e.data);a.fileList.push({imgUrl:"/FileController/download/"+t.data[0],id:t.data[0],url:a.$constant.BASE_URI+"/FileController/download/"+t.data[0],isImage:!0})},fail:function(e){}})}}};t.default=l}).call(this,a("543d")["default"],a("bc2e")["default"])}},[["10b6","common/runtime","common/vendor"]]]);
|