From a0ad61ffbcd8012b70f389ed66fe04aa2f64e247 Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Thu, 26 Sep 2024 12:10:35 +0800
Subject: [PATCH] =?UTF-8?q?2024-09-26=20RFQ=20=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/modules/part/bomManagement.vue | 105 ++++++--
src/views/modules/part/routingManagement.vue | 262 +++++++++++--------
2 files changed, 229 insertions(+), 138 deletions(-)
diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue
index bb016dc..ffadedb 100644
--- a/src/views/modules/part/bomManagement.vue
+++ b/src/views/modules/part/bomManagement.vue
@@ -3,12 +3,12 @@
-
+
+ :value = "i.buNo">
@@ -115,8 +115,6 @@
:key = "i.buNo"
:label = "i.buDesc"
:value = "i.buNo">
- {{ i.sitename }}
- {{ i.buDesc }}
@@ -132,7 +130,7 @@
-
+
@@ -774,7 +772,7 @@ import {
getBomEngChgLevel, // 获取物料的BOM版本号
queryPartListAll, // 查询包含Purchase(Raw)的物料
} from '@/api/part/bomManagement.js'
-import {getSiteAndBuByUserName} from "@/api/eam/eam.js"
+import {getSiteAndBuByUserName, getSiteAndBuByUserName2} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import ChooseList from '@/views/modules/common/Chooselist_eam'
@@ -838,6 +836,7 @@ export default {
exportFooter: [],
resultList: [],
userBuList: [],
+ buList: [],
// ======== 行高 ========
height: 200,
// ======== 分页 ========
@@ -2054,6 +2053,8 @@ export default {
this.getButtonAuthData()
// 获取用户的 site 和 bu
this.getSiteAndBuByUserName()
+ // 获取用户的 site 和 bu
+ this.getSiteAndBuByUserName2()
// 动态列
this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
if (!this.authSearch) {
@@ -2092,6 +2093,18 @@ export default {
})
},
+ // 获取用户的bu
+ getSiteAndBuByUserName2 () {
+ let tempData = {
+ username: this.$store.state.user.name,
+ }
+ getSiteAndBuByUserName2(tempData).then(({data}) => {
+ if (data.code === 0) {
+ this.buList = data.rows
+ }
+ })
+ },
+
// ======== 分页相关方法 ========
/**
* 每页数
@@ -2421,10 +2434,10 @@ export default {
this.$message.warning('请先选择替代!')
return
}
- if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
- this.$message.warning('不可编辑的替代状态!')
- return
- }
+ // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
+ // this.$message.warning('不可编辑的替代状态!')
+ // return
+ // }
this.componentData = {
flag: '1',
site: this.modalData.site,
@@ -2474,10 +2487,10 @@ export default {
this.$message.warning('请先选择替代!')
return
}
- if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
- this.$message.warning('不可编辑的替代状态!')
- return
- }
+ // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
+ // this.$message.warning('不可编辑的替代状态!')
+ // return
+ // }
this.componentData = {
flag: '1',
site: this.$store.state.user.site,
@@ -2522,10 +2535,10 @@ export default {
* 子明细编辑模态框
*/
updateComponentModal (row) {
- if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
- this.$message.warning('不可编辑的替代状态!')
- return
- }
+ // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
+ // this.$message.warning('不可编辑的替代状态!')
+ // return
+ // }
this.componentData = {
flag: '2',
site: row.site,
@@ -2742,14 +2755,42 @@ export default {
this.modalData.partDesc = data.page.list[0].partDesc
this.modalData.printUnit = data.page.list[0].printUnit
this.modalData.printUnitName = data.page[0].printUnitName
- return
+ // 获取物料的routing版本号
+ getBomEngChgLevel(this.modalData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.modalData.engChgLevel = data.engChgLevel
+ } else {
+ this.modalData.engChgLevel = ''
+ }
+ })
+ } else {
+ this.modalData.partDesc = ''
+ this.modalData.printUnit = ''
+ this.modalData.printUnitName = ''
+ this.modalData.engChgLevel = ''
}
}
})
+ } else {
+ this.modalData.partDesc = ''
+ this.modalData.printUnit = ''
+ this.modalData.printUnitName = ''
+ this.modalData.engChgLevel = ''
}
- this.modalData.partDesc = ''
- this.modalData.printUnit = ''
- this.modalData.printUnitName = ''
+ },
+
+ /**
+ * BOM类型改变
+ */
+ bomTypeChange () {
+ // 获取物料的Bom版本号
+ getBomEngChgLevel(this.modalData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.modalData.engChgLevel = data.engChgLevel
+ } else {
+ this.modalData.engChgLevel = ''
+ }
+ })
},
/**
@@ -2761,7 +2802,15 @@ export default {
this.modalData.partDesc = row.partDesc
this.modalData.printUnit = row.printUnit
this.modalData.printUnitName = row.printUnitName
- this.partModelFlag = false
+ // 获取物料的routing版本号
+ getBomEngChgLevel(this.modalData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.modalData.engChgLevel = data.engChgLevel
+ } else {
+ this.modalData.engChgLevel = ''
+ }
+ this.partModelFlag = false
+ })
},
/**
@@ -2977,10 +3026,10 @@ export default {
* 删除子物料
*/
deleteComponentPart () {
- if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
- this.$message.warning('不可编辑的替代状态!')
- return
- }
+ // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
+ // this.$message.warning('不可编辑的替代状态!')
+ // return
+ // }
if (this.checkedDetail.length === 0) {
this.$message.warning('请选择要删除子物料!')
return
diff --git a/src/views/modules/part/routingManagement.vue b/src/views/modules/part/routingManagement.vue
index e77f027..6554a51 100644
--- a/src/views/modules/part/routingManagement.vue
+++ b/src/views/modules/part/routingManagement.vue
@@ -3,12 +3,12 @@
-
+
+ :value = "i.buNo">
@@ -114,8 +114,6 @@
:key = "i.buNo"
:label = "i.buDesc"
:value = "i.buNo">
- {{ i.sitename }}
- {{ i.buDesc }}
@@ -379,7 +377,7 @@
-
+
@@ -417,7 +415,7 @@
-
+
@@ -655,9 +653,9 @@
-
+
@@ -715,7 +713,7 @@ import {
saveStandardOperation, // 新增工序
} from '@/api/part/routingManagement.js'
import {verifyData} from '@/api/part/partInformation.js'
-import {getSiteAndBuByUserName} from "@/api/eam/eam.js"
+import {getSiteAndBuByUserName, getSiteAndBuByUserName2} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import ChooseList from '@/views/modules/common/Chooselist_eam'
@@ -775,6 +773,7 @@ export default {
exportFooter: [],
resultList: [],
userBuList: [],
+ buList: [],
// ======== 行高 ========
height: 200,
// ======== 分页 ========
@@ -1275,13 +1274,13 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 601003,
- serialNumber: '104003Table2MachRunFactor',
+ serialNumber: '104003Table2RunTimeCodeDesc',
tableId: '104003Table2',
tableName: 'Routing工序表',
- columnProp: 'machRunFactor',
+ columnProp: 'runTimeCodeDesc',
headerAlign: 'center',
- align: 'right',
- columnLabel: '机器单位产出',
+ align: 'center',
+ columnLabel: '产出单位',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1293,13 +1292,31 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 601003,
- serialNumber: '104003Table2MachSetupTime',
+ serialNumber: '104003Table2SetupLaborClassDesc',
tableId: '104003Table2',
tableName: 'Routing工序表',
- columnProp: 'machSetupTime',
+ columnProp: 'setupLaborClassDesc',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: '调机时人员等级',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 601003,
+ serialNumber: '104003Table2SetupCrewSize',
+ tableId: '104003Table2',
+ tableName: 'Routing工序表',
+ columnProp: 'setupCrewSize',
headerAlign: 'center',
align: 'right',
- columnLabel: '机器调机时间',
+ columnLabel: '调机过程人数',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1311,13 +1328,13 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 601003,
- serialNumber: '104003Table2RunTimeCodeDesc',
+ serialNumber: '104003Table2MachSetupTime',
tableId: '104003Table2',
tableName: 'Routing工序表',
- columnProp: 'runTimeCodeDesc',
+ columnProp: 'machSetupTime',
headerAlign: 'center',
- align: 'center',
- columnLabel: '产出单位',
+ align: 'right',
+ columnLabel: '机器调机时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1347,13 +1364,13 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 601003,
- serialNumber: '104003Table2LaborCycleTime',
+ serialNumber: '104003Table2MachRunFactor',
tableId: '104003Table2',
tableName: 'Routing工序表',
- columnProp: 'laborCycleTime',
+ columnProp: 'machRunFactor',
headerAlign: 'center',
align: 'right',
- columnLabel: '人工处理时间',
+ columnLabel: '机器单位产出',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1365,13 +1382,13 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 601003,
- serialNumber: '104003Table2LaborRunFactor',
+ serialNumber: '104003Table2LaborClassNo',
tableId: '104003Table2',
tableName: 'Routing工序表',
- columnProp: 'laborRunFactor',
+ columnProp: 'laborClassDesc',
headerAlign: 'center',
- align: 'right',
- columnLabel: '人工单位产出',
+ align: 'center',
+ columnLabel: '人员等级',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1383,13 +1400,13 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 601003,
- serialNumber: '104003Table2LaborSetupTime',
+ serialNumber: '104003Table2CrewSize',
tableId: '104003Table2',
tableName: 'Routing工序表',
- columnProp: 'laborSetupTime',
+ columnProp: 'crewSize',
headerAlign: 'center',
align: 'right',
- columnLabel: '人工调机时间',
+ columnLabel: '生产过程人数',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1401,13 +1418,13 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 601003,
- serialNumber: '104003Table2CrewSize',
+ serialNumber: '104003Table2LaborSetupTime',
tableId: '104003Table2',
tableName: 'Routing工序表',
- columnProp: 'crewSize',
+ columnProp: 'laborSetupTime',
headerAlign: 'center',
align: 'right',
- columnLabel: '生产过程人数',
+ columnLabel: '人工调机时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1419,13 +1436,13 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 601003,
- serialNumber: '104003Table2SetupCrewSize',
+ serialNumber: '104003Table2LaborCycleTime',
tableId: '104003Table2',
tableName: 'Routing工序表',
- columnProp: 'setupCrewSize',
+ columnProp: 'laborCycleTime',
headerAlign: 'center',
align: 'right',
- columnLabel: '调机过程人数',
+ columnLabel: '人工处理时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1437,13 +1454,13 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 601003,
- serialNumber: '104003Table2OutsideOpItem',
+ serialNumber: '104003Table2LaborRunFactor',
tableId: '104003Table2',
tableName: 'Routing工序表',
- columnProp: 'outsideOpItem',
+ columnProp: 'laborRunFactor',
headerAlign: 'center',
- align: 'center',
- columnLabel: '外协采购料号',
+ align: 'right',
+ columnLabel: '人工单位产出',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1486,7 +1503,7 @@ export default {
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 200
+ columnWidth: 120
},
{
userId: this.$store.state.user.name,
@@ -1509,31 +1526,13 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 601003,
- serialNumber: '104003Table2LaborClassNo',
- tableId: '104003Table2',
- tableName: 'Routing工序表',
- columnProp: 'laborClassDesc',
- headerAlign: 'center',
- align: 'center',
- columnLabel: '人员等级',
- columnHidden: false,
- columnImage: false,
- columnSortable: false,
- sortLv: 0,
- status: true,
- fixed: '',
- columnWidth: 100
- },
- {
- userId: this.$store.state.user.name,
- functionId: 601003,
- serialNumber: '104003Table2SetupLaborClassDesc',
+ serialNumber: '104003Table2OutsideOpItem',
tableId: '104003Table2',
tableName: 'Routing工序表',
- columnProp: 'setupLaborClassDesc',
+ columnProp: 'outsideOpItem',
headerAlign: 'center',
align: 'center',
- columnLabel: '调机时人员等级',
+ columnLabel: '外协采购料号',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1666,7 +1665,7 @@ export default {
columnImage: false,
status: true,
fixed: '',
- columnWidth: 100
+ columnWidth: 80
},
{
columnProp: 'operationName',
@@ -1677,7 +1676,7 @@ export default {
columnImage: false,
status: true,
fixed: '',
- columnWidth: 150
+ columnWidth: 120
},
{
columnProp: 'workCenterNo',
@@ -1699,35 +1698,35 @@ export default {
columnImage: false,
status: true,
fixed: '',
- columnWidth: 150
+ columnWidth: 120
},
{
- columnProp: 'laborClassNo',
+ columnProp: 'setupLaborClassNo',
headerAlign: "center",
align: "center",
- columnLabel: '人员等级编码',
+ columnLabel: '调机时人员等级编码',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
- columnWidth: 100
+ columnWidth: 120
},
{
- columnProp: 'laborClassDesc',
+ columnProp: 'setupLaborClassDesc',
headerAlign: "center",
align: "left",
- columnLabel: '人员等级描述',
+ columnLabel: '调机时人员等级描述',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
- columnWidth: 150
+ columnWidth: 120
},
{
- columnProp: 'setupLaborClassNo',
+ columnProp: 'setupCrewSize',
headerAlign: "center",
- align: "center",
- columnLabel: '调机时人员等级编码',
+ align: "right",
+ columnLabel: '调机过程中人数',
columnHidden: false,
columnImage: false,
status: true,
@@ -1735,21 +1734,21 @@ export default {
columnWidth: 100
},
{
- columnProp: 'setupLaborClassDesc',
- headerAlign: "center",
- align: "left",
- columnLabel: '调机时人员等级描述',
+ columnProp: 'machCycleTime',
+ headerAlign: 'center',
+ align: 'right',
+ columnLabel: '机器处理时间',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
- columnWidth: 150
+ columnWidth: 100
},
{
- columnProp: 'laborRunFactor',
+ columnProp: 'machRunFactor',
headerAlign: 'center',
align: 'right',
- columnLabel: '人工单位产出',
+ columnLabel: '机器单位产出',
columnHidden: false,
columnImage: false,
status: true,
@@ -1757,10 +1756,32 @@ export default {
columnWidth: 100
},
{
- columnProp: 'machRunFactor',
- headerAlign: 'center',
- align: 'right',
- columnLabel: '机器单位产出',
+ columnProp: 'laborClassNo',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '人员等级编码',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 120
+ },
+ {
+ columnProp: 'laborClassDesc',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '人员等级描述',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 120
+ },
+ {
+ columnProp: 'crewSize',
+ headerAlign: "center",
+ align: "right",
+ columnLabel: '生产过程中人数',
columnHidden: false,
columnImage: false,
status: true,
@@ -1779,16 +1800,27 @@ export default {
columnWidth: 100
},
{
- columnProp: 'machCycleTime',
+ columnProp: 'laborRunFactor',
headerAlign: 'center',
align: 'right',
- columnLabel: '机器处理时间',
+ columnLabel: '人工单位产出',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 100
},
+ {
+ columnProp: 'conditionDesc',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: '条件描述',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 200
+ },
],
// ======== 必填规则 ========
rules: {
@@ -1978,6 +2010,8 @@ export default {
this.getButtonAuthData()
// 获取用户的 site 和 bu
this.getSiteAndBuByUserName()
+ // 获取用户的 site 和 bu
+ this.getSiteAndBuByUserName2()
// 动态列
this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
if (!this.authSearch) {
@@ -2016,6 +2050,18 @@ export default {
})
},
+ // 获取用户的bu
+ getSiteAndBuByUserName2 () {
+ let tempData = {
+ username: this.$store.state.user.name,
+ }
+ getSiteAndBuByUserName2(tempData).then(({data}) => {
+ if (data.code === 0) {
+ this.buList = data.rows
+ }
+ })
+ },
+
// ======== 分页相关方法 ========
/**
* 每页数
@@ -2413,10 +2459,10 @@ export default {
this.$message.warning('请先选择替代!')
return
}
- if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
- this.$message.warning('不可编辑的替代状态!')
- return
- }
+ // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
+ // this.$message.warning('不可编辑的替代状态!')
+ // return
+ // }
getStandardOperations(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.standardOperationList = data.rows
@@ -2476,10 +2522,10 @@ export default {
this.$message.warning('请先选择替代!')
return
}
- if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
- this.$message.warning('不可编辑的替代状态!')
- return
- }
+ // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
+ // this.$message.warning('不可编辑的替代状态!')
+ // return
+ // }
this.componentData = {
flag: '1',
site: this.modalData.site,
@@ -2531,10 +2577,10 @@ export default {
* 编辑模态框
*/
updateComponentModal (row) {
- if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
- this.$message.warning('不可编辑的替代状态!')
- return
- }
+ // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
+ // this.$message.warning('不可编辑的替代状态!')
+ // return
+ // }
this.componentData = {
flag: '2',
site: row.site,
@@ -2788,9 +2834,7 @@ export default {
if (data && data.code === 0) {
this.modalData.routingRevision = data.routingRevision
} else {
- this.$alert(data.msg, '错误', {
- confirmButtonText: '确定'
- })
+ this.modalData.routingRevision = ''
}
this.partModelFlag = false
})
@@ -2805,9 +2849,7 @@ export default {
if (data && data.code === 0) {
this.modalData.routingRevision = data.routingRevision
} else {
- this.$alert(data.msg, '错误', {
- confirmButtonText: '确定'
- })
+ this.modalData.routingRevision = ''
}
})
},
@@ -2833,10 +2875,10 @@ export default {
* 删除子物料
*/
deleteComponentPart () {
- if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
- this.$message.warning('不可编辑的替代状态!')
- return
- }
+ // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
+ // this.$message.warning('不可编辑的替代状态!')
+ // return
+ // }
if (this.checkedDetail.length === 0) {
this.$message.warning('请选择要删除子物料!')
return