From 018839001dc691060b61f9956a032e19ee371fa6 Mon Sep 17 00:00:00 2001
From: yuejiayang <146344614+YangLei105@users.noreply.github.com>
Date: Tue, 24 Sep 2024 21:28:11 +0800
Subject: [PATCH] =?UTF-8?q?2024.9.24=20=E4=B8=80=E3=80=81=E7=89=A9?=
=?UTF-8?q?=E6=96=99=E6=88=90=E6=9C=AC=E4=BF=A1=E6=81=AF=E7=BB=B4=E6=8A=A4?=
=?UTF-8?q?=EF=BC=88=E7=AC=AC=E4=BA=8C=E7=89=88=E4=BF=AE=E6=AD=A3=EF=BC=89?=
=?UTF-8?q?=20=E4=BA=8C=E3=80=81=E5=8A=A0=E5=B7=A5=E4=B8=AD=E5=BF=83?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=94=B9=E9=80=A0=20=E4=B8=89=E3=80=81?=
=?UTF-8?q?=E6=A0=87=E5=87=86=E5=B7=A5=E5=BA=8F=EF=BC=88=E7=AC=AC=E4=B8=89?=
=?UTF-8?q?=E7=89=88=E4=BF=AE=E6=AD=A3=EF=BC=89=20=E5=9B=9B=E3=80=81?=
=?UTF-8?q?=E5=95=86=E5=93=81=E7=BB=84=20-=20=E6=A0=87=E5=87=86=E5=B7=A5?=
=?UTF-8?q?=E5=BA=8F=EF=BC=88=E7=AC=AC=E4=B8=89=E7=89=88=E4=BF=AE=E6=AD=A3?=
=?UTF-8?q?=EF=BC=89=20=E4=BA=94=E3=80=81=E5=95=86=E5=93=81=E7=BB=84=20-?=
=?UTF-8?q?=20Process=20Time=20Matrix=EF=BC=88=E7=AC=AC=E4=BA=8C=E7=89=88?=
=?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../part/partProductGroupInformation.vue | 78 +++++++++----
.../modules/part/standardRoutingOperation.vue | 107 +++++++++++++++---
2 files changed, 152 insertions(+), 33 deletions(-)
diff --git a/src/views/modules/part/partProductGroupInformation.vue b/src/views/modules/part/partProductGroupInformation.vue
index 0db7c00..f5fefcd 100644
--- a/src/views/modules/part/partProductGroupInformation.vue
+++ b/src/views/modules/part/partProductGroupInformation.vue
@@ -67,8 +67,16 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
- {{ scope.row[item.columnProp] }}
-
+
+
{{ scope.row[item.columnProp] }}
+
![]()
+
+
+
+ 是
+ 否
+
+
-
+
-
+
@@ -122,12 +130,12 @@
-
+
@@ -137,7 +145,7 @@
-
+
@@ -564,6 +572,24 @@ export default {
copyProcessAttributeList: [],
// 展示列集
columnList: [
+ {
+ userId: this.$store.state.user.name,
+ functionId: 601006,
+ serialNumber: '601006Table1BuDesc',
+ tableId: "601006Table1",
+ tableName: "商品组信息表",
+ columnProp: 'buDesc',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: 'BU',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },
{
userId: this.$store.state.user.name,
functionId: 601006,
@@ -643,14 +669,14 @@ export default {
columnProp: 'yieldRate',
headerAlign: 'center',
align: 'right',
- columnLabel: 'Yield Rate',
+ columnLabel: 'Yield Rate(%)',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 80
+ columnWidth: 90
},
{
userId: this.$store.state.user.name,
@@ -743,7 +769,7 @@ export default {
status: true,
fixed: '',
columnWidth: 70,
- isVisible: true // 控制显示的属性
+ isVisible: false // 控制显示的属性
},
{
userId: this.$store.state.user.name,
@@ -1466,8 +1492,8 @@ export default {
if (val === 219) {
strVal = this.ptmModalData.itemNo
}
- if (this.productGroupConditionCurrentRow.bu !== null && this.productGroupConditionCurrentRow.bu !== '' && this.productGroupConditionCurrentRow.bu !== undefined) {
- conSql = " and site = '" + this.productGroupConditionCurrentRow.bu.split('_')[0] + "'" + " and bu_no = '" + this.productGroupConditionCurrentRow.bu.split('_')[1] + "'"
+ if (this.ptmModalData.bu !== null && this.ptmModalData.bu !== '' && this.ptmModalData.bu !== undefined) {
+ conSql = " and site = '" + this.ptmModalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.ptmModalData.bu.split('_')[1] + "'"
this.$refs.baseList.init(val, strVal, conSql)
} else {
this.$refs.baseList.init(val, strVal)
@@ -1583,12 +1609,20 @@ export default {
this.$message.warning('请选择商品组!')
return
}
- // 如果yieldRate<0或者大于10,提示时间为2000ms
- if (!(this.modalData.yieldRate >= 0 && this.modalData.yieldRate < 10)) {
- this.$alert('Yield Rate必须为0-10的正数!', '错误', {
- confirmButtonText: '确定'
- })
- return
+ // yieldRate 0 – 100(包含100),而且需要支持小数,保留2位小数
+ if (this.modalData.type === '2') {
+ if (this.modalData.yieldRate === '' || this.modalData.yieldRate == null) {
+ this.$message.warning('请填写Yield Rate!')
+ return
+ }
+ if (this.modalData.yieldRate <= 0 || this.modalData.yieldRate >= 100) {
+ this.$message.warning('Yield Rate范围为0-100!')
+ return
+ }
+ if (!/^\d+(\.\d{1,2})?$/.test(this.modalData.yieldRate)) {
+ this.$message.warning('Yield Rate最多保留两位小数!')
+ return
+ }
}
if (this.modalData.flag === '1') {
productGroupInformationSave(this.modalData).then(({data}) => {
@@ -1836,10 +1870,14 @@ export default {
} else {
this.ptmModalData.seqNo = 1
}
+ this.ptmModalData.buNo = this.productGroupCurrentRow.buNo
+ this.ptmModalData.site = this.productGroupCurrentRow.site
+ this.ptmModalData.bu = this.ptmModalData.site + '_' + this.ptmModalData.buNo
this.ptmSaveFlag = true
},
async saveProductGroupPtm () {
+ console.log(this.ptmModalData)
// 确保 modelBlur 完成
await this.modelBlur(219);
if (this.ptmModalData.conditionDesc === '' || this.ptmModalData.conditionDesc == null) {
@@ -2029,8 +2067,8 @@ export default {
let tempData = {
tagno: tagNo,
conditionSql: " and code_no = '" + this.ptmModalData.itemNo + "'" +
- " and site = '" + this.productGroupConditionCurrentRow.bu.split('_')[0] + "'" +
- " and bu_no = '" + this.productGroupConditionCurrentRow.bu.split('_')[1] + "'"
+ " and site = '" + this.ptmModalData.bu.split('_')[0] + "'" +
+ " and bu_no = '" + this.ptmModalData.bu.split('_')[1] + "'"
};
// 返回 Promise
diff --git a/src/views/modules/part/standardRoutingOperation.vue b/src/views/modules/part/standardRoutingOperation.vue
index 23349e3..9510f40 100644
--- a/src/views/modules/part/standardRoutingOperation.vue
+++ b/src/views/modules/part/standardRoutingOperation.vue
@@ -110,23 +110,31 @@
-
- 人员等级编码
-
+
+
-
-
+
+
- 调机时人员等级编码
-
+ 调机过程中人员等级编码
+
-
+
+
+
+ 人员等级编码
+
+
+
+
+
+
保存
关闭
@@ -207,6 +215,8 @@ export default {
laborClassDesc: '',
setupLaborClassNo: '',
setupLaborClassDesc: '',
+ setupCrewSize: '',
+ crewSize: '',
},
// ======== 数据列表 ========
dataList: [],
@@ -267,7 +277,43 @@ export default {
columnWidth: 300
},
{
- functionId: 6010012,
+ userId: this.$store.state.user.name,
+ functionId: 601003,
+ serialNumber: '6010012Table2CrewSize',
+ tableId: '6010012Table2',
+ tableName: '标准工序表',
+ columnProp: 'crewSize',
+ headerAlign: 'center',
+ align: 'right',
+ columnLabel: '生产过程人数',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 601003,
+ serialNumber: '6010012Table2SetupCrewSize',
+ tableId: '6010012Table2',
+ tableName: '标准工序表',
+ columnProp: 'setupCrewSize',
+ headerAlign: 'center',
+ align: 'right',
+ columnLabel: '调机过程人数',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ functionId: 601003,
serialNumber: '6010012Table1WorkCenterNo',
tableId: '6010012Table1',
tableName: '标准工序表',
@@ -345,7 +391,7 @@ export default {
columnProp: 'setupLaborClassNo',
headerAlign: "center",
align: "center",
- columnLabel: '调机时人员等级编码',
+ columnLabel: '调机过程中人员等级编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -363,7 +409,7 @@ export default {
columnProp: 'setupLaborClassDesc',
headerAlign: "center",
align: "center",
- columnLabel: '调机时人员等级描述',
+ columnLabel: '调机过程中人员等级描述',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -509,6 +555,20 @@ export default {
trigger: ['blur','change']
}
],
+ setupCrewSize: [
+ {
+ required: true,
+ message: ' ',
+ trigger: ['blur','change']
+ }
+ ],
+ crewSize: [
+ {
+ required: true,
+ message: ' ',
+ trigger: ['blur','change']
+ }
+ ],
},
// ======== 模态框开关控制 ========
authSearch: false,
@@ -678,6 +738,8 @@ export default {
laborClassDesc: '',
setupLaborClassNo: '',
setupLaborClassDesc: '',
+ setupCrewSize: 1,
+ crewSize: 1,
createBy: this.$store.state.user.name,
}
this.modalDisableFlag = false
@@ -705,12 +767,23 @@ export default {
laborClassDesc: row.laborClassDesc,
setupLaborClassNo: row.setupLaborClassNo,
setupLaborClassDesc: row.setupLaborClassDesc,
+ setupCrewSize: row.setupCrewSize,
+ crewSize: row.crewSize,
updateBy: this.$store.state.user.name,
}
this.modalDisableFlag = true
this.modalFlag = true
},
+ changeSetupLaborClassNo () {
+ this.modalData.laborClassNo = this.modalData.setupLaborClassNo
+ this.laborClassBlur(217)
+ },
+
+ changeSetupCrewSize () {
+ this.modalData.crewSize = this.modalData.setupCrewSize
+ },
+
// ======== 新增/编辑/删除方法 ========
/**
* 分类信息新增/编辑
@@ -752,15 +825,23 @@ export default {
return
}
if (this.modalData.setupLaborClassNo === '' || this.modalData.setupLaborClassNo == null) {
- this.$message.warning('请填写调机时人员等级编码!')
+ this.$message.warning('请填写调机过程中人员等级编码!')
return
}
if (this.modalData.setupLaborClassDesc === '' || this.modalData.setupLaborClassDesc == null) {
- this.$alert('当前BU下调机时人员等级编码不存在,请重新输入调机时人员等级编码!', '提示', {
+ this.$alert('当前BU下调机过程中人员等级编码不存在,请重新输入调机过程中人员等级编码!', '提示', {
confirmButtonText: '确定'
})
return
}
+ if (this.modalData.setupCrewSize === '' || this.modalData.setupCrewSize == null) {
+ this.$message.warning('请填写调机过程中人数!')
+ return
+ }
+ if (this.modalData.crewSize === '' || this.modalData.crewSize == null) {
+ this.$message.warning('请填写生产过程中人数!')
+ return
+ }
if (this.modalData.flag === '1') {
saveStandardRoutingOperation(this.modalData).then(({data}) => {
if (data && data.code === 0) {