detail.js 6.8 KB

1
  1. require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/subPackages/serve-confirm/detail"],{"0155":function(e,t,n){"use strict";var a=n("0172"),r=n.n(a);r.a},"0172":function(e,t,n){},"0614":function(e,t,n){"use strict";n.r(t);var a=n("1e02"),r=n.n(a);for(var i in a)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(i);t["default"]=r.a},"16ff":function(e,t,n){},"1e02":function(e,t,n){"use strict";(function(e){var a=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n("2eee")),i=a(n("448a")),s=a(n("9523")),o=a(n("c973")),l=n("2679");function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,s.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d={components:{TelNum:function(){n.e("pages/subPackages/components/tel-number/index").then(function(){return resolve(n("58c3"))}.bind(null,n)).catch(n.oe)},vanRate:function(){n.e("common/vendor").then(function(){return resolve(n("94f4"))}.bind(null,n)).catch(n.oe)}},data:function(){return{handleUserId2:"",userId2:"",dispatchUserId2:"",dic_key:["QUICK_SELECTION","REPAIR_STATUS"],dic_SelectList:{},detailId:"",handleUrlList:[],confirmForm:{status:"3"},fileUrls:[],handleUrls:[],detailStatus:"1",explainAnnexList:[],processedAnnexList:[],stepActive:0,processSteps:[{id:1,status:1,text:"上报"},{id:2,status:1,text:"已受理"},{id:3,status:1,text:"已处理"},{id:4,status:0,text:"已确认"}],evaluateVal:0,id:"",detail:{},fileUrlList:[],params:{id:"",handleUrl:"",handleTime:"",status:"processed"}}},onLoad:function(e){this.id=e.id,this.getByCodes()},methods:{getConfirmFormStatus:function(e){console.log(e),this.confirmForm.status=e.detail},getConfirmStatus:function(e){console.log(e)},getByCodes:function(){var e=this;return(0,o.default)(r.default.mark((function t(){var n;return r.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,l.getByCodes)(JSON.stringify(e.dic_key));case 2:n=t.sent,e.dic_SelectList=e.$common.handleDicList(n),e.getDetailById();case 5:case"end":return t.stop()}}),t)})))()},onSelect:function(e){this.value=e.text,this.params.handleUserId=e.value+"-"+e.text,this.showPicker=!1},onConfirm:function(){var t=this;return(0,o.default)(r.default.mark((function n(){var a,i,s;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(a=t,4!=a.confirmForm.status||a.confirmForm.confirmRemark&&0!=a.confirmForm.confirmRemark.length){n.next=4;break}return a.$showToast("如选择退回派单请填写原因"),n.abrupt("return");case 4:return console.log(a.confirmForm),i=u(u({},a.confirmForm),{},{userId:(0,l.getUserLocalStorageInfo)().user.id,id:a.id,reportRepairId:a.detail.reportRepairId,confirmRemark:a.confirmForm.confirmRemark}),n.next=8,(0,l.confirmReport)(i);case 8:s=n.sent,console.log(s),200==s.code&&(a.$showToast("提交成功"),e.navigateBack({}));case 11:case"end":return n.stop()}}),n)})))()},getDetailById:function(){var e=this,t=this;(0,l.getHandleInfoById)(t.id).then((function(n){if(console.log(n.data),n.data){var a=t.getItemJson(n.data);if(e.detail=a,e.detail.handleExplain=a.handleExplain,null!=a.dispatchUserId&&""!==a.dispatchUserId){var r=a.dispatchUserId.split("-");e.dispatchUserId2=r[1]+"-"+r[2]}null!=a.handleUserId&&""!==a.handleUserId&&(e.handleUserId2=a.handleUserName),e.handleUrlList=a.handleUrlList,console.log("asodmqowndonq",e.handleUrlList),a.fileUrl&&a.fileUrl.length>0&&(e.explainAnnexList=a.fileUrl.split(",").map((function(t){return{url:e.$constant.BASE_URI+"/wx/fileController/download/"+t,isImage:!0,deletable:!1}}))),e.detailStatus=a.status,e.params.remark=a.remark,e.confirmForm.confirmRemark="null"==a.confirmRemark?"":a.confirmRemark,e.confirmForm.status=a.status}}))},getItemJson:function(e){var t=this;e.handleTime||(e.handleTime=this.$common.transServDate(new Date));var n=e.handleUrl?e.handleUrl.split(","):[],a=[];switch(null!==n&&n.length>0&&n.forEach((function(e){a.push({url:t.$constant.BASE_URI+"/wx/fileController/download/"+e,isImage:!0})})),e.handleUrlList=a,console.log(e),e.serviceType=this.dic_SelectList.QUICK_SELECTION[e.serviceType-1].label,e.status){case"0":this.stepActive=0;break;case"1":this.stepActive=1;break;case"2":this.stepActive=2;break;case"3":this.stepActive=3;case"4":this.stepActive=4;case"5":this.stepActive=5;break}return e},afterRead:function(t){var n=this,a=t.detail.file;try{e.uploadFile({url:n.$constant.BASE_URI+"/wx/fileController/upload",filePath:a.url,name:"file",formData:{user:"test"},success:function(e){var t=JSON.parse(e.data),a=t.data;console.log(a[0]),n.handleUrlList.push({id:a[0],url:n.$constant.BASE_URI+"/FileController/download/"+a[0],isImage:!0}),n.handleUrlList=(0,i.default)(n.handleUrlList),n.$forceUpdate(),console.log(n.fileUrlList)},fail:function(e){}})}catch(r){}},beforeDelete:function(e,t){var n=this;return n.handleUrls.splice(t.index,1),function(e,a){var r=a.index;n.handleUrls[t.index].splice(r,1)}},uploadImg:function(e){var t=this,n=new FormData;n.append("file",e.file),console.log(n.get("file"));var a={headers:{"Content-Type":"multipart/form-data","MVVM-Key":String((new Date).getTime()),xx:"anything"}};return new Promise((function(e,r){axios.post("/smartParkH5Server/wx/fileController/upload",n,a).then((function(e){var n=e.data.data.substring(1,e.data.data.length);n=n.substring(0,n.length-1),t.handleUrls.push(t.$common.castEval(n))})).catch((function(e,t){r(e,t)}))}))}}};t.default=d}).call(this,n("543d")["default"])},"33f1":function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return a}));var a={uniEasyinput:function(){return n.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(n.bind(null,"2f62"))}},r=function(){var e=this.$createElement,t=(this._self._c,this.detail.contact&&this.detail.contact.length>0);this.$mp.data=Object.assign({},{$root:{g0:t}})},i=[]},"3b66":function(e,t,n){"use strict";n.r(t);var a=n("33f1"),r=n("0614");for(var i in r)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(i);n("e743"),n("0155");var s=n("f0c5"),o=Object(s["a"])(r["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);t["default"]=o.exports},5318:function(e,t,n){"use strict";(function(e,t){var a=n("4ea4");n("eaf5"),n("4a2a");a(n("66fd"));var r=a(n("3b66"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(r.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},e743:function(e,t,n){"use strict";var a=n("16ff"),r=n.n(a);r.a}},[["5318","common/runtime","common/vendor"]]]);