Browse Source

删除刘昊的选择ProcessTimeMatrix

java8
han\hanst 2 months ago
parent
commit
14125d5794
  1. 826
      src/views/modules/part/quicklyCreateBom.vue

826
src/views/modules/part/quicklyCreateBom.vue

@ -43,29 +43,10 @@
<a href="javascript:void(0)" @click="openColumnModal(item.columnLabel,item.columnProp)" style="cursor:pointer;color: white">{{ item.columnLabel }}</a> <a href="javascript:void(0)" @click="openColumnModal(item.columnLabel,item.columnProp)" style="cursor:pointer;color: white">{{ item.columnLabel }}</a>
</template> </template>
<template slot-scope="scope"> <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.columnHidden">{{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template> </template>
</el-table-column> </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-table>
<el-row :gutter="5"> <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"> <el-tabs v-model="activeTable" style="width: 100%" type="border-card" @tab-click="refreshCurrentTabTable" class="customer-tab">
<!-- BOM页签 --> <!-- BOM页签 -->
<el-tab-pane label="产品BOM管理" name="bom_info"> <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> </el-tab-pane>
<!-- Routing页签 --> <!-- Routing页签 -->
<el-tab-pane label="工艺路线管理" name="routing_info"> <el-tab-pane label="工艺路线管理" name="routing_info">
@ -234,8 +215,7 @@
<el-dialog title="物料属性批量维护" :close-on-click-modal="false" v-drag <el-dialog title="物料属性批量维护" :close-on-click-modal="false" v-drag
:visible.sync="batchUpdateFlag" :visible.sync="batchUpdateFlag"
width="90vw" width="90vw"
:before-close="handleBatchUpdateDialogClose"
close-on-click-modal="false">
:before-close="handleBatchUpdateDialogClose">
<div class="rq" slot-scope="scope"> <div class="rq" slot-scope="scope">
<div style="display: flex; align-items: center; justify-content: space-between;"> <div style="display: flex; align-items: center; justify-content: space-between;">
<div style="display: flex; gap: 10px;"> <div style="display: flex; gap: 10px;">
@ -501,7 +481,6 @@
<el-form label-position="top" style="margin-left: 2px;"> <el-form label-position="top" style="margin-left: 2px;">
<el-button type="primary" @click="addOrDelItem1">新增</el-button> <el-button type="primary" @click="addOrDelItem1">新增</el-button>
<el-button type="primary" :loading="loading" @click="clickSave1">{{ attributeFlag1?'编辑':'保存' }}</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-button type="primary" @click="openPtmDialog">韩ProcessTimeMatrix</el-button>
</el-form> </el-form>
<div class="rq " v-show="attributeFlag1"> <div class="rq " v-show="attributeFlag1">
@ -1272,7 +1251,7 @@
</el-footer> </el-footer>
</el-dialog> </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 <el-table
:data="partItemList1" :data="partItemList1"
border border
@ -1316,130 +1295,6 @@
</el-footer> </el-footer>
</el-dialog> </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参数选择对话框 --> <!-- PTM参数选择对话框 -->
<el-dialog <el-dialog
title="选择ProcessTimeMatrix参数" title="选择ProcessTimeMatrix参数"
@ -1450,8 +1305,24 @@
top="3vh"> top="3vh">
<div class="rq"> <div class="rq">
<el-form :inline="true" label-position="top" style="margin-bottom: 10px"> <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-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>
<el-form-item label=" "> <el-form-item label=" ">
<el-button type="primary" @click="filterPtmList">筛选</el-button> <el-button type="primary" @click="filterPtmList">筛选</el-button>
@ -1483,11 +1354,10 @@
<el-table-column <el-table-column
prop="conditionDesc" prop="conditionDesc"
label="Code" label="Code"
width="180"
width="300"
header-align="center" header-align="center"
align="left" align="left"
fixed="left"
show-overflow-tooltip>
fixed="left">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-for="(col, index) in ptmColumnList" v-for="(col, index) in ptmColumnList"
@ -1537,7 +1407,7 @@ import RoutingCreate from "./routing_create.vue";
import PartCreate from "./part_create.vue"; import PartCreate from "./part_create.vue";
import {updateInquiryDetailStatusAndPart} from "../../../api/inquiry/inquiryDetail"; import {updateInquiryDetailStatusAndPart} from "../../../api/inquiry/inquiryDetail";
import {EventBus} from "../../../main"; import {EventBus} from "../../../main";
import {searchProductGroupPtmCondition, batchSearchProductGroupPtmConditionsWithItems} from "../../../api/part/partProductGroupInformation";
import {searchProductGroupPtmCondition, batchSearchProductGroupPtmConditionsWithItems, productGroupInformationSearch} from "../../../api/part/partProductGroupInformation";
import { import {
addPartItem, addPartItem,
batchUpdateItem, batchUpdateItem,
@ -1561,8 +1431,6 @@ import {getSiteAndBuByUserName} from "../../../api/qc/qc";
import Data from "lodash"; import Data from "lodash";
import {copyBom, queryBomDetail, queryPartList} from "../../../api/part/bomManagement"; import {copyBom, queryBomDetail, queryPartList} from "../../../api/part/bomManagement";
import {copyRouting, queryRoutingDetail} from "../../../api/part/routingManagement"; import {copyRouting, queryRoutingDetail} from "../../../api/part/routingManagement";
import {productGroupInformationSearch} from "../../../api/part/partProductGroupInformation";
import {searchProductGroupPtmCondition1} from "../../../api/part/partProductGroupPtm";
export default { export default {
components: { components: {
PartCreate, PartCreate,
@ -1762,8 +1630,6 @@ export default {
partProductGroupList3: [], partProductGroupList3: [],
templateList: [], templateList: [],
tempList: [], tempList: [],
processTimeMatrixList: [],
productGroupList: [],
defaultProps: { defaultProps: {
children: "nodeList", children: "nodeList",
label: "nodeName", label: "nodeName",
@ -1789,12 +1655,6 @@ export default {
pageIndex4: 1, pageIndex4: 1,
pageSize4: 20, pageSize4: 20,
totalPage4: 0, totalPage4: 0,
pageIndex5: 1,
pageSize5: 20,
totalPage5: 0,
pageIndex6: 1,
pageSize6: 20,
totalPage6: 0,
partList: [], partList: [],
partList1: [], partList1: [],
codeList: [], codeList: [],
@ -1892,14 +1752,6 @@ export default {
page: 1, page: 1,
limit: 10 limit: 10
}, },
productGroupData: {
productGroupId: '',
productGroupName: '',
userName: this.$store.state.user.name,
type: 1,
limit: 20,
page: 1
},
copyData: { copyData: {
flag: '', flag: '',
site: this.$store.state.user.site, site: this.$store.state.user.site,
@ -1938,15 +1790,6 @@ export default {
page: 1, page: 1,
limit: 10 limit: 10
}, },
processTimeMatrixData: {
productGroupName: '',
productGroupId: '',
conditionDesc: '',
buNo: '',
site: this.$store.state.user.site,
page: 1,
limit: 20
},
nodeRules:{ nodeRules:{
nodeId:[ nodeId:[
{ {
@ -2731,217 +2574,6 @@ export default {
columnWidth: 200, 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: [ bomComponentListColumnList: [
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -3051,24 +2683,6 @@ export default {
fixed: '', fixed: '',
columnWidth: 100 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, userId: this.$store.state.user.name,
functionId: 601002, functionId: 601002,
@ -3567,62 +3181,6 @@ export default {
columnWidth: 100 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, nodeModalFlag: false,
nodeModalDisableFlag: false, nodeModalDisableFlag: false,
@ -3651,8 +3209,6 @@ export default {
copyVisible: false, copyVisible: false,
copyPartModelFlag: false, copyPartModelFlag: false,
itemUpdateFlag: false, itemUpdateFlag: false,
processTimeMatrixFlag: false,
productGroupFlag: false,
ptmDialogVisible: false, // PTM ptmDialogVisible: false, // PTM
ptmDataList: [], // PTM53Code12 ptmDataList: [], // PTM53Code12
@ -3661,6 +3217,9 @@ export default {
ptmSearchCode: '', // PTM Code ptmSearchCode: '', // PTM Code
ptmItemList: [], // PTMitem ptmItemList: [], // PTMitem
selectedPtmItems: [], // PTM selectedPtmItems: [], // PTM
ptmProductGroupList: [], // BU1
ptmSelectedProductGroupId: '', // 1ID
ptmCurrentBuNo: '' // BU
} }
}, },
created () { created () {
@ -5677,31 +5236,6 @@ export default {
this.queryCopyPartModal() 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) {
getCopyRowData(row).then(({data}) => { getCopyRowData(row).then(({data}) => {
if (data && data.code === 0) { 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() { openPtmDialog() {
if (!this.attributeFlag1) { if (!this.attributeFlag1) {
@ -6111,21 +5448,85 @@ export default {
return return
} }
// PTM
const queryData = {
site: this.$store.state.user.site,
buNo: firstPart.buNo,
productGroupId: firstPart.productGroupId1
}
// BUID
this.ptmCurrentBuNo = firstPart.buNo
this.ptmSelectedProductGroupId = firstPart.productGroupId1
// //
const loadingInstance = this.$loading({ const loadingInstance = this.$loading({
lock: true, lock: true,
text: '正在加载ProcessTimeMatrix数据...',
text: '正在加载商品组数据...',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
// BU1
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}) => { batchSearchProductGroupPtmConditionsWithItems(queryData).then(({data}) => {
loadingInstance.close() loadingInstance.close()
@ -6135,11 +5536,23 @@ export default {
if (ptmConditions.length === 0) { if (ptmConditions.length === 0) {
this.$message.info('该商品组下未配置PTM参数') this.$message.info('该商品组下未配置PTM参数')
//
this.ptmDataList = []
this.filteredPtmDataList = []
this.ptmColumnList = []
//
this.ptmDialogVisible = true
return return
} }
if (allItems.length === 0) { if (allItems.length === 0) {
this.$message.info('该商品组的PTM配置中没有参数') this.$message.info('该商品组的PTM配置中没有参数')
//
this.ptmDataList = []
this.filteredPtmDataList = []
this.ptmColumnList = []
//
this.ptmDialogVisible = true
return 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数据横向展示 * 处理PTM数据横向展示
* 将后端返回的数据处理成表格展示格式 * 将后端返回的数据处理成表格展示格式

Loading…
Cancel
Save