1 line
30 KiB
JavaScript
1 line
30 KiB
JavaScript
webpackJsonp([101],{"5YWb":function(e,t){},EPtc:function(e,t,a){"use strict";var o={name:"dialogChooseSingleDevice",props:{id:{type:String,default:""},visible:{type:Boolean,default:!1},attribute:{}},watch:{visible:function(e,t){e!==t&&(e&&this.initData(),this.innerVisible=e)},innerVisible:function(e,t){e!==t&&this.$emit("update:visible",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,deviceType:[],deviceDept:[],addVisible:!1}},computed:{},methods:{initData:function(){var e=this;this.$api.materielAPI.typeList({pageno:1,pagesize:100}).then(function(t){0===t.code&&t.data&&(e.deviceType=t.data.datas)}),this.searchSubset()},searchSubset:function(){var e=this;this.attribute&&(this.searchData_Subset.attribute=this.attribute),this.dialogLoading=!0,this.$api.materielAPI.list(this.searchData_Subset).then(function(t){e.dialogLoading=!1,0===t.code&&(e.subsetList=t.data?t.data.datas:[],e.subsetTotal=t.data?t.data.totalRows:0)})},ckSubsetAll:function(e){this.subsetAll=e},subsetSizeChange:function(e){this.searchData_Subset.pagesize=e,this.searchSubset()},subsetCurrentChange:function(e){this.searchData_Subset.pageno=e,this.searchSubset()},submit:function(e){console.log(e);var t={serialNo:e.serialNo,name:e.name,specification:e.specification,unitUomName:e.unitUomName,id:e.id,quantityAccuracy:e.quantityAccuracy};this.$emit("change",t),this.innerVisible=!1},resetFields:function(){this.$refs.form&&this.$refs.form.resetFields()}}},i={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:"物料代码"}},[a("el-input",{attrs:{placeholder:"请出入物料代码",clearable:"",size:"small"},model:{value:e.searchData_Subset.serialNo,callback:function(t){e.$set(e.searchData_Subset,"serialNo",t)},expression:"searchData_Subset.serialNo"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"物料名称"}},[a("el-input",{attrs:{placeholder:"请输入物料名称",clearable:"",size:"small"},model:{value:e.searchData_Subset.name,callback:function(t){e.$set(e.searchData_Subset,"name",t)},expression:"searchData_Subset.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"规格型号"}},[a("el-input",{attrs:{placeholder:"请输入规格型号",clearable:"",size:"small"},model:{value:e.searchData_Subset.specification,callback:function(t){e.$set(e.searchData_Subset,"specification",t)},expression:"searchData_Subset.specification"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"物料类型"}},[a("el-select",{attrs:{filterable:"",placeholder:"请选择备件类型",clearable:"",size:"small"},model:{value:e.searchData_Subset.type,callback:function(t){e.$set(e.searchData_Subset,"type",t)},expression:"searchData_Subset.type"}},e._l(e.deviceType,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.searchSubset()}}},[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"}],attrs:{data:e.subsetList,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}}},[a("el-table-column",{attrs:{prop:"serialNo",label:"物料代码",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"名称",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"specification",label:"规格型号",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"unitUomName",label:"计量单位",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"valuationMethodName",label:"计价方法",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"typeName",label:"物料类型",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"attributeName",label:"物料属性",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"defaultFacilityName",label:"默认仓库",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"defaultLocationName",label:"默认仓位",align:"center","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},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:[]},s=a("VU/8")(o,i,!1,null,null,null);t.a=s.exports},VGgX:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a("mvHQ"),i=a.n(o),s=a("Dd8w"),l=a.n(s),n=a("ysqt"),r=a("pU78"),c=a("Dod7"),u=a("Xnfr"),m=a("lbHh"),d=a.n(m),f=a("EPtc"),p=a("FK2t"),h=a("BWzn"),b=a("5zN6"),v=a("tiiE"),g=a("bzuE"),w=a("NYxO"),D={components:{btnInput:n.a,ChooseParts:f.a,ChooseChildParts:b.a,tagSingleUsers:r.a,ChooseSingleStation:p.a,ChooseSingleProcess:h.a,dialogChooseSingleLocation:v.a},data:function(){return{formData:{bomSerialno:"",serialno:"",bomName:"",typeId:"",version:"",materielId:"",MaterialName:"",specification:"",unitUomName:"",bomCount:1,imageNo:"",remarks:"",createrName:"",useStatus:1,tableData:[],picIdArray:[],approveList:[]},chooseMaterielsVisible1:!1,chooseMaterielsVisible2:!1,choosestationVisible:!1,chooseprocessVisible:!1,bomLoading:!1,currentChildIndex:0,truelabel:1,falselabel:0,currentIndex:0,typeList:[],processoptions:[],fileDocList:[],approveList:[],config:g.a,loading:!1,deviceList:[],btnDisabled:!0,tableData:[],uomList:[],chooseParts:[],uploadAttachment:[],isDisabled:!1,ruleForm:{bomSerialno:[{required:!0,message:"请填写BOM编码",trigger:"change"}],bomName:[{required:!0,message:"请填写BOM名称",trigger:"change"}],serialno:[{required:!0,message:"请选择物料",trigger:"change"}]},uploadUrl:c.a.uploadUrl,ftpPrefix:c.a.ftpPrefix,fullscreenLoading:!1,auto_upload:!1,fac_type_list:[],fac_location_list:[],warehouseRow:"",ChooseLocationVisible:!1}},mounted:function(){var e=d.a.get("userName");this.formData.createrName=e,this.initData(),console.log("获取详情。。。。。"),this.$route.query.id&&(console.log("获取详情。。。。。"),this.getDetail())},watch:{formData:{handler:function(e,t){""==e.serialno&&(this.formData.MaterialName="",this.formData.specification="",this.formData.unitUomName="",this.formData.materielId="")},deep:!0},currentIndex:function(e){this.currentChildIndex=e}},methods:l()({},Object(w.d)({removeTagNav:"tagNav/removeTagNav"}),{changeWarehouse:function(e){this.$set(e,"defaultLocationName","选择仓位"),this.$set(e,"facilityLocationId","")},chooseLocation:function(e){this.warehouseRow=e,this.ChooseLocationVisible=!0},getLocation:function(e){this.$set(this.warehouseRow,"facilityLocationId",e.id),this.$set(this.warehouseRow,"defaultLocationName",e.name)},getDetail:function(){var e=this;this.bomLoading=!0;var t=Number(this.$route.query.id);this.id=t,this.$api.bomAPI.detailBom({id:t}).then(function(t){if(e.bomLoading=!1,e.formData=t.bomHeadInfo,e.$set(e.formData,"useStatus",t.bomHeadInfo.status),e.$set(e.formData,"serialno",t.bomHeadInfo.materialSerialNo),e.$set(e.formData,"MaterialName",t.bomHeadInfo.materialName),e.btnDisabled=!1,delete e.formData.id,delete e.formData.auditSignId,delete e.formData.auditSignId,delete e.formData.auditSignName,delete e.formData.materialSerialNo,delete e.formData.materialName,delete e.formData.status,delete e.formData.auditorName,e.tableData=t.bomDetail,e.tableData.forEach(function(t){e.$set(t,"onlyId",Math.random()),e.$set(t,"id",t.childMaterielId),e.$set(t,"serialNo",t.childMaterialSerialNo?t.childMaterialSerialNo:""),e.$set(t,"name",t.childMaterialName?t.childMaterialName:""),e.$set(t,"specification",t.childMaterialSpecification?t.childMaterialSpecification:""),e.$set(t,"unitUomName",t.childUnitUomName?t.childUnitUomName:""),e.$set(t,"supportUom",t.childSupportUom?t.childSupportUom:""),e.$set(t,"supportUomName",t.childSupportUomName?t.childSupportUomName:""),e.$set(t,"convCoefficient",t.childConvCoefficient?t.childConvCoefficient:1),console.log("xxxxxxx"+e.tableData.convCoefficient),e.$set(t,"standardCount",t.childStandardCount?t.childStandardCount:""),e.$set(t,"wasteRate",t.childWasteRate?t.childWasteRate:""),e.$set(t,"defaultFacilityName",t.childDefaultFacilityName?t.childDefaultFacilityName:""),e.$set(t,"defaultLocationName",t.childDefaultLocationName?t.childDefaultLocationName:""),e.$set(t,"remarks",t.childRemarks?t.childRemarks:"")}),t.bomFile&&t.bomFile.length>0){e.fileDocList=[];for(var a=0;a<t.bomFile.length;a++){var o={name:t.bomFile[a].fileName,url:e.ftpPrefix+t.bomFile[a].filePath},i={fileName:t.bomFile[a].fileName,filePath:t.bomFile[a].filePath};e.fileDocList.push(o),e.uploadAttachment.push(i)}}})},save:function(e){var t=this;this.$refs[e].validate(function(e){if(e){if(0===t.tableData.length)return void t.$message({message:"请至少选择一项子项物料",type:"error"});var a=!0;if(t.tableData.forEach(function(e){e.standardCount&&(e.wasteRate||0==e.wasteRate)||(a=!1)}),a){if(null!=t.uploadAttachment&&t.uploadAttachment.length>0){var o=[];t.uploadAttachment.forEach(function(e){var t={fileName:e.fileName,filePath:e.filePath};o.push(t)}),t.formData.picIdArray=i()(o)}var s=[];if(t.tableData.forEach(function(e){var a={materielId:e.id,isKeyComponents:e.isKeyComponents?e.isKeyComponents:0,isBackFlush:e.isBackFlush?e.isBackFlush:0,standardCount:e.standardCount,wasteRate:e.wasteRate,processId:e.processId?e.processId:"",stationId:e.stationId?e.stationId:"",unitUomCount:e.unitUomCount,supportUom:e.supportUom,convCoefficient:e.convCoefficient,remarks:e.remarks?e.remarks:"",facilityId:e.facilityId?e.facilityId:"",facilityLocationId:e.facilityLocationId?e.facilityLocationId:""};s.push(a),t.formData.partIdArray=i()(s)}),t.isDisabled)return;t.isDisabled=!0,t.$api.bomAPI.saveBom({materielId:t.formData.materielId,serialno:t.formData.bomSerialno,name:t.formData.bomName,type:t.formData.typeId,version:t.formData.version,count:t.formData.bomCount,imageNo:t.formData.imageNo,remarks:t.formData.remarks,useStatus:t.formData.useStatus,childBomArray:t.formData.partIdArray,uploadAttachment:t.formData.picIdArray}).then(function(e){t.isDisabled=!1,0===e.code?(t.$message({message:e.msg,type:"success"}),t.gotoBom()):t.$message({message:e.msg,type:"error"})})}else t.$message({message:"标准用量和耗损率必填",type:"error"})}})},initData:function(){var e=this;this.$api.bomAPI.getBomTypeList({type:"bom_type"}).then(function(t){console.log(t),e.typeList=t.datas,console.log(e.typeList)}),this.$api.gylInventoryAPI.facilityList({pageno:1,pagesize:1e3,auditSign:179}).then(function(t){e.fac_type_list=t.data.datas?t.data.datas:""}).catch(function(e){console.log(e)}),this.$api.gylInventoryAPI.facilityLocationList({pageno:1,pagesize:1e3}).then(function(t){e.fac_location_list=t.data.datas?t.data.datas:""}).catch(function(e){console.log(e)})},changeConvCoefficient:function(e){isNaN(e.convCoefficient)||!e.convCoefficient?(e.convCoefficient=1,isNaN(e.standardCount)?e.unitUomCount=0:e.unitUomCount=e.standardCount.toFixed(e.quantityAccuracy)):isNaN(e.standardCount)?e.unitUomCount=0:e.unitUomCount=parseFloat((parseFloat(e.convCoefficient)*parseFloat(e.standardCount)).toFixed(e.quantityAccuracy))},changeCount:function(e){e.convCoefficient=e.convCoefficient,isNaN(e.convCoefficient)||isNaN(e.standardCount)?e.unitUomCount=0:e.unitUomCount=parseFloat((parseFloat(e.convCoefficient)*parseFloat(e.standardCount)).toFixed(e.quantityAccuracy))},getSupportUomName:function(){var e=this;this.$api.dictAPI.getDictsByType("uom_type").then(function(t){e.uomList=t.datas})},getPart:function(e){this.getSupportUomName(),console.log(e),e&&(this.$set(this.formData,"quantityAccuracy",e.quantityAccuracy),this.$set(this.formData,"serialno",e.serialNo),this.$set(this.formData,"MaterialName",e.name),this.$set(this.formData,"specification",e.specification),this.$set(this.formData,"unitUomName",e.unitUomName),this.$set(this.formData,"materielId",e.id)),this.setBtn(e)},getChildPart:function(e){var t=this;e&&e.forEach(function(e){t.$set(e,"onlyId",Date.now()),e.convCoefficient||t.$set(e,"convCoefficient",1),e.serialNo!==t.formData.serialno?t.tableData.push(e):t.$message.warning("选择的子项物料不要和主产品重复")})},showOperate:function(e,t){this.currentChildIndex=t,this.choosestationVisible=!0},getStation:function(e){this.$set(this.tableData[this.currentChildIndex],"stationId",e.id),this.$set(this.tableData[this.currentChildIndex],"stationName",e.name)},showOperate1:function(e,t){this.currentChildIndex=t,this.chooseprocessVisible=!0},getProcess:function(e){this.$set(this.tableData[this.currentChildIndex],"processId",e.id),this.$set(this.tableData[this.currentChildIndex],"processName",e.name)},removePart:function(){var e=this;this.chooseParts&&(console.log(this.chooseParts),this.chooseParts.forEach(function(t){var a=e.tableData.findIndex(function(e){if(e.onlyId==t.onlyId&&e.id==t.id)return!0});e.tableData.splice(a,1)}))},handlePartChange:function(e){this.chooseParts=e},setBtn:function(e){e.serialNo&&(this.btnDisabled=!1)},gotoBom:function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.$router.push({path:"/basic/bom",query:{t:Date.now()}})},httpRequest:function(e,t,a){var o=this,i=new FormData;i.append("file",e,t),this.$api.commonAPI.uploadUrl(i).then(function(t){o.fullscreenLoading=!1,0==t.code?(o.$message({message:"上传成功",type:"success",duration:2e3}),a?a.filePath=t.filePath:e.filePath=t.filePath,o.uploadAttachment.push({filePath:t.filePath,fileName:t.fileName})):(o.fullscreenLoading=!1,o.$message.error("上传失败"),o.$refs.upload.uploadFiles.splice(o.$refs.upload.uploadFiles.length-1,1))})},onPreview:function(e){e.url?window.open(e.url):e.raw&&window.open(this.ftpPrefix+e.raw.filePath)},uploadSuccess:function(e,t){"操作成功"===e.msg&&this.uploadAttachment.push({filePath:e.filePath,fileName:e.fileName})},onChange:function(e,t){if(e.size>1e8)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(e=e.raw,/image\/\w+/.test(e.type)){this.fullscreenLoading=!0;var a=this;u.a.compressAccurately(e,400).then(function(t){t.size?a.httpRequest(t,e.name,e):(a.$message.error("压缩图片失败"),a.fullscreenLoading=!1,a.$refs.upload.uploadFiles.splice(a.$refs.upload.uploadFiles.length-1,1))}).catch(function(t){a.httpRequest(e,e.name)})}else this.fullscreenLoading=!0,this.httpRequest(e,e.name)},handleRemove:function(e,t){if(e.raw){for(var a=void 0,o=0;o<this.uploadAttachment.length;o++)this.uploadAttachment[o].filePath==e.raw.filePath&&(a=o);this.uploadAttachment.splice(a,1)}else{for(var i=void 0,s=0;s<this.uploadAttachment.length;s++)this.uploadAttachment[s].filePath==e.url.substr(1)&&(i=s);this.uploadAttachment.splice(i,1)}}})},y={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sys-box"},[a("div",{staticClass:"sys-operate",staticStyle:{position:"relative"}},[a("el-button",{staticStyle:{position:"absolute",top:"0"},attrs:{type:"primary",size:"small"},on:{click:e.gotoBom}},[e._v(e._s(e.config.cancelText)+"\n ")]),e._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"basic:bom:add",expression:"'basic:bom:add'"}],staticStyle:{position:"absolute",top:"0",left:"76px"},attrs:{type:"primary",size:"small",disabled:e.isDisabled},on:{click:function(t){return e.save("form")}}},[e._v("保存\n ")])],1),e._v(" "),a("div",{staticClass:"sys-form"},[a("el-divider",{attrs:{"content-position":"left"}},[e._v("主产品")]),e._v(" "),a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.bomLoading,expression:"bomLoading"}],ref:"form",attrs:{"label-width":"120px",model:e.formData,rules:e.ruleForm,"inline-message":!0}},[a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"BOM编码",prop:"bomSerialno"}},[a("el-input",{attrs:{placeholder:"请输入BOM编码",clearable:"",size:"small"},model:{value:e.formData.bomSerialno,callback:function(t){e.$set(e.formData,"bomSerialno",t)},expression:"formData.bomSerialno"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"BOM名称",prop:"bomName"}},[a("el-input",{attrs:{placeholder:"请输入BOM名称",clearable:"",size:"small"},model:{value:e.formData.bomName,callback:function(t){e.$set(e.formData,"bomName",t)},expression:"formData.bomName"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"BOM类别"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择",size:"small"},model:{value:e.formData.typeId,callback:function(t){e.$set(e.formData,"typeId",t)},expression:"formData.typeId"}},e._l(e.typeList,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:"版本号"}},[a("el-input",{attrs:{placeholder:"请输入版本号",clearable:"",size:"small"},model:{value:e.formData.version,callback:function(t){e.$set(e.formData,"version",t)},expression:"formData.version"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"产品代码",prop:"serialno"}},[a("btn-input",{attrs:{valueText:e.formData.serialno,valueId:e.formData.materielId,chooseVisible:e.chooseMaterielsVisible1},on:{"update:valueText":function(t){return e.$set(e.formData,"serialno",t)},"update:value-text":function(t){return e.$set(e.formData,"serialno",t)},"update:valueId":function(t){return e.$set(e.formData,"materielId",t)},"update:value-id":function(t){return e.$set(e.formData,"materielId",t)},"update:chooseVisible":function(t){e.chooseMaterielsVisible1=t},"update:choose-visible":function(t){e.chooseMaterielsVisible1=t}}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"产品名称"}},[a("el-input",{attrs:{disabled:"",size:"small"},model:{value:e.formData.MaterialName,callback:function(t){e.$set(e.formData,"MaterialName",t)},expression:"formData.MaterialName"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"规格型号"}},[a("el-input",{attrs:{disabled:"",size:"small"},model:{value:e.formData.specification,callback:function(t){e.$set(e.formData,"specification",t)},expression:"formData.specification"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"主计量单位"}},[a("el-input",{attrs:{disabled:"",size:"small"},model:{value:e.formData.unitUomName,callback:function(t){e.$set(e.formData,"unitUomName",t)},expression:"formData.unitUomName"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"图号"}},[a("el-input",{attrs:{clearable:"",size:"small"},model:{value:e.formData.imageNo,callback:function(t){e.$set(e.formData,"imageNo",t)},expression:"formData.imageNo"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"制单人"}},[a("el-input",{attrs:{disabled:"",size:"small"},model:{value:e.formData.createrName,callback:function(t){e.$set(e.formData,"createrName",t)},expression:"formData.createrName"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"审核人"}},[a("el-input",{attrs:{readonly:"",size:"small"},model:{value:e.formData.auditor,callback:function(t){e.$set(e.formData,"auditor",t)},expression:"formData.auditor"}})],1),e._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"数量"}},[a("el-input-number",{staticStyle:{width:"100%"},attrs:{precision:e.formData.quantityAccuracy,label:"描述文字",size:"small",disabled:""},model:{value:e.formData.bomCount,callback:function(t){e.$set(e.formData,"bomCount",t)},expression:"formData.bomCount"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"备注"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autosize:{minRows:4},clearable:""},model:{value:e.formData.remarks,callback:function(t){e.$set(e.formData,"remarks",t)},expression:"formData.remarks"}})],1),e._v(" "),a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"状态"}},[a("el-radio-group",{model:{value:e.formData.useStatus,callback:function(t){e.$set(e.formData,"useStatus",t)},expression:"formData.useStatus"}},[a("el-radio",{attrs:{label:1}},[e._v("启用")]),e._v(" "),a("el-radio",{attrs:{label:0}},[e._v("禁用")])],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"附件上传"}},[a("el-upload",{directives:[{name:"loading",rawName:"v-loading.lock",value:e.fullscreenLoading,expression:"fullscreenLoading",modifiers:{lock:!0}}],ref:"upload",attrs:{action:e.uploadUrl,"on-success":e.uploadSuccess,"on-remove":e.handleRemove,"file-list":e.fileDocList,"on-preview":e.onPreview,"auto-upload":e.auto_upload,"on-change":e.onChange,accept:".pdf,.doc,.docx,.xls,.xlsx,.txt,.bmp,.gif,.rar,.zip,.png,.jpg,.jpeg"}},[a("el-button",{attrs:{size:"small",type:"primary"}},[e._v("点击上传")]),e._v(" "),a("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v("附件最大100M,支持格式:PDF、Word、Excel、Txt、JPG、PNG、BMP、GIF、RAR)\n ")])],1)],1)],1),e._v(" "),a("el-divider",{attrs:{"content-position":"left"}},[e._v("子项物料")]),e._v(" "),a("el-form-item",{staticClass:"childlist"},[a("div",{staticClass:"sys-operate"},[a("el-button",{attrs:{type:"primary",size:"small",disabled:e.btnDisabled},on:{click:function(t){e.chooseMaterielsVisible2=!0}}},[e._v("\n 选择物料\n ")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.removePart()}}},[e._v("删除")])],1),e._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{attrs:{border:"","header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"},data:e.tableData},on:{"selection-change":e.handlePartChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"物料代码","show-overflow-tooltip":"",width:"120"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",align:"center",label:"物料名称","show-overflow-tooltip":"",width:"120"}}),e._v(" "),a("el-table-column",{attrs:{prop:"specification",align:"center",label:"规格型号","show-overflow-tooltip":"",width:"120"}}),e._v(" "),a("el-table-column",{attrs:{prop:"unitUomName",align:"center",label:"主计量单位","show-overflow-tooltip":"",width:"80"}}),e._v(" "),a("el-table-column",{attrs:{prop:"unitUomCount",align:"center",label:"主单位用量","show-overflow-tooltip":"",width:"85"}}),e._v(" "),a("el-table-column",{attrs:{prop:"supportUomName",align:"center",label:"辅助单位","show-overflow-tooltip":"",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{staticStyle:{width:"90% !important"},attrs:{clearable:"",filterable:"",placeholder:"请选择辅助单位"},model:{value:t.row.supportUomName,callback:function(a){e.$set(t.row,"supportUomName",a)},expression:"scope.row.supportUomName"}},e._l(e.uomList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"convCoefficient",align:"center",label:"换算系数",width:"130","label-class-name":"required_head"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,size:"small",precision:t.row.quantityAccuracy,"controls-position":"right"},on:{change:function(a){return e.changeConvCoefficient(t.row)}},model:{value:t.row.convCoefficient,callback:function(a){e.$set(t.row,"convCoefficient",a)},expression:"scope.row.convCoefficient"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"isKeyComponents",width:"50",align:"center",label:"是否关键件","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-checkbox",{attrs:{"true-label":e.truelabel,"false-label":e.falselabel},model:{value:t.row.isKeyComponents,callback:function(a){e.$set(t.row,"isKeyComponents",a)},expression:"scope.row.isKeyComponents"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"isBackFlush",width:"50",align:"center",label:"是否倒冲件","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-checkbox",{attrs:{"true-label":e.truelabel,"false-label":e.falselabel},model:{value:t.row.isBackFlush,callback:function(a){e.$set(t.row,"isBackFlush",a)},expression:"scope.row.isBackFlush"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"standardCount",align:"center",label:"标准用量(辅单位)","show-overflow-tooltip":"",width:"140","label-class-name":"required_head"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,size:"small",precision:t.row.quantityAccuracy,"controls-position":"right"},on:{change:function(a){return e.changeCount(t.row)}},model:{value:t.row.standardCount,callback:function(a){e.$set(t.row,"standardCount",a)},expression:"scope.row.standardCount"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"wasteRate",align:"center",label:"损耗率(%)",width:"130","label-class-name":"required_head"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,size:"small","controls-position":"right"},model:{value:t.row.wasteRate,callback:function(a){e.$set(t.row,"wasteRate",a)},expression:"scope.row.wasteRate"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"defaultFacilityName",align:"center",label:"发料仓库","show-overflow-tooltip":"",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form-item",[a("el-select",{attrs:{clearable:"",placeholder:"仓库"},on:{change:function(a){return e.changeWarehouse(t.row)}},model:{value:t.row.facilityId,callback:function(a){e.$set(t.row,"facilityId",a)},expression:"scope.row.facilityId"}},e._l(e.fac_type_list,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"defaultLocationName",align:"center",label:"发料仓位","show-overflow-tooltip":"",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticStyle:{color:"#3a8ee6",cursor:"pointer"},on:{click:function(a){return e.chooseLocation(t.row,t.$index)}}},[e._v("\n "+e._s(t.row.defaultLocationName)+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"processId",align:"center",label:"工序","show-overflow-tooltip":"",width:"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("btn-input",{attrs:{valueText:t.row.processName,valueId:t.row.processId,chooseVisible:e.chooseprocessVisible,currentIndex:e.currentIndex,index:t.$index},on:{"update:valueText":function(a){return e.$set(t.row,"processName",a)},"update:value-text":function(a){return e.$set(t.row,"processName",a)},"update:valueId":function(a){return e.$set(t.row,"processId",a)},"update:value-id":function(a){return e.$set(t.row,"processId",a)},"update:chooseVisible":function(t){e.chooseprocessVisible=t},"update:choose-visible":function(t){e.chooseprocessVisible=t},"update:currentIndex":function(t){e.currentIndex=t},"update:current-index":function(t){e.currentIndex=t}}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"stationName",align:"center",label:"工位","show-overflow-tooltip":"",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("btn-input",{attrs:{valueText:t.row.stationName,valueId:t.row.stationId,chooseVisible:e.choosestationVisible,currentIndex:e.currentIndex,index:t.$index},on:{"update:valueText":function(a){return e.$set(t.row,"stationName",a)},"update:value-text":function(a){return e.$set(t.row,"stationName",a)},"update:valueId":function(a){return e.$set(t.row,"stationId",a)},"update:value-id":function(a){return e.$set(t.row,"stationId",a)},"update:chooseVisible":function(t){e.choosestationVisible=t},"update:choose-visible":function(t){e.choosestationVisible=t},"update:currentIndex":function(t){e.currentIndex=t},"update:current-index":function(t){e.currentIndex=t}}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"remarks",align:"center",label:"备注","show-overflow-tooltip":"",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autosize:{minRows:1},clearable:""},model:{value:t.row.remarks,callback:function(a){e.$set(t.row,"remarks",a)},expression:"scope.row.remarks"}})]}}])})],1)],1)])],1)],1),e._v(" "),a("ChooseParts",{attrs:{visible:e.chooseMaterielsVisible1},on:{"update:visible":function(t){e.chooseMaterielsVisible1=t},change:e.getPart}}),e._v(" "),a("ChooseChildParts",{attrs:{visible:e.chooseMaterielsVisible2},on:{"update:visible":function(t){e.chooseMaterielsVisible2=t},change:e.getChildPart}}),e._v(" "),a("ChooseSingleStation",{attrs:{visible:e.choosestationVisible},on:{"update:visible":function(t){e.choosestationVisible=t},change:e.getStation}}),e._v(" "),a("ChooseSingleProcess",{attrs:{visible:e.chooseprocessVisible},on:{"update:visible":function(t){e.chooseprocessVisible=t},change:e.getProcess}}),e._v(" "),a("dialogChooseSingleLocation",{attrs:{warehouseId:e.warehouseRow.warehouse,visible:e.ChooseLocationVisible},on:{"update:visible":function(t){e.ChooseLocationVisible=t},change:e.getLocation}})],1)},staticRenderFns:[]};var _=a("VU/8")(D,y,!1,function(e){a("5YWb"),a("WNNk")},"data-v-2784695e",null);t.default=_.exports},WNNk:function(e,t){}}); |