|
|
@@ -0,0 +1,264 @@
|
|
|
+<template>
|
|
|
+ <div v-loading="loading" style="padding: 20px">
|
|
|
+ <div class="qs_search" style="margin-bottom: 10px">
|
|
|
+ <el-tag
|
|
|
+ v-for="v in status"
|
|
|
+ :key="v.id"
|
|
|
+ :type="v.id===search.status?'success':'info'"
|
|
|
+ @click="getData_(v.id)"
|
|
|
+ >{{ v.name }}
|
|
|
+ </el-tag>
|
|
|
+ <div class="flex_1" />
|
|
|
+ </div>
|
|
|
+ <div class="qs_search" style="margin-bottom: 0px;display: flex;justify-content: space-between;align-items: center;">
|
|
|
+ <el-form ref="form" label-width="80px" style="display: flex;flex-direction: row;">
|
|
|
+ <el-form-item label="公司名称">
|
|
|
+ <el-input size="small" v-model="search.name"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label-width="5px">
|
|
|
+ <el-button @click="search_" size="small" type="primary">查询</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div>
|
|
|
+ <el-button size="small" @click="show_user_invoice_add(0)" type="primary">上传发票</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-table row-key="id" :data="list">
|
|
|
+ <el-table-column prop="company_name" label="公司名称"></el-table-column>
|
|
|
+ <el-table-column prop="money" label="发票金额">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.money}}</span>
|
|
|
+ <br/>
|
|
|
+ <a style="color: red" target="_blank" :href="scope.row.file">查看发票</a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="is_income" label="类型">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span :style="`color:${scope.row.is_income_obj.color}`">{{scope.row.is_income_obj.name}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="status" label="审核状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span :style="`color:${scope.row.status_obj.color}`">{{scope.row.status_obj.name}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="addtime" label="发票日期"></el-table-column>
|
|
|
+ <el-table-column fixed="right" width="160px" prop="uid" label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="show_user_settlement(scope.row.id)">关联订单</el-button>
|
|
|
+ <el-dropdown @command="(command) => manager_space(command, scope.row.id)" style="margin-left: 10px">
|
|
|
+ <el-button type="text">更多</el-button>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item v-if="scope.row.status!=4" command="edit">编辑</el-dropdown-item>
|
|
|
+ <el-dropdown-item v-if="scope.row.status==1" command="agree">审核通过</el-dropdown-item>
|
|
|
+ <el-dropdown-item v-if="scope.row.status==1" command="refuse">审核拒绝</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="log">操作日志</el-dropdown-item>
|
|
|
+ <el-dropdown-item v-if="scope.row.status!=4" command="del">删除</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ style="margin-top: 10px"
|
|
|
+ layout="prev, pager, next"
|
|
|
+ @current-change="page_event"
|
|
|
+ :page-size="search.pagesize"
|
|
|
+ :total="search.total">
|
|
|
+ </el-pagination>
|
|
|
+
|
|
|
+ <pub_log v-if="drawer_obj.pub_log" :back="this" :pro="drawer_obj.id" action="user_invoice"></pub_log>
|
|
|
+ <user_settlement v-if="drawer_obj.user_settlement" :back="this" :pro="drawer_obj.id"></user_settlement>
|
|
|
+ <user_invoice_add v-if="drawer_obj.user_invoice_add" :back="this" :pro="drawer_obj.id"></user_invoice_add>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import user_invoice_add from '@/components/drawer/invoice/user_invoice_add';
|
|
|
+ import pub_log from '@/components/drawer/pub_log';
|
|
|
+ import user_settlement from '@/components/drawer/invoice/user_settlement';
|
|
|
+ export default {
|
|
|
+ props: [],
|
|
|
+ components: {user_invoice_add,pub_log,user_settlement,user_invoice_add},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ loading: true,
|
|
|
+ drawer_obj:{
|
|
|
+ user_settlement:false,
|
|
|
+ user_invoice_add:false,
|
|
|
+ id:0,
|
|
|
+ pub_log:false,
|
|
|
+ },
|
|
|
+ search: {
|
|
|
+ pagesize: 15,
|
|
|
+ total: 0,
|
|
|
+ status:1,
|
|
|
+ name: "",
|
|
|
+ },
|
|
|
+ status:[
|
|
|
+
|
|
|
+ ],
|
|
|
+ list: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {},
|
|
|
+ watch: {},
|
|
|
+ created() {
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getList();
|
|
|
+ this.get_status();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ show_user_settlement(id)
|
|
|
+ {
|
|
|
+ this.drawer_obj.id = id;
|
|
|
+ this.drawer_obj.user_settlement = true;
|
|
|
+ },
|
|
|
+ show_user_invoice_add(id)
|
|
|
+ {
|
|
|
+ this.drawer_obj.id = id;
|
|
|
+ this.drawer_obj.user_invoice_add = true;
|
|
|
+ },
|
|
|
+ manager_space(command,id)
|
|
|
+ {
|
|
|
+ if(command=='log')
|
|
|
+ {
|
|
|
+ this.drawer_obj.id=id;
|
|
|
+ this.drawer_obj.pub_log=true;
|
|
|
+ }
|
|
|
+ else if(command=='del')
|
|
|
+ {
|
|
|
+ this.admin_del(id);
|
|
|
+ }
|
|
|
+ else if(command=='agree')
|
|
|
+ {
|
|
|
+ this.admin_agree(id);
|
|
|
+ }
|
|
|
+ else if(command=='refuse')
|
|
|
+ {
|
|
|
+ this.admin_refuse(id);
|
|
|
+ }
|
|
|
+ else if(command=='edit')
|
|
|
+ {
|
|
|
+ this.show_user_invoice_add(id);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async getList() {
|
|
|
+ this.loading = true;
|
|
|
+ this.drawer = false;
|
|
|
+ let res = await this.$post("/uapi/pub/info/user/user_invoice/admin_list", this.search);
|
|
|
+ this.loading = false;
|
|
|
+ if (res.status == 1) {
|
|
|
+ this.list = res.data.list;
|
|
|
+ this.search.total = res.data.total;
|
|
|
+ this.search.pagesize = res.data.pagesize;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async get_status() {
|
|
|
+ this.loading = true;
|
|
|
+ let res = await this.$post("/uapi/pub/info/user/user_invoice/get_status", this.search);
|
|
|
+ this.loading = false;
|
|
|
+ if (res.status == 1) {
|
|
|
+ this.status = res.data.list;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async admin_refuse(id) {
|
|
|
+ this.$prompt('请输入拒绝的理由', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ }).then(async ({ value }) => {
|
|
|
+ this.loading = true;
|
|
|
+ let res =await this.$post("/uapi/pub/info/user/user_invoice/admin_refuse",{id:id,reason:value});
|
|
|
+ if (res.status == 1) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '成功!'
|
|
|
+ });
|
|
|
+ await this.getList();
|
|
|
+ await this.get_status();
|
|
|
+ }
|
|
|
+ this.loading = false;
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async admin_agree(id) {
|
|
|
+ this.$confirm('是否确认通过?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ this.loading = true;
|
|
|
+ let res =await this.$post("/uapi/pub/info/user/user_invoice/admin_agree",{id:id});
|
|
|
+ if (res.status == 1) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '成功!'
|
|
|
+ });
|
|
|
+ await this.getList();
|
|
|
+ await this.get_status();
|
|
|
+ }
|
|
|
+ this.loading = false;
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async admin_del(id) {
|
|
|
+ this.$confirm('是否确认删除?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ this.loading = true;
|
|
|
+ let res =await this.$post("/uapi/pub/info/user/user_invoice/admin_del",{id:id});
|
|
|
+ if (res.status == 1) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '成功!'
|
|
|
+ });
|
|
|
+ await this.getList();
|
|
|
+ }
|
|
|
+ this.loading = false;
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ page_event(page) {
|
|
|
+ this.search.page = page;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ getData_(id) {
|
|
|
+ this.search.status = id;
|
|
|
+ this.search.page=0;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ search_() {
|
|
|
+ this.search.page = 0;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ }
|
|
|
+ };
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+ .el-tag {
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+</style>
|