1 line
10 KiB
JavaScript
1 line
10 KiB
JavaScript
webpackJsonp([364],{"1enm":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("d7EF"),o=r.n(a),s=r("//Fk"),i=r.n(s),l=r("Dd8w"),n=r.n(l),f=r("ysqt"),c=r("3MlD"),m=r("6n/8"),u=r("GKmE"),d=r("NYxO"),p=r("bzuE"),h=r("lbHh"),v=r.n(h),b="/apis/hl/ahgl/xcjc/detail",g="/apis/hl/ahgl/xcjc/audit",I={components:{yxkUpload:m.a,DialogChooseSingleUser:c.a,btnInput:f.a},computed:n()({},Object(d.c)({userInfo:"user/getUserInfo"})),name:"repair_check",data:function(){var e=this;return{loading:!1,chooseUserVisible:!1,formData:{},colors:["#99A9BF","#F7BA2A","#FF9900"],resultList:[],form:{},ruleForm:{sxtp:[{required:!0,message:"请选择现场图片",trigger:"change"}],clry:[{required:!0,message:"请选择处理人员",trigger:"change"}],zgtp:[{required:!0,message:"请选择整改图片",trigger:"change"}],result:[{required:!0,message:"请选择验收结果",trigger:"change"}],content:[{required:!0,message:"请简要填写验收意见",trigger:"blur"}],xlGrade:[{required:!0,validator:function(t,r,a){0===e.form.qaGrade?a(new Error("请为完成效率打分")):a()},trigger:"blur"}],qaGrade:[{required:!0,validator:function(t,r,a){0===e.form.qaGrade?a(new Error("请为完成质量打分")):a()},trigger:"blur"}],tdGrade:[{required:!0,validator:function(t,r,a){0===e.form.tdGrade?a(new Error("请为工作态度打分")):a()},trigger:"blur"}]},redirect:"",isDisabled:!1,config:p.a,formInfo:{},userInfo:{}}},mounted:function(){this.userInfo=JSON.parse(v.a.get("userInfo"));var e=JSON.parse(v.a.get("userInfo")),t=e.name,r=e.userId;this.$set(this.formData,"spry",t),this.$set(this.formData,"spryid",r),this.$set(this.formData,"sprq",Object(u.f)(new Date)),this.form.eventId=this.$route.query.id,this.$route.query.redirect&&(this.redirect=this.$route.query.redirect),this.initialize(),this.getDetail()},methods:n()({},Object(d.b)({commonActionGetUsers:"user/getUsersAction"}),Object(d.d)({removeTagNav:"tagNav/removeTagNav"}),{initialize:function(){var e=this;i.a.all([this.$api.dictAPI.getDictsByType("acceptance_result")]).then(function(t){var r=o()(t,1)[0];0===r.code&&(e.resultList=r.datas)}).catch(function(e){console.log(e)}),this.$api.repairCheckAPI.checkDetail(this.form.eventId).then(function(t){0===t.code&&t.checkInfo&&(e.form.content=t.checkInfo.content,e.form.xlGrade=t.checkInfo.xl_grade,e.form.qaGrade=t.checkInfo.qa_grade,e.form.tdGrade=t.checkInfo.td_grade)})},getUser:function(e){e&&(this.$set(this.formData,"zrrid",e.id),this.$set(this.formData,"zrr",e.name))},getDetail:function(){var e=this;this.$api.yxkAPI.yxkGet(b,{id:this.form.eventId}).then(function(t){if(0==t.code){var r=t.data;e.formInfo=r;var a=[];a.push(r.auditVO),e.formInfo.auditVO=a,e.formInfo=n()({},e.formInfo)}else e.formInfo={};e.loading=!1}).finally(function(){e.loading=!1})},back:function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.$router.go(-1)},save_back:function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.redirect?this.$router.go(-1):this.$router.push({path:"/ahgl/index",query:{t:Date.now()}})},tempSave:function(e){var t=this;this.$refs[e].validate(function(e){if(!e)return!1;t.isDisabled||(t.isDisabled=!0,t.$api.repairCheckAPI.completeCheckTS(t.form).then(function(e){t.isDisabled=!1,0===e.code?(t.$message({message:e.msg,type:"success"}),t.save_back()):t.$message({message:e.msg,type:"error"})}))})},save:function(e){var t=this;this.$refs[e].validate(function(e){if(!e)return!1;t.formData.id=t.formInfo.id,t.isDisabled=!0,t.$api.yxkAPI.yxkPost(g,t.formData).then(function(e){t.isDisabled=!1,0==e.code?(t.$message({message:e.msg,type:"success"}),t.save_back()):t.$message({message:e.msg,type:"error"})})})}})},y={render:function(){var e=this,t=this,r=t.$createElement,a=t._self._c||r;return a("div",{staticClass:"sys-box check-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.back()}}},[t._v(t._s(t.config.cancelText))]),t._v(" "),a("el-button",{attrs:{type:"primary",disabled:t.isDisabled},on:{click:function(e){return t.save("form")}}},[t._v("提交")])],1),t._v(" "),a("div",{staticClass:"sys-form"},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"form",attrs:{"label-width":"120px",model:t.formInfo}},[a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"现场稽查单",prop:"xcjcd"}},[a("el-input",{attrs:{placeholder:"现场稽查单",disabled:""},model:{value:t.formInfo.xcjcd,callback:function(e){t.$set(t.formInfo,"xcjcd",e)},expression:"formInfo.xcjcd"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"检验日期",prop:"jcrq"}},[a("el-input",{attrs:{readonly:""},model:{value:t.formInfo.jcrq,callback:function(e){t.$set(t.formInfo,"jcrq",e)},expression:"formInfo.jcrq"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"检验人员",prop:"jcry"}},[a("el-input",{attrs:{readonly:""},model:{value:t.formInfo.jcry,callback:function(e){t.$set(t.formInfo,"jcry",e)},expression:"formInfo.jcry"}})],1)],1),t._v(" "),a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"车间",prop:"cjid"}},[a("el-input",{attrs:{readonly:""},model:{value:t.formInfo.cj,callback:function(e){t.$set(t.formInfo,"cj",e)},expression:"formInfo.cj"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"检查类别",prop:"jclbid"}},[a("el-input",{attrs:{readonly:""},model:{value:t.formInfo.jclb,callback:function(e){t.$set(t.formInfo,"jclb",e)},expression:"formInfo.jclb"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"责任人",prop:"zrr"}},[a("el-input",{attrs:{readonly:""},model:{value:t.formInfo.zrr,callback:function(e){t.$set(t.formInfo,"zrr",e)},expression:"formInfo.zrr"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"要求完成日期",prop:"yqwcrq"}},[a("el-input",{attrs:{readonly:""},model:{value:t.formInfo.yqwcrq,callback:function(e){t.$set(t.formInfo,"yqwcrq",e)},expression:"formInfo.yqwcrq"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"问题描述",prop:"wtms"}},[a("el-input",{attrs:{type:"textarea",placeholder:"问题描述",autosize:{minRows:4},readonly:""},model:{value:t.formInfo.wtms,callback:function(e){t.$set(t.formInfo,"wtms",e)},expression:"formInfo.wtms"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"bz"}},[a("el-input",{attrs:{type:"textarea",placeholder:"备注",autosize:{minRows:4},readonly:""},model:{value:t.formInfo.bz,callback:function(e){t.$set(t.formInfo,"bz",e)},expression:"formInfo.bz"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"现场图片",prop:"xctp"}},[a("yxkUpload",{attrs:{state:!0,disabled:"",img:t.formInfo.xctp},model:{value:t.formInfo.xctp,callback:function(e){t.$set(t.formInfo,"xctp",e)},expression:"formInfo.xctp"}})],1),t._v(" "),a("el-divider",{attrs:{"content-position":"left"}},[t._v("问题处理")]),t._v(" "),a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline form-half",attrs:{label:"处理人员",prop:"clry"}},[a("el-input",{attrs:{readonly:""},model:{value:t.formInfo.clry,callback:function(e){t.$set(t.formInfo,"clry",e)},expression:"formInfo.clry"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline form-half",attrs:{label:"处理日期",prop:"clrq"}},[a("el-input",{attrs:{readonly:""},model:{value:t.formInfo.clrq,callback:function(e){t.$set(t.formInfo,"clrq",e)},expression:"formInfo.clrq"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"解决方案",prop:"jjfa"}},[a("el-input",{attrs:{readonly:""},model:{value:t.formInfo.jjfa,callback:function(e){t.$set(t.formInfo,"jjfa",e)},expression:"formInfo.jjfa"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"整改图片",prop:"zgtp"}},[a("yxkUpload",{attrs:{disabled:"",img:t.formInfo.zgtp},model:{value:t.formInfo.zgtp,callback:function(e){t.$set(t.formInfo,"zgtp",e)},expression:"formInfo.zgtp"}})],1)],1),t._v(" "),a("el-divider",{attrs:{"content-position":"left"}},[t._v("审批意见")]),t._v(" "),a("el-form",{ref:"form",attrs:{"label-width":"110px",model:t.form,rules:t.ruleForm}},[a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline form-half",attrs:{label:"审批人员",prop:"spry"}},[a("el-input",{attrs:{placeholder:"审批人员",readonly:""},model:{value:t.formData.spry,callback:function(e){t.$set(t.formData,"spry",e)},expression:"formData.spry"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline form-half",attrs:{label:"审批日期",prop:"clrq"}},[a("el-date-picker",{attrs:{type:"datetime",placeholder:"审批日期","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:t.formData.sprq,callback:function(e){t.$set(t.formData,"sprq",e)},expression:"formData.sprq"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-half",attrs:{label:"审批结果",prop:"spjgid"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},on:{change:function(r){t.formData.zrr="不通过"==t.formData.spjg?e.userInfo.name:"",t.formData.zrrid="不通过"==t.formData.spjg?e.userInfo.userId:""}},model:{value:t.formData.spjg,callback:function(e){t.$set(t.formData,"spjg",e)},expression:"formData.spjg"}},t._l(t.resultList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.name}})}),1)],1),t._v(" "),"不通过"==t.formData.spjg?a("el-form-item",{staticClass:"form-inline form-half",attrs:{label:"责任人",prop:"zrr"}},[a("btn-input",{attrs:{valueText:t.formData.zrr,valueId:t.formData.zrrid,chooseVisible:t.chooseUserVisible},on:{"update:valueText":function(e){return t.$set(t.formData,"zrr",e)},"update:value-text":function(e){return t.$set(t.formData,"zrr",e)},"update:valueId":function(e){return t.$set(t.formData,"zrrid",e)},"update:value-id":function(e){return t.$set(t.formData,"zrrid",e)},"update:chooseVisible":function(e){t.chooseUserVisible=e},"update:choose-visible":function(e){t.chooseUserVisible=e}}})],1):t._e(),t._v(" "),a("el-form-item",{staticClass:"form-inline form-half",attrs:{label:"审批意见",prop:"spyj"}},[a("el-input",{attrs:{placeholder:"审批意见"},model:{value:t.formData.spyj,callback:function(e){t.$set(t.formData,"spyj",e)},expression:"formData.spyj"}})],1)],1)])],1),t._v(" "),a("DialogChooseSingleUser",{attrs:{visible:t.chooseUserVisible},on:{"update:visible":function(e){t.chooseUserVisible=e},change:t.getUser}})],1)},staticRenderFns:[]};var x=r("VU/8")(I,y,!1,function(e){r("gsiv")},"data-v-60784499",null);t.default=x.exports},gsiv:function(e,t){}}); |