Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
This commit is contained in:
51
src/api/PurchasingCenter/PurchaseSituationSearch.js
Normal file
51
src/api/PurchasingCenter/PurchaseSituationSearch.js
Normal file
@@ -0,0 +1,51 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 初始化机床项目
|
||||
export function initMachineProject() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 组件查询
|
||||
export function searchgroup(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_组件名称_查询数据',
|
||||
param: '机床流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询表1标准件和外购件
|
||||
export function searchTable1(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购部采购_查询物料',
|
||||
param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}`,
|
||||
Pagination: params[4] + '&' + params[5]
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询表1基本件
|
||||
export function searchTable2(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购部采购_查询物料_基本件',
|
||||
param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}`,
|
||||
Pagination: params[4] + '&' + params[5]
|
||||
}
|
||||
})
|
||||
}
|
||||
309
src/views/PurchasingCenter/PurchaseSituationSearch/index.vue
Normal file
309
src/views/PurchasingCenter/PurchaseSituationSearch/index.vue
Normal file
@@ -0,0 +1,309 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="machineChange">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="groupNumberValue" placeholder="组号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in groupNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchTable()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-tabs v-model="PartType" type="border-card" @tab-click="searchTable()">
|
||||
<el-tab-pane label="标准件和外购件" name="标准件和外购件">
|
||||
<el-table :data="tableData1" size="mini" style="max-height: 600px" height="600px" border stripe>
|
||||
<el-table-column align="center" label="采购情况" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="!scope.row.人员编号" type="primary" size="small">未分配</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="机床图号" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="组号" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="名称" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="型号" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="规格" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="技术下达数量" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="采购数量" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="到货数量" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已到货数量 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="供应商" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="采购合同编号" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="margin-top:10px;display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="基本件" name="基本件">
|
||||
<el-table :data="tableData2" size="mini" style="max-height: 600px" height="600px" border stripe>
|
||||
<el-table-column align="center" label="采购情况" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="!scope.row.人员编号" type="primary" size="small">未分配</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="机床图号" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="组号" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="名称" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="图号" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="规格" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="材料" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="技术下达数量" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="采购数量" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="到货数量" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已到货数量 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="供应商" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="采购合同编号" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize2"
|
||||
:total="total2"
|
||||
style="margin-top:10px;display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initMachineProject, searchgroup, searchTable1, searchTable2 } from '@/api/PurchasingCenter/PurchaseSituationSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: '', // 采购件采购查询
|
||||
data() {
|
||||
return {
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
groupNumberValue: '',
|
||||
groupNumber: [],
|
||||
PartType: '标准件和外购件',
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 20,
|
||||
total1: 0,
|
||||
pageCurrent2: 1,
|
||||
pageSize2: 20,
|
||||
total2: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initMachineProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.groupNumberValue = ''
|
||||
this.groupNumber = []
|
||||
searchgroup(this.machineNumberValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.groupNumber.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
if (this.PartType === '标准件和外购件') {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = 20
|
||||
this.total1 = 0
|
||||
this.searchTable1()
|
||||
} else if (this.PartType === '基本件') {
|
||||
this.pageCurrent2 = 1
|
||||
this.pageSize2 = 20
|
||||
this.total2 = 0
|
||||
this.searchTable2()
|
||||
}
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageSize2 = val
|
||||
this.pageCurrent2 = 1
|
||||
this.searchTable2()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable2()
|
||||
},
|
||||
searchTable1() { // 查询标准件和外购件
|
||||
this.total1 = 0
|
||||
let check1, check2
|
||||
this.machineNumberValue ? check1 = 1 : check1 = 0
|
||||
this.groupNumberValue ? check2 = 1 : check2 = 0
|
||||
searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
searchTable2() { // 查询基本件
|
||||
this.total2 = 0
|
||||
let check1, check2
|
||||
this.machineNumberValue ? check1 = 1 : check1 = 0
|
||||
this.groupNumberValue ? check2 = 1 : check2 = 0
|
||||
searchTable2(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.el-tag{
|
||||
margin: 0
|
||||
}
|
||||
</style>
|
||||
@@ -74,15 +74,7 @@
|
||||
<el-input v-model="materialName" placeholder="物料名称" style="width:170px" size="small" clearable/>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 10px">
|
||||
<el-table
|
||||
v-loading=""
|
||||
:data="tableData1"
|
||||
size="mini"
|
||||
style="max-height: 600px"
|
||||
height="600px"
|
||||
border
|
||||
stripe
|
||||
@selection-change="handleSelectionChange1">
|
||||
<el-table v-loading="" :data="tableData1" size="mini" style="max-height: 600px" height="600px" border stripe @selection-change="handleSelectionChange1">
|
||||
<el-table-column :selectable="selectable" align="center" type="selection"/>
|
||||
<el-table-column align="center" label="采购情况" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
@@ -208,15 +200,7 @@
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 10px">
|
||||
<el-table
|
||||
v-loading=""
|
||||
:data="tableData2"
|
||||
size="mini"
|
||||
style="max-height: 600px"
|
||||
height="600px"
|
||||
border
|
||||
stripe
|
||||
@selection-change="handleSelectionChange2">
|
||||
<el-table v-loading="" :data="tableData2" size="mini" style="max-height: 600px" height="600px" border stripe @selection-change="handleSelectionChange2">
|
||||
<el-table-column :selectable="selectable" align="center" type="selection"/>
|
||||
<el-table-column align="center" label="采购情况" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
@@ -365,8 +349,6 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id'
|
||||
])
|
||||
|
||||
@@ -24,7 +24,7 @@ export default {
|
||||
<style scoped>
|
||||
.app-main {
|
||||
/*50 = navbar */
|
||||
min-height: calc(100vh - 50px);
|
||||
min-height: calc(100% - 50px);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
background-color="#304156"
|
||||
text-color="#cccccc"
|
||||
active-text-color="#409EFF"
|
||||
style="height:calc(100% - 124px)"
|
||||
>
|
||||
<sidebar-item v-for="route in permission_routers" :key="route.name" :item="route" :base-path="route.path"/>
|
||||
</el-menu>
|
||||
|
||||
Reference in New Issue
Block a user