|
|
|
@ -43,29 +43,10 @@ |
|
|
|
<a href="javascript:void(0)" @click="openColumnModal(item.columnLabel,item.columnProp)" style="cursor:pointer;color: white">{{ item.columnLabel }}</a> |
|
|
|
</template> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- <span v-if="!item.columnHidden">--> |
|
|
|
<!-- <span v-if="scope.row[item.columnProp]!==null&&scope.row[item.columnProp]!==''">--> |
|
|
|
<!-- <el-link style="cursor:pointer;" @click="openColumnModal(item.columnLabel)">{{ scope.row[item.columnProp] }}</el-link>--> |
|
|
|
<!-- </span>--> |
|
|
|
<!-- <span v-else>--> |
|
|
|
<!-- <el-link style="cursor:pointer;" @click="openColumnModal(item.columnLabel)">...</el-link>--> |
|
|
|
<!-- </span>--> |
|
|
|
<!-- </span>--> |
|
|
|
<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--> |
|
|
|
<!-- fixed="right"--> |
|
|
|
<!-- header-align="center"--> |
|
|
|
<!-- align="center"--> |
|
|
|
<!-- width="120"--> |
|
|
|
<!-- label="操作">--> |
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
<!-- <el-link v-if="!authUpdate" style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>--> |
|
|
|
<!-- <el-link style="cursor: pointer" @click="checkOutToRouting(scope.row.partNo)">切换Routing</el-link>--> |
|
|
|
<!-- </template>--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
<el-row :gutter="5"> |
|
|
|
@ -123,7 +104,7 @@ |
|
|
|
<el-tabs v-model="activeTable" style="width: 100%" type="border-card" @tab-click="refreshCurrentTabTable" class="customer-tab"> |
|
|
|
<!-- BOM页签 --> |
|
|
|
<el-tab-pane label="产品BOM管理" name="bom_info"> |
|
|
|
<bom-create v-loading="bomLoading" ref="BomCreate" @handleBatchUpdatePart="handleBatchUpdatePart" @refreshNode="refreshNode" @refreshBomLoading="refreshBomLoading" v-drag></bom-create> |
|
|
|
<bom-create v-loading="bomLoading" ref="BomCreate" :batchUpdateFlag="batchUpdateFlag" @handleBatchUpdatePart="handleBatchUpdatePart" @refreshNode="refreshNode" @refreshBomLoading="refreshBomLoading" v-drag></bom-create> |
|
|
|
</el-tab-pane> |
|
|
|
<!-- Routing页签 --> |
|
|
|
<el-tab-pane label="工艺路线管理" name="routing_info"> |
|
|
|
@ -234,8 +215,7 @@ |
|
|
|
<el-dialog title="物料属性批量维护" :close-on-click-modal="false" v-drag |
|
|
|
:visible.sync="batchUpdateFlag" |
|
|
|
width="90vw" |
|
|
|
:before-close="handleBatchUpdateDialogClose" |
|
|
|
close-on-click-modal="false"> |
|
|
|
:before-close="handleBatchUpdateDialogClose"> |
|
|
|
<div class="rq" slot-scope="scope"> |
|
|
|
<div style="display: flex; align-items: center; justify-content: space-between;"> |
|
|
|
<div style="display: flex; gap: 10px;"> |
|
|
|
@ -501,7 +481,6 @@ |
|
|
|
<el-form label-position="top" style="margin-left: 2px;"> |
|
|
|
<el-button type="primary" @click="addOrDelItem1">新增</el-button> |
|
|
|
<el-button type="primary" :loading="loading" @click="clickSave1">{{ attributeFlag1?'编辑':'保存' }}</el-button> |
|
|
|
<el-button type="primary" @click="chooseProcessTimeMatrix">选择ProcessTimeMatrix</el-button> |
|
|
|
<el-button type="primary" @click="openPtmDialog">韩ProcessTimeMatrix</el-button> |
|
|
|
</el-form> |
|
|
|
<div class="rq " v-show="attributeFlag1"> |
|
|
|
@ -1272,7 +1251,7 @@ |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog :title="修改属性" :close-on-click-modal="false" v-drag :visible.sync="itemUpdateFlag" width="1100px"> |
|
|
|
<el-dialog :title="'修改属性'" :close-on-click-modal="false" v-drag :visible.sync="itemUpdateFlag" width="1100px"> |
|
|
|
<el-table |
|
|
|
:data="partItemList1" |
|
|
|
border |
|
|
|
@ -1316,130 +1295,6 @@ |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="选择ProcessTimeMatrix" :close-on-click-modal="false" v-drag :visible.sync="processTimeMatrixFlag" width="1440px"> |
|
|
|
<el-form :inline="true" label-position="top" :model="processTimeMatrixData"> |
|
|
|
<el-form-item :label="'商品组名称'"> |
|
|
|
<span style="cursor: pointer" slot="label" @click="queryProductGroup"><a herf="#">商品组名称</a></span> |
|
|
|
<el-input disabled v-model="processTimeMatrixData.productGroupName" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'条件描述'"> |
|
|
|
<el-input v-model="processTimeMatrixData.conditionDesc" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button type="primary" @click="queryProcessTimeMatrix">查询</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:data="processTimeMatrixList" |
|
|
|
border |
|
|
|
:height="400" |
|
|
|
:header-cell-style="{padding: '2px 2px'}" |
|
|
|
style="width: 100%"> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in processTimeMatrixColumnList" :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"> |
|
|
|
<div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'"> |
|
|
|
<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> |
|
|
|
</div> |
|
|
|
<div v-else> |
|
|
|
<div v-if="scope.row.valueChooseFlag !== 'Y'"> |
|
|
|
<el-input-number v-model="scope.row.numValue" style="padding: 0;width: 100%" v-if="scope.row.valueTypeDb === 'N'" :controls="false"></el-input-number> |
|
|
|
<el-input v-model="scope.row.textValue" v-else></el-input> |
|
|
|
</div> |
|
|
|
<div v-else> |
|
|
|
<el-select style="width: 100%;" clearable v-if="scope.row.valueTypeDb === 'T'" v-model="scope.row.textValue"> |
|
|
|
<el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.availableValueList" :key="key"></el-option> |
|
|
|
</el-select> |
|
|
|
<el-select style="width: 100%;" clearable v-else v-model="scope.row.numValue"> |
|
|
|
<el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.availableValueList" :key="key"></el-option> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="100" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-link style="cursor: pointer" @click="chooseProcessTimeMatrix1(scope.row)">选择</el-link> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-pagination |
|
|
|
@size-change="sizeChangeHandle6" |
|
|
|
@current-change="currentChangeHandle6" |
|
|
|
:current-page="pageIndex6" |
|
|
|
:page-sizes="[20, 50, 100, 200, 500]" |
|
|
|
:page-size="pageSize6" |
|
|
|
:total="totalPage6" |
|
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
|
</el-pagination> |
|
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center"> |
|
|
|
<el-button type="primary" @click="processTimeMatrixFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="商品组清单" top="17vh" :close-on-click-modal="false" v-drag :visible.sync="productGroupFlag" width="700px"> |
|
|
|
<el-form :inline="true" label-position="top" :model="productGroupData"> |
|
|
|
<el-form-item :label="'商品组编码'"> |
|
|
|
<el-input v-model="productGroupData.productGroupId" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'商品组名称'"> |
|
|
|
<el-input v-model="productGroupData.productGroupName" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button type="primary" @click="queryProductGroup">查询</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:height="250" |
|
|
|
:data="productGroupList" |
|
|
|
@row-dblclick="productGroupDbClick" |
|
|
|
border |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in productGroupColumnList" :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 |
|
|
|
@size-change="sizeChangeHandle5" |
|
|
|
@current-change="currentChangeHandle5" |
|
|
|
:current-page="pageIndex5" |
|
|
|
:page-sizes="[20, 50, 100, 200, 500]" |
|
|
|
:page-size="pageSize5" |
|
|
|
:total="totalPage5" |
|
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
|
</el-pagination> |
|
|
|
<el-footer style="height:35px;margin-top:10px;text-align:center"> |
|
|
|
<el-button type="primary" @click="productGroupFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- PTM参数选择对话框 --> |
|
|
|
<el-dialog |
|
|
|
title="选择ProcessTimeMatrix参数" |
|
|
|
@ -1450,8 +1305,24 @@ |
|
|
|
top="3vh"> |
|
|
|
<div class="rq"> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-bottom: 10px"> |
|
|
|
<el-form-item label="商品组1"> |
|
|
|
<el-select |
|
|
|
v-model="ptmSelectedProductGroupId" |
|
|
|
placeholder="请选择商品组1" |
|
|
|
clearable |
|
|
|
filterable |
|
|
|
style="width: 300px" |
|
|
|
@change="handleProductGroupChange"> |
|
|
|
<el-option |
|
|
|
v-for="item in ptmProductGroupList" |
|
|
|
:key="item.productGroupId" |
|
|
|
:label="item.productGroupName" |
|
|
|
:value="item.productGroupId"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="Code筛选"> |
|
|
|
<el-input v-model="ptmSearchCode" placeholder="请输入条件描述" clearable style="width: 200px" @keyup.enter.native="filterPtmList"></el-input> |
|
|
|
<el-input v-model="ptmSearchCode" placeholder="请输入条件描述" clearable style="width: 260px" @keyup.enter.native="filterPtmList"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-button type="primary" @click="filterPtmList">筛选</el-button> |
|
|
|
@ -1483,11 +1354,10 @@ |
|
|
|
<el-table-column |
|
|
|
prop="conditionDesc" |
|
|
|
label="Code" |
|
|
|
width="180" |
|
|
|
width="300" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
fixed="left" |
|
|
|
show-overflow-tooltip> |
|
|
|
fixed="left"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(col, index) in ptmColumnList" |
|
|
|
@ -1537,7 +1407,7 @@ import RoutingCreate from "./routing_create.vue"; |
|
|
|
import PartCreate from "./part_create.vue"; |
|
|
|
import {updateInquiryDetailStatusAndPart} from "../../../api/inquiry/inquiryDetail"; |
|
|
|
import {EventBus} from "../../../main"; |
|
|
|
import {searchProductGroupPtmCondition, batchSearchProductGroupPtmConditionsWithItems} from "../../../api/part/partProductGroupInformation"; |
|
|
|
import {searchProductGroupPtmCondition, batchSearchProductGroupPtmConditionsWithItems, productGroupInformationSearch} from "../../../api/part/partProductGroupInformation"; |
|
|
|
import { |
|
|
|
addPartItem, |
|
|
|
batchUpdateItem, |
|
|
|
@ -1561,8 +1431,6 @@ import {getSiteAndBuByUserName} from "../../../api/qc/qc"; |
|
|
|
import Data from "lodash"; |
|
|
|
import {copyBom, queryBomDetail, queryPartList} from "../../../api/part/bomManagement"; |
|
|
|
import {copyRouting, queryRoutingDetail} from "../../../api/part/routingManagement"; |
|
|
|
import {productGroupInformationSearch} from "../../../api/part/partProductGroupInformation"; |
|
|
|
import {searchProductGroupPtmCondition1} from "../../../api/part/partProductGroupPtm"; |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
PartCreate, |
|
|
|
@ -1762,8 +1630,6 @@ export default { |
|
|
|
partProductGroupList3: [], |
|
|
|
templateList: [], |
|
|
|
tempList: [], |
|
|
|
processTimeMatrixList: [], |
|
|
|
productGroupList: [], |
|
|
|
defaultProps: { |
|
|
|
children: "nodeList", |
|
|
|
label: "nodeName", |
|
|
|
@ -1789,12 +1655,6 @@ export default { |
|
|
|
pageIndex4: 1, |
|
|
|
pageSize4: 20, |
|
|
|
totalPage4: 0, |
|
|
|
pageIndex5: 1, |
|
|
|
pageSize5: 20, |
|
|
|
totalPage5: 0, |
|
|
|
pageIndex6: 1, |
|
|
|
pageSize6: 20, |
|
|
|
totalPage6: 0, |
|
|
|
partList: [], |
|
|
|
partList1: [], |
|
|
|
codeList: [], |
|
|
|
@ -1892,14 +1752,6 @@ export default { |
|
|
|
page: 1, |
|
|
|
limit: 10 |
|
|
|
}, |
|
|
|
productGroupData: { |
|
|
|
productGroupId: '', |
|
|
|
productGroupName: '', |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
type: 1, |
|
|
|
limit: 20, |
|
|
|
page: 1 |
|
|
|
}, |
|
|
|
copyData: { |
|
|
|
flag: '', |
|
|
|
site: this.$store.state.user.site, |
|
|
|
@ -1938,15 +1790,6 @@ export default { |
|
|
|
page: 1, |
|
|
|
limit: 10 |
|
|
|
}, |
|
|
|
processTimeMatrixData: { |
|
|
|
productGroupName: '', |
|
|
|
productGroupId: '', |
|
|
|
conditionDesc: '', |
|
|
|
buNo: '', |
|
|
|
site: this.$store.state.user.site, |
|
|
|
page: 1, |
|
|
|
limit: 20 |
|
|
|
}, |
|
|
|
nodeRules:{ |
|
|
|
nodeId:[ |
|
|
|
{ |
|
|
|
@ -2731,217 +2574,6 @@ export default { |
|
|
|
columnWidth: 200, |
|
|
|
}, |
|
|
|
], |
|
|
|
processTimeMatrixColumnList: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
columnProp: 'conditionDesc', |
|
|
|
headerAlign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '条件描述', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 50 |
|
|
|
},{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
columnProp: 'family1', |
|
|
|
headerAlign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: 'Family1', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 35 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
columnProp: 'family2', |
|
|
|
headerAlign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: 'Family2', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 35 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
columnProp: 'lanes0Web', |
|
|
|
headerAlign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: 'Lanes0 web', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 50 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
columnProp: 'laminationWidth', |
|
|
|
headerAlign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: 'Lamination width', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
columnProp: 'printingLanes', |
|
|
|
headerAlign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: 'Printing lanes', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 60 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
columnProp: 'bondingPitch', |
|
|
|
headerAlign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: 'Bonding Pitch', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 55 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
columnProp: 'bondingLanes', |
|
|
|
headerAlign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '绑定列数', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 40 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
columnProp: 'dryFgLanes', |
|
|
|
headerAlign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: 'Dry FG lanes', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 50 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
columnProp: 'cd', |
|
|
|
headerAlign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: 'CD', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 30 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
columnProp: 'uph-tal', |
|
|
|
headerAlign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: 'UPH-TAL', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 50 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
columnProp: 'uph-paris', |
|
|
|
headerAlign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: 'UPH-Paris', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 60 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
columnProp: 'up', |
|
|
|
headerAlign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: 'up', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 40 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
columnProp: 'cl60k-pitch', |
|
|
|
headerAlign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: 'CL60k-Pitch', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 50 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
columnProp: 'cl60k-cd', |
|
|
|
headerAlign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: 'CL60k-CD', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 50 |
|
|
|
} |
|
|
|
], |
|
|
|
bomComponentListColumnList: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -3051,24 +2683,6 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
// { |
|
|
|
// userId: this.$store.state.user.name, |
|
|
|
// functionId: 601002, |
|
|
|
// serialNumber: '601002Table2PrintUnit', |
|
|
|
// tableId: '601002Table2', |
|
|
|
// tableName: 'BOM子物料表', |
|
|
|
// columnProp: 'componentScrap', |
|
|
|
// 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: 601002, |
|
|
|
@ -3567,62 +3181,6 @@ export default { |
|
|
|
columnWidth: 100 |
|
|
|
} |
|
|
|
], |
|
|
|
productGroupColumnList: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601006, |
|
|
|
serialNumber: '601006Table1BuDesc', |
|
|
|
tableId: "601006Table1", |
|
|
|
tableName: "商品组信息表", |
|
|
|
columnProp: 'buNo', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: 'BU', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 601006, |
|
|
|
serialNumber: '601006Table1ProductGroupId', |
|
|
|
tableId: "601006Table1", |
|
|
|
tableName: "商品组信息表", |
|
|
|
columnProp: 'productGroupId', |
|
|
|
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: 601006, |
|
|
|
serialNumber: '601006Table1ProductGroupName', |
|
|
|
tableId: "601006Table1", |
|
|
|
tableName: "商品组信息表", |
|
|
|
columnProp: 'productGroupName', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '商品组名称', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 300 |
|
|
|
}, |
|
|
|
], |
|
|
|
// 控制 |
|
|
|
nodeModalFlag: false, |
|
|
|
nodeModalDisableFlag: false, |
|
|
|
@ -3651,8 +3209,6 @@ export default { |
|
|
|
copyVisible: false, |
|
|
|
copyPartModelFlag: false, |
|
|
|
itemUpdateFlag: false, |
|
|
|
processTimeMatrixFlag: false, |
|
|
|
productGroupFlag: false, |
|
|
|
|
|
|
|
ptmDialogVisible: false, // PTM参数选择对话框显示控制 |
|
|
|
ptmDataList: [], // PTM完整数据列表(53行,每行包含Code和12个参数列) |
|
|
|
@ -3661,6 +3217,9 @@ export default { |
|
|
|
ptmSearchCode: '', // PTM Code筛选条件 |
|
|
|
ptmItemList: [], // PTM参数列表(去重后的item列表) |
|
|
|
selectedPtmItems: [], // 用户勾选的PTM参数 |
|
|
|
ptmProductGroupList: [], // 当前BU下所有商品组1列表 |
|
|
|
ptmSelectedProductGroupId: '', // 当前选中的商品组1ID |
|
|
|
ptmCurrentBuNo: '' // 当前BU编号 |
|
|
|
} |
|
|
|
}, |
|
|
|
created () { |
|
|
|
@ -5677,31 +5236,6 @@ export default { |
|
|
|
this.queryCopyPartModal() |
|
|
|
}, |
|
|
|
|
|
|
|
// 每页数 |
|
|
|
sizeChangeHandle5 (val) { |
|
|
|
this.pageSize5 = val |
|
|
|
this.pageIndex5 = 1 |
|
|
|
this.queryProductGroup() |
|
|
|
}, |
|
|
|
|
|
|
|
// 当前页 |
|
|
|
currentChangeHandle5 (val) { |
|
|
|
this.pageIndex5 = val |
|
|
|
this.queryProductGroup() |
|
|
|
}, |
|
|
|
// 每页数 |
|
|
|
sizeChangeHandle6 (val) { |
|
|
|
this.pageSize6 = val |
|
|
|
this.pageIndex6 = 1 |
|
|
|
this.queryProcessTimeMatrix() |
|
|
|
}, |
|
|
|
|
|
|
|
// 当前页 |
|
|
|
currentChangeHandle6 (val) { |
|
|
|
this.pageIndex6 = val |
|
|
|
this.queryProcessTimeMatrix() |
|
|
|
}, |
|
|
|
|
|
|
|
getCopyRowData(row) { |
|
|
|
getCopyRowData(row).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
@ -5891,206 +5425,9 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// todo |
|
|
|
autoCompute() { |
|
|
|
const originalData = this.treeData; |
|
|
|
const flatList = []; |
|
|
|
function flattenData(data) { |
|
|
|
data.forEach(item => { |
|
|
|
flatList.push(item); |
|
|
|
if (item.nodeList && Array.isArray(item.nodeList)) { |
|
|
|
flattenData(item.nodeList); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
flattenData(originalData); |
|
|
|
console.log(flatList); |
|
|
|
for (let i = 0; i < flatList.length; i++) { |
|
|
|
this.tempData = { |
|
|
|
site: flatList[i].site, |
|
|
|
buNo: flatList[i].buNo, |
|
|
|
mainPart: this.searchData.partNo, |
|
|
|
partNo: flatList[i].partNo, |
|
|
|
partDesc: flatList[i].partDesc, |
|
|
|
printUnit: flatList[i].printUnit, |
|
|
|
printUnitName: flatList[i].printUnitName, |
|
|
|
processUnit: flatList[i].processUnit, |
|
|
|
bomType: 'Manufacturing', |
|
|
|
nodeId: flatList[i].nodeId, |
|
|
|
offFlag: '2' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
chooseProcessTimeMatrix() { |
|
|
|
this.processTimeMatrixFlag = true |
|
|
|
}, |
|
|
|
|
|
|
|
chooseProcessTimeMatrix1(row) { |
|
|
|
this.processTimeMatrixFlag = false |
|
|
|
if (this.attributeFlag1) { |
|
|
|
this.clickSave1() |
|
|
|
} |
|
|
|
this.partItemList1.forEach(item => { |
|
|
|
let value = null; |
|
|
|
switch (item.itemDesc) { |
|
|
|
case 'Family1': |
|
|
|
value = row.family1; |
|
|
|
break; |
|
|
|
case 'Family2': |
|
|
|
value = row.family2; |
|
|
|
break; |
|
|
|
case 'Lanes0 web': |
|
|
|
value = row.lanes0Web; |
|
|
|
break; |
|
|
|
case 'Lamination width': |
|
|
|
value = row.laminationWidth; |
|
|
|
break; |
|
|
|
case 'Printing lanes': |
|
|
|
value = row.printingLanes; |
|
|
|
break; |
|
|
|
case 'Bonding Pitch': |
|
|
|
value = row.bondingPitch; |
|
|
|
break; |
|
|
|
case '绑定列数': |
|
|
|
value = row.bondingLanes; |
|
|
|
break; |
|
|
|
case 'Dry FG lanes': |
|
|
|
value = row.dryFgLanes; |
|
|
|
break; |
|
|
|
case 'CD': |
|
|
|
value = row.cd; |
|
|
|
break; |
|
|
|
case 'UPH-TAL': |
|
|
|
value = row['uph-tal']; |
|
|
|
break; |
|
|
|
case 'UPH-Paris': |
|
|
|
value = row['uph-paris']; |
|
|
|
break; |
|
|
|
case 'up': |
|
|
|
value = row.up; |
|
|
|
break; |
|
|
|
case 'CL60k-Pitch': |
|
|
|
value = row['cl60k-pitch']; |
|
|
|
break; |
|
|
|
case 'CL60k-CD': |
|
|
|
value = row['cl60k-cd']; |
|
|
|
break; |
|
|
|
default: |
|
|
|
return; |
|
|
|
} |
|
|
|
console.log('row',row) |
|
|
|
console.log('value',value) |
|
|
|
if (item.valueTypeDb === 'T') { |
|
|
|
// 文本类型,赋值给 textValue |
|
|
|
item.textValue = value ? value : ''; |
|
|
|
} else if (item.valueTypeDb === 'N') { |
|
|
|
// 数字类型,赋值给 numValue(转换为数字,避免字符串类型) |
|
|
|
item.numValue = value ? Number(value) : null; |
|
|
|
} |
|
|
|
console.log('item',item) |
|
|
|
}); |
|
|
|
this.clickSave1() |
|
|
|
}, |
|
|
|
|
|
|
|
queryProductGroup() { |
|
|
|
this.productGroupData.limit = this.pageSize5 |
|
|
|
this.productGroupData.page = this.pageIndex5 |
|
|
|
productGroupInformationSearch(this.productGroupData).then(({data}) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.productGroupList = data.page.list |
|
|
|
this.pageIndex5 = data.page.currPage |
|
|
|
this.pageSize5 = data.page.pageSize |
|
|
|
this.totalPage5 = data.page.totalCount |
|
|
|
this.productGroupFlag = true |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
productGroupDbClick(row) { |
|
|
|
this.processTimeMatrixData.productGroupName = row.productGroupName |
|
|
|
this.processTimeMatrixData.productGroupId = row.productGroupId |
|
|
|
this.productGroupFlag = false |
|
|
|
}, |
|
|
|
|
|
|
|
queryProcessTimeMatrix() { |
|
|
|
this.processTimeMatrixLoading = true |
|
|
|
this.productGroupData.limit = this.pageSize6 |
|
|
|
this.productGroupData.page = this.pageIndex6 |
|
|
|
searchProductGroupPtmCondition1(this.processTimeMatrixData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
const list = data.rows1.list; |
|
|
|
const groupMap = new Map(); |
|
|
|
list.forEach(condition => { |
|
|
|
const {conditionDesc, ptmConditionItemList} = condition; |
|
|
|
if (!groupMap.has(conditionDesc)) { |
|
|
|
groupMap.set(conditionDesc, {conditionDesc}); |
|
|
|
} |
|
|
|
const group = groupMap.get(conditionDesc); |
|
|
|
ptmConditionItemList.forEach(item => { |
|
|
|
switch (item.itemDesc) { |
|
|
|
case 'Family1': |
|
|
|
group.family1 = item.numValue || item.textValue; |
|
|
|
break; |
|
|
|
case 'Family2': |
|
|
|
group.family2 = item.numValue || item.textValue; |
|
|
|
break; |
|
|
|
case 'Lanes0 web': |
|
|
|
group.lanes0Web = item.numValue || item.textValue; |
|
|
|
break; |
|
|
|
case 'Lamination width': |
|
|
|
group.laminationWidth = item.numValue || item.textValue; |
|
|
|
break; |
|
|
|
case 'Printing lanes': |
|
|
|
group.printingLanes = item.numValue || item.textValue; |
|
|
|
break; |
|
|
|
case 'Bonding Pitch': |
|
|
|
group.bondingPitch = item.numValue || item.textValue; |
|
|
|
break; |
|
|
|
case '绑定列数': |
|
|
|
group.bondingLanes = item.numValue || item.textValue; |
|
|
|
break; |
|
|
|
case 'Dry FG lanes': |
|
|
|
group.dryFgLanes = item.numValue || item.textValue; |
|
|
|
break; |
|
|
|
case 'CD': |
|
|
|
group.cd = item.numValue || item.textValue; |
|
|
|
break; |
|
|
|
case 'UPH-TAL': |
|
|
|
group['uph-tal'] = item.numValue || item.textValue; |
|
|
|
break; |
|
|
|
case 'UPH-Paris': |
|
|
|
group['uph-paris'] = item.numValue || item.textValue; |
|
|
|
break; |
|
|
|
case 'up': |
|
|
|
group.up = item.numValue || item.textValue; |
|
|
|
break; |
|
|
|
case 'CL60k-Pitch': |
|
|
|
group['cl60k-pitch'] = item.numValue || item.textValue; |
|
|
|
break; |
|
|
|
case 'CL60k-CD': |
|
|
|
group['cl60k-cd'] = item.numValue || item.textValue; |
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
|
this.processTimeMatrixList = Array.from(groupMap.values()); |
|
|
|
this.pageIndex6 = data.rows1.currPage |
|
|
|
this.pageSize6 = data.rows1.pageSize |
|
|
|
this.totalPage6 = data.rows1.totalCount |
|
|
|
this.processTimeMatrixFlag = true |
|
|
|
this.processTimeMatrixLoading = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 打开PTM参数选择对话框 |
|
|
|
* 展示商品组1下所有ProcessTimeMatrix及其参数(横向展示:53行 × 12列) |
|
|
|
* 使用批量查询API,只请求一次后台 |
|
|
|
* 打开ProcessTimeMatrix选择对话框 |
|
|
|
* 先查询BU下所有商品组1,再查询PTM数据 |
|
|
|
*/ |
|
|
|
openPtmDialog() { |
|
|
|
if (!this.attributeFlag1) { |
|
|
|
@ -6111,21 +5448,85 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 查询该商品组下所有PTM条件及其参数(一次查询) |
|
|
|
const queryData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
buNo: firstPart.buNo, |
|
|
|
productGroupId: firstPart.productGroupId1 |
|
|
|
} |
|
|
|
// 保存当前BU编号和默认商品组ID |
|
|
|
this.ptmCurrentBuNo = firstPart.buNo |
|
|
|
this.ptmSelectedProductGroupId = firstPart.productGroupId1 |
|
|
|
|
|
|
|
// 显示加载提示 |
|
|
|
const loadingInstance = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: '正在加载ProcessTimeMatrix数据...', |
|
|
|
text: '正在加载商品组数据...', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
|
|
|
|
// 先查询该BU下所有商品组1 |
|
|
|
let buNo = firstPart.buNo || ''; |
|
|
|
let result = buNo.includes('-') ? buNo.split('-')[1] : buNo; |
|
|
|
const productGroupQuery = { |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
type:'1', |
|
|
|
limit :100, |
|
|
|
page :1 |
|
|
|
} |
|
|
|
|
|
|
|
productGroupInformationSearch(productGroupQuery).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.ptmProductGroupList = data.page.list || [] |
|
|
|
|
|
|
|
if (this.ptmProductGroupList.length === 0) { |
|
|
|
loadingInstance.close() |
|
|
|
this.$message.warning('该BU下没有配置商品组1!') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 加载默认选中商品组的PTM数据 |
|
|
|
this.loadPtmDataByProductGroup(this.ptmSelectedProductGroupId, loadingInstance) |
|
|
|
} else { |
|
|
|
loadingInstance.close() |
|
|
|
this.$alert(data.msg || '查询商品组失败', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
loadingInstance.close() |
|
|
|
this.$message.error('查询商品组异常') |
|
|
|
console.error(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据商品组ID加载PTM数据 |
|
|
|
* @param productGroupId 商品组ID |
|
|
|
* @param loadingInstance loading实例(可选) |
|
|
|
*/ |
|
|
|
loadPtmDataByProductGroup(productGroupId, loadingInstance) { |
|
|
|
if (!productGroupId) { |
|
|
|
if (loadingInstance) loadingInstance.close() |
|
|
|
this.$message.warning('请选择商品组1!') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 如果没有传入loading实例,创建一个新的 |
|
|
|
if (!loadingInstance) { |
|
|
|
loadingInstance = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: '正在加载ProcessTimeMatrix数据...', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
} else { |
|
|
|
// 更新loading文本 |
|
|
|
loadingInstance.text = '正在加载ProcessTimeMatrix数据...' |
|
|
|
} |
|
|
|
|
|
|
|
// 查询该商品组下所有PTM条件及其参数(一次查询) |
|
|
|
const queryData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
buNo: this.ptmCurrentBuNo, |
|
|
|
productGroupId: productGroupId |
|
|
|
} |
|
|
|
|
|
|
|
batchSearchProductGroupPtmConditionsWithItems(queryData).then(({data}) => { |
|
|
|
loadingInstance.close() |
|
|
|
|
|
|
|
@ -6135,11 +5536,23 @@ export default { |
|
|
|
|
|
|
|
if (ptmConditions.length === 0) { |
|
|
|
this.$message.info('该商品组下未配置PTM参数') |
|
|
|
// 清空数据 |
|
|
|
this.ptmDataList = [] |
|
|
|
this.filteredPtmDataList = [] |
|
|
|
this.ptmColumnList = [] |
|
|
|
// 打开对话框(显示空表格) |
|
|
|
this.ptmDialogVisible = true |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (allItems.length === 0) { |
|
|
|
this.$message.info('该商品组的PTM配置中没有参数') |
|
|
|
// 清空数据 |
|
|
|
this.ptmDataList = [] |
|
|
|
this.filteredPtmDataList = [] |
|
|
|
this.ptmColumnList = [] |
|
|
|
// 打开对话框(显示空表格) |
|
|
|
this.ptmDialogVisible = true |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@ -6158,6 +5571,23 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 处理商品组切换事件 |
|
|
|
* @param productGroupId 新选中的商品组ID |
|
|
|
*/ |
|
|
|
handleProductGroupChange(productGroupId) { |
|
|
|
if (!productGroupId) { |
|
|
|
// 清空数据 |
|
|
|
this.ptmDataList = [] |
|
|
|
this.filteredPtmDataList = [] |
|
|
|
this.ptmColumnList = [] |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 重新加载PTM数据 |
|
|
|
this.loadPtmDataByProductGroup(productGroupId) |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 处理PTM数据(横向展示) |
|
|
|
* 将后端返回的数据处理成表格展示格式 |
|
|
|
|