Browse Source

2024-11-15

master
fengyuan_yang 1 year ago
parent
commit
246433dcd2
  1. 2
      src/api/part/partInformation.js
  2. 75
      src/views/modules/part/partInformation.vue
  3. 61
      src/views/modules/project/projectInfo/com_project_info_part.vue

2
src/api/part/partInformation.js

@ -307,3 +307,5 @@ export const downLoadFile = data => createAPI(`/plm/partInformation/downLoadFile
export const getPartRevisionEngChgLevel = data => createAPI(`/plm/partInformation/getPartRevisionEngChgLevel`,'post',data) export const getPartRevisionEngChgLevel = data => createAPI(`/plm/partInformation/getPartRevisionEngChgLevel`,'post',data)
export const queryPartUnitCostList = data => createAPI(`/plm/partInformation/queryPartUnitCostList`,'post',data)

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

@ -332,6 +332,28 @@
<el-input-number :controls="false" :step="0" v-model="modalData.estimatedMaterialCost" style="width: 461px"></el-input-number> <el-input-number :controls="false" :step="0" v-model="modalData.estimatedMaterialCost" style="width: 461px"></el-input-number>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table
:data="unitCostList"
height="320px"
border
ref="unitCostTable"
style="width:100%">
<el-table-column
v-for="(item,index) in columnUnitCostList" :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>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="Misc Part Info" name="MiscPartInfo"> <el-tab-pane label="Misc Part Info" name="MiscPartInfo">
@ -1433,6 +1455,7 @@
getProjectPartNo, // getProjectPartNo, //
getNextPartNo, // getNextPartNo, //
getPartRevisionEngChgLevel, // revision getPartRevisionEngChgLevel, // revision
queryPartUnitCostList, // unitCost
} from '@/api/part/partInformation.js' } from '@/api/part/partInformation.js'
import { import {
getFileContentList, // getFileContentList, //
@ -1744,6 +1767,7 @@
itemList1:[], itemList1:[],
itemList2:[], itemList2:[],
revisionList: [], revisionList: [],
unitCostList: [],
bomAlternativeList: [], bomAlternativeList: [],
routingAlternativeList: [], routingAlternativeList: [],
copyAttributeList: [], copyAttributeList: [],
@ -2914,6 +2938,38 @@
fixed: '', fixed: '',
}, },
], ],
columnUnitCostList: [
{
columnProp: 'lotBatchNo',
headerAlign: "center",
align: "center",
columnLabel: 'Lot/Batch No',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
{
columnProp: 'serialNo',
headerAlign: "center",
align: "center",
columnLabel: 'Serial No',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
{
columnProp: 'inventoryValue',
headerAlign: "center",
align: "center",
columnLabel: 'Unit Cost',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
],
columnBomAlternativeList: [ columnBomAlternativeList: [
{ {
columnProp: 'engChgLevel', columnProp: 'engChgLevel',
@ -3157,6 +3213,9 @@
// table // table
refreshInventoryPartTable () { refreshInventoryPartTable () {
if (this.inventoryPartTable === 'Costs') {
this.queryPartUnitCostList()
}
if (this.inventoryPartTable === 'Revisions') { if (this.inventoryPartTable === 'Revisions') {
this.queryPartRevisionList() this.queryPartRevisionList()
} }
@ -3177,6 +3236,22 @@
}) })
}, },
// unitCost
queryPartUnitCostList () {
let tempData = {
site: this.modalData.site,
partNo: this.modalData.partNo,
configurationId: this.modalData.configurationId
}
queryPartUnitCostList(tempData).then(({data}) => {
if (data && data.code === 0) {
this.unitCostList = data.rows
} else {
this.unitCostList = []
}
})
},
// revision // revision
savePartRevisionModal () { savePartRevisionModal () {
this.revisionData = { this.revisionData = {

61
src/views/modules/project/projectInfo/com_project_info_part.vue

@ -591,6 +591,12 @@
<el-form-item :label="'物料名称'"> <el-form-item :label="'物料名称'">
<el-input v-model="partData.partDesc" clearable style="width: 120px"></el-input> <el-input v-model="partData.partDesc" clearable style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'物料状态'">
<el-select v-model="searchData.searchType" @change="searchTypeChange" style="width: 120px">
<el-option label="Project Part" value="Y"></el-option>
<el-option label="Inventory Part" value="N"></el-option>
</el-select>
</el-form-item>
<el-form-item label=" "> <el-form-item label=" ">
<el-button type="primary" @click="getPartList">查询</el-button> <el-button type="primary" @click="getPartList">查询</el-button>
</el-form-item> </el-form-item>
@ -688,6 +694,16 @@
align="left" align="left"
min-width="120" min-width="120"
label="BU"> label="BU">
<template slot-scope="scope">
<el-select v-model="scope.row.buNo" style="width:98%">
<el-option
v-for = "i in buList"
:key = "i.buNo"
:label = "i.buNo"
:value = "i.buNo">
</el-option>
</el-select>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="buDesc" prop="buDesc"
@ -724,6 +740,9 @@
</template> </template>
<script> <script>
import {
getBuBySite, // sitebu
} from '@/api/changeManagement/changeManagement.js'
import { import {
getProjectInfoPartList, getProjectInfoPartList,
saveProjectPart, saveProjectPart,
@ -795,7 +814,8 @@
site: '', site: '',
username: this.$store.state.user.name, username: this.$store.state.user.name,
projectId: '', projectId: '',
customerId: ''
customerId: '',
searchType: 'Y'
}, },
visible: false, visible: false,
dataListLoading: false, dataListLoading: false,
@ -1413,10 +1433,28 @@
partNo: '', partNo: '',
partDesc: '' partDesc: ''
}, },
partModelFlag: false
partModelFlag: false,
buList: [],
} }
}, },
created() {
this.getBuBySite()
},
methods: { methods: {
// bu
getBuBySite () {
let tempData = {
site: this.$store.state.user.site,
}
getBuBySite(tempData).then(({data}) => {
if (data.code === 0) {
this.buList = data.rows
}
})
},
/** /**
* 获取基础数据列表S * 获取基础数据列表S
* @param val * @param val
@ -1550,9 +1588,10 @@
// //
init(inData) { init(inData) {
// //
this.searchData = JSON.parse(JSON.stringify(inData));
this.searchData = JSON.parse(JSON.stringify(inData))
this.searchData.searchType = 'Y'
// //
this.searchTable();
this.searchTable()
}, },
@ -2004,6 +2043,7 @@
this.partSelections2 = [] this.partSelections2 = []
this.partList1 = [] this.partList1 = []
this.partList2 = [] this.partList2 = []
this.searchData.searchType = 'Y'
getProjectPartList(this.searchData).then(({data}) => { getProjectPartList(this.searchData).then(({data}) => {
this.partListAll = data.row1 this.partListAll = data.row1
this.partList1 = this.partListAll this.partList1 = this.partListAll
@ -2016,6 +2056,19 @@
}) })
}, },
//
searchTypeChange () {
getProjectPartList(this.searchData).then(({data}) => {
this.partListAll = data.row1
this.partList1 = this.partListAll
this.partData = {
site: this.$store.state.user.site,
partNo: '',
partDesc: ''
}
})
},
// //
refreshDetailList () { refreshDetailList () {
this.searchTable() this.searchTable()

Loading…
Cancel
Save