This commit is contained in:
liushuai
2020-03-11 18:09:43 +08:00
15 changed files with 973 additions and 187 deletions

View File

@@ -0,0 +1,175 @@
<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-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-left: 0">提交时间:</span>
<el-date-picker
v-model="dateRange"
size="small"
type="daterange"
align="center"
style="width: 300px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<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-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 @row-click="searchTable2">
<el-table-column label="采购合同编号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="合同金额(元)" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
</template>
</el-table-column>
<el-table-column label="预付款(元)" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.预付款 }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.规定到货时间 }}
</template>
</el-table-column>
<el-table-column label="提交时间" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.提交时间 }}
</template>
</el-table-column>
<el-table-column label="审核时间" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审核时间 }}
</template>
</el-table-column>
<el-table-column label="审核人" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审核人 }}
</template>
</el-table-column>
<el-table-column label="审核结果" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审核结果 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[50, 100, 150, 200]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="合同审批通知" center style="min-height: 300px;" width="370px">
<div style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
</el-dialog>
</div>
</template>
<script>
import { initBuyer, searchTable1, searchTable2 } from '@/api/ManufacturingCenter/ContractApprovalQuery'
export default {
data() {
return {
radio: '1',
billNames: '',
person: [],
personValue: '',
dateRange: '',
total1: 0,
pageCurrent1: 1,
pageSize1: 50,
tableData1: [],
loading1: false,
dialogFormVisible: false,
returns: ''
}
},
created() {
this.fetchData()
this.searchTable1()
},
methods: {
fetchData() {
this.person = []
initBuyer().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.person.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
searchTable1() {
this.loading1 = true
var check1, check2, check3
this.billNames ? 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 => {
console.log(response.data)
this.loading1 = false
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
searchTable2(row) {
this.contractValue = parseInt(row.采购合同流水号)
searchTable2(this.contractValue).then(response => {
this.returns = response.data[0].合同内容
})
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
}
}
}
</script>
<style scoped>
</style>
<style>
#table .el-form-item {
margin: 0;
}
</style>

View File

@@ -0,0 +1,193 @@
<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-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-left: 0">提交时间:</span>
<el-date-picker
v-model="dateRange"
size="small"
type="daterange"
align="center"
style="width: 300px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<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-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 @row-click="searchTable2">
<el-table-column label="采购合同编号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="合同金额(元)" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
</template>
</el-table-column>
<el-table-column label="预付款(元)" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.预付款 }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.规定到货时间 }}
</template>
</el-table-column>
<el-table-column label="提交时间" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.提交时间 }}
</template>
</el-table-column>
<el-table-column label="审核时间" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审核时间 }}
</template>
</el-table-column>
<el-table-column label="审核人" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审核人 }}
</template>
</el-table-column>
<el-table-column label="审核结果" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审核结果 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[50, 100, 150, 200]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
</div>
</template>
<script>
import { initBuyer, searchTable1, searchTable2 } from '@/api/ManufacturingCenter/RequestApprovalQuery'
import { mapGetters } from 'vuex'
export default {
data() {
return {
radio: '1',
billNames: '',
person: [],
personValue: '',
dateRange: '',
total1: 0,
pageCurrent1: 1,
pageSize1: 50,
tableData1: [],
loading1: false,
dialogFormVisible: false,
returns: ''
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
this.searchTable1()
},
methods: {
fetchData() {
this.person = []
initBuyer().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.person.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
searchTable1() {
this.loading1 = true
var check1, check2, check3
this.billNames ? 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 => {
console.log(response.data)
this.loading1 = false
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
searchTable2(row) {
this.contractValue = parseInt(row.采购合同流水号)
searchTable2(this.contractValue).then(response => {
this.returns = response.data[0].合同内容
})
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 0px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
.el-tag{
margin: 0
}
</style>