|
@@ -20,7 +20,7 @@
|
|
|
@change="changeCostType"
|
|
|
change-on-select
|
|
|
v-model="costType"
|
|
|
- expand-trigger="hover"
|
|
|
+ expand-trigger="hover"
|
|
|
:options="costTypeList"
|
|
|
:fieldNames="{ label: 'name', value: 'costTypeSn', children: 'children' }"
|
|
|
id="productInfoList-costType"
|
|
@@ -72,12 +72,20 @@
|
|
|
:data="loadData"
|
|
|
:scroll="{ x: 1120, y: tableHeight }"
|
|
|
bordered>
|
|
|
+
|
|
|
<!-- 状态 -->
|
|
|
- <template slot="state" slot-scope="text, record">
|
|
|
- <span>{{ record.state == 1 ? '已启用' : '已禁用' }}</span>
|
|
|
+ <template slot="accountExpensesSn" slot-scope="text, record">
|
|
|
+ <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ text }}</span>
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="record.state == 'WAIT_AUDIT'"
|
|
|
+ class="button-warring"
|
|
|
+ @click="handleAudit(record)"
|
|
|
+ id="expenseManagement-edit-btn">审核</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
@@ -92,23 +100,16 @@
|
|
|
class="button-error"
|
|
|
@click="handleDel(record)"
|
|
|
id="expenseManagement-del-btn">删除</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- v-if="record.state == 'AUDIT_PASS'"
|
|
|
- class="button-success"
|
|
|
- @click="handleDetail(record)"
|
|
|
- id="expenseManagement-detail-btn">详情</a-button>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
<!-- 详情 -->
|
|
|
- <expense-management-detail-modal :openModal="openModal" :itemId="itemId" @close="openModal=false" />
|
|
|
+ <expense-management-detail-modal :openModal="openModal" :itemId="itemId" @close="closeDetail" />
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
-import { settleExpenseQuery, delExpense, settleExpenseQuerySum } from '@/api/settleExpense'
|
|
|
+import { settleExpenseQuery, delExpense, settleExpenseQuerySum, auditExpense } from '@/api/settleExpense'
|
|
|
import { costTypeAllQuery } from '@/api/costType'
|
|
|
import expenseManagementDetailModal from './detailModal.vue'
|
|
|
import moment from 'moment'
|
|
@@ -141,7 +142,7 @@ export default {
|
|
|
// 表头
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
- { title: '费用单号', dataIndex: 'accountExpensesSn', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '费用单号', dataIndex: 'accountExpensesSn', width: 250, align: 'center', scopedSlots: { customRender: 'accountExpensesSn' } },
|
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '费用类型', dataIndex: 'name', align: 'center', customRender: function (text, record) { return [record.expensesTypeName1, record.expensesTypeName2, record.expensesTypeName3].join(' > ') } },
|
|
|
{ title: '金额', dataIndex: 'settleAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
@@ -200,6 +201,10 @@ export default {
|
|
|
this.costTypeList = res.data
|
|
|
})
|
|
|
},
|
|
|
+ closeDetail () {
|
|
|
+ this.openModal = false
|
|
|
+ this.itemId = null
|
|
|
+ },
|
|
|
// 费用类型 change
|
|
|
changeCostType (val, opt) {
|
|
|
this.queryParam.expensesTypeSn1 = val[0] ? val[0] : ''
|
|
@@ -214,47 +219,27 @@ export default {
|
|
|
this.$router.push({ name: 'expenseManagementAdd' })
|
|
|
}
|
|
|
},
|
|
|
- // 提交
|
|
|
- handleSubmit (row) {
|
|
|
- const _this = this
|
|
|
- _this.itemId = item.id
|
|
|
- _this.$confirm({
|
|
|
- title: '提示',
|
|
|
- content: '确定要进行提交操作吗?',
|
|
|
- centered: true,
|
|
|
- onOk () {
|
|
|
- // dealerProductTypeDel({ id: _this.itemId }).then(res => {
|
|
|
- // if (res.status == 200) {
|
|
|
- // _this.$message.success(res.message)
|
|
|
- // _this.$refs.table.refresh()
|
|
|
- // }
|
|
|
- // })
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// 详情
|
|
|
handleDetail (row) {
|
|
|
this.itemId = row.id
|
|
|
this.openModal = true
|
|
|
- // this.$router.push({ path: `/financialManagement/expenseManagement/detail/${row.id}`})
|
|
|
},
|
|
|
// 审核
|
|
|
- handleExamine (row, type) {
|
|
|
+ handleAudit (row, type) {
|
|
|
const _this = this
|
|
|
this.$confirm({
|
|
|
title: '提示',
|
|
|
- content: '操作后不可恢复,确定要进行' + (type == 1 ? ' 通过 ' : ' 不通过 ') + '操作吗?',
|
|
|
+ content: '确定要审核吗?',
|
|
|
centered: true,
|
|
|
onOk () {
|
|
|
- // delectRolePower({
|
|
|
- // id: row.id
|
|
|
- // }).then(res => {
|
|
|
- // console.log(res, 'res1111')
|
|
|
- // if (res.status == 200) {
|
|
|
- // _this.$message.success(res.message)
|
|
|
- // _this.$refs.table.refresh()
|
|
|
- // }
|
|
|
- // })
|
|
|
+ auditExpense({
|
|
|
+ id: row.id
|
|
|
+ }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$message.success(res.message)
|
|
|
+ _this.$refs.table.refresh()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|