Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
This commit is contained in:
@@ -7,7 +7,7 @@ export function initApproval(pageCurrent, pageSize, state) {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_请款表_查询数据_审批付款',
|
||||
name: '采购管理_采购合同_审批付款_查询数据',
|
||||
param: `审批_付款状态=${state}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
@@ -20,8 +20,8 @@ export function execApproval(num1, num2, reason, person, state) {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_请款表_修改数据_审批付款',
|
||||
param: `采购请款流水号=${num1}&审批_付款情况流水号=${num2}&未通过原因=${reason}&操作员编号=${person}&审批_付款状态=${state}`
|
||||
name: '采购管理_采购合同_审批付款_修改数据',
|
||||
param: `采购合同请款流水号=${num1}&审批_付款情况流水号=${num2}&未通过原因=${reason}&操作员编号=${person}&审批_付款状态=${state}`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -39,7 +39,19 @@ export function initApprovalOffline(pageCurrent, pageSize, state) {
|
||||
})
|
||||
}
|
||||
// 查询离线合同请款信息明细
|
||||
export function searchRequsetFundDetail(num) {
|
||||
export function searchRequsetFundDetail1(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购合同_请款明细_查询数据',
|
||||
param: `采购合同请款流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线合同请款信息明细
|
||||
export function searchRequsetFundDetail2(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
|
||||
@@ -11,66 +11,6 @@ export function searchTable0(check, date1, date2) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化合同
|
||||
export function initContract() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购请款表_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询表1
|
||||
export function searchTable1(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购请款表_查询数据',
|
||||
param: '采购合同流水号_check=' + params[2] + '&采购合同流水号=' + params[3] + '&供应商名称_check=' + params[4] + '&供应商名称=' + params[5],
|
||||
Pagination: params[0] + '&' + params[1]
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询请款进度
|
||||
export function searchCondition(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购请款表_请款进度_查询数据',
|
||||
param: '采购合同流水号=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 请款
|
||||
export function requestFund(num1, money, time, id) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_采购请款表_增加数据',
|
||||
param: `采购合同流水号=${num1}&请款金额=${money}&请款人=${id}&请款时间=${time}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 取消请款
|
||||
export function cancelRequestFund(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购请款表_删除数据',
|
||||
param: '采购请款流水号=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 采购合同内容查询
|
||||
export function searchContract(num) {
|
||||
return request({
|
||||
@@ -83,3 +23,75 @@ export function searchContract(num) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询请款表
|
||||
export function searchRequestFund(pageCurrent, pageSize, check1, start, end, check2, num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购合同_请款_查询数据',
|
||||
param: `时间段_check=${check1}&开始时间=${start}&结束时间=${end}&供应商流水号_check=${check2}&供应商流水号=${num}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询供应商
|
||||
export function searchSupplier() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_供应商_查询数据_根据条件'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线合同待请款信息
|
||||
export function submitRequestFund(contractGroup, sumGroup, supplier, money, person) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_采购合同_请款_增加数据',
|
||||
param: `采购合同流水号组=${contractGroup}&合同总额组=${sumGroup}&供应商流水号=${supplier}&请款金额=${money}&请款人=${person}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线合同待请款信息
|
||||
export function searchRequsetFundDetail(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购合同_请款明细_查询数据',
|
||||
param: `采购合同请款流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 取消请款
|
||||
export function cancelRequestFund(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购合同_请款_删除数据',
|
||||
param: `采购合同请款流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线合同待请款信息
|
||||
export function searchPurchaseContract(check, num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购合同_查询数据',
|
||||
param: `供应商流水号_check=${check}&供应商流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,38 +2,44 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
|
||||
<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">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="150">
|
||||
<el-table-column label="供应商" align="center" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款人" align="center" min-width="70">
|
||||
<el-table-column label="请款时间" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款人 }}
|
||||
{{ scope.row.请款时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同总额" align="center" min-width="70">
|
||||
<el-table-column label="请款人" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同总额 }}
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="70">
|
||||
<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="200">
|
||||
<el-table-column label="审核" align="center" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData1" stripe size="mini" show-summary>
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="采购合同编号">
|
||||
<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>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-right: 10px" @click="searchTable01(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
|
||||
</template>
|
||||
@@ -77,7 +83,7 @@
|
||||
<el-table-column label="审核" align="center" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData" stripe size="mini" show-summary>
|
||||
<el-table :data="gridData2" stripe size="mini" show-summary>
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="离线合同编号">
|
||||
<template slot-scope="scope">
|
||||
@@ -113,7 +119,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
|
||||
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail1, searchRequsetFundDetail2, execApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
@@ -128,7 +134,8 @@ export default {
|
||||
pageSize2: 10,
|
||||
pageCurrent2: 1,
|
||||
total2: 0,
|
||||
gridData: []
|
||||
gridData1: [],
|
||||
gridData2: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -179,9 +186,14 @@ export default {
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable2()
|
||||
},
|
||||
searchTable01(row) { // 查看详情(请款信息包含的合同)
|
||||
searchRequsetFundDetail1(row.采购合同请款流水号).then(response => {
|
||||
this.gridData1 = response.data
|
||||
})
|
||||
},
|
||||
searchTable02(row) { // 查看详情(请款信息包含的合同)
|
||||
searchRequsetFundDetail(row.离线合同请款流水号).then(response => {
|
||||
this.gridData = response.data
|
||||
searchRequsetFundDetail2(row.离线合同请款流水号).then(response => {
|
||||
this.gridData2 = response.data
|
||||
})
|
||||
},
|
||||
yesApproval(row) { // 通过审批
|
||||
@@ -190,7 +202,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
execApproval(row.采购请款流水号, 1, '通过', this.id, 1).then(response => {
|
||||
execApproval(row.采购合同请款流水号, 1, '通过', this.id, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable1()
|
||||
@@ -208,7 +220,7 @@ export default {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
execApproval(row.采购请款流水号, 2, value, this.id, 1).then(response => {
|
||||
execApproval(row.采购合同请款流水号, 2, value, this.id, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable1()
|
||||
|
||||
@@ -2,38 +2,44 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
|
||||
<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">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="150">
|
||||
<el-table-column label="供应商" align="center" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款人" align="center" min-width="70">
|
||||
<el-table-column label="请款时间" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款人 }}
|
||||
{{ scope.row.请款时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同总额" align="center" min-width="70">
|
||||
<el-table-column label="请款人" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同总额 }}
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="70">
|
||||
<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="200">
|
||||
<el-table-column label="审核" align="center" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData1" stripe size="mini" show-summary>
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="采购合同编号">
|
||||
<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>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-right: 10px" @click="searchTable01(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
|
||||
</template>
|
||||
@@ -77,7 +83,7 @@
|
||||
<el-table-column label="付款" align="center" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData" stripe size="mini" show-summary>
|
||||
<el-table :data="gridData2" stripe size="mini" show-summary>
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="离线合同编号">
|
||||
<template slot-scope="scope">
|
||||
@@ -113,7 +119,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
|
||||
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail1, searchRequsetFundDetail2, execApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
@@ -128,7 +134,8 @@ export default {
|
||||
pageSize2: 10,
|
||||
pageCurrent2: 1,
|
||||
total2: 0,
|
||||
gridData: []
|
||||
gridData1: [],
|
||||
gridData2: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -178,9 +185,14 @@ export default {
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable2()
|
||||
},
|
||||
searchTable01(row) { // 查看详情(请款信息包含的合同)
|
||||
searchRequsetFundDetail1(row.采购合同请款流水号).then(response => {
|
||||
this.gridData1 = response.data
|
||||
})
|
||||
},
|
||||
searchTable02(row) { // 查看详情(请款信息包含的合同)
|
||||
searchRequsetFundDetail(row.离线合同请款流水号).then(response => {
|
||||
this.gridData = response.data
|
||||
searchRequsetFundDetail2(row.离线合同请款流水号).then(response => {
|
||||
this.gridData2 = response.data
|
||||
})
|
||||
},
|
||||
yesApproval(row) { // 通过付款
|
||||
@@ -189,7 +201,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
execApproval(row.采购请款流水号, 1, '通过', this.id, 2).then(response => {
|
||||
execApproval(row.采购合同请款流水号, 1, '通过', this.id, 2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
// 记录付款金额及时间
|
||||
@@ -208,7 +220,7 @@ export default {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
execApproval(row.采购请款流水号, 2, value, this.id, 2).then(response => {
|
||||
execApproval(row.采购合同请款流水号, 2, value, this.id, 2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable1()
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
<el-table-column label="操作" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table :data="gridData" stripe size="mini" show-summary @row-click="searchTable2">
|
||||
<el-table :data="gridData" highlight-current-row size="mini" show-summary @row-click="searchTable2">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="离线合同编号">
|
||||
<template slot-scope="scope">
|
||||
@@ -497,6 +497,7 @@ export default {
|
||||
this.$message.success('操作成功')
|
||||
this.searchTable1()
|
||||
} else if (response.data[0].result === '已审批') {
|
||||
this.searchTable1()
|
||||
this.$message.error('已审批,操作失败')
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
|
||||
@@ -14,12 +14,7 @@
|
||||
style="width:300px"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="searchTable0()">查询</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable0()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
@@ -64,113 +59,95 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<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 contractNum"
|
||||
v-for="item in supplier"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input
|
||||
v-model="supplierName"
|
||||
placeholder="供应商"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:180px"/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left:10px"
|
||||
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table :data="tableData1" size="mini" border style="width: 100%" highlight-current-row @row-click="searchContract">
|
||||
<el-table-column label="采购合同编号" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同名称" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" min-width="150" align="center">
|
||||
<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.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同总额" width="70" align="center">
|
||||
<el-table-column label="请款时间" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同总额 }}
|
||||
{{ scope.row.请款时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本次请款金额" min-width="100" align="center">
|
||||
<el-table-column label="请款人" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.本次应请款" size="mini" style="width:70px"/>
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款" min-width="80" align="center">
|
||||
<el-table-column label="请款金额" align="center" min-width="90" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="requestFund(scope.row)">请款</el-button>
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款付款情况" width="710" align="center">
|
||||
<el-table-column label="请款付款情况" align="center">
|
||||
<el-table-column label="审批情况内容" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审批原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款情况" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已同意</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未付款原因" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-table :id="scope.$index" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
|
||||
<el-table-column label="取消请款" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="scope.row.审批情况流水号!==3"
|
||||
type="danger"
|
||||
size="mini"
|
||||
@click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="次数" min-width="60" align="center" type="index"/>
|
||||
<el-table-column label="请款金额" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款时间 ? scope.row.请款时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批情况" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审批原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审批原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款情况" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已同意</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未付款原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未付款原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table :data="gridData" highlight-current-row size="mini" show-summary @row-click="searchContract">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="采购合同编号">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="请款金额" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" @click="searchTable02(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button :disabled="Number(scope.row.审批情况流水号)!==3" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -184,14 +161,73 @@
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
<span v-show="supplierValue">累计合同总额:</span>
|
||||
<el-input v-show="supplierValue" v-model="totalSum" size="mini" style="width: 100px;" readonly/>
|
||||
<span v-show="supplierValue">累计付款:</span>
|
||||
<el-input v-show="supplierValue" v-model="totalPay" size="mini" style="width: 100px;" readonly/>
|
||||
<span v-show="supplierValue">累计欠款:</span>
|
||||
<el-input v-show="supplierValue" v-model="totalDebt" size="mini" style="width: 100px;" readonly/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible2" title="采购合同请款" center style="min-height: 300px" width="1200px">
|
||||
<span>供应商:</span>
|
||||
<el-select v-model="supplierValue" placeholder="供应商" filterable clearable size="small">
|
||||
<el-option
|
||||
v-for="item in supplier"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin: 0 10px 10px 10px" @click="searchTable01()">查询</el-button>
|
||||
<el-table v-loading="" :data="tableData01" border style="max-height: 300px;" height="300px" size="mini" @row-click="searchContract" @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">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同名称" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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" readonly size="mini" style="width: 80px; margin: 10px 10px 0 10px"/>元</span>
|
||||
<el-button type="primary" size="small" style="float:right;margin: 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
|
||||
</el-dialog>
|
||||
|
||||
<div style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTable0, initContract, searchTable1, searchCondition, requestFund, cancelRequestFund, searchContract } from '@/api/PurchasingCenter/PurchaseContractRequestFund'
|
||||
import { searchTable0, searchContract, searchSupplier, searchRequestFund, searchPurchaseContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/PurchasingCenter/PurchaseContractRequestFund'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { getNowTime, timeToStamp } from '@/utils/tool'
|
||||
|
||||
@@ -200,7 +236,6 @@ export default {
|
||||
return {
|
||||
getDate: null,
|
||||
tableData0: [],
|
||||
check: 0,
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
text: '未来一周',
|
||||
@@ -245,116 +280,158 @@ export default {
|
||||
}]
|
||||
},
|
||||
dateRange: '',
|
||||
tableData11: [],
|
||||
tableData1: [],
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
contractNum: [],
|
||||
contractNumValue: '',
|
||||
supplierName: '',
|
||||
tableData1: [],
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
returns: ''
|
||||
returns: '',
|
||||
supplierValue: '',
|
||||
supplier: [],
|
||||
totalSum: 0,
|
||||
totalPay: 0,
|
||||
totalDebt: 0,
|
||||
tableData2: [],
|
||||
dialogVisible2: false,
|
||||
tableData01: [],
|
||||
SUM: 0,
|
||||
contractGroup: [],
|
||||
gridData: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
this.searchTable0()
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
timeToStamp(param) { // 转时间戳
|
||||
return timeToStamp(param)
|
||||
},
|
||||
searchTable0() { // 查询付款计划
|
||||
this.dateRange ? this.check = 1 : (this.check = 0, this.dateRange = '')
|
||||
searchTable0(this.check, this.dateRange[0], this.dateRange[1]).then(response => {
|
||||
this.getDate = timeToStamp(getNowTime()) // 获取当前时间
|
||||
let check
|
||||
this.dateRange ? check = 1 : (check = 0, this.dateRange = '')
|
||||
searchTable0(check, this.dateRange[0], this.dateRange[1]).then(response => {
|
||||
this.tableData0 = response.data
|
||||
})
|
||||
},
|
||||
fetchData() {
|
||||
initContract().then(response => {
|
||||
this.supplier = []
|
||||
searchSupplier().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.contractNum.push({
|
||||
label: response.data[i].采购合同编号,
|
||||
value: response.data[i].采购合同流水号
|
||||
this.supplier.push({
|
||||
label: response.data[i].供应商名称,
|
||||
value: response.data[i].供应商流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() { // 查询
|
||||
this.getDate = timeToStamp(getNowTime()) // 获取当前时间
|
||||
this.tableData1 = []
|
||||
this.returns = ''
|
||||
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.supplierName ? this.check2 = 1 : this.check2 = 0
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.contractNumValue, this.check2, this.supplierName).then(response => {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
this.tableData11[j] = []
|
||||
searchCondition(response.data.rows[j].采购合同流水号).then(response0 => {
|
||||
if (response0.data.length === 0) {
|
||||
this.tableData11[j].push(response0.data)
|
||||
document.getElementById(j).setAttribute('style', 'display:none')
|
||||
} else {
|
||||
for (let i = 0; i < response0.data.length; i++) {
|
||||
this.tableData11[j].push(response0.data[i])
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
this.tableData1.map(v => {
|
||||
this.$set(v, '本次应请款', 0)
|
||||
return v
|
||||
})
|
||||
this.total1 = response.data.total
|
||||
searchContract(row) {
|
||||
searchContract(row.采购合同流水号).then(response => {
|
||||
this.returns = response.data[0].合同内容
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
requestFund(row) { // 请款
|
||||
if (row.本次应请款 <= 0) {
|
||||
this.$message.warning('请输入正确金额')
|
||||
searchTable1() { // 查请款信息
|
||||
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
|
||||
searchPurchaseContract(check2, this.supplierValue).then(response => {
|
||||
response.data.map(data => {
|
||||
this.totalSum += data.合同总额
|
||||
this.totalPay += data.已付金额
|
||||
})
|
||||
this.totalDebt = this.totalSum - this.totalPay
|
||||
})
|
||||
},
|
||||
requestFund() { // 请款
|
||||
this.dialogVisible2 = true
|
||||
this.supplierValue = ''
|
||||
this.fetchData() // 重新获取供应商
|
||||
this.tableData01 = []
|
||||
},
|
||||
searchTable01() { // 查询待请款
|
||||
if (this.supplierValue) {
|
||||
this.contractGroup = []
|
||||
let check
|
||||
this.supplierValue ? check = 1 : check = 0
|
||||
searchPurchaseContract(check, this.supplierValue).then(response => {
|
||||
this.tableData01 = response.data
|
||||
this.tableData01.map(v => {
|
||||
this.$set(v, '请款金额', 0)
|
||||
v.请款金额 = v.合同总额 - v.已付金额
|
||||
return v
|
||||
})
|
||||
})
|
||||
} else {
|
||||
const day1 = new Date()
|
||||
const day2 = day1.getFullYear() + '-' + (day1.getMonth() + 1) + '-' + day1.getDate()
|
||||
requestFund(row.采购合同流水号, row.本次应请款, day2, this.id).then(response => {
|
||||
this.$message.error('请选择供应商')
|
||||
}
|
||||
},
|
||||
selectable(row, index) { // 控制某行是否可选
|
||||
return parseInt(row.已请款) !== 1 // 已经请款
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.SUM = 0
|
||||
this.contractGroup = []
|
||||
this.sumGroup = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.SUM += parseFloat(val[i].请款金额)
|
||||
this.contractGroup.push(val[i].采购合同流水号)
|
||||
this.sumGroup.push(val[i].请款金额)
|
||||
}
|
||||
},
|
||||
submitRequestFund() { // 确认请款
|
||||
if (this.supplierValue && this.contractGroup.length !== 0) {
|
||||
submitRequestFund(this.contractGroup, this.sumGroup, this.supplierValue, this.SUM, this.id).then(response => { // 采购合同流水号组=${contractGroup}&合同总额组=${sumGroup}&供应商流水号=${supplier}&请款金额=${money}&请款人=${person
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('请款成功')
|
||||
this.searchTable1()
|
||||
this.dialogVisible2 = false
|
||||
} else { this.$message.error('请款失败') }
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择需要请款的合同')
|
||||
}
|
||||
},
|
||||
searchTable02(row) { // 查看详情(请款信息包含的合同)
|
||||
searchRequsetFundDetail(row.采购合同请款流水号).then(response => {
|
||||
this.gridData = response.data
|
||||
})
|
||||
},
|
||||
cancelRequestFund(row) { // 取消请款
|
||||
this.$confirm('确认取消请款吗?', '提示', {
|
||||
this.$confirm('确定取消请款?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
cancelRequestFund(row.采购请款流水号).then(response => {
|
||||
cancelRequestFund(row.采购合同请款流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.searchTable1()
|
||||
} else if (response.data[0].result === '已审批') {
|
||||
this.searchTable1()
|
||||
this.$message.error('已审批,操作失败')
|
||||
this.$message.error('已审批,操作失败')
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
@@ -363,11 +440,6 @@ export default {
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
searchContract(row) {
|
||||
searchContract(row.采购合同流水号).then(response => {
|
||||
this.returns = response.data[0].合同内容
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user