yxk_pc_mdh/gyhl/static/js/106.c37037e2949ff856cbec.js

1 line
16 KiB
JavaScript

webpackJsonp([106],{D1Yy:function(e,t){},"ML+a":function(e,t,a){"use strict";Object.defineProperty(t,"__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("femj"),j=a("G9gL"),x=a("3MlD"),z=a("NYxO"),$=a("bzuE"),_=a("lbHh"),S=a.n(_),I="/apis/mdh/zytljl/add",C="/apis/mdh/zytljl/detail",k="/apis/mdh/zytljl/edit",w={name:"zytljl-add",components:{btnInput:D.a,chooseSbjh:y.a,ChooseDevices:j.a,DialogChooseSingleUser:x.a,dialogChooseSingleParts:v.a},data:function(){return{depOptions:[],selectDeptId:[],formData:{},start_datetime:{disabledDate:function(e){return e.getTime()<Date.now()}},end_datetime:{disabledDate:function(e){return e.getTime()<Date.now()}},ruleForm:{xh:[{required:!0,message:"请输入箱号",trigger:"change"}],ggxhid:[{required:!0,message:"请选择规格型号",trigger:"blur"}],ms:[{required:!0,message:"请输入米数",trigger:"change"}],mz:[{required:!0,message:"请输入毛重",trigger:"change"}],jt:[{required:!0,message:"请输入接头",trigger:"change"}],kz:[{required:!0,message:"请输入克重",trigger:"blur"}],xb:[{required:!0,message:"请选择线别",trigger:"blur"}],bc:[{required:!0,message:"请选择班次",trigger:"change"}],czry:[{required:!0,message:"请选择操作员",trigger:"change"}],czsj:[{required:!0,message:"请选择操作时间",trigger:"change"}]},chooseMaterielVisible:!1,chooseDevicesVisible:!1,chooseUserVisible:!1,getUserList:[],levelList:[],tableData:[],deptList:[],chooseVisible:!1,projects:[],chooseProjects:[],choosePartsVisible:!1,parts:[],choosePartss:[],loading:!1,isDisabled:!1,config:$.a,chooseSbjhVisible:!1,bbList:[],currentChildIndex:0,userInfo:{},qyList:[],jllxList:[],dywzList:[]}},mounted:function(){this.userInfo=JSON.parse(S.a.get("userInfo")),this.initialize(),this.$route.query.id?(this.formData.id=this.$route.query.id,this.getDetail()):(this.$set(this.formData,"czry",this.userInfo.name),this.$set(this.formData,"czryid",this.userInfo.userId))},watch:{formData:{handler:function(e,t){""==e.deviceId&&(this.formData.deviceModel="",this.formData.deviceUser="",this.formData.deviceSite="",this.formData.deviceDept="",this.formData.deviceName=""),""==e.engineerId&&(this.formData.engineerName="",this.formData.cellphone="",this.formData.deptId="",this.selectDeptId=[])},deep:!0}},methods:b()({},Object(z.d)({removeTagNav:"tagNav/removeTagNav"}),(i={currentIndex:function(e){this.currentChildIndex=e},handleChangeHcljz:function(){var e=this.formData.zbList.reduce(function(e,t){return e+t.cpjz},0);this.formData.jz=e,this.formData=b()({},this.formData)},getSbjh:function(e){this.$set(this.formData.zbList[this.currentChildIndex],"hcljh",e.hcljh),this.$set(this.formData.zbList[this.currentChildIndex],"hcljhid",e.id),this.$set(this.formData.zbList[this.currentChildIndex],"ggxh",e.ggxh),this.$set(this.formData.zbList[this.currentChildIndex],"kz",e.kz),this.$set(this.formData.zbList[this.currentChildIndex],"hcljz",e.hcljz),this.$set(this.formData.zbList[this.currentChildIndex],"kyjz",e.kyjz)},getPart:function(e){e?(e.convCoefficient&&this.formData.countSupport&&(this.formData.count=this.formData.countSupport*e.convCoefficient),this.$set(this.formData,"materielId",e.id),this.$set(this.formData,"materielName",e.name?e.name:""),this.$set(this.formData,"materielSerialNo",e.serialNo?e.serialNo:""),this.$set(this.formData,"specification",e.specification?e.specification:""),this.$set(this.formData,"unitUomName",e.unitUomName?e.unitUomName:""),this.formData.supportUomName=e.supportUomName?e.supportUomName:"",this.formData.supportUom=e.supportUom,this.formData.convCoefficient=e.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(e){return e.num&&e.salePrice?parseFloat(e.num)*parseFloat(e.salePrice):0},treeFindPath:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e)return[];var i=!0,s=!1,r=void 0;try{for(var o,n=p()(e);!(i=(o=n.next()).done);i=!0){var l=o.value;if(a.push(l.id),t(l))return a;if(l.children){var c=this.treeFindPath(l.children,t,a);if(c.length)return c}a.pop()}}catch(e){s=!0,r=e}finally{try{!i&&n.return&&n.return()}finally{if(s)throw r}}return[]},setDeptList:function(e){var t=!0,a=!1,i=void 0;try{for(var s,r=p()(e);!(t=(s=r.next()).done);t=!0){var o=s.value;o.hasChildren?this.setDeptList(o.children):o.children=void 0}}catch(e){a=!0,i=e}finally{try{!t&&r.return&&r.return()}finally{if(a)throw i}}},handleChange:function(e){this.formData.deptId=e.length>=1?e[e.length-1]:"",this.selectDeptId=e},getDevice:function(e){e&&(this.formData.deviceId=e.id,this.formData.deviceModel=e.model,this.formData.deviceUser=e.userName,this.formData.deviceSite=e.site,this.formData.deviceDept=e.deptName,this.formData.deviceName=e.name)},getUser:function(e){e&&(this.$set(this.formData,"jlryid",e.id),this.$set(this.formData,"jlry",e.name))},getProject:function(e){var t=this;e&&e.forEach(function(e){t.projects.push(e)})},removeProject:function(){var e=this;this.chooseProjects&&(this.chooseProjects.forEach(function(t){var a=e.formData.zbList.findIndex(function(e){if(e.id==t.id)return!0});e.formData.zbList.splice(a,1)}),this.handleChangeHcljz())},handleProjectChange:function(e){this.chooseProjects=e}},r()(i,"getPart",function(e){var t=this;e&&e.forEach(function(e){t.parts.push(e)})}),r()(i,"removePart",function(){var e=this;this.chooseParts&&this.chooseParts.forEach(function(t){var a=e.parts.findIndex(function(e){if(e.id==t.id)return!0});e.parts.splice(a,1)})}),r()(i,"handlePartChange",function(e){this.chooseParts=e}),r()(i,"initialize",function(){var e=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(t){var a=d()(t,5),i=a[0],s=a[1],r=a[2],o=a[3],n=a[4];0===i.code&&(e.getUserList=i.datas),0===s.code&&(e.depOptions=s.data.children,e.setDeptList(e.depOptions),e.setDefaultDept()),0===r.code&&(e.qyList=r.datas),0==o.code&&(e.jllxList=o.datas),0==n.code&&(e.dywzList=n.datas)}).catch(function(e){console.log(e)})}),r()(i,"back",function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.$router.push({path:"/basic/zytljl",query:{t:Date.now()}})}),r()(i,"getDetail",function(){var e=this;this.loading=!0,this.$api.yxkAPI.yxkGet(C,{id:this.formData.id}).then(function(t){0==t.code&&(e.formData=c()({},t.data)),e.loading=!1}).catch(function(t){e.loading=!1})}),r()(i,"setDefaultDept",function(){if(this.depOptions.length>0&&this.formData.selectDeptId){var e=n()(this.formData.selectDeptId),t=this.treeFindPath(this.depOptions,function(t){return t.id===e});this.selectDeptId=JSON.parse(n()(t))}}),r()(i,"tempSave",function(e){var t=this;this.isDisabled=!0,this.formData.zczt=0,this.formData.zt=2,this.$api.yxkAPI.yxkPost(this.formData.id?k:I,this.formData).then(function(e){t.isDisabled=!1,0==e.code?(t.$message({message:e.msg,type:"success"}),t.back()):t.$message({message:e.msg,type:"error"})})}),r()(i,"save",function(e){var t=this;this.$refs[e].validate(function(e){if(!e)return!1;t.isDisabled=!0,t.formData.zczt=1,t.formData.zt=3,t.$api.yxkAPI.yxkPost(t.formData.id?k:I,t.formData).then(function(e){t.isDisabled=!1,0==e.code?(t.$message({message:e.msg,type:"success"}),t.back()):t.$message({message:e.msg,type:"error"})})})}),i))},L={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sys-box plan-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.back()}}},[e._v(e._s(e.config.cancelText))])],1),e._v(" "),a("div",{staticClass:"sys-form"},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"form",attrs:{"label-width":"120px",model:e.formData,disabled:"",rules:e.ruleForm}},[a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"制液投料记录单",prop:"zytljld"}},[a("el-input",{attrs:{placeholder:"制液投料记录单",disabled:""},model:{value:e.formData.zytljld,callback:function(t){e.$set(e.formData,"zytljld",t)},expression:"formData.zytljld"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"记录时间",prop:"jlsj"}},[a("el-date-picker",{attrs:{type:"datetime",placeholder:"选择日期时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.formData.jlsj,callback:function(t){e.$set(e.formData,"jlsj",t)},expression:"formData.jlsj"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"记录人员",prop:"jlry"}},[a("btn-input",{attrs:{valueText:e.formData.jlry,valueId:e.formData.jlryid,chooseVisible:e.chooseUserVisible},on:{"update:valueText":function(t){return e.$set(e.formData,"jlry",t)},"update:value-text":function(t){return e.$set(e.formData,"jlry",t)},"update:valueId":function(t){return e.$set(e.formData,"jlryid",t)},"update:value-id":function(t){return e.$set(e.formData,"jlryid",t)},"update:chooseVisible":function(t){e.chooseUserVisible=t},"update:choose-visible":function(t){e.chooseUserVisible=t}}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"区域",prop:"qyid"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},on:{change:function(t){e.formData.qy=e.qyList.filter(function(e){return e.id==t})[0].name}},model:{value:e.formData.qyid,callback:function(t){e.$set(e.formData,"qyid",t)},expression:"formData.qyid"}},e._l(e.qyList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"记录类型",prop:"jllxid"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},on:{change:function(t){e.formData.jllx=e.jllxList.filter(function(e){return e.id==t})[0].name}},model:{value:e.formData.jllxid,callback:function(t){e.$set(e.formData,"jllxid",t)},expression:"formData.jllxid"}},e._l(e.jllxList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"对应位置",prop:"dywzid"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},on:{change:function(t){e.formData.dywz=e.dywzList.filter(function(e){return e.id==t})[0].name}},model:{value:e.formData.dywzid,callback:function(t){e.$set(e.formData,"dywzid",t)},expression:"formData.dywzid"}},e._l(e.dywzList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"容量",prop:"rl"}},[a("el-input-number",{staticStyle:{width:"100%"},attrs:{placeholder:""},model:{value:e.formData.rl,callback:function(t){e.$set(e.formData,"rl",t)},expression:"formData.rl"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"备注"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:4},placeholder:"请简要填写备注内容"},model:{value:e.formData.bz,callback:function(t){e.$set(e.formData,"bz",t)},expression:"formData.bz"}})],1)],1)],1),e._v(" "),a("dialogChooseSingleParts",{attrs:{visible:e.chooseMaterielVisible},on:{"update:visible":function(t){e.chooseMaterielVisible=t},change:e.getPart}}),e._v(" "),a("ChooseDevices",{attrs:{visible:e.chooseDevicesVisible,canUsed:"canUsed"},on:{"update:visible":function(t){e.chooseDevicesVisible=t},change:e.getDevice}}),e._v(" "),a("DialogChooseSingleUser",{attrs:{visible:e.chooseUserVisible},on:{"update:visible":function(t){e.chooseUserVisible=t},change:e.getUser}}),e._v(" "),a("chooseSbjh",{attrs:{visible:e.chooseSbjhVisible},on:{"update:visible":function(t){e.chooseSbjhVisible=t},change:e.getSbjh}})],1)},staticRenderFns:[]};var P=a("VU/8")(w,L,!1,function(e){a("D1Yy"),a("hjNL")},"data-v-0e53aafa",null);t.default=P.exports},femj:function(e,t,a){"use strict";var i={props:{id:{type:String,default:""},visible:{type:Boolean,default:!1},proId:{},proName:{}},watch:{visible:function(e,t){e!==t&&(e&&this.initData(),this.innerVisible=e)},innerVisible:function(e,t){e!==t&&this.$emit("update:visible",e)},proId:function(e){console.log(e)}},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(e){this.$refs.tb.toggleRowSelection(e)},initData:function(){this.searchSubset()},searchSubset:function(e){var t=this;e&&(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(e){t.dialogLoading=!1,0==e.code&&(t.subsetList=e.data?e.data.records:[],t.subsetTotal=e.data?e.data.total:0)})},subsetSizeChange:function(e){this.searchData_Subset.pagesize=e,this.searchSubset()},subsetCurrentChange:function(e){this.searchData_Subset.pageno=e,this.searchSubset()},submit:function(e){this.$emit("change",e),this.innerVisible=!1},resetFields:function(){this.$refs.form&&this.$refs.form.resetFields()}}},s={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],attrs:{center:"",title:"选择后处理卷号",visible:e.innerVisible,width:"900px"},on:{"update:visible":function(t){e.innerVisible=t}}},[a("div",[a("el-form",{attrs:{inline:""}},[a("el-form-item",{attrs:{label:"后处理卷号","label-width":"120px"}},[a("el-input",{attrs:{placeholder:"后处理卷号",clearable:""},model:{value:e.searchData_Subset.hcljh,callback:function(t){e.$set(e.searchData_Subset,"hcljh",t)},expression:"searchData_Subset.hcljh"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"规格型号","label-width":"120px"}},[a("el-input",{attrs:{placeholder:"规格型号",clearable:""},model:{value:e.searchData_Subset.ggxh,callback:function(t){e.$set(e.searchData_Subset,"ggxh",t)},expression:"searchData_Subset.ggxh"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.searchSubset(1)}}},[e._v("查询")])],1)],1)],1),e._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.dialogLoading,expression:"dialogLoading"}],ref:"tb",attrs:{data:e.subsetList,border:"","header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"row-click":e.clickRow}},[a("el-table-column",{attrs:{prop:"hcljh",label:"后处理卷号",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"ggxh",label:"规格型号",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"kz",label:"克重(g/m³)",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"hcljz",label:"后处理卷重",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",width:"150",align:"center",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.submit(t.row)}}},[e._v("选择")])]}}])})],1)],1),e._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":e.searchData_Subset.pageno,"page-sizes":[5,10,20],"page-size":e.searchData_Subset.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:e.subsetTotal},on:{"update:currentPage":function(t){return e.$set(e.searchData_Subset,"pageno",t)},"update:current-page":function(t){return e.$set(e.searchData_Subset,"pageno",t)},"size-change":e.subsetSizeChange,"current-change":e.subsetCurrentChange}})],1)])},staticRenderFns:[]},r=a("VU/8")(i,s,!1,null,null,null);t.a=r.exports},hjNL:function(e,t){}});