| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433 |
- <?php
- use common\helpers\ComponentHelper;
- ComponentHelper::loadComponentView('com-export-dialog');
- ?>
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <span>开票管理</span>
- <el-form size="small" :inline="true" :model="search" style="float: right;margin-top: -8px;">
- <el-form-item>
- <com-export-dialog :field_list='exportList' :action_url="export_url" :params="search">
- </com-export-dialog>
- </el-form-item>
- </el-form>
- </div>
- <div class="table-body">
- <div class="input-item">
- <el-input size="small" placeholder="请输入会员id" v-model="search.user_id" clearable>
- </el-input>
- </div>
- <div class="input-item">
- <el-input size="small" placeholder="请输入会员昵称/手机号" v-model="search.keyword" clearable>
- </el-input>
- </div>
- <div class="input-item">
- <el-input size="small" placeholder="请输入订单编号" v-model="search.order_no" clearable>
- </el-input>
- </div>
- <el-select size="small" v-model="search.head_type" class="input-item">
- <el-option :key="index" :label="item.name" :value="item.label"
- v-for="(item, index) in headTypeList"></el-option>
- </el-select>
- <el-select size="small" v-model="search.invoice_status" class="input-item">
- <el-option :key="index" :label="item.name" :value="item.label"
- v-for="(item, index) in invoiceTypeList"></el-option>
- </el-select>
- <div class="input-item">
- <el-button type="primary" size="small" icon="el-icon-search" @click="handleClick" class="search_button">搜索</el-button>
- </div>
- <el-table :data="list" size="small" stripe @selection-change="handleSelectionChange" v-loading="loading" style="margin-bottom: 15px">
- <el-table-column type="selection" align="center" width="60"></el-table-column>
- <el-table-column prop="id" label="ID" min-width="100" align="center"></el-table-column>
- <el-table-column prop="user.id" label="会员ID" min-width="100" align="center"></el-table-column>
- <el-table-column label="基本信息" min-width="200">
- <template slot-scope="scope">
- <div class="table-info-img-text">
- <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
- <div slot="error" class="image-slot">
- <com-image src="/resources/img/common/default-avatar.png"></com-image>
- </div>
- </el-image>
- <div class="table-info-text">
- <div v-if="scope.row.user.nickname">{{scope.row.user.nickname}}</div>
- <div>{{scope.row.user.mobile}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- prop="order_no"
- label="订单编号"
- align="center"
- min-width="250"
- >
- <template slot-scope="scope">
- <el-tooltip effect="dark" content="点击查看订单详情" placement="top">
- <el-button @click="goOrder(scope.row.order_id)" size="mini" type="primary" effect="dark">{{scope.row.order_no}}</el-button>
- </el-tooltip>
- </template>
- </el-table-column>
- <el-table-column prop="pay_money" label="发票金额" min-width="100" align="center"></el-table-column>
- <el-table-column label="发票类型" prop="type" min-width="120" align="center">
- <template slot-scope="scope">
- <div v-if="scope.row.type==1">增值税电子普通发票</div>
- </template>
- </el-table-column>
- <el-table-column label="抬头类型" prop="head_type" min-width="120" align="center">
- <template slot-scope="scope">
- <div v-if="scope.row.head_type==1">个人/事业单位</div>
- <div v-if="scope.row.head_type==2">企业</div>
- </template>
- </el-table-column>
- <el-table-column prop="head_name" label="发票抬头" min-width="100" align="center"></el-table-column>
- <el-table-column prop="bank_name" label="开户银行" min-width="100" align="center"></el-table-column>
- <el-table-column prop="account" label="开户账户" min-width="100" align="center"></el-table-column>
- <el-table-column prop="tax_no" label="税号" min-width="100" align="center"></el-table-column>
- <el-table-column prop="email" label="邮箱号" min-width="100" align="center"></el-table-column>
- <el-table-column prop="address" label="地址" min-width="100" align="center"></el-table-column>
- <el-table-column prop="mobile" label="电话" min-width="100" align="center"></el-table-column>
- <el-table-column label="申请时间" min-width="200" align="center">
- <template slot-scope="scope">
- <div>申请时间:{{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
- </template>
- </el-table-column>
- <el-table-column label="开票状态" prop="invoice_status" min-width="120" align="center">
- <template slot-scope="scope">
- <div v-if="scope.row.invoice_status==0">待开票</div>
- <div v-if="scope.row.invoice_status==1">已开票</div>
- <div v-if="scope.row.invoice_status==2">已驳回</div>
- </template>
- </el-table-column>
- <el-table-column prop="remark" label="备注" min-width="100" align="center"></el-table-column>
- <el-table-column label="操作" min-width="200" align="center">
- <template slot-scope="scope">
- <el-button size="mini" circle style="margin-top: 10px;padding: 0 !important;border: 0;margin: 0 5px;" v-if="scope.row.invoice_status == 0" @click="openDialogForm(scope.row.id,1)">
- <el-tooltip class="item" effect="dark" content="同意" placement="top">
- <img src="resources/img/mall/pass.png" alt="">
- </el-tooltip>
- </el-button>
- <el-button size="mini" circle style="margin-left: 10px;margin-top: 10px;padding: 0 !important;border: 0;margin: 0 5px;" v-if="scope.row.invoice_status == 0" @click="openDialogForm(scope.row.id,2)">
- <el-tooltip class="item" effect="dark" content="拒绝" placement="top">
- <img src="resources/img/mall/nopass.png" alt="">
- </el-tooltip>
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <div flex="box:last cross:center">
- <div></div>
- <div>
- <el-pagination v-if="list.length > 0" style="display: inline-block;float: right;" background :page-size="pagination.defaultPageSize" @current-change="pageChange" layout="prev, pager, next" :current-page="pagination.current_page" :total="pagination.totalCount">
- </el-pagination>
- </div>
- </div>
- </div>
- </el-card>
- <el-dialog :title="new_status == 1 ? '通过' : '驳回'" :visible.sync="dialogFormVisible" width="20%" center :close-on-click-modal="false">
- <el-form :model="check_form">
- <el-form-item label="备注" label-width="100px" required>
- <el-col :span="18">
- <el-input v-model="check_form.remark" type="textarea" autocomplete="off"></el-input>
- </el-col>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="closeDialogForm">取 消</el-button>
- <el-button type="primary" v-loading="applyLoading" @click="apply()">确 定</el-button>
- </div>
- </el-dialog>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data() {
- return {
- dialogFormVisible: false,
- dialogVisible: false,
- dialogTitle: '批量审核',
- search: {
- keyword: '',
- user_id: '',
- head_type:-1,
- invoice_status:-1,
- order_no:'',
- },
- multipleSelection: [],
- checkedData: undefined,
- alipay: {
- content: '',
- showAlipay: false,
- alipay_way: "",
- alitopay_switch: false,
- avoidtax_switch: false,
- },
- loading: false,
- activeName: '-1',
- list: [],
- pagination: null,
- export_list: [],
- user_id: '',
- withdraw_type: '',
- withdraw_from: '',
- keyword: '',
- date: '',
- start_date: '',
- end_date: '',
- page: 1,
- batch_cash: {
- status: null,
- content: null,
- },
- dialogLoading: false,
- apply_status: 1,
- check_form: {
- remark: '',
- },
- new_status: 0,
- id:0,
- is_disabled: false,
- mobile : '',
- need_risk : 0,
- cash_log :null,
- applyLoading: false,
- headTypeList:[
- {
- name:'全部',
- label:-1,
- },
- {
- name:'个人/事业单位',
- label:1,
- },
- {
- name:'企业',
- label:2,
- },
- ],
- invoiceTypeList:[
- {
- name:'全部',
- label:-1,
- },
- {
- name:'待开票',
- label:0,
- },
- {
- name:'已开票',
- label:1,
- },
- {
- name:'驳回开票',
- label:2,
- },
- ],
- exportList: {},
- export_url: 'mall/order/invoice', // 导出路径
- };
- },
- mounted() {
- this.loadData();
- },
- created() {
- },
- methods: {
- handleSelectionChange(val) {
- this.multipleSelection = val;
- this.checkedData = val;
- },
- loadData(status = -1, page = 1) {
- this.loading = true;
- let params = {
- r: 'mall/order/invoice',
- status: status,
- page: page,
- user_id: this.search.user_id,
- keyword: this.search.keyword,
- invoice_status:this.search.invoice_status,
- head_type:this.search.head_type,
- order_no:this.search.order_no,
- };
- if (this.date) {
- Object.assign(params, {
- start_date: this.date[0],
- end_date: this.date[1],
- });
- }
- request({
- params,
- method: 'get'
- }).then(e => {
- this.loading = false;
- if (e.data.code == 0) {
- this.page = page
- this.list = e.data.data.list;
- this.pagination = e.data.data.pagination;
- this.exportList = e.data.data.export_list;
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.loading = false;
- });
- },
- pageChange(page) {
- this.loadData(this.activeName, page);
- },
- handleClick(tab, event) {
- // console.log(this.user_id);
- // console.log(this.withdraw_type);
- // console.log(this.withdraw_from);
- // console.log(this.keyword);
- this.search.status = this.activeName
- this.loadData(this.activeName)
- },
- openDialogForm(id,status) {
- this.dialogFormVisible = true;
- this.new_status = status;
- this.id = id;
- },
- apply() {
- if (this.applyLoading === true) return;
- this.applyLoading = true;
- request({
- params: {
- r: 'mall/order/invoice',
- },
- method: 'post',
- data: {
- id: this.id,
- status: this.new_status,
- remark: this.check_form.remark,
- }
- }).then(e => {
- if (e.data.code === 0) {
- this.$message.success(e.data.msg);
- this.closeDialogForm();
- this.loadData(this.activeName, this.page);
- } else {
- this.$message.error(e.data.msg);
- }
- this.applyLoading = false;
- }).catch(e => {
- this.applyLoading = false;
- });
- },
- goOrder(id){
- let params = {
- r: 'mall/order/detail'
- };
- if (id) params = Object.assign(params, {
- id: id
- });
- navigateTo(params);
- },
- closeDialogForm() {
- this.dialogFormVisible = false;
- this.new_status = 0;
- this.check_form.remark = ''
- this.id = 0;
- }
- }
- })
- </script>
- <style>
- .el-tabs__header {
- padding: 0 20px;
- height: 56px;
- line-height: 56px;
- background-color: #fff;
- }
- .export-btn {
- position: absolute;
- top: 10px;
- right: 10px;
- z-index: 2;
- }
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- /* .table-body .el-table__row .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- }*/
- .el-table th>.cell {
- color: #333;
- font-weight: bold;
- font-size: 14px;
- }
- .el-table__footer-wrapper,
- .el-table__header-wrapper {
- border-bottom: 1.4px solid #D6D6D6;
- }
- .input-item {
- display: inline-block;
- width: 250px;
- margin: 0 0 20px 20px;
- }
- .search_float {
- float: right;
- }
- .input-item .el-input__inner:hover {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input__inner:focus {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input-group__append {
- background-color: #fff;
- border-left: 0;
- width: 10%;
- padding: 0;
- }
- /*.input-item .el-input-group__append .el-button {
- padding: 0;
- }*/
- /*.input-item .el-input-group__append .el-button {
- margin: 0;
- }*/
- .default-avatar {
- width: 50px;
- height: 50px;
- border-radius: 50%;
- margin-right: 8px;
- }
- .uer-nickname {
- flex: 1;
- }
- .user_img {
- position: relative;
- margin-right: 8px;
- /* height: 50px;
- width: 50px; */
- }
- </style>
|