Browse Source

流水管理

natasha 1 year ago
parent
commit
0a298be8b6

+ 3 - 1
src/icons/svg/barcode-line.svg

@@ -1,3 +1,5 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M1.16602 2.33398H2.33268V11.6673H1.16602V2.33398ZM3.49935 2.33398H4.08268V11.6673H3.49935V2.33398ZM4.66602 2.33398H5.83268V11.6673H4.66602V2.33398ZM6.41602 2.33398H7.58268V11.6673H6.41602V2.33398ZM8.16602 2.33398H9.33268V11.6673H8.16602V2.33398ZM9.91602 2.33398H10.4993V11.6673H9.91602V2.33398ZM11.0827 2.33398H12.8327V11.6673H11.0827V2.33398Z" fill="currentColor"/>
+<g id="gift-line">
+<path id="Vector" d="M8.75262 1.16797C10.0413 1.16797 11.0859 2.21264 11.0859 3.5013C11.0859 3.92657 10.9721 4.32527 10.7734 4.66862L13.4193 4.66797V5.83462H12.2526V11.668C12.2526 11.9901 11.9915 12.2513 11.6693 12.2513H2.33594C2.01377 12.2513 1.7526 11.9901 1.7526 11.668V5.83462H0.585938V4.66797L3.2318 4.66862C3.03304 4.32527 2.91927 3.92657 2.91927 3.5013C2.91927 2.21264 3.96394 1.16797 5.2526 1.16797C5.94982 1.16797 6.57562 1.47376 7.00314 1.95854C7.42962 1.47376 8.05542 1.16797 8.75262 1.16797ZM6.41928 5.83462H2.91927V11.0846H6.41928V5.83462ZM11.0859 5.83462H7.58595V11.0846H11.0859V5.83462ZM5.2526 2.33464C4.60827 2.33464 4.08594 2.85697 4.08594 3.5013C4.08594 4.11635 4.56187 4.62023 5.16554 4.66477L5.2526 4.66797H6.41928V3.5013C6.41928 2.91701 5.98977 2.43304 5.42923 2.34792L5.33968 2.33784L5.2526 2.33464ZM8.75262 2.33464C8.13755 2.33464 7.63367 2.81057 7.58916 3.41423L7.58595 3.5013V4.66797H8.75262C9.36762 4.66797 9.87151 4.19204 9.91607 3.58837L9.91928 3.5013C9.91928 2.85697 9.39697 2.33464 8.75262 2.33464Z" fill="currentColor"/>
+</g>
 </svg>

+ 3 - 0
src/icons/svg/copy.svg

@@ -0,0 +1,3 @@
+<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M9.5 2H5V1H9.5C10.0523 1 10.5 1.44772 10.5 2V7.5H9.5V2ZM1.5 4C1.5 3.44772 1.94771 3 2.5 3H7.5C8.05123 3 8.5 3.44586 8.5 3.99919V10.0021C8.5 10.5563 8.051 11 7.50065 11H2.49888C1.94513 11 1.5 10.5508 1.5 10V4ZM7.5 4H2.5V10H7.5V4Z" fill="currentColor"/>
+</svg>

+ 5 - 0
src/router/index.js

@@ -184,6 +184,11 @@ export const constantRoutes = [{
         component: () =>
             import ('@/views/content_manage/newspaper_manage/CheckArticle.vue')
     },
+    {
+        path: '/cdkey_manage',
+        component: () =>
+            import ('@/views/cdkey_manage/index.vue')
+    },
     // 404 page must be placed at the end !!!
     { path: '*', redirect: '/', hidden: true }
 ]

+ 12 - 0
src/styles/index.scss

@@ -287,6 +287,18 @@ div:focus {
     }
 }
 
+.gray-btn {
+    font-size: 14px;
+    color: #B0B0B0;
+    cursor: not-allowed;
+    &:hover {
+        color: #B0B0B0;
+    }
+    &:focus {
+        color: #B0B0B0;
+    }
+}
+
 .el-pagination {
     text-align: right;
     padding-top: 24px;

+ 429 - 0
src/views/cdkey_manage/index.vue

@@ -0,0 +1,429 @@
+<template>
+  <div class="manage-root personnel-manage">
+    <Header />
+    <div class="manage-root-contain">
+        <nav-menu class="manage-root-contain-left" :activeMenuIndex="activeMenuIndex"></nav-menu>
+        <div class="manage-root-contain-right personnel-manage-right">
+            <breadcrumb :breadcrumbList="breadcrumbList" class="breadcrumb-box"></breadcrumb>
+            <div class="personal-inner">
+                <div class="common-title-box">
+                    <h3>兑换码列表</h3>
+                    <div class="btn-box">
+                        <el-button type="primary" size="small" @click="handleEdit()">创建用户</el-button>
+                    </div>
+                </div>
+                <div class="search-box">
+                    <div class="search-item">
+                        <label>搜索</label>
+                        <el-input
+                            placeholder="输入搜索内容"
+                            v-model="searchInput" maxlength="200">
+                            <i slot="suffix" class="el-input__icon el-icon-search" @click="getList(1)" style="cursor: pointer;"></i>
+                        </el-input>
+                    </div>
+                    <div class="search-item">
+                        <label>账户类型</label>
+                        <el-select v-model="searchType" @change="getList(1)" placeholder="请选择">
+                            <el-option
+                                v-for="item in typeList"
+                                :key="item.account_type"
+                                :label="item.account_type_name"
+                                :value="item.account_type">
+                            </el-option>
+                        </el-select>
+                    </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>
+                </div>
+                <el-table
+                    class="search-table"
+                    :data="tableData"
+                    style="width: 100%"
+                    @sort-change="handleSort"
+                    :default-sort = dataSort
+                    :max-height="tableHeight"
+                    v-loading="tableLoading">
+                    <el-table-column
+                        prop="user_name"
+                        label="用户名"
+                        sortable="custom"
+                        width="200"
+                        class-name="user-info">
+                        <template slot-scope="scope">
+                            <el-image
+                                class="touxiang"
+                                :src="scope.row.image_url?scope.row.image_url:require('../../assets/avatar.png')"
+                                fit="cover" style="width:24px;height:24px;margin-right:8px">
+                            </el-image>
+                            <!-- <img class="touxiang" :src="scope.row.image_url?scope.row.image_url:require('../../assets/avatar.png')" /> -->
+                            <span class="name">{{scope.row.user_name}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        prop="real_name"
+                        label="真实姓名"
+                        width="112">
+                    </el-table-column>
+                    <el-table-column
+                        prop="sex_name"
+                        label="性别"
+                        width="56">
+                    </el-table-column>
+                    <el-table-column
+                        prop="account_type_name"
+                        label="账户类型"
+                        width="120" >
+                    </el-table-column>
+                    <el-table-column
+                        prop="email"
+                        label="邮箱"
+                        min-width="200">
+                    </el-table-column>
+                    <el-table-column
+                        prop="phone"
+                        label="手机号"
+                        width="144">
+                    </el-table-column>
+                    <el-table-column
+                        prop="status"
+                        label="状态"
+                        width="96" >
+                        <template slot-scope="scope">
+                            <div class="status-box">
+                                <span :style="{background:statusList[scope.row.status].bg}"></span>
+                                <b :style="{color:statusList[scope.row.status].color}">{{statusList[scope.row.status].text}}</b>
+                            </div>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        prop="create_time"
+                        label="创建时间"
+                        sortable="custom"
+                        width="160">
+                        <template slot-scope="scope">
+                            {{scope.row.create_time?scope.row.create_time.substring(0,16):'-'}}
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        fixed="right"
+                        label="操作"
+                        width="120">
+                        <template slot-scope="scope">
+                            <el-button
+                                @click.native.prevent="handleEdit(scope.row)"
+                                type="text"
+                                size="small"
+                                class="primary-btn">
+                                编辑
+                            </el-button>
+                            <el-button
+                                @click.native.prevent="handleUp(scope.row, scope.$index)"
+                                type="text"
+                                size="small"
+                                class="primary-btn"
+                                v-if="scope.row.status===0">
+                                开启
+                            </el-button>
+                            <el-button
+                                @click.native.prevent="handleUp(scope.row, scope.$index)"
+                                type="text"
+                                size="small"
+                                class="red-btn"
+                                v-else-if="scope.row.status===1">
+                                停用
+                            </el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+                <el-pagination
+                    background
+                    @size-change="handleSizeChange"
+                    @current-change="handleCurrentChange"
+                    :current-page="pageNumber"
+                    :page-sizes="[10, 20, 30, 40]"
+                    :page-size="pageSize"
+                    layout="total, prev, pager, next, sizes, jumper"
+                    :total="total_count">
+                </el-pagination>
+            </div>
+        </div>
+    </div>
+  </div>
+</template>
+
+<script>
+//这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+//例如:import 《组件名称》from ‘《组件路径》';
+import Header from "../../components/Header.vue";
+import NavMenu from "../../components/NavMenu.vue"
+import Breadcrumb from '../../components/Breadcrumb.vue';
+import { getLogin } from "@/api/ajax";
+import { mapState } from 'vuex';
+
+export default {
+  //import引入的组件需要注入到对象中才能使用
+  components: { Header, NavMenu, Breadcrumb },
+  props: {},
+  data() {
+    //这里存放数据
+    return {
+        activeMenuIndex: "cdkey_manage",
+        breadcrumbList:[
+            {
+                icon:'barcode-line',
+                url:'',
+                text:''
+            },
+            {
+                icon:'',
+                url:'',
+                text:'兑换码管理'
+            }
+        ],
+        searchInput: '',
+        searchType: -1,
+        searchStatus: -1,
+        typeList:[
+            {
+                account_type:-1,
+                account_type_name:'全部'
+            }
+        ],
+        statusList:{
+            1:{
+                text:'正常',
+                bg:'#165DFF',
+                color:''
+            },
+            0:{
+                text:'停用',
+                bg:'#F53F3F',
+                color:'#F53F3F'
+            }
+        },
+        tableData:[
+            // {
+            //     id:'1',
+            //     userName:'admin',
+            //     realName:'超级管理员',
+            //     sex:'0',
+            //     type:'0', // 0 管理员 1 平台管理员 2 内容管理员 3 财务管理员 4 兑换码管理员
+            //     email:'d.dkemi@kqtdgbo.tj',
+            //     phone:'13082684216',
+            //     status:'1',
+            //     data:'2018-02-03',
+            //     img:''
+            // }
+        ],
+        pageSize: window.localStorage.getItem('pageSize')?Number(window.localStorage.getItem('pageSize')):10, 
+        pageNumber: window.localStorage.getItem('pageNumber')?Number(window.localStorage.getItem('pageNumber')):1,
+        tableHeight: "", // 表格高度
+        total_count: 0,
+        dataSort: {},
+        tableLoading: false,
+    }
+  },
+  //计算属性 类似于data概念
+  computed: {
+    ...mapState(['$searchStatusList']),
+  },
+  //监控data中数据变化
+  watch: {},
+  //方法集合
+  methods: {
+    handleSort(value){
+        let dataSort = {
+            prop: value.prop,
+            order: value.order
+        }
+        this.dataSort = dataSort
+        this.getList()
+    },
+    // 查询列表
+    getList(page){
+        this.tableLoading = true
+        if(page){
+            this.pageNumber = page
+        }
+        let MethodName = "/ShopServer/Manager/DiscountCodeManager/PageQueryDiscountCodeList";
+        let order_column_list = []
+        if(this.dataSort != {}){
+            if(this.dataSort.order=='descending'){
+                order_column_list = [this.dataSort.prop + ':desc']
+            }else if(this.dataSort.order=='ascending'){
+                // 升序不传值
+                order_column_list = [this.dataSort.prop]
+            }else{
+                order_column_list = ['create_time:desc']
+            }
+        }else{
+            order_column_list = ['create_time:desc']
+        }
+        let data = {
+            search_content:this.searchInput.trim(),
+            account_type:this.searchType,
+            status:this.searchStatus,
+            page_capacity:this.pageSize,
+            cur_page:this.pageNumber,
+            order_column_list: order_column_list
+        }
+        getLogin(MethodName, data)
+        .then((res) => {
+            this.tableLoading = false
+            if(res.status===1){
+               this.tableData = res.discount_code_list
+               this.total_count = res.total_count
+            }
+        })
+        .catch(() => {
+            this.tableLoading = false
+        });
+    },
+    // 编辑账号
+    handleEdit(row){
+        // 根据登录用户判断当前用户是不是超管 在table里加上disabled
+
+        // 点击时记录页码和每页条数
+        window.localStorage.setItem('pageSize',this.pageSize)
+        window.localStorage.setItem('pageNumber',this.pageNumber)
+        if(row&&row.id){
+            this.$router.push({
+                path: "/editPerson",
+                query: {
+                    id: row?row.id:''
+                },
+            });
+        }else{
+            this.$router.push({
+                path: "/createPerson"
+            });
+        }
+        
+    },
+    // 停用 启用
+    handleUp(row, index) {
+      let Mname = "/OrgServer/Manager/SysUserManager/EnableSysUser";
+      let updataData = JSON.parse(JSON.stringify(row));
+      let data = {
+        id: row.id
+      };
+      if (row.status === 0) {
+        // 下架状态
+        data.is_enable = "true";
+        updataData.status = 1;
+      } else if (row.status === 1) {
+        data.is_enable = "false";
+        updataData.status = 0;
+      }
+      getLogin(Mname, data).then(res => {
+        this.$message.success("操作成功");
+        this.$set(this.tableData, index, updataData);
+        this.getList()
+      });
+    },
+    handleSizeChange(val) {
+        this.pageSize = val
+        this.pageNumber = 1
+        this.getList()
+    },
+    handleCurrentChange(val) {
+        this.pageNumber = val
+        this.getList()
+    },
+    //计算table高度(动态设置table高度)
+    getTableHeight() {
+      let tableH = 370; //距离页面下方的高度
+      let tableHeightDetil = window.innerHeight - tableH;
+      if (tableHeightDetil <= 300) {
+        this.tableHeight = 300;
+      } else {
+        this.tableHeight = window.innerHeight - tableH;
+      }
+    },
+    // 用户类型列表
+    getUserAccountTypeList(){
+        let MethodName = "/OrgServer/DictManager/GetSysUserAccountTypeList";
+        getLogin(MethodName, {})
+        .then((res) => {
+            if(res.status===1){
+                this.typeList = this.typeList.concat(res.account_type_list)
+            }
+        })
+        .catch(() => {
+            this.loading = false
+        });
+    }
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {
+    this.getTableHeight();
+    this.getUserAccountTypeList()
+    this.getList()
+  },
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    let _this = this
+    let input = document.querySelector('input');
+    input.addEventListener('keyup', function(event) {
+        // 判断是否按下回车键
+        if (event.keyCode === 13) {
+            // 回车键被按下,执行你想要的操作
+            _this.getList(1)
+        }
+    });
+  },
+  //生命周期-创建之前
+  beforeCreated() { },
+  //生命周期-挂载之前
+  beforeMount() { },
+  //生命周期-更新之前
+  beforUpdate() { },
+  //生命周期-更新之后
+  updated() { },
+  //生命周期-销毁之前
+  beforeDestory() { },
+  //生命周期-销毁完成
+  destoryed() { },
+  //如果页面有keep-alive缓存功能,这个函数会触发
+  activated() { }
+}
+</script>
+<style lang="scss" scoped>
+/* @import url(); 引入css类 */
+</style>
+<style lang="scss">
+.personal-inner{
+    .user-info{
+        .cell{
+            display: flex;
+            align-items: center;
+            .touxiang{
+                width: 24px;
+                height: 24px;
+                border-radius: 50%;
+                margin-right: 8px;
+            }
+        }
+    }
+    .type-info{
+        background: #F2F3F5;
+        border-radius: 2px;
+        color: #1D2129;
+        padding: 2px 8px 3px 8px;
+        font-weight: 500;
+        font-size: 14px;
+        line-height: 22px;
+        height: auto;
+        border: none;
+    }
+}
+</style>

+ 207 - 55
src/views/finance_manage/FlowManage.vue

@@ -11,7 +11,7 @@
                     <div class="btn-box">
                         <ul class="quick-search">
                             <li v-for="(itemq,indexq) in quickList" :key="indexq">
-                                <a @click="qucikSearch(itemq.value,indexq)" :class="[quickIndex===indexq?'active':'']">{{itemq.label}}</a>
+                                <a @click="qucikSearch(itemq,indexq)" :class="[quickIndex===indexq?'active':'']">{{itemq.name}}</a>
                                 <span class="border" :class="[indexq!==quickList.length-1&&quickIndex!==indexq&&quickIndex-1!==indexq?'':'border-no']"></span>
                             </li>
                         </ul>
@@ -41,7 +41,7 @@
                             start-placeholder="开始日期"
                             end-placeholder="结束日期"
                             value-format="yyyy-MM-dd"
-                            @change="getList(1)">
+                            @change="quickIndex=null;getList(1)">
                         </el-date-picker>
                     </div>
                     <div class="search-item">
@@ -135,19 +135,19 @@
                         type="index"
                         label="#"
                         sortable
-                        width="64"
+                        width="54"
                         :index="(pageNumber-1)*pageSize+1">
                     </el-table-column>
                     <el-table-column
                         prop="sn"
                         label="交易单号"
-                        sortable="custom"
-                        width="128"
+                        width="190"
                         class-name="user-info">
                     </el-table-column>
                     <el-table-column
-                        prop="order_time"
+                        prop="pay_time"
                         label="交易时间"
+                        sortable="custom"
                         width="165">
                     </el-table-column>
                     <el-table-column
@@ -159,6 +159,17 @@
                         prop="goods_type"
                         label="商品类型"
                         width="128" >
+                        <template slot-scope="scope">
+                            <span class="items-type" :style="{background:goodsTypeListCss[scope.row.goods_type]?goodsTypeListCss[scope.row.goods_type].bg:'', color:goodsTypeListCss[scope.row.goods_type]?goodsTypeListCss[scope.row.goods_type].color:''}">{{scope.row.goods_type_name}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        prop="is_reservation"
+                        label="是否预定"
+                        width="80" >
+                        <template slot-scope="scope">
+                            {{scope.row.is_reservation==='true'?'是':'否'}}
+                        </template>
                     </el-table-column>
                     <el-table-column
                         prop="goods_study_phase_name"
@@ -177,13 +188,24 @@
                     <el-table-column
                         prop="discount_code"
                         label="兑换码"
-                        width="144" >
+                        width="194" >
+                        <template slot-scope="scope">
+                            <template v-if="scope.row.is_use_discount_code=='false'">
+                                未使用
+                            </template>
+                            <template v-else>
+                                <span class="code" :id="'copy-'+scope.row.discount_code">{{scope.row.discount_code}}</span>
+                                <svg-icon icon-class="copy" class="copy" @click="CopyToClipboard('copy-'+scope.row.discount_code)"></svg-icon>
+                            </template>
+                        </template>
                     </el-table-column>
                     <el-table-column
                         prop="order_amount"
                         label="支付金额"
-                        sortable="custom"
                         width="104">
+                        <template slot-scope="scope">
+                            <span class="currectPrice">¥{{scope.row.order_amount | cutMoneyFiter}}</span>
+                        </template>
                     </el-table-column>
                     <el-table-column
                         prop="pay_type_name"
@@ -191,9 +213,8 @@
                         width="104" >
                     </el-table-column>
                     <el-table-column
-                        prop="order_amount"
+                        prop="transaction_sn"
                         label="支付流水"
-                        sortable="custom"
                         width="144">
                     </el-table-column>
                     <el-table-column
@@ -205,7 +226,7 @@
                     <el-table-column
                         prop="person_city_name"
                         label="客户所在省市"
-                        width="224">
+                        width="164">
                         <template slot-scope="scope">
                             {{scope.row.person_province_name+'/'+scope.row.person_city_name}}
                         </template>
@@ -214,24 +235,30 @@
                         prop="person_org_name"
                         label="客户所在机构"
                         sortable="custom"
-                        width="224">
+                        width="184">
                     </el-table-column>
                     <el-table-column
                         prop="order_status"
                         label="交易状态"
-                        sortable="custom"
                         width="112">
+                        <template slot-scope="scope">
+                            <div class="status-box">
+                                <span :style="{background:transactionListCss[scope.row.order_status]?transactionListCss[scope.row.order_status].bg:''}"></span>
+                                <b>{{transactionListCss[scope.row.order_status]?transactionListCss[scope.row.order_status].text:'-'}}</b>
+                            </div>
+                        </template>
                     </el-table-column>
                     <el-table-column
                         fixed="right"
                         label="操作"
-                        width="120">
+                        width="70">
                         <template slot-scope="scope">
                             <el-button
                                 @click.native.prevent="handleEdit(scope.row)"
                                 type="text"
                                 size="small"
-                                class="red-btn">
+                                class="red-btn"
+                                v-if="scope.row.order_status===1">
                                 退款
                             </el-button>
                             <el-button
@@ -239,7 +266,21 @@
                                 type="text"
                                 size="small"
                                 class="red-btn"
-                                v-if="scope.row.is_use_discount_code==='true'">
+                                v-if="scope.row.order_status===2">
+                                撤回
+                            </el-button>
+                            <el-button
+                                type="text"
+                                size="small"
+                                class="gray-btn"
+                                v-if="scope.row.order_status===3">
+                                退款
+                            </el-button>
+                            <el-button
+                                type="text"
+                                size="small"
+                                class="gray-btn"
+                                v-if="scope.row.order_status===4">
                                 撤回
                             </el-button>
                         </template>
@@ -300,33 +341,12 @@ export default {
                 text:'交易管理'
             }
         ],
-        quickList:[
-            {
-                label:'最近一年',
-                value: -365
-            },
-            {
-                label: '最近一季',
-                value: -120
-            },
-            {
-                label: '最近一月',
-                value: -30
-            },
-            {
-                label: '最近一周',
-                value: -7
-            },
-            {
-                label: '最近一天',
-                value: -1
-            }
-        ], // 快速查询
+        quickList:[], // 快速查询
         searchInput: '',
         searchQuick:null,
         quickIndex: null, // 快速搜索的索引
-        proceedsNumber:'1209', // 收款单数
-        proceedsPrice: 789474, // 收款金额
+        proceedsNumber:'', // 收款单数
+        proceedsPrice: null, // 收款金额
         proceedsPriceArr: [],
         searchType: -1,
         validity:'',
@@ -344,11 +364,11 @@ export default {
             },
             {
                 label: '支付宝',
-                value: 1
+                value: 4
             },
             {
                 label: '微信支付',
-                value: 2
+                value: 3
             }
         ],
         orgList:[
@@ -368,7 +388,7 @@ export default {
             },
             {
                 label: '未使用',
-                value: 2
+                value: 0
             }
         ], // 是否使用兑换码
         transactionList: [
@@ -383,30 +403,94 @@ export default {
             {
                 status_name: '兑换成功',
                 status: 2
+            },
+            {
+                status_name: '已退款',
+                status: 3
+            },
+            {
+                status_name: '已撤回',
+                status: 4
             }
         ], //交易状态列表
+        transactionListCss: {
+            1:{
+                bg:'#00B42A',
+                text:'支付成功'
+            },
+            2:{
+                bg:'#165DFF',
+                text:'兑换成功'
+            },
+            3:{
+                bg:'#F7BA1E',
+                text:'已退款'
+            },
+            4:{
+                bg:'#FF7D00',
+                text:'已撤回'
+            }
+        },
         goodsTypeList:[
             {
                 goods_name: '全部',
                 value: -1
             },
             {
-                goods_name: '报纸(讲解版)',
-                value: 1
-            },
-            {
-                goods_name: '报纸订阅',
+                goods_name: '报纸',
                 value: 2
             },
             {
-                goods_name: '报纸',
+                goods_name: '精读',
                 value: 3
             },
             {
                 goods_name: '课程',
-                value: 4
+                value: 10
             }
         ], // 商品类型
+        goodsTypeListCss:{
+            2:{
+                text:'报纸',
+                color:'#165DFF',
+                bg:'#E8F7FF'
+            },
+            // '2':{
+            //     text:'画刊',
+            //     color:'#F53F3F',
+            //     bg:'#FFECE8'
+            // },
+            '3':{
+                text:'精读',
+                color:'#0FC6C2',
+                bg:'#E8FFFB'
+            },
+            0:{
+                text:'课程',
+                color:'#722ED1',
+                bg:'#F5E8FF'
+            },
+            1:{
+                text:'课程',
+                color:'#722ED1',
+                bg:'#F5E8FF'
+            },
+            10:{
+                text:'课程',
+                color:'#722ED1',
+                bg:'#F5E8FF'
+            },
+            // '5':{
+            //     text:'报纸专辑',
+            //     color:'#165DFF',
+            //     bg:'#E8F7FF'
+            // },
+            // '6':{
+            //     text:'画刊专辑',
+            //     color:'#F53F3F',
+            //     bg:'#FFECE8'
+            // }
+        },
         typeList:[
             {
                 account_type:-1,
@@ -444,8 +528,9 @@ export default {
   //方法集合
   methods: {
     qucikSearch(value,index){
-        this.searchQuick = value,
+        this.validity = [value.date_begin,value.date_end],
         this.quickIndex = index
+        this.getList()
     },
     handleSort(value){
         let dataSort = {
@@ -475,19 +560,35 @@ export default {
         }else{
             order_column_list = ['create_time:desc']
         }
+        let province_id_list = null
+        let city_id_list = []
+        if(this.searchArea.length>0){
+            if(this.searchArea[0][0]&&this.searchArea[0][0]==='0'){
+                province_id_list = '-1'
+            }else{
+                province_id_list = []
+                this.searchArea.forEach(item => {
+                    if(province_id_list.indexOf(item[0])===-1){
+                        province_id_list.push(item[0])
+                    }
+                    city_id_list.push(item[1]?item[1]:'')
+                });
+            }
+        }
         let data = {
             content:this.searchInput.trim(),
             page_capacity:this.pageSize,
             cur_page:this.pageNumber,
             order_column_list: order_column_list,
-            pay_status: this.searchStatus,
+            pay_status: 1,
+            order_status: this.searchStatus,
             pay_date_begin: this.validity?this.validity[0]:'',
             pay_date_end: this.validity?this.validity[1]:'',
             goods_study_phase: this.searchStudy,
             goods_type: this.searchGoodsType,
             discount_code_use_status: this.searchIsCDKEY,
-            person_org_id: this.searchOrgid,
-            person_province_city_id: this.searchArea.length>0?this.searchArea[1]:'',
+            person_org_id_list: this.searchOrgid?[this.searchOrgid]:null,
+            person_province_city_id_list: city_id_list,
             pay_type: this.searchChannel
         }
         getLogin(MethodName, data)
@@ -570,11 +671,47 @@ export default {
         .catch(() => {
             this.loading = false
         });
-    }
+    },
+    // 快捷时间按钮列表
+    getQuickList(){
+        this.quickList = []
+        let MethodName = "/ShopServer/Manager/FinanceManager/GetQueryCritDateSpaceList";
+        let data = {}
+        getLogin(MethodName, data)
+        .then((res) => {
+            if(res.status===1){
+                this.quickList = res.date_space_list
+            }
+        })
+    },
+    CopyToClipboard(element) {
+      var doc = document,
+        text = doc.getElementById(element),
+        range,
+        selection;
+      if (doc.body.createTextRange) {
+        range = doc.body.createTextRange();
+        range.moveToElementText(text);
+        range.select();
+      } else if (window.getSelection) {
+        selection = window.getSelection();
+        range = doc.createRange();
+        range.selectNodeContents(text);
+        selection.removeAllRanges();
+        selection.addRange(range);
+      }
+      document.execCommand("copy");
+      this.$message({
+        message: "复制成功",
+        type: "success",
+      });
+      window.getSelection().removeAllRanges();
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
     this.getTableHeight();
+    this.getQuickList()
     this.getOrgList()
     this.getList()
   },
@@ -693,4 +830,19 @@ export default {
 .search-table{
     margin-top: 0;
 }
+.items-type{
+    padding: 1px 8px;
+    font-weight: 500;
+    font-size: 14px;
+    line-height: 22px;
+    border-radius: 2px;
+}
+.code{
+    color: #175DFF;
+}
+.copy{
+    color: #C9CDD4;
+    margin-left: 8px;
+    cursor: pointer;
+}
 </style>