更新
This commit is contained in:
18
src/api/PurchasingCenter/OfflinePartsQuery.js
Normal file
18
src/api/PurchasingCenter/OfflinePartsQuery.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
import state from '@/store'
|
||||||
|
import router from '@/router'
|
||||||
|
|
||||||
|
export function searchTable(check, partsName, check1, supplierNameValue, check2, start, end, pageCurrent, pageSize) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '1',
|
||||||
|
name: '采购管理_离线合同_采购件_查询数据',
|
||||||
|
param: '名称_check=' + check + '&名称=' + partsName + '&合同及供应商_check=' + check1 + '&合同及供应商=' + supplierNameValue + '&时间段_check=' + check2 + '&开始时间=' + start + '&结束时间=' + end,
|
||||||
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
216
src/views/PurchasingCenter/OfflinePartsQuery/index.vue
Normal file
216
src/views/PurchasingCenter/OfflinePartsQuery/index.vue
Normal file
@@ -0,0 +1,216 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||||
|
<el-input v-model="partsNameValue" size="small" placeholder="名称规格型号" style="width: 150px" clearable/>
|
||||||
|
<el-input v-model="supplierNameValue" size="small" placeholder="供应商合同编号" style="width: 150px" clearable/>
|
||||||
|
<el-date-picker v-model="timer" type="daterange" value-format="yyyy-MM-dd" size="small" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 240px"/>
|
||||||
|
<el-button icon="el-icon-search" type="primary" size="small" plain @click="pageCurrent = 1;pageSize = 50;getTableData()">查询</el-button>
|
||||||
|
<el-button type="success" class="el-icon-download" size="small" style="margin: 10px 0 0 10px" plain @click="exportExcel">导出</el-button>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card>
|
||||||
|
<el-table v-loading="loading" :data="tableData" border stripe size="mini" height="650" style="width: 1350px">
|
||||||
|
<el-table-column label="序号" align="center" type="index" width="55"/>
|
||||||
|
<el-table-column label="名称" align="center" width="150px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="图号或型号" align="center" width="140px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.图号或型号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="规格" align="center" width="140px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.规格 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="材料" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.材料 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="采购数量" align="center" width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="到货数量" align="center" width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.到货数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合同编号" align="center" width="160px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.离线合同编号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="供应商" align="center" width="220">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.供应商名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="采购员" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.采购员 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="采购日期" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.创建日期 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block" style="margin-top: 10px;">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="pageCurrent"
|
||||||
|
:page-sizes="[10, 20, 30, 50, 100]"
|
||||||
|
:page-size="pageSize"
|
||||||
|
:total="total"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChanges"
|
||||||
|
@current-change="handleCurrentChanges"/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { searchTable } from '@/api/PurchasingCenter/OfflinePartsQuery'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
timer: '',
|
||||||
|
partsNameValue: '',
|
||||||
|
supplierNameValue: '',
|
||||||
|
loading: false,
|
||||||
|
total: 0,
|
||||||
|
tableData: [],
|
||||||
|
procedure: [],
|
||||||
|
procedureTime: [],
|
||||||
|
pageCurrent: 1,
|
||||||
|
pageSize: 50,
|
||||||
|
tableData1: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
exportExcel() {
|
||||||
|
let check, check1, check2
|
||||||
|
this.partsNameValue ? check = 1 : check = 0
|
||||||
|
this.supplierNameValue ? check1 = 1 : check1 = 0
|
||||||
|
if (this.timer === null) {
|
||||||
|
this.timer = ''
|
||||||
|
}
|
||||||
|
if (this.timer[1] === undefined || this.timer[0] === undefined || this.timer[1] === null || this.timer[0] === null) {
|
||||||
|
check2 = 0
|
||||||
|
} else {
|
||||||
|
check2 = 1
|
||||||
|
}
|
||||||
|
var param = []
|
||||||
|
param[0] = ['名称_check', check]
|
||||||
|
param[1] = ['名称', this.partsNameValue]
|
||||||
|
param[2] = ['合同及供应商_check', check1]
|
||||||
|
param[3] = ['合同及供应商', this.supplierNameValue]
|
||||||
|
param[4] = ['时间段_check', check2]
|
||||||
|
if (check2 === 0) {
|
||||||
|
param[5] = ['开始时间', '']
|
||||||
|
param[6] = ['结束时间', '']
|
||||||
|
} else {
|
||||||
|
param[5] = ['开始时间', this.timer[0]]
|
||||||
|
param[6] = ['结束时间', this.timer[1]]
|
||||||
|
}
|
||||||
|
var Data = this.CreateData('2001', '报表_采购管理_离线合同_采购件_查询数据', param)
|
||||||
|
this.exportExcel_NPOI(Data)
|
||||||
|
},
|
||||||
|
getTableData() {
|
||||||
|
this.tableData = []
|
||||||
|
this.loading = true
|
||||||
|
let check, check1, check2
|
||||||
|
this.partsNameValue ? check = 1 : check = 0
|
||||||
|
this.supplierNameValue ? check1 = 1 : check1 = 0
|
||||||
|
if (this.timer === null) {
|
||||||
|
this.timer = ''
|
||||||
|
}
|
||||||
|
if (this.timer[1] === undefined || this.timer[0] === undefined || this.timer[1] === null || this.timer[0] === null) {
|
||||||
|
check2 = 0
|
||||||
|
} else {
|
||||||
|
check2 = 1
|
||||||
|
}
|
||||||
|
searchTable(check, this.partsNameValue, check1, this.supplierNameValue, check2, this.timer[0], this.timer[1], this.pageCurrent, this.pageSize).then(response => {
|
||||||
|
this.tableData = response.data.rows
|
||||||
|
console.log(response, 111)
|
||||||
|
this.total = response.data.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSizeChanges(val) {
|
||||||
|
this.pageCurrent = 1
|
||||||
|
this.pageSize = val
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
handleCurrentChanges(val) {
|
||||||
|
this.pageCurrent = val
|
||||||
|
this.getTableData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
span{
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
.wrapper{
|
||||||
|
width: 225px;
|
||||||
|
height: 50px;
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid #b8c7d9;
|
||||||
|
float: left;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
.content{
|
||||||
|
position: relative;
|
||||||
|
padding: 8px 8px 0 8px;
|
||||||
|
}
|
||||||
|
.action{
|
||||||
|
position: absolute;
|
||||||
|
top: 4px;
|
||||||
|
right: 8px;
|
||||||
|
}
|
||||||
|
.delete{
|
||||||
|
padding: 0 5px;
|
||||||
|
border-radius: 3px;
|
||||||
|
color: #0f84b0;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.delete:hover{
|
||||||
|
background: -webkit-linear-gradient(top,#0ba9e3,#0099d3);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
a{
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.icon{
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 7px;
|
||||||
|
margin-top: 2px;
|
||||||
|
font-size: 26px;
|
||||||
|
}
|
||||||
|
.info{
|
||||||
|
position: absolute;
|
||||||
|
left: 44px;
|
||||||
|
line-height: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
.el-card {
|
||||||
|
padding: 0px !important;
|
||||||
|
margin: 0px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user