Jelajahi Sumber

订单管理-注释导出按钮

dujingxian 4 tahun lalu
induk
melakukan
d08f1739ee

public/yezi.ico → public/favicon1.ico


+ 1 - 1
public/index.html

@@ -3,7 +3,7 @@
   <head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> -->
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico"> -->
     <link rel="icon" href="<%= htmlWebpackPlugin.options.faviconPath %>">
     <title><%= htmlWebpackPlugin.options.title %></title>

TEMPAT SAMPAH
public/linzhu.ico


+ 8 - 20
src/pages/index.vue

@@ -1,13 +1,13 @@
 <template>
 <el-container>
-    <el-header :style="{backgroundColor:userInfo.indexColor}">
+    <el-header style="background-color:#545c64">
         <el-row type="flex" style="height:100%;" justify="space-between" align="middle">
             <div style="color:#fff">
-                <span class="title" style="font-size: 18px">{{userInfo.name}}后台管理系统</span>
+                <span class="title" style="font-size: 18px">椰子充值后台管理系统</span>
             </div>
             <div>
                 <el-dropdown @command="onUserEdit">
-                    <span :style="{color:userInfo.dropdownColor}">
+                    <span style="color:#409eff">
                         <i class="el-icon-user" style="margin-right: 10px"></i>管理员
                         <i class="el-icon-arrow-down el-icon--right"></i>
                     </span>
@@ -22,7 +22,7 @@
     <!-- border: 1px solid #ccc -->
     <el-container style="height: 100%; ">
         <el-aside width="240px">
-            <el-menu router class="el-menu" :background-color="userInfo.indexColor" text-color="#fff" active-text-color="#ffd04b" :default-active="curPath">
+            <el-menu router class="el-menu" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b" :default-active="curPath">
                 <el-menu-item index="home" route="/">
                     <i class="el-icon-house"></i>
                     <span style="font-size: 19px;" slot="title">首页</span>
@@ -55,18 +55,10 @@
                     <i class="el-icon-s-platform"></i>
                     <span style="font-size: 19px;" slot="title">设置</span>
                 </el-menu-item>
-                <template v-if="userInfo.name==='椰子充值'">
-                    <el-menu-item index="interfaceDoc" route="interfaceDoc" >
-                        <i class="el-icon-document"></i>
-                        <span style="font-size: 19px;" slot="title">接口文档</span>
-                    </el-menu-item>
-                </template>
-                <template v-else>
-                    <el-menu-item index="interfaceDoc" route="interfaceDoc" >
-                        <i class="el-icon-document"></i>
-                        <span style="font-size: 19px;" slot="title">接口文档</span>
-                    </el-menu-item>
-                </template>
+                <el-menu-item index="interfaceDoc" route="interfaceDoc" >
+                    <i class="el-icon-document"></i>
+                    <span style="font-size: 19px;" slot="title">接口文档</span>
+                </el-menu-item>
             </el-menu>
         </el-aside>
         <el-main class="el-menu" style="min-width:860px;">
@@ -96,9 +88,6 @@ import {
     editPwd
 } from "@/api";
 import { removeUser } from '@/utils/auth'
-// 商家区分
-// import UserInfo from '@/utils/userInfo'
-const userInfo = require('@/utils/userInfo')
 export default {
     name: 'homePage',
     created() {
@@ -124,7 +113,6 @@ export default {
                     trigger: "blur",
                 }, ],
             },
-            userInfo
         };
     },
     methods: {

+ 1 - 6
src/pages/login.vue

@@ -4,8 +4,7 @@
     <el-row type="flex" style="width:100%;height:100%;" justify="center" align="middle">
       <el-card style="width:400px;height:300px;" shadow="always">
         <div slot="header" class="clearfix">
-          <!-- <span style="font-size: 18px">欢迎使用椰子充值后台管理系统</span> -->
-          <span style="font-size: 18px">欢迎使用{{userInfo.name}}后台管理系统</span>
+          <span style="font-size: 18px">欢迎使用椰子充值后台管理系统</span>
         </div>
         <el-row type="flex" justify="center">
           <div class="login_container">
@@ -39,9 +38,6 @@
 <script>
 // import LoginBg from "@/assets/login.jpg";
 const LoginBg = require('../assets/login.jpg');
-// 商家区分
-// import userInfo from '@/utils/userInfo'
-const userInfo = require('@/utils/userInfo')
 import { login } from "@/api";
 import { setUser } from '@/utils/auth'
 export default {
@@ -49,7 +45,6 @@ export default {
   data() {
     return {
       LoginBg,
-      userInfo,
       ruleForm: {
         name: "",
         pwd: "",

+ 6 - 7
src/pages/subPages/balance.vue

@@ -5,13 +5,13 @@
         <el-col :span="10">
             <el-form >
                 <el-form-item label="银行账号:">
-                    {{userInfo.bankAccount}}
+                   11001079900053013913
                 </el-form-item>
                 <el-form-item label="开户银行:">
-                    {{userInfo.bankDeposit}}
+                    中国建设银行北京清华园支行
                 </el-form-item>
                 <el-form-item label="开户名:">
-                    {{userInfo.AccountName}}
+                    北京国研方略信息科学研究院
                 </el-form-item>
                 <el-form-item label="备注:">
                     代收款/代付款
@@ -167,8 +167,6 @@ import {
     getUserInfo,
 } from "@/api";
 import { balanceType } from '@/utils/constants'
-// 商家区分
-const userInfo = require('@/utils/userInfo')
 // 金额转成文字
 import {cnMoneyFormat} from '@/utils/moneyFormat.js'
 export default {
@@ -177,7 +175,9 @@ export default {
         var checkAmount = (rule, value, callback) => {
             // console.log('rule', rule, value);
             // console.log('value', value);
-            if (value.indexOf(".") != -1 && value.split('.').length > 2) {
+            if (value != 0 && !Number(value)) {
+                callback(new Error('请输入数字'));
+            } else if (value.indexOf(".") != -1 && value.split('.').length > 2) {
                 callback(new Error('请输入正确格式,只能有一位小数点'));
             } else if (value.indexOf(".") != -1 && value.split('.')[1].length > 2) {
                 callback(new Error('小数点后面只能有两位'));
@@ -201,7 +201,6 @@ export default {
             }
         };
         return {
-            userInfo,
             tableData: [
                 // {id: 1, money: '100', recharge_code: ''},
                 // {id: 2, money: '100', recharge_code: ''},

+ 3 - 14
src/pages/subPages/home.vue

@@ -2,7 +2,7 @@
   <div class="box">
       <div class="head">
         <div class="headLeft">
-          <div class="merchants" :class="[userInfo.name==='椰子充值' ? 'yezi_merchant' : 'linzhu_merchant']">
+          <div class="merchants">
             <img src="../../assets/home-user@2x.png" alt="" style="">
             商户名称:<span>{{merchantData.company_name}}</span>
             商户号:<span>{{merchantData.mchid}}</span>
@@ -29,7 +29,7 @@
       <div class="center">
         <div class="centerLeft">
           <div class="todayOrder">
-            <table :class="[userInfo.name==='椰子充值' ? 'yezi_table' : 'linzhu_table']">
+            <table class="yezi_table">
               <tr>
                 <th style="color:#666">单位(元)</th>
                 <th>今日</th>
@@ -57,7 +57,7 @@
             </table>
           </div>
           <div class="todayOrder">
-            <table :class="[userInfo.name==='椰子充值' ? 'yezi_table' : 'linzhu_table']">
+            <table class="yezi_table">
               <tr>
                 <th style="color:#666">单位(个)</th>
                 <th>今日</th>
@@ -122,8 +122,6 @@ require('echarts/lib/chart/bar');
 // 引入提示框和标题组件
 require('echarts/lib/component/tooltip');
 require('echarts/lib/component/title');
-// 商家区分
-const userInfo = require('@/utils/userInfo')
 export default {
   name: 'homeMain',
   data() {
@@ -163,7 +161,6 @@ export default {
         errorAmounts: '',
         successAmounts: ''
       },
-      userInfo
     }
   },
   created() {
@@ -333,13 +330,8 @@ export default {
 }
 .merchants span {
   margin: 0 20px;
-}
-.yezi_merchant span {
   color: #4B8AF2;
 }
-.linzhu_merchant span {
-  color: #002033;
-}
 .merchants span:nth-child(2) {
   margin-right: 50px;
 }
@@ -422,9 +414,6 @@ table {
 .yezi_table tr td:nth-child(n+2) {
   color: #4B8AF2;
 }
-.linzhu_table tr td:nth-child(n+2) {
-  color: #002033;
-}
 tr {
   line-height: 30px;
 }

src/pages/subPages/interfaceDoc_yezi.vue → src/pages/subPages/interfaceDoc.vue


+ 0 - 172
src/pages/subPages/interfaceDoc_linzhu.vue

@@ -1,172 +0,0 @@
-<template>
-  <div class="interfaceDoc">
-    <el-card>
-      <h1 style="font-size: 18px;">接 口 规 范</h1>
-      <h4>查询网址:</h4>
-      <p>
-        登录帐号和密码: 由提服务商提供
-      </p>
-      <p>接口地址: 联系服务商</p>
-      <p>参数传递方式: 采用http 网页get方式提交 UTF8编码</p><br/>
-      <h4>提交充值号码充值:</h4>
-      <pre>
-        入参数:
-            act —— lzrefill 固定参数
-            op —— add_mob  固定参数
-            usr —— 用户名
-            ord —— 本次交易的订单号 三天内不得重复,30位以内
-            mob —— 被充值手机号码
-            amt —— 本次充值金额,单位 元
-            tim —— 订单提交时间。固定格式为“YYYYMMDDHHMMSS” 年月日时分秒。 
-            notifyurl —— 充值业务回调地址
-            sgn —— 交易签名。 MD5(usr+ord+mob+amt+tim+key)转大写 key为密钥 
-        示例:key= 1993754181DDA6E8A1878EF3AAA97BC6
-        加密字符串:001ets1231328888888820201607061200001993754181DDA6E8A1878EF3AAA97BC6
-        提交字符串:act=lzrefill&op=add_mob&usr=001&ord=ets123&mob=13288888888&amt=20&tim=20160706120000&sgn=1891957542D35801B20F490412B9D9AA   
-        接口地址:https://www.lzkj168.cn/racc/index.php
-        接口描述:用户根据这个函数提交需要充值的手机号码 
-        函数返回结果:
-            0 —— 订单提交成功
-            2 —— 运营商充值账户余额不足
-            4 —— 账户余额不足 
-            6 —— 暂不支持此商品
-            7 —— 连接该运营商设备失败
-            8 —— 在规定时间内不得重复提交同一号码 
-            10 —— 该帐号不能在此计算机缴费
-            11 —— 流水号重复
-            30 —— 面值不符
-            41 —— 该地区维护
-            42 —— 运营商设备忙
-            43 —— 暂不支持该面额的缴费
-            44 —— 无该地区缴费权限
-            -2 —— 命令已发送,请查看交易流水是否有缴费成功(这种情况是服务器在排队等待处理,间隔10-20分钟后查单核实)
-            -3 —— 数据添加失败
-            -4 —— 签名错误
-            -5 —— 没有此代理商
-            -6 —— 提交失败
-            -7 —— 无此接口权限
-            -8 —— 提交日期不是当天日期
-            -9 —— 参数不对
-            -11 —— 手机号码位数不符
-            -12 —— 绑定IP不符
-
-            1001 —— 销售数量请大于0
-            1002 —— 该商品库存维护 
-            1003 —— 该供货商品库存维护
-            其他返回代码,具体参见返回说明
-            结果返回形式:返回值|返回说明|代理商余额
-        示例:https://www.lzkj168.cn/racc/index.php?act=lzrefill&op=add_mob&usr=001&ord=123&mob=13559023976&amt=10&tim=201303261212&sgn=9FC6B13125C343AFF070B0F30D87CC19
-        返回示例:0|提交成功|70.00
-      </pre>
-      <h4>查询充值状态:</h4>
-        <pre>
-          传入参数:
-              act —— lzrefill 固定参数
-              op —— query固定参数
-              usr —— 用户名 
-              ord —— 订单号, 交易的订单号 不得重复,30位以内
-              sgn —— 交易签名。 MD5(usr+ord+key) 转大写 key为密钥  
-          接口地址:https://www.lzkj168.cn/racc/index.php
-          接口描述:用户根据此参数查询提交的订单充值情况
-          函数返回结果:
-              返回参数为:
-                    0 —— 充值中 
-                    1 —— 充值成功 
-                    2 —— 充值失败 
-                    3 —— 无此订单
-              其他返回代码,具体参见返回说明
-              结果返回形式:|返回值|订单号+返回说明|备注
-          示例:act=lzrefill&op=query&usr=001&ord=123&sgn=B6A523AC1DE885E5CE3F94D74F5DA1F7
-          返回示例:|0|123-充值中|流水号:1234567890
-        </pre>
-      <h4>余额查询:</h4>
-      <pre>
-        传入参数:
-            act —— lzrefill 固定参数
-            op —— query固定参数
-            usr —— 用户名 
-            sgn —— 交易签名。 MD5(usr+key) 转大写 key为密钥
-        接口地址:https://www.lzkj168.cn/racc/index.php
-        接口描述:查询代理商帐户余额以及佣金。
-        函数返回结果:
-            返回参数为:
-                0 —— 查询成功 
-                其他返回代码,具体参见返回说明
-            结果返回形式:返回值|代理商余额|代理商佣金
-        示例:act=lzrefill&op=balance&usr=001&sgn=E52C57F6D5D5E53EC038D61AC936B398
-        返回示例:0|70.00|0.00
-      </pre>
-      <h4>缴费状态回调:</h4>
-      <pre>
-        传入参数:
-            usr —— 用户名 
-            ord —— 本次交易的订单号
-            state —— 状态
-            bz —— 备注信息(运营商流水号),采用URL UTF8编码
-            sgn —— 交易签名。 MD5(usr+key) 转大写 key为密钥
-        接口地址:回调网址?usr=&ord=&state=&bz=&sgn=
-        接口描述:缴费状态回调。
-        state:
-            1 —— 缴费成功 
-            2 —— 缴费失败 
-        说明:
-            此回调只管通知,接收方可不返回。只要回调地址是通的,就表示有通知完成,如因网络问题造成没通知成功的,系统会连续回调三次,如果三次都失败将不会再发送。
-            如果由于接收方没有处理回调通知(由于签名失败原因等),不在重新发送回调范围。
-      </pre>
-    </el-card>
-
-  </div>
-</template>
-
-<script>
-export default {
-  name: 'interfaceDoc'
-}
-</script>
-
-<style scoped>
-.el-card {
-  padding: 0 5%;
-}
-h1 {
-  text-align: center;
-  font-family: "Microsoft YaHei";
-  margin-bottom: 20px;
-}
-h4 {
-  line-height: 36px; /*no */
-  font-size: 16px; /*no */
-  font-family: "Microsoft YaHei";
-}
-h6 {
-  line-height: 32px; /*no */
-  font-family: "Microsoft YaHei";
-}
-p {
-  text-indent: 2em;
-  line-height: 32px; /*no */
-  font-size: 16px; /*no */
-  font-family: "Microsoft YaHei";
-}
-pre {
-  line-height: 32px; /*no */
-  font-size: 16px; /*no */
-  font-family: "Microsoft YaHei";
-  white-space: pre-wrap;       /* css-3 */
-  white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
-  white-space: -pre-wrap;      /* Opera 4-6 */
-  white-space: -o-pre-wrap;    /* Opera 7 */
-  word-wrap: break-word;       /* Internet Explorer 5.5+ */
-  overflow: auto;
-  word-break: break-all;
-}
-</style>
-<style>
-.el-main {
-  padding: 0;
-  margin-right: calc(100% - 100vw);
-}
-.el-card {
-  margin: 20px 30px;
-}
-</style>

+ 0 - 32
src/pages/subPages/message.vue

@@ -15,11 +15,6 @@
         <!-- <el-input placeholder="变更内容" style="width:182px;margin-right: 10px" v-model="changeContent"></el-input> -->
         <el-button type="primary" @click="queryMovingAccount" style="margin-bottom:20px;">查询</el-button>
         <el-button style="margin-left:10px;margin-bottom:20px;" type="danger" @click="onReset">重置</el-button>
-        <el-button
-            v-if="userInfo.name==='琳珠网络'"
-            style="margin-left:10px;margin-bottom:20px"
-            type="warning"
-            @click="onExport">导出</el-button>
     </div>
     <el-table :data="tableData" border style="width:100%;font-size:13px;" v-loading="isLoading">
         <el-table-column align="left" prop="lg_type_text" label="资金变动类型" width="200"></el-table-column>
@@ -44,13 +39,10 @@ import {
 // 常量
 import { changeType } from '@/utils/constants'
 import {JSONToExcelConvertor} from '@/utils/export.js'
-// 商家区分
-const userInfo = require('@/utils/userInfo')
 export default {
     name: 'message',
     data() {
         return {
-            userInfo,
             pageSize: 50,
             pageNumber: 1,
             cabinetValue: "",
@@ -173,30 +165,6 @@ export default {
             this.changeVal = '';
             this.getMovingAccount();
         },
-        // 导出
-        async onExport() {
-            if (this.dataRange == null) {
-                this.startTime = ''
-                this.endTime = ''
-            } else {
-                this.startTime =  this.dataRange[0]/1000 || ''
-                this.endTime = this.dataRange[1]/1000 || ''
-            }
-            try {
-                let param = new URLSearchParams()
-                param.append('curpage', this.pageNumber)
-                param.append('start_time', this.startTime)
-                param.append('end_time', this.endTime)
-                param.append('lg_type', this.changeVal)
-                const res = await exportMovingAccount(param)
-                console.log('导出', res);
-                if (res && res.code == 200) {
-                    JSONToExcelConvertor(res.datas.data, "资金明细", res.datas.title )
-                }
-            } catch (error) {
-                console.log(error);
-            }
-        }
     },
 };
 </script>

+ 10 - 27
src/pages/subPages/order.vue

@@ -17,29 +17,15 @@
             placeholder="请输入卡号"
             v-model.trim="card_no"
             clearable></el-input>
-        <template v-if="userInfo.name==='椰子充值'">
-            <el-date-picker
-                class="yezi_date"
-                v-model="dataRange"
-                clearable
-                value-format="timestamp"
-                format="yyyy-MM-dd"
-                type="datetimerange"
-                range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
-                style="margin-bottom:20px;margin-right: 10px;width:260px"></el-date-picker>
-        </template>
-        <template v-else>
-            <el-date-picker
-                v-model="dataRange"
-                clearable
-                type="datetimerange"
-                value-format="timestamp"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                style="margin-bottom:20px;margin-right: 10px;">
-            </el-date-picker>
-        </template>
+        <el-date-picker
+            class="yezi_date"
+            v-model="dataRange"
+            clearable
+            value-format="timestamp"
+            format="yyyy-MM-dd"
+            type="datetimerange"
+            range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
+            style="margin-bottom:20px;margin-right: 10px;width:260px"></el-date-picker>
         <el-select v-model="RechargeType" clearable placeholder="--充值卡类型--" style="margin-right: 10px;margin-bottom:20px;width: 140px;">
             <el-option
                 v-for="item in moneyType"
@@ -82,7 +68,7 @@
         <div>
             <el-button style="margin-right:10px;margin-bottom:20px" type="primary" @click="queryList">查询</el-button>
             <el-button style="margin-right:10px;margin-left:0px;margin-bottom:20px" type="danger" @click="onReset">重置</el-button>
-            <el-button style="margin-right:10px;margin-left:0px;margin-bottom:20px" type="warning" @click="onExport">导出</el-button>
+            <!-- <el-button style="margin-right:10px;margin-left:0px;margin-bottom:20px" type="warning" @click="onExport">导出</el-button> -->
         </div>
     </el-header>
    
@@ -128,13 +114,10 @@ import {
 } from "@/api";
 import { moneyType, orderState, amountConstant, timeConstant } from '@/utils/constants'
 import {JSONToExcelConvertor} from '@/utils/export.js'
-// 商家区分
-const userInfo = require('@/utils/userInfo')
 export default {
     name: 'order',
     data() {
         return {
-            userInfo,
             tableData: [],
             pageSize: 50,
             pageNumber: 1,

+ 2 - 8
src/router/index.js

@@ -1,7 +1,6 @@
 import Vue from 'vue'
 import VueRouter from 'vue-router'
 import { getUser } from '@/utils/auth'
-const userInfo = require('@/utils/userInfo')
 
 const Index = () => import('@/pages/index');
 const Login = () => import('@/pages/login');
@@ -19,7 +18,7 @@ const OilCard = () => import('@/pages/subPages/oilCard');
 // 手机卡充值
 const MobileCard = () => import('@/pages/subPages/mobileCard');
 // 接口文档
-const InterfaceDoc = () => userInfo.name==='椰子充值' ? import('@/pages/subPages/interfaceDoc_yezi') : import('@/pages/subPages/interfaceDoc_linzhu');
+const InterfaceDoc = () => import('@/pages/subPages/interfaceDoc')
 // 对账管理
 const Reconciliation = () =>import('@/pages/subPages/reconciliation');
 
@@ -57,11 +56,6 @@ Vue.use(VueRouter)
         name:'message',
         component:Message
       },
-      // {
-      //   path:'/status',
-      //   name:'status',
-      //   component:Status
-      // },
       // 开发者设置
       {
         path:'/view',
@@ -86,7 +80,7 @@ Vue.use(VueRouter)
         name:'interfaceDoc',
         component:InterfaceDoc
       },
-      // 外部接口文档
+      // 对账管理
       {
         path:'/reconciliation',
         name:'reconciliation',

+ 0 - 21
src/utils/userInfo.js

@@ -1,21 +0,0 @@
-/* eslint-disable no-unused-vars */
-const linzhu_userInfo = {
-  name: '琳珠网络',
-  indexColor: '#002033',
-  dropdownColor: '#fff',
-  bankAccount: '379900663110901',
-  bankDeposit: '招商银行洛阳分行凯旋路支行',
-  AccountName: '河南创之星文化传媒有限公司',
-}
-
-const yezi_userInfo = {
-  name: '椰子充值',
-  indexColor: '#545c64',
-  dropdownColor: '#409eff',
-  bankAccount: '11001079900053013913',
-  bankDeposit: '中国建设银行北京清华园支行',
-  AccountName: '北京国研方略信息科学研究院',
-}
-// export default userInfo
-module.exports = yezi_userInfo
-// module.exports = linzhu_userInfo

+ 1 - 5
vue.config.js

@@ -7,9 +7,7 @@ const targetUrl = 'http://192.168.1.195/'
 // 椰子临时线上
 // const targetUrl = 'http://121.89.196.45/'
 
-// const targetUrl = 'http://10.64.81.2:8080';
 
-const userInfo = require('./src/utils/userInfo')
 module.exports = {
     publicPath:'./',
     productionSourceMap: false,
@@ -22,9 +20,7 @@ module.exports = {
             // 在 dist/index.html 的输出
             filename: 'index.html',
             // 当使用 title 选项时,template 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title>
-            // title: '椰子充值后台管理系统程序',
-            title: `${userInfo.name}后台管理系统程序`,
-            faviconPath: userInfo.name === '椰子充值' ? 'yezi.ico' : 'linzhu.ico'
+            title: '椰子充值后台管理系统程序',
         },
     },
     devServer: {