yxk_pc_mdh/gyhl/static/js/29.1c5f5c6c6a88478955b5.js

1 line
30 KiB
JavaScript

webpackJsonp([29],{"1Sdv":function(t,e){},Ess9:function(t,e){},Xiis:function(t,e){},etLb:function(t,e){},ros4:function(t,e){},x3gj:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a("d7EF"),s=a.n(o),i=a("//Fk"),n=a.n(i),l=a("GKmE"),r=a("ysqt"),c=a("3MlD"),u=a("bzuE"),d={name:"upkeep_execution_all",components:{btnInput:r.a,dialogChooseSingleUser:c.a},data:function(){return{total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:10},planTime:"",statusList:[],getUserList:[],btnDelDisabled:!0,btnOtherDisabled:!0,chooseUserVisible:!1,rowIds:[],tableData:[],dialogVisible:!1,pictLoading:!1,totalCost:0,totalManHour:0,totalUpkeepCost:0,totalManhourCost:0,dialogRebutVisible:!1,reason:"",config:u.a}},created:function(){var t=this;document.onkeydown=function(e){"Enter"===e.key&&t.search()}},mounted:function(){this.getList(),this.initData()},methods:{getUser:function(t){t?(this.$set(this.search_data,"engineer_name",t.name),this.$set(this.search_data,"engineer_id",t.id)):(this.$set(this.search_data,"engineer_name",""),this.$set(this.search_data,"engineer_id",""))},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;n.a.all([this.$api.commonAPI.getUsers(),this.$api.dictAPI.getDictsByType("task_status")]).then(function(e){var a=s()(e,2),o=a[0],i=a[1];0===o.code&&(t.getUserList=o.datas),0===i.code&&(t.statusList=i.datas,t.statusList.push({id:999,name:"超时未处理"}))}).catch(function(t){console.log(t)})},getList:function(){var t=this;this.planTime?(this.search_data.start_time=Object(l.b)(this.planTime[0]),this.search_data.end_time=Object(l.b)(this.planTime[1])):(this.search_data.start_time="",this.search_data.end_time=""),this.pictLoading=!0,this.$api.upkeepPlanAPI.addValidRecords(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.totalCost=e.data.totalCost,t.totalManHour=e.data.totalManHour,t.totalManhourCost=e.data.totalManhourCost):(t.total=0,t.tableData=[])}).catch(function(t){console.log(t)})},getSummaries:function(t){t.columns,t.data;var e=[];return e[1]="总计",e[9]=this.totalManHour,e[10]=this.totalManhourCost,e[11]=this.totalCost,e[12]=this.totalUpkeepCost,e},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:"/upkeep/execution_add",query:{t:Date.now()}})},close:function(){var t=this,e=[];this.rowIds.forEach(function(t){e.push(t.id)});var a={recordIds:e,closureReason:this.reason};this.$confirm("确认关闭选中的保养单吗?","提示",{type:"warning"}).then(function(){t.$api.upkeepPlanAPI.closeRecordOfPase(a).then(function(e){0===e.code?(t.$message({message:e.msg,type:"success"}),t.getList(),t.dialogRebutVisible=!1):t.$message({message:e.msg?e.msg:"关闭巡检任务失败,请重试",type:"error"})}).catch(function(e){t.$message({message:"关闭巡检任务失败,请重试",type:"error"})})})},execution:function(){var t=this.rowIds[0];if(58!==t.result){t.plan_id;this.$router.push({path:"/upkeep/execution_handle",query:{planid:t.plan_id,id:t.id,t:Date.now()}})}else this.$alert("保养已完成验收,无法再次执行该保养!","提示",{type:"warning"})},viewDetail:function(t){146===t.result?this.$router.push({path:"/upkeep/execution_add",query:{id:t.id,t:Date.now()}}):this.$router.push({path:"/upkeep/execution_detail",query:{id:t.id,t:Date.now()}})},openDetails:function(t){this.$router.push({path:"/upkeep/detail",query:{id:t.id,t:Date.now()}})},complete:function(){var t=this.rowIds[0];if(58!==t.result){var e=t.id;this.$router.push({path:"/upkeep/execution_check",query:{id:e,t:Date.now()}})}else this.$alert("保养已完成验收,无法再次验收该保养!","提示",{type:"warning"})},remove:function(){var t=this,e=[];this.rowIds.forEach(function(t){e.push(t.id)});var a={recordId:e};this.$confirm("确认删除选中的保养记录吗?","提示",{type:"warning"}).then(function(){t.$api.upkeepPlanAPI.deletLargeRecord(a).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"})})})},handleSelectionChange:function(t){this.rowIds=t,this.setBtn(t)},setBtn:function(t){var e=!0,a=!0;t.length>0?(a=!1,1==t.length&&(e=!1)):(e=!0,a=!0),this.btnDelDisabled=a,this.btnOtherDisabled=e}}},h={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"knowledge-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{directives:[{name:"has",rawName:"v-has",value:"upkeep:execution:add",expression:"'upkeep:execution:add'"}],attrs:{type:"primary"},on:{click:function(e){return t.add()}}},[t._v("新增")]),t._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"upkeep:execution:remove",expression:"'upkeep:execution:remove'"}],attrs:{type:"primary",disabled:t.btnDelDisabled},on:{click:function(e){return t.remove()}}},[t._v("删除")])],1),t._v(" "),a("div",{staticClass:"sys-search"},[a("el-form",{staticClass:"form_item_search_out",attrs:{inline:""}},[a("div",{staticClass:"form_item_input_out"},[a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"22%"},attrs:{label:"设备名称"}},[a("el-input",{attrs:{placeholder:"请填写设备名称"},model:{value:t.search_data.deviceName,callback:function(e){t.$set(t.search_data,"deviceName",e)},expression:"search_data.deviceName"}})],1),t._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"34%"},attrs:{label:"计划时间"}},[a("el-date-picker",{attrs:{type:"daterange",clearable:"","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.planTime,callback:function(e){t.planTime=e},expression:"planTime"}})],1),t._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"22%"},attrs:{label:"保养状态"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:t.search_data.resultId,callback:function(e){t.$set(t.search_data,"resultId",e)},expression:"search_data.resultId"}},t._l(t.statusList,function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1)],1),t._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"22%"},attrs:{label:"负责人"}},[a("btn-input",{attrs:{valueText:t.search_data.engineer_name,valueId:t.search_data.engineer_id,chooseVisible:t.chooseUserVisible},on:{"update:valueText":function(e){return t.$set(t.search_data,"engineer_name",e)},"update:value-text":function(e){return t.$set(t.search_data,"engineer_name",e)},"update:valueId":function(e){return t.$set(t.search_data,"engineer_id",e)},"update:value-id":function(e){return t.$set(t.search_data,"engineer_id",e)},"update:chooseVisible":function(e){t.chooseUserVisible=e},"update:choose-visible":function(e){t.chooseUserVisible=e}}})],1)],1),t._v(" "),a("div",{staticClass:"form_item_btn_out"},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.search()}}},[t._v("查询")])],1)],1)])],1),t._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.pictLoading,expression:"pictLoading"}],ref:"tb",attrs:{border:"","summary-method":t.getSummaries,"show-summary":"",data:t.tableData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"sort-change":t.sortChange,"row-click":t.clickRow,"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"work_orderNo",width:"160",align:"center",label:"保养单号","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return t.viewDetail(e.row)}}},[t._v(t._s(e.row.work_orderNo))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"planName",align:"center",label:"保养名称","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"device_serialno",align:"center",label:"设备编号","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"deviceName",label:"设备名称","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"deviceModelas",align:"center",label:"规格型号",width:"50","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"dept_name",align:"center",label:"保养部门","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"username",align:"center",label:"保养负责人","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{sortable:"custom",prop:"start_time",align:"center",label:"计划开始时间",width:"124","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{sortable:"custom",prop:"end_time",align:"center",label:"计划结束时间",width:"124","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"man_hour",align:"center",label:"保养工时(小时)",width:"60","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"manhourCost",align:"center",label:"保养工时费(元)",width:"60","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"cost",align:"center",label:"保养材料费(元)",width:"60","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"totalCost",align:"center",label:"保养费(元)",width:"60","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"result_name",align:"center",label:"保养状态","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{sortable:"custom",prop:"recordResultId",align:"center",label:"验收结果",width:"124"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.record_result))])]}}])})],1)],1),t._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":t.search_data.pageno,"page-sizes":t.pageSizes,"page-size":t.search_data.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),t._v(" "),a("el-dialog",{attrs:{center:"",title:"关闭任务",visible:t.dialogRebutVisible,width:"500px"},on:{"update:visible":function(e){t.dialogRebutVisible=e}}},[a("el-form",{attrs:{"label-width":"60px"}},[a("el-form-item",{attrs:{label:"原因"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:4},placeholder:"请输入关闭原因"},model:{value:t.reason,callback:function(e){t.reason=e},expression:"reason"}})],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogRebutVisible=!1}}},[t._v(t._s(t.config.cancelText))]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.close()}}},[t._v("确定")])],1)],1),t._v(" "),a("dialogChooseSingleUser",{attrs:{visible:t.chooseUserVisible},on:{"update:visible":function(e){t.chooseUserVisible=e},change:t.getUser}})],1)},staticRenderFns:[]};var p={name:"upkeep_execution_unhandle",data:function(){return{total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:10,singleStatus:56,sort:"end_time",order:"asc"},planTime:"",statusList:[],getUserList:[],btnDelDisabled:!0,btnOtherDisabled:!0,rowIds:[],tableData:[],dialogVisible:!1,pictLoading:!1,totalCost:0,totalManHour:0,totalUpkeepCost:0,totalManhourCost:0,dialogRebutVisible:!1,reason:"",config:u.a}},created:function(){var t=this;document.onkeydown=function(e){"Enter"===e.key&&t.search()}},mounted:function(){this.getList(),this.initData()},methods:{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;n.a.all([this.$api.commonAPI.getUsers(),this.$api.dictAPI.getDictsByType("task_status")]).then(function(e){var a=s()(e,2),o=a[0],i=a[1];0===o.code&&(t.getUserList=o.datas),0===i.code&&(t.statusList=i.datas)}).catch(function(t){console.log(t)})},getList:function(){var t=this;this.planTime?(this.search_data.start_time=Object(l.b)(this.planTime[0]),this.search_data.end_time=Object(l.b)(this.planTime[1])):(this.search_data.start_time="",this.search_data.end_time=""),this.pictLoading=!0,this.$api.upkeepPlanAPI.addValidRecords(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.totalCost=e.data.totalCost,t.totalManhourCost=e.data.totalManhourCost,t.totalManHour=e.data.totalManHour):(t.total=0,t.tableData=[])}).catch(function(t){console.log(t)})},getSummaries:function(t){t.columns,t.data;var e=[];return e[1]="总计",e[9]=this.totalManHour,e[10]=this.totalManhourCost,e[11]=this.totalCost,e[12]=this.totalUpkeepCost,e},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:"/upkeep/execution_add",query:{t:Date.now()}})},close:function(){var t=this,e=[];this.rowIds.forEach(function(t){e.push(t.id)});var a={recordIds:e,closureReason:this.reason};this.$confirm("确认关闭选中的保养单吗?","提示",{type:"warning"}).then(function(){t.$api.upkeepPlanAPI.closeRecordOfPase(a).then(function(e){0===e.code?(t.$message({message:e.msg,type:"success"}),t.getList(),t.dialogRebutVisible=!1):t.$message({message:e.msg?e.msg:"关闭巡检任务失败,请重试",type:"error"})}).catch(function(e){t.$message({message:"关闭巡检任务失败,请重试",type:"error"})})})},execution:function(){var t=this.rowIds[0];if(58!==t.result){t.plan_id;this.$router.push({path:"/upkeep/execution_handle",query:{planid:t.plan_id,id:t.id,t:Date.now()}})}else this.$alert("保养已完成验收,您无法再次执行该保养!","提示",{type:"warning"})},viewDetail:function(t){this.$router.push({path:"/upkeep/execution_detail",query:{id:t.id,t:Date.now()}})},complete:function(){var t=this.rowIds[0];if(58!==t.result){var e=t.id;this.$router.push({path:"/upkeep/execution_check",query:{id:e,t:Date.now()}})}else this.$alert("保养已完成验收,您无法再次验收该保养!","提示",{type:"warning"})},remove:function(){var t=this,e=[];this.rowIds.forEach(function(t){e.push(t.id)});var a={ids:e};this.$confirm("确认删除选中的保养记录吗?","提示",{type:"warning"}).then(function(){t.$api.upkeepPlanAPI.batchRemove(a).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"})})})},handleSelectionChange:function(t){this.rowIds=t,this.setBtn(t)},setBtn:function(t){var e=!0,a=!0;t.length>0?(a=!1,1==t.length&&(e=!1)):(e=!0,a=!0),this.btnDelDisabled=a,this.btnOtherDisabled=e}}},m={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"knowledge-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{directives:[{name:"has",rawName:"v-has",value:"upkeep:execution:execution",expression:"'upkeep:execution:execution'"}],attrs:{type:"primary",disabled:t.btnOtherDisabled},on:{click:function(e){return t.execution()}}},[t._v("保养执行")]),t._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"upkeep:execution:close",expression:"'upkeep:execution:close'"}],attrs:{type:"primary",disabled:t.btnDelDisabled},on:{click:function(e){t.dialogRebutVisible=!0}}},[t._v("关闭任务")])],1),t._v(" "),a("div",{staticClass:"sys-search"},[a("el-form",{staticClass:"form_item_search_out",attrs:{inline:""}},[a("div",{staticClass:"form_item_input_out"},[a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"设备名称"}},[a("el-input",{attrs:{placeholder:"请填写设备名称"},model:{value:t.search_data.deviceName,callback:function(e){t.$set(t.search_data,"deviceName",e)},expression:"search_data.deviceName"}})],1),t._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"34%"},attrs:{label:"计划时间"}},[a("el-date-picker",{attrs:{type:"daterange",clearable:"","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.planTime,callback:function(e){t.planTime=e},expression:"planTime"}})],1)],1),t._v(" "),a("div",{staticClass:"form_item_btn_out"},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.search()}}},[t._v("查询")])],1)],1)])],1),t._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.pictLoading,expression:"pictLoading"}],ref:"tb",attrs:{border:"",fit:"","default-sort":{prop:"end_time",order:"ascending"},"summary-method":t.getSummaries,"show-summary":"",data:t.tableData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"sort-change":t.sortChange,"row-click":t.clickRow,"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"work_orderNo",width:"160",align:"center",label:"保养单号","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return t.viewDetail(e.row)}}},[t._v(t._s(e.row.work_orderNo))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"planName",align:"center",label:"保养名称","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"device_serialno",align:"center",label:"设备编号","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"deviceName",label:"设备名称","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"deviceModelas",align:"center",width:"50",label:"规格型号","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"dept_name",align:"center",label:"保养部门","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"username",align:"center",label:"保养负责人","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{sortable:"custom",prop:"start_time",align:"center",label:"计划开始时间",width:"124","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{sortable:"custom",prop:"end_time",align:"center",label:"计划结束时间",width:"124","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"man_hour",align:"center",label:"保养工时(小时)",width:"60","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"manhourCost",align:"center",label:"保养工时费(元)",width:"60","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"cost",align:"center",label:"保养材料费(元)",width:"60","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"totalCost",align:"center",label:"保养费(元)",width:"60","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"result_name",align:"center",label:"保养状态","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{sortable:"custom",prop:"recordResultId",align:"center",label:"验收结果",width:"124"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.record_result))])]}}])})],1)],1),t._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":t.search_data.pageno,"page-sizes":t.pageSizes,"page-size":t.search_data.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),t._v(" "),a("el-dialog",{attrs:{title:"关闭任务",visible:t.dialogRebutVisible,width:"500px"},on:{"update:visible":function(e){t.dialogRebutVisible=e}}},[a("el-form",{attrs:{"label-width":"60px"}},[a("el-form-item",{attrs:{label:"原因"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:4},placeholder:"请输入关闭原因"},model:{value:t.reason,callback:function(e){t.reason=e},expression:"reason"}})],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogRebutVisible=!1}}},[t._v(t._s(t.config.cancelText))]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.close()}}},[t._v("确定")])],1)],1)],1)},staticRenderFns:[]};var g={name:"upkeep_execution_unaccept",data:function(){return{total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:10,singleStatus:57},planTime:"",statusList:[],getUserList:[],btnDelDisabled:!0,btnOtherDisabled:!0,rowIds:[],tableData:[],dialogVisible:!1,pictLoading:!1,totalCost:0,totalManHour:0,totalUpkeepCost:0,totalManhourCost:0}},created:function(){var t=this;document.onkeydown=function(e){"Enter"===e.key&&t.search()}},mounted:function(){this.getList(),this.initData()},methods:{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;n.a.all([this.$api.commonAPI.getUsers(),this.$api.dictAPI.getDictsByType("task_status")]).then(function(e){var a=s()(e,2),o=a[0],i=a[1];0===o.code&&(t.getUserList=o.datas),0===i.code&&(t.statusList=i.datas)}).catch(function(t){console.log(t)})},getList:function(){var t=this;this.planTime?(this.search_data.start_time=Object(l.b)(this.planTime[0]),this.search_data.end_time=Object(l.b)(this.planTime[1])):(this.search_data.start_time="",this.search_data.end_time=""),this.pictLoading=!0,this.$api.upkeepPlanAPI.addValidRecords(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.totalCost=e.data.totalCost,t.totalManHour=e.data.totalManHour,t.totalManhourCost=e.data.totalManhourCost):(t.total=0,t.tableData=[])}).catch(function(t){console.log(t)})},getSummaries:function(t){t.columns,t.data;var e=[];return e[1]="总计",e[9]=this.totalManHour,e[10]=this.totalManhourCost,e[11]=this.totalCost,e[12]=this.totalUpkeepCost,e},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:"/upkeep/execution_add",query:{t:Date.now()}})},execution:function(){var t=this.rowIds[0];if(58!==t.result){t.plan_id;this.$router.push({path:"/upkeep/execution_add",query:{planid:t.plan_id,id:t.id,t:Date.now()}})}else this.$alert("保养已完成验收,您无法再次执行该保养!","提示",{type:"warning"})},viewDetail:function(t){this.$router.push({path:"/upkeep/execution_detail",query:{id:t.id,t:Date.now()}})},openDetails:function(t){this.$router.push({path:"/upkeep/detail",query:{id:t.id,t:Date.now()}})},complete:function(){var t=this.rowIds[0];if(58!==t.result){var e=t.id;this.$router.push({path:"/upkeep/execution_check",query:{id:e,t:Date.now()}})}else this.$alert("保养已完成验收,您无法再次验收该保养!","提示",{type:"warning"})},remove:function(){var t=this,e=[];this.rowIds.forEach(function(t){e.push(t.id)});var a={ids:e};this.$confirm("确认删除选中的保养记录吗?","提示",{type:"warning"}).then(function(){t.$api.upkeepPlanAPI.batchRemove(a).then(function(e){console.log(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"})})})},handleSelectionChange:function(t){this.rowIds=t,this.setBtn(t)},setBtn:function(t){var e=!0,a=!0;t.length>0?(a=!1,1==t.length&&(e=!1)):(e=!0,a=!0),this.btnDelDisabled=a,this.btnOtherDisabled=e}}},v={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"knowledge-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{directives:[{name:"has",rawName:"v-has",value:"upkeep:execution:complete",expression:"'upkeep:execution:complete'"}],attrs:{type:"primary",disabled:t.btnOtherDisabled},on:{click:function(e){return t.complete()}}},[t._v("验收评价")])],1),t._v(" "),a("div",{staticClass:"sys-search"},[a("el-form",{staticClass:"form_item_search_out",attrs:{inline:""}},[a("div",{staticClass:"form_item_input_out"},[a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"设备名称"}},[a("el-input",{attrs:{placeholder:"请填写设备名称"},model:{value:t.search_data.deviceName,callback:function(e){t.$set(t.search_data,"deviceName",e)},expression:"search_data.deviceName"}})],1),t._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"34%"},attrs:{label:"计划时间"}},[a("el-date-picker",{attrs:{type:"daterange",clearable:"","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.planTime,callback:function(e){t.planTime=e},expression:"planTime"}})],1)],1),t._v(" "),a("div",{staticClass:"form_item_btn_out"},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.search()}}},[t._v("查询")])],1)],1)])],1),t._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.pictLoading,expression:"pictLoading"}],ref:"tb",attrs:{border:"","summary-method":t.getSummaries,"show-summary":"",data:t.tableData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"sort-change":t.sortChange,"row-click":t.clickRow,"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"work_orderNo",width:"160",align:"center",label:"保养单号","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return t.viewDetail(e.row)}}},[t._v(t._s(e.row.work_orderNo))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"planName",align:"center",label:"保养名称","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"device_serialno",align:"center",label:"设备编号","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"deviceName",label:"设备名称","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"deviceModelas",align:"center",width:"50",label:"规格型号","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"dept_name",align:"center",label:"保养部门","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"username",align:"center",label:"保养负责人","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{sortable:"custom",prop:"start_time",align:"center",label:"计划开始时间",width:"124","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{sortable:"custom",prop:"end_time",align:"center",label:"计划结束时间",width:"124","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"man_hour",align:"center",label:"保养工时(小时)",width:"60","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"manhourCost",align:"center",label:"保养工时费(元)",width:"60","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"cost",align:"center",label:"保养材料费(元)",width:"60","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"totalCost",align:"center",label:"保养费(元)",width:"60","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"result_name",align:"center",label:"保养状态","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{sortable:"custom",prop:"recordResultId",align:"center",label:"验收结果",width:"124"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.record_result))])]}}])})],1)],1),t._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":t.search_data.pageno,"page-sizes":t.pageSizes,"page-size":t.search_data.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)])},staticRenderFns:[]};var f={name:"upkeep_execution",components:{MainPage:a("VU/8")(d,h,!1,function(t){a("1Sdv")},"data-v-0da94c7e",null).exports,HandlePage:a("VU/8")(p,m,!1,function(t){a("Xiis")},"data-v-23668468",null).exports,AcceptPage:a("VU/8")(g,v,!1,function(t){a("Ess9")},"data-v-4fbcbed8",null).exports},data:function(){return{firstShow:!1,secondShow:!1,threeShow:!1,activeName:"first"}},mounted:function(){var t=this;this.$nextTick(function(e){t.$route.query.activeName?t.activeName=t.$route.query.activeName:(t.activeName="first",t.firstShow=!0)})},watch:{activeName:function(t){switch(t){case"first":this.firstShow=!0;break;case"second":this.secondShow=!0;break;case"three":this.threeShow=!0}}},methods:{}},_={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"sys-box approve-box"},[a("div",{staticClass:"sys-tabs"},[a("el-tabs",{model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"",name:"first"}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("el-badge",{staticClass:"item"},[t._v("待处理")])],1),t._v(" "),t.firstShow?a("HandlePage"):t._e()],1),t._v(" "),a("el-tab-pane",{attrs:{label:"",name:"second"}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("el-badge",{staticClass:"item"},[t._v("待验收")])],1),t._v(" "),t.secondShow?a("AcceptPage"):t._e()],1),t._v(" "),a("el-tab-pane",{attrs:{label:"",name:"three"}},[a("span",{attrs:{slot:"label"},slot:"label"},[a("el-badge",{staticClass:"item"},[t._v("所有的")])],1),t._v(" "),t.threeShow?a("MainPage"):t._e()],1)],1)],1)])},staticRenderFns:[]};var b=a("VU/8")(f,_,!1,function(t){a("ros4"),a("etLb")},"data-v-02687b80",null);e.default=b.exports}});