diff --git a/src/api/part/partProductGroupPtm.js b/src/api/part/partProductGroupPtm.js
index 4b8f9fe..4c43a93 100644
--- a/src/api/part/partProductGroupPtm.js
+++ b/src/api/part/partProductGroupPtm.js
@@ -2,6 +2,7 @@ import { createAPI } from "@/utils/httpRequest.js";
//查询 searchProductGroupPtm
export const searchProductGroupPtmCondition = data => createAPI("/plm/partProductGroupInformation/searchProductGroupPtmCondition", "post", data);
+export const searchProductGroupPtmCondition1 = data => createAPI("/plm/partProductGroupInformation/searchProductGroupPtmCondition1", "post", data);
// searchProductGroupPtmConditionItemProcess
export const searchProductGroupPtmConditionItemProcess = data => createAPI("/plm/partProductGroupInformation/searchProductGroupPtmConditionItemProcess", "post", data);
diff --git a/src/views/modules/part/bom_create.vue b/src/views/modules/part/bom_create.vue
index 1d1285e..b15de3c 100644
--- a/src/views/modules/part/bom_create.vue
+++ b/src/views/modules/part/bom_create.vue
@@ -120,6 +120,7 @@
新增
批量新增
批量修改
+ 复制BOM物料
编辑工序
导入
删除
@@ -826,6 +827,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+ 保存
+ 关闭
+
+
+
@@ -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
+ }
+ })
+ })
+
}
+
}
}
diff --git a/src/views/modules/part/quicklyCreateBom.vue b/src/views/modules/part/quicklyCreateBom.vue
index b5abd96..978c090 100644
--- a/src/views/modules/part/quicklyCreateBom.vue
+++ b/src/views/modules/part/quicklyCreateBom.vue
@@ -27,6 +27,7 @@
:height="54"
:data="dataList"
border
+ v-loading="this.dataListLoading"
style="width: 100%;">
+
+ {{ item.columnLabel }}
+
+
+
+
+
+
+
+
+
{{ scope.row[item.columnProp] }}
@@ -489,6 +501,7 @@
新增
{{ attributeFlag1?'编辑':'保存' }}
+ 选择ProcessTimeMatrix
+
+
+
+
+
+
{{ scope.row[item.columnProp] }}
+
![]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 关闭
+
+
+
+
+
+
+ 商品组名称
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
{{ scope.row[item.columnProp] }}
+
![]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+ {{scope.row[item.columnProp]}}
+
+
+
+
+
+
+
+
+ 关闭
+
+
+
@@ -1309,6 +1490,8 @@ 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,
@@ -1323,6 +1506,14 @@ export default {
this.nodeData.nodeId = this.nodeData.nodeId.toUpperCase()
}
},
+ itemUpdateFlag: {
+ deep: true,
+ handler: function (newV, oldV) {
+ if (!newV) {
+ this.partItemList1 = []
+ }
+ }
+ },
'partCurrentRow': {
deep: true,
handler: function (newV, oldV) {
@@ -1465,6 +1656,20 @@ export default {
this.getRevisionInfo()
}
}
+ },
+ '$route.query.data': {
+ handler(newData, oldData) {
+ if (newData) {
+ this.searchData = newData;
+ this.searchData.partDesc = newData.testPartDesc;
+ this.searchData.codeNo = newData.partCodeNo;
+ this.searchData.rfqDetailId = newData.id;
+ this.dataList = [{}]
+ this.getNodeTree();
+ this.getPartItem();
+ }
+ },
+ immediate: true
}
},
data () {
@@ -1486,6 +1691,8 @@ export default {
partProductGroupList3: [],
templateList: [],
tempList: [],
+ processTimeMatrixList: [],
+ productGroupList: [],
defaultProps: {
children: "nodeList",
label: "nodeName",
@@ -1511,6 +1718,12 @@ export default {
pageIndex4: 1,
pageSize4: 20,
totalPage4: 0,
+ pageIndex5: 1,
+ pageSize5: 20,
+ totalPage5: 0,
+ pageIndex6: 1,
+ pageSize6: 20,
+ totalPage6: 0,
partList: [],
partList1: [],
codeList: [],
@@ -1566,7 +1779,7 @@ export default {
],
},
searchData: {
- site: '',
+ site: this.$store.state.user.site,
buNo: '',
partNo: '',
partDesc: '',
@@ -1608,6 +1821,14 @@ 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,
@@ -1646,6 +1867,15 @@ export default {
page: 1,
limit: 10
},
+ processTimeMatrixData: {
+ productGroupName: '',
+ productGroupId: '',
+ conditionDesc: '',
+ buNo: '',
+ site: this.$store.state.user.site,
+ page: 1,
+ limit: 20
+ },
nodeRules:{
nodeId:[
{
@@ -1788,7 +2018,7 @@ export default {
columnProp: 'cl60k-up',
headerAlign: 'left',
align: 'left',
- columnLabel: 'CL60K-UP',
+ columnLabel: 'CL60k-UP',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1802,7 +2032,7 @@ export default {
columnProp: 'cl60k-pitch',
headerAlign: 'left',
align: 'left',
- columnLabel: 'CL60K-Pitch',
+ columnLabel: 'CL60k-Pitch',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1816,7 +2046,7 @@ export default {
columnProp: 'cl60k-cd',
headerAlign: 'left',
align: 'left',
- columnLabel: 'CL60K-CD',
+ columnLabel: 'CL60k-CD',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -2379,8 +2609,7 @@ export default {
columnImage: false,
status: true,
fixed: '',
- columnWidth: 300,
- // columnWidth: 340,
+ columnWidth: 200,
},
{
userId: this.$store.state.user.name,
@@ -2396,8 +2625,7 @@ export default {
columnImage: false,
status: true,
fixed: '',
- columnWidth: 300,
- // columnWidth: 340,
+ columnWidth: 200,
},
{
userId: this.$store.state.user.name,
@@ -2413,8 +2641,7 @@ export default {
columnImage: false,
status: true,
fixed: '',
- columnWidth: 360,
- // columnWidth: 408,
+ columnWidth: 240,
},
{
userId: this.$store.state.user.name,
@@ -2430,10 +2657,220 @@ export default {
columnImage: false,
status: true,
fixed: '',
- columnWidth: 300,
- // columnWidth: 340,
+ 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,
@@ -3059,6 +3496,62 @@ 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,
@@ -3076,14 +3569,19 @@ export default {
fastAddFlag: false,
fastAddFlag1: false,
loading: false,
+ dataListLoading: false,
addItemLoading: false,
deleteItemLoading: false,
buNoQueryLoading: false,
alternativeLoading: false,
+ processTimeMatrixLoading: false,
bomFlag: true,
bomFlag1: true,
copyVisible: false,
- copyPartModelFlag: false
+ copyPartModelFlag: false,
+ itemUpdateFlag: false,
+ processTimeMatrixFlag: false,
+ productGroupFlag: false
}
},
created () {
@@ -3702,7 +4200,9 @@ export default {
codeNo: this.searchData.codeNo,
recordType: 'IP'
}
+ this.dataListLoading = true
getPartItem(tempData).then(({data}) => {
+ this.dataList = [{}]
if (data && data.code === 0 && data.rows.length > 0) {
for (let i = 0; i < data.rows.length; i++) {
const itemDesc = data.rows[i].itemDesc;
@@ -3758,9 +4258,11 @@ export default {
break;
}
}
+ this.$forceUpdate()
} else {
- this.dataList = []
+ this.dataList = [{}]
}
+ this.dataListLoading = false
})
},
@@ -5096,6 +5598,31 @@ 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) {
@@ -5203,6 +5730,284 @@ export default {
}
},
+ openColumnModal(desc, prop) {
+ this.partItemList1 = []
+ this.itemProp = prop
+ let tempData = {
+ site: this.$store.state.user.site,
+ buNo: this.searchData.buNo,
+ partNo: this.searchData.partNo,
+ codeNo: this.searchData.codeNo,
+ recordType: 'IP'
+ }
+ getPartItem(tempData).then(({data}) => {
+ if (data && data.code === 0 && data.rows.length > 0) {
+ const foundItem = data.rows.find(item => item.itemDesc === desc);
+ if (!foundItem) {
+ this.$message.warning('请先新增该属性再进行修改!')
+ }
+ this.partItemList1.push(foundItem)
+ this.itemUpdateFlag = true
+ } else {
+ this.partItemList1 = []
+ }
+ })
+ },
+
+ async itemUpdateSave() {
+ let tempData = {
+ site: this.$store.state.user.site,
+ buNo: this.searchData.buNo,
+ partNo: this.searchData.partNo,
+ codeNo: this.searchData.codeNo
+ }
+ await partInfoByMainPart(tempData).then(({data}) => {
+ if (data && data.code === 0){
+ this.$set(this, 'partList1', data.rows)
+ }else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+
+ let list = []
+ let partList = this.partList1.filter(item => item.buNo === this.searchData.buNo)
+ for (let i = 0; i {
+ if (data && data.code === 0) {
+ this.getPartItem()
+ // this.autoCompute()
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {}
+ })
+ this.itemUpdateFlag = false
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ }).catch((error) => {
+ this.$message.error(error)
+ })
+ },
+
+ // 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
+ })
+ })
+ }
+ })
+ }
+
},
}