|
|
|
@ -75,6 +75,7 @@ |
|
|
|
<el-form label-position="top" style="margin-top: 2px; margin-left: 2px;"> |
|
|
|
<el-button type="primary" @click="saveComponentModal2">新增</el-button> |
|
|
|
<el-button type="primary" @click="deleteComponentPart2">删除</el-button> |
|
|
|
<el-button type="primary" @click="createByStandardOperation">基于标准工序快速创建</el-button> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:data="copyTempRoutingList" |
|
|
|
@ -216,32 +217,86 @@ |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- BOM子明细新增模态框 --> |
|
|
|
<el-dialog title="子物料" :close-on-click-modal="false" top="25vh" v-drag :visible.sync="componentSaveModal1" width="540px"> |
|
|
|
<el-dialog title="子物料" :close-on-click-modal="false" top="25vh" v-drag :visible.sync="componentSaveModal1" width="620px"> |
|
|
|
<el-form :inline="true" label-position="top" :model="componentData1" :rules="componentRules1" style="margin-left: 5px"> |
|
|
|
<el-form-item :label="'序号'" prop="lineSequence"> |
|
|
|
<el-input-number :controls="false" :step="0" v-model="componentData1.lineSequence" style="width: 50px"></el-input-number> |
|
|
|
<el-form-item label="序号" prop="lineSequence"> |
|
|
|
<el-input-number :controls="false" :step="0" v-model="componentData1.lineSequence" style="width: 49px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="componentPart"> |
|
|
|
<span v-if="!componentDisableFlag1" slot="label" @click="queryComponentPartModal"><a herf="#">子物料编码</a></span> |
|
|
|
<span v-if="componentDisableFlag1" slot="label">子物料编码</span> |
|
|
|
<el-input v-model="componentData1.componentPart" :disabled="componentDisableFlag1" @blur="componentPartBlur" style="width: 120px"></el-input> |
|
|
|
<el-input v-model="componentData1.componentPart" :disabled="componentDisableFlag1" @blur="componentPartBlur" style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'子物料名称'"> |
|
|
|
<el-input v-model="componentData1.partDesc" disabled style="width: 300px"></el-input> |
|
|
|
<el-form-item label="子物料名称"> |
|
|
|
<el-input v-model="componentData1.partDesc" disabled style="width: 249px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="物料单位"> |
|
|
|
<el-input v-model="componentData1.printUnitName" disabled style="width: 110px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="componentData1" :rules="componentRules1" style="margin-left: 5px"> |
|
|
|
<el-form-item :label="'物料单位'"> |
|
|
|
<el-input v-model="componentData1.printUnitName" disabled style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'单位用量'" prop="qtyPerAssembly"> |
|
|
|
<el-form-item label="单位用量" prop="qtyPerAssembly"> |
|
|
|
<el-input-number :controls="false" :step="0" v-model="componentData1.qtyPerAssembly" style="width: 100px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'损耗率%'" prop="shrinkageFactor"> |
|
|
|
<el-form-item label="损耗率%" prop="shrinkageFactor"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" max="100" v-model="componentData1.shrinkageFactor" style="width: 100px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="componentData1" :rules="componentRules1" style="margin-left: 5px"> |
|
|
|
<el-form-item label="实际生产数量"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="componentData1.productionData" :disabled="!productionDataFamily.includes(componentData1.familyID)" style="width: 115px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="材料数量"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="componentData1.materialData" :disabled="!materialDataFamily.includes(componentData1.familyID)" style="width: 115px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="成品数量"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="componentData1.finishedProductData" :disabled="!finishedProductDataFamily.includes(componentData1.familyID)" style="width: 115px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="用量损耗"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="componentData1.consumptionLoss" :disabled="!consumptionLossFamily.includes(componentData1.familyID)" style="width: 115px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="componentData1" :rules="componentRules1" style="margin-left: 5px"> |
|
|
|
<el-form-item label="涂胶长度"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="componentData1.coatingLength" :disabled="!coatingLengthFamily.includes(componentData1.familyID)" style="width: 115px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="胶水克重"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="componentData1.glueWeight" :disabled="!glueWeightFamily.includes(componentData1.familyID)" style="width: 115px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="材料宽度"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="componentData1.materialWidth" :disabled="!materialWidthFamily.includes(componentData1.familyID)" style="width: 115px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="宽度换算单位"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="componentData1.widthConversion" :disabled="!widthConversionFamily.includes(componentData1.familyID)" style="width: 115px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="componentData1" :rules="componentRules1" style="margin-left: 5px"> |
|
|
|
<el-form-item label="材料长度1"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="componentData1.materialLength" :disabled="!materialLengthFamily.includes(componentData1.familyID)" style="width: 115px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="材料厚度"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="componentData1.materialThickness" :disabled="!materialThicknessFamily.includes(componentData1.familyID)" style="width: 115px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="面积单位换算"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="componentData1.areaConversion" :disabled="!areaConversionFamily.includes(componentData1.familyID)" style="width: 115px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="密度单位换算"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="componentData1.densityConversion" :disabled="!densityConversionFamily.includes(componentData1.familyID)" style="width: 115px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="componentData1" :rules="componentRules1" style="margin-left: 5px"> |
|
|
|
<el-form-item label="材料克重"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="componentData1.materialWeight" :disabled="!materialWeightFamily.includes(componentData1.familyID)" style="width: 115px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="材料长度2"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="componentData1.materialLength2" :disabled="!materialLength2Family.includes(componentData1.familyID)" style="width: 115px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="单位换算"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="componentData1.unitConversion" :disabled="!unitConversionFamily.includes(componentData1.familyID)" style="width: 115px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:35px;margin-top:20px;text-align:center"> |
|
|
|
<el-button :loading="computeLoading" type="primary" @click="computeQtyPerAssembly">计算</el-button> |
|
|
|
<el-button v-if="componentData1.flag === '1'" type="primary" @click="componentDataSave1(true)">应用</el-button> |
|
|
|
<el-button type="primary" @click="componentDataSave1(false)">保存</el-button> |
|
|
|
<el-button type="primary" @click="componentSaveModal1 = false">关闭</el-button> |
|
|
|
@ -429,6 +484,101 @@ |
|
|
|
</el-table> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 标准工序 --> |
|
|
|
<el-dialog title="标准工序" top="20vh" :close-on-click-modal="false" v-drag :visible.sync="standardOperationModal" width="1000px"> |
|
|
|
<div class="rq "> |
|
|
|
<el-table |
|
|
|
:height="350" |
|
|
|
:data="standardOperationList" |
|
|
|
ref="standardOperationTable" |
|
|
|
@selection-change="selectionStandardOperation" |
|
|
|
border |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
type="selection" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="50"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in standardOperationColumnList" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed==''?false:item.fixed" |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="100" |
|
|
|
label="生产过程人数"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input-number :controls="false" :step="0" :ref="`crewSize${scope.$index}`" v-model="scope.row.crewSize" @keyup.enter.native="focusNextInput(scope.$index, 'crewSize')" style="height: 11px; width: 98%"></el-input-number> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="80" |
|
|
|
label="速度"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input-number :controls="false" :step="0" :ref="`refSpeed${scope.$index}`" v-model="scope.row.refSpeed" @keyup.enter.native="focusNextInput(scope.$index, 'refSpeed')" style="height: 11px; width: 98%"></el-input-number> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="80" |
|
|
|
label="时间"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input-number :controls="false" :step="0" :ref="`refTime${scope.$index}`" v-model="scope.row.refTime" @keyup.enter.native="focusNextInput(scope.$index, 'refTime')" style="height: 11px; width: 98%"></el-input-number> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="80" |
|
|
|
label="效率"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input-number :controls="false" :step="0" :ref="`refEfficiency${scope.$index}`" v-model="scope.row.refEfficiency" @keyup.enter.native="focusNextInput(scope.$index, 'refEfficiency')" style="height: 11px; width: 98%"></el-input-number> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in standardOperationColumnList2" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed==''?false:item.fixed" |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<el-footer style="height:35px;margin-top:10px;text-align:center"> |
|
|
|
<el-button type="primary" @click="calculationTime">计算工时</el-button> |
|
|
|
<el-button type="primary" @click="saveStandardOperation">保存</el-button> |
|
|
|
<el-button type="primary" @click="standardOperationModal = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- chooseList模态框 --> |
|
|
|
<ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList> |
|
|
|
|
|
|
|
@ -459,12 +609,19 @@ import { |
|
|
|
deleteTempRoutingComponent, // 删除Routing子明细 |
|
|
|
commitTempItemValue, // 保存属性值 |
|
|
|
saveCopyResult, // 保存复制结果 |
|
|
|
saveStandardOperationByCopy, // 新增工序 |
|
|
|
computeQtyPerAssemblySaveByCopy, // 计算单位用量(新增) |
|
|
|
computeQtyPerAssemblyEditByCopy, // 计算单位用量(修改) |
|
|
|
} from '@/api/part/bomSearch3.js' |
|
|
|
import { |
|
|
|
queryPartListAll, // 查询包含Purchase(Raw)的物料 |
|
|
|
} from '@/api/part/bomManagement.js' |
|
|
|
import { |
|
|
|
getStandardOperations, |
|
|
|
calculationTime |
|
|
|
} from '@/api/part/routingManagement.js' |
|
|
|
import {verifyData} from '@/api/part/partInformation.js' |
|
|
|
import {Decimal} from "decimal.js"; |
|
|
|
import {Decimal} from "decimal.js" |
|
|
|
import ChooseList from '@/views/modules/common/Chooselist_eam' |
|
|
|
export default { |
|
|
|
name: 'copyBomModal', |
|
|
|
@ -539,6 +696,22 @@ export default { |
|
|
|
lineSequence: '', |
|
|
|
consumptionItem: '', |
|
|
|
productFlag: '', |
|
|
|
familyID: '', |
|
|
|
productionData: undefined, |
|
|
|
materialData: undefined, |
|
|
|
finishedProductData: undefined, |
|
|
|
consumptionLoss: undefined, |
|
|
|
coatingLength: undefined, |
|
|
|
glueWeight: undefined, |
|
|
|
materialWidth: undefined, |
|
|
|
widthConversion: undefined, |
|
|
|
materialLength: undefined, |
|
|
|
materialThickness: undefined, |
|
|
|
areaConversion: undefined, |
|
|
|
densityConversion: undefined, |
|
|
|
materialWeight: undefined, |
|
|
|
materialLength2: undefined, |
|
|
|
unitConversion: undefined, |
|
|
|
treeId: '', |
|
|
|
bomId: '' |
|
|
|
}, |
|
|
|
@ -593,6 +766,8 @@ export default { |
|
|
|
checkedDetail1: [], |
|
|
|
checkedDetail2: [], |
|
|
|
copyAttributeList: [], |
|
|
|
standardOperationList: [], |
|
|
|
standardOperationSelections: [], |
|
|
|
columnBomList: [ |
|
|
|
{ |
|
|
|
columnProp: 'lineSequence', |
|
|
|
@ -1018,6 +1193,164 @@ export default { |
|
|
|
columnWidth: 100 |
|
|
|
} |
|
|
|
], |
|
|
|
standardOperationColumnList: [ |
|
|
|
{ |
|
|
|
columnProp: 'operationNo', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '工序编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'operationName', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: '工序描述', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'setupCrewSize', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: '调机过程中人数', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'setupLaborClassNo', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: '调机时人员等级编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'setupLaborClassDesc', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: '调机时人员等级描述', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 150 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'machCycleTime', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '机器处理时间', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'machRunFactor', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '机器单位产出', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
], |
|
|
|
standardOperationColumnList2: [ |
|
|
|
{ |
|
|
|
columnProp: 'laborClassNo', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: '人员等级编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'laborClassDesc', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: '人员等级描述', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 150 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'laborCycleTime', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '人工处理时间', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'laborRunFactor', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '人工单位产出', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'workCenterNo', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: '加工中心编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'workCenterDesc', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: '加工中心描述', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'conditionDesc', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '条件描述', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 200 |
|
|
|
}, |
|
|
|
], |
|
|
|
columnItemList: [ |
|
|
|
{ |
|
|
|
columnProp: 'propertiesItemNo', |
|
|
|
@ -1230,7 +1563,25 @@ export default { |
|
|
|
componentDisableFlag2: false, |
|
|
|
componentPartModelFlag: false, |
|
|
|
attributeDialog: true, |
|
|
|
saveCopyResultLoading: false |
|
|
|
saveCopyResultLoading: false, |
|
|
|
standardOperationModal: false, |
|
|
|
computeLoading: false, |
|
|
|
// ======== 子物料字段分类集合 ======== |
|
|
|
productionDataFamily: ['RFID003', 'RFID004', 'RFID005', 'RFID006', 'RFID007', 'RFID008', 'RFID009', 'RFID012', 'RFID023', 'RFID024', 'RFID025', 'RFID027'], |
|
|
|
materialDataFamily: ['RFID011', 'RFID020', 'RFID021', 'RFID022'], |
|
|
|
finishedProductDataFamily: ['RFID020', 'RFID021', 'RFID022'], |
|
|
|
consumptionLossFamily: ['RFID001', 'RFID002', 'RFID014', 'RFID015', 'RFID016', 'RFID017', 'RFID018', 'RFID019'], |
|
|
|
coatingLengthFamily: ['RFID013'], |
|
|
|
glueWeightFamily: ['RFID013'], |
|
|
|
materialWidthFamily: ['RFID014', 'RFID015'], |
|
|
|
widthConversionFamily: ['RFID014', 'RFID015'], |
|
|
|
materialLengthFamily: ['RFID016', 'RFID017'], |
|
|
|
materialThicknessFamily: ['RFID016', 'RFID017', 'RFID018', 'RFID019'], |
|
|
|
areaConversionFamily: ['RFID016', 'RFID017', 'RFID018', 'RFID019'], |
|
|
|
densityConversionFamily: ['RFID016', 'RFID017', 'RFID018', 'RFID019'], |
|
|
|
materialWeightFamily: ['RFID018', 'RFID019'], |
|
|
|
materialLength2Family: ['RFID018', 'RFID019'], |
|
|
|
unitConversionFamily: ['RFID018', 'RFID019'], |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@ -1371,8 +1722,6 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Bom子料新增模态框 |
|
|
|
saveComponentModal1 () { |
|
|
|
this.componentData1 = { |
|
|
|
@ -1402,6 +1751,22 @@ export default { |
|
|
|
lineSequence: '', |
|
|
|
consumptionItem: 'Consumed', |
|
|
|
productFlag: 'component', |
|
|
|
familyID: '', |
|
|
|
productionData: undefined, |
|
|
|
materialData: undefined, |
|
|
|
finishedProductData: undefined, |
|
|
|
consumptionLoss: undefined, |
|
|
|
coatingLength: undefined, |
|
|
|
glueWeight: undefined, |
|
|
|
materialWidth: undefined, |
|
|
|
widthConversion: undefined, |
|
|
|
materialLength: undefined, |
|
|
|
materialThickness: undefined, |
|
|
|
areaConversion: undefined, |
|
|
|
densityConversion: undefined, |
|
|
|
materialWeight: undefined, |
|
|
|
materialLength2: undefined, |
|
|
|
unitConversion: undefined, |
|
|
|
treeId: this.currentRow.id, |
|
|
|
bomId: this.currentRow.bomId |
|
|
|
} |
|
|
|
@ -1448,6 +1813,22 @@ export default { |
|
|
|
lineSequence: row.lineSequence, |
|
|
|
consumptionItem: row.consumptionItem, |
|
|
|
productFlag: 'component', |
|
|
|
familyID: row.familyID, |
|
|
|
productionData: row.productionData == null ? undefined : row.productionData, |
|
|
|
materialData: row.materialData == null ? undefined : row.materialData, |
|
|
|
finishedProductData: row.finishedProductData == null ? undefined : row.finishedProductData, |
|
|
|
consumptionLoss: row.consumptionLoss == null ? undefined : row.consumptionLoss, |
|
|
|
coatingLength: row.coatingLength == null ? undefined : row.coatingLength, |
|
|
|
glueWeight: row.glueWeight == null ? undefined : row.glueWeight, |
|
|
|
materialWidth: row.materialWidth == null ? undefined : row.materialWidth, |
|
|
|
widthConversion: row.widthConversion == null ? undefined : row.widthConversion, |
|
|
|
materialLength: row.materialLength == null ? undefined : row.materialLength, |
|
|
|
materialThickness: row.materialThickness == null ? undefined : row.materialThickness, |
|
|
|
areaConversion: row.areaConversion == null ? undefined : row.areaConversion, |
|
|
|
densityConversion: row.densityConversion == null ? undefined : row.densityConversion, |
|
|
|
materialWeight: row.materialWeight == null ? undefined : row.materialWeight, |
|
|
|
materialLength2: row.materialLength2 == null ? undefined : row.materialLength2, |
|
|
|
unitConversion: row.unitConversion == null ? undefined : row.unitConversion, |
|
|
|
treeId: row.treeId, |
|
|
|
bomId: row.bomId |
|
|
|
} |
|
|
|
@ -1514,6 +1895,90 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 计算单位用量 |
|
|
|
computeQtyPerAssembly () { |
|
|
|
if (this.componentData1.lineSequence === '' || this.componentData1.lineSequence == null) { |
|
|
|
this.$message.warning('序号不能为空!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.componentData1.partNo === '' || this.componentData1.partNo == null) { |
|
|
|
this.$message.warning('请选择主记录物料编码!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.componentData1.bomType === '' || this.componentData1.bomType == null) { |
|
|
|
this.$message.warning('请选择主记录制造类型!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.componentData1.engChgLevel === '' || this.componentData1.engChgLevel == null) { |
|
|
|
this.$message.warning('请填写主记录BOM版本号!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.componentData1.componentPart === '' || this.componentData1.componentPart == null) { |
|
|
|
this.$message.warning('请选择子物料编码!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.componentData1.productFlag === 'component' && (this.componentData1.consumptionItem === '' || this.componentData1.consumptionItem == null)) { |
|
|
|
this.$message.warning('请选择消耗项目!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.componentData1.componentScrap === '' || this.componentData1.componentScrap == null) { |
|
|
|
this.$message.warning('请填写调机量!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.componentData1.shrinkageFactor === '' || this.componentData1.shrinkageFactor == null) { |
|
|
|
this.$message.warning('请填写损耗率!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.componentData1.issueType === '' || this.componentData1.issueType == null) { |
|
|
|
this.$message.warning('请选择生产属性!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.computeLoading = true |
|
|
|
if (this.componentData1.flag === '1') { |
|
|
|
computeQtyPerAssemblySaveByCopy(this.componentData1).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.queryCopyTempBom() |
|
|
|
// 换成修改子物料模态框 |
|
|
|
this.updateComponentModal1(data.rows.rowData) |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
this.computeLoading = false |
|
|
|
}).catch(() => { |
|
|
|
this.computeLoading = false |
|
|
|
}) |
|
|
|
} else if (this.componentData1.flag === '2') { |
|
|
|
computeQtyPerAssemblyEditByCopy(this.componentData1).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.queryCopyTempBom() |
|
|
|
// 换成修改子物料模态框 |
|
|
|
this.updateComponentModal1(data.rows.rowData) |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
this.computeLoading = false |
|
|
|
}).catch(() => { |
|
|
|
this.computeLoading = false |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 选中数据 |
|
|
|
componentSelectionChange1(selection) { |
|
|
|
this.checkedDetail1 = selection |
|
|
|
@ -1552,7 +2017,6 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// Routing子料新增模态框 |
|
|
|
saveComponentModal2 () { |
|
|
|
this.componentData2 = { |
|
|
|
@ -1561,8 +2025,8 @@ export default { |
|
|
|
site: this.currentRow.site, |
|
|
|
buNo: this.currentRow.buNo, |
|
|
|
partNo: this.currentRow.partNo, |
|
|
|
routingRevision: this.currentRow.routingRevision, |
|
|
|
routingType: this.currentRow.routingType, |
|
|
|
routingRevision: this.currentRow.engChgLevel, |
|
|
|
routingType: this.currentRow.bomType, |
|
|
|
alternativeNo: this.currentRow.alternativeNo, |
|
|
|
operationId: '', |
|
|
|
operationNo: '', |
|
|
|
@ -1794,6 +2258,122 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 回车事件 |
|
|
|
focusNextInput (index, type) { |
|
|
|
let aaa = '' |
|
|
|
if (this.standardOperationList.length - 1 === index) { |
|
|
|
aaa = `${type}0` |
|
|
|
} else { |
|
|
|
aaa = `${type}${index + 1}` |
|
|
|
} |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs[aaa].focus() |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 基于标准工序快速创建 |
|
|
|
createByStandardOperation () { |
|
|
|
let tempData = { |
|
|
|
site: this.modalData.site, |
|
|
|
buNo: this.modalData.buNo, |
|
|
|
partNo: this.currentRow.partNo, |
|
|
|
} |
|
|
|
this.standardOperationSelections = [] |
|
|
|
getStandardOperations(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.standardOperationList = data.rows |
|
|
|
this.standardOperationModal = true |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 计算工时 |
|
|
|
calculationTime () { |
|
|
|
if (this.standardOperationSelections.length === 0) { |
|
|
|
this.$message.warning('请选择要计算的工序!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.standardOperationList.forEach(item1 => { |
|
|
|
const matchInList2 = this.standardOperationSelections.find(item2 => item1.operationNo === item2.operationNo) |
|
|
|
if (matchInList2) { |
|
|
|
item1.flag = 'Y' |
|
|
|
} else { |
|
|
|
item1.flag = '' |
|
|
|
} |
|
|
|
}) |
|
|
|
let tempData = { |
|
|
|
site: this.modalData.site, |
|
|
|
buNo: this.modalData.buNo, |
|
|
|
partNo: this.currentRow.partNo, |
|
|
|
operationList: this.standardOperationList |
|
|
|
} |
|
|
|
calculationTime(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.standardOperationList = data.rows |
|
|
|
this.standardOperationList.forEach(item => { |
|
|
|
if (item.flag === 'Y') { |
|
|
|
this.$nextTick(() => this.$refs.standardOperationTable.toggleRowSelection(item,true)) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert('工时相关属性未维护属性值', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 更新 Routing 的工序 |
|
|
|
saveStandardOperation () { |
|
|
|
if (this.standardOperationSelections.length === 0) { |
|
|
|
this.$message.warning('请选择标准工序!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.$confirm("是否确认更改替代下的工序?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
let tempData = { |
|
|
|
treeId: this.currentRow.id, |
|
|
|
bomId: this.currentRow.bomId, |
|
|
|
site: this.modalData.site, |
|
|
|
buNo: this.modalData.buNo, |
|
|
|
partNo: this.currentRow.partNo, |
|
|
|
routingRevision: this.currentRow.engChgLevel, |
|
|
|
routingType: this.currentRow.bomType, |
|
|
|
alternativeNo: this.currentRow.alternativeNo, |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
informationList: this.standardOperationSelections |
|
|
|
} |
|
|
|
saveStandardOperationByCopy(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.queryCopyTempRouting() |
|
|
|
this.standardOperationModal = false |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 复选信息 |
|
|
|
selectionStandardOperation (val) { |
|
|
|
this.standardOperationSelections = val |
|
|
|
}, |
|
|
|
|
|
|
|
// 编辑物料属性 |
|
|
|
clickSave () { |
|
|
|
if (!this.attributeDialog) { // 保存 |
|
|
|
@ -1832,7 +2412,6 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 子物料列表 |
|
|
|
queryComponentPartModal () { |
|
|
|
this.componentPartData.limit = this.pageSize1 |
|
|
|
@ -1876,6 +2455,18 @@ export default { |
|
|
|
this.componentData1.partDesc = row.partDesc |
|
|
|
this.componentData1.printUnit = row.printUnit |
|
|
|
this.componentData1.printUnitName = row.printUnitName |
|
|
|
this.componentData1.familyID = row.familyID |
|
|
|
if (this.widthConversionFamily.includes(row.familyID)) { |
|
|
|
this.componentData1.widthConversion = 1 |
|
|
|
} else if (this.areaConversionFamily.includes(row.familyID)) { |
|
|
|
this.componentData1.areaConversion = 1 |
|
|
|
} else if (this.densityConversionFamily.includes(row.familyID)) { |
|
|
|
this.componentData1.densityConversion = 1 |
|
|
|
} else if (this.unitConversionFamily.includes(row.familyID)) { |
|
|
|
this.componentData1.unitConversion = 1 |
|
|
|
} else if (this.consumptionLossFamily.includes(row.familyID)) { |
|
|
|
this.componentData1.consumptionLoss = 1 |
|
|
|
} |
|
|
|
this.componentPartModelFlag = false |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1893,6 +2484,18 @@ export default { |
|
|
|
this.componentData1.partDesc = data.page.list[0].partDesc |
|
|
|
this.componentData1.printUnit = data.page.list[0].printUnit |
|
|
|
this.componentData1.printUnitName = data.page.list[0].printUnitName |
|
|
|
this.componentData1.familyID = data.page.list[0].familyID |
|
|
|
if (this.widthConversionFamily.includes(data.page.list[0].familyID)) { |
|
|
|
this.componentData1.widthConversion = 1 |
|
|
|
} else if (this.areaConversionFamily.includes(data.page.list[0].familyID)) { |
|
|
|
this.componentData1.areaConversion = 1 |
|
|
|
} else if (this.densityConversionFamily.includes(data.page.list[0].familyID)) { |
|
|
|
this.componentData1.densityConversion = 1 |
|
|
|
} else if (this.unitConversionFamily.includes(data.page.list[0].familyID)) { |
|
|
|
this.componentData1.unitConversion = 1 |
|
|
|
} else if (this.consumptionLossFamily.includes(data.page.list[0].familyID)) { |
|
|
|
this.componentData1.consumptionLoss = 1 |
|
|
|
} |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1901,9 +2504,9 @@ export default { |
|
|
|
this.componentData1.partDesc = '' |
|
|
|
this.componentData1.printUnit = '' |
|
|
|
this.componentData1.printUnitName = '' |
|
|
|
this.componentData1.familyID = '' |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// BOM切换版本 |
|
|
|
handleChangeBomVersion() { |
|
|
|
let node = this.$refs.tree.getCurrentNode() |
|
|
|
@ -2007,7 +2610,6 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// Routing切换版本 |
|
|
|
handleChangeRoutingVersion () { |
|
|
|
let node = this.$refs.tree.getCurrentNode() |
|
|
|
@ -2106,7 +2708,6 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 页签切换 |
|
|
|
tabClick (tab, event) { |
|
|
|
if (this.activeTable !== 'temp_item' && !this.attributeDialog) { |
|
|
|
|