更新
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total1=0;pageCurrent1=1;pageSize1=100000;searchTable1()">查询</el-button>
|
||||
</div>
|
||||
<!-- <h4 style="margin: 0">发票结算申请单</h4>-->
|
||||
<el-table id="expandTable" :data="tableData1" border highlight-current-row height="250px" style="width: 100%;height: 330px;overflow:auto" size="mini">
|
||||
<el-table id="expandTable" :data="tableData1" border highlight-current-row height="250px" style="width: 100%;height: 330px;overflow:auto" size="mini" @row-click="searchTable2">
|
||||
<el-table-column label="供应商" align="center" width="180" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
@@ -88,19 +88,69 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="cancel(scope.row)">撤回</el-button>
|
||||
<el-button type="text" size="mini" @click="cancel(scope.row)">撤回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table :data="tableData2" border highlight-current-row 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.采购物料名称 || scope.row.离线物料名称 || scope.row.采购零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购物料型号 || scope.row.离线物料型号 || scope.row.采购零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || 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="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 || scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<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" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到票数量" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到票数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到票金额" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span style="margin-left: 1000px">到票总额:{{ totalMoney.toFixed(2) }}</span>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { cancel, searchTable1, searchSupplier } from '@/api/PurchasingCenter/InvoiceSettlementApproveSearch'
|
||||
import { cancel, searchTable1, searchSupplier, searchTable2 } from '@/api/PurchasingCenter/InvoiceSettlementApproveSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { readFile } from '@/utils/request'
|
||||
import request from '@/utils/request'
|
||||
// import { readFile } from '@/utils/request'
|
||||
// import request from '@/utils/request'
|
||||
export default {
|
||||
name: '', // 发票结算审批
|
||||
data() {
|
||||
@@ -115,7 +165,8 @@ export default {
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
supplierValues: [],
|
||||
supplierValue: ''
|
||||
supplierValue: '',
|
||||
totalMoney: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -132,6 +183,16 @@ export default {
|
||||
this.searchSupplier()
|
||||
},
|
||||
methods: {
|
||||
searchTable2(row) {
|
||||
this.invoiceNumber = row.发票号
|
||||
searchTable2(row.发票结算申请单流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
this.totalMoney = 0
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.totalMoney += parseFloat(response.data[i].金额)
|
||||
}
|
||||
})
|
||||
},
|
||||
cancel(row) {
|
||||
console.log(row, 'row')
|
||||
if (Number(this.token) === 18) {
|
||||
@@ -207,27 +268,27 @@ export default {
|
||||
this.supplierValue ? check = 1 : check = 0
|
||||
searchTable1(this.check1, this.date1, this.date2, this.pageCurrent1, this.pageSize1, this.token, check, this.supplierValue).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.tableData1.map(v => {
|
||||
this.$set(v, 'scanSrc', '')
|
||||
return v
|
||||
})
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData1[i].scanSrc = this.searchPic(response.data.rows[i], i)
|
||||
}
|
||||
// this.tableData1.map(v => {
|
||||
// this.$set(v, 'scanSrc', '')
|
||||
// return v
|
||||
// })
|
||||
// for (let i = 0; i < response.data.rows.length; i++) {
|
||||
// this.tableData1[i].scanSrc = this.searchPic(response.data.rows[i], i)
|
||||
// }
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
async searchPic(row, i) {
|
||||
const { data } = await request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: `select * from 采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票结算申请单流水号}`
|
||||
}
|
||||
})
|
||||
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
|
||||
},
|
||||
// async searchPic(row, i) {
|
||||
// const { data } = await request({
|
||||
// url: '',
|
||||
// method: 'post',
|
||||
// data: {
|
||||
// type: '3',
|
||||
// name: `select * from 采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票结算申请单流水号}`
|
||||
// }
|
||||
// })
|
||||
// // this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
|
||||
// },
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
|
||||
Reference in New Issue
Block a user