Browse Source

2023-11-20 plm提交

master
杨奉源 2 years ago
parent
commit
3f34b33a68
  1. 8
      src/api/part/partInformation.js
  2. 307
      src/views/modules/part/partInformation.vue

8
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

307
src/views/modules/part/partInformation.vue

@ -29,8 +29,6 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<!-- </el-form>-->
<!-- <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">-->
<el-form-item :label="'材料描述'">
<el-input v-model="searchData.partDesc" clearable style="width: 120px"></el-input>
</el-form-item>
@ -148,21 +146,21 @@
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item>
<span slot="label" @click="getBaseList(110,1)"><a herf="#">商品组1</a></span>
<el-input v-model="modalData.pGroupName1" style="width: 221px"></el-input>
<el-input v-model="modalData.productGroupName1" style="width: 221px"></el-input>
</el-form-item>
<el-form-item>
<span slot="label" @click="getBaseList(111,1)"><a herf="#">商品组2</a></span>
<el-input v-model="modalData.pGroupName2" style="width: 221px"></el-input>
<el-input v-model="modalData.productGroupName2" style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item>
<span slot="label" @click="getBaseList(112,1)"><a herf="#">商品组3</a></span>
<el-input v-model="modalData.pGroupName3" style="width: 221px"></el-input>
<el-input v-model="modalData.productGroupName3" style="width: 221px"></el-input>
</el-form-item>
<el-form-item>
<span slot="label" @click="getBaseList(113,1)"><a herf="#">商品组4</a></span>
<el-input v-model="modalData.pGroupName4" style="width: 221px"></el-input>
<el-input v-model="modalData.productGroupName4" style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
@ -203,10 +201,41 @@
</el-dialog>
<!-- 页签 -->
<el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; height: 100%;" type="border-card" @tab-click="tabClick" class="customer-tab">
<el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; min-height: 294px" type="border-card" @tab-click="tabClick" class="customer-tab">
<!-- 材料属性页签 -->
<el-tab-pane label="材料属性" name="part_item">
<el-table
:data="partItemList"
:height="secondHeight"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnItemList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
header-align="center"
align="center"
width="150"
fixed="right"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="updateModel(scope.row)">编辑</a>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
@ -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;
}
</style>
Loading…
Cancel
Save