webpackJsonp([21],{M8ec:function(t,e){},NOG5:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("d7EF"),o=a.n(i),s=a("//Fk"),n=a.n(s),r=a("BO1k"),l=a.n(r),c=a("woOf"),u=a.n(c),d=a("Dd8w"),p=a.n(d),m=a("mvHQ"),h=a.n(m),f=a("Dod7"),b=(a("S8x/"),a("TExn"),a("bzuE")),v=a("NYxO"),g=a("lbHh"),D=a.n(g),_=a("MJLE"),y=a.n(_),S=(a("uNt2"),{components:{},name:"",props:{printDetail:{type:Object},printList:{type:Array,default:[]},printForm:{type:Array,default:[]},printDirection:{type:Boolean,default:!0}},data:function(){return{pageHeight:"",pageWidth:"",config:b.a,dataList:[],checkList:[],planNo:"",code:[]}},component:{},watch:{printDetail:{handler:function(t,e){console.log(t),this.planNo=t.planNo,this.$nextTick(function(){this.toQrCode1()}),this.toQrCode()},deep:!0}},mounted:function(){this.printDirection?(this.pageHeight=this.config.printHeightDirection0,this.pageWidth=this.config.printWidthDirection0):(this.pageHeight=this.config.printHeightDirection1,this.pageWidth=this.config.printWidthDirection1)},methods:{toQrCode:function(){var t=document.querySelector(".qr_out");console.log(t),t.style.opacity=0,t.innerHTML="";var e=new y.a(qrcode,{colorDark:"#000000",colorLight:"#ffffff",typeNumber:4,width:80,height:80});console.log(this.planNo);var a={planNo:this.planNo};e.clear(),e.makeCode(h()(a)),this.$nextTick(function(){t.style.opacity=1})},toQrCode1:function(){var t=document.querySelectorAll(".qr_outs");console.log(this.printDetail.bodyInfo);for(var e=0;e",window.print(),window.location.reload(),!1})},rowkey:function(t){},showOperate:function(t,e){this.currentChildIndex=e,this.chooseUserVisible=!0},getUser:function(t){this.$set(this.WorkingProduceList[this.currentChildIndex],"operatorName",t.NAME),this.$set(this.WorkingProduceList[this.currentChildIndex],"operator",t.userId)},showDeviceName:function(t,e){this.currentChildIndex=e,this.chooseDeviceNameVisible=!0},showPro:function(t,e){var a=this;t.deviceId?(this.$api.netWorkingAPI.measurePointList({deviceId:t.deviceId}).then(function(t){0===t.code?a.pointList=t.data?t.data.datas:[]:a.pointList=[]}),this.ProList=JSON.parse(h()(t.proDetail)),this.initiateProList=JSON.parse(h()(t.proDetail))):this.ProList=[],this.currentChildIndex=e,this.chooseProVisible=!0},showPro1:function(t,e){if(this.uploadAttachment=[],this.ftpPrefix=[],t.uploadAttachment&&""!=t.uploadAttachment){var a=JSON.parse(t.uploadAttachment);this.fileDocList=[];for(var i=0;i0&&t.deptId){var a=h()(t.deptId),i=e.treeFindPath(e.depOptions,function(t){return t.id===a});t.selectDeptId=JSON.parse(h()(i))}t.only=Date.now(),t.processId=t.id,t.newId=t.id,t.isExamine=void 0!=t.whetherExamine?t.whetherExamine:0,t.isCollect=void 0!=t.whetherCollect?t.whetherCollect:0,t.isOutsource=void 0!=t.whetherOutsource?t.whetherOutsource:0,t.isAuto=void 0!=t.autoDispatch?t.autoDispatch:0,t.planCount=t.planCount?t.planCount:0,t.totalHour=t.totalHour?t.totalHour:0,t.standard=t.standard?t.standard:0,t.processType=t.type?t.type:"",t.planStartTime=e.today_time,t.planEndTime=e.tomorrow_time,t.pointList=[],t.processAutoCollectDetail&&t.processAutoCollectDetail.forEach(function(a){e.$set(a,"onlyId",a.pointId+"_"+Date.now()),t.pointList.push(a.pointId)});var o=[];t.uploadAttachment&&t.uploadAttachment.forEach(function(t){var e={fileName:t.fileName,filePath:t.filePath};o.push(e)}),t.uploadAttachment=h()(o),t.pro=[],t.proDetail&&t.proDetail.forEach(function(e){e.newId=e.proId;var a={proId:e.proId,whetherCheck:e.whetherCheck?e.whetherCheck:0,remark:e.remark?e.remark:"",uom:e.uom?e.uom:"",min:e.min?e.min:"",max:e.max?e.max:"",pointId:e.pointId?e.pointId:""};t.pro.push(a)}),t.id&&delete t.id;var s=u()({},s,t);e.WorkingProduceList.push(s),e.WorkingProduceList=e.unique(e.WorkingProduceList)}))},unique:function(t){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:[];if(!t)return[];var i=!0,o=!1,s=void 0;try{for(var n,r=l()(t);!(i=(n=r.next()).done);i=!0){var c=n.value;if(a.push(c.id),e(c))return a;if(c.children){var u=this.treeFindPath(c.children,e,a);if(u.length)return u}a.pop()}}catch(t){o=!0,s=t}finally{try{!i&&r.return&&r.return()}finally{if(o)throw s}}return[]},setDeptList:function(t){var e=!0,a=!1,i=void 0;try{for(var o,s=l()(t);!(e=(o=s.next()).done);e=!0){var n=o.value;n.hasChildren?this.setDeptList(n.children):n.children=void 0}}catch(t){a=!0,i=t}finally{try{!e&&s.return&&s.return()}finally{if(a)throw i}}},setDefaultDept:function(){if(this.depOptions.length>0&&this.formData.proDept){var t=h()(this.formData.proDept),e=this.treeFindPath(this.depOptions,function(e){return e.id===t});this.selectDeptId=JSON.parse(h()(e))}},setDefaultDeptChild:function(){var t=this;this.depOptions.length>0&&this.WorkingProduceList.length>0&&this.WorkingProduceList.forEach(function(e){if(t.depOptions.length>0&&e.deptId){var a=h()(e.deptId),i=t.treeFindPath(t.depOptions,function(t){return t.id===a});e.selectDeptId=JSON.parse(h()(i))}})},handleChange:function(t){this.$set(this.formData,"proDept",t.length>=1?t[t.length-1]:""),this.selectDeptId=t},handleChangeScope:function(t){var e=t.selectDeptId[t.selectDeptId.length-1];this.$set(t,"deptId",e)},getDetail:function(){var t=this;this.loading=!0,this.$nextTick().then(function(){t.$api.planManagementAPI.workingProcedurePlanDetail({id:t.formData.id}).then(function(e){t.loading=!1,0===e.code&&t.setDetail(e)})}).catch(function(e){t.loading=!1})},setDetail:function(t){var e=this;this.formData.convCoefficient=t.headInfo.convCoefficient,this.formData.supportUom=t.headInfo.supportUom,this.formData.supportUomName=t.headInfo.supportUomName?t.headInfo.supportUomName:"",this.$set(this.formData,"sourceType",t.headInfo.sourceType?t.headInfo.sourceType:""),this.$set(this.formData,"productTypeName",t.headInfo.typeName?t.headInfo.typeName:""),this.productType=t.headInfo.typeId?t.headInfo.typeId:"",this.$set(this.formData,"sourceId",t.headInfo.sourceId?t.headInfo.sourceId:""),this.$set(this.formData,"sourceNo",t.headInfo.sourceNo?t.headInfo.sourceNo:""),this.$set(this.formData,"createTime",t.headInfo.createTime?t.headInfo.createTime:""),this.$set(this.formData,"planNo",t.headInfo.planNo?t.headInfo.planNo:""),this.$set(this.formData,"materielSerialNo",t.headInfo.materielSerialNo?t.headInfo.materielSerialNo:""),this.$set(this.formData,"materielName",t.headInfo.materielName?t.headInfo.materielName:""),this.$set(this.formData,"priority",t.headInfo.priority?t.headInfo.priority:""),this.$set(this.formData,"materielId",t.headInfo.materielId?t.headInfo.materielId:""),this.$set(this.formData,"specification",t.headInfo.specification?t.headInfo.specification:""),this.$set(this.formData,"unitUomName",t.headInfo.unitUomName?t.headInfo.unitUomName:""),this.$set(this.formData,"proDept",t.headInfo.proDeptId?t.headInfo.proDeptId:""),this.selectDeptId=t.headInfo.proDeptId?t.headInfo.proDeptId:"",this.$set(this.formData,"type",t.headInfo.typeId?t.headInfo.typeId:""),this.$set(this.formData,"isQuota",t.headInfo.isQuota?t.headInfo.isQuota.toString():"0"),this.$set(this.formData,"count",t.headInfo.planCount&&t.headInfo.convCoefficient?t.headInfo.convCoefficient*t.headInfo.planCount:""),this.$set(this.formData,"countSupport",t.headInfo.planCount?t.headInfo.planCount:""),this.$set(this.formData,"batchNo",t.headInfo.batchNo?t.headInfo.batchNo:""),this.$set(this.formData,"planStartTime",t.headInfo.planStartTime?t.headInfo.planStartTime:""),this.$set(this.formData,"planEndTime",t.headInfo.planEndTime?t.headInfo.planEndTime:""),this.$set(this.formData,"bomSerialno",t.headInfo.bomSerialno?t.headInfo.bomSerialno:""),this.$set(this.formData,"bomId",t.headInfo.bomId?t.headInfo.bomId:""),this.$set(this.formData,"version",t.headInfo.bomVersion?t.headInfo.bomVersion:""),this.$set(this.formData,"tecRouteId",t.headInfo.tecRouteId?t.headInfo.tecRouteId:""),this.$set(this.formData,"tecRouteName",t.headInfo.tecRouteName?t.headInfo.tecRouteName:""),this.$set(this.formData,"tecRouteVersion",t.headInfo.tecRouteVersion?t.headInfo.tecRouteVersion:""),this.$set(this.formData,"completionMax",t.headInfo.completionMax?t.headInfo.completionMax:""),this.$set(this.formData,"completionMin",t.headInfo.completionMin?t.headInfo.completionMin:""),this.$set(this.formData,"isCheck",t.headInfo.isCheck?t.headInfo.isCheck.toString():"0"),this.$set(this.formData,"clientName",t.headInfo.clientName?t.headInfo.clientName:""),this.$set(this.formData,"deliveryDate",t.headInfo.deliveryDate?t.headInfo.deliveryDate:""),this.$set(this.formData,"clientProductName",t.headInfo.clientProductName?t.headInfo.clientProductName:""),this.$set(this.formData,"clientProductNo",t.headInfo.clientProductNo?t.headInfo.clientProductNo:""),this.$set(this.formData,"planStatusName",t.headInfo.planStatusName?t.headInfo.planStatusName:""),this.$set(this.formData,"clientProductNo",t.headInfo.clientProductNo?t.headInfo.clientProductNo:""),this.$set(this.formData,"giveTime",t.headInfo.giveTime?t.headInfo.giveTime:""),this.$set(this.formData,"actualFinishTime",t.headInfo.actualFinishTime?t.headInfo.actualFinishTime:""),this.$set(this.formData,"userName",t.headInfo.createrName?t.headInfo.createrName:""),this.$set(this.formData,"originalPlanNo",t.headInfo.originalPlanNo?t.headInfo.originalPlanNo:""),this.$set(this.formData,"productionPlanId",t.headInfo.productionPlanId?t.headInfo.productionPlanId:""),this.planStatus=t.headInfo.planStatusId,this.WorkingProduceList=t.bodyInfo,this.printDetail.planNo=t.headInfo.planNo,this.printDetail.materielSerialNo=t.headInfo.materielSerialNo,this.printDetail.planCount=t.headInfo.planCount,this.printDetail.imageNo=t.headInfo.imageNo,this.printDetail.materielName=t.headInfo.materielName,this.printDetail.specification=t.headInfo.specification,this.printDetail.bodyInfo=t.bodyInfo,this.WorkingProduceList.forEach(function(t){t.code=t.processCode?t.processCode:"",t.processName=t.processName?t.processName:"",t.operator=t.operatorId?t.operatorId:"",t.operatorName=t.operatorName?t.operatorName:"",t.typeName=t.processTypeName?t.processTypeName:"",t.processType=t.processTypeId?t.processTypeId:"",t.proDetail=t.checkProject?t.checkProject:[],t.pointList=[],t.processAutoCollectDetail&&t.processAutoCollectDetail.forEach(function(a){e.$set(a,"onlyId",a.pointId+"_"+Date.now()),t.pointList.push(a.pointId)});var a=[];t.uploadAttachment&&t.uploadAttachment.forEach(function(t){var e={fileName:t.fileName,filePath:t.filePath};a.push(e)}),t.uploadAttachment=h()(a);var i=[];t.proDetail.forEach(function(t){var e={proId:t.proId,whetherCheck:t.whetherCheck?t.whetherCheck:0,id:t.id,remark:t.remark?t.remark:"",uom:t.uom?t.uom:"",min:t.min?t.min:"",max:t.max?t.max:"",pointId:t.pointId?t.pointId:""};i.push(e)}),t.pro=i}),this.setDefaultDeptChild(),this.setDefaultDept()},initData:function(){var t=this;this.$api.netWorkingAPI.measurePointList().then(function(e){0===e.code?(e.data.datas.forEach(function(t){1==t.isManualInput?t.isManualInput="是":t.isManualInput="否"}),t.pointList=e.data.datas?e.data.datas:[]):t.pointList=[]}),this.$api.processAPI.processTypeList({type:"uom_type"}).then(function(e){t.uomList=e.datas}),n.a.all([this.$api.dictAPI.getDictsByType("invoices_type"),this.$api.commonAPI.getDeptsTree(),this.$api.dictAPI.getDictsByType("production_type")].map(function(t){return t.catch(function(t){return t})})).then(function(e){var a=o()(e,3),i=a[0],s=a[1],n=a[2];i.code,0===s.code&&(t.depOptions=s.data.children,t.setDeptList(t.depOptions),t.setDefaultDept(),t.setDefaultDeptChild()),0===n.code&&(t.typeList=n.datas)}).catch(function(t){console.log(t)}),this.$api.salesAPI.listContractType({type:"priority"}).then(function(e){t.priorityList=e.datas})},back:function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),"rework"==this.from&&"work_report"==this.which_rework?this.$router.push({path:"/jobShop/work_report"}):"rework"==this.from&&"work_check"==this.which_rework?this.$router.push({path:"/jobShop/work_check"}):this.$router.push({path:"/planManagement/working_procedure"})},save:function(t,e){var a=this;this.$refs[t].validate(function(t){if(!t)return!1;if(new Date(a.formData.planEndTime).getTime()-new Date(a.formData.planStartTime).getTime()<0)a.$message({message:"计划完工日期必须大于计划开工日期!",type:"error"});else if(0!=a.WorkingProduceList.length){var i=!0;if(a.WorkingProduceList.forEach(function(t){t.selectDeptId||(i=!1)}),i){var o=!0;if(a.WorkingProduceList.forEach(function(t){1!=t.isAuto||t.deviceId&&t.operator||(o=!1)}),o){if(console.log(a.productType),235==a.productType){var s=[];a.model_table.WorkingProduceList.forEach(function(t){s.push(t.serialNumber)});for(var n=0;n1e8)return this.$message.error("上传文件不能超过100M!"),this.$refs.upload.fileList=this.$refs.upload.fileList,this.$refs.upload.uploadFiles.splice(this.$refs.upload.uploadFiles.length-1,1),!1;if(t=t.raw,/image\/\w+/.test(t.type)){this.fullscreenLoading=!0;var a=this;k.a.compressAccurately(t,400).then(function(e){e.size?a.httpRequest(e,t.name,t):(a.$message.error("压缩图片失败"),a.fullscreenLoading=!1,a.$refs.upload.uploadFiles.splice(a.$refs.upload.uploadFiles.length-1,1))}).catch(function(e){a.httpRequest(t,t.name)})}else this.fullscreenLoading=!0,this.httpRequest(t,t.name)},handleRemove:function(t,e){if(t.raw){for(var a=void 0,i=0;i0&&this.subsetAll.forEach(function(t){e.push(t)}),this.$emit("change",e),this.innerVisible=!1},resetFields:function(){this.$refs.form&&this.$refs.form.resetFields()}}},o={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:"工序名称"}},[a("el-input",{attrs:{placeholder:"请输入工序名称",clearable:""},model:{value:t.searchData_Subset.name,callback:function(e){t.$set(t.searchData_Subset,"name",e)},expression:"searchData_Subset.name"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.searchSubset}},[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,"selection-change":t.ckSubsetAll}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"code",align:"center",fixed:"",label:"工序代码","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",align:"center",fixed:"",label:"工序名称","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"standard",align:"center",label:"基准良率","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"typeName",align:"center",label:"工序类型","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"whetherExamine",align:"center",label:"是否检验","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.whetherExamine?a("div",[t._v("是")]):a("div",[t._v("否")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"whetherCollect",align:"center",label:"是否自动采集","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.whetherCollect?a("div",[t._v("是")]):a("div",[t._v("否")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"manHour",align:"center",label:"单件工时(分钟)","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"labourPrice",align:"center",label:"单件工价(元/件)","show-overflow-tooltip":""}})],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),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary",loading:t.loading},on:{click:function(e){return t.submit()}}},[t._v("确定")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.innerVisible=!1}}},[t._v("关闭")])],1)])},staticRenderFns:[]};var s=a("VU/8")(i,o,!1,function(t){a("M8ec")},null,null);e.a=s.exports}});