瀏覽代碼

订单管理-添加查询条件

dujingxian 4 年之前
父節點
當前提交
0614683c12
共有 4 個文件被更改,包括 83 次插入14 次删除
  1. 1 0
      src/pages/subPages/balance.vue
  2. 5 5
      src/pages/subPages/message.vue
  3. 60 9
      src/pages/subPages/order.vue
  4. 17 0
      src/utils/constants.js

+ 1 - 0
src/pages/subPages/balance.vue

@@ -154,6 +154,7 @@ export default {
                 var Money = parseFloat(value).toFixed(3);
                 var MoneyResult = Money.substring(0, Money.length - 1);
                 var xsd = MoneyResult.toString().split(".");
+                // console.log('Money', Money, MoneyResult, xsd, xsd[1].length);
                 if (xsd.length == 1) {
                     this.balanceForm.alarm_amount = creditResult.toString() + ".00";
                 }

+ 5 - 5
src/pages/subPages/message.vue

@@ -1,9 +1,9 @@
 <template>
 <el-card>
 <el-container direction="vertical">
-    <div style="margin:10px 0;">
-        <el-date-picker v-model="dataRange" :clearable="false" value-format="timestamp" format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="margin-right: 10px"></el-date-picker>
-        <el-select v-model="changeVal" placeholder="变动类型" style="margin-right: 10px">
+    <div>
+        <el-date-picker v-model="dataRange" :clearable="false" value-format="timestamp" format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="margin-right: 10px;margin-bottom:20px;"></el-date-picker>
+        <el-select v-model="changeVal" placeholder="变动类型" style="margin-right: 10px;margin-bottom:20px;">
             <el-option
                 v-for="item in changeType"
                 :key="item.value"
@@ -12,8 +12,8 @@
             </el-option>
         </el-select>
         <!-- <el-input placeholder="变更内容" style="width:182px;margin-right: 10px" v-model="changeContent"></el-input> -->
-        <el-button type="primary" style="margin-left:10px;" @click="queryMovingAccount">查询</el-button>
-        <el-button style="margin-left:10px;" type="danger" @click="onReset">重置</el-button>
+        <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>
     </div>
     <el-table :data="tableData" border style="width:100%" v-loading="isLoading">
         <!-- <el-table-column align="center" type="index" width="50" label="序号" /> -->

+ 60 - 9
src/pages/subPages/order.vue

@@ -1,15 +1,20 @@
 <template>
 <el-card>
 <el-container direction="vertical">
-    <el-header height="40px">
+    <el-header height="auto">
+        <el-input
+            style="width:200px;margin-bottom:20px;margin-right: 10px;"
+            placeholder="请输入客户单号"
+            v-model.trim="mch_order"></el-input>
         <el-date-picker
             v-model="dataRange"
             :clearable="false"
             value-format="timestamp"
             format="yyyy-MM-dd HH:mm:ss"
             type="datetimerange"
-            range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
-        <el-select v-model="RechargeType" placeholder="--充值卡类型--" style="margin-left: 10px">
+            range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
+            style="margin-bottom:20px;margin-right: 10px;"></el-date-picker>
+        <el-select v-model="RechargeType" placeholder="--充值卡类型--" style="margin-right: 10px;margin-bottom:20px">
             <el-option
                 v-for="item in moneyType"
                 :key="item.value"
@@ -17,7 +22,15 @@
                 :value="item.value">
             </el-option>
         </el-select>
-        <el-select v-model="RechargeStatus" placeholder="--充值状态--" style="margin-left: 10px">
+        <el-select v-model="amount" placeholder="--充值面额--" style="margin-right: 10px;margin-bottom:20px">
+            <el-option
+                v-for="item in amountConstant"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+            </el-option>
+        </el-select>
+        <el-select v-model="RechargeStatus" placeholder="--充值状态--" style="margin-right: 10px;margin-bottom:20px">
             <el-option
                 v-for="item in orderState"
                 :key="item.value"
@@ -25,11 +38,27 @@
                 :value="item.value">
             </el-option>
         </el-select>
-        <el-button style="margin-left:10px;" type="primary" @click="queryList">查询</el-button>
-        <el-button style="margin-left:10px;" type="danger" @click="onReset">重置</el-button>
+        <el-select
+            v-model="time"
+            placeholder="--充值耗时--"
+            style="margin-right: 10px;margin-bottom:20px"
+            no-data-text="充值状态为充值中时,才可查询耗时">
+            <template v-if="RechargeStatus == 30">
+                <el-option
+                    v-for="item in timeConstant"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                </el-option>
+            </template>
+        </el-select>
+        <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>
+        </div>
     </el-header>
    
-    <el-table :data="tableData" border style="width: 1561px; margin-top:20px" v-loading="isLoading">
+    <el-table :data="tableData" border style="width: 1561px;" v-loading="isLoading">
         <el-table-column align="left" type="index" width="50" label="序号" />
         <el-table-column align="left" prop="mch_order" width="200" label="客户单号"></el-table-column>
         <el-table-column align="left" prop="card_no" width="180" label="卡号"></el-table-column>
@@ -53,6 +82,7 @@
                 {{row.official_sn ? row.official_sn : '无'}}
             </template>
         </el-table-column>
+        <el-table-column align="left" prop="err_msg" label="失败原因" width="180"></el-table-column>
         <el-table-column align="right" prop="mch_amount" label="扣款金额" width="80"></el-table-column>
         <!-- <el-table-column align="left" width="200" label="状态查询">
             <template slot-scope="{row}">
@@ -74,7 +104,7 @@ import {
     getOrderList,
     queryList
 } from "@/api";
-import { moneyType, orderState } from '@/utils/constants'
+import { moneyType, orderState, amountConstant, timeConstant } from '@/utils/constants'
 // import getIp from '@/utils/ip'
 export default {
     name: 'order',
@@ -97,7 +127,17 @@ export default {
             // 充值状态
             RechargeStatus: '',
             // 充值状态 常量
-            orderState
+            orderState,
+            // 客户单号
+            mch_order: '',
+            // 充值面额
+            amount: '',
+            // 充值面额-常量
+            amountConstant,
+            // 充值耗时
+            time: '',
+            // 充值耗时-常量
+            timeConstant
         };
     },
     created () {
@@ -151,6 +191,9 @@ export default {
                 param.append('end_time', this.endTime)
                 param.append('card_type', this.RechargeType)
                 param.append('order_state', this.RechargeStatus)
+                param.append('refill_amount', this.amount)
+                param.append('mch_order', this.mch_order)
+                param.append('time', this.time)
                 // const res = await queryList(this.pageNumber, startTime, endTime, this.RechargeType)
                 const res = await queryList(param)
                 console.log('查询订单', res);
@@ -170,6 +213,9 @@ export default {
             this.dataRange = [];
             this.RechargeType = ''
             this.RechargeStatus = ''
+            this.amount = ''
+            this.mch_order = ''
+            this.time = ''
             this.getOrderList();
         },
         // 分页
@@ -193,6 +239,8 @@ export default {
                     param.append('end_time', this.endTime)
                     param.append('card_type', this.RechargeType)
                     param.append('order_state', this.RechargeStatus)
+                    param.append('refill_amount', this.amount)
+                    param.append('mch_order', this.mch_order)
                     // const res = await queryList(this.pageNumber, startTime, endTime, this.RechargeType)
                     const res = await queryList(param)
                     console.log('查询订单', res);
@@ -216,6 +264,9 @@ export default {
 }
 </style>
 <style>
+.el-select-dropdown__empty {
+    padding: 5px;
+}
 .el-main {
   padding: 0;
   margin-right: calc(100% - 100vw);

+ 17 - 0
src/utils/constants.js

@@ -31,4 +31,21 @@ export const orderState = [
   {value: 0, label: '已取消'},
   {value: 40, label: '充值成功'},
   {value: 30, label: '充值中'}
+]
+// 充值面额 10 20 30 50 100 200 300 500 1000 2000
+export const amountConstant = [
+  {value: 10, label: 10},
+  {value: 20, label: 20},
+  {value: 30, label: 30},
+  {value: 50, label: 50},
+  {value: 100, label: 100},
+  {value: 200, label: 200},
+  {value: 300, label: 300},
+  {value: 500, label: 500},
+  {value: 1000, label: 1000},
+  {value: 2000, label: 2000}
+]
+// 充值耗时
+export const timeConstant = [
+  {value: 1, label: '>1小时'}
 ]