添加补贴列表
This commit is contained in:
parent
4d5e804b05
commit
568a27b6e4
@ -271,4 +271,22 @@ export function singleMerBillExport(type,data) {
|
|||||||
*/
|
*/
|
||||||
export function singleMerBillHeader(id,data) {
|
export function singleMerBillHeader(id,data) {
|
||||||
return request.get(`financial_record/mer_title/${id}`, data)
|
return request.get(`financial_record/mer_title/${id}`, data)
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @description 补贴 -- 列表
|
||||||
|
*/
|
||||||
|
export function subsidyListApi(data) {
|
||||||
|
return request.get(`system/financial/subsidy/index`, data)
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description 补贴审核
|
||||||
|
*/
|
||||||
|
export function subsidyStatusApi(data) {
|
||||||
|
return request.post(`system/financial/subsidy/status`, data)
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description 补贴修改
|
||||||
|
*/
|
||||||
|
export function subsidyUpdateApi(data) {
|
||||||
|
return request.post(`system/financial/subsidy/update`, data)
|
||||||
|
}
|
||||||
|
@ -83,7 +83,7 @@ const accountsRouter =
|
|||||||
activeMenu: `${roterPre}/accounts/merchantBill`
|
activeMenu: `${roterPre}/accounts/merchantBill`
|
||||||
},
|
},
|
||||||
component: () => import('@/views/accounts/statement/merchantDetail'),
|
component: () => import('@/views/accounts/statement/merchantDetail'),
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'reconciliation/order/:id/:type?',
|
path: 'reconciliation/order/:id/:type?',
|
||||||
@ -105,6 +105,15 @@ const accountsRouter =
|
|||||||
},
|
},
|
||||||
component: () => import('@/views/accounts/capitalFlow/index')
|
component: () => import('@/views/accounts/capitalFlow/index')
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'subsidy',
|
||||||
|
name: 'subsidy',
|
||||||
|
meta: {
|
||||||
|
title: '补贴记录',
|
||||||
|
noCache: true
|
||||||
|
},
|
||||||
|
component: () => import('@/views/accounts/subsidy/index')
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'transferRecord',
|
path: 'transferRecord',
|
||||||
name: 'AccountsTransferRecord',
|
name: 'AccountsTransferRecord',
|
||||||
|
187
src/views/accounts/subsidy/index.vue
Normal file
187
src/views/accounts/subsidy/index.vue
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
<template>
|
||||||
|
<div class="divBox">
|
||||||
|
<div class="selCard mb14">
|
||||||
|
<el-form :model="tableFrom" ref="searchForm" size="small" inline label-width="85px">
|
||||||
|
<el-form-item label="类型:" prop="type">
|
||||||
|
<el-select v-model="tableFrom.type" clearable placeholder="请选择" class="selWidth" @change="getList(1)">
|
||||||
|
<el-option label="春耕采购补贴" value="1" />
|
||||||
|
<el-option label="增收补贴" value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态:" prop="status">
|
||||||
|
<el-select v-model="tableFrom.status" clearable placeholder="请选择" class="selWidth" @change="getList(1)">
|
||||||
|
<el-option label="未激活" value="-1" />
|
||||||
|
<el-option label="审核中" value="0" />
|
||||||
|
<el-option label="待确认" value="1" />
|
||||||
|
<el-option label="已到账" value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button>
|
||||||
|
<el-button size="small" @click="searchReset()">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<cards-data v-if="cardLists.length>0" :card-lists="cardLists" />
|
||||||
|
<el-card>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="tableData.data"
|
||||||
|
size="small"
|
||||||
|
class="table"
|
||||||
|
highlight-current-row
|
||||||
|
>
|
||||||
|
<el-table-column label="编号" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.id }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="user.merchant.mer_name" label="商户名称" min-width="150" />
|
||||||
|
<el-table-column prop="coupon_type_name" label="类型" min-width="120" />
|
||||||
|
<el-table-column prop="amount" label="补贴金额" min-width="100" sortable />
|
||||||
|
<el-table-column prop="send_status_name" label="状态" min-width="80" />
|
||||||
|
<el-table-column prop="extra.sale_target" label="销售目标金额" min-width="120" />
|
||||||
|
<el-table-column prop="extra.official_purchase_target" label="里海云仓采购目标金额" min-width="150" />
|
||||||
|
<el-table-column prop="extra.purchase_target" label="其他店铺采购目标金额" min-width="150" />
|
||||||
|
<el-table-column prop="create_time" label="创建时间" min-width="150" sortable />
|
||||||
|
<el-table-column label="操作" min-width="150" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
@click="handleStatus(scope.row.id, scope.$index)"
|
||||||
|
>审核</el-button>
|
||||||
|
</template>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<router-link v-if="scope.row.send_status == 0" :to=" { path:`${roterPre}` + '/order/list?order_sn='+scope.row.order_sn } ">
|
||||||
|
<el-button type="text" size="small" class="mr10">修改</el-button>
|
||||||
|
</router-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block">
|
||||||
|
<el-pagination
|
||||||
|
background
|
||||||
|
:page-size="tableFrom.limit"
|
||||||
|
:current-page="tableFrom.page"
|
||||||
|
layout="total, prev, pager, next, jumper"
|
||||||
|
:total="tableData.total"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="pageChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<!-- <editForm ref="editForm" @complete="fetchData"></editForm> -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { subsidyListApi, subsidyStatusApi, subsidyUpdateApi } from '@/api/accounts'
|
||||||
|
import { fromList } from '@/libs/constants.js'
|
||||||
|
import createWorkBook from '@/utils/newToExcel.js'
|
||||||
|
import fileList from '@/components/exportFile/fileList'
|
||||||
|
import { roterPre } from '@/settings'
|
||||||
|
import cardsData from "@/components/cards/index";
|
||||||
|
import timeOptions from '@/utils/timeOptions';
|
||||||
|
export default {
|
||||||
|
name: 'AccountsCapitalFlow',
|
||||||
|
components: { fileList, cardsData },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pickerOptions: timeOptions,
|
||||||
|
timeVal: [],
|
||||||
|
tableData: {
|
||||||
|
data: [],
|
||||||
|
total: 0
|
||||||
|
},
|
||||||
|
roterPre: roterPre,
|
||||||
|
listLoading: true,
|
||||||
|
tableFrom: {
|
||||||
|
type: '',
|
||||||
|
status: '',
|
||||||
|
keyword: '',
|
||||||
|
page: 1,
|
||||||
|
limit: 20
|
||||||
|
},
|
||||||
|
fromList: fromList,
|
||||||
|
options: [],
|
||||||
|
cardLists: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**重置 */
|
||||||
|
searchReset(){
|
||||||
|
this.timeVal = []
|
||||||
|
this.tableFrom.type = ""
|
||||||
|
this.tableFrom.status = ""
|
||||||
|
this.$refs.searchForm.resetFields()
|
||||||
|
this.getList(1)
|
||||||
|
},
|
||||||
|
// 具体日期
|
||||||
|
onchangeTime(e) {
|
||||||
|
this.timeVal = e
|
||||||
|
this.tableFrom.date = e ? this.timeVal.join('-') : ''
|
||||||
|
this.tableFrom.page = 1;
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
async exports(x) {
|
||||||
|
let excelData = JSON.parse(JSON.stringify(this.tableFrom)), data = []
|
||||||
|
excelData.page = 1
|
||||||
|
let pageCount = 1
|
||||||
|
let lebData = {};
|
||||||
|
for (let i = 0; i < pageCount; i++) {
|
||||||
|
lebData = await this.downData(excelData)
|
||||||
|
pageCount = Math.ceil(lebData.count/excelData.limit)
|
||||||
|
if (lebData.export.length) {
|
||||||
|
data = data.concat(lebData.export)
|
||||||
|
excelData.page++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
createWorkBook(lebData.header, lebData.title, data, lebData.foot,lebData.filename);
|
||||||
|
return
|
||||||
|
},
|
||||||
|
// 列表
|
||||||
|
getList(num) {
|
||||||
|
this.listLoading = true
|
||||||
|
this.tableFrom.page = num ? num : this.tableFrom.page;
|
||||||
|
subsidyListApi(this.tableFrom)
|
||||||
|
.then((res) => {
|
||||||
|
this.tableData.data = res.data.list
|
||||||
|
this.tableData.total = res.data.count
|
||||||
|
this.listLoading = false
|
||||||
|
})
|
||||||
|
.catch((res) => {
|
||||||
|
this.$message.error(res.message)
|
||||||
|
this.listLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
pageChange(page) {
|
||||||
|
this.tableFrom.page = page
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 审核
|
||||||
|
handleStatus(id, idx) {
|
||||||
|
this.$modalSure('确定审核通过当前数据?').then(() => {
|
||||||
|
subsidyStatusApi({id: id})
|
||||||
|
.then(({ message }) => {
|
||||||
|
this.$message.success(message);
|
||||||
|
this.getList(1)
|
||||||
|
})
|
||||||
|
.catch(({ message }) => {
|
||||||
|
this.$message.error(message);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.tableFrom.limit = val
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
Loading…
x
Reference in New Issue
Block a user