第一轮测试采购bug修改

This commit is contained in:
chenjianan
2018-11-22 14:14:38 +08:00
parent f17ec11ee8
commit 0da80da189
6 changed files with 157 additions and 95 deletions

View File

@@ -43,7 +43,16 @@
</el-card>
<el-card>
<el-table v-loading="loading1" :data="tableData1" size="mini" border style="width: 100%;">
<el-table :data="tableData1" size="mini" border style="width: 100%">
<el-table-column label="请款" min-width="80" align="center">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
icon=""
@click="requestFund(scope.row)">请款</el-button>
</template>
</el-table-column>
<el-table-column label="采购合同编号" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
@@ -59,12 +68,12 @@
{{ scope.row.规定到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="供应商" min-width="200" align="center">
<el-table-column label="供应商" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="总金额" width="80" align="center">
<el-table-column label="总金额" width="70" align="center">
<template slot-scope="scope">
{{ scope.row.总金额 }}
</template>
@@ -74,7 +83,7 @@
{{ scope.row.付款方式内容 }}
</template>
</el-table-column>
<el-table-column label="欠款金额" min-width="90" align="center">
<el-table-column label="欠款金额" min-width="70" align="center">
<template slot-scope="scope">
{{ scope.row.欠款金额 }}
</template>
@@ -91,7 +100,16 @@
</el-table-column>
<el-table-column label="请款付款情况" width="900" align="center">
<template slot-scope="scope">
<el-table v-show="tableData11[scope.$index].length!==0" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
<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">
@@ -100,7 +118,7 @@
</el-table-column>
<el-table-column label="请款时间" width="90" align="center">
<template slot-scope="scope">
{{ scope.row.请款时间.split(' ')[0] }}
{{ scope.row.请款时间 ? scope.row.请款时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="审核情况" width="80" align="center">
@@ -133,26 +151,9 @@
{{ scope.row.未付款原因 }}
</template>
</el-table-column>
<el-table-column width="100" align="center">
<template slot-scope="scope">
<el-button
type="danger"
size="mini"
@click="cancelRequestFund(scope.row)">取消请款</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column label="请款" min-width="80" align="center" fixed="right">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
icon=""
@click="requestFund(scope.row)">请款</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
@@ -168,22 +169,22 @@
</el-card>
<el-card>
<span>请款开始时间:</span>
<span>请款时间区:</span>
<el-date-picker
v-model="startRequestDate"
size="small"
type="date"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期"/>
<span>请款结束时间:</span>
placeholder="开始日期"/>
<el-date-picker
v-model="endRequestDate"
size="small"
type="date"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期"/>
placeholder="结束日期"/>
<el-button
type="success"
size="small"
@@ -277,7 +278,6 @@ export default {
form1: {},
supplierName: '',
tableData01: [],
loading1: false,
tableData1: [],
check1: 0,
check2: 0,
@@ -312,7 +312,6 @@ export default {
})
},
searchTable1() {
this.loading1 = true
this.tableData1 = []
this.startDate && this.endDate ? this.check1 = 1 : this.check1 = 0
this.contractNum ? this.check2 = 1 : this.check2 = 0
@@ -322,15 +321,18 @@ export default {
for (let j = 0; j < response.data.rows.length; j++) {
this.tableData11[j] = []
searchCondition(response.data.rows[j].采购合同流水号).then(response0 => {
for (let i = 0; i < response0.data.length; i++) {
this.tableData11[j].push(response0.data[i])
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.total1 = response.data.total
}).then(() => {
this.loading1 = false
})
},
handleSizeChange1(val) {
@@ -356,6 +358,7 @@ export default {
})
},
cancelRequestFund(row) { // 取消请款
console.log(row)
this.$confirm('确认取消请款吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -383,9 +386,15 @@ export default {
},
searchRequestTable() { // 查询请款表
this.loading2 = true
if (this.startRequestDate === '' || this.startRequestDate === null || this.endRequestDate === '' || this.endRequestDate === null) {
if ((this.startRequestDate === '' || this.startRequestDate === null) && (this.endRequestDate === '' || this.endRequestDate === null)) {
this.checkRequest = 0
} else { this.checkRequest = 1 }
} else if (this.startRequestDate !== '' && this.startRequestDate !== null && this.endRequestDate !== '' && this.endRequestDate !== null) {
this.checkRequest = 1
} else {
this.$message.error('请款时间区间有误')
this.loading2 = false
return
}
searchRequestTable(this.checkRequest, this.startRequestDate, this.endRequestDate).then(response => {
for (let j = 0; j < response.data.length; j++) {
if (response.data[j].请款时间 !== null) {