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