yxk_pc_mdh/gyhl/static/js/89.7df9e5637b08ff7d9d23.js

1 line
15 KiB
JavaScript

webpackJsonp([89],{"6mfI":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,s=a("bOdI"),r=a.n(s),o=a("mvHQ"),n=a.n(o),l=a("woOf"),c=a.n(l),h=a("d7EF"),d=a.n(h),u=a("//Fk"),f=a.n(u),m=a("BO1k"),p=a.n(m),g=a("Dd8w"),b=a.n(g),D=(a("GKmE"),a("ysqt")),v=a("OG67"),y=a("Nifq"),z=a("G9gL"),x=a("3MlD"),$=a("NYxO"),S=a("bzuE"),_=a("lbHh"),j=a.n(_),I="/apis/mdh/cpyz/add",k="/apis/mdh/cpyz/detail",C="/apis/mdh/cpyz/edit",w={name:"cpyz-detail",components:{btnInput:D.a,chooseSbjh:y.a,ChooseDevices:z.a,DialogChooseSingleUser:x.a,dialogChooseSingleParts:v.a},data:function(){return{depOptions:[],selectDeptId:[],formData:{},start_datetime:{disabledDate:function(t){return t.getTime()<Date.now()}},end_datetime:{disabledDate:function(t){return t.getTime()<Date.now()}},ruleForm:{jlrq:[{required:!0,message:"请选择记录日期",trigger:"change"}],jlryid:[{required:!0,message:"请选择记录人员",trigger:"blur"}],qyid:[{required:!0,message:"请选择区域",trigger:"change"}],jllxid:[{required:!0,message:"请选择记录类型",trigger:"change"}],dywzid:[{required:!0,message:"请选择对应位置",trigger:"change"}],rl:[{required:!0,message:"请输入容量",trigger:"blur"}]},chooseMaterielVisible:!1,chooseDevicesVisible:!1,chooseUserVisible:!1,getUserList:[],levelList:[],tableData:[],deptList:[],chooseVisible:!1,projects:[],chooseProjects:[],choosePartsVisible:!1,parts:[],choosePartss:[],loading:!1,isDisabled:!1,config:S.a,chooseSbjhVisible:!1,bbList:[],currentChildIndex:0,userInfo:{},qyList:[],jllxList:[],sfList:[{name:"是",id:"0"},{name:"否",id:"1"}]}},mounted:function(){this.userInfo=JSON.parse(j.a.get("userInfo")),this.$route.query.id?(this.formData.id=this.$route.query.id,this.getDetail()):this.$set(this.formData,"jlry",this.userInfo.name)},watch:{formData:{handler:function(t,e){""==t.deviceId&&(this.formData.deviceModel="",this.formData.deviceUser="",this.formData.deviceSite="",this.formData.deviceDept="",this.formData.deviceName=""),""==t.engineerId&&(this.formData.engineerName="",this.formData.cellphone="",this.formData.deptId="",this.selectDeptId=[])},deep:!0}},methods:b()({},Object($.d)({removeTagNav:"tagNav/removeTagNav"}),(i={currentIndex:function(t){this.currentChildIndex=t},handleChangeHcljz:function(){var t=this.formData.zbList.reduce(function(t,e){return t+e.cpjz},0);this.formData.jz=t,this.formData=b()({},this.formData)},getSbjh:function(t){this.$set(this.formData.zbList[this.currentChildIndex],"hcljh",t.hcljh),this.$set(this.formData.zbList[this.currentChildIndex],"hcljhid",t.id),this.$set(this.formData.zbList[this.currentChildIndex],"ggxh",t.ggxh),this.$set(this.formData.zbList[this.currentChildIndex],"kz",t.kz),this.$set(this.formData.zbList[this.currentChildIndex],"hcljz",t.hcljz),this.$set(this.formData.zbList[this.currentChildIndex],"kyjz",t.kyjz)},getPart:function(t){t?(t.convCoefficient&&this.formData.countSupport&&(this.formData.count=this.formData.countSupport*t.convCoefficient),this.$set(this.formData,"materielId",t.id),this.$set(this.formData,"materielName",t.name?t.name:""),this.$set(this.formData,"materielSerialNo",t.serialNo?t.serialNo:""),this.$set(this.formData,"specification",t.specification?t.specification:""),this.$set(this.formData,"unitUomName",t.unitUomName?t.unitUomName:""),this.formData.supportUomName=t.supportUomName?t.supportUomName:"",this.formData.supportUom=t.supportUom,this.formData.convCoefficient=t.convCoefficient):(this.$set(this.formData,"materielId",""),this.$set(this.formData,"materielName",""),this.$set(this.formData,"materielSerialNo",""),this.$set(this.formData,"specification",""),this.$set(this.formData,"unitUomName",""))},setTotal:function(t){return t.num&&t.salePrice?parseFloat(t.num)*parseFloat(t.salePrice):0},treeFindPath:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!t)return[];var i=!0,s=!1,r=void 0;try{for(var o,n=p()(t);!(i=(o=n.next()).done);i=!0){var l=o.value;if(a.push(l.id),e(l))return a;if(l.children){var c=this.treeFindPath(l.children,e,a);if(c.length)return c}a.pop()}}catch(t){s=!0,r=t}finally{try{!i&&n.return&&n.return()}finally{if(s)throw r}}return[]},setDeptList:function(t){var e=!0,a=!1,i=void 0;try{for(var s,r=p()(t);!(e=(s=r.next()).done);e=!0){var o=s.value;o.hasChildren?this.setDeptList(o.children):o.children=void 0}}catch(t){a=!0,i=t}finally{try{!e&&r.return&&r.return()}finally{if(a)throw i}}},handleChange:function(t){this.formData.deptId=t.length>=1?t[t.length-1]:"",this.selectDeptId=t},getDevice:function(t){t&&(this.formData.deviceId=t.id,this.formData.deviceModel=t.model,this.formData.deviceUser=t.userName,this.formData.deviceSite=t.site,this.formData.deviceDept=t.deptName,this.formData.deviceName=t.name)},getUser:function(t){t&&(this.$set(this.formData,"jlryid",t.id),this.$set(this.formData,"jlry",t.name))},getProject:function(t){var e=this;t&&t.forEach(function(t){e.projects.push(t)})},removeProject:function(){var t=this;this.chooseProjects&&(this.chooseProjects.forEach(function(e){var a=t.formData.zbList.findIndex(function(t){if(t.id==e.id)return!0});t.formData.zbList.splice(a,1)}),this.handleChangeHcljz())},handleProjectChange:function(t){this.chooseProjects=t}},r()(i,"getPart",function(t){var e=this;t&&t.forEach(function(t){e.parts.push(t)})}),r()(i,"removePart",function(){var t=this;this.chooseParts&&this.chooseParts.forEach(function(e){var a=t.parts.findIndex(function(t){if(t.id==e.id)return!0});t.parts.splice(a,1)})}),r()(i,"handlePartChange",function(t){this.chooseParts=t}),r()(i,"initialize",function(){var t=this;f.a.all([this.$api.commonAPI.getUsers(),this.$api.commonAPI.getDeptsTree(),this.$api.dictAPI.getDictsByType("qy"),this.$api.dictAPI.getDictsByType("jllx"),this.$api.dictAPI.getDictsByType("dywz")]).then(function(e){var a=d()(e,5),i=a[0],s=a[1],r=a[2],o=a[3],n=a[4];0===i.code&&(t.getUserList=i.datas),0===s.code&&(t.depOptions=s.data.children,t.setDeptList(t.depOptions),t.setDefaultDept()),0===r.code&&(t.qyList=r.datas),0==o.code&&(t.jllxList=o.datas),0==n.code&&(t.dywzList=n.datas)}).catch(function(t){console.log(t)})}),r()(i,"back",function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.$router.push({path:"/yfgl/cpyz",query:{t:Date.now()}})}),r()(i,"getDetail",function(){var t=this;this.loading=!0,this.$api.yxkAPI.yxkGet(k,{id:this.formData.id}).then(function(e){0==e.code&&(t.formData=c()({},e.data)),t.loading=!1}).catch(function(e){t.loading=!1})}),r()(i,"setDefaultDept",function(){if(this.depOptions.length>0&&this.formData.selectDeptId){var t=n()(this.formData.selectDeptId),e=this.treeFindPath(this.depOptions,function(e){return e.id===t});this.selectDeptId=JSON.parse(n()(e))}}),r()(i,"tempSave",function(t){var e=this;this.isDisabled=!0,this.formData.zczt=0,this.formData.zt=2,this.$api.yxkAPI.yxkPost(this.formData.id?C:I,this.formData).then(function(t){e.isDisabled=!1,0==t.code?(e.$message({message:t.msg,type:"success"}),e.back()):e.$message({message:t.msg,type:"error"})})}),r()(i,"save",function(t){var e=this;this.$refs[t].validate(function(t){if(!t)return!1;e.isDisabled=!0,e.formData.zczt=1,e.formData.zt=3,e.$api.yxkAPI.yxkPost(e.formData.id?C:I,e.formData).then(function(t){e.isDisabled=!1,0==t.code?(e.$message({message:t.msg,type:"success"}),e.back()):e.$message({message:t.msg,type:"error"})})})}),i))},P={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"sys-box plan-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))])],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.formData,disabled:"",rules:t.ruleForm}},[a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"验证单号",prop:"yzdh"}},[a("el-input",{attrs:{placeholder:"验证单号",disabled:""},model:{value:t.formData.yzdh,callback:function(e){t.$set(t.formData,"yzdh",e)},expression:"formData.yzdh"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"验证日期",prop:"yzrq"}},[a("el-date-picker",{attrs:{type:"datetime",placeholder:"选择日期时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:t.formData.yzrq,callback:function(e){t.$set(t.formData,"yzrq",e)},expression:"formData.yzrq"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"产品名称",prop:"cpmc"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入"},model:{value:t.formData.cpmc,callback:function(e){t.$set(t.formData,"cpmc",e)},expression:"formData.cpmc"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"验证内容",prop:"yznr"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入"},model:{value:t.formData.yznr,callback:function(e){t.$set(t.formData,"yznr",e)},expression:"formData.yznr"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"验证方式",prop:"yzfs"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入"},model:{value:t.formData.yzfs,callback:function(e){t.$set(t.formData,"yzfs",e)},expression:"formData.yzfs"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"验证结果",prop:"yzjg"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入"},model:{value:t.formData.yzjg,callback:function(e){t.$set(t.formData,"yzjg",e)},expression:"formData.yzjg"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"是否达标"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择"},model:{value:t.formData.sfdb,callback:function(e){t.$set(t.formData,"sfdb",e)},expression:"formData.sfdb"}},t._l(t.sfList,function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1)],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"建议改善"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:4},placeholder:"请简要填写建议改善"},model:{value:t.formData.jygs,callback:function(e){t.$set(t.formData,"jygs",e)},expression:"formData.jygs"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"备注"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:4},placeholder:"请简要填写备注内容"},model:{value:t.formData.bz,callback:function(e){t.$set(t.formData,"bz",e)},expression:"formData.bz"}})],1)],1)],1),t._v(" "),a("dialogChooseSingleParts",{attrs:{visible:t.chooseMaterielVisible},on:{"update:visible":function(e){t.chooseMaterielVisible=e},change:t.getPart}}),t._v(" "),a("ChooseDevices",{attrs:{visible:t.chooseDevicesVisible,canUsed:"canUsed"},on:{"update:visible":function(e){t.chooseDevicesVisible=e},change:t.getDevice}}),t._v(" "),a("DialogChooseSingleUser",{attrs:{visible:t.chooseUserVisible},on:{"update:visible":function(e){t.chooseUserVisible=e},change:t.getUser}}),t._v(" "),a("chooseSbjh",{attrs:{visible:t.chooseSbjhVisible},on:{"update:visible":function(e){t.chooseSbjhVisible=e},change:t.getSbjh}})],1)},staticRenderFns:[]};var L=a("VU/8")(w,P,!1,function(t){a("kJRD"),a("cAgB")},"data-v-6802c586",null);e.default=L.exports},Nifq:function(t,e,a){"use strict";var i={props:{id:{type:String,default:""},visible:{type:Boolean,default:!1},proId:{},proName:{}},watch:{visible:function(t,e){t!==e&&(t&&this.initData(),this.innerVisible=t)},innerVisible:function(t,e){t!==e&&this.$emit("update:visible",t)},proId:function(t){console.log(t)}},data:function(){return{subsetList:[],subsetAll:[],subsetTotal:0,searchData_Subset:{pageno:1,pagesize:5,auditSign:179,useStatus:1},callBackData:[],innerVisible:this.visible,loading:!1,dialogLoading:!1,useStatus:[{name:"禁用",id:0},{name:"启用",id:1}],deviceDept:[],addVisible:!1}},computed:{},mounted:function(){this.initData()},methods:{clickRow:function(t){this.$refs.tb.toggleRowSelection(t)},initData:function(){this.searchSubset()},searchSubset:function(t){var e=this;t&&(this.searchData_Subset.pageno=1),console.log(this.proName),this.proId&&(this.searchData_Subset.proId=this.proId,this.searchData_Subset.proName=this.proName),this.dialogLoading=!0,this.$api.yxkAPI.yxkPost("/apis/mdh/hcl/pageList",this.searchData_Subset).then(function(t){e.dialogLoading=!1,0==t.code&&(e.subsetList=t.data?t.data.records:[],e.subsetTotal=t.data?t.data.total:0)})},subsetSizeChange:function(t){this.searchData_Subset.pagesize=t,this.searchSubset()},subsetCurrentChange:function(t){this.searchData_Subset.pageno=t,this.searchSubset()},submit:function(t){this.$emit("change",t),this.innerVisible=!1},resetFields:function(){this.$refs.form&&this.$refs.form.resetFields()}}},s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],attrs:{center:"",title:"选择后处理卷号",visible:t.innerVisible,width:"900px"},on:{"update:visible":function(e){t.innerVisible=e}}},[a("div",[a("el-form",{attrs:{inline:""}},[a("el-form-item",{attrs:{label:"后处理卷号","label-width":"120px"}},[a("el-input",{attrs:{placeholder:"后处理卷号",clearable:""},model:{value:t.searchData_Subset.hcljh,callback:function(e){t.$set(t.searchData_Subset,"hcljh",e)},expression:"searchData_Subset.hcljh"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"规格型号","label-width":"120px"}},[a("el-input",{attrs:{placeholder:"规格型号",clearable:""},model:{value:t.searchData_Subset.ggxh,callback:function(e){t.$set(t.searchData_Subset,"ggxh",e)},expression:"searchData_Subset.ggxh"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.searchSubset(1)}}},[t._v("查询")])],1)],1)],1),t._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.dialogLoading,expression:"dialogLoading"}],ref:"tb",attrs:{data:t.subsetList,border:"","header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"row-click":t.clickRow}},[a("el-table-column",{attrs:{prop:"hcljh",label:"后处理卷号",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"ggxh",label:"规格型号",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"kz",label:"克重(g/m³)",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"hcljz",label:"后处理卷重",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{label:"操作",width:"150",align:"center",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.submit(e.row)}}},[t._v("选择")])]}}])})],1)],1),t._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":t.searchData_Subset.pageno,"page-sizes":[5,10,20],"page-size":t.searchData_Subset.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:t.subsetTotal},on:{"update:currentPage":function(e){return t.$set(t.searchData_Subset,"pageno",e)},"update:current-page":function(e){return t.$set(t.searchData_Subset,"pageno",e)},"size-change":t.subsetSizeChange,"current-change":t.subsetCurrentChange}})],1)])},staticRenderFns:[]},r=a("VU/8")(i,s,!1,null,null,null);e.a=r.exports},cAgB:function(t,e){},kJRD:function(t,e){}});