1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
|
webpackJsonp([210],{bOJa:function(t,e){},hPSN:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("d7EF"),i=a.n(s),r=a("//Fk"),o=a.n(r),n=a("GKmE"),l={components:{DialogChooseSingleUser:a("3MlD").a},name:"repair_record_list",data:function(){return{advanceQueryDialogVisible:!1,formData:{},total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:10,startTime:"",endTime:"",time:"",status:"",heldPerson:"",createBy:"",title:"",weiwai:1},repairTime:"",getUserList:[],btnDelDisabled:!0,btnOtherDisabled:!0,rowIds:[],tableData:[],dialogVisible:!1,pictLoading:!1,chooseUserVisible:!1,hitchList:[],deviceStatusList:[],offHourTotal:0,costTotal:0,manHourTotal:0,manHourCostTotal:0,sparePartsCostTotal:0,resultList:[]}},created:function(){var t=this;document.onkeydown=function(e){"Enter"===e.key&&t.search()}},mounted:function(){this.getList(),this.initData(),this.initResultList()},methods:{moreSearch:function(){this.advanceQueryDialogVisible=!0},initResultList:function(){var t=this;this.$api.dictAPI.getDictsByType("acceptance_result").then(function(e){0===e.code&&(t.resultList=e.datas)})},save:function(){for(var t in this.formData)this.search_data[t]=this.formData[t];this.search_data.pageno=1,this.$nextTick(function(){this.advanceQueryDialogVisible=!1,this.getList()})},clear:function(){for(var t in this.formData)this.formData[t]="";this.$forceUpdate()},sortChange:function(t){var e={column:t.column,prop:t.prop,order:t.order},a="ascending"==e.order?"asc":"desc";this.$set(this.search_data,"sort",e.prop),this.$set(this.search_data,"order",a),this.getList()},clickRow:function(t){this.$refs.tb.toggleRowSelection(t)},initData:function(){var t=this;o.a.all([this.$api.commonAPI.getUsers(),this.$api.dictAPI.getDictsByType("device_malfunction"),this.$api.dictAPI.getDictsByType("device_status")]).then(function(e){var a=i()(e,5),s=a[0],r=a[1],o=a[2];a[3],a[4];0===s.code&&(t.getUserList=s.datas),0===r.code&&(t.hitchList=r.datas),0===o.code&&(t.deviceStatusList=o.datas)}).catch(function(t){console.log(t)})},getSummaries:function(t){var e=[];return e[1]="总计",e[11]=""+this.manHourCostTotal,e[10]=""+this.manHourTotal,e[5]=""+this.offHourTotal,e[12]=""+this.sparePartsCostTotal,e[13]=""+this.costTotal,e},getList:function(){var t=this;this.repairTime?(this.search_data.startTime=Object(n.b)(this.repairTime[0]),this.search_data.endTime=Object(n.b)(this.repairTime[1])):(this.search_data.startTime="",this.search_data.endTime=""),this.pictLoading=!0,this.$api.repairCheckAPI.deviceRepairEventList(this.search_data).then(function(e){t.pictLoading=!1,e.data?(t.total=e.data.totalRows,t.tableData=e.data.datas?e.data.datas:[],t.offHourTotal=e.offHourTotal,t.costTotal=e.costTotal,t.manHourTotal=e.manHourTotal,t.sparePartsCostTotal=e.sparePartsCostTotal,t.manHourCostTotal=e.manHourCostTotal):(t.total=0,t.tableData=[])}).catch(function(t){console.log(t)})},search:function(){this.search_data.pageno=1,this.getList()},handleCurrentChange:function(t){this.search_data.pageno=t,this.getList()},handleSizeChange:function(t){this.search_data.pagesize=t,this.getList()},add:function(){this.$router.push({path:"/wwbx/record_redact",query:{s:this.$route.path,t:Date.now()}})},getUser:function(t){var e=this,a=this.rowIds[0],s=t.id,i=a.reventId;this.$confirm("确认将维修单转派给"+t.name+"吗?","提示",{type:"warning"}).then(function(){e.$api.repairCheckAPI.reventTurnToSend({eventId:i,userId:s}).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getList()):e.$message({message:t.msg?"转派失败,请重试":t.msg,type:"error"})}).catch(function(t){e.$message({message:"转派失败,请重试",type:"error"})})})},send:function(){var t=this.rowIds[0];if(56===t.reventStatusId){t.id;this.chooseUserVisible=!0}else this.$alert("维修单已在处理进程中,您无法转派该维修单!","提示",{type:"warning"})},openDetails:function(t){146===t.statusId?this.$router.push({path:"/wwbx/record_redact",query:{id:t.id,eventid:t.eventId,s:this.$route.path,t:Date.now()}}):this.$router.push({path:"/wwbx/detail",query:{id:t.ev
|