|
@@ -1,79 +1,88 @@
|
|
<template>
|
|
<template>
|
|
- <a-card size="small" :bordered="false" class="funAccountList-wrap">
|
|
+ <div class="funAccountList-wrap">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<!-- 搜索条件 -->
|
|
<!-- 搜索条件 -->
|
|
<div ref="tableSearch" class="funAccountList-page-search-wrapper">
|
|
<div ref="tableSearch" class="funAccountList-page-search-wrapper">
|
|
<div>
|
|
<div>
|
|
- 资金账户功能:<a-radio-group
|
|
+ 资金账户功能:
|
|
|
|
+ <a-radio-group
|
|
|
|
+ size="large"
|
|
v-model="enableFundAccount"
|
|
v-model="enableFundAccount"
|
|
:options="[
|
|
:options="[
|
|
{ label: '启用', value: '1' },
|
|
{ label: '启用', value: '1' },
|
|
{ label: '禁用', value: '0' },
|
|
{ label: '禁用', value: '0' },
|
|
]"
|
|
]"
|
|
- @change="onChange2" />
|
|
+ @change="enableFundAccountChange" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
开启资金账户功能后,在进行财务收款和付款时,需要从下面列表选择一个账户。
|
|
开启资金账户功能后,在进行财务收款和付款时,需要从下面列表选择一个账户。
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <!-- 操作按钮 -->
|
|
+
|
|
- <div class="table-operator">
|
|
+ <a-card size="small" :bordered="false">
|
|
- <a-button id="funAccountList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
|
|
+ <!-- 操作按钮 -->
|
|
- </div>
|
|
+ <div class="table-operator">
|
|
- <!-- 列表 -->
|
|
+ <a-button id="funAccountList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
|
|
- <s-table
|
|
+ </div>
|
|
- class="sTable fixPagination"
|
|
+ <!-- 列表 -->
|
|
- ref="table"
|
|
+ <s-table
|
|
- :style="{ height: tableHeight+84.5+'px' }"
|
|
+ class="sTable fixPagination"
|
|
- size="small"
|
|
+ ref="table"
|
|
- :rowKey="(record) => record.id"
|
|
+ :style="{ height: tableHeight+84.5+'px' }"
|
|
- :columns="columns"
|
|
+ size="small"
|
|
- :data="loadData"
|
|
+ :rowKey="(record) => record.id"
|
|
- :scroll="{ y: tableHeight }"
|
|
+ :columns="columns"
|
|
- :defaultLoadData="false"
|
|
+ :data="loadData"
|
|
- bordered>
|
|
+ :scroll="{ y: tableHeight }"
|
|
- <!-- 费用类别 -->
|
|
+ :defaultLoadData="false"
|
|
- <template slot="expensesType" slot-scope="text, record">
|
|
+ bordered>
|
|
- {{ record.expensesTypeName1 }} <span v-if="record.expensesTypeName2">>{{ record.expensesTypeName2 }}</span> <span v-if="record.expensesTypeName3">>{{ record.expensesTypeName3 }}</span>
|
|
+ <!-- 费用类别 -->
|
|
- </template>
|
|
+ <template slot="expensesType" slot-scope="text, record">
|
|
- <!-- 费用单号 -->
|
|
+ {{ record.expensesTypeName1 }} <span v-if="record.expensesTypeName2">>{{ record.expensesTypeName2 }}</span> <span v-if="record.expensesTypeName3">>{{ record.expensesTypeName3 }}</span>
|
|
- <template slot="accountExpensesNo" slot-scope="text, record">
|
|
+ </template>
|
|
- <span :class="$hasPermissions('B_expenseDetail')?'active':'common'" @click="handleDetail(record)">{{ text }}</span>
|
|
+ <!-- 审核 -->
|
|
- </template>
|
|
+ <template slot="audit" slot-scope="text, record">
|
|
- <!-- 审核 -->
|
|
+ <stateIcon :title="record.stateDictValue" :state="record.state == 'AUDIT_PASS'?'1':'2'"></stateIcon>
|
|
- <template slot="audit" slot-scope="text, record">
|
|
+ </template>
|
|
- <stateIcon :title="record.stateDictValue" :state="record.state == 'AUDIT_PASS'?'1':'2'"></stateIcon>
|
|
+ <!-- 操作 -->
|
|
- </template>
|
|
+ <template slot="action" slot-scope="text, record">
|
|
- <!-- 操作 -->
|
|
+ <a-button
|
|
- <template slot="action" slot-scope="text, record">
|
|
+ size="small"
|
|
- <a-button
|
|
+ type="link"
|
|
- size="small"
|
|
+ v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_expenseAudit')"
|
|
- type="link"
|
|
+ class="button-primary"
|
|
- v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_expenseAudit')"
|
|
+ @click="handleDetail(record)"
|
|
- class="button-primary"
|
|
+ id="foundAcount-detail-btn">资金明细</a-button>
|
|
- @click="handleAudit(record)"
|
|
+ <a-button
|
|
- id="expenseManagement-audit-btn">审核</a-button>
|
|
+ size="small"
|
|
- <a-button
|
|
+ type="link"
|
|
- size="small"
|
|
+ v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_expenseAudit')"
|
|
- type="link"
|
|
+ class="button-primary"
|
|
- v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_expenseEdit')"
|
|
+ @click="handleAudit(record)"
|
|
- class="button-primary"
|
|
+ id="foundAcount-audit-btn">审核</a-button>
|
|
- @click="handleEdit(record)"
|
|
+ <a-button
|
|
- id="expenseManagement-edit-btn">编辑</a-button>
|
|
+ size="small"
|
|
- <a-button
|
|
+ type="link"
|
|
- size="small"
|
|
+ v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_expenseEdit')"
|
|
- type="link"
|
|
+ class="button-primary"
|
|
- v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_expenseDel')"
|
|
+ @click="handleEdit(record)"
|
|
- class="button-error"
|
|
+ id="foundAcount-edit-btn">编辑</a-button>
|
|
- @click="handleDel(record)"
|
|
+ <a-button
|
|
- id="expenseManagement-del-btn">删除</a-button>
|
|
+ size="small"
|
|
- <span v-if="record.state != 'WAIT_AUDIT'||( !$hasPermissions('B_expenseAudit')&& !$hasPermissions('B_expenseEdit') && !$hasPermissions('B_expenseDel'))">--</span>
|
|
+ type="link"
|
|
- </template>
|
|
+ v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_expenseDel')"
|
|
- </s-table>
|
|
+ class="button-error"
|
|
|
|
+ @click="handleDel(record)"
|
|
|
|
+ id="foundAcount-del-btn">删除</a-button>
|
|
|
|
+ <span v-if="record.state != 'WAIT_AUDIT'||( !$hasPermissions('B_expenseAudit')&& !$hasPermissions('B_expenseEdit') && !$hasPermissions('B_expenseDel'))">--</span>
|
|
|
|
+ </template>
|
|
|
|
+ </s-table>
|
|
|
|
+ </a-card>
|
|
|
|
+
|
|
</a-spin>
|
|
</a-spin>
|
|
<!-- 详情 -->
|
|
<!-- 详情 -->
|
|
- <addModal :openModal="openModal" :itemId="itemId" @close="closeDetail" />
|
|
+ <addModal :openModal="openModal" :itemId="itemId" @close="closeAddModal" />
|
|
- </a-card>
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
@@ -99,11 +108,11 @@ export default {
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
- { title: '账户类型', dataIndex: 'accountExpensesNo', width: '20%', align: 'center', scopedSlots: { customRender: 'accountExpensesNo' } },
|
|
+ { title: '账户类型', dataIndex: 'accountExpensesNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '账户名称', dataIndex: 'createDate', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '账户名称', dataIndex: 'createDate', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '账户号码', scopedSlots: { customRender: 'expensesType' }, width: '20%', align: 'center' },
|
|
{ title: '账户号码', scopedSlots: { customRender: 'expensesType' }, width: '20%', align: 'center' },
|
|
{ title: '收入金额', dataIndex: 'settleAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
{ title: '收入金额', dataIndex: 'settleAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
- { title: '支出金额', dataIndex: 'settleAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
+ { title: '支出金额', dataIndex: 'settleAmount1', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
{ title: '启用', scopedSlots: { customRender: 'enable' }, width: '3%', align: 'center' },
|
|
{ title: '启用', scopedSlots: { customRender: 'enable' }, width: '3%', align: 'center' },
|
|
{ title: '审核', scopedSlots: { customRender: 'audit' }, width: '3%', align: 'center' },
|
|
{ title: '审核', scopedSlots: { customRender: 'audit' }, width: '3%', align: 'center' },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
|
|
@@ -131,15 +140,22 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- closeDetail () {
|
|
+ enableFundAccountChange (v) {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ // 关闭弹框
|
|
|
|
+ closeAddModal () {
|
|
this.openModal = false
|
|
this.openModal = false
|
|
this.itemId = null
|
|
this.itemId = null
|
|
},
|
|
},
|
|
// 新增/编辑
|
|
// 新增/编辑
|
|
handleEdit (row) {
|
|
handleEdit (row) {
|
|
|
|
+ this.itemId = row.id
|
|
|
|
+ this.openModal = true
|
|
},
|
|
},
|
|
// 资金明细
|
|
// 资金明细
|
|
handleDetail (row) {
|
|
handleDetail (row) {
|
|
|
|
+ this.$router.push({ name: 'fundAccountDetail', params: { id: row.id } })
|
|
},
|
|
},
|
|
// 审核
|
|
// 审核
|
|
handleAudit (row) {
|
|
handleAudit (row) {
|
|
@@ -238,13 +254,15 @@ export default {
|
|
<style lang="less">
|
|
<style lang="less">
|
|
.funAccountList-wrap{
|
|
.funAccountList-wrap{
|
|
.funAccountList-page-search-wrapper{
|
|
.funAccountList-page-search-wrapper{
|
|
- padding: 0 10px 10px 10px;
|
|
+ font-size: 16px;
|
|
- border-bottom: 1px solid #eee;
|
|
+ padding:10px 15px;
|
|
- margin-bottom: 15px;
|
|
+ margin-bottom: 8px;
|
|
|
|
+ background-color: #fff;
|
|
> div{
|
|
> div{
|
|
padding: 5px 0;
|
|
padding: 5px 0;
|
|
&:last-child{
|
|
&:last-child{
|
|
color: #999;
|
|
color: #999;
|
|
|
|
+ font-size: 14px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|