yxk_pc_mdh/gyhl/static/js/94.bc2d305e1f595362f096.js

1 line
17 KiB
JavaScript

webpackJsonp([94],{"1/5x":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/sbbg/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.jh,callback:function(e){t.$set(t.searchData_Subset,"jh",e)},expression:"searchData_Subset.jh"}})],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:"jh",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:"sbjz",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},"5zae":function(t,e){},PkaB:function(t,e){},vOQV: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"),m=a.n(h),d=a("//Fk"),u=a.n(d),f=a("BO1k"),p=a.n(f),b=a("Dd8w"),g=a.n(b),D=(a("GKmE"),a("ysqt")),v=a("OG67"),y=a("1/5x"),j=a("G9gL"),x=a("3MlD"),$=a("NYxO"),S=a("bzuE"),_=a("lbHh"),z=a.n(_),k="/apis/mdh/sbjy/add",w="/apis/mdh/sbjy/detail",C="/apis/mdh/sbjy/edit",I={name:"sbjy-add",components:{btnInput:D.a,chooseSbjh:y.a,ChooseDevices:j.a,DialogChooseSingleUser:x.a,dialogChooseSingleParts:v.a},data:function(){return{jywzList:[{name:"首",id:"首"},{name:"尾",id:"尾"}],pdjgList:[{name:"合格",id:"合格"},{name:"不合格",id:"不合格"}],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:[],dywzList:[]}},mounted:function(){this.userInfo=JSON.parse(z.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:g()({},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=g()({},this.formData)},getSbjh:function(t){this.$set(this.formData,"sbjh",t.jh),this.$set(this.formData,"sbjhid",t.id),this.$set(this.formData,"ggxh",t.ggxh),this.$set(this.formData,"kz",t.kz)},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;u.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=m()(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:"/zlgl/sbjy",query:{t:Date.now()}})}),r()(i,"getDetail",function(){var t=this;this.loading=!0,this.$api.yxkAPI.yxkGet(w,{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:k,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.$api.yxkAPI.yxkPost(e.formData.id?C:k,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))]),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.formData,rules:t.ruleForm}},[a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"生箔检验单",prop:"sbjyd"}},[a("el-input",{attrs:{placeholder:"生箔检验单",disabled:""},model:{value:t.formData.sbjyd,callback:function(e){t.$set(t.formData,"sbjyd",e)},expression:"formData.sbjyd"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"生箔卷号",prop:"sbjh"}},[a("btn-input",{attrs:{valueText:t.formData.sbjh,valueId:t.formData.sbjhid,chooseVisible:t.chooseSbjhVisible},on:{"update:valueText":function(e){return t.$set(t.formData,"sbjh",e)},"update:value-text":function(e){return t.$set(t.formData,"sbjh",e)},"update:valueId":function(e){return t.$set(t.formData,"sbjhid",e)},"update:value-id":function(e){return t.$set(t.formData,"sbjhid",e)},"update:chooseVisible":function(e){t.chooseSbjhVisible=e},"update:choose-visible":function(e){t.chooseSbjhVisible=e}}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"检验日期",prop:"jyrq"}},[a("el-date-picker",{attrs:{type:"datetime",placeholder:"选择日期时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:t.formData.jyrq,callback:function(e){t.$set(t.formData,"jyrq",e)},expression:"formData.jyrq"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"规格型号",prop:"ggxh"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{disabled:"",placeholder:"请输入"},model:{value:t.formData.ggxh,callback:function(e){t.$set(t.formData,"ggxh",e)},expression:"formData.ggxh"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"克重(g/㎡)",prop:"kz"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{disabled:"",placeholder:"请输入"},model:{value:t.formData.kz,callback:function(e){t.$set(t.formData,"kz",e)},expression:"formData.kz"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"检验位置",prop:"jywz"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:t.formData.jywz,callback:function(e){t.$set(t.formData,"jywz",e)},expression:"formData.jywz"}},t._l(t.jywzList,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-inline",attrs:{label:"偏差(g)",prop:"pc"}},[a("el-input-number",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入"},model:{value:t.formData.pc,callback:function(e){t.$set(t.formData,"pc",e)},expression:"formData.pc"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"光面Ra",prop:"gmrz"}},[a("el-input-number",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入"},model:{value:t.formData.gmrz,callback:function(e){t.$set(t.formData,"gmrz",e)},expression:"formData.gmrz"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"毛面Rz",prop:"mmrz"}},[a("el-input-number",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入"},model:{value:t.formData.mmrz,callback:function(e){t.$set(t.formData,"mmrz",e)},expression:"formData.mmrz"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"抗拉强度(Mpa)",prop:"klqd"}},[a("el-input-number",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入"},model:{value:t.formData.klqd,callback:function(e){t.$set(t.formData,"klqd",e)},expression:"formData.klqd"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"伸长率(%)",prop:"scl"}},[a("el-input-number",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入"},model:{value:t.formData.scl,callback:function(e){t.$set(t.formData,"scl",e)},expression:"formData.scl"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"渗透",prop:"st"}},[a("el-input-number",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入"},model:{value:t.formData.st,callback:function(e){t.$set(t.formData,"st",e)},expression:"formData.st"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"翘曲",prop:"qq"}},[a("el-input-number",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入"},model:{value:t.formData.qq,callback:function(e){t.$set(t.formData,"qq",e)},expression:"formData.qq"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"耐折(次)",prop:"nz"}},[a("el-input-number",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入"},model:{value:t.formData.nz,callback:function(e){t.$set(t.formData,"nz",e)},expression:"formData.nz"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"判定结果",prop:"pdjg"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:t.formData.pdjg,callback:function(e){t.$set(t.formData,"pdjg",e)},expression:"formData.pdjg"}},t._l(t.pdjgList,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.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 N=a("VU/8")(I,P,!1,function(t){a("5zae"),a("PkaB")},"data-v-3bf94967",null);e.default=N.exports}});