更新
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
<el-button type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
|
||||
</div>
|
||||
<h3 style="margin-top: 0">请款表</h3>
|
||||
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini">
|
||||
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini" stripe>
|
||||
<el-table-column label="供应商" align="center" min-width="250" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
@@ -114,7 +114,7 @@
|
||||
</el-table>
|
||||
<el-button slot="reference" type="primary" size="mini" plain icon="el-icon-search" @click="searchTable02(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button :disabled="Number(id)!==Number(scope.row.请款人)||!Number(scope.row.审核情况流水号)!==3" type="danger" plain size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
<el-button :disabled="Number(id)!==Number(scope.row.请款人) || !((Number(scope.row.审核情况流水号) !== 1) || (Number(scope.row.审批情况流水号)===2) || (Number(scope.row.付款情况流水号)===2))" type="danger" plain size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
<el-card>
|
||||
<h3 style="margin-top: 0">离线合同明细</h3>
|
||||
<el-table v-loading="" :data="tableData2" :summary-method="getSummaries" border style="margin-top:10px;max-height: 500px;" height="500px" size="mini" show-summary>
|
||||
<el-table v-loading="" :data="tableData2" :summary-method="getSummaries" border style="margin-top:10px;max-height: 500px;" height="500px" size="mini" stripe show-summary>
|
||||
<el-table-column label="离线合同编号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线合同编号 }}
|
||||
@@ -235,9 +235,14 @@
|
||||
{{ 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="120" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number :precision="2" v-model="scope.row.请款金额" size="mini" controls-position="right" style="width: 100%;"/>
|
||||
<el-input-number :precision="2" :max="scope.row.合同总额 - scope.row.已付金额 - scope.row.申请中金额" :disabled="(scope.row.合同总额 - scope.row.已付金额 - scope.row.申请中金额) === 0" v-model="scope.row.请款金额" size="mini" controls-position="right" style="width: 100%;"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -307,6 +312,7 @@ export default {
|
||||
name: '', // 离线合同
|
||||
data() {
|
||||
return {
|
||||
selectContents: '',
|
||||
totalSum: 0,
|
||||
totalPay: 0,
|
||||
totalDebt: 0,
|
||||
@@ -462,7 +468,7 @@ export default {
|
||||
})
|
||||
this.tableData01.map(v => {
|
||||
this.$set(v, '请款金额', 0)
|
||||
v.请款金额 = v.合同总额 - v.已付金额
|
||||
v.请款金额 = v.合同总额 - v.已付金额 - v.申请中金额
|
||||
return v
|
||||
})
|
||||
})
|
||||
@@ -476,6 +482,7 @@ export default {
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.selectContents = val
|
||||
this.SUM = 0
|
||||
this.contractGroup = []
|
||||
this.sumGroup = []
|
||||
@@ -491,13 +498,31 @@ export default {
|
||||
},
|
||||
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('请款失败') }
|
||||
})
|
||||
this.SUM = 0
|
||||
this.contractGroup = []
|
||||
this.sumGroup = []
|
||||
for (let i = 0; i < this.tableData01.length; i++) {
|
||||
for (let j = 0; j < this.selectContents.length; j++) {
|
||||
if (this.selectContents[j].离线合同流水号 === this.tableData01[i].离线合同流水号) {
|
||||
this.SUM += parseFloat(this.tableData01[i].请款金额)
|
||||
this.contractGroup.push(this.tableData01[i].离线合同流水号)
|
||||
this.sumGroup.push(this.tableData01[i].请款金额)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.SUM === 0) {
|
||||
this.$message.error('请款金额不能为0')
|
||||
} else {
|
||||
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('请选择需要请款的合同')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user