[需求变更]-支出合同审核流程(未对接口)
This commit is contained in:
@@ -156,7 +156,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 状态非已存档显示-->
|
||||
<template v-if="detailData.status < 5">
|
||||
<!-- v-if="detailData.status < 5"-->
|
||||
<template>
|
||||
<a-divider></a-divider>
|
||||
<!-- 编辑、审核、存档-->
|
||||
<div>
|
||||
@@ -164,24 +165,27 @@
|
||||
<div class="part-title-text">操作</div>
|
||||
</div>
|
||||
<div class="operator-btn">
|
||||
<!-- v-if="detailData.status === 1 || detailData.status === 4"-->
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="handleEdit(detailData.id, detailData.contractNum)"
|
||||
v-if="detailData.status === 1 || detailData.status === 4"
|
||||
@click="handleEdit(detailData.id)"
|
||||
|
||||
v-has="'revenueContract:edit'">
|
||||
编辑
|
||||
</a-button>
|
||||
<!-- v-if="detailData.status === 2"-->
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="handleAudit(detailData.id)"
|
||||
v-if="detailData.status === 2"
|
||||
|
||||
v-has="'revenueContract:aduit'">
|
||||
审核
|
||||
</a-button>
|
||||
<!-- v-if="detailData.status === 3"-->
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="handleArchive(detailData.id)"
|
||||
v-if="detailData.status === 3"
|
||||
|
||||
v-has="'revenueContract:archive'">
|
||||
存档
|
||||
</a-button>
|
||||
@@ -192,17 +196,19 @@
|
||||
</a-card>
|
||||
</a-spin>
|
||||
|
||||
<revenue-contract-aduit-module ref="aduitForm" @ok="operatorOk"></revenue-contract-aduit-module>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PageHeaderTitle from '../../../components/layouts/PageHeaderTitle'
|
||||
import IconImg from '@/assets/imgs/icon/icon_revenue_contract.png'
|
||||
import { getExpenditureContractById } from '../../../api/incomePaymentsApi'
|
||||
import { archiveRevenueContract, getExpenditureContractById } from '../../../api/incomePaymentsApi'
|
||||
import RevenueContractAduitModule from '../revenueContract/modules/RevenueContractAduitModule'
|
||||
|
||||
export default {
|
||||
name: 'ExpenditureContractDetail',
|
||||
components: { PageHeaderTitle },
|
||||
components: { PageHeaderTitle, RevenueContractAduitModule },
|
||||
data() {
|
||||
return {
|
||||
IconImg,
|
||||
@@ -334,11 +340,49 @@ export default {
|
||||
* @param id
|
||||
* @param contractNum
|
||||
*/
|
||||
handleEdit(id, contractNum) {
|
||||
handleEdit(id) {
|
||||
this.$router.push({
|
||||
path: '/contractManagement/RevenueContractModule',
|
||||
query: {
|
||||
revenueId: id
|
||||
contractId: id
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 审核
|
||||
* @param id
|
||||
*/
|
||||
handleAudit(id) {
|
||||
this.$refs.aduitForm.contractType = 2
|
||||
this.$refs.aduitForm.contractId = id
|
||||
this.$refs.aduitForm.open()
|
||||
},
|
||||
/**
|
||||
* 存档
|
||||
* @param id
|
||||
*/
|
||||
handleArchive(id) {
|
||||
let that = this
|
||||
this.$confirm({
|
||||
title: '存档',
|
||||
content: '确认存档?',
|
||||
onOk: function () {
|
||||
that.loading = true
|
||||
that.loading = false
|
||||
let param = {
|
||||
contractId: id,
|
||||
contractStatus: 5
|
||||
}
|
||||
archiveRevenueContract(param).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.initDetailData()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -369,7 +413,7 @@ export default {
|
||||
}
|
||||
|
||||
.all-line {
|
||||
width: 100%!important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.ant-divider-horizontal {
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
</a-col>
|
||||
<a-col :xl="4" :lg="7" :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" icon="search" @click="searchQuery" v-has="'expenditureContract:search'">查询</a-button>
|
||||
<a-button type="primary" icon="search" @click="searchQuery"
|
||||
v-has="'expenditureContract:search'">查询</a-button>
|
||||
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
@@ -53,8 +54,12 @@
|
||||
@change="handleImportExcel" v-has="'expenditureContract:import'">
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-button type="primary" icon="export" @click="handleExportXls('支出合同')" v-has="'expenditureContract:export'">导出</a-button>
|
||||
<a-button type="primary" icon="download" @click="downTemplate('支出合同导入模板')" v-has="'expenditureContract:downTemplate'">下载模板</a-button>
|
||||
<a-button type="primary" icon="export" @click="handleExportXls('支出合同')" v-has="'expenditureContract:export'">
|
||||
导出
|
||||
</a-button>
|
||||
<a-button type="primary" icon="download" @click="downTemplate('支出合同导入模板')"
|
||||
v-has="'expenditureContract:downTemplate'">下载模板
|
||||
</a-button>
|
||||
<a-button type="danger" icon="delete" @click="batchDel" v-has="'expenditureContract:batchDel'">批量删除</a-button>
|
||||
</div>
|
||||
<!-- 操作按钮区域-end-->
|
||||
@@ -88,12 +93,25 @@
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="handleEdit(record.id)" v-has="'expenditureContract:edit'">编辑</a>
|
||||
<a @click="handleDelete(record.id)" v-has="'expenditureContract:delete'">删除</a>
|
||||
|
||||
<!-- v-if="record.status === 2"-->
|
||||
<a @click="handleAudit(record.id)" v-has="'revenueContract:aduit'">审核</a>
|
||||
<!-- v-if="record.status === 1 || record.status === 4" -->
|
||||
<a @click="handleEdit(record.id, record.contractNum)"
|
||||
v-has="'expenditureContract:edit'">编辑</a>
|
||||
<!-- v-if="record.status === 3" -->
|
||||
<a @click="handleArchive(record.id)" v-has="'revenueContract:archive'">存档</a>
|
||||
<!-- v-if="record.status === 1 || record.status === 2 || record.status === 4"-->
|
||||
<a @click="handleDelete(record.id)"
|
||||
v-has="'expenditureContract:delete'">删除</a>
|
||||
<!-- v-if="record.status === 5"-->
|
||||
<a :disabled="true">已存档</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
</a-card>
|
||||
|
||||
<revenue-contract-aduit-module ref="aduitForm" @ok="modalFormOk"></revenue-contract-aduit-module>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -103,10 +121,12 @@ import IconImg from '@assets/imgs/icon/icon_revenue_contract.png'
|
||||
import { JeroListMixin } from '../../../mixins/JeroListMixin'
|
||||
import { RangeDateMixin } from '../../../mixins/RangeDateMixin'
|
||||
import JDate from '../../../components/tools/JDate'
|
||||
import { archiveRevenueContract } from '../../../api/incomePaymentsApi'
|
||||
import RevenueContractAduitModule from '../revenueContract/modules/RevenueContractAduitModule'
|
||||
|
||||
export default {
|
||||
name: 'ExpenditureContractList',
|
||||
components: { PageHeaderTitle, JDate },
|
||||
components: { PageHeaderTitle, JDate, RevenueContractAduitModule },
|
||||
mixins: [JeroListMixin, RangeDateMixin],
|
||||
computed: {
|
||||
importExcelUrl: function () {
|
||||
@@ -206,6 +226,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 详情
|
||||
* @param id
|
||||
*/
|
||||
toContractDetail(id) {
|
||||
console.log(id)
|
||||
this.$router.push({
|
||||
@@ -214,7 +238,46 @@ export default {
|
||||
revenueId: id
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 审核
|
||||
* @param id
|
||||
*/
|
||||
handleAudit(id) {
|
||||
this.$refs.aduitForm.contractType = 2
|
||||
this.$refs.aduitForm.contractId = id
|
||||
this.$refs.aduitForm.open()
|
||||
},
|
||||
/**
|
||||
* 存档
|
||||
* @param id
|
||||
*/
|
||||
handleArchive(id) {
|
||||
console.log(id)
|
||||
let that = this
|
||||
this.$confirm({
|
||||
title: '存档',
|
||||
content: '确认存档?',
|
||||
onOk: function () {
|
||||
that.loading = true
|
||||
that.loading = false
|
||||
let param = {
|
||||
contractId: id,
|
||||
contractStatus: 5
|
||||
}
|
||||
archiveRevenueContract(param).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.loadData()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -53,6 +53,7 @@ export default {
|
||||
confirmLoading: false,
|
||||
form: this.$form.createForm(this),
|
||||
contractId: '',
|
||||
contractType: 1, // 1---收入合同;2---支出合同
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
@@ -92,7 +93,14 @@ export default {
|
||||
values.contractId = this.contractId
|
||||
const formData = Object.assign(this.model, values)
|
||||
console.log('表单提交数据', formData)
|
||||
aduitRevenueContract(formData).then((res) => {
|
||||
// 收入合同、支出合同调用不同接口
|
||||
let methodFunction
|
||||
if (this.contractType === 1) {
|
||||
methodFunction = aduitRevenueContract
|
||||
} else {
|
||||
methodFunction = ''
|
||||
}
|
||||
methodFunction(formData).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.$emit('ok')
|
||||
|
||||
Reference in New Issue
Block a user