|
|
@@ -0,0 +1,528 @@
|
|
|
+<template>
|
|
|
+ <div class="my-share personal-info">
|
|
|
+ <div class="common-title-box">
|
|
|
+ <h2>发票管理</h2>
|
|
|
+ </div>
|
|
|
+ <div class="search-item">
|
|
|
+ <label>状态</label>
|
|
|
+ <el-select
|
|
|
+ v-model="searchStatus"
|
|
|
+ @change="getList(1)"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in searchStatusList"
|
|
|
+ :key="item.status"
|
|
|
+ :label="item.status_name"
|
|
|
+ :value="item.status"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ :data="invoiceList"
|
|
|
+ v-loading="tableLoading"
|
|
|
+ :max-height="tableHeight"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ type="index"
|
|
|
+ label="#"
|
|
|
+ sortable
|
|
|
+ width="54"
|
|
|
+ :index="(pageNumber - 1) * pageSize + 1"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="id" label="ID" width="250"> </el-table-column>
|
|
|
+ <el-table-column prop="sn" label="编号" width="190"> </el-table-column>
|
|
|
+ <el-table-column prop="invoice_type" label="发票类型" width="90">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ goodsTypeListCss[scope.row.invoice_type].text }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="invoice_object" label="抬头类型" width="90">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ goodsObjectListCss[scope.row.invoice_object].text }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="amount" label="金额" width="90">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span class="currectPrice"
|
|
|
+ >¥{{ scope.row.amount | cutMoneyFiter }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="submit_time" label="提交时间" width="180">
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column prop="status" label="状态" width="112">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="status-box">
|
|
|
+ <span
|
|
|
+ :style="{
|
|
|
+ background: refundStatusList[scope.row.status].bg,
|
|
|
+ }"
|
|
|
+ ></span>
|
|
|
+ <b
|
|
|
+ :style="{
|
|
|
+ color: refundStatusList[scope.row.status].textColor,
|
|
|
+ }"
|
|
|
+ >{{ refundStatusList[scope.row.status].text }}</b
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="reject_reason" label="驳回原因" width="280">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="status" label="操作" width="80" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <a class="apply" @click="handleDetail(scope.row, scope.$index)">
|
|
|
+ 详情
|
|
|
+ </a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="pageNumber"
|
|
|
+ :page-sizes="[10, 20, 30, 40, 50]"
|
|
|
+ :page-size="pageSize"
|
|
|
+ layout="total, prev, pager, next, sizes, jumper"
|
|
|
+ :total="total_count"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ <div
|
|
|
+ class="kefu-box"
|
|
|
+ v-if="kefuShow"
|
|
|
+ @mouseover="kefuCode = true"
|
|
|
+ @mouseleave="kefuCode = false"
|
|
|
+ >
|
|
|
+ <div v-if="kefuCode" style="background: #ffffff">
|
|
|
+ <img src="../../../assets/21st-kefu-code.jpg" />
|
|
|
+ <span>扫一扫,添加客服微信</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div v-else>
|
|
|
+ <img class="kefu-img" src="../../../assets/kefu.png" />
|
|
|
+ <span style="color: #ff3333; font-weight: bold; font-size: 16px"
|
|
|
+ >客服咨询入口</span
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-dialog
|
|
|
+ title="发票申请信息"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="800px"
|
|
|
+ class="invoice-dialog"
|
|
|
+ v-if="ktjeInfo"
|
|
|
+ >
|
|
|
+ <h5>发票信息</h5>
|
|
|
+ <div class="item-info">
|
|
|
+ <label>发票类型:</label>
|
|
|
+ <b>{{ goodsTypeListCss[ktjeInfo.invoice_type].text }}</b>
|
|
|
+ </div>
|
|
|
+ <div class="item-info">
|
|
|
+ <label>抬头类型:</label>
|
|
|
+ <b>{{ goodsObjectListCss[ktjeInfo.invoice_object].text }}</b>
|
|
|
+ </div>
|
|
|
+ <div class="item-info">
|
|
|
+ <label>抬头名称:</label>
|
|
|
+ <b>{{ ktjeInfo.buyer_info_mc }}</b>
|
|
|
+ </div>
|
|
|
+ <template v-if="ktjeInfo.invoice_object === 1">
|
|
|
+ <div class="item-info">
|
|
|
+ <label>单位税号:</label>
|
|
|
+ <b>{{ ktjeInfo.buyer_info_sh }}</b>
|
|
|
+ </div>
|
|
|
+ <div class="item-info">
|
|
|
+ <label>注册地址:</label>
|
|
|
+ <b>{{ ktjeInfo.buyer_info_dz }}</b>
|
|
|
+ </div>
|
|
|
+ <div class="item-info">
|
|
|
+ <label>注册电话:</label>
|
|
|
+ <b>{{ ktjeInfo.buyer_info_dh }}</b>
|
|
|
+ </div>
|
|
|
+ <div class="item-info">
|
|
|
+ <label>开户银行:</label>
|
|
|
+ <b>{{ ktjeInfo.buyer_info_khh }}</b>
|
|
|
+ </div>
|
|
|
+ <div class="item-info">
|
|
|
+ <label>银行账号:</label>
|
|
|
+ <b>{{ ktjeInfo.buyer_info_zh }}</b>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div class="item-info">
|
|
|
+ <label>身份证号:</label>
|
|
|
+ <b>{{ ktjeInfo.buyer_info_sfzh }}</b>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <div class="item-info">
|
|
|
+ <label>金额:</label>
|
|
|
+ <b>{{ ktjeInfo.amount | cutMoneyFiter }}</b>
|
|
|
+ </div>
|
|
|
+ <template v-if="ktjeInfo.invoice_file_url">
|
|
|
+ <div class="item-info">
|
|
|
+ <label>发票地址:</label>
|
|
|
+ <b
|
|
|
+ ><a
|
|
|
+ style="text-decoration: underline; color: #165dff"
|
|
|
+ target="_blank"
|
|
|
+ :href="ktjeInfo.invoice_file_url"
|
|
|
+ >点击查看</a
|
|
|
+ ></b
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div class="item-info">
|
|
|
+ <label>审核状态:</label>
|
|
|
+ <b
|
|
|
+ :style="{
|
|
|
+ color: refundStatusList[ktjeInfo.status].bg,
|
|
|
+ }"
|
|
|
+ >{{ refundStatusList[ktjeInfo.status].text }}</b
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <template v-if="ktjeInfo.reject_reason">
|
|
|
+ <div class="item-info">
|
|
|
+ <label>驳回原因:</label>
|
|
|
+ <b>{{ ktjeInfo.reject_reason }}</b>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-if="ktje.length > 0">
|
|
|
+ <h5>订单列表</h5>
|
|
|
+ <el-table class="search-table" :data="ktje" style="width: 100%">
|
|
|
+ <el-table-column type="index" label="#" width="54"> </el-table-column>
|
|
|
+ <el-table-column prop="id" label="订单ID" width="250">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="sn" label="订单编号" width="190">
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column prop="name" label="订单名称"> </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="small" type="primary" @click="dialogVisible = false"
|
|
|
+ >关 闭</el-button
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+//这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
|
|
+//例如:import 《组件名称》from ‘《组件路径》';
|
|
|
+import { cutMoneyFiter } from "@/utils/defined";
|
|
|
+import { getLogin } from "@/api/ajax";
|
|
|
+export default {
|
|
|
+ //import引入的组件需要注入到对象中才能使用
|
|
|
+ components: {},
|
|
|
+ props: [],
|
|
|
+ filters: {
|
|
|
+ cutMoneyFiter,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ //这里存放数据
|
|
|
+ return {
|
|
|
+ pageSize: 10,
|
|
|
+ pageNumber: 1,
|
|
|
+
|
|
|
+ goodsTypeListCss: {
|
|
|
+ 0: {
|
|
|
+ text: "普通发票",
|
|
|
+ color: "#722ED1",
|
|
|
+ },
|
|
|
+ 1: {
|
|
|
+ text: "专用发票",
|
|
|
+ color: "#722ED1",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ goodsObjectListCss: {
|
|
|
+ 0: {
|
|
|
+ text: "个人",
|
|
|
+ color: "#722ED1",
|
|
|
+ },
|
|
|
+ 1: {
|
|
|
+ text: "企业",
|
|
|
+ color: "#722ED1",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ refundStatusList: {
|
|
|
+ 2: {
|
|
|
+ text: "审核通过",
|
|
|
+ bg: "#00B42A",
|
|
|
+ textColor: "#1D2129",
|
|
|
+ },
|
|
|
+ 0: {
|
|
|
+ text: "待审核",
|
|
|
+ bg: "#165DFF",
|
|
|
+ textColor: "#1D2129",
|
|
|
+ },
|
|
|
+ 1: {
|
|
|
+ text: "驳回",
|
|
|
+ bg: "#FF7D00",
|
|
|
+ textColor: "#1D2129",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ searchStatusList: [
|
|
|
+ {
|
|
|
+ status_name: "全部",
|
|
|
+ status: -1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ status_name: "审核通过",
|
|
|
+ status: 2,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ status_name: "待审核",
|
|
|
+ status: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ status_name: "驳回",
|
|
|
+ status: 1,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+
|
|
|
+ invoiceList: [],
|
|
|
+ total_count: 0,
|
|
|
+ searchStatus: -1, // 查询状态
|
|
|
+ tableLoading: false,
|
|
|
+ tableHeight: "", // 表格高度
|
|
|
+ kefuShow: true, // 是否显示客服
|
|
|
+ kefuCode: false, // 显示客服二维码
|
|
|
+ multipleSelection: [], // 选中的id
|
|
|
+ dialogVisible: false,
|
|
|
+ ktje: [],
|
|
|
+ refundId: "",
|
|
|
+ ktjeInfo: null,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ //计算属性 类似于data概念
|
|
|
+ computed: {},
|
|
|
+ //监控data中数据变化
|
|
|
+ watch: {},
|
|
|
+ //方法集合
|
|
|
+ methods: {
|
|
|
+ //计算table高度(动态设置table高度)
|
|
|
+ getTableHeight() {
|
|
|
+ let tableH = 260; //距离页面下方的高度
|
|
|
+ let tableHeightDetil = window.innerHeight - tableH;
|
|
|
+ if (tableHeightDetil <= 300) {
|
|
|
+ this.tableHeight = 300;
|
|
|
+ } else {
|
|
|
+ this.tableHeight = window.innerHeight - tableH;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.pageSize = val;
|
|
|
+ this.pageNumber = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.pageNumber = val;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ getList() {
|
|
|
+ this.tableLoading = true;
|
|
|
+ let MethodName =
|
|
|
+ "/ShopServer/Client/OrderManager/PageQueryMyInvoiceApplyList";
|
|
|
+ let data = {
|
|
|
+ page_capacity: this.pageSize,
|
|
|
+ cur_page: this.pageNumber,
|
|
|
+ status: this.searchStatus,
|
|
|
+ };
|
|
|
+ getLogin(MethodName, data)
|
|
|
+ .then((res) => {
|
|
|
+ this.tableLoading = false;
|
|
|
+ if (res.status === 1) {
|
|
|
+ this.invoiceList = res.invoice_apply_list;
|
|
|
+ this.total_count = res.total_count;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.tableLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 发票申请详情
|
|
|
+ handleDetail(row) {
|
|
|
+ this.ktjeInfo = null;
|
|
|
+ let Mnames = "/ShopServer/Client/OrderManager/GetInvoiceApplyInfo";
|
|
|
+ let datas = {
|
|
|
+ id: row.id,
|
|
|
+ };
|
|
|
+ getLogin(Mnames, datas).then((res) => {
|
|
|
+ if (res.status === 1) {
|
|
|
+ this.ktje = res.order_list;
|
|
|
+ this.ktjeInfo = res.invoice_apply;
|
|
|
+ this.dialogVisible = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ //生命周期 - 创建完成(可以访问当前this实例)
|
|
|
+ created() {
|
|
|
+ this.getTableHeight();
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ //生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
+ mounted() {},
|
|
|
+ //生命周期-创建之前
|
|
|
+ beforeCreated() {},
|
|
|
+ //生命周期-挂载之前
|
|
|
+ beforeMount() {},
|
|
|
+ //生命周期-更新之前
|
|
|
+ beforUpdate() {},
|
|
|
+ //生命周期-更新之后
|
|
|
+ updated() {},
|
|
|
+ //生命周期-销毁之前
|
|
|
+ beforeDestory() {},
|
|
|
+ //生命周期-销毁完成
|
|
|
+ destoryed() {},
|
|
|
+ //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
+ activated() {},
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+/* @import url(); 引入css类 */
|
|
|
+.my-share {
|
|
|
+ background: #ffffff;
|
|
|
+ border-radius: 4px;
|
|
|
+ padding: 24px;
|
|
|
+ h2 {
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 20px;
|
|
|
+ line-height: 28px;
|
|
|
+ color: #1d2129;
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
+ .el-table {
|
|
|
+ margin: 24px 0;
|
|
|
+ max-width: 100%;
|
|
|
+ }
|
|
|
+ .el-pagination {
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ .status-box {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ span {
|
|
|
+ width: 6px;
|
|
|
+ height: 6px;
|
|
|
+ border-radius: 3px;
|
|
|
+ margin-right: 8px;
|
|
|
+ margin-top: 2px;
|
|
|
+ }
|
|
|
+ b {
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ color: #1d2129;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .order-detail {
|
|
|
+ color: #165dff;
|
|
|
+ margin-right: 8px;
|
|
|
+ }
|
|
|
+ .apply {
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ color: #165dff;
|
|
|
+ margin-right: 10px;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+ .items-type {
|
|
|
+ padding: 1px 8px;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ border-radius: 2px;
|
|
|
+ }
|
|
|
+ .oldPrice {
|
|
|
+ color: #86909c;
|
|
|
+ margin-left: 8px;
|
|
|
+ }
|
|
|
+ .code {
|
|
|
+ color: #175dff;
|
|
|
+ }
|
|
|
+ .copy {
|
|
|
+ color: #c9cdd4;
|
|
|
+ margin-left: 8px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .kefu-box {
|
|
|
+ position: fixed;
|
|
|
+ right: 0;
|
|
|
+ bottom: 300px;
|
|
|
+ z-index: 3;
|
|
|
+ text-align: center;
|
|
|
+ cursor: pointer;
|
|
|
+ img {
|
|
|
+ width: 150px;
|
|
|
+ }
|
|
|
+ .kefu-img {
|
|
|
+ width: 70px;
|
|
|
+ }
|
|
|
+ span {
|
|
|
+ display: block;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 12px;
|
|
|
+ line-height: 1.4;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.common-title-box {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+:deep .el-table-column--selection .cell {
|
|
|
+ padding: 0 10px !important;
|
|
|
+}
|
|
|
+.search-item {
|
|
|
+ padding-top: 16px;
|
|
|
+ label {
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ color: #4e5969;
|
|
|
+ font-weight: 400;
|
|
|
+ margin-right: 8px;
|
|
|
+ }
|
|
|
+ .el-select {
|
|
|
+ width: 160px;
|
|
|
+ }
|
|
|
+ :deep .el-input__inner {
|
|
|
+ height: 32px;
|
|
|
+ color: #1d2129;
|
|
|
+ background: #f2f3f5;
|
|
|
+ border: none;
|
|
|
+ }
|
|
|
+ :deep .el-input__icon {
|
|
|
+ line-height: 32px;
|
|
|
+ color: #4e5969 !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+.invoice-dialog {
|
|
|
+ h5 {
|
|
|
+ font-size: 16px;
|
|
|
+ margin: 10px 0 15px 0;
|
|
|
+ }
|
|
|
+ :deep .el-dialog__body {
|
|
|
+ padding: 0px 20px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.item-info {
|
|
|
+ display: flex;
|
|
|
+ width: 100%;
|
|
|
+ margin: 10px 0;
|
|
|
+ label {
|
|
|
+ width: 90px;
|
|
|
+ text-align: right;
|
|
|
+ flex-shrink: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|