|
|
@@ -47,7 +47,19 @@
|
|
|
{{ invoiceTypeData.filter((item) => item.key == row.invoiceType)[0].value || '-' }}
|
|
|
</span>
|
|
|
<span v-else-if="item.prop == 'approStatus'">
|
|
|
- {{ row.approStatus == '10' ? '未通过' : '已通过' }}
|
|
|
+ {{
|
|
|
+ row.approStatus == '10'
|
|
|
+ ? '待提交审核'
|
|
|
+ : row.approStatus == '20'
|
|
|
+ ? '待审核'
|
|
|
+ : row.approStatus == '30'
|
|
|
+ ? '审核已同意'
|
|
|
+ : row.approStatus == '40'
|
|
|
+ ? '审核已拒绝'
|
|
|
+ : row.approStatus == '50'
|
|
|
+ ? '审核已撤销'
|
|
|
+ : ''
|
|
|
+ }}
|
|
|
</span>
|
|
|
<span v-else-if="item.prop == 'contractAmount'">
|
|
|
{{ formatPrice(row.contractAmount) }}
|
|
|
@@ -64,7 +76,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" fixed="right" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" @click="$refs.invoicing.init(scope.row.id)">通过</el-button>
|
|
|
+ <el-button v-if="scope.row.approStatus == '30'" type="text" @click="$refs.invoicing.init(scope.row.id)">
|
|
|
+ 更新开票信息
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="scope.row.approStatus == '10'" type="text" @click="handleApply(scope.row.id)">
|
|
|
+ 提交审核
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -77,6 +94,7 @@
|
|
|
@current-change="handleCurrentChange"
|
|
|
@size-change="handleSizeChange" />
|
|
|
<invoicing ref="invoicing" @invoiceSave="queryData" />
|
|
|
+ <ApplyInvoice ref="applyInvoice" @refresh="queryData" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -85,10 +103,11 @@
|
|
|
import invoiceApi from '@/api/contract/invoice'
|
|
|
import Invoicing from './components/Invoicing'
|
|
|
import TableTool from '@/components/table/TableTool'
|
|
|
+ import ApplyInvoice from './components/ApplyInvoice'
|
|
|
|
|
|
export default {
|
|
|
name: 'DetailsInvoice',
|
|
|
- components: { Invoicing, TableTool },
|
|
|
+ components: { Invoicing, TableTool, ApplyInvoice },
|
|
|
props: {
|
|
|
details: {
|
|
|
type: Object,
|
|
|
@@ -153,8 +172,8 @@
|
|
|
},
|
|
|
{
|
|
|
label: '审核状态',
|
|
|
- width: 'auto',
|
|
|
prop: 'approStatus',
|
|
|
+ width: '100px',
|
|
|
},
|
|
|
{
|
|
|
label: '备注',
|
|
|
@@ -186,6 +205,31 @@
|
|
|
setSelectRows(val) {
|
|
|
this.selectRows = val.map((item) => item.id)
|
|
|
},
|
|
|
+ handleApply(id) {
|
|
|
+ this.$refs.applyInvoice.form.id = id
|
|
|
+ this.$refs.applyInvoice.visible = true
|
|
|
+ // this.$confirm('确认提交审核?', '提示', {
|
|
|
+ // confirmButtonText: '确定',
|
|
|
+ // cancelButtonText: '取消',
|
|
|
+ // type: 'warning',
|
|
|
+ // })
|
|
|
+ // .then(async () => {
|
|
|
+ // const [err, res] = await to(
|
|
|
+ // invoiceApi.applyInvoice({
|
|
|
+ // id: [id],
|
|
|
+ // })
|
|
|
+ // )
|
|
|
+ // if (err) return
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.$message({
|
|
|
+ // type: 'success',
|
|
|
+ // message: '提交成功!',
|
|
|
+ // })
|
|
|
+ // this.queryData()
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // .catch((err) => console.log(err))
|
|
|
+ },
|
|
|
async getOptions() {
|
|
|
await Promise.all([this.getDicts('invoice_type')])
|
|
|
.then(([invoiceType]) => {
|