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