提交 dd647a0c authored 作者: 宋雄's avatar 宋雄

优化

上级 bdea32ac
...@@ -80,6 +80,7 @@ const getAccountListByIdApi = (params)=>getAction("/property-community/property/ ...@@ -80,6 +80,7 @@ const getAccountListByIdApi = (params)=>getAction("/property-community/property/
const companyAuditAccountPageApi = (params)=>postAction("/property-community/property/communityReconciliation/companyAudit",params); const companyAuditAccountPageApi = (params)=>postAction("/property-community/property/communityReconciliation/companyAudit",params);
const getCommunityRecordListApi = (params)=>getAction("/property-central/property/auditRecord/getRecordList",params); const getCommunityRecordListApi = (params)=>getAction("/property-central/property/auditRecord/getRecordList",params);
const companySubCentralApi = (params)=>getAction("/property-community/property/communityReconciliation/companySubCentral",params); const companySubCentralApi = (params)=>getAction("/property-community/property/communityReconciliation/companySubCentral",params);
const companySubAuditApi = (params)=>getAction("/property-community/property/communityReconciliation/companySubAudit",params);
//数据字典 //数据字典
const addDict = (params)=>postAction("/sys/dict/add",params); const addDict = (params)=>postAction("/sys/dict/add",params);
...@@ -196,6 +197,7 @@ export { ...@@ -196,6 +197,7 @@ export {
companyAuditAccountPageApi, companyAuditAccountPageApi,
getCommunityRecordListApi, getCommunityRecordListApi,
companySubCentralApi, companySubCentralApi,
companySubAuditApi
} }
......
...@@ -43,12 +43,18 @@ ...@@ -43,12 +43,18 @@
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <div class="table-operator">
<a-button :disabled="selectedRowKeys.length === 0" @click="onReconciliation()" type="primary" icon="audit">申请对账</a-button> <a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="onReconciliation()"><a-icon type="audit" />批量审核</a-menu-item>
<a-menu-item key="2" @click="onSubmit()"><a-icon type="audit" />批量申请对账</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div> </div>
<!-- table区域-begin --> <!-- table区域-begin -->
<div> <div>
<a-table ref="table" size="middle" :scroll="{x:true}" bordered rowKey="id" :columns="columns" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" <a-table ref="table" size="middle" :scroll="{x:true}" bordered rowKey="id" :columns="columns" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, getCheckboxProps: onCheckboxProps}"
:dataSource="dataSource" :pagination="ipagination" :loading="loading" class="j-table-force-nowrap" @change="handleTableChange"> :dataSource="dataSource" :pagination="ipagination" :loading="loading" class="j-table-force-nowrap" @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a href="javascript:;" @click="propertyDetails(1, record.id)">详情</a> <a href="javascript:;" @click="propertyDetails(1, record.id)">详情</a>
...@@ -58,17 +64,29 @@ ...@@ -58,17 +64,29 @@
</template> </template>
<template v-if="record.companyAuditStatus === 'companyAuditPass' && !record.centralAuditStatus"> <template v-if="record.companyAuditStatus === 'companyAuditPass' && !record.centralAuditStatus">
<a-divider type="vertical" /> <a-divider type="vertical" />
<a href="javascript:;" @click="onReconciliation(record.id)">申请对账</a> <a href="javascript:;" @click="onSubmit(record.id)">申请对账</a>
</template> </template>
</span> </span>
</a-table> </a-table>
</div> </div>
<!-- table区域-end --> <!-- table区域-end -->
<a-modal v-model="visibleAudit" :width="400">
<template slot="footer">
<a-button key="back" @click="visibleAudit = false">取消</a-button>
<a-button key="reject" type="danger" @click="handleAudit('refuse')">驳回</a-button>
<a-button key="submit" type="primary" @click="handleAudit('auditPass')">通过</a-button>
</template>
<div class="ant-modal-confirm-body">
<a-icon type="question-circle" style="color:#faad14;margin-right: 16px;font-size:22px;" />
<span class="ant-modal-confirm-title">确认要审核当前对账吗?</span>
</div>
</a-modal>
</a-card> </a-card>
</template> </template>
<script> <script>
import { companySubCentralApi } from '@/api/api' import { companySubAuditApi, companySubCentralApi } from '@/api/api'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { filterDictTextByStatic, COMPANY_AUDIT_STATUS, CENTRAL_AUDIT_STATUS } from '@/assets/static.js' import { filterDictTextByStatic, COMPANY_AUDIT_STATUS, CENTRAL_AUDIT_STATUS } from '@/assets/static.js'
...@@ -154,10 +172,17 @@ export default { ...@@ -154,10 +172,17 @@ export default {
list: '/property-community/property/communityReconciliation/companyAuditList', list: '/property-community/property/communityReconciliation/companyAuditList',
delete: '/property-central/property/communityReconciliation/delete', delete: '/property-central/property/communityReconciliation/delete',
deleteBatch: '/property-central/property/communityReconciliation/deleteBatch', deleteBatch: '/property-central/property/communityReconciliation/deleteBatch',
} },
visibleAudit: false
} }
}, },
methods: { methods: {
onCheckboxProps: record=> ({
props: {
disabled: record.companyAuditStatus === 'companyRefuse' || (record.companyAuditStatus === 'companyAuditPass' && (record.centralAuditStatus === 'centralWaitAudit' || record.centralAuditStatus === 'centralAuditPass')),
name: record.id
}
}),
propertyDetails(type, id) { propertyDetails(type, id) {
this.$router.push({ this.$router.push({
path: '/base/RecordDetails?type=' + type +'&id=' + id path: '/base/RecordDetails?type=' + type +'&id=' + id
...@@ -171,7 +196,30 @@ export default { ...@@ -171,7 +196,30 @@ export default {
this.handleDetail(record) this.handleDetail(record)
} }
}, },
onReconciliation(id) { handleAudit(type) {
let ids = this.selectedRowKeys.join(',')
companySubAuditApi({
ids,
auditStatus: type
}).then(res=> {
this.visibleAudit = false
this.$message.success(`${type === 'auditPass' ? '审核' : '驳回'}成功!`)
this.searchQuery()
})
},
onReconciliation() {
let flag = this.selectionRows.some(item=>item.companyAuditStatus !== 'companyWaitAudit')
if(flag) {
this.$message.warning('请注意,已选数据中有 已审核 账单!')
} else {
this.visibleAudit = true
}
},
onSubmit(id) {
let flag = this.selectionRows.some(item=>item.companyAuditStatus === 'companyWaitAudit')
if(flag) {
this.$message.warning('请注意,已选数据中有 未审核 账单!')
} else {
let ids = id || this.selectedRowKeys.join(',') let ids = id || this.selectedRowKeys.join(',')
let that = this let that = this
this.$confirm({ this.$confirm({
...@@ -189,6 +237,7 @@ export default { ...@@ -189,6 +237,7 @@ export default {
}) })
} }
} }
}
} }
</script> </script>
<style scoped> <style scoped>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论