Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询审批/付款
|
||||
// 查询审核/审批/付款
|
||||
export function initApproval(pageCurrent, pageSize, state) {
|
||||
return request({
|
||||
url: '',
|
||||
@@ -13,7 +13,7 @@ export function initApproval(pageCurrent, pageSize, state) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 执行审批/付款
|
||||
// 执行审核/审批/付款
|
||||
export function execApproval(num1, num2, reason, person, state) {
|
||||
return request({
|
||||
url: '',
|
||||
@@ -25,7 +25,7 @@ export function execApproval(num1, num2, reason, person, state) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线合同审批/付款
|
||||
// 查询离线合同审核/审批/付款
|
||||
export function initApprovalOffline(pageCurrent, pageSize, state) {
|
||||
return request({
|
||||
url: '',
|
||||
@@ -62,7 +62,7 @@ export function searchRequsetFundDetail2(num) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 执行审批/付款(离线合同)
|
||||
// 执行审核/审批/付款(离线合同)
|
||||
export function execApprovalOffline(num1, num2, reason, person, state) {
|
||||
return request({
|
||||
url: '',
|
||||
@@ -74,3 +74,27 @@ export function execApprovalOffline(num1, num2, reason, person, state) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 采购合同内容查询
|
||||
export function searchContactDetail(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购合同内容_查询数据',
|
||||
param: '采购合同流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线合同明细
|
||||
export function searchMateriel(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_离线合同明细_查询数据',
|
||||
param: `离线合同流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ export function searchSupplier() {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线合同待请款信息
|
||||
// 采购合同请款
|
||||
export function submitRequestFund(contractGroup, sumGroup, supplier, money, person) {
|
||||
return request({
|
||||
url: '',
|
||||
|
||||
385
src/views/PurchasingCenter/FundApproval1/index.vue
Normal file
385
src/views/PurchasingCenter/FundApproval1/index.vue
Normal file
@@ -0,0 +1,385 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<h3 style="margin-top: 0">采购合同</h3>
|
||||
<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="170">
|
||||
<template slot-scope="scope">
|
||||
{{ 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.姓名 }}
|
||||
</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" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData1" stripe size="mini" highlight-current-row show-summary @row-click="searchContactDetail">
|
||||
<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>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<h3 style="margin-top: 0">离线合同</h3>
|
||||
<el-table v-loading="" :data="tableData2" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
|
||||
<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="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.姓名 }}
|
||||
</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" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData2" stripe size="mini" show-summary highlight-current-row @row-click="searchOfflineContactDetail">
|
||||
<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="searchTable02(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApprovalOffline(scope.row)">通过</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApprovalOffline(scope.row)">不通过</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize2"
|
||||
:total="total2"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<h3 style="margin-top: 0">采购合同</h3>
|
||||
<div id="print" class="print" style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="contractDetail1"/>
|
||||
<h3 style="">离线合同</h3>
|
||||
<el-table v-loading="" :data="contractDetail2" :summary-method="getSummaries" border style="margin-top:10px;max-height: 500px;" height="500px" size="mini" show-summary>
|
||||
<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="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.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" min-width="80" prop="单价">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合计" align="center" min-width="80" prop="合计">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
|
||||
</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="80" prop="备注">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail1, searchRequsetFundDetail2, execApprovalOffline, searchContactDetail, searchMateriel } from '@/api/PurchasingCenter/FundApproval'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 管理审核
|
||||
data() {
|
||||
return {
|
||||
contractDetail1: '',
|
||||
contractDetail2: [],
|
||||
tableData1: [],
|
||||
pageSize1: 10,
|
||||
pageCurrent1: 1,
|
||||
total1: 0,
|
||||
tableData2: [],
|
||||
pageSize2: 10,
|
||||
pageCurrent2: 1,
|
||||
total2: 0,
|
||||
gridData1: [],
|
||||
gridData2: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
searchContactDetail(row) {
|
||||
searchContactDetail(row.采购合同流水号).then(response => {
|
||||
this.contractDetail1 = response.data[0].合同内容
|
||||
})
|
||||
},
|
||||
searchOfflineContactDetail(row) { // 查询离线合同明细
|
||||
searchMateriel(row.离线合同流水号).then(response => {
|
||||
this.contractDetail2 = response.data
|
||||
})
|
||||
},
|
||||
getSummaries(param) { // 合计
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总价'
|
||||
} else if (index === 7) {
|
||||
const values = data.map(item => Number(parseFloat(item['单价']) * parseInt(item['数量'])))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ' 元'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
fetchData() {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
},
|
||||
searchTable1() {
|
||||
initApproval(this.pageCurrent1, this.pageSize1, 0).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
searchTable2() {
|
||||
initApprovalOffline(this.pageCurrent2, this.pageSize2, 0).then(response => {
|
||||
console.log(response.data.rows)
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageSize2 = val
|
||||
this.pageCurrent2 = 1
|
||||
this.searchTable2()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable2()
|
||||
},
|
||||
searchTable01(row) { // 查看详情(请款信息包含的合同)
|
||||
searchRequsetFundDetail1(row.采购合同请款流水号).then(response => {
|
||||
this.gridData1 = response.data
|
||||
})
|
||||
},
|
||||
searchTable02(row) { // 查看详情(请款信息包含的合同)
|
||||
searchRequsetFundDetail2(row.离线合同请款流水号).then(response => {
|
||||
this.gridData2 = response.data
|
||||
})
|
||||
},
|
||||
yesApproval(row) { // 通过审核
|
||||
this.$confirm('确定审核通过?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
execApproval(row.采购合同请款流水号, 1, '通过', this.id, 0).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
noApproval(row) { // 不通过审核
|
||||
this.$prompt('请输入不通过原因', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
execApproval(row.采购合同请款流水号, 2, value, this.id, 0).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
yesApprovalOffline(row) { // 通过审核
|
||||
this.$confirm('确定审核通过?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 0).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable2()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
noApprovalOffline(row) { // 不通过审核
|
||||
this.$prompt('请输入不通过原因', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 0).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable2()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.el-tag{
|
||||
margin: 0
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<h3 style="margin-top: 0">采购合同</h3>
|
||||
<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="170">
|
||||
<template slot-scope="scope">
|
||||
@@ -25,7 +26,7 @@
|
||||
<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 :data="gridData1" stripe size="mini" highlight-current-row show-summary @row-click="searchContactDetail">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="采购合同编号">
|
||||
<template slot-scope="scope">
|
||||
@@ -59,6 +60,7 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<h3 style="margin-top: 0">离线合同</h3>
|
||||
<el-table v-loading="" :data="tableData2" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
|
||||
<el-table-column label="供应商" align="center" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
@@ -83,7 +85,7 @@
|
||||
<el-table-column label="审核" align="center" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData2" stripe size="mini" show-summary>
|
||||
<el-table :data="gridData2" stripe size="mini" highlight-current-row show-summary @row-click="searchOfflineContactDetail">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="离线合同编号">
|
||||
<template slot-scope="scope">
|
||||
@@ -115,17 +117,69 @@
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<h3 style="margin-top: 0">采购合同</h3>
|
||||
<div id="print" class="print" style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="contractDetail1"/>
|
||||
<h3 style="">离线合同</h3>
|
||||
<el-table v-loading="" :data="contractDetail2" :summary-method="getSummaries" border style="margin-top:10px;max-height: 500px;" height="500px" size="mini" show-summary>
|
||||
<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="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.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" min-width="80" prop="单价">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合计" align="center" min-width="80" prop="合计">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
|
||||
</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="80" prop="备注">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail1, searchRequsetFundDetail2, execApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
|
||||
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail1, searchRequsetFundDetail2, execApprovalOffline, searchContactDetail, searchMateriel } from '@/api/PurchasingCenter/FundApproval'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 管理审批
|
||||
data() {
|
||||
return {
|
||||
contractDetail1: '',
|
||||
contractDetail2: [],
|
||||
tableData1: [],
|
||||
pageSize1: 10,
|
||||
pageCurrent1: 1,
|
||||
@@ -150,6 +204,41 @@ export default {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
searchContactDetail(row) {
|
||||
searchContactDetail(row.采购合同流水号).then(response => {
|
||||
this.contractDetail1 = response.data[0].合同内容
|
||||
})
|
||||
},
|
||||
searchOfflineContactDetail(row) { // 查询离线合同明细
|
||||
searchMateriel(row.离线合同流水号).then(response => {
|
||||
this.contractDetail2 = response.data
|
||||
})
|
||||
},
|
||||
getSummaries(param) { // 合计
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总价'
|
||||
} else if (index === 7) {
|
||||
const values = data.map(item => Number(parseFloat(item['单价']) * parseInt(item['数量'])))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ' 元'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
fetchData() {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<h3 style="margin-top: 0">采购合同</h3>
|
||||
<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="170">
|
||||
<template slot-scope="scope">
|
||||
@@ -25,7 +26,7 @@
|
||||
<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 :data="gridData1" stripe size="mini" show-summary highlight-current-row @row-click="searchContactDetail">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="采购合同编号">
|
||||
<template slot-scope="scope">
|
||||
@@ -59,6 +60,7 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<h3 style="margin-top: 0">离线合同</h3>
|
||||
<el-table v-loading="" :data="tableData2" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
|
||||
<el-table-column label="供应商" align="center" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
@@ -83,7 +85,7 @@
|
||||
<el-table-column label="付款" align="center" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData2" stripe size="mini" show-summary>
|
||||
<el-table :data="gridData2" stripe size="mini" show-summary highlight-current-row @row-click="searchOfflineContactDetail">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="离线合同编号">
|
||||
<template slot-scope="scope">
|
||||
@@ -115,17 +117,69 @@
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<h3 style="margin-top: 0">采购合同</h3>
|
||||
<div id="print" class="print" style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="contractDetail1"/>
|
||||
<h3 style="">离线合同</h3>
|
||||
<el-table v-loading="" :data="contractDetail2" :summary-method="getSummaries" border style="margin-top:10px;max-height: 500px;" height="500px" size="mini" show-summary>
|
||||
<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="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.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" min-width="80" prop="单价">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合计" align="center" min-width="80" prop="合计">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
|
||||
</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="80" prop="备注">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail1, searchRequsetFundDetail2, execApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
|
||||
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail1, searchRequsetFundDetail2, execApprovalOffline, searchContactDetail, searchMateriel } from '@/api/PurchasingCenter/FundApproval'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 出纳付款
|
||||
data() {
|
||||
return {
|
||||
contractDetail1: '',
|
||||
contractDetail2: [],
|
||||
tableData1: [],
|
||||
pageSize1: 10,
|
||||
pageCurrent1: 1,
|
||||
@@ -150,6 +204,41 @@ export default {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
searchContactDetail(row) {
|
||||
searchContactDetail(row.采购合同流水号).then(response => {
|
||||
this.contractDetail1 = response.data[0].合同内容
|
||||
})
|
||||
},
|
||||
searchOfflineContactDetail(row) { // 查询离线合同明细
|
||||
searchMateriel(row.离线合同流水号).then(response => {
|
||||
this.contractDetail2 = response.data
|
||||
})
|
||||
},
|
||||
getSummaries(param) { // 合计
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总价'
|
||||
} else if (index === 7) {
|
||||
const values = data.map(item => Number(parseFloat(item['单价']) * parseInt(item['数量'])))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ' 元'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
fetchData() {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<template slot-scope="scope">
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-col :lg="10" :sm="12">
|
||||
<viewer>
|
||||
<img :src="scope.row.scanSrc" alt="发票扫描件" height="120px">
|
||||
</viewer>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<template slot-scope="scope">
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-row>
|
||||
<el-col :lg="6" :sm="12">
|
||||
<el-col :lg="10" :sm="12">
|
||||
<viewer>
|
||||
<img :src="scope.row.scanSrc" alt="发票扫描件" height="120px">
|
||||
</viewer>
|
||||
|
||||
@@ -54,6 +54,18 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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>
|
||||
@@ -102,7 +114,7 @@
|
||||
</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>
|
||||
<el-button :disabled="Number(id)!==Number(scope.row.请款人)||!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>
|
||||
@@ -181,7 +193,7 @@
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible2" title="离线合同请款" center style="min-height: 300px" width="1200px">
|
||||
<el-dialog :visible.sync="dialogVisible2" title="离线合同请款" center style="min-height: 300px" width="1000px">
|
||||
<span>供应商:</span>
|
||||
<el-select v-model="supplierValue" placeholder="供应商" filterable clearable size="small">
|
||||
<el-option
|
||||
@@ -193,7 +205,7 @@
|
||||
<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" highlight-current-row border style="max-height: 300px;" height="300px" size="mini" @row-click="searchTable03" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
|
||||
<el-table-column label="离线合同编号" align="center" min-width="120">
|
||||
<el-table-column label="离线合同编号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线合同编号 }}
|
||||
</template>
|
||||
@@ -213,19 +225,19 @@
|
||||
{{ scope.row.采购员 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同总额" align="center" width="100" prop="合同总额">
|
||||
<el-table-column label="合同总额" align="center" width="80" prop="合同总额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同总额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已付金额" align="center" min-width="100" prop="已付金额">
|
||||
<el-table-column label="已付金额" align="center" width="80" prop="已付金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已付金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
|
||||
<el-table-column label="请款金额" align="center" min-width="120" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.请款金额" size="mini" style="width: 100%;"/>
|
||||
<el-input-number :precision="2" v-model="scope.row.请款金额" size="mini" controls-position="right" style="width: 100%;"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -252,17 +264,17 @@
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="100">
|
||||
<el-table-column label="数量" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" min-width="100" prop="单价">
|
||||
<el-table-column label="单价" align="center" width="80" prop="单价">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合计" align="center" min-width="100" prop="合计">
|
||||
<el-table-column label="合计" align="center" width="80" prop="合计">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
|
||||
</template>
|
||||
@@ -277,7 +289,7 @@
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货数量" align="center" min-width="100">
|
||||
<el-table-column label="到货数量" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货数量 }}
|
||||
</template>
|
||||
|
||||
@@ -107,6 +107,18 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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>
|
||||
@@ -122,7 +134,7 @@
|
||||
<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.付款情况流水号)===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>
|
||||
@@ -155,7 +167,7 @@
|
||||
</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>
|
||||
<el-button :disabled="Number(id)!==Number(scope.row.请款人)||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,7 +196,7 @@
|
||||
<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">
|
||||
<el-table-column label="采购合同编号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
@@ -204,19 +216,19 @@
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同总额" align="center" width="100" prop="合同总额">
|
||||
<el-table-column label="合同总额" align="center" width="80" prop="合同总额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同总额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已付金额" align="center" min-width="100" prop="已付金额">
|
||||
<el-table-column label="已付金额" align="center" width="80" prop="已付金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已付金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
|
||||
<el-table-column label="请款金额" align="center" min-width="120" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.请款金额" size="mini" style="width: 100%;"/>
|
||||
<el-input-number v-model="scope.row.请款金额" :precision="2" size="mini" controls-position="right" style="width: 100%;"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
Reference in New Issue
Block a user