(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-0b9e"],{ROOE:function(e,t,a){},uh09:function(e,t,a){"use strict";var r=a("ROOE");a.n(r).a},xjNL:function(e,t,a){"use strict";a.r(t);var r=a("cLjf"),i=a.n(r),s=a("hDQ3"),n=a.n(s),c=(a("7Qib"),a("7nq4")),l={name:"selfReport",data:function(){return{dialogVisible:!1,id:null,enterpriseName:"",licenceValidStatus:0,licenceValidDeadline:"",stockNum:0,checkForm:{storageCapacity:null,hiddendangerStatus:null,submitHiddendangers:[{id:null,hiddendangerRemark:"",checkTime:"",rectifyDeadlineTime:"",hiddendangerLevel:null}],selfcheckReportUserName:"",selfcheckReportUserMobile:""},rules:{hiddendangerStatus:[{required:!0,message:"请选择是否查出隐患",trigger:"blur"}],selfcheckReportUserName:[{required:!0,message:"请输入填报人",trigger:"blur"}],selfcheckReportUserMobile:[{required:!0,message:"请输入电话号码",trigger:"blur"}]}}},watch:{},created:function(){console.log(this.id)},methods:{addItem:function(){this.checkForm.submitHiddendangers.push({hiddendangerRemark:"",checkTime:"",rectifyDeadlineTime:"",hiddendangerLevel:null})},deleteItem:function(e){var t=this;1==t.checkForm.submitHiddendangers.length?t.$message({type:"warning",message:"检查的隐患信息不可为空"}):t.checkForm.submitHiddendangers.splice(e,1)},getReportInfo:function(){var e=this;return n()(i.a.mark(function t(){var a,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a=e,t.next=3,Object(c.b)({id:a.id});case 3:"200"===(r=t.sent).data.code?(a.enterpriseName=r.data.result.enterpriseName,a.licenceValidStatus=r.data.result.licenceValidStatus,a.licenceValidDeadline=r.data.result.licenceValidDeadline,a.stockNum=r.data.result.stockNum):a.$message({type:"warning",message:r.data.message});case 5:case"end":return t.stop()}},t,e)}))()},submitForm:function(e){var t=this,a=this;a.$refs[e].validate(function(){var e=n()(i.a.mark(function e(r){var s;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(0==a.checkForm.hiddendangerStatus&&(a.checkForm.submitHiddendangers=[]),!r){e.next=18;break}if(1!=a.checkForm.hiddendangerStatus){e.next=6;break}if(!(a.checkForm.submitHiddendangers.find(function(e){return""==e.hiddendangerRemark})||a.checkForm.submitHiddendangers.find(function(e){return""==e.checkTime})||a.checkForm.submitHiddendangers.find(function(e){return""==e.rectifyDeadlineTime})||a.checkForm.submitHiddendangers.find(function(e){return null==e.hiddendangerLevel}))){e.next=6;break}return a.$message({type:"warning",message:"请完善检查的隐患信息"}),e.abrupt("return");case 6:if(null!=a.checkForm.storageCapacity){e.next=9;break}return a.$message({type:"warning",message:"请输入库容信息"}),e.abrupt("return");case 9:return a.checkForm.id=a.id,e.next=12,Object(c.g)(a.checkForm);case 12:"200"===(s=e.sent).data.code?a.$message({type:"success",message:"提交成功!"}):a.$message({type:"warning",message:s.data.message}),a.dialogVisible=!1,a.$parent.getUncheckList(),e.next=20;break;case 18:return console.log("error submit!!"),e.abrupt("return",!1);case 20:case"end":return e.stop()}},e,t)}));return function(t){return e.apply(this,arguments)}}())},reset:function(){this.checkForm={storageCapacity:null,hiddendangerStatus:null,submitHiddendangers:[{id:null,hiddendangerRemark:"",checkTime:"",rectifyDeadlineTime:"",hiddendangerLevel:null}],selfcheckReportUserName:"",selfcheckReportUserMobile:""}}}},d=(a("uh09"),a("ZrdR")),o=Object(d.a)(l,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{visible:e.dialogVisible,"append-to-body":"","close-on-click-modal":!1,width:"60%",center:""},on:{"update:visible":function(t){e.dialogVisible=t},close:function(t){e.reset()}}},[a("div",{staticClass:"company-info"},[a("div",[e._v("企业基本信息")]),e._v(" "),a("div",[a("span",[e._v("企业名称:")]),a("span",[e._v(e._s(e.enterpriseName))])]),e._v(" "),a("div",[a("span",[e._v("许可证:")]),e._v(" "),0==e.licenceValidStatus?a("span",[e._v("在有效期(有效期至:"+e._s(e.licenceValidDeadline)+")")]):a("span",[e._v("已过期")])]),e._v(" "),a("div",[a("span",[e._v("库存:")]),a("span",[e._v(e._s(e.stockNum))])]),e._v(" "),a("div",[a("span",[e._v("库容:")]),e._v(" "),a("span",[a("el-input",{attrs:{placeholder:"请输入库容量",type:"number"},model:{value:e.checkForm.storageCapacity,callback:function(t){e.$set(e.checkForm,"storageCapacity",t)},expression:"checkForm.storageCapacity"}})],1)])]),e._v(" "),a("el-divider"),e._v(" "),a("div",{staticClass:"form-info"},[a("div",[e._v("自查自改填报")])]),e._v(" "),a("el-form",{ref:"checkForm",staticClass:"demo-ruleForm",attrs:{model:e.checkForm,rules:e.rules,"label-width":"150px"}},[a("el-form-item",{attrs:{label:"自查是否有隐患:",prop:"hiddendangerStatus"}},[a("el-radio-group",{model:{value:e.checkForm.hiddendangerStatus,callback:function(t){e.$set(e.checkForm,"hiddendangerStatus",t)},expression:"checkForm.hiddendangerStatus"}},[a("el-radio",{attrs:{label:1}},[e._v("是")]),e._v(" "),a("el-radio",{attrs:{label:0}},[e._v("否")])],1)],1),e._v(" "),1==e.checkForm.hiddendangerStatus?a("div",{staticClass:"risk-list"},[a("table",{staticClass:"risk-table"},[a("th",[a("span",[e._v("序号")]),a("span",[e._v("检查出的隐患问题")]),a("span",[e._v("检查时间")]),a("span",[e._v("最后整改期限")]),a("span",[e._v("隐患等级")]),a("span",[e._v("操作")])]),e._v(" "),e._l(e.checkForm.submitHiddendangers,function(t,r){return a("tr",[a("td",{staticClass:"num"},[e._v(e._s(r+1))]),e._v(" "),a("td",{staticClass:"info"},[a("el-input",{attrs:{type:"textarea",rows:1,placeholder:"请简述隐患问题"},model:{value:t.hiddendangerRemark,callback:function(a){e.$set(t,"hiddendangerRemark",a)},expression:"item.hiddendangerRemark"}})],1),e._v(" "),a("td",{staticClass:"date"},[a("el-date-picker",{attrs:{type:"datetime",placeholder:"选择检查时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:t.checkTime,callback:function(a){e.$set(t,"checkTime",a)},expression:"item.checkTime"}})],1),e._v(" "),a("td",{staticClass:"deadline"},[a("el-date-picker",{attrs:{type:"datetime",placeholder:"选择整改期限","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:t.rectifyDeadlineTime,callback:function(a){e.$set(t,"rectifyDeadlineTime",a)},expression:"item.rectifyDeadlineTime"}})],1),e._v(" "),a("td",{staticClass:"level"},[a("el-radio-group",{model:{value:t.hiddendangerLevel,callback:function(a){e.$set(t,"hiddendangerLevel",a)},expression:"item.hiddendangerLevel"}},[a("el-radio",{attrs:{label:1}},[e._v("一般隐患")]),e._v(" "),a("el-radio",{attrs:{label:2}},[e._v("重大隐患")])],1)],1),e._v(" "),a("td",{staticClass:"edit"},[a("el-button",{attrs:{type:"text"},on:{click:function(t){e.deleteItem(r)}}},[e._v("删除")])],1)])})],2),e._v(" "),a("div",{staticClass:"addBtn"},[a("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-plus"},on:{click:function(t){e.addItem()}}},[e._v("新增隐患问题")])],1)]):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"填报人:",prop:"selfcheckReportUserName"}},[a("el-input",{model:{value:e.checkForm.selfcheckReportUserName,callback:function(t){e.$set(e.checkForm,"selfcheckReportUserName",t)},expression:"checkForm.selfcheckReportUserName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"电话号码:",prop:"selfcheckReportUserMobile"}},[a("el-input",{model:{value:e.checkForm.selfcheckReportUserMobile,callback:function(t){e.$set(e.checkForm,"selfcheckReportUserMobile",t)},expression:"checkForm.selfcheckReportUserMobile"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取消")]),e._v(" "),a("el-button",{directives:[{name:"stop-re-click",rawName:"v-stop-re-click"}],attrs:{type:"primary"},on:{click:function(t){e.submitForm("checkForm")}}},[e._v("提交")])],1)],1)},[],!1,null,"752d57ba",null);o.options.__file="selfReport.vue";t.default=o.exports}}]);
|