|
|
|
@ -120,6 +120,7 @@ |
|
|
|
<el-button type="primary" :loading="alternativeLoading" @click="saveComponentModal" style="margin-left: 7px">新增</el-button> |
|
|
|
<el-button type="primary" :loading="alternativeLoading" @click="batchSaveComponentModal" style="margin-left: 7px">批量新增</el-button> |
|
|
|
<el-button type="primary" :loading="alternativeLoading" @click="batchUpdateComponents" style="margin-left: 7px">批量修改</el-button> |
|
|
|
<el-button type="primary" :loading="alternativeLoading" @click="copyBomPart" style="margin-left: 7px">复制BOM物料</el-button> |
|
|
|
<el-button type="primary" :loading="alternativeLoading" @click="batchUpdateOperationModal" style="margin-left: 7px">编辑工序</el-button> |
|
|
|
<el-button type="primary" icon="el-icon-upload" @click="bomComponentUpload">导入</el-button> |
|
|
|
<el-button type="primary" :loading="alternativeLoading" @click="deleteComponentPart">删除</el-button> |
|
|
|
@ -826,6 +827,104 @@ |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="复制BOM物料" top="17vh" :close-on-click-modal="false" v-drag :visible.sync="copyBomDialogFlag" width="1200px"> |
|
|
|
<el-form :inline="true" label-position="top" :model="copyBomSearchData"> |
|
|
|
<el-form-item :label="'BU'"> |
|
|
|
<el-select v-model="copyBomSearchData.buNo" placeholder="请选择" clearable style="width: 90px"> |
|
|
|
<el-option |
|
|
|
v-for = "i in copyBomSearchData" |
|
|
|
:key = "i.buNo" |
|
|
|
:label = "i.buDesc" |
|
|
|
:value = "i.buNo"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'物料编码'"> |
|
|
|
<el-input v-model="copyBomSearchData.partNo" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'物料名称'"> |
|
|
|
<el-input v-model="copyBomSearchData.partDesc" clearable style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="partType2" label="零件类型"> |
|
|
|
<el-select v-model="copyBomSearchData.partType2" clearable style="width: 100px"> |
|
|
|
<el-option label="成品" value="Manufactured"></el-option> |
|
|
|
<el-option label="半成品" value="Manufactured Recipe"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'BOM版本号'"> |
|
|
|
<el-input v-model="copyBomSearchData.engChgLevel" style="width: 70px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button @click="getDataList()">查询</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
<!-- bom列表 --> |
|
|
|
<el-table |
|
|
|
:height="200" |
|
|
|
:data="copyBomDataList" |
|
|
|
border |
|
|
|
ref="bomHeaderTable" |
|
|
|
@row-click="headerClickRow" |
|
|
|
v-loading="copyBomQueryLoading" |
|
|
|
style="width: 100%"> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in copyBomColumnList" :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> |
|
|
|
|
|
|
|
<!-- 分页插件 --> |
|
|
|
<el-pagination style="margin-top: 0px" |
|
|
|
@size-change="sizeChangeHandle4" |
|
|
|
@current-change="currentChangeHandle4" |
|
|
|
:current-page="pageIndex4" |
|
|
|
:page-sizes="[20, 50, 100, 200, 500]" |
|
|
|
:page-size="pageSize4" |
|
|
|
:total="totalPage4" |
|
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
|
</el-pagination> |
|
|
|
|
|
|
|
<el-table |
|
|
|
:height="200" |
|
|
|
:data="componentPartList1" |
|
|
|
@selection-change="selectionCopyBom" |
|
|
|
border |
|
|
|
style="width: 100%"> |
|
|
|
<el-table-column type="selection" width="30"></el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in componentPartColumnList1" :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> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
<el-button type="primary" @click="copyBomSave">保存</el-button> |
|
|
|
<el-button type="primary" @click="copyBomDialogFlag=false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
<bom-component-upload ref="BomComponentUpload" @refreshPageTables="queryBomComponentTable" v-drag></bom-component-upload> |
|
|
|
|
|
|
|
@ -863,6 +962,7 @@ import ChooseList from '@/views/modules/common/Chooselist_eam' |
|
|
|
import {Decimal} from "decimal.js" |
|
|
|
import BomComponentUpload from "./bom_component_upload.vue" |
|
|
|
import {partFamilyInformationSearch} from "../../../api/part/partFamilyInformation"; |
|
|
|
import {bomSearchHeader, getComponentPartList} from "../../../api/part/bomSearch3"; |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
BomComponentUpload, |
|
|
|
@ -969,19 +1069,25 @@ export default { |
|
|
|
pageIndex3: 1, |
|
|
|
pageSize3: 20, |
|
|
|
totalPage3: 0, |
|
|
|
pageIndex4: 1, |
|
|
|
pageSize4: 20, |
|
|
|
totalPage4: 0, |
|
|
|
pageIndex5: 1, |
|
|
|
pageSize5: 50, |
|
|
|
totalPage5: 0, |
|
|
|
batchComponentSelections: [], |
|
|
|
batchComponentSelections2: [], |
|
|
|
copyBomSelections: [], |
|
|
|
checkedDetail: [], |
|
|
|
detailDataList: [], |
|
|
|
subDetailList: [], |
|
|
|
componentPartList: [], |
|
|
|
componentPartList1: [], |
|
|
|
batchComponentPartList: [], |
|
|
|
choosePartList: [], |
|
|
|
operationList: [], |
|
|
|
familyList: [], |
|
|
|
copyBomDataList: [], |
|
|
|
modalData: { |
|
|
|
flag: '', |
|
|
|
title: '', |
|
|
|
@ -1130,6 +1236,19 @@ export default { |
|
|
|
page: 1, |
|
|
|
limit: 10, |
|
|
|
}, |
|
|
|
copyBomSearchData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
buNo: '', |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
partNo: '', |
|
|
|
bomType: '', |
|
|
|
partDesc: '', |
|
|
|
partType2: 'Manufactured Recipe', |
|
|
|
engChgLevel: '', |
|
|
|
page: 1, |
|
|
|
limit: 10 |
|
|
|
}, |
|
|
|
headerCurrentRow: {}, |
|
|
|
// 必填规则 |
|
|
|
rules: { |
|
|
|
partNo: [ |
|
|
|
@ -1336,6 +1455,98 @@ export default { |
|
|
|
columnWidth : 100, |
|
|
|
}, |
|
|
|
], |
|
|
|
copyBomColumnList: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table1PartNo', |
|
|
|
tableId: '601002002Table1', |
|
|
|
tableName: 'BOMHeader表', |
|
|
|
columnProp: 'buNo', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: 'BU', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 60 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table1PartNo', |
|
|
|
tableId: '601002002Table1', |
|
|
|
tableName: 'BOMHeader表', |
|
|
|
columnProp: 'partNo', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '物料编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table1PartDesc', |
|
|
|
tableId: '601002002Table1', |
|
|
|
tableName: 'BOMHeader表', |
|
|
|
columnProp: 'partDesc', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '物料名称', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 300 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table1PartType2Desc', |
|
|
|
tableId: '601002002Table1', |
|
|
|
tableName: 'BOMHeader表', |
|
|
|
columnProp: 'partType2Desc', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '零件类型', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table1EngChgLevel', |
|
|
|
tableId: '601002002Table1', |
|
|
|
tableName: 'BOMHeader表', |
|
|
|
columnProp: 'engChgLevel', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: 'BOM版本号', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
], |
|
|
|
partColumnList: [ |
|
|
|
{ |
|
|
|
columnProp: 'partNo', |
|
|
|
@ -2091,6 +2302,242 @@ export default { |
|
|
|
columnWidth: 100 |
|
|
|
} |
|
|
|
], |
|
|
|
componentPartColumnList1: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table2LineSequence', |
|
|
|
tableId: '601002002Table2', |
|
|
|
tableName: 'BOMComponent表', |
|
|
|
columnProp: 'lineSequence', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '序号', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 50 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table2ComponentPart', |
|
|
|
tableId: '601002002Table2', |
|
|
|
tableName: 'BOMComponent表', |
|
|
|
columnProp: 'componentPart', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '物料编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table2ComponentPartDesc', |
|
|
|
tableId: '601002002Table2', |
|
|
|
tableName: 'BOMComponent表', |
|
|
|
columnProp: 'componentPartDesc', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '物料名称', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 300 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table2QtyPerAssembly', |
|
|
|
tableId: '601002002Table2', |
|
|
|
tableName: 'BOMComponent表', |
|
|
|
columnProp: 'qtyPerAssembly', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '单位用量', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table2ComponentScrap', |
|
|
|
tableId: '601002002Table2', |
|
|
|
tableName: 'BOMComponent表', |
|
|
|
columnProp: 'componentScrap', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '调机量', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table2ShrinkageFactor', |
|
|
|
tableId: '601002002Table2', |
|
|
|
tableName: 'BOMComponent表', |
|
|
|
columnProp: 'shrinkageFactor', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '损耗率', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table2ConsumptionItem', |
|
|
|
tableId: '601002002Table2', |
|
|
|
tableName: 'BOMComponent表', |
|
|
|
columnProp: 'consumptionItem', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '消耗项目', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table2PrintUnitName', |
|
|
|
tableId: '601002002Table2', |
|
|
|
tableName: 'BOMComponent表', |
|
|
|
columnProp: 'printUnitName', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '物料单位', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 60 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table2IssueType', |
|
|
|
tableId: '601002002Table2', |
|
|
|
tableName: 'BOMComponent表', |
|
|
|
columnProp: 'issueType', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '生产属性', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table2OperationNo', |
|
|
|
tableId: '601002002Table2', |
|
|
|
tableName: 'BOMComponent表', |
|
|
|
columnProp: 'operationNo', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '工序编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table2OperationName', |
|
|
|
tableId: '601002002Table2', |
|
|
|
tableName: 'BOMComponent表', |
|
|
|
columnProp: 'operationName', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '工序名称', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table2IssueToLoc', |
|
|
|
tableId: '601002002Table2', |
|
|
|
tableName: 'BOMComponent表', |
|
|
|
columnProp: 'issueToLocName', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '发料库位', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601002002, |
|
|
|
serialNumber: '601002002Table2NoteText', |
|
|
|
tableId: '601002002Table2', |
|
|
|
tableName: 'BOMComponent表', |
|
|
|
columnProp: 'noteText', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '备注', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 150 |
|
|
|
}, |
|
|
|
], |
|
|
|
operationDetailList: [ |
|
|
|
{ |
|
|
|
columnProp: 'routingRevision', |
|
|
|
@ -2176,6 +2623,7 @@ export default { |
|
|
|
saveAllLoading: false, |
|
|
|
saveDetailLoading: false, |
|
|
|
computeLoading: false, |
|
|
|
copyBomQueryLoading: false, |
|
|
|
// 控制 |
|
|
|
modalFlag: false, |
|
|
|
modalDisableFlag: false, |
|
|
|
@ -2194,6 +2642,7 @@ export default { |
|
|
|
batchOperationModelFlag: false, |
|
|
|
batchUpdateComponentsFlag: false, |
|
|
|
familyDialogFlag: false, |
|
|
|
copyBomDialogFlag: false, |
|
|
|
// ======== 子物料字段分类集合 ======== |
|
|
|
productionDataFamily: ['RFID003', 'RFID004', 'RFID005', 'RFID006', 'RFID007', 'RFID008', 'RFID009', 'RFID012', 'RFID023', 'RFID024', 'RFID025', 'RFID026', 'RFID027'], |
|
|
|
materialDataFamily: ['RFID011', 'RFID020', 'RFID021', 'RFID022'], |
|
|
|
@ -3271,6 +3720,7 @@ export default { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.subDetailList = data.rows.subDetailList |
|
|
|
this.batchComponentPartModelFlag = false |
|
|
|
this.batchUpdateComponents() |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
@ -3502,6 +3952,18 @@ export default { |
|
|
|
this.queryFamilyList() |
|
|
|
}, |
|
|
|
|
|
|
|
sizeChangeHandle4 (val) { |
|
|
|
this.pageSize4 = val |
|
|
|
this.pageIndex4 = 1 |
|
|
|
this.getDataList() |
|
|
|
}, |
|
|
|
|
|
|
|
// 当前页 |
|
|
|
currentChangeHandle4 (val) { |
|
|
|
this.pageIndex4 = val |
|
|
|
this.getDataList() |
|
|
|
}, |
|
|
|
|
|
|
|
batchUpdateComponents() { |
|
|
|
this.batchUpdateComponentsFlag = true |
|
|
|
}, |
|
|
|
@ -3614,7 +4076,135 @@ export default { |
|
|
|
}) |
|
|
|
this.batchUpdateComponentsFlag = false |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
copyBomPart() { |
|
|
|
this.copyBomSearchData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
buNo: '', |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
partNo: '', |
|
|
|
bomType: '', |
|
|
|
partDesc: '', |
|
|
|
partType2: 'Manufactured Recipe', |
|
|
|
engChgLevel: '', |
|
|
|
page: 1, |
|
|
|
limit: 10 |
|
|
|
} |
|
|
|
this.getDataList() |
|
|
|
this.copyBomSelections = [] |
|
|
|
this.copyBomDialogFlag = true |
|
|
|
}, |
|
|
|
|
|
|
|
getDataList () { |
|
|
|
this.copyBomSearchData.limit = this.pageSize4 |
|
|
|
this.copyBomSearchData.page = this.pageIndex4 |
|
|
|
this.copyBomQueryLoading = true |
|
|
|
bomSearchHeader(this.copyBomSearchData).then(({data}) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.copyBomDataList = data.page.list |
|
|
|
this.pageIndex4 = data.page.currPage |
|
|
|
this.pageSize4 = data.page.pageSize |
|
|
|
this.totalPage4 = data.page.totalCount |
|
|
|
// 判断是否全部存在数据 |
|
|
|
if (this.copyBomDataList.length > 0) { |
|
|
|
// 设置选中行 |
|
|
|
this.headerClickRow(this.copyBomDataList[0]) |
|
|
|
} else { |
|
|
|
this.headerCurrentRow = {} |
|
|
|
} |
|
|
|
} |
|
|
|
this.copyBomQueryLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
headerClickRow (row) { |
|
|
|
this.$refs.bomHeaderTable.toggleRowSelection(row) |
|
|
|
this.$set(this.headerCurrentRow, 'site', row.site) |
|
|
|
this.$set(this.headerCurrentRow, 'componentPart', row.partNo) |
|
|
|
this.$set(this.headerCurrentRow, 'bomType', row.bomType) |
|
|
|
this.$set(this.headerCurrentRow, 'engChgLevel', row.engChgLevel) |
|
|
|
this.getComponentPartList() |
|
|
|
}, |
|
|
|
|
|
|
|
getComponentPartList(){ |
|
|
|
getComponentPartList(this.headerCurrentRow).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.componentPartList1 = data.rows |
|
|
|
} else { |
|
|
|
this.componentPartList1 = [] |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
selectionCopyBom(val) { |
|
|
|
this.copyBomSelections = val |
|
|
|
}, |
|
|
|
|
|
|
|
copyBomSave() { |
|
|
|
console.log(this.copyBomSelections) |
|
|
|
if (this.copyBomSelections === null || this.copyBomSelections.length === 0) { |
|
|
|
this.$message.warning('请选择可选物料!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.$confirm("是否确认添加该"+ this.copyBomSelections.length +"条子件记录?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
let tempData = { |
|
|
|
site: this.modalData.site, |
|
|
|
buNo: this.modalData.buNo, |
|
|
|
partNo: this.modalData.partNo, |
|
|
|
engChgLevel: this.modalData.engChgLevel, |
|
|
|
bomType: this.modalData.bomType, |
|
|
|
alternativeNo: this.detailData.alternativeNo, |
|
|
|
consumptionItem: 'Consumed', |
|
|
|
qtyPerAssembly: 0, |
|
|
|
componentScrap: 0, |
|
|
|
shrinkageFactor: '', |
|
|
|
lineItemNo: '', |
|
|
|
operationId: '', |
|
|
|
operationNo: '', |
|
|
|
issueToLoc: '', |
|
|
|
issueToLocName: '', |
|
|
|
noteText: '', |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
lineSequence: '', |
|
|
|
issueType: 'Reserve And Backflush', |
|
|
|
productFlag: 'component', |
|
|
|
batchSaveList: this.copyBomSelections |
|
|
|
} |
|
|
|
batchSaveBomComponent(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.subDetailList = data.rows.subDetailList |
|
|
|
this.copyBomDialogFlag = false |
|
|
|
this.batchSaveComponentModal() |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
this.batchComponentPartData = { |
|
|
|
site: '', |
|
|
|
buNo: '', |
|
|
|
partNo: '', |
|
|
|
partDesc: '', |
|
|
|
shrinkageFactor: '', |
|
|
|
page: 1, |
|
|
|
limit: 10 |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|