diff --git a/src/api/part/recipeManagement.js b/src/api/part/recipeManagement.js
index 85e72ec..d245cb6 100644
--- a/src/api/part/recipeManagement.js
+++ b/src/api/part/recipeManagement.js
@@ -147,6 +147,46 @@ export const copyRecipe = data => createAPI(`/plm/recipeManagement/copyRecipe`,'
*/
export const copyAlternative = data => createAPI(`/plm/recipeManagement/copyAlternative`,'post',data)
+/**
+ * 转正式Recipe
+ * @param data
+ * @returns {*}
+ */
+export const toBecomeOfficialRecipe = data => createAPI(`/plm/recipeManagement/toBecomeOfficialRecipe`,'post',data)
+
+/**
+ * 新编辑副产品成本分配
+ * @param data
+ * @returns {*}
+ */
+export const updateManufStructCostDistrib = data => createAPI(`/plm/recipeManagement/updateManufStructCostDistrib`,'post',data)
+
+/**
+ * 刷新子物料
+ * @param data
+ * @returns {*}
+ */
+export const queryRecipeComponentTable = data => createAPI(`/plm/recipeManagement/queryRecipeComponentTable`,'post',data)
+/**
+ * 刷新副产品
+ * @param data
+ * @returns {*}
+ */
+export const queryRecipeByProductTable = data => createAPI(`/plm/recipeManagement/queryRecipeByProductTable`,'post',data)
+
+/**
+ * 刷新项目成本分配
+ * @param data
+ * @returns {*}
+ */
+export const queryManufStructCostDistribtionTable = data => createAPI(`/plm/recipeManagement/queryManufStructCostDistribtionTable`,'post',data)
+
+/**
+ * 刷新多级别结构
+ * @param data
+ * @returns {*}
+ */
+export const queryMultiLevelStructureTable = data => createAPI(`/plm/recipeManagement/queryMultiLevelStructureTable`,'post',data)
diff --git a/src/element-ui/index.js b/src/element-ui/index.js
index 4d1b5c5..89c8add 100644
--- a/src/element-ui/index.js
+++ b/src/element-ui/index.js
@@ -151,7 +151,7 @@ Vue.prototype.$ELEMENT = {size: 'medium'}
Vue.prototype.$message = function (msg) {
let msgObj = {
message: msg.message ? msg.message : msg,
- duration: 2000
+ duration: 1000
}
let msgType = msg.type || ""
switch (msgType) {
diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue
index aec3aea..9194fd9 100644
--- a/src/views/modules/part/bomManagement.vue
+++ b/src/views/modules/part/bomManagement.vue
@@ -257,7 +257,7 @@
style="width:100%">
-
+
@@ -476,13 +476,19 @@
子物料编码
子物料编码
-
+
-
+
-
+
+
+
+
+
+
+
@@ -951,6 +957,7 @@ export default {
updateDate: '',
updateBy: '',
lineSequence: '',
+ consumptionItem: '',
productFlag: ''
},
partData: {
@@ -1479,6 +1486,24 @@ export default {
fixed: '',
columnWidth: 80
},
+ {
+ userId: this.$store.state.user.name,
+ functionId: 104002,
+ serialNumber: '104002Table2ConsumptionItem',
+ tableId: '104002Table2',
+ tableName: 'BOM子物料表',
+ columnProp: 'consumptionItem',
+ 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: 104002,
@@ -1570,6 +1595,206 @@ export default {
columnWidth: 150
},
],
+ columnSubDetailList2: [
+ {
+ userId: this.$store.state.user.name,
+ functionId: 104002,
+ serialNumber: '104002Table3LineSequence',
+ tableId: '104002Table3',
+ tableName: 'BOM副产品表',
+ columnProp: 'lineSequence',
+ 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: 104002,
+ serialNumber: '104002Table3ComponentPart',
+ tableId: '104002Table3',
+ tableName: 'BOM副产品表',
+ 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: 104002,
+ serialNumber: '104002Table3ComponentPartDesc',
+ tableId: '104002Table3',
+ tableName: 'BOM副产品表',
+ columnProp: 'componentPartDesc',
+ 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: 104002,
+ serialNumber: '104002Table3QtyPerAssembly',
+ tableId: '104002Table3',
+ tableName: 'BOM副产品表',
+ 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: 104002,
+ serialNumber: '104002Table3ComponentScrap',
+ tableId: '104002Table3',
+ tableName: 'BOM副产品表',
+ 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: 104002,
+ serialNumber: '104002Table3ShrinkageFactor',
+ tableId: '104002Table3',
+ tableName: 'BOM副产品表',
+ 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: 104002,
+ serialNumber: '104002Table3PrintUnitName',
+ tableId: '104002Table3',
+ tableName: 'BOM副产品表',
+ 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: 104002,
+ serialNumber: '104002Table3IssueType',
+ tableId: '104002Table3',
+ tableName: 'BOM副产品表',
+ columnProp: 'issueType',
+ 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: 104002,
+ serialNumber: '104002Table3OperationDesc',
+ tableId: '104002Table3',
+ tableName: 'BOM副产品表',
+ columnProp: 'operationId',
+ 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: 104002,
+ serialNumber: '104002Table3IssueToLoc',
+ tableId: '104002Table3',
+ tableName: 'BOM副产品表',
+ 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: 104002,
+ serialNumber: '104002Table3NoteText',
+ tableId: '104002Table3',
+ tableName: 'BOM副产品表',
+ columnProp: 'noteText',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: '备注',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 150
+ },
+ ],
operationDetailList: [
{
columnProp: 'routingRevision',
@@ -2070,6 +2295,13 @@ export default {
message: ' ',
trigger: ['blur','change']
}
+ ],
+ consumptionItem: [
+ {
+ required: true,
+ message: ' ',
+ trigger: ['blur','change']
+ }
]
},
// ======== 复选数据集 ========
@@ -2457,6 +2689,7 @@ export default {
noteText: '',
createBy: this.$store.state.user.name,
lineSequence: '',
+ consumptionItem: 'Consumed',
productFlag: 'component'
}
// 获取子料的序号
@@ -2506,6 +2739,7 @@ export default {
noteText: '',
createBy: this.$store.state.user.name,
lineSequence: '',
+ consumptionItem: '',
productFlag: 'byProduct'
}
// 获取子料的序号
@@ -2551,6 +2785,7 @@ export default {
noteText: row.noteText,
updateBy: this.$store.state.user.name,
lineSequence: row.lineSequence,
+ consumptionItem: row.consumptionItem,
productFlag: 'component'
}
this.componentDisableFlag = true
@@ -2586,6 +2821,7 @@ export default {
noteText: row.noteText,
updateBy: this.$store.state.user.name,
lineSequence: row.lineSequence,
+ consumptionItem: row.consumptionItem,
productFlag: 'byProduct'
}
this.componentDisableFlag = true
@@ -3103,6 +3339,10 @@ export default {
this.$message.warning('请选择子物料编码!')
return
}
+ if (this.componentData.productFlag === 'component' && (this.componentData.consumptionItem === '' || this.componentData.consumptionItem == null)) {
+ this.$message.warning('请选择消耗项目!')
+ return
+ }
if (this.componentData.qtyPerAssembly === '' || this.componentData.qtyPerAssembly == null) {
this.$message.warning('请填写单位用量!')
return
@@ -3138,7 +3378,11 @@ export default {
this.byProductList = data.rows.byProductList
this.manufStructCostDistribList = data.rows.manufStructCostDistribList
if (isClose) {
- this.saveComponentModal()
+ if (this.subDetailTable === 'by_products') {
+ this.saveByProductModal()
+ } else {
+ this.saveComponentModal()
+ }
} else {
this.componentSaveModal = false
}
@@ -3769,6 +4013,7 @@ export default {
-moz-appearance: textfield;
padding-right: 5px !important;
}
+
diff --git a/src/views/modules/part/recipeManagement.vue b/src/views/modules/part/recipeManagement.vue
index 66b7292..8c1404e 100644
--- a/src/views/modules/part/recipeManagement.vue
+++ b/src/views/modules/part/recipeManagement.vue
@@ -89,9 +89,9 @@
- 物料编码
- 物料编码
-
+ 物料编码
+ 物料编码
+
@@ -99,11 +99,11 @@
-
-
+
+
-
-
+
+
@@ -114,7 +114,7 @@
-
-
+
+
- 保存
- Copy
+ 保存
+ Copy
@@ -151,21 +151,22 @@
-
+
- 新增
- 删除
- 编辑
+ 新增
+ 删除
+ 编辑
Copy
- Buildable
- Obsolete
+ Build
+ Retire
+ 转正式配方
-
+
-
-
-
-
-
@@ -197,12 +193,12 @@
-
+
- 新增
- 删除
+ 新增
+ 删除
- 编辑
+ 编辑
+
+
+
+
+
+
+
+
+
+ 新增
+ 删除
+
+
+
+
+
+
+ {{scope.row[item.columnProp]}}
+
+
+
+
+
+ 编辑
+
+
+
+
+
+
+
+
+
+
+ {{scope.row[item.columnProp]}}
+
+
+
+
+
+ 编辑
+
+
+
+
+
+
+
+
+
+
+ {{scope.row[item.columnProp]}}
+
@@ -329,6 +430,12 @@
+
+
+
+
+
+
查询
@@ -367,15 +474,21 @@
- 子物料编码
+ 子物料编码
子物料编码
-
+
-
+
-
+
+
+
+
+
+
+
@@ -389,12 +502,12 @@
- 工序
-
+ 工序
+
发料库位
-
+
@@ -410,17 +523,66 @@
- 保存
+ 应用
+ 保存
关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 关闭
+
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
查询
@@ -471,7 +633,7 @@
-
+
@@ -519,10 +681,10 @@
-
+
-
-
+
+
@@ -559,7 +721,7 @@
-
+
@@ -586,10 +748,10 @@
-
+
-
-
+
+
@@ -636,7 +798,13 @@ import {
getRecipeEngChgLevel, // 获取物料的recipe版本号
getComponentLineSequence, // 获取子料的序号
copyRecipe, // 复制recipe
- copyAlternative, // 复制alternative
+ copyAlternative, // 复制alternative,
+ toBecomeOfficialRecipe, // 转正式Recipe
+ updateManufStructCostDistrib, // 新编辑副产品成本分配
+ queryRecipeComponentTable, // 刷新子物料
+ queryRecipeByProductTable, // 刷新副产品
+ queryManufStructCostDistribtionTable, // 刷新项目成本分配
+ queryMultiLevelStructureTable, // 刷新多级别结构
} from '@/api/part/recipeManagement.js'
import ChooseList from '@/views/modules/common/Chooselist'
import dayjs from "dayjs";
@@ -655,11 +823,41 @@ export default {
this.searchData.partNo = this.searchData.partNo.toUpperCase()
}
},
+ modalData: {
+ deep: true,
+ handler: function (newV, oldV) {
+ this.modalData.partNo = this.modalData.partNo.toUpperCase()
+ }
+ },
saveDetailData: {
deep: true,
handler: function (newV, oldV) {
this.saveDetailData.alternativeNo = this.saveDetailData.alternativeNo.toUpperCase()
}
+ },
+ componentData: {
+ deep: true,
+ handler: function (newV, oldV) {
+ this.componentData.componentPart = this.componentData.componentPart.toUpperCase()
+ }
+ },
+ copyRecipeData: {
+ deep: true,
+ handler: function (newV, oldV) {
+ this.copyRecipeData.partNo = this.copyRecipeData.partNo.toUpperCase()
+ }
+ },
+ copyAlternativeData: {
+ deep: true,
+ handler: function (newV, oldV) {
+ this.copyAlternativeData.partNo = this.copyAlternativeData.partNo.toUpperCase()
+ }
+ },
+ partData: {
+ deep: true,
+ handler: function (newV, oldV) {
+ this.partData.partNo = this.partData.partNo.toUpperCase()
+ }
}
},
// 对象
@@ -690,7 +888,6 @@ export default {
queryLoading: false,
saveHeaderLoading: false,
saveDetailLoading: false,
- saveComponentLoading: false,
saveAllLoading: false,
// 初始页签
detailTable: 'recipe_detail',
@@ -703,7 +900,7 @@ export default {
partNo: '',
partDesc: '',
engChgLevel: '',
- recipeType: '',
+ bomType: '',
noteText: '',
effPhaseInDate: '',
effPhaseOutDate: '',
@@ -716,12 +913,13 @@ export default {
updateBy: '',
printUnit: '',
printUnitName: '',
+ officialFlag: ''
},
detailData: {
site: this.$store.state.user.site,
partNo: '',
engChgLevel: '',
- recipeType: '',
+ bomType: '',
alternativeNo: '',
alternativeDescription: '',
minLotQty: '',
@@ -731,14 +929,15 @@ export default {
createDate: '',
createBy: '',
updateDate: '',
- updateBy: ''
+ updateBy: '',
+ officialFlag: 'N'
},
componentData: {
flag: '',
site: this.$store.state.user.site,
partNo: '',
engChgLevel: '',
- recipeType: '',
+ bomType: '',
alternativeNo: '',
componentPart: '',
componentPartDesc: '',
@@ -749,7 +948,7 @@ export default {
issueType: '',
shrinkageFactor: '',
lineItemNo: '',
- operationName: '',
+ operationId: '',
issueToLoc: '',
issueToLocName: '',
noteText: '',
@@ -757,7 +956,9 @@ export default {
createBy: '',
updateDate: '',
updateBy: '',
- lineSequence: ''
+ lineSequence: '',
+ consumptionItem: '',
+ productFlag: ''
},
partData: {
site: this.$store.state.user.site,
@@ -768,13 +969,14 @@ export default {
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
+ status: ''
},
saveDetailData: {
flag: '',
site: this.$store.state.user.site,
partNo: '',
engChgLevel: '',
- recipeType: '',
+ bomType: '',
alternativeNo: '',
alternativeDescription: '',
minLotQty: '',
@@ -784,28 +986,34 @@ export default {
createDate: '',
createBy: '',
updateDate: '',
- updateBy: ''
+ updateBy: '',
+ officialFlag: ''
},
operationData: {
site: this.$store.state.user.site,
partNo: '',
+ routingRevision: '',
+ routingType: '',
+ alternativeNo: '',
+ operationNo: '',
operationName: '',
},
copyRecipeData: {
site: '',
partNo: '',
engChgLevel: '',
- recipeType: '',
+ bomType: '',
effPhaseInDate: '',
effPhaseOutDate: '',
previousVersion: {},
- createBy: ''
+ createBy: '',
+ officialFlag: ''
},
copyAlternativeData: {
site: '',
partNo: '',
engChgLevel: '',
- recipeType: '',
+ bomType: '',
alternativeNo: '',
alternativeDescription: '',
minLotQty: '',
@@ -813,7 +1021,23 @@ export default {
detailNoteText: '',
status: '',
previousVersion: {},
- createBy: ''
+ createBy: '',
+ officialFlag: ''
+ },
+ manufStructCostDistribData: {
+ site: '',
+ partNo: '',
+ engChgLevel: '',
+ bomType: '',
+ alternativeNo: '',
+ byProdLineItemNo: '',
+ componentLineItemNo: '',
+ componentPartNo: '',
+ componentPartDesc: '',
+ byProdPartNo: '',
+ byProdPartDesc: '',
+ itemCostDistribution: '',
+ updateBy: '',
},
// ======== 数据列表 ========
dataList: [],
@@ -821,9 +1045,13 @@ export default {
componentPartList: [],
componentPartSelections: [],
subDetailList: [],
+ byProductList: [],
+ manufStructCostDistribList: [],
detailDataList: [],
checkedDetail: [],
+ checkedByProduct: [],
operationList: [],
+ multiLevelStructureList: [],
// ======== 列表表头 ========
columnList: [
{
@@ -831,7 +1059,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table1PartNo',
tableId: '104002Table1',
- tableName: 'BOM信息表',
+ tableName: '配方信息表',
columnProp: 'partNo',
headerAlign: 'center',
align: 'center',
@@ -849,7 +1077,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table1PartDesc',
tableId: '104002Table1',
- tableName: 'BOM信息表',
+ tableName: '配方信息表',
columnProp: 'partDesc',
headerAlign: 'center',
align: 'left',
@@ -865,10 +1093,10 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 104002,
- serialNumber: '104002Table1RecipeType',
+ serialNumber: '104002Table1BomType',
tableId: '104002Table1',
- tableName: 'BOM信息表',
- columnProp: 'recipeType',
+ tableName: '配方信息表',
+ columnProp: 'bomType',
headerAlign: 'center',
align: 'center',
columnLabel: '制造类型',
@@ -885,11 +1113,11 @@ export default {
functionId: 104002,
serialNumber: '104002Table1EngChgLevel',
tableId: '104002Table1',
- tableName: 'BOM信息表',
+ tableName: '配方信息表',
columnProp: 'engChgLevel',
headerAlign: 'center',
align: 'center',
- columnLabel: 'BOM版本号',
+ columnLabel: '配方版本号',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -903,7 +1131,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table1engRevision',
tableId: '104002Table1',
- tableName: 'BOM信息表',
+ tableName: '配方信息表',
columnProp: 'engRevision',
headerAlign: 'center',
align: 'center',
@@ -921,7 +1149,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table1NetWeight',
tableId: '104002Table1',
- tableName: 'BOM信息表',
+ tableName: '配方信息表',
columnProp: 'netWeight',
headerAlign: 'center',
align: 'right',
@@ -939,7 +1167,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table1EffPhaseInDate',
tableId: '104002Table1',
- tableName: 'BOM信息表',
+ tableName: '配方信息表',
columnProp: 'effPhaseInDate',
headerAlign: 'center',
align: 'center',
@@ -957,7 +1185,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table1EffPhaseOutDate',
tableId: '104002Table1',
- tableName: 'BOM信息表',
+ tableName: '配方信息表',
columnProp: 'effPhaseOutDate',
headerAlign: 'center',
align: 'center',
@@ -975,7 +1203,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table1CreateDate',
tableId: '104002Table1',
- tableName: 'BOM信息表',
+ tableName: '配方信息表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
@@ -993,7 +1221,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table1CreateBy',
tableId: '104002Table1',
- tableName: 'BOM信息表',
+ tableName: '配方信息表',
columnProp: 'createBy',
headerAlign: 'center',
align: 'center',
@@ -1011,7 +1239,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table1UpdateDate',
tableId: '104002Table1',
- tableName: 'BOM信息表',
+ tableName: '配方信息表',
columnProp: 'updateDate',
headerAlign: 'center',
align: 'center',
@@ -1029,7 +1257,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table1UpdateBy',
tableId: '104002Table1',
- tableName: 'BOM信息表',
+ tableName: '配方信息表',
columnProp: 'updateBy',
headerAlign: 'center',
align: 'center',
@@ -1059,12 +1287,20 @@ export default {
{
columnProp: 'partDesc',
headerAlign: "center",
- align: "center",
+ align: "left",
columnLabel: '物料名称',
columnHidden: false,
columnImage: false,
- columnSortable: false,
- sortLv: 0,
+ status: true,
+ fixed: '',
+ },
+ {
+ columnProp: 'partType',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '零件类型',
+ columnHidden: false,
+ columnImage: false,
status: true,
fixed: '',
},
@@ -1075,8 +1311,6 @@ export default {
columnLabel: '规格型号',
columnHidden: false,
columnImage: false,
- columnSortable: false,
- sortLv: 0,
status: true,
fixed: '',
},
@@ -1087,8 +1321,6 @@ export default {
columnLabel: '计量单位',
columnHidden: false,
columnImage: false,
- columnSortable: false,
- sortLv: 0,
status: true,
fixed: '',
},
@@ -1101,20 +1333,26 @@ export default {
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
- columnSortable: false,
- sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'partDesc',
headerAlign: "center",
- align: "center",
+ align: "left",
columnLabel: '物料名称',
columnHidden: false,
columnImage: false,
- columnSortable: false,
- sortLv: 0,
+ status: true,
+ fixed: '',
+ },
+ {
+ columnProp: 'partType',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '零件类型',
+ columnHidden: false,
+ columnImage: false,
status: true,
fixed: '',
},
@@ -1125,8 +1363,6 @@ export default {
columnLabel: '规格型号',
columnHidden: false,
columnImage: false,
- columnSortable: false,
- sortLv: 0,
status: true,
fixed: '',
},
@@ -1137,8 +1373,6 @@ export default {
columnLabel: '计量单位',
columnHidden: false,
columnImage: false,
- columnSortable: false,
- sortLv: 0,
status: true,
fixed: '',
},
@@ -1149,7 +1383,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table2LineSequence',
tableId: '104002Table2',
- tableName: 'BOM子物料表',
+ tableName: '配方子物料表',
columnProp: 'lineSequence',
headerAlign: 'center',
align: 'center',
@@ -1167,7 +1401,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table2ComponentPart',
tableId: '104002Table2',
- tableName: 'BOM子物料表',
+ tableName: '配方子物料表',
columnProp: 'componentPart',
headerAlign: 'center',
align: 'center',
@@ -1185,7 +1419,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table2ComponentPartDesc',
tableId: '104002Table2',
- tableName: 'BOM子物料表',
+ tableName: '配方子物料表',
columnProp: 'componentPartDesc',
headerAlign: 'center',
align: 'left',
@@ -1203,7 +1437,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table2QtyPerAssembly',
tableId: '104002Table2',
- tableName: 'BOM子物料表',
+ tableName: '配方子物料表',
columnProp: 'qtyPerAssembly',
headerAlign: 'center',
align: 'right',
@@ -1221,7 +1455,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table2ComponentScrap',
tableId: '104002Table2',
- tableName: 'BOM子物料表',
+ tableName: '配方子物料表',
columnProp: 'componentScrap',
headerAlign: 'center',
align: 'right',
@@ -1239,7 +1473,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table2ShrinkageFactor',
tableId: '104002Table2',
- tableName: 'BOM子物料表',
+ tableName: '配方子物料表',
columnProp: 'shrinkageFactor',
headerAlign: 'center',
align: 'right',
@@ -1252,12 +1486,30 @@ export default {
fixed: '',
columnWidth: 80
},
+ {
+ userId: this.$store.state.user.name,
+ functionId: 104002,
+ serialNumber: '104002Table2ConsumptionItem',
+ tableId: '104002Table2',
+ tableName: '配方子物料表',
+ columnProp: 'consumptionItem',
+ 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: 104002,
serialNumber: '104002Table2PrintUnitName',
tableId: '104002Table2',
- tableName: 'BOM子物料表',
+ tableName: '配方子物料表',
columnProp: 'printUnitName',
headerAlign: 'center',
align: 'center',
@@ -1275,8 +1527,8 @@ export default {
functionId: 104002,
serialNumber: '104002Table2IssueType',
tableId: '104002Table2',
- tableName: 'BOM子物料表',
- columnProp: 'issueTypeName',
+ tableName: '配方子物料表',
+ columnProp: 'issueType',
headerAlign: 'center',
align: 'center',
columnLabel: '生产属性',
@@ -1293,8 +1545,8 @@ export default {
functionId: 104002,
serialNumber: '104002Table2OperationDesc',
tableId: '104002Table2',
- tableName: 'BOM子物料表',
- columnProp: 'operationName',
+ tableName: '配方子物料表',
+ columnProp: 'operationId',
headerAlign: 'center',
align: 'center',
columnLabel: '工序',
@@ -1311,7 +1563,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table2IssueToLoc',
tableId: '104002Table2',
- tableName: 'BOM子物料表',
+ tableName: '配方子物料表',
columnProp: 'issueToLocName',
headerAlign: 'center',
align: 'center',
@@ -1329,7 +1581,7 @@ export default {
functionId: 104002,
serialNumber: '104002Table2NoteText',
tableId: '104002Table2',
- tableName: 'BOM子物料表',
+ tableName: '配方子物料表',
columnProp: 'noteText',
headerAlign: 'center',
align: 'left',
@@ -1340,59 +1592,597 @@ export default {
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 150
+ columnWidth: 150
+ },
+ ],
+ columnSubDetailList2: [
+ {
+ userId: this.$store.state.user.name,
+ functionId: 104002,
+ serialNumber: '104002Table3LineSequence',
+ tableId: '104002Table3',
+ tableName: '配方副产品表',
+ columnProp: 'lineSequence',
+ 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: 104002,
+ serialNumber: '104002Table3ComponentPart',
+ tableId: '104002Table3',
+ tableName: '配方副产品表',
+ 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: 104002,
+ serialNumber: '104002Table3ComponentPartDesc',
+ tableId: '104002Table3',
+ tableName: '配方副产品表',
+ columnProp: 'componentPartDesc',
+ 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: 104002,
+ serialNumber: '104002Table3QtyPerAssembly',
+ tableId: '104002Table3',
+ tableName: '配方副产品表',
+ 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: 104002,
+ serialNumber: '104002Table3ComponentScrap',
+ tableId: '104002Table3',
+ tableName: '配方副产品表',
+ 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: 104002,
+ serialNumber: '104002Table3ShrinkageFactor',
+ tableId: '104002Table3',
+ tableName: '配方副产品表',
+ 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: 104002,
+ serialNumber: '104002Table3PrintUnitName',
+ tableId: '104002Table3',
+ tableName: '配方副产品表',
+ 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: 104002,
+ serialNumber: '104002Table3IssueType',
+ tableId: '104002Table3',
+ tableName: '配方副产品表',
+ columnProp: 'issueType',
+ 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: 104002,
+ serialNumber: '104002Table3OperationDesc',
+ tableId: '104002Table3',
+ tableName: '配方副产品表',
+ columnProp: 'operationId',
+ 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: 104002,
+ serialNumber: '104002Table3IssueToLoc',
+ tableId: '104002Table3',
+ tableName: '配方副产品表',
+ 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: 104002,
+ serialNumber: '104002Table3NoteText',
+ tableId: '104002Table3',
+ tableName: '配方副产品表',
+ columnProp: 'noteText',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: '备注',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 150
+ },
+ ],
+ operationDetailList: [
+ {
+ columnProp: 'routingRevision',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: 'Routing版本号',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ columnProp: 'routingType',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '工艺类型',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ columnProp: 'alternativeNo',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '替代编码',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },
+ {
+ columnProp: 'alternativeDescription',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '替代名称',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ columnProp: 'status',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '替代状态',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },
+ {
+ columnProp: 'operationNo',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '工序编码',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },
+ {
+ columnProp: 'operationName',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '工序名称',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ }
+ ],
+ columnRecipeDetailList: [
+ {
+ columnProp: 'alternativeNo',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '替代编码',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ {
+ columnProp: 'alternativeDescription',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '替代名称',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ {
+ columnProp: 'status',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '状态',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ },
+ ],
+ columnManufStructCostDistribList: [
+ {
+ columnProp: 'byProdLineItemNo',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '副产品行项目号',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 60
+ },
+ {
+ columnProp: 'byProdPartNo',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '副产品物料编码',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 120
+ },
+ {
+ columnProp: 'byProdPartDesc',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '副产品物料名称',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 150
+ },
+ {
+ columnProp: 'componentLineItemNo',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '子物料项目号',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 60
+ },
+ {
+ columnProp: 'componentPartNo',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '子物料编码',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 120
+ },
+ {
+ columnProp: 'componentPartDesc',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '子物料名称',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 150
+ },
+ {
+ columnProp: 'itemCostDistribution',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '项目成本分配因素',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 60
+ },
+ ],
+ columnMultiLevelStructureList: [
+ {
+ columnProp: 'partNo',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '物料编码',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ columnProp: 'partDesc',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '物料名称',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 150
+ },
+ {
+ columnProp: 'engChgLevel',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '配方版本号',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },
+ {
+ columnProp: 'bomType',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '制造类型',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ columnProp: 'alternativeNo',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '替代编码',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ columnProp: 'alternativeDescription',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '替代名称',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 150
+ },
+ {
+ columnProp: 'componentPart',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '子物料编码',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ columnProp: 'componentPartDesc',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '子物料名称',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 150
+ },
+ {
+ columnProp: 'qtyPerAssembly',
+ headerAlign: "center",
+ align: "right",
+ columnLabel: '单位用量',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 60
+ },
+ {
+ columnProp: 'printUnitName',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '计量单位',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },
+ {
+ columnProp: 'productGroupName4',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '计划人',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ columnProp: 'minOrderQty',
+ headerAlign: "center",
+ align: "right",
+ columnLabel: '最小批量',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 60
+ },
+ {
+ columnProp: 'mulOrderQty',
+ headerAlign: "center",
+ align: "right",
+ columnLabel: '多种批量大小',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 60
+ },
+ {
+ columnProp: 'planningMethod',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '计划方法',
+ columnHidden: false,
+ columnImage: false,
+ status: true,
+ fixed: '',
+ columnWidth: 100
},
- ],
- operationDetailList: [
{
- columnProp: 'operationName',
+ columnProp: 'cumLeadTime',
headerAlign: "center",
- align: "center",
- columnLabel: '工序名称',
+ align: "right",
+ columnLabel: '父级累计提前期',
columnHidden: false,
columnImage: false,
- columnSortable: false,
- sortLv: 0,
status: true,
fixed: '',
- }
- ],
- columnRecipeDetailList: [
+ columnWidth: 100
+ },
{
- columnProp: 'alternativeNo',
+ columnProp: 'unprotectedLeadTime',
headerAlign: "center",
- align: "center",
- columnLabel: '替代编码',
+ align: "right",
+ columnLabel: '父级未受保护提前期',
columnHidden: false,
columnImage: false,
- columnSortable: false,
- sortLv: 0,
status: true,
fixed: '',
+ columnWidth: 100
},
{
- columnProp: 'alternativeDescription',
+ columnProp: 'componentCumLeadTime',
headerAlign: "center",
- align: "center",
- columnLabel: '替代名称',
+ align: "right",
+ columnLabel: '子物料累计提前期',
columnHidden: false,
columnImage: false,
- columnSortable: false,
- sortLv: 0,
status: true,
fixed: '',
+ columnWidth: 100
},
{
- columnProp: 'status',
+ columnProp: 'componentUnprotectedLeadTime',
headerAlign: "center",
- align: "center",
- columnLabel: '状态',
+ align: "right",
+ columnLabel: '子物料未受保护提前期',
columnHidden: false,
columnImage: false,
- columnSortable: false,
- sortLv: 0,
status: true,
fixed: '',
+ columnWidth: 100
},
],
// ======== 必填规则 ========
@@ -1401,35 +2191,35 @@ export default {
{
required: true,
message: ' ',
- trigger: 'change'
+ trigger: ['blur','change']
}
],
partDesc: [
{
required: true,
message: ' ',
- trigger: 'change'
+ trigger: ['blur','change']
}
],
- recipeType: [
+ bomType: [
{
required: true,
message: ' ',
- trigger: 'change'
+ trigger: ['blur','change']
}
],
effPhaseInDate: [
{
required: true,
message: ' ',
- trigger: 'change'
+ trigger: ['blur','change']
}
],
engChgLevel: [
{
required: true,
message: ' ',
- trigger: 'change'
+ trigger: ['blur','change']
}
]
},
@@ -1438,28 +2228,28 @@ export default {
{
required: true,
message: ' ',
- trigger: 'change'
+ trigger: ['blur','change']
}
],
alternativeDescription: [
{
required: true,
message: ' ',
- trigger: 'change'
+ trigger: ['blur','change']
}
],
minLotQty: [
{
required: true,
message: ' ',
- trigger: 'change'
+ trigger: ['blur','change']
}
],
status: [
{
required: true,
message: ' ',
- trigger: 'change'
+ trigger: ['blur','change']
}
]
},
@@ -1468,42 +2258,49 @@ export default {
{
required: true,
message: ' ',
- trigger: 'change'
+ trigger: ['blur','change']
}
],
lineSequence: [
{
required: true,
message: ' ',
- trigger: 'change'
+ trigger: ['blur','change']
}
],
qtyPerAssembly: [
{
required: true,
message: ' ',
- trigger: 'change'
+ trigger: ['blur','change']
}
],
componentScrap: [
{
required: true,
message: ' ',
- trigger: 'change'
+ trigger: ['blur','change']
}
],
shrinkageFactor: [
{
required: true,
message: ' ',
- trigger: 'change'
+ trigger: ['blur','change']
}
],
issueType: [
{
required: true,
message: ' ',
- trigger: 'change'
+ trigger: ['blur','change']
+ }
+ ],
+ consumptionItem: [
+ {
+ required: true,
+ message: ' ',
+ trigger: ['blur','change']
}
]
},
@@ -1520,7 +2317,9 @@ export default {
componentDisableFlag: false,
operationModelFlag: false,
copyRecipeModelFlag: false,
- copyAlternativeModelFlag: false
+ copyAlternativeModelFlag: false,
+ headerSaveFlag: false,
+ manufStructCostDistribModal: false
}
},
@@ -1593,9 +2392,48 @@ export default {
*/
refreshSubDetailTable () {
if (this.subDetailTable === 'recipe_sub_detail') {
-
+ this.queryRecipeComponentTable()
+ } else if (this.subDetailTable === 'by_products') {
+ this.queryRecipeByProductTable()
+ } else if (this.subDetailTable === 'manuf_struct_cost_distribtion') {
+ this.queryManufStructCostDistribtionTable()
+ } else if (this.subDetailTable === 'multi_level_structure') {
+ this.queryMultiLevelStructureTable()
}
},
+ // 刷新方法
+ queryRecipeComponentTable () {
+ queryRecipeComponentTable(this.detailData).then(({data}) => {
+ if (data.code === 0) {
+ this.subDetailList = data.rows
+ }
+ })
+ },
+ // 刷新方法
+ queryRecipeByProductTable () {
+ queryRecipeByProductTable(this.detailData).then(({data}) => {
+ if (data.code === 0) {
+ this.byProductList = data.rows
+
+ }
+ })
+ },
+ // 刷新方法
+ queryManufStructCostDistribtionTable () {
+ queryManufStructCostDistribtionTable(this.detailData).then(({data}) => {
+ if (data.code === 0) {
+ this.manufStructCostDistribList = data.rows
+ }
+ })
+ },
+ // 刷新方法
+ queryMultiLevelStructureTable () {
+ queryMultiLevelStructureTable(this.detailData).then(({data}) => {
+ if (data.code === 0) {
+ this.multiLevelStructureList = data.rows
+ }
+ })
+ },
// ======== 列表数据操作方法 ========
/**
@@ -1644,7 +2482,7 @@ export default {
partNo: '',
partDesc: '',
engChgLevel: '',
- recipeType: 'Manufacturing',
+ bomType: 'Manufacturing',
noteText: '',
effPhaseInDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
effPhaseOutDate: '',
@@ -1654,12 +2492,13 @@ export default {
createBy: this.$store.state.user.name,
printUnit: '',
printUnitName: '',
+ officialFlag: 'N'
}
this.detailData = {
site: this.$store.state.user.site,
partNo: '',
engChgLevel: '',
- recipeType: '',
+ bomType: '',
alternativeNo: '',
alternativeDescription: '',
minLotQty: '',
@@ -1669,9 +2508,14 @@ 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.byProductList = []
+ this.manufStructCostDistribList = []
+ this.headerSaveFlag = true
this.modalDisableFlag = false
this.modalFlag = true
},
@@ -1685,7 +2529,7 @@ export default {
partNo: row.partNo,
partDesc: row.partDesc,
engChgLevel: row.engChgLevel,
- recipeType: row.recipeType,
+ bomType: row.bomType,
noteText: row.noteText,
effPhaseInDate: row.effPhaseInDate,
effPhaseOutDate: row.effPhaseOutDate,
@@ -1695,12 +2539,17 @@ export default {
updateBy: this.$store.state.user.name,
printUnit: row.printUnit,
printUnitName: row.printUnitName,
+ officialFlag: row.officialFlag
}
+ this.subDetailTable = 'recipe_sub_detail'
// 查recipe明细
queryRecipeDetail(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.detailDataList = data.rows.detailList
this.subDetailList = data.rows.componentList
+ this.byProductList = data.rows.byProductList
+ this.manufStructCostDistribList = data.rows.manufStructCostDistribList
+ this.multiLevelStructureList = data.rows.multiLevelStructureList
this.detailData = data.rows.detailData
this.modalDisableFlag = true
this.modalFlag = true
@@ -1716,14 +2565,14 @@ export default {
*/
saveRecipeDetail () {
if (this.modalData.partNo === '' || this.modalData.partNo == null) {
- this.$message.warning('请先选择Recipe物料!')
+ this.$message.warning('请先选择配方物料!')
return
}
if (this.modalData.engChgLevel === '' || this.modalData.engChgLevel == null) {
- this.$message.warning('请先填写Recipe版本号!')
+ this.$message.warning('请先填写配方版本号!')
return
}
- if (this.modalData.recipeType === '' || this.modalData.recipeType == null) {
+ if (this.modalData.bomType === '' || this.modalData.bomType == null) {
this.$message.warning('请先选择制造类型!')
return
}
@@ -1732,7 +2581,7 @@ export default {
site: this.$store.state.user.site,
partNo: this.modalData.partNo,
engChgLevel: this.modalData.engChgLevel,
- recipeType: this.modalData.recipeType,
+ bomType: this.modalData.bomType,
alternativeNo: '',
alternativeDescription: '',
minLotQty: 0,
@@ -1741,6 +2590,7 @@ export default {
status: 'Tentative',
createDate: '',
createBy: this.$store.state.user.name,
+ officialFlag: 'N'
}
// 查询recipe主信息
queryRecipeHeader(this.modalData).then(({data}) => {
@@ -1749,7 +2599,7 @@ export default {
this.saveDetailModalFlag = true
this.saveDetailModalDisable = false
} else {
- this.$message.warning('请先保存BOM主记录!')
+ this.$message.warning('请先保存配方主记录!')
}
} else {
this.$alert(data.msg, '提示', {
@@ -1763,14 +2613,14 @@ export default {
*/
updateRecipeDetail () {
if (this.modalData.partNo === '' || this.modalData.partNo == null) {
- this.$message.warning('请先选择Recipe物料!')
+ this.$message.warning('请先选择配方物料!')
return
}
if (this.modalData.engChgLevel === '' || this.modalData.engChgLevel == null) {
- this.$message.warning('请先填写Recipe版本号!')
+ this.$message.warning('请先填写配方版本号!')
return
}
- if (this.modalData.recipeType === '' || this.modalData.recipeType == null) {
+ if (this.modalData.bomType === '' || this.modalData.bomType == null) {
this.$message.warning('请先选择制造类型!')
return
}
@@ -1779,7 +2629,7 @@ export default {
site: this.detailData.site,
partNo: this.detailData.partNo,
engChgLevel: this.detailData.engChgLevel,
- recipeType: this.detailData.recipeType,
+ bomType: this.detailData.bomType,
alternativeNo: this.detailData.alternativeNo,
alternativeDescription: this.detailData.alternativeDescription,
minLotQty: this.detailData.minLotQty,
@@ -1787,6 +2637,7 @@ export default {
detailNoteText: this.detailData.detailNoteText,
status: this.detailData.status,
updateBy: this.$store.state.user.name,
+ officialFlag: this.detailData.officialFlag
}
// 查询recipe主信息
queryRecipeHeader(this.modalData).then(({data}) => {
@@ -1795,7 +2646,7 @@ export default {
this.saveDetailModalFlag = true
this.saveDetailModalDisable = true
} else {
- this.$message.warning('请先保存BOM主记录!')
+ this.$message.warning('请先保存配方主记录!')
}
} else {
this.$alert(data.msg, '提示', {
@@ -1821,7 +2672,7 @@ export default {
site: this.$store.state.user.site,
partNo: this.modalData.partNo,
engChgLevel: this.modalData.engChgLevel,
- recipeType: this.modalData.recipeType,
+ bomType: this.modalData.bomType,
alternativeNo: this.detailData.alternativeNo,
componentPart: '',
componentPartDesc: '',
@@ -1832,12 +2683,64 @@ export default {
issueType: 'Reserve and Backflush',
shrinkageFactor: 0,
lineItemNo: '',
- operationName: '',
+ operationId: '',
+ issueToLoc: '',
+ issueToLocName: '',
+ noteText: '',
+ createBy: this.$store.state.user.name,
+ lineSequence: '',
+ consumptionItem: 'Consumed',
+ productFlag: 'component'
+ }
+ // 获取子料的序号
+ getComponentLineSequence(this.componentData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.componentData.lineSequence = data.lineSequence
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ this.componentDisableFlag = false
+ this.componentSaveModal = true
+ },
+ /**
+ * 副产品新增模态框
+ */
+ saveByProductModal () {
+ if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) {
+ 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,
+ partNo: this.modalData.partNo,
+ engChgLevel: this.modalData.engChgLevel,
+ bomType: this.modalData.bomType,
+ alternativeNo: this.detailData.alternativeNo,
+ componentPart: '',
+ componentPartDesc: '',
+ printUnit: '',
+ printUnitName: '',
+ qtyPerAssembly: 0,
+ componentScrap: 0,
+ issueType: 'Reserve and Backflush',
+ shrinkageFactor: 0,
+ lineItemNo: '',
+ operationId: '',
issueToLoc: '',
issueToLocName: '',
noteText: '',
createBy: this.$store.state.user.name,
- lineSequence: ''
+ lineSequence: '',
+ consumptionItem: '',
+ productFlag: 'byProduct'
}
// 获取子料的序号
getComponentLineSequence(this.componentData).then(({data}) => {
@@ -1865,7 +2768,7 @@ export default {
site: row.site,
partNo: row.partNo,
engChgLevel: row.engChgLevel,
- recipeType: row.recipeType,
+ bomType: row.bomType,
alternativeNo: row.alternativeNo,
componentPart: row.componentPart,
componentPartDesc: row.componentPartDesc,
@@ -1876,16 +2779,79 @@ 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,
updateBy: this.$store.state.user.name,
- lineSequence: row.lineSequence
+ lineSequence: row.lineSequence,
+ consumptionItem: row.consumptionItem,
+ productFlag: 'component'
}
this.componentDisableFlag = true
this.componentSaveModal = true
},
+ /**
+ * 副产品编辑模态框
+ */
+ updateByProductModal (row) {
+ if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
+ this.$message.warning('不可编辑的替代状态!')
+ return
+ }
+ this.componentData = {
+ flag: '2',
+ site: row.site,
+ partNo: row.partNo,
+ engChgLevel: row.engChgLevel,
+ bomType: row.bomType,
+ alternativeNo: row.alternativeNo,
+ componentPart: row.componentPart,
+ componentPartDesc: row.componentPartDesc,
+ printUnit: row.printUnit,
+ printUnitName: row.printUnitName,
+ qtyPerAssembly: row.qtyPerAssembly,
+ componentScrap: row.componentScrap,
+ issueType: row.issueType,
+ shrinkageFactor: row.shrinkageFactor,
+ lineItemNo: row.lineItemNo,
+ operationId: row.operationId,
+ issueToLoc: row.issueToLoc,
+ issueToLocName: row.issueToLocName,
+ noteText: row.noteText,
+ updateBy: this.$store.state.user.name,
+ lineSequence: row.lineSequence,
+ consumptionItem: row.consumptionItem,
+ productFlag: 'byProduct'
+ }
+ this.componentDisableFlag = true
+ this.componentSaveModal = true
+ },
+ /**
+ * 副产品成本分配编辑模态框
+ */
+ updateManufStructCostDistribModal (row) {
+ if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
+ this.$message.warning('不可编辑的替代状态!')
+ return
+ }
+ this.manufStructCostDistribData = {
+ site: row.site,
+ partNo: row.partNo,
+ engChgLevel: row.engChgLevel,
+ bomType: row.bomType,
+ alternativeNo: row.alternativeNo,
+ byProdLineItemNo: row.byProdLineItemNo,
+ componentLineItemNo: row.componentLineItemNo,
+ componentPartNo: row.componentPartNo,
+ componentPartDesc: row.componentPartDesc,
+ byProdPartNo: row.byProdPartNo,
+ byProdPartDesc: row.byProdPartDesc,
+ itemCostDistribution: row.itemCostDistribution,
+ updateBy: this.$store.state.user.name,
+ }
+ this.manufStructCostDistribModal = true
+ },
// ======== 新增/编辑/删除方法 ========
@@ -1901,7 +2867,7 @@ export default {
this.$message.warning('请选择物料名称!')
return
}
- if (this.modalData.recipeType === '' || this.modalData.recipeType == null) {
+ if (this.modalData.bomType === '' || this.modalData.bomType == null) {
this.$message.warning('请选择制造类型!')
return
}
@@ -1909,12 +2875,8 @@ 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版本号!')
+ this.$message.warning('请填写配方版本号!')
return
}
if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) {
@@ -1930,13 +2892,14 @@ export default {
partNo: this.modalData.partNo,
partDesc: this.modalData.partDesc,
engChgLevel: this.modalData.engChgLevel,
- recipeType: this.modalData.recipeType,
+ bomType: this.modalData.bomType,
noteText: this.modalData.noteText,
effPhaseInDate: this.modalData.effPhaseInDate,
effPhaseOutDate: this.modalData.effPhaseOutDate,
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,
@@ -1994,7 +2957,7 @@ export default {
// let tempArr = []
// tempArr.push(this.modalData)
// if (this.modalData.flag === '1') {
- // this.$confirm(`是否不保存且删除该条BOM记录?`, '提示', {
+ // this.$confirm(`是否不保存且删除该条配方记录?`, '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
@@ -2033,7 +2996,7 @@ export default {
// let tempArr = []
// tempArr.push(this.modalData)
// if (this.modalData.flag === '1') {
- // this.$confirm(`是否不保存且删除该条BOM记录?`, '提示', {
+ // this.$confirm(`是否不保存且删除该条配方记录?`, '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
@@ -2070,10 +3033,10 @@ export default {
*/
delModal () {
if (this.recipeSelections.length === 0) {
- this.$message.warning('请勾选要删除的BOM!')
+ this.$message.warning('请勾选要删除的配方!')
return
}
- this.$confirm(`是否删除这 `+ this.recipeSelections.length +` 条BOM?`, '提示', {
+ this.$confirm(`是否删除这 `+ this.recipeSelections.length +` 条配方?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -2115,6 +3078,25 @@ export default {
}
})
},
+
+ // 物料编码失焦事件
+ partNoBlur () {
+ this.partData.partNo = this.modalData.partNo
+ queryPartList(this.partData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.rows.length === 1) {
+ this.modalData.partDesc = data.rows[0].partDesc
+ this.modalData.printUnit = data.rows[0].printUnit
+ this.modalData.printUnitName = data.rows[0].printUnitName
+ } else {
+ this.modalData.partDesc = ''
+ this.modalData.printUnit = ''
+ this.modalData.printUnitName = ''
+ }
+ }
+ })
+ },
+
/**
* 双击选中物料
* @param row
@@ -2124,21 +3106,22 @@ export default {
this.modalData.partDesc = row.partDesc
this.modalData.printUnit = row.printUnit
this.modalData.printUnitName = row.printUnitName
- // 获取物料的recipe版本号
- getRecipeEngChgLevel(this.modalData).then(({data}) => {
- if (data && data.code === 0) {
- this.modalData.engChgLevel = data.engChgLevel
- } else {
- this.$alert(data.msg, '错误', {
- confirmButtonText: '确定'
- })
- }
- this.partModelFlag = false
- })
+ // // 获取物料的recipe版本号
+ // getRecipeEngChgLevel(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
},
// recipe类型改变
- recipeTypeChange () {
+ bomTypeChange () {
// 获取物料的recipe版本号
getRecipeEngChgLevel(this.modalData).then(({data}) => {
if (data && data.code === 0) {
@@ -2156,9 +3139,11 @@ export default {
* @param row
*/
getRowOperationData (row) {
+ this.componentData.operationId = row.operationId
this.componentData.operationName = row.operationName
this.operationModelFlag = false
},
+
getComponentRowData (row) {
this.componentData.componentPart = row.partNo
this.componentData.componentPartDesc = row.partDesc
@@ -2166,6 +3151,7 @@ export default {
this.componentData.printUnitName = row.printUnitName
this.componentPartModelFlag = false
},
+
/**
* 物料列表
*/
@@ -2182,21 +3168,44 @@ export default {
}
})
},
+
+ // 子物料编码失焦事件
+ componentPartBlur () {
+ this.componentPartData.partNo = this.componentData.componentPart
+ queryPartList(this.componentPartData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.rows.length === 1) {
+ this.componentData.componentPartDesc = data.rows[0].partDesc
+ this.componentData.printUnit = data.rows[0].printUnit
+ this.componentData.printUnitName = data.rows[0].printUnitName
+ } else {
+ this.componentData.componentPartDesc = ''
+ this.componentData.printUnit = ''
+ this.componentData.printUnitName = ''
+ }
+ }
+ })
+ },
+
/**
* 表格的新增
* @param row
* @param rowIndex
*/
rowClassName({ row, rowIndex }) {
- row.xh = rowIndex + 1;
+ row.xh = rowIndex + 1
},
/**
- * 单选框选中数据
+ * 选中数据
* @param selection
*/
componentSelectionChange(selection) {
this.checkedDetail = selection
},
+
+ byProductSelection (selection) {
+ this.checkedByProduct = selection
+ },
/**
* 删除子物料
*/
@@ -2207,7 +3216,7 @@ export default {
}
if (this.checkedDetail.length === 0) {
this.$message.warning('请选择要删除子物料!')
- return;
+ return
} else {
this.$confirm("请是否确认删除该子明细记录?", "提示", {
confirmButtonText: "确定",
@@ -2215,11 +3224,57 @@ export default {
type: "warning"
}).then(() => {
let tempData = {
- informationList: this.checkedDetail
+ informationList: this.checkedDetail,
+ productFlag: 'component'
+ }
+ deleteRecipeComponent(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.subDetailList = data.rows.subDetailList
+ this.byProductList = data.rows.byProductList
+ this.manufStructCostDistribList = data.rows.manufStructCostDistribList
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {}
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }).catch(() => {
+ })
+ }
+ },
+
+ /**
+ * 删除子物料
+ */
+ deleteByProduct () {
+ if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
+ this.$message.warning('不可编辑的替代状态!')
+ return
+ }
+ if (this.checkedByProduct.length === 0) {
+ this.$message.warning('请选择要删除副产品!')
+ return
+ } else {
+ this.$confirm("请是否确认删除该副产品记录?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ let tempData = {
+ informationList: this.checkedByProduct,
+ productFlag: 'byProduct'
}
deleteRecipeComponent(tempData).then(({data}) => {
if (data && data.code === 0) {
- this.subDetailList = data.rows
+ this.subDetailList = data.rows.subDetailList
+ this.byProductList = data.rows.byProductList
+ this.manufStructCostDistribList = data.rows.manufStructCostDistribList
this.$message({
message: '操作成功',
type: 'success',
@@ -2246,6 +3301,9 @@ export default {
componentClickRow (row) {
this.$refs.componentTable.toggleRowSelection(row)
},
+ byProductClickRow (row) {
+ this.$refs.byProductTable.toggleRowSelection(row)
+ },
// /**
// * 多选子物料
// * @param val
@@ -2260,7 +3318,7 @@ export default {
/**
* 新增子明细方法
*/
- componentDataSave () {
+ componentDataSave (isClose) {
if (this.componentData.lineSequence === '' || this.componentData.lineSequence == null) {
this.$message.warning('序号不能为空!')
return
@@ -2269,18 +3327,22 @@ export default {
this.$message.warning('请选择主记录物料编码!')
return
}
- if (this.componentData.recipeType === '' || this.componentData.recipeType == null) {
+ if (this.componentData.bomType === '' || this.componentData.bomType == null) {
this.$message.warning('请选择主记录制造类型!')
return
}
if (this.componentData.engChgLevel === '' || this.componentData.engChgLevel == null) {
- this.$message.warning('请填写主记录BOM版本号!')
+ this.$message.warning('请填写主记录配方版本号!')
return
}
if (this.componentData.componentPart === '' || this.componentData.componentPart == null) {
this.$message.warning('请选择子物料编码!')
return
}
+ if (this.componentData.productFlag === 'component' && (this.componentData.consumptionItem === '' || this.componentData.consumptionItem == null)) {
+ this.$message.warning('请选择消耗项目!')
+ return
+ }
if (this.componentData.qtyPerAssembly === '' || this.componentData.qtyPerAssembly == null) {
this.$message.warning('请填写单位用量!')
return
@@ -2310,11 +3372,20 @@ export default {
return
}
if (this.componentData.flag === '1') {
- this.saveComponentLoading = true
saveRecipeComponent(this.componentData).then(({data}) => {
if (data && data.code === 0) {
- this.subDetailList = data.rows
- this.componentSaveModal = false
+ this.subDetailList = data.rows.subDetailList
+ this.byProductList = data.rows.byProductList
+ this.manufStructCostDistribList = data.rows.manufStructCostDistribList
+ if (isClose) {
+ if (this.subDetailTable === 'by_products') {
+ this.saveByProductModal()
+ } else {
+ this.saveComponentModal()
+ }
+ } else {
+ this.componentSaveModal = false
+ }
this.$message({
message: '操作成功',
type: 'success',
@@ -2326,13 +3397,12 @@ export default {
confirmButtonText: '确定'
})
}
- this.saveComponentLoading = false
})
} else if (this.componentData.flag === '2') {
- this.saveComponentLoading = true
updateRecipeComponent(this.componentData).then(({data}) => {
if (data && data.code === 0) {
- this.subDetailList = data.rows
+ this.subDetailList = data.rows.subDetailList
+ this.byProductList = data.rows.byProductList
this.componentSaveModal = false
this.$message({
message: '操作成功',
@@ -2345,10 +3415,35 @@ export default {
confirmButtonText: '确定'
})
}
- this.saveComponentLoading = false
})
}
},
+
+ /**
+ * 编辑副产品成本分配方法
+ */
+ manufStructCostDistribUpdate () {
+ if (this.manufStructCostDistribData.shrinkageFactor < 0 || this.manufStructCostDistribData.shrinkageFactor > 1) {
+ this.$message.warning('项目成本分配系数必须介于0和1之间!')
+ return
+ }
+ updateManufStructCostDistrib(this.manufStructCostDistribData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.manufStructCostDistribList = data.rows.manufStructCostDistribList
+ this.manufStructCostDistribModal = false
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {}
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ },
/**
* 回车事件
*/
@@ -2368,14 +3463,14 @@ export default {
*/
saveRecipeHeader () {
if (this.modalData.partNo === '' || this.modalData.partNo == null) {
- this.$message.warning('请先选择Recipe物料!')
+ this.$message.warning('请先选择配方物料!')
return
}
if (this.modalData.engChgLevel === '' || this.modalData.engChgLevel == null) {
- this.$message.warning('请先填写Recipe版本号!')
+ this.$message.warning('请先填写配方版本号!')
return
}
- if (this.modalData.recipeType === '' || this.modalData.recipeType == null) {
+ if (this.modalData.bomType === '' || this.modalData.bomType == null) {
this.$message.warning('请先选择制造类型!')
return
}
@@ -2394,18 +3489,20 @@ export default {
partNo: data.rows.modalData.partNo,
partDesc: data.rows.modalData.partDesc,
engChgLevel: data.rows.modalData.engChgLevel,
- recipeType: data.rows.modalData.recipeType,
+ bomType: data.rows.modalData.bomType,
noteText: data.rows.modalData.noteText,
effPhaseInDate: data.rows.modalData.effPhaseInDate,
effPhaseOutDate: data.rows.modalData.effPhaseOutDate,
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
this.subDetailList = []
this.modalDisableFlag = true
+ this.headerSaveFlag = false
this.$message({
message: '操作成功',
type: 'success',
@@ -2428,11 +3525,12 @@ export default {
site: this.modalData.site,
partNo: this.modalData.partNo,
engChgLevel: this.modalData.engChgLevel + 1,
- recipeType: this.modalData.recipeType,
+ bomType: this.modalData.bomType,
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.copyRecipeModelFlag = true
},
@@ -2441,14 +3539,14 @@ export default {
*/
copyRecipe () {
if (this.copyRecipeData.partNo === '' || this.copyRecipeData.partNo == null) {
- this.$message.warning('请选择Recipe物料!')
+ this.$message.warning('请选择配方物料!')
return
}
if (this.copyRecipeData.engChgLevel === '' || this.copyRecipeData.engChgLevel == null) {
- this.$message.warning('请填写Recipe版本号!')
+ this.$message.warning('请填写配方版本号!')
return
}
- if (this.copyRecipeData.recipeType === '' || this.copyRecipeData.recipeType == null) {
+ if (this.copyRecipeData.bomType === '' || this.copyRecipeData.bomType == null) {
this.$message.warning('请选择制造类型!')
return
}
@@ -2478,13 +3576,14 @@ export default {
site: this.detailData.site,
partNo: this.detailData.partNo,
engChgLevel: this.detailData.engChgLevel,
- recipeType: this.detailData.recipeType,
+ bomType: this.detailData.bomType,
alternativeNo: this.detailData.alternativeNo,
alternativeDescription: this.detailData.alternativeDescription,
minLotQty: this.detailData.minLotQty,
defaultFlag: this.detailData.defaultFlag,
detailNoteText: this.detailData.detailNoteText,
status: 'Tentative',
+ officialFlag: 'N',
previousVersion: {},
createBy: this.$store.state.user.name
}
@@ -2496,14 +3595,14 @@ export default {
*/
copyAlternative () {
if (this.copyAlternativeData.partNo === '' || this.copyAlternativeData.partNo == null) {
- this.$message.warning('请选择Recipe物料!')
+ this.$message.warning('请选择配方物料!')
return
}
if (this.copyAlternativeData.engChgLevel === '' || this.copyAlternativeData.engChgLevel == null) {
- this.$message.warning('请填写Recipe版本号!')
+ this.$message.warning('请填写配方版本号!')
return
}
- if (this.copyAlternativeData.recipeType === '' || this.copyAlternativeData.recipeType == null) {
+ if (this.copyAlternativeData.bomType === '' || this.copyAlternativeData.bomType == null) {
this.$message.warning('请选择制造类型!')
return
}
@@ -2518,6 +3617,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: '操作成功',
@@ -2538,14 +3638,14 @@ export default {
*/
detailDataSave () {
if (this.saveDetailData.partNo === '' || this.saveDetailData.partNo == null) {
- this.$message.warning('请先选择Recipe物料!')
+ this.$message.warning('请先选择配方物料!')
return
}
if (this.saveDetailData.engChgLevel === '' || this.saveDetailData.engChgLevel == null) {
- this.$message.warning('请先填写Recipe版本号!')
+ this.$message.warning('请先填写配方版本号!')
return
}
- if (this.saveDetailData.recipeType === '' || this.saveDetailData.recipeType == null) {
+ if (this.saveDetailData.bomType === '' || this.saveDetailData.bomType == null) {
this.$message.warning('请先选择制造类型!')
return
}
@@ -2721,7 +3821,25 @@ export default {
})
},
-
+ // 临时Recipe转为正式Recipe
+ toBecomeOfficialRecipe () {
+ toBecomeOfficialRecipe(this.detailData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.getDataList()
+ this.modalFlag = false
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {}
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ },
// ======= 正则校验 =======
handleInput (value, type) {
@@ -2736,12 +3854,10 @@ export default {
this.detailData.minLotQty = val
} else if (type === 3) {
this.saveDetailData.minLotQty = val
- }
- // else if (type === 4) {
- // this.componentData.qtyPerAssembly = val
- // }
- else if (type === 5) {
+ } else if (type === 5) {
this.componentData.componentScrap = val
+ } else if (type === 6) {
+ this.manufStructCostDistribData.itemCostDistribution = val
}
},
@@ -2791,6 +3907,15 @@ export default {
queryOperationList(this.operationData).then(({data}) => {
if (data && data.code === 0) {
this.operationList = data.rows
+ this.operationData = {
+ site: this.$store.state.user.site,
+ partNo: this.modalData.partNo,
+ routingRevision: '',
+ routingType: '',
+ alternativeNo: '',
+ operationNo: '',
+ operationName: '',
+ }
this.operationModelFlag = true
} else {
this.$alert(data.msg, '错误', {
diff --git a/src/views/modules/proofing/requestForProofing.vue b/src/views/modules/proofing/requestForProofing.vue
index 948da72..35fb344 100644
--- a/src/views/modules/proofing/requestForProofing.vue
+++ b/src/views/modules/proofing/requestForProofing.vue
@@ -195,7 +195,7 @@
跟单员
-
+
@@ -235,7 +235,7 @@
工程师
-
+
diff --git a/src/views/modules/test/requestForTest.vue b/src/views/modules/test/requestForTest.vue
index 098bbbb..cbac8f7 100644
--- a/src/views/modules/test/requestForTest.vue
+++ b/src/views/modules/test/requestForTest.vue
@@ -195,7 +195,7 @@
跟单员
-
+
@@ -235,7 +235,7 @@
工程师
-
+