From 543307b19da42545bd8162712c12212db3f4b310 Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Mon, 2 Dec 2024 17:34:47 +0800
Subject: [PATCH] =?UTF-8?q?2024-12-02=20=E5=A4=8D=E5=88=B6=E5=B1=9E?=
=?UTF-8?q?=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/part/partInformation.js | 2 +
src/views/modules/part/partInformation.vue | 53 ++++++++++++++++------
2 files changed, 42 insertions(+), 13 deletions(-)
diff --git a/src/api/part/partInformation.js b/src/api/part/partInformation.js
index ed87515..383b332 100644
--- a/src/api/part/partInformation.js
+++ b/src/api/part/partInformation.js
@@ -199,3 +199,5 @@ export const handleQueryPart = (data) => createAPI('/part/partInformation','post
export const handleQueryPartByPage = (data) => createAPI(`/part/partInformation/${data.no}/${data.size}`,'post',data)
+export const getPreviousPartNo = data => createAPI(`/part/partInformation/getPreviousPartNo`,'post',data)
+
diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue
index 22bb688..ff2d1c0 100644
--- a/src/views/modules/part/partInformation.vue
+++ b/src/views/modules/part/partInformation.vue
@@ -139,7 +139,7 @@
-
+
-
+
-
+
@@ -164,6 +164,9 @@
Copy
+
+ 复制属性({{previousPartNo}})
+
@@ -988,6 +991,7 @@
copyPart, // 复制物料
getProjectPartNo, // 获取物料编码
verifyData, // 校验参数
+ getPreviousPartNo, // 获取上一个物料编码
} from '@/api/part/partInformation.js'
import {getFileContentList, downLoadObjectFile} from '@/api/eam/eam_object_list.js'
import {deleteObjectFile} from '@/api/eam/eam.js'
@@ -1105,7 +1109,8 @@
partDesceEn: '',
remark: '',
codeNo: '',
- codeDesc: ''
+ codeDesc: '',
+ tblBaseFlag: ''
},
itemData: {
site: this.$store.state.user.site,
@@ -2224,6 +2229,7 @@
attributeDialog: true,
uploadDialog: false,
menuId: this.$route.meta.menuId,
+ previousPartNo: ''
}
},
@@ -2676,19 +2682,34 @@
partDesceEn: '',
remark: '',
codeNo: '',
- codeDesc: ''
+ codeDesc: '',
+ tblBaseFlag: '',
+ createBy: this.$store.state.user.name
}
this.inventoryPartTable = 'General'
this.modalDisableFlag = false
this.modalFlag = true
- // getProjectPartNo(this.searchData).then(({data}) => {
- // if (data && data.code === 0) {
- //
- // } else {
- // this.$message.error(data.msg)
- // }
- // })
+ this.getPreviousPartNo()
},
+
+ // 获取上一个物料编码
+ getPreviousPartNo () {
+ let tempData = {
+ site: this.modalData.bu.split('_')[0],
+ type: 'thePreviousPartItem',
+ thirdType: this.modalData.bu.split('_')[1],
+ secondType: this.$store.state.user.name
+ }
+ getPreviousPartNo(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.previousPartNo = data.previousPartNo
+ } else {
+ this.previousPartNo = ''
+ }
+ })
+ },
+
+
/**
* 物料信息编辑模态框
* @param row
@@ -2719,7 +2740,9 @@
partDesceEn: row.partDesceEn,
remark: row.remark,
codeNo: row.codeNo,
- codeDesc: row.codeDesc
+ codeDesc: row.codeDesc,
+ tblBaseFlag: '',
+ createBy: ''
}
this.inventoryPartTable = 'General'
this.modalDisableFlag = true
@@ -3141,6 +3164,10 @@
this.$message.warning('请选择计量单位!')
return
}
+ if (this.modalData.tblBaseFlag === 'Y' && this.modalData.codeNo === '') {
+ this.$message.warning('请选择属性模板!')
+ return
+ }
if (this.modalData.flag === '1') {
partInformationSave(this.modalData).then(({data}) => {
if (data && data.code === 0) {