From 93f84429852f945d8553d71477919689f3e19e13 Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Mon, 11 Mar 2024 09:51:01 +0800
Subject: [PATCH] =?UTF-8?q?2024-03-11=20=E7=89=A9=E6=96=99=EF=BC=8Cbom?=
=?UTF-8?q?=EF=BC=8Crouting=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/part/bomManagement.js | 7 +
src/api/part/partInformation.js | 12 +-
src/api/part/routingManagement.js | 7 +
src/views/modules/part/bomManagement.vue | 153 ++++++++----
src/views/modules/part/partInformation.vue | 243 ++++++++++++++-----
src/views/modules/part/routingManagement.vue | 133 ++++++----
6 files changed, 394 insertions(+), 161 deletions(-)
diff --git a/src/api/part/bomManagement.js b/src/api/part/bomManagement.js
index 8810cb2..90c587d 100644
--- a/src/api/part/bomManagement.js
+++ b/src/api/part/bomManagement.js
@@ -147,6 +147,13 @@ export const copyBom = data => createAPI(`/plm/bomManagement/copyBom`,'post',dat
*/
export const copyAlternative = data => createAPI(`/plm/bomManagement/copyAlternative`,'post',data)
+/**
+ * 转正式Bom
+ * @param data
+ * @returns {*}
+ */
+export const toBecomeOfficialBom = data => createAPI(`/plm/bomManagement/toBecomeOfficialBom`,'post',data)
+
diff --git a/src/api/part/partInformation.js b/src/api/part/partInformation.js
index 046575d..68c665e 100644
--- a/src/api/part/partInformation.js
+++ b/src/api/part/partInformation.js
@@ -209,10 +209,20 @@ export const toBecomeOfficialPart = data => createAPI(`/plm/partInformation/toBe
export const queryPartRevisionList = data => createAPI(`/plm/partInformation/queryPartRevisionList`,'post',data)
/**
- * 编辑bom版本
+ * 新增物料版本
+ */
+export const saveRevision = data => createAPI(`/plm/partInformation/saveRevision`,'post',data)
+
+/**
+ * 编辑物料版本
*/
export const updateRevision = data => createAPI(`/plm/partInformation/updateRevision`,'post',data)
+/**
+ * 删除物料版本
+ */
+export const deleteRevision = data => createAPI(`/plm/partInformation/deleteRevision`,'post',data)
+
/**
* 复制物料
*/
diff --git a/src/api/part/routingManagement.js b/src/api/part/routingManagement.js
index 3c5dda4..3a2dbce 100644
--- a/src/api/part/routingManagement.js
+++ b/src/api/part/routingManagement.js
@@ -182,3 +182,10 @@ export const copyRouting = data => createAPI(`/plm/routingManagement/copyRouting
* @returns {*}
*/
export const copyAlternative = data => createAPI(`/plm/routingManagement/copyAlternative`,'post',data)
+
+/**
+ * 转正式Routing
+ * @param data
+ * @returns {*}
+ */
+export const toBecomeOfficialRouting = data => createAPI(`/plm/routingManagement/toBecomeOfficialRouting`,'post',data)
diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue
index 598a57a..3875baa 100644
--- a/src/views/modules/part/bomManagement.vue
+++ b/src/views/modules/part/bomManagement.vue
@@ -89,8 +89,8 @@
- 物料编码
- 物料编码
+ 物料编码
+ 物料编码
@@ -100,7 +100,7 @@
-
+
@@ -114,7 +114,7 @@
-
+
- 保存
- Copy
+ 保存
+ Copy
@@ -155,17 +155,18 @@
- 新增
- 删除
- 编辑
+ 新增
+ 删除
+ 编辑
Copy
- Buildable
- Obsolete
+ Build
+ Retire
+ 转正式Bom
-
+
-
-
-
-
-
@@ -201,8 +197,8 @@
- 新增
- 删除
+ 新增
+ 删除
+
+
+
+
+
+
查询
@@ -367,7 +369,7 @@
- 子物料编码
+ 子物料编码
子物料编码
@@ -389,8 +391,8 @@
- 工序
-
+ 工序
+
发料库位
@@ -410,7 +412,7 @@
- 保存
+ 保存
关闭
@@ -636,7 +638,8 @@ import {
getBomEngChgLevel, // 获取物料的bom版本号
getComponentLineSequence, // 获取子料的序号
copyBom, // 复制bom
- copyAlternative, // 复制alternative
+ copyAlternative, // 复制alternative,
+ toBecomeOfficialBom, // 转正式Bom
} from '@/api/part/bomManagement.js'
import ChooseList from '@/views/modules/common/Chooselist'
import dayjs from "dayjs";
@@ -716,6 +719,7 @@ export default {
updateBy: '',
printUnit: '',
printUnitName: '',
+ officialFlag: ''
},
detailData: {
site: this.$store.state.user.site,
@@ -731,7 +735,8 @@ export default {
createDate: '',
createBy: '',
updateDate: '',
- updateBy: ''
+ updateBy: '',
+ officialFlag: 'N'
},
componentData: {
flag: '',
@@ -749,7 +754,7 @@ export default {
issueType: '',
shrinkageFactor: '',
lineItemNo: '',
- operationName: '',
+ operationId: '',
issueToLoc: '',
issueToLocName: '',
noteText: '',
@@ -768,6 +773,8 @@ export default {
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
+ status: '',
+ bomDetail: {}
},
saveDetailData: {
flag: '',
@@ -784,7 +791,8 @@ export default {
createDate: '',
createBy: '',
updateDate: '',
- updateBy: ''
+ updateBy: '',
+ officialFlag: ''
},
operationData: {
site: this.$store.state.user.site,
@@ -799,7 +807,8 @@ export default {
effPhaseInDate: '',
effPhaseOutDate: '',
previousVersion: {},
- createBy: ''
+ createBy: '',
+ officialFlag: ''
},
copyAlternativeData: {
site: '',
@@ -813,7 +822,8 @@ export default {
detailNoteText: '',
status: '',
previousVersion: {},
- createBy: ''
+ createBy: '',
+ officialFlag: ''
},
// ======== 数据列表 ========
dataList: [],
@@ -1294,7 +1304,7 @@ export default {
serialNumber: '104002Table2OperationDesc',
tableId: '104002Table2',
tableName: 'BOM子物料表',
- columnProp: 'operationName',
+ columnProp: 'operationId',
headerAlign: 'center',
align: 'center',
columnLabel: '工序',
@@ -1344,6 +1354,18 @@ export default {
},
],
operationDetailList: [
+ {
+ columnProp: 'operationNo',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '工序编码',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ },
{
columnProp: 'operationName',
headerAlign: "center",
@@ -1654,6 +1676,7 @@ export default {
createBy: this.$store.state.user.name,
printUnit: '',
printUnitName: '',
+ officialFlag: 'N'
}
this.detailData = {
site: this.$store.state.user.site,
@@ -1669,8 +1692,10 @@ export default {
createDate: '',
createBy: this.$store.state.user.name,
updateDate: '',
- updateBy: this.$store.state.user.name
+ updateBy: this.$store.state.user.name,
+ officialFlag: 'N'
}
+ this.detailDataList = []
this.subDetailList = []
this.modalDisableFlag = false
this.modalFlag = true
@@ -1695,6 +1720,7 @@ export default {
updateBy: this.$store.state.user.name,
printUnit: row.printUnit,
printUnitName: row.printUnitName,
+ officialFlag: row.officialFlag
}
// 查bom明细
queryBomDetail(this.modalData).then(({data}) => {
@@ -1741,6 +1767,7 @@ export default {
status: 'Tentative',
createDate: '',
createBy: this.$store.state.user.name,
+ officialFlag: 'N'
}
// 查询bom主信息
queryBomHeader(this.modalData).then(({data}) => {
@@ -1787,6 +1814,7 @@ export default {
detailNoteText: this.detailData.detailNoteText,
status: this.detailData.status,
updateBy: this.$store.state.user.name,
+ officialFlag: this.detailData.officialFlag
}
// 查询bom主信息
queryBomHeader(this.modalData).then(({data}) => {
@@ -1832,7 +1860,7 @@ export default {
issueType: 'Reserve and Backflush',
shrinkageFactor: 0,
lineItemNo: '',
- operationName: '',
+ operationId: '',
issueToLoc: '',
issueToLocName: '',
noteText: '',
@@ -1876,7 +1904,7 @@ export default {
issueType: row.issueType,
shrinkageFactor: row.shrinkageFactor,
lineItemNo: row.lineItemNo,
- operationName: row.operationName,
+ operationId: row.operationId,
issueToLoc: row.issueToLoc,
issueToLocName: row.issueToLocName,
noteText: row.noteText,
@@ -1909,10 +1937,6 @@ export default {
this.$message.warning('请选择生效日期!')
return
}
- // if (this.modalData.effPhaseOutDate === '' || this.modalData.effPhaseOutDate == null) {
- // this.$message.warning('请选择失效日期!')
- // return
- // }
if (this.modalData.engChgLevel === '' || this.modalData.engChgLevel == null) {
this.$message.warning('请填写BOM版本号!')
return
@@ -1937,6 +1961,7 @@ export default {
engRevision: this.modalData.engRevision,
typeFlag: this.modalData.typeFlag,
netWeight: this.modalData.netWeight,
+ officialFlag: this.modalData.officialFlag,
alternativeNo: this.detailData.alternativeNo,
alternativeDescription: this.detailData.alternativeDescription,
minLotQty: this.detailData.minLotQty,
@@ -2124,17 +2149,18 @@ export default {
this.modalData.partDesc = row.partDesc
this.modalData.printUnit = row.printUnit
this.modalData.printUnitName = row.printUnitName
- // 获取物料的bom版本号
- getBomEngChgLevel(this.modalData).then(({data}) => {
- if (data && data.code === 0) {
- this.modalData.engChgLevel = data.engChgLevel
- } else {
- this.$alert(data.msg, '错误', {
- confirmButtonText: '确定'
- })
- }
- this.partModelFlag = false
- })
+ // // 获取物料的bom版本号
+ // getBomEngChgLevel(this.modalData).then(({data}) => {
+ // if (data && data.code === 0) {
+ // this.modalData.engChgLevel = data.engChgLevel
+ // } else {
+ // this.$alert(data.msg, '错误', {
+ // confirmButtonText: '确定'
+ // })
+ // }
+ // this.partModelFlag = false
+ // })
+ this.partModelFlag = false
},
// bom类型改变
@@ -2156,9 +2182,10 @@ export default {
* @param row
*/
getRowOperationData (row) {
- this.componentData.operationName = row.operationName
+ this.componentData.operationId = row.operationId
this.operationModelFlag = false
},
+
getComponentRowData (row) {
this.componentData.componentPart = row.partNo
this.componentData.componentPartDesc = row.partDesc
@@ -2166,10 +2193,12 @@ export default {
this.componentData.printUnitName = row.printUnitName
this.componentPartModelFlag = false
},
+
/**
* 物料列表
*/
queryComponentPartList () {
+ this.componentPartData.bomDetail = this.detailData
// 查询所有物料
queryPartList(this.componentPartData).then(({data}) => {
if (data && data.code === 0) {
@@ -2401,6 +2430,7 @@ export default {
engRevision: data.rows.modalData.engRevision,
typeFlag: data.rows.modalData.typeFlag,
netWeight: data.rows.modalData.netWeight,
+ officialFlag: data.rows.modalData.officialFlag
}
this.detailDataList = data.rows.detailDataList
this.detailData = data.rows.detailData
@@ -2432,7 +2462,8 @@ export default {
effPhaseInDate: this.dayjs(new Date()).format('YYYY-MM-DD'),
effPhaseOutDate: '',
previousVersion: {},
- createBy: this.$store.state.user.name
+ createBy: this.$store.state.user.name,
+ officialFlag: 'N'
}
this.copyBomModelFlag = true
},
@@ -2485,6 +2516,7 @@ export default {
defaultFlag: this.detailData.defaultFlag,
detailNoteText: this.detailData.detailNoteText,
status: 'Tentative',
+ officialFlag: 'N',
previousVersion: {},
createBy: this.$store.state.user.name
}
@@ -2518,6 +2550,7 @@ export default {
this.copyAlternativeData.previousVersion = this.detailData
copyAlternative(this.copyAlternativeData).then(({data}) => {
if (data && data.code === 0) {
+ this.detailDataList = data.rows.detailDataList
this.copyAlternativeModelFlag = false
this.$message({
message: '操作成功',
@@ -2721,7 +2754,23 @@ export default {
})
},
-
+ // 临时Bom转为正式Bom
+ toBecomeOfficialBom () {
+ toBecomeOfficialBom(this.detailData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {}
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ },
// ======= 正则校验 =======
handleInput (value, type) {
diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue
index c866790..1eb5e40 100644
--- a/src/views/modules/part/partInformation.vue
+++ b/src/views/modules/part/partInformation.vue
@@ -126,14 +126,14 @@
转正式物料
-
+
-
-
+
+
@@ -246,7 +246,7 @@
-
+
@@ -259,7 +259,7 @@
-
+
@@ -457,10 +457,11 @@
-
+
+ 新增
@@ -487,6 +488,7 @@
label="操作">
编辑
+ 删除
@@ -1143,23 +1145,36 @@
-
+
-
-
+
+
-
-
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
保存
关闭
@@ -1201,6 +1216,9 @@
Default Location
+
+ Revision
+
@@ -1254,7 +1272,9 @@
queryMasterField, // 根据物料编码查 masterPart 属性
toBecomeOfficialPart, // 临时物料转为正式物料
queryPartRevisionList, // 查询物料的bom版本列表
- updateRevision, //编辑bom版本
+ saveRevision, // 新增物料版本
+ updateRevision, // 编辑物料版本
+ deleteRevision, // 删除物料版本
copyPart // 复制物料
} from '@/api/part/partInformation.js'
import {
@@ -1438,14 +1458,18 @@
variableLeadTimeHour: ''
},
revisionData: {
+ flag: '',
site: '',
partNo: '',
engChgLevel: '',
- bomType: '',
- noteText: '',
effPhaseInDate: '',
effPhaseOutDate: '',
- engRevision: ''
+ revisionText: '',
+ productStatus: '',
+ repairStatus: '',
+ engRevision: '',
+ createBy: '',
+ updateBy: '',
},
itemData: {
site: this.$store.state.user.site,
@@ -1481,6 +1505,7 @@
copyPlanningData: '',
copyManufacturing: '',
copyDefaultLocation: '',
+ copyRevision: '',
previousVersion: {},
createBy: ''
},
@@ -2585,62 +2610,54 @@
columnProp: 'engChgLevel',
headerAlign: "center",
align: "center",
- columnLabel: '版本号',
+ columnLabel: 'Revision',
columnHidden: false,
columnImage: false,
- columnSortable: true,
- sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 104001,
- serialNumber: '104001Table8BomType',
+ serialNumber: '104001Table8EffPhaseInDate',
tableId: "104001Table8",
tableName: "物料版本表",
- columnProp: 'bomType',
+ columnProp: 'effPhaseInDate',
headerAlign: "center",
align: "center",
- columnLabel: '制造类型',
+ columnLabel: 'Phase In',
columnHidden: false,
columnImage: false,
- columnSortable: true,
- sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 104001,
- serialNumber: '104001Table8EffPhaseInDate',
+ serialNumber: '104001Table8EffPhaseOutDate',
tableId: "104001Table8",
tableName: "物料版本表",
- columnProp: 'effPhaseInDate',
+ columnProp: 'effPhaseOutDate',
headerAlign: "center",
align: "center",
- columnLabel: '生效日期',
+ columnLabel: 'Phase Out',
columnHidden: false,
columnImage: false,
- columnSortable: true,
- sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 104001,
- serialNumber: '104001Table8EffPhaseOutDate',
+ serialNumber: '104001Table8NoteText',
tableId: "104001Table8",
tableName: "物料版本表",
- columnProp: 'effPhaseOutDate',
+ columnProp: 'revisionText',
headerAlign: "center",
align: "center",
- columnLabel: '失效日期',
+ columnLabel: 'Revision Text',
columnHidden: false,
columnImage: false,
- columnSortable: true,
- sortLv: 0,
status: true,
fixed: '',
},
@@ -2650,14 +2667,27 @@
serialNumber: '104001Table8NoteText',
tableId: "104001Table8",
tableName: "物料版本表",
- columnProp: 'noteText',
+ columnProp: 'productStatus',
headerAlign: "center",
align: "center",
- columnLabel: '版本文本',
+ columnLabel: 'Product Status',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 104001,
+ serialNumber: '104001Table8NoteText',
+ tableId: "104001Table8",
+ tableName: "物料版本表",
+ columnProp: 'repairStatus',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: 'Repair Status',
columnHidden: false,
columnImage: false,
- columnSortable: true,
- sortLv: 0,
status: true,
fixed: '',
},
@@ -2673,8 +2703,6 @@
columnLabel: '工程版本',
columnHidden: false,
columnImage: false,
- columnSortable: true,
- sortLv: 0,
status: true,
fixed: '',
},
@@ -2770,6 +2798,7 @@
fastAddFlag: false,
locationModelFlag: false,
updateRevisionModelFlag: false,
+ updateRevisionModelDisableFlag: false,
copyPartModelFlag: false
}
},
@@ -2815,29 +2844,114 @@
})
},
+ // 新增revision模态框
+ savePartRevisionModal () {
+ this.revisionData = {
+ flag: '1',
+ site: this.modalData.site,
+ partNo: this.modalData.partNo,
+ engChgLevel: '',
+ effPhaseInDate: '',
+ effPhaseOutDate: '',
+ revisionText: '',
+ productStatus: 'Not In Effect',
+ repairStatus: 'Not In Effect',
+ engRevision: '',
+ createBy: this.$store.state.user.name,
+ }
+ this.updateRevisionModelFlag = true
+ this.updateRevisionModelDisableFlag = false
+ },
+
// 编辑bom版本模态框
updateRevisionModal (row) {
- this.revisionData = row
+ this.revisionData = {
+ flag: '2',
+ site: row.site,
+ partNo: row.partNo,
+ engChgLevel: row.engChgLevel,
+ effPhaseInDate: row.effPhaseInDate,
+ effPhaseOutDate: row.effPhaseOutDate,
+ revisionText: row.revisionText,
+ productStatus: row.productStatus,
+ repairStatus: row.repairStatus,
+ engRevision: row.engRevision,
+ updateBy: this.$store.state.user.name,
+ }
this.updateRevisionModelFlag = true
+ this.updateRevisionModelDisableFlag = true
},
- // 编辑bom版本
+ // 新增/编辑bom版本
updateRevision () {
- updateRevision(this.revisionData).then(({data}) => {
- if (data && data.code === 0) {
- this.queryPartRevisionList()
- this.updateRevisionModelFlag = false
- this.$message({
- message: '操作成功',
- type: 'success',
- duration: 1500,
- onClose: () => {}
- })
- } else {
- this.$alert(data.msg, '错误', {
- confirmButtonText: '确定'
- })
- }
+ if (this.revisionData.engChgLevel === '' || this.revisionData.engChgLevel == null) {
+ this.$message.warning('请填写版本号(Revision)!')
+ return
+ }
+ if (this.revisionData.effPhaseInDate === '' || this.revisionData.effPhaseInDate == null) {
+ this.$message.warning('请选择生效日期(Phase In)!')
+ return
+ }
+ if (this.revisionData.flag === '1') {
+ saveRevision(this.revisionData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.queryPartRevisionList()
+ this.updateRevisionModelFlag = false
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {}
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ } else {
+ updateRevision(this.revisionData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.queryPartRevisionList()
+ this.updateRevisionModelFlag = false
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {}
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }
+ },
+
+ // 删除物料revision
+ deleteRevisionModal (row) {
+ this.$confirm(`是否删除该版本?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ deleteRevision(row).then(({data}) => {
+ if (data && data.code === 0) {
+ this.queryPartRevisionList()
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {}
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }).catch(() => {
})
},
@@ -3089,6 +3203,10 @@
this.modalData.density = val
} else if (type === 16) {
this.modalData.variableLeadTimeHour = val
+ } else if (type === 17) {
+ this.modalData.manufacturingLeadTime = val
+ } else if (type === 18) {
+ this.modalData.expectedLeadTime = val
}
},
@@ -3267,7 +3385,7 @@
partDesc: '',
spec: '',
partTypeDb: '',
- partType: 'Purchase raw',
+ partType: 'Purchased (raw)',
familyId: '',
familyName: '',
groupId: '',
@@ -3311,8 +3429,8 @@
lifecycleStage: 'Development',
countryOfOrigin: '',
countryOfOriginDesc: '',
- manufacturingLeadTime: '',
- expectedLeadTime: '',
+ manufacturingLeadTime: 0,
+ expectedLeadTime: 0,
regionOfOrigin: '',
regionOfOriginDesc: '',
durabilityWeek: '',
@@ -4042,6 +4160,7 @@
copyPlanningData: '',
copyManufacturing: '',
copyDefaultLocation: '',
+ copyRevision: '',
previousVersion: this.modalData,
createBy: this.$store.state.user.name
}
diff --git a/src/views/modules/part/routingManagement.vue b/src/views/modules/part/routingManagement.vue
index 506d1d8..262b14f 100644
--- a/src/views/modules/part/routingManagement.vue
+++ b/src/views/modules/part/routingManagement.vue
@@ -89,8 +89,8 @@
- 物料编码
- 物料编码
+ 物料编码
+ 物料编码
@@ -113,7 +113,7 @@
style="width: 221px"
v-model="modalData.phaseInDate"
type="date"
- format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd"
placeholder="请选择日期"
:editable=false>
@@ -123,7 +123,7 @@
style="width: 221px"
v-model="modalData.phaseOutDate"
type="date"
- format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd"
placeholder="请选择日期"
:editable=false>
@@ -132,8 +132,8 @@
- 保存
- Copy
+ 保存
+ Copy
@@ -146,17 +146,18 @@
- 新增
- 删除
- 编辑
- Copy
- Buildable
- Obsolete
+ 新增
+ 删除
+ 编辑
+ Copy
+ Build
+ Retire
+ 转正式Routing
-
+
- 新增
- 删除
+ 新增
+ 删除
- 新增
- 删除
+ 新增
+ 删除
-
-
-
-
-
@@ -394,10 +390,10 @@
-
+
-
+
@@ -830,6 +826,7 @@ import {
deleteRoutingTool, // 删除 routingTool
copyRouting, // 复制routing
copyAlternative, // 复制alternative
+ toBecomeOfficialRouting, // 转正式Routing
} from '@/api/part/routingManagement.js'
import {
routingSearchAlternative, // routing 替代列表查询
@@ -912,6 +909,7 @@ export default {
updateBy: '',
printUnit: '',
printUnitName: '',
+ officialFlag: ''
},
detailData: {
site: this.$store.state.user.site,
@@ -934,7 +932,8 @@ export default {
createDate: '',
createBy: '',
updateDate: '',
- updateBy: ''
+ updateBy: '',
+ officialFlag: ''
},
componentData: {
flag: '',
@@ -1016,6 +1015,7 @@ export default {
routingType: '',
alternativeNo: '',
alternativeDescription: '',
+ operationId: '',
operationNo: '',
operationName: '',
toolId: '',
@@ -1064,6 +1064,7 @@ export default {
routingType: '',
alternativeNo: '',
alternativeDescription: '',
+ operationId: '',
operationNo: '',
operationName: ''
},
@@ -1077,6 +1078,7 @@ export default {
routingType: '',
alternativeNo: '',
alternativeDescription: '',
+ operationId: '',
operationNo: '',
operationName: '',
guidelineSeq: '',
@@ -1522,24 +1524,24 @@ export default {
fixed: '',
columnWidth: 120
},
- {
- userId: this.$store.state.user.name,
- functionId: 104003,
- serialNumber: '104003Table2MachineNo',
- tableId: '104003Table2',
- tableName: 'Routing工序表',
- columnProp: 'machineNo',
- 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: 104003,
+ // serialNumber: '104003Table2MachineNo',
+ // tableId: '104003Table2',
+ // tableName: 'Routing工序表',
+ // columnProp: 'machineNo',
+ // 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: 104003,
@@ -2264,6 +2266,7 @@ export default {
createBy: this.$store.state.user.name,
printUnit: '',
printUnitName: '',
+ officialFlag: 'N'
}
this.detailData = {
site: this.$store.state.user.site,
@@ -2283,8 +2286,10 @@ export default {
minLotQty: '',
detailNoteText: '',
status: '',
- createBy: this.$store.state.user.name
+ createBy: this.$store.state.user.name,
+ officialFlag: 'N'
}
+ this.detailDataList = []
this.subDetailList = []
this.modalDisableFlag = false
this.modalFlag = true
@@ -2309,6 +2314,7 @@ export default {
updateBy: this.$store.state.user.name,
printUnit: row.printUnit,
printUnitName: row.printUnitName,
+ officialFlag: row.officialFlag
}
// 查routing明细
queryRoutingDetail(this.modalData).then(({data}) => {
@@ -2362,6 +2368,7 @@ export default {
status: 'Tentative',
createDate: '',
createBy: this.$store.state.user.name,
+ officialFlag: 'N'
}
// 查询routing主信息
queryRoutingHeader(this.modalData).then(({data}) => {
@@ -2415,6 +2422,7 @@ export default {
detailNoteText: this.detailData.detailNoteText,
status: this.detailData.status,
updateBy: this.$store.state.user.name,
+ officialFlag: this.detailData.officialFlag
}
// 查询routing主信息
queryRoutingHeader(this.modalData).then(({data}) => {
@@ -2531,6 +2539,7 @@ export default {
routingType: this.modalData.routingType,
alternativeNo: '',
alternativeDescription: '',
+ operationId: '',
operationNo: '',
operationName: '',
toolId: '',
@@ -2556,6 +2565,7 @@ export default {
routingType: row.routingType,
alternativeNo: row.alternativeNo,
alternativeDescription: row.alternativeDescription,
+ operationId: row.operationId,
operationNo: row.operationNo,
operationName: row.operationName,
toolId: row.toolId,
@@ -2764,6 +2774,7 @@ export default {
* @param row
*/
getComponentRowData (row) {
+ this.routingToolData.operationId = row.operationId
this.routingToolData.operationNo = row.operationNo
this.routingToolData.operationName = row.operationName
this.componentPartModelFlag = false
@@ -2969,6 +2980,10 @@ export default {
this.$message.warning('请先选择制造类型!')
return
}
+ if (this.modalData.phaseOutDate != null && this.modalData.phaseOutDate !== '' && (this.modalData.phaseInDate > this.modalData.phaseOutDate)) {
+ this.$message.warning('失效日期不能小于生效日期!')
+ return
+ }
this.saveHeaderLoading = true
// 新增主表信息
saveRoutingHeader(this.modalData).then(({data}) => {
@@ -2987,6 +3002,7 @@ export default {
engRevision: data.rows.modalData.engRevision,
typeFlag: data.rows.modalData.typeFlag,
netWeight: data.rows.modalData.netWeight,
+ officialFlag: data.rows.modalData.officialFlag
}
this.detailDataList = data.rows.detailDataList
this.detailData = data.rows.detailData
@@ -3019,7 +3035,8 @@ export default {
phaseInDate: this.dayjs(new Date()).format('YYYY-MM-DD'),
phaseOutDate: '',
previousVersion: {},
- createBy: this.$store.state.user.name
+ createBy: this.$store.state.user.name,
+ officialFlag: 'N'
}
this.copyRoutingModelFlag = true
},
@@ -3077,8 +3094,9 @@ export default {
forStdLotByDay: '',
forLotByDay: '',
minLotQty: '',
- detailNoteText: '',
+ detailNoteText: this.detailData.detailNoteText,
status: 'Tentative',
+ officialFlag: 'N',
previousVersion: {},
createBy: this.$store.state.user.name
}
@@ -3097,6 +3115,7 @@ export default {
routingType: this.modalData.routingType,
alternativeNo: this.detailData.alternativeNo,
alternativeDescription: this.detailData.alternativeDescription,
+ operationId: row.operationId,
operationNo: row.operationNo,
operationName: row.operationName
}
@@ -3136,6 +3155,7 @@ export default {
routingType: this.workGuidelineData.routingType,
alternativeNo: this.workGuidelineData.alternativeNo,
alternativeDescription: this.workGuidelineData.alternativeDescription,
+ operationId: this.workGuidelineData.operationId,
operationNo: this.workGuidelineData.operationNo,
operationName: this.workGuidelineData.operationName,
guidelineSeq: '',
@@ -3171,6 +3191,7 @@ export default {
routingType: row.routingType,
alternativeNo: row.alternativeNo,
alternativeDescription: row.alternativeDescription,
+ operationId: row.operationId,
operationNo: row.operationNo,
operationName: row.operationName,
guidelineSeq: row.guidelineSeq,
@@ -3310,6 +3331,7 @@ export default {
this.copyAlternativeData.previousVersion = this.detailData
copyAlternative(this.copyAlternativeData).then(({data}) => {
if (data && data.code === 0) {
+ this.detailDataList = data.rows.detailDataList
this.copyAlternativeModelFlag = false
this.$message({
message: '操作成功',
@@ -3508,6 +3530,25 @@ export default {
}
})
},
+
+ // 临时Routing转为正式Routing
+ toBecomeOfficialRouting () {
+ toBecomeOfficialRouting(this.detailData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {}
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ },
+
/**
* 新增 routingTool
*/