From eb1733fab70196d49f41799ffe2d2ca663f760f2 Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Wed, 21 Feb 2024 16:11:50 +0800
Subject: [PATCH] =?UTF-8?q?2024-02-21=20=E7=89=A9=E6=96=99=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/part/partInformation.js | 5 +
.../modules/part/partCatalogInformation.vue | 158 ++----
src/views/modules/part/partInformation.vue | 524 +++++++-----------
3 files changed, 241 insertions(+), 446 deletions(-)
diff --git a/src/api/part/partInformation.js b/src/api/part/partInformation.js
index 771d135..6caf83a 100644
--- a/src/api/part/partInformation.js
+++ b/src/api/part/partInformation.js
@@ -193,3 +193,8 @@ export const deletePartItem = data => createAPI(`/plm/partInformation/deletePart
*/
export const queryPartItem = data => createAPI(`/plm/partInformation/queryPartItem`,'post',data)
+/**
+ * 根据物料编码查 masterPart 属性
+ */
+export const queryMasterField = data => createAPI(`/plm/partInformation/queryMasterField`,'post',data)
+
diff --git a/src/views/modules/part/partCatalogInformation.vue b/src/views/modules/part/partCatalogInformation.vue
index 9c20b96..e6f77e1 100644
--- a/src/views/modules/part/partCatalogInformation.vue
+++ b/src/views/modules/part/partCatalogInformation.vue
@@ -95,12 +95,19 @@
-
+
允许条件代码
- 多级跟踪
+ 多级跟踪
允许为未使用
+
+
+ 计量单位
+
+
+
+
属性模板
@@ -116,7 +123,7 @@
-
+
物料分组
@@ -129,10 +136,10 @@
-
+
-
+
@@ -143,10 +150,10 @@
-
+
-
+
@@ -424,6 +431,8 @@
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
+ umId: '',
+ umName: '',
partMainGroup: '',
groupName: '',
weightNet: '',
@@ -973,21 +982,7 @@
trigger: 'change'
}
],
- umName: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
- familyName: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
- groupName: [
+ umId: [
{
required: true,
message: ' ',
@@ -1000,84 +995,7 @@
message: ' ',
trigger: 'change'
}
- ],
- manufacturerName: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
- active: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
- agentName: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
- partType: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
- productGroupId3: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
- productGroupId4: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
- weightNet: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
- uomForWeightNet: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
- volumeNet: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
- uomForVolumeNet: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
- lotTrackingCode: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
+ ]
},
// ======== 复选数据集 ========
partSelections: [],
@@ -1403,6 +1321,8 @@
title: '物料新增',
partNo: '',
partDesc: '',
+ umId: '',
+ umName: '',
partMainGroup: '',
groupName: '',
weightNet: '',
@@ -1414,10 +1334,10 @@
conditionCodeUsageDb: '',
multilevelTrackingDb: '',
allowAsNotConsumedDb: '',
- lotTrackingCode: '',
- lotQuantityRule: '',
- subLotRule: '',
- componentLotRule: '',
+ lotTrackingCode: 'Not Lot Tracking',
+ lotQuantityRule: 'One Lot Per Production Order',
+ subLotRule: 'No Sub Lots Allowed',
+ componentLotRule: 'Many Lots Allowed',
createBy: this.$store.state.user.name
}
this.modalDisableFlag = false
@@ -1434,6 +1354,8 @@
site: this.$store.state.user.site,
partNo: row.partNo,
partDesc: row.partDesc,
+ umId: row.umId,
+ umName: row.umName,
partMainGroup: row.partMainGroup,
groupName: row.groupName,
weightNet: row.weightNet,
@@ -1477,28 +1399,12 @@
this.$message.warning('请填写物料描述!')
return
}
- if (this.modalData.codeNo === '' || this.modalData.codeNo == null) {
- this.$message.warning('请选择属性模板!')
- return
- }
- if (this.modalData.partMainGroup === '' || this.modalData.partMainGroup == null) {
- this.$message.warning('请选择分组!')
- return
- }
- if ( this.modalData.weightNet === '' || this.modalData.weightNet == null) {
- this.$message.warning('请填写净重!')
+ if (this.modalData.umId === '' || this.modalData.umId == null) {
+ this.$message.warning('请选择计量单位!')
return
}
- if (this.modalData.uomForWeightNet === '' || this.modalData.uomForWeightNet == null) {
- this.$message.warning('请选择净重单位!')
- return
- }
- if (this.modalData.volumeNet === '' || this.modalData.volumeNet == null) {
- this.$message.warning('请填写净体积!')
- return
- }
- if (this.modalData.uomForVolumeNet === '' || this.modalData.uomForVolumeNet == null) {
- this.$message.warning('请选择净体积单位!')
+ if (this.modalData.codeNo === '' || this.modalData.codeNo == null) {
+ this.$message.warning('请选择属性模板!')
return
}
if (this.modalData.flag === '1') {
@@ -1602,7 +1508,7 @@
this.tempCodeNo = this.modalData.codeNo
this.$nextTick(() => {
let strVal = ''
- if (val === 107) {
+ if (val === 1007) {
strVal = this.modalData.umId
} else if (val === 109) {
strVal = this.modalData.partMainGroup
@@ -1617,7 +1523,7 @@
* @param val
*/
getBaseData (val) {
- if (this.tagNo === 107) {
+ if (this.tagNo === 1007) {
this.modalData.umId = val.um_id
this.modalData.umName = val.um_name
} else if (this.tagNo === 109) {
diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue
index a6f3c30..e303bea 100644
--- a/src/views/modules/part/partInformation.vue
+++ b/src/views/modules/part/partInformation.vue
@@ -118,7 +118,7 @@
-
+
@@ -126,7 +126,7 @@
-
+
@@ -135,18 +135,18 @@
- 安全编码 / Safety Code
+ 安全代码 / Safety Code
- 计划员 / Planner
+ 计划人 / Planner
-
+
会计组 / Accounting Group
@@ -154,12 +154,12 @@
- 计量单位 / Inventory UoM
+ 库存计量单位 / Inventory UoM
-
- 物料分组 / Product Code
+
+ 产品代码 / Product Code
@@ -170,8 +170,8 @@
-
- 物料分类 / Product Family
+
+ 产品大类 / Product Family
@@ -182,44 +182,47 @@
-
+
- 资产类别 / Asset Class
+ 资产等级 / Asset Class
-
+
- 物料状态 / Part Status
+ 零件状态 / Part Status
-
-
+
+
-
-
+
+
+
- ABC类别 / ABC Class
-
+ ABC类 / ABC Class
+ ABC类 / ABC Class
+
-
-
+
+
-
-
+
+
+
@@ -228,82 +231,78 @@
-
-
+
+
-
+
-
-
-
+
+
+
+
+
- 原产地 / Country of Origin
+ 来源国家 / Country of Origin
-
-
-
+
+
+
+
+
- 地区编码 / Region Code
+ 区域代码 / Region Code
-
-
+
+
+
- 海关统计编号 / Customs Star No
+ 海关统计序号 / Customs Star No
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
@@ -312,13 +311,13 @@
- 物料成本组 / Part Cost Group
+ 零件成本组 / Part Cost Group
-
+
@@ -329,7 +328,7 @@
-
+
@@ -351,36 +350,36 @@
- 规划方法 / Planning Method
+ 计划方法 / Planning Method
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
@@ -388,25 +387,25 @@
-
+
-
-
+
+
- 将副产品用作供应 / Use By-Product as Supply in
+ 将副产品用作MRP中的供应 / Use By-Product as Supply in MRP
-
-
+
+
-
-
+
+
@@ -419,10 +418,10 @@
-
+
-
+
@@ -433,124 +432,30 @@
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
保存
@@ -1244,6 +1149,7 @@
addPartItem, // 新增物料属性
deletePartItem, // 删除物料属性
queryPartItem,
+ queryMasterField, // 根据物料编码查 masterPart 属性
} from '@/api/part/partInformation.js'
import {
getFileContentList, // 获取物料单附件列表
@@ -1501,6 +1407,24 @@
fixed: '',
columnWidth: 120
},
+ {
+ userId: this.$store.state.user.name,
+ functionId: 104001,
+ serialNumber: '104001Table1Status',
+ tableId: '104001Table1',
+ tableName: '物料信息表',
+ columnProp: 'status',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: '是否为正式物料',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
{
userId: this.$store.state.user.name,
functionId: 104001,
@@ -1528,7 +1452,7 @@
columnProp: 'umName',
headerAlign: 'center',
align: 'center',
- columnLabel: '计量单位',
+ columnLabel: '库存计量单位',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1582,7 +1506,7 @@
columnProp: 'volumeNet',
headerAlign: 'center',
align: 'right',
- columnLabel: '体积',
+ columnLabel: '净数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1600,7 +1524,7 @@
columnProp: 'uomForVolumeNet',
headerAlign: 'center',
align: 'center',
- columnLabel: '体积单位',
+ columnLabel: '数量单位',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1636,7 +1560,7 @@
columnProp: 'partType',
headerAlign: 'center',
align: 'center',
- columnLabel: '物料类别',
+ columnLabel: '零件类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1654,7 +1578,7 @@
columnProp: 'familyName',
headerAlign: 'center',
align: 'center',
- columnLabel: '物料分类',
+ columnLabel: '产品大类',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1672,7 +1596,7 @@
columnProp: 'groupName',
headerAlign: 'center',
align: 'center',
- columnLabel: '物料分组',
+ columnLabel: '产品代码',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -1744,7 +1668,7 @@
columnProp: 'productGroupName4',
headerAlign: 'center',
align: 'center',
- columnLabel: '计划员',
+ columnLabel: '计划人',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -2527,20 +2451,6 @@
trigger: 'change'
}
],
- familyName: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
- groupName: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
codeDesc: [
{
required: true,
@@ -2576,13 +2486,6 @@
trigger: 'change'
}
],
- productGroupId3: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
productGroupId4: [
{
required: true,
@@ -2590,34 +2493,6 @@
trigger: 'change'
}
],
- weightNet: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
- uomForWeightNet: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
- volumeNet: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
- uomForVolumeNet: [
- {
- required: true,
- message: ' ',
- trigger: 'change'
- }
- ],
lotTrackingCode: [
{
required: true,
@@ -2659,6 +2534,23 @@
},
methods: {
+ // 物料编码失去焦点事件
+ queryMasterField () {
+ // 根据物料编码查 masterPart 属性
+ queryMasterField(this.modalData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.data != null) {
+ this.modalData.partDesc = data.data.partDesc
+ this.modalData.umId = data.data.umId
+ this.modalData.umName = data.data.umName
+ this.modalData.weightNet = data.data.weightNet
+ this.modalData.uomForWeightNet = data.data.uomForWeightNet
+ this.modalData.volumeNet = data.data.volumeNet
+ this.modalData.uomForVolumeNet = data.data.uomForVolumeNet
+ }
+ }
+ })
+ },
// 制造提前期内容改变事件
changeExpectedLeadTime () {
@@ -2837,13 +2729,41 @@
handleInput (value, type) {
// 大于等于0,且只能输入4位小数
let val = value.replace(/^\D*([0-9]\d*\.?\d{0,4})?.*$/,'$1')
- // if (val === null || val === undefined || val === '') {
- // val = 0
- // }
+ if (val === null || val === undefined || val === '') {
+ val = 0
+ }
if (type === 1) {
- this.modalData.weightNet = val
+ this.modalData.estimatedMaterialCost = val
} else if (type === 2) {
- this.modalData.volumeNet = val
+ this.modalData.safetyStock = val
+ } else if (type === 3) {
+ this.modalData.minOrderQty = val
+ } else if (type === 4) {
+ this.modalData.maxOrderQty = val
+ } else if (type === 5) {
+ this.modalData.mulOrderQty = val
+ } else if (type === 6) {
+ this.modalData.safetyLeadTime = val
+ } else if (type === 7) {
+ this.modalData.shrinkageFac = val
+ } else if (type === 8) {
+ this.modalData.stdOrderQty = val
+ } else if (type === 9) {
+ this.modalData.cumLeadTime = val
+ } else if (type === 10) {
+ this.modalData.unprotectedLeadTime = val
+ } else if (type === 11) {
+ this.modalData.fixedLeadTimeDay = val
+ } else if (type === 12) {
+ this.modalData.variableLeadTimeDay = val
+ } else if (type === 13) {
+ this.modalData.overReportTolerance = val
+ } else if (type === 14) {
+ this.modalData.fixedLeadTimeHour = val
+ } else if (type === 15) {
+ this.modalData.density = val
+ } else if (type === 16) {
+ this.modalData.variableLeadTimeHour = val
}
},
@@ -3022,7 +2942,7 @@
partDesc: '',
spec: '',
partTypeDb: '',
- partType: 'Manufactured',
+ partType: 'Purchase raw',
familyId: '',
familyName: '',
groupId: '',
@@ -3044,8 +2964,8 @@
productGroupName2: '',
productGroupId3: '',
productGroupName3: '',
- productGroupId4: '',
- productGroupName4: '',
+ productGroupId4: '*',
+ productGroupName4: 'NorthSky Application owner',
erpPartNo: '',
codeNo: '',
codeDesc: '',
@@ -3057,13 +2977,13 @@
typeDesignation: '',
hazardCode: '',
hazardDesc: '',
- assetClass: '',
- assetClassDesc: '',
+ assetClass: 'S',
+ assetClassDesc: '标准',
dimQuality: '',
- abcClass: '',
+ abcClass: 'C',
abcClassDesc: '',
- frequencyClass: '',
- lifecycleStage: '',
+ frequencyClass: 'Very Slow Mover',
+ lifecycleStage: 'Development',
isoCountry: '',
isoCountryDesc: '',
manufacturingLeadTime: '',
@@ -3076,40 +2996,40 @@
durabilityDay: '',
intrastatConvFactor: '',
umDesc: '',
- status: '',
- partStatus: '',
- partStatusDesc: '',
+ status: 'N',
+ partStatus: 'A',
+ partStatusDesc: '活动',
configurationId: '*',
- estimatedMaterialCost: '',
- inventoryValuationMethod: '',
+ estimatedMaterialCost: 0,
+ inventoryValuationMethod: 'Standard Cost',
partCostGroupId: '',
partCostGroupDesc: '',
- inventoryPartCostLevel: '',
- invoiceConsideration: '',
- zeroCostFlag: '',
+ inventoryPartCostLevel: 'Cost Per Part',
+ invoiceConsideration: 'Ignore Invoice Price',
+ zeroCostFlag: 'Zero Cost Forbidden',
planningMethod: '',
planningMethodDesc: '',
- safetyStock: '',
- minOrderQty: '',
- maxOrderQty: '',
- mulOrderQty: '',
- safetyLeadTime: '',
- shrinkageFac: '',
- stdOrderQty: '',
- cumLeadTime: '',
- backFlushPart: '',
+ safetyStock: 0,
+ minOrderQty: 0,
+ maxOrderQty: 0,
+ mulOrderQty: 0,
+ safetyLeadTime: 0,
+ shrinkageFac: 0,
+ stdOrderQty: 0,
+ cumLeadTime: 0,
+ backFlushPart: 'All Locations',
byProdAsSupplyInMrpDb: '',
- unprotectedLeadTime: '',
- issueType: '',
- mrpControlFlagDb: '',
- fixedLeadTimeDay: '',
- overReporting: '',
+ unprotectedLeadTime: 0,
+ issueType: 'Reserve And Backflush',
+ mrpControlFlagDb: 'Y',
+ fixedLeadTimeDay: 0,
+ overReporting: 'Allowed',
useTheoreticalDensityDb: '',
- variableLeadTimeDay: '',
- overReportTolerance: '',
- fixedLeadTimeHour: '',
- density: '',
- variableLeadTimeHour: ''
+ variableLeadTimeDay: 0,
+ overReportTolerance: 0,
+ fixedLeadTimeHour: 0,
+ density: 0,
+ variableLeadTimeHour: 0
}
this.modalDisableFlag = false
this.modalFlag = true
@@ -3698,55 +3618,19 @@
return
}
if (this.modalData.partType === '' || this.modalData.partType == null) {
- this.$message.warning('请选择物料类别!')
+ this.$message.warning('请选择零件类型!')
return
}
- if (this.modalData.active === '' || this.modalData.active == null) {
- this.$message.warning('请选择是否在用!')
- return
- }
- if (this.modalData.codeNo === '' || this.modalData.codeNo == null) {
- this.$message.warning('请选择属性模板!')
+ if (this.modalData.productGroupId4 === '' || this.modalData.productGroupId4 == null) {
+ this.$message.warning('请选择计划人!')
return
}
if (this.modalData.umId === '' || this.modalData.umId == null) {
- this.$message.warning('请选择计量单位!')
- return
- }
- if ( this.modalData.weightNet === '' || this.modalData.weightNet == null) {
- this.$message.warning('请填写净重!')
+ this.$message.warning('请选择库存计量单位!')
return
}
- if (this.modalData.uomForWeightNet === '' || this.modalData.uomForWeightNet == null) {
- this.$message.warning('请选择净重单位!')
- return
- }
- if (this.modalData.volumeNet === '' || this.modalData.volumeNet == null) {
- this.$message.warning('请填写净体积!')
- return
- }
- if (this.modalData.uomForVolumeNet === '' || this.modalData.uomForVolumeNet == null) {
- this.$message.warning('请选择净体积单位!')
- return
- }
- if (this.modalData.lotTrackingCode === '' || this.modalData.lotTrackingCode == null) {
- this.$message.warning('请选择批次追踪!')
- return
- }
- if (this.modalData.familyId === '' || this.modalData.familyId == null) {
- this.$message.warning('请选择分类!')
- return
- }
- if (this.modalData.groupId === '' || this.modalData.groupId == null) {
- this.$message.warning('请选择分组!')
- return
- }
- if (this.modalData.productGroupId3 === '' || this.modalData.productGroupId3 == null) {
- this.$message.warning('请选择会计组!')
- return
- }
- if (this.modalData.productGroupId4 === '' || this.modalData.productGroupId4 == null) {
- this.$message.warning('请选择计划员!')
+ if (this.modalData.codeNo === '' || this.modalData.codeNo == null) {
+ this.$message.warning('请选择属性模板!')
return
}
if (this.modalData.flag === '1') {
@@ -3965,7 +3849,7 @@
this.tempCodeNo = this.modalData.codeNo
this.$nextTick(() => {
let strVal = ''
- if (val === 107) {
+ if (val === 1007) {
strVal = this.modalData.umId
} else if (val === 108) {
strVal = this.modalData.familyId
@@ -4010,7 +3894,7 @@
* @param val
*/
getBaseData (val) {
- if (this.tagNo === 107) {
+ if (this.tagNo === 1007) {
this.modalData.umId = val.um_id
this.modalData.umName = val.um_name
} else if (this.tagNo === 108) {