更新
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-input v-model="billNames" clearable filterable size="small" placeholder="供应商或合同编号" style="width: 200px;margin: 5px"/>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 120px">
|
||||
<!-- <el-input v-model="billNames" clearable filterable size="small" placeholder="供应商或合同编号" style="width: 200px;margin: 5px"/>-->
|
||||
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small" style="margin-left: 5px" clearable @change="totalSum=0;totalPay=0;totalDebt=0;">
|
||||
<el-option
|
||||
v-for="item in supplier"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 120px" clearable>
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
@@ -21,14 +28,14 @@
|
||||
range-separator="~"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=50;searchTable1()">查询</el-button>
|
||||
<el-radio v-model="radio" label="1" style="margin: 0 0 0 10px">全部</el-radio>
|
||||
<el-radio v-model="radio" label="2" style="margin: 0 0 0 10px">通过</el-radio>
|
||||
<el-radio v-model="radio" label="3" style="margin: 0 0 0 10px">未过</el-radio>
|
||||
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=50;searchTable1()">查询</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;margin-right: 20px;float: right" plain @click="exportTable('')">导出</el-button>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 5px">
|
||||
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row>
|
||||
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row @row-click="searchTable2">
|
||||
<el-table-column label="供应商" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
@@ -83,7 +90,7 @@
|
||||
</el-card>
|
||||
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="请款信息明细" center width="800px">
|
||||
<el-table :data="gridData1" border highlight-current-row size="mini" height="300px">
|
||||
<el-table :data="gridData1" border highlight-current-row size="mini">
|
||||
<el-table-column min-width="150" align="center" label="合同编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
|
||||
@@ -110,7 +117,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initBuyer, searchTable1, searchTable2 } from '@/api/ManufacturingCenter/RequestApprovalQuery'
|
||||
import { initBuyer, searchTable1, searchTable2, searchSupplier } from '@/api/ManufacturingCenter/RequestApprovalQuery'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
@@ -118,6 +125,8 @@ export default {
|
||||
return {
|
||||
radio: '1',
|
||||
billNames: '',
|
||||
supplier: [],
|
||||
supplierValue: '',
|
||||
person: [],
|
||||
personValue: '',
|
||||
dateRange: '',
|
||||
@@ -141,8 +150,20 @@ export default {
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
this.searchSupplier()
|
||||
},
|
||||
methods: {
|
||||
searchSupplier() {
|
||||
this.supplier = []
|
||||
searchSupplier().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.supplier.push({
|
||||
label: response.data[i].供应商名称,
|
||||
value: response.data[i].供应商流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fetchData() {
|
||||
this.person = []
|
||||
initBuyer().then(response => {
|
||||
@@ -157,10 +178,10 @@ export default {
|
||||
searchTable1() {
|
||||
this.loading1 = true
|
||||
var check1, check2, check3
|
||||
this.billNames ? check1 = 1 : check1 = 0
|
||||
this.supplierValue ? check1 = 1 : check1 = 0
|
||||
this.dateRange ? check2 = 1 : (check2 = 0, this.dateRange = '')
|
||||
this.personValue ? check3 = 1 : check3 = 0
|
||||
searchTable1(this.radio, check1, this.billNames, check2, this.dateRange[0], this.dateRange[1], check3, this.personValue, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
searchTable1(this.radio, check1, this.supplierValue, check2, this.dateRange[0], this.dateRange[1], check3, this.personValue, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
console.log(response.data)
|
||||
this.loading1 = false
|
||||
this.tableData1 = response.data.rows
|
||||
@@ -169,13 +190,13 @@ export default {
|
||||
},
|
||||
exportTable() {
|
||||
var check1, check2, check3
|
||||
this.billNames ? check1 = 1 : check1 = 0
|
||||
this.supplierValue ? check1 = 1 : check1 = 0
|
||||
this.dateRange ? check2 = 1 : (check2 = 0, this.dateRange = '')
|
||||
this.personValue ? check3 = 1 : check3 = 0
|
||||
var param = []
|
||||
param[0] = ['查询全部', this.radio]
|
||||
param[1] = ['供应商名称_check', check1]
|
||||
param[2] = ['供应商名称', this.billNames]
|
||||
param[2] = ['供应商名称', this.supplierValue]
|
||||
param[3] = ['时间段_check', check2]
|
||||
if (check2 === 0) {
|
||||
param[4] = ['开始时间', '']
|
||||
|
||||
Reference in New Issue
Block a user