离线合同请款
This commit is contained in:
@@ -1,27 +1,38 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询请款表
|
||||
export function searchRequestFund(pageCurrent, pageSize, check1, start, end) {
|
||||
export function searchRequestFund(pageCurrent, pageSize, check1, start, end, check2, num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_离线合同_请款_查询数据',
|
||||
param: `时间段_check=${check1}&开始时间=${start}&结束时间=${end}`,
|
||||
param: `时间段_check=${check1}&开始时间=${start}&结束时间=${end}&供应商流水号_check=${check2}&供应商流水号=${num}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线合同待请款信息
|
||||
export function searchOfflineContract(num) {
|
||||
// 查询供应商
|
||||
export function searchSupplier() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_离线合同_待请款_查询数据',
|
||||
param: `供应商流水号=${num}`
|
||||
name: '采购管理_供应商_查询数据_根据条件'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线合同待请款信息
|
||||
export function searchOfflineContract(check, num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_离线合同_查询数据',
|
||||
param: `供应商流水号_check=${check}&供应商流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -14,6 +14,14 @@
|
||||
range-separator="~"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>供应商:</span>
|
||||
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small" 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-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -24,7 +32,7 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini" show-summary>
|
||||
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini">
|
||||
<el-table-column label="供应商" align="center" min-width="250">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
@@ -73,7 +81,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table :data="gridData" stripe size="mini" show-summary>
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="离线合同编号">
|
||||
@@ -81,7 +89,12 @@
|
||||
{{ scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
|
||||
<el-table-column min-width="100" align="center" label="已付金额" prop="已付金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已付金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="请款金额" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
@@ -103,10 +116,16 @@
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
<span>合同累计总额:</span>
|
||||
<el-input v-model="totalSum" size="mini" style="width: 100px;" readonly/>
|
||||
<span>累计付款:</span>
|
||||
<el-input v-model="totalPay" size="mini" style="width: 100px;" readonly/>
|
||||
<span>累计欠款:</span>
|
||||
<el-input v-model="totalDebt" size="mini" style="width: 100px;" readonly/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible2" title="离线合同请款" center style="min-height: 300px" width="1000px">
|
||||
<el-dialog :visible.sync="dialogVisible2" title="离线合同请款" center style="min-height: 300px" width="1200px">
|
||||
<span>供应商:</span>
|
||||
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small">
|
||||
<el-option
|
||||
@@ -121,7 +140,7 @@
|
||||
icon="el-icon-search"
|
||||
style="margin: 0 10px 10px 10px"
|
||||
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable01()">查询</el-button>
|
||||
<el-table v-loading="" :data="tableData01" border style="max-height: 300px;" height="300px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="" :data="tableData01" border style="max-height: 500px;" height="500px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
|
||||
<el-table-column label="离线合同编号" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
@@ -133,43 +152,49 @@
|
||||
{{ scope.row.离线合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="250">
|
||||
<el-table-column label="供应商" align="center" min-width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" align="center" min-width="100">
|
||||
<el-table-column label="采购员" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购员 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款方式" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.付款方式内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同总额" align="center" min-width="100" prop="合同总额" fixed="right">
|
||||
<el-table-column label="合同总额" align="center" width="100" prop="合同总额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同总额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已付金额" align="center" min-width="100" prop="已付金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已付金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.请款金额" size="mini" style="width: 100%;"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span>合计:<el-input v-model="SUM" size="mini" style="width: 80px; margin: 10px 10px 0 10px"/>元</span>
|
||||
<span>合计:<el-input v-model="SUM" readonly size="mini" style="width: 80px; margin: 10px 10px 0 10px"/>元</span>
|
||||
<el-button type="primary" size="small" style="float:right;margin: 10px 10px 0 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchRequestFund, searchOfflineContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/PurchasingCenter/OfflineContractRequestFund'
|
||||
import { searchRequestFund, searchSupplier, searchOfflineContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/PurchasingCenter/OfflineContractRequestFund'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 离线合同
|
||||
data() {
|
||||
return {
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
totalSum: 0,
|
||||
totalPay: 0,
|
||||
totalDebt: 0,
|
||||
dateRange: '',
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
@@ -232,7 +257,7 @@ export default {
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.supplier = []
|
||||
searchOfflineContract().then(response => {
|
||||
searchSupplier().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.supplier.push({
|
||||
label: response.data[i].供应商名称,
|
||||
@@ -242,11 +267,22 @@ export default {
|
||||
})
|
||||
},
|
||||
searchTable1() { // 查询请款表
|
||||
this.dateRange ? this.check1 = 1 : (this.check1 = 0, this.dateRange = '')
|
||||
searchRequestFund(this.pageCurrent1, this.pageSize1, this.check1, this.dateRange[0], this.dateRange[1]).then(response => {
|
||||
let check1, check2
|
||||
this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '')
|
||||
this.supplierValue ? check2 = 1 : check2 = 0
|
||||
searchRequestFund(this.pageCurrent1, this.pageSize1, check1, this.dateRange[0], this.dateRange[1], check2, this.supplierValue).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
this.totalSum = 0
|
||||
this.totalPay = 0
|
||||
searchOfflineContract(check2, this.supplierValue).then(response => {
|
||||
response.data.map(data => {
|
||||
this.totalSum += data.合同总额
|
||||
this.totalPay += data.已付金额
|
||||
})
|
||||
this.totalDebt = this.totalSum - this.totalPay
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
@@ -266,8 +302,15 @@ export default {
|
||||
searchTable01() { // 查询待请款
|
||||
if (this.supplierValue) {
|
||||
this.contractGroup = []
|
||||
searchOfflineContract(this.supplierValue).then(response => {
|
||||
let check
|
||||
this.supplierValue ? check = 1 : check = 0
|
||||
searchOfflineContract(check, this.supplierValue).then(response => {
|
||||
this.tableData01 = response.data
|
||||
this.tableData01.map(v => {
|
||||
this.$set(v, '请款金额', 0)
|
||||
v.请款金额 = v.合同总额 - v.已付金额
|
||||
return v
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择供应商')
|
||||
@@ -277,10 +320,11 @@ export default {
|
||||
this.SUM = 0
|
||||
this.contractGroup = []
|
||||
this.sumGroup = []
|
||||
console.log(val)
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.SUM += parseFloat(val[i].合同总额)
|
||||
this.SUM += parseFloat(val[i].请款金额)
|
||||
this.contractGroup.push(val[i].离线合同流水号)
|
||||
this.sumGroup.push(val[i].合同总额)
|
||||
this.sumGroup.push(val[i].请款金额)
|
||||
}
|
||||
},
|
||||
selectable(row, index) { // 控制某行是否可选
|
||||
|
||||
Reference in New Issue
Block a user