diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue
index e050d2d..337cfc6 100644
--- a/src/views/modules/part/bomManagement.vue
+++ b/src/views/modules/part/bomManagement.vue
@@ -3647,7 +3647,8 @@ export default {
}).then(() => {
let tempData = {
informationList: this.checkedDetail,
- productFlag: 'component'
+ productFlag: 'component',
+ updateBy: this.$store.state.user.name,
}
deleteBomComponent(tempData).then(({data}) => {
if (data && data.code === 0) {
@@ -3666,7 +3667,6 @@ export default {
})
}
})
- }).catch(() => {
})
}
},
diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue
index d6171ea..d93f29f 100644
--- a/src/views/modules/part/partInformation.vue
+++ b/src/views/modules/part/partInformation.vue
@@ -117,8 +117,8 @@
更多
- BOM
- Routing
+ BOM
+ Routing
转正式物料
@@ -161,7 +161,7 @@
-
+
@@ -5573,12 +5573,14 @@
return s
},
- toMenu (type,row) {
+ toMenu (type, row) {
let path = ''
- if (type === 'Routing'){
+ if (type === 'Routing') {
path = 'routing'
- }else if (type === 'BOM'){
+ } else if (type === 'BOM' && row.partType === 'Manufactured') {
path = 'bom'
+ } else if (type === 'BOM' && row.partType === 'Manufactured Recipe') {
+ path = 'recipe'
}
if (this.$router.resolve(`/part-${path}Management`).resolved.name === '404') {
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
diff --git a/src/views/modules/part/recipeManagement.vue b/src/views/modules/part/recipeManagement.vue
index 70904a2..7e38436 100644
--- a/src/views/modules/part/recipeManagement.vue
+++ b/src/views/modules/part/recipeManagement.vue
@@ -110,7 +110,7 @@
-
+
@@ -186,7 +186,16 @@
-
+
+
+
+
+
+
+
+
+
+
@@ -244,110 +253,110 @@
-
-
-
-
- 新增
- 删除
-
-
-
-
-
-
- {{scope.row[item.columnProp]}}
-
-
-
-
-
- 编辑
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
- {{scope.row[item.columnProp]}}
-
-
-
-
-
- 编辑
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
- {{scope.row[item.columnProp]}}
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
保存
@@ -368,6 +377,19 @@
+
+
+
+
+
+ 重量单位
+
+
+
+ 体积单位
+
+
+
@@ -514,22 +536,33 @@
-
-
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
工序
-
+
发料库位
-
+
@@ -1033,7 +1066,10 @@ export default {
createBy: '',
updateDate: '',
updateBy: '',
- officialFlag: 'N'
+ officialFlag: 'N',
+ regUnit: '',
+ displayWeightUom: '',
+ displayVolumeUom: ''
},
componentData: {
flag: '',
@@ -1062,7 +1098,25 @@ export default {
updateBy: '',
lineSequence: '',
consumptionItem: '',
- productFlag: ''
+ productFlag: '',
+ weightShare: '',
+ partsByWeight: '',
+ qtyUom: '',
+ issuePlannedScrapDb: '',
+ issueOverreportedQtyDb: '',
+ fixedQtyFlag: '',
+ promisePlanned: '',
+ phantomConsume: '',
+ operCostDistribution: '',
+ genOhCostDistribution: '',
+ qtyKg: '',
+ byProdAsSupplyInMrpDb: '',
+ leadtimeOffset: '',
+ stdPlannedItem: '',
+ chargedItem: '',
+ excludeFromCalculationsDb: '',
+ excludeFromAsBuiltDb: '',
+ lotBatchOriginDb: ''
},
partData: {
site: this.$store.state.user.site,
@@ -1103,7 +1157,10 @@ export default {
createBy: '',
updateDate: '',
updateBy: '',
- officialFlag: ''
+ officialFlag: '',
+ displayWeightUom: '',
+ displayVolumeUom: '',
+ regUnit: ''
},
operationData: {
site: this.$store.state.user.site,
@@ -1641,6 +1698,60 @@ export default {
fixed: '',
columnWidth: 100
},
+ {
+ userId: this.$store.state.user.name,
+ functionId: 104002003,
+ serialNumber: '104002003Table2WeightShare',
+ tableId: '104002003Table2',
+ tableName: 'Recipe子物料表',
+ columnProp: 'weightShare',
+ headerAlign: 'center',
+ align: 'right',
+ columnLabel: '重量分配',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 110
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 104002003,
+ serialNumber: '104002003Table2PartsByWeight',
+ tableId: '104002003Table2',
+ tableName: 'Recipe子物料表',
+ columnProp: 'partsByWeight',
+ headerAlign: 'center',
+ align: 'right',
+ columnLabel: '零件-按重量',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 110
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 104002003,
+ serialNumber: '104002003Table2QtyUom',
+ tableId: '104002003Table2',
+ tableName: 'Recipe子物料表',
+ columnProp: 'qtyUom',
+ headerAlign: 'center',
+ align: 'right',
+ columnLabel: '数量计量单位',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 110
+ },
{
userId: this.$store.state.user.name,
functionId: 104002003,
@@ -2499,38 +2610,38 @@ export default {
message: ' ',
trigger: ['blur','change']
}
- ]
- },
- componentRules: {
- componentPart: [
+ ],
+ regUnit: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
- lineSequence: [
+ displayWeightUom: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
- qtyPerAssembly: [
+ displayVolumeUom: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
- ],
- componentScrap: [
+ ]
+ },
+ componentRules: {
+ componentPart: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
- shrinkageFactor: [
+ lineSequence: [
{
required: true,
message: ' ',
@@ -2550,7 +2661,14 @@ export default {
message: ' ',
trigger: ['blur','change']
}
- ]
+ ],
+ weightShare: [
+ {
+ required: true,
+ message: ' ',
+ trigger: ['blur','change']
+ }
+ ],
},
// ======== 复选数据集 ========
recipeSelections: [],
@@ -2815,7 +2933,10 @@ export default {
createBy: this.$store.state.user.name,
updateDate: '',
updateBy: this.$store.state.user.name,
- officialFlag: 'N'
+ officialFlag: 'N',
+ displayWeightUom: 'kg',
+ displayVolumeUom: 'ml',
+ regUnit: 'Weight Share'
}
this.detailDataList = []
this.subDetailList = []
@@ -2893,7 +3014,10 @@ export default {
status: 'Tentative',
createDate: '',
createBy: this.$store.state.user.name,
- officialFlag: 'N'
+ officialFlag: 'N',
+ displayWeightUom: 'kg',
+ displayVolumeUom: 'ml',
+ regUnit: 'Weight Share'
}
// 查询recipe主信息
queryRecipeHeader(this.modalData).then(({data}) => {
@@ -2939,7 +3063,10 @@ export default {
detailNoteText: this.detailData.detailNoteText,
status: this.detailData.status,
updateBy: this.$store.state.user.name,
- officialFlag: this.detailData.officialFlag
+ officialFlag: this.detailData.officialFlag,
+ displayWeightUom: this.detailData.displayWeightUom,
+ displayVolumeUom: this.detailData.displayVolumeUom,
+ regUnit: 'Weight Share'
}
// 查询recipe主信息
queryRecipeHeader(this.modalData).then(({data}) => {
@@ -2975,7 +3102,7 @@ export default {
componentPartDesc: '',
printUnit: '',
printUnitName: '',
- qtyPerAssembly: 0,
+ qtyPerAssembly: undefined,
componentScrap: 0,
issueType: 'Reserve And Backflush',
shrinkageFactor: 0,
@@ -2988,7 +3115,25 @@ export default {
createBy: this.$store.state.user.name,
lineSequence: '',
consumptionItem: 'Consumed',
- productFlag: 'component'
+ productFlag: 'component',
+ weightShare: undefined,
+ partsByWeight: undefined,
+ qtyUom: undefined,
+ issuePlannedScrapDb: 'true',
+ issueOverreportedQtyDb: 'false',
+ fixedQtyFlag: 'Not fixed',
+ promisePlanned: 'Promised',
+ phantomConsume: 'Not Phantom Consume',
+ operCostDistribution: '0',
+ genOhCostDistribution: '0',
+ qtyKg: undefined,
+ byProdAsSupplyInMrpDb: 'false',
+ leadtimeOffset: '0',
+ stdPlannedItem: '1',
+ chargedItem: 'Item not charged',
+ excludeFromCalculationsDb: 'false',
+ excludeFromAsBuiltDb: 'false',
+ lotBatchOriginDb: 'false'
}
// 获取子料的序号
@@ -3077,7 +3222,25 @@ export default {
updateBy: this.$store.state.user.name,
lineSequence: row.lineSequence,
consumptionItem: row.consumptionItem,
- productFlag: 'component'
+ productFlag: 'component',
+ weightShare: row.weightShare,
+ partsByWeight: row.partsByWeight,
+ qtyUom: row.qtyUom,
+ issuePlannedScrapDb: row.issuePlannedScrapDb,
+ issueOverreportedQtyDb: row.issueOverreportedQtyDb,
+ fixedQtyFlag: row.fixedQtyFlag,
+ promisePlanned: row.promisePlanned,
+ phantomConsume: row.phantomConsume,
+ operCostDistribution: row.operCostDistribution,
+ genOhCostDistribution: row.genOhCostDistribution,
+ qtyKg: row.qtyKg,
+ byProdAsSupplyInMrpDb: row.byProdAsSupplyInMrpDb,
+ leadtimeOffset: row.leadtimeOffset,
+ stdPlannedItem: row.stdPlannedItem,
+ chargedItem: row.chargedItem,
+ excludeFromCalculationsDb: row.excludeFromCalculationsDb,
+ excludeFromAsBuiltDb: row.excludeFromAsBuiltDb,
+ lotBatchOriginDb: row.lotBatchOriginDb
}
this.componentDisableFlag = true
this.componentSaveModal = true
@@ -3518,7 +3681,8 @@ export default {
}).then(() => {
let tempData = {
informationList: this.checkedDetail,
- productFlag: 'component'
+ productFlag: 'component',
+ updateBy: this.$store.state.user.name,
}
deleteRecipeComponent(tempData).then(({data}) => {
if (data && data.code === 0) {
@@ -3537,7 +3701,6 @@ export default {
})
}
})
- }).catch(() => {
})
}
},
@@ -3555,7 +3718,8 @@ export default {
}).then(() => {
let tempData = {
informationList: this.checkedByProduct,
- productFlag: 'byProduct'
+ productFlag: 'byProduct',
+ updateBy: this.$store.state.user.name,
}
deleteRecipeComponent(tempData).then(({data}) => {
if (data && data.code === 0) {
@@ -3574,7 +3738,6 @@ export default {
})
}
})
- }).catch(() => {
})
}
},
@@ -3588,6 +3751,13 @@ export default {
this.$refs.byProductTable.toggleRowSelection(row)
},
+ // 重量分配改变
+ changeWeightShare () {
+ this.componentData.partsByWeight = this.componentData.weightShare
+ this.componentData.qtyUom = this.componentData.weightShare / 100
+ this.componentData.qtyPerAssembly = this.componentData.weightShare / 100
+ },
+
// 新增子明细方法
componentDataSave (isClose) {
if (this.componentData.lineSequence === '' || this.componentData.lineSequence == null) {
@@ -3614,20 +3784,8 @@ export default {
this.$message.warning('请选择消耗项目!')
return
}
- if (this.componentData.qtyPerAssembly === '' || this.componentData.qtyPerAssembly == null) {
- this.$message.warning('请填写单位用量!')
- return
- }
- if (this.componentData.qtyPerAssembly === 0) {
- this.$message.warning('单位用量不能为0!')
- return
- }
- if (this.componentData.componentScrap === '' || this.componentData.componentScrap == null) {
- this.$message.warning('请填写调机量!')
- return
- }
- if (this.componentData.shrinkageFactor === '' || this.componentData.shrinkageFactor == null) {
- this.$message.warning('请填写损耗率!')
+ if (this.componentData.weightShare === '' || this.componentData.weightShare == null) {
+ this.$message.warning('请填写重量分配!')
return
}
if (this.componentData.issueType === '' || this.componentData.issueType == null) {
@@ -3950,6 +4108,14 @@ export default {
this.$message.warning('请选择替代状态!')
return
}
+ if (this.saveDetailData.displayWeightUom === '' || this.saveDetailData.displayWeightUom == null) {
+ this.$message.warning('请选择重量单位!')
+ return
+ }
+ if (this.saveDetailData.displayVolumeUom === '' || this.saveDetailData.displayVolumeUom == null) {
+ this.$message.warning('请选择体积单位!')
+ return
+ }
this.saveDetailLoading = true
if (this.saveDetailData.flag === '1') {
recipeDetailSave(this.saveDetailData).then(({data}) => {
@@ -4009,6 +4175,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
+ this.detailData.updateBy = this.$store.state.user.name
recipeDetailDelete(this.detailData).then(({data}) => {
if (data && data.code === 0) {
this.detailData = data.rows.detailData
@@ -4026,7 +4193,6 @@ export default {
})
}
})
- }).catch(() => {
})
},
@@ -4101,6 +4267,7 @@ export default {
// 临时Recipe转为正式Recipe
toBecomeOfficialRecipe () {
+ this.detailData.updateBy = this.$store.state.user.name
this.toBecomeOfficialLoading = true
toBecomeOfficialRecipe(this.detailData).then(({data}) => {
if (data && data.code === 0) {
@@ -4156,6 +4323,10 @@ export default {
let strVal = ''
if (val === 117) {
strVal = this.componentData.issueToLoc
+ } else if (val === 1008) {
+ strVal = this.saveDetailData.displayWeightUom
+ } else if (val === 1009) {
+ strVal = this.saveDetailData.displayVolumeUom
}
this.$refs.baseList.init(val, strVal)
})
@@ -4166,6 +4337,10 @@ export default {
if (this.tagNo === 117) {
this.componentData.issueToLoc = val.location_id
this.componentData.issueToLocName = val.location_name
+ } else if (this.tagNo === 1008) {
+ this.saveDetailData.displayWeightUom = val.um_id
+ } else if (this.tagNo === 1009) {
+ this.saveDetailData.displayVolumeUom = val.um_id
}
},