diff --git a/src/views/WorkshopProcurement/FundApproval3/index.vue b/src/views/WorkshopProcurement/FundApproval3/index.vue
index 35d3c57b..8f5a782a 100644
--- a/src/views/WorkshopProcurement/FundApproval3/index.vue
+++ b/src/views/WorkshopProcurement/FundApproval3/index.vue
@@ -2,13 +2,18 @@
-
+
+
+
+ {{ scope.row.类别 }}
+
+
{{ scope.row.供应商名称 }}
-
+
{{ scope.row.请款金额 }}
@@ -26,7 +31,7 @@
-
+
@@ -39,6 +44,37 @@
+
+
+
+
+ {{ scope.row.离线合同编号 }}
+
+
+
+
+ {{ scope.row.请款金额 }}
+
+
+
+
+
+
+
+ {{ scope.row.发票号 }}
+
+
+
+
+ {{ scope.row.供应商名称 }}
+
+
+
+
+ {{ scope.row.开票金额 }}
+
+
+
查看详情
通过
@@ -58,7 +94,7 @@
@current-change="handleCurrentChange"/>
-
+
@@ -115,7 +151,7 @@
@current-change="handleCurrentChange2"/>
-
+
@@ -213,7 +249,7 @@ export default {
])
},
created() {
- this.fetchData()
+ this.searchTable()
},
methods: {
fetchData() {
@@ -223,18 +259,68 @@ export default {
},
searchTable() {
initApproval1(this.pageCurrent, this.pageSize, 2).then(response => {
- for (let j = 0; j < response.data.rows.length; j++) {
- response.data.rows[j].含税总金额 = parseInt(response.data.rows[j].含税总金额 * 100) / 100
- response.data.rows[j].欠款金额 = parseInt(response.data.rows[j].欠款金额 * 100) / 100
+ if (response.data.rows.length !== 0) {
+ for (let i = 0; i < response.data.rows.length; i++) {
+ response.data.rows[i].含税总金额 = parseInt(response.data.rows[i].含税总金额 * 100) / 100
+ response.data.rows[i].欠款金额 = parseInt(response.data.rows[i].欠款金额 * 100) / 100
+ this.tableData.push({
+ 采购合同请款流水号: response.data.rows[i].采购合同请款流水号,
+ 供应商名称: response.data.rows[i].供应商名称,
+ 请款金额: response.data.rows[i].请款金额,
+ 姓名: response.data.rows[i].姓名,
+ 请款时间: response.data.rows[i].请款时间,
+ 类别: '采购'
+ })
+ }
}
- this.tableData = response.data.rows
- this.total = response.data.total
+ initApprovalOffline(this.pageCurrent2, this.pageSize2, 2).then(response2 => {
+ if (response2.data.rows.length !== 0) {
+ for (let i = 0; i < response2.data.rows.length; i++) {
+ this.tableData.push({
+ 离线合同请款流水号: response2.data.rows[i].离线合同请款流水号,
+ 供应商名称: response2.data.rows[i].供应商名称,
+ 请款金额: response2.data.rows[i].请款金额,
+ 姓名: response2.data.rows[i].姓名,
+ 请款时间: response2.data.rows[i].请款时间,
+ 类别: '离线'
+ })
+ }
+ }
+ initApprovalMaterials(this.pageCurrent3, this.pageSize3, 2).then(response3 => {
+ if (response3.data.rows.length !== 0) {
+ for (let i = 0; i < response3.data.rows.length; i++) {
+ this.tableData.push({
+ 采购计划请款流水号: response3.data.rows[i].采购计划请款流水号,
+ 供应商名称: response3.data.rows[i].供应商名称,
+ 请款金额: response3.data.rows[i].请款金额,
+ 姓名: response3.data.rows[i].姓名,
+ 请款时间: response3.data.rows[i].请款时间,
+ 类别: '备料'
+ })
+ }
+ }
+ this.total = response.data.total + response2.data.total + response3.data.total
+ })
+ })
})
},
- searchTable01(row) { // 查看详情(请款信息包含的合同)
- searchRequsetFundDetail3(row.采购合同请款流水号).then(response => {
- this.gridData1 = response.data
- })
+ // 查看详情(请款信息包含的合同)
+ searchTable01(row) {
+ this.gridData1 = []
+ this.gridData = []
+ if (row.类别 === '采购') {
+ searchRequsetFundDetail3(row.采购合同请款流水号).then(response => {
+ this.gridData1 = response.data
+ })
+ } else if (row.类别 === '离线') {
+ searchRequsetFundDetail(row.离线合同请款流水号).then(response => {
+ this.gridData = response.data
+ })
+ } else if (row.类别 === '备料') {
+ searchRequsetFundDetail1(row.采购计划请款流水号).then(response => {
+ this.gridData1 = response.data
+ })
+ }
},
handleSizeChange(val) {
this.pageSize = val
@@ -293,12 +379,28 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
- execApproval(row.采购合同请款流水号, 1, '通过', this.id, 2).then(response => {
- if (response.data[0].result === '1') {
- this.$message.success('执行成功')
- this.searchTable()
- } else { this.$message.error('执行失败') }
- })
+ if (row.类别 === '采购') {
+ execApproval(row.采购合同请款流水号, 1, '通过', this.id, 2).then(response => {
+ if (response.data[0].result === '1') {
+ this.$message.success('执行成功')
+ this.searchTable()
+ } else { this.$message.error('执行失败') }
+ })
+ } else if (row.类别 === '离线') {
+ execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 2).then(response => {
+ if (response.data[0].result === '1') {
+ this.$message.success('执行成功')
+ this.searchTable2()
+ } else { this.$message.error('执行失败') }
+ })
+ } else if (row.类别 === '备料') {
+ execMaterials(row.采购计划请款流水号, 1, '通过', this.id, 2).then(response => {
+ if (response.data[0].result === '1') {
+ this.$message.success('执行成功')
+ this.searchTable3()
+ } else { this.$message.error('执行失败') }
+ })
+ }
}).catch(() => {
this.$message({
type: 'info',
@@ -311,12 +413,28 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
- execApproval(row.采购合同请款流水号, 2, value, this.id, 2).then(response => {
- if (response.data[0].result === '1') {
- this.$message.success('执行成功')
- this.searchTable()
- } else { this.$message.error('执行失败') }
- })
+ if (row.类别 === '采购') {
+ execApproval(row.采购合同请款流水号, 2, value, this.id, 2).then(response => {
+ if (response.data[0].result === '1') {
+ this.$message.success('执行成功')
+ this.searchTable()
+ } else { this.$message.error('执行失败') }
+ })
+ } else if (row.类别 === '离线') {
+ execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 2).then(response => {
+ if (response.data[0].result === '1') {
+ this.$message.success('执行成功')
+ this.searchTable2()
+ } else { this.$message.error('执行失败') }
+ })
+ } else if (row.类别 === '备料') {
+ execMaterials(row.采购计划请款流水号, 2, value, this.id, 2).then(response => {
+ if (response.data[0].result === '1') {
+ this.$message.success('执行成功')
+ this.searchTable3()
+ } else { this.$message.error('执行失败') }
+ })
+ }
}).catch(() => {
this.$message({
type: 'info',