From 3f34b33a684ac8162ae8bd233192a812808bcb90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E5=A5=89=E6=BA=90?= <1976974459@qq.com>
Date: Mon, 20 Nov 2023 11:15:16 +0800
Subject: [PATCH] =?UTF-8?q?2023-11-20=20plm=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/part/partInformation.js | 8 +
src/views/modules/part/partInformation.vue | 307 ++++++++++++++++-----
2 files changed, 240 insertions(+), 75 deletions(-)
diff --git a/src/api/part/partInformation.js b/src/api/part/partInformation.js
index c9915a5..45947aa 100644
--- a/src/api/part/partInformation.js
+++ b/src/api/part/partInformation.js
@@ -24,6 +24,14 @@ export const partInformationEdit = data => createAPI(`/plm/partInformation/partI
* @returns {*}
*/
export const partInformationDelete = data => createAPI(`/plm/partInformation/partInformationDelete`,'post',data)
+
+/**
+ * 查询材料属性
+ * @param data
+ * @returns {*}
+ */
+export const getPartItem = data => createAPI(`/plm/partInformation/getPartItem`,'post',data)
+
/**
* 获取材料单附件列表
* @param data
diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue
index eb9434e..b06f61a 100644
--- a/src/views/modules/part/partInformation.vue
+++ b/src/views/modules/part/partInformation.vue
@@ -29,8 +29,6 @@
placeholder="选择日期">
-
-
@@ -148,21 +146,21 @@
商品组1
-
+
商品组2
-
+
商品组3
-
+
商品组4
-
+
@@ -203,10 +201,41 @@
-
+
-
+
+
+
+ {{scope.row[item.columnProp]}}
+
+
+
+
+
+ 编辑
+
+
+
@@ -224,6 +253,7 @@
partInformationSave, // 材料信息新增
partInformationEdit, // 材料信息编辑
partInformationDelete, // 材料信息删除
+ getPartItem, // 查询材料属性
getFileContentList, // 获取材料单附件列表
deletePartFile, // 文件删除
} from '@/api/part/partInformation.js'
@@ -298,14 +328,14 @@
remark: '',
supplierId: '',
supplierName: '',
- pGroupId1: '',
- pGroupName1: '',
- pGroupId2: '',
- pGroupName2: '',
- pGroupId3: '',
- pGroupName3: '',
- pGroupId4: '',
- pGroupName4: '',
+ productGroupId1: '',
+ productGroupName1: '',
+ productGroupId2: '',
+ productGroupName2: '',
+ productGroupId3: '',
+ productGroupName3: '',
+ productGroupId4: '',
+ productGroupName4: '',
erpPartNo: '',
codeNo: '',
codeDesc: '',
@@ -318,6 +348,7 @@
},
// ======== 数据列表 ========
dataList: [],
+ partItemList: [],
fileContentList: [],
// ======== 列表表头 ========
columnList: [
@@ -399,7 +430,7 @@
serialNumber: '104001Table1UmId',
tableId: '104001Table1',
tableName: '材料信息表',
- columnProp: 'umId',
+ columnProp: 'umName',
headerAlign: 'center',
align: 'center',
columnLabel: '计量单位',
@@ -453,7 +484,7 @@
serialNumber: '104001Table1OtherGroup1',
tableId: '104001Table1',
tableName: '材料信息表',
- columnProp: 'pGroupName1',
+ columnProp: 'productGroupName1',
headerAlign: 'center',
align: 'center',
columnLabel: '商品组1',
@@ -471,7 +502,7 @@
serialNumber: '104001Table1OtherGroup2',
tableId: '104001Table1',
tableName: '材料信息表',
- columnProp: 'pGroupName2',
+ columnProp: 'productGroupName2',
headerAlign: 'center',
align: 'center',
columnLabel: '商品组2',
@@ -489,7 +520,7 @@
serialNumber: '104001Table1OtherGroup3',
tableId: '104001Table1',
tableName: '材料信息表',
- columnProp: 'pGroupName3',
+ columnProp: 'productGroupName3',
headerAlign: 'center',
align: 'center',
columnLabel: '商品组3',
@@ -507,7 +538,7 @@
serialNumber: '104001Table1OtherGroup4',
tableId: '104001Table1',
tableName: '材料信息表',
- columnProp: 'pGroupName4',
+ columnProp: 'productGroupName4',
headerAlign: 'center',
align: 'center',
columnLabel: '商品组4',
@@ -664,6 +695,98 @@
columnWidth: 80
}
],
+ columnItemList: [
+ {
+ userId: this.$store.state.user.name,
+ functionId: 104001,
+ serialNumber: '104001Table2PropertiesItemID',
+ tableId: "104001Table2",
+ tableName: "材料属性表",
+ columnProp: 'propertiesItemNo',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '属性编码',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: true,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 90,
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 104001,
+ serialNumber: '104001Table2PropertiesItemDesc',
+ tableId: "104001Table2",
+ tableName: "材料属性表",
+ columnProp: 'itemDesc',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '属性名称',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: true,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 90,
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 104001,
+ serialNumber: '104001Table2ValueType',
+ tableId: "104001Table2",
+ tableName: "材料属性表",
+ columnProp: 'valueType',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '属性类型',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: true,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 70,
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 104001,
+ serialNumber: '104001TableValueChooseFlag',
+ tableId: "104001Table",
+ tableName: "材料属性表",
+ columnProp: 'textValue',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '文本值',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: true,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 70,
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 104001,
+ serialNumber: '104001TableValueChooseFlag',
+ tableId: "104001Table",
+ tableName: "材料属性表",
+ columnProp: 'numValue',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '数字值',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: true,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 70,
+ },
+ ],
fileColumnList: [
{
userId: this.$store.state.user.name,
@@ -815,11 +938,32 @@
* 刷新页签的table数据
*/
refreshCurrentTabTable () {
- if (this.activeTable === 'quotation_result') {
+ if (this.activeTable === 'part_item') {
+ this.getPartItem()
+ }
+ },
+ // ======== 列表数据刷新方法 ========
+ /**
+ * 查询材料属性
+ */
+ getPartItem () {
+ let tempData = {
+ site: this.$store.state.user.site,
+ partNo: this.partCurrentRow.partNo,
+ codeNo: this.partCurrentRow.codeNo,
+ recordType: 'B'
}
+ getPartItem(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.partItemList = data.rows
+ } else {
+ this.partItemList = []
+ }
+ })
},
+
// ======== 列表数据刷新方法 ========
/**
* 获取数据列表
@@ -871,17 +1015,18 @@
remark: '',
supplierId: '',
supplierName: '',
- pGroupId1: '',
- pGroupName1: '',
- pGroupId2: '',
- pGroupName2: '',
- pGroupId3: '',
- pGroupName3: '',
- pGroupId4: '',
- pGroupName4: '',
+ productGroupId1: '',
+ productGroupName1: '',
+ productGroupId2: '',
+ productGroupName2: '',
+ productGroupId3: '',
+ productGroupName3: '',
+ productGroupId4: '',
+ productGroupName4: '',
erpPartNo: '',
codeNo: '',
manufacturerId: '',
+ manufacturerName: '',
createBy: this.$store.state.user.name
}
this.modalDisableFlag = false
@@ -896,35 +1041,33 @@
flag: '2',
title: '材料编辑',
site: row.site,
- quotationNo: row.quotationNo,
- customerNo: row.customerNo,
- customerDesc: row.customerDesc,
- projectId: row.projectId,
- projectName: row.projectName,
- tracker: row.tracker,
- trackerName: row.trackerName,
- quoter: row.quoter,
- quoterName: row.quoterName,
- quotationStatus: row.quotationStatus,
- testPartNo: row.testPartNo,
- partName: row.partName,
- priorityLevel: row.priorityLevel,
- requiredCompletionDate: row.requiredCompletionDate,
+ partNo: row.partNo,
+ partDesc: row.partDesc,
+ spec: row.spec,
+ partTypeDb: row.partTypeDb,
+ partType: row.partType,
+ familyId: row.familyId,
+ familyName: row.familyName,
+ groupId: row.groupId,
+ groupName: row.groupName,
+ umId: row.umId,
+ umName: row.umName,
+ active: row.active,
remark: row.remark,
- technicalConsiderations: row.technicalConsiderations,
- customerResponsiblePerson: row.customerResponsiblePerson,
- customerResponsiblePersonPhone: row.customerResponsiblePersonPhone,
- nextToDo: row.nextToDo,
- actualityQuotationDate: row.actualityQuotationDate,
- quotationResultInformation: row.quotationResultInformation,
- actualitySubmissionDate: row.actualitySubmissionDate,
- submissionMethod: row.submissionMethod,
- submissionRemark: row.submissionRemark,
- actualityReplyDate: row.actualityReplyDate,
- confirmResults: row.confirmResults,
- confirmBy: row.confirmBy,
- confirmInformation: row.confirmInformation,
- quotationResultStatus: row.quotationResultStatus,
+ supplierId: row.supplierId,
+ supplierName: row.supplierName,
+ productGroupId1: row.productGroupId1,
+ productGroupName1: row.productGroupName1,
+ productGroupId2: row.productGroupId2,
+ productGroupName2: row.productGroupName2,
+ productGroupId3: row.productGroupId3,
+ productGroupName3: row.productGroupName3,
+ productGroupId4: row.productGroupId4,
+ productGroupName4: row.productGroupName4,
+ erpPartNo: row.erpPartNo,
+ codeNo: row.codeNo,
+ manufacturerId: row.manufacturerId,
+ manufacturerName: row.manufacturerName,
updateBy: this.$store.state.user.name
}
this.modalDisableFlag = true
@@ -948,10 +1091,10 @@
this.$message.warning('请选择计量单位!')
return
}
- if (this.modalData.codeNo === '' || this.modalData.codeNo == null) {
- this.$message.warning('请选择属性模板!')
- return
- }
+ // if (this.modalData.codeNo === '' || this.modalData.codeNo == null) {
+ // this.$message.warning('请选择属性模板!')
+ // return
+ // }
if (this.modalData.active === '' || this.modalData.active == null) {
this.$message.warning('请选择是否在用!')
return
@@ -1048,7 +1191,7 @@
// ======== 附件的相关方法 ========
/**
- * 获取报价单附件列表
+ * 获取材料附件列表
*/
getFileContentData () {
let currentData = {
@@ -1158,22 +1301,27 @@
}
if (val === 110) {
if(type === 1) {
- strVal = this.modalData.pGroupId1
+ strVal = this.modalData.productGroupId1
}
}
if (val === 111) {
if(type === 1) {
- strVal = this.modalData.pGroupId2
+ strVal = this.modalData.productGroupId2
}
}
if (val === 112) {
if(type === 1) {
- strVal = this.modalData.pGroupId3
+ strVal = this.modalData.productGroupId3
}
}
if (val === 113) {
if(type === 1) {
- strVal = this.modalData.pGroupId4
+ strVal = this.modalData.productGroupId4
+ }
+ }
+ if (val === 114) {
+ if(type === 1) {
+ strVal = this.modalData.manufacturerId
}
}
this.$refs.baseList.init(val, strVal)
@@ -1204,26 +1352,32 @@
}
if (this.tagNo === 110) {
if(this.tagNo1 === 1) {
- this.modalData.pGroupId1 = val.product_group_id
- this.modalData.pGroupName1 = val.product_group_name
+ this.modalData.productGroupId1 = val.product_group_id
+ this.modalData.productGroupName1 = val.product_group_name
}
}
if (this.tagNo === 111) {
if(this.tagNo1 === 1) {
- this.modalData.pGroupId2 = val.product_group_id
- this.modalData.pGroupName2 = val.product_group_name
+ this.modalData.productGroupId2 = val.product_group_id
+ this.modalData.productGroupName2 = val.product_group_name
}
}
if (this.tagNo === 112) {
if(this.tagNo1 === 1) {
- this.modalData.pGroupId3 = val.product_group_id
- this.modalData.pGroupName3 = val.product_group_name
+ this.modalData.productGroupId3 = val.product_group_id
+ this.modalData.productGroupName3 = val.product_group_name
}
}
if (this.tagNo === 113) {
if(this.tagNo1 === 1) {
- this.modalData.pGroupId4 = val.product_group_id
- this.modalData.pGroupName4 = val.product_group_name
+ this.modalData.productGroupId4 = val.product_group_id
+ this.modalData.productGroupName4 = val.product_group_name
+ }
+ }
+ if (this.tagNo === 114) {
+ if(this.tagNo1 === 1) {
+ this.modalData.manufacturerId = val.manufacturer_id
+ this.modalData.manufacturerName = val.manufacturer_name
}
}
},
@@ -1266,5 +1420,8 @@
padding: 0px !important;
height: 459px;
}
+/deep/ .customer-tab .el-tabs__content {
+ height: 294px;
+}