july 4 سال پیش
والد
کامیت
71d042e5a9
4فایلهای تغییر یافته به همراه432 افزوده شده و 72 حذف شده
  1. 1 1
      src/config/env.js
  2. 1 1
      src/router/views/index.js
  3. 1 1
      src/views/ldt_bills/billtrace.vue
  4. 429 69
      src/views/ldt_bills/comps/billTraceInfo.vue

+ 1 - 1
src/config/env.js

@@ -1,5 +1,5 @@
 // 阿里矢量图标库配置
-let iconfontVersion = ['2880418_7bgxmbjmeqg'];
+let iconfontVersion = ['2880418_gbztx2ldgr5'];
 let iconfontUrl = `//at.alicdn.com/t/font_$key.css`;
 
 let baseUrl = '';

+ 1 - 1
src/router/views/index.js

@@ -182,7 +182,7 @@ export default [{
     path: '/work/process/billtrace',
     component: Layout,
     children: [{
-      path: 'handle/:billId',
+      path: 'handle',
       name: '账单信息',
       meta: {
         i18n: 'work'

+ 1 - 1
src/views/ldt_bills/billtrace.vue

@@ -59,7 +59,7 @@ export default {
   },
   methods: {
     handleSelect(billId) {
-      this.$router.push(`/work/process/billtrace/handle/${billId}`)
+      this.$router.push(`/work/process/billtrace/handle?billId=${billId}`)
     },
     infiniteHandler($state) {
       getBills(this.page.currentPage, this.page.pageSize, this.value).then((res) => {

+ 429 - 69
src/views/ldt_bills/comps/billTraceInfo.vue

@@ -1,8 +1,12 @@
 <template>
-  <basic-container>
-    <avue-crud :option="option" v-model="form">
-    </avue-crud>
-  </basic-container>
+  <el-row>
+    <basic-container v-for="item in options">
+      <el-col :span="24">
+        <avue-form :option="item" v-model="item.data">
+        </avue-form>
+      </el-col>
+    </basic-container>
+  </el-row>
 </template>
 
 <script>
@@ -11,78 +15,434 @@ import {getDetail} from "@/api/ldt_bills/billtrace"
 export default {
   data() {
     return {
-      billId: null,
-      form: {},
-      option: {
-        group: [
-          {
-            label: "付款流水",
-            prop: "bills",
-            icon: "el-icon-info",
-            column: [
-              {
-                label: "订单号",
-                prop: "id"
-              },
-            ]
-          },
-          {
-            label: "积分流水",
-            prop: "pointBills",
-            icon: "",
-            column: [
-              {
-                label: "订单号",
-                prop: "id"
-              },
-            ]
-          },
-          {
-            label: "余额流水",
-            prop: "balanceBills",
-            icon: "",
-            column: [
-              {
-                label: "订单号",
-                prop: "id"
-              },
-            ]
-          },
-          {
-            label: "平台流水",
-            prop: "platformBills",
-            icon: "",
-            column: [
-              {
-                label: "订单号",
-                prop: "id"
-              },
-            ]
-          },
-          {
-            label: "冻结流水",
-            prop: "frozenRec",
-            icon: "",
-            column: [
-              {
-                label: "订单号",
-                prop: "id"
-              },
-            ]
-          },
-        ]
-      },
+      options: [],
     }
   },
-  mounted() {
+  created() {
     this.init();
   },
   methods: {
     init() {
-      this.billId = this.$route.params.billId;
-      getDetail(this.billId).then((res) => {
+      const billId = this.$route.query.billId;
+
+      getDetail(billId).then((res) => {
         const data = res.data.data;
-        this.form = data.bills;
+        for (const name in data) {
+          const option = {
+            detail: true,
+            data: {},
+            span: 8,
+            labelPosition: "left",
+            group: [
+              {
+                label: '',
+                prop: '',
+                icon: '',
+                column: [],
+              }
+            ],
+          }
+          option.group[0].prop = name;
+          if (name === "bills") {
+            option.group[0].label = '付款流水';
+            option.group[0].icon = 'icon-quanefukuan';
+            option.group[0].column = option.group[0].column.concat(
+              [
+                {
+                  label: '订单号',
+                  prop: 'id',
+                },
+                {
+                  label: "付款方ID",
+                  prop: "payId",
+                },
+                {
+                  label: "付款方",
+                  prop: "payerName",
+                },
+                {
+                  label: "收款方ID",
+                  prop: "receiveId",
+                },
+                {
+                  label: "收款方",
+                  prop: "receiverName",
+                },
+                {
+                  label: "总金额",
+                  prop: "totalPrice",
+                },
+                {
+                  label: "金额原价",
+                  prop: "cost",
+                },
+                {
+                  label: "折扣",
+                  prop: "discount",
+                },
+                {
+                  label: "实付金额",
+                  prop: "price",
+                },
+                {
+                  label: "收取的服务费",
+                  prop: "fee",
+                  labelWidth: 100,
+                },
+                {
+                  label: "积分交易费",
+                  prop: "pointFee",
+                },
+                {
+                  label: "交易类型",
+                  prop: "type",
+                  type: "select",
+                  dicData: [{
+                    label: "用户付款",
+                    value: "USER_PAY"
+                  }, {
+                    label: "代理充值",
+                    value: "AGENT_CHARGE"
+                  }, {
+                    label: "微信充值",
+                    value: "WECHAT_PAY"
+                  }, {
+                    label: "商家充值",
+                    value: "MALL_RECHARGE"
+                  }],
+                },
+                {
+                  label: "第三方平台订单号",
+                  prop: "thirdOrderId",
+                  labelWidth: 130,
+                },
+                {
+                  label: "支付状态",
+                  prop: "payStatus",
+                  type: "select",
+                  dicData: [, {
+                    label: "待付款",
+                    value: "待付款"
+                  }, {
+                    label: "付款成功",
+                    value: "付款成功"
+                  }, {
+                    label: "已完结",
+                    value: "已完结"
+                  }, {
+                    label: "取消付款",
+                    value: "取消付款"
+                  }]
+                },
+                {
+                  label: "交易时间",
+                  prop: "createTime",
+                  type: "datetime",
+                },
+              ]
+            );
+          } else if (name === "platformBills") {
+            option.group[0].label = '平台流水';
+            option.group[0].icon = 'icon-shujupingtai';
+            if (data.platformBills !== null) {
+              option.group[0].column = option.group[0].column.concat(
+                [
+                  {
+                    label: '订单号',
+                    prop: 'id',
+                  },
+                  {
+                    label: "支付方ID",
+                    prop: "payer",
+                  },
+                  {
+                    label: "支付方",
+                    prop: "payerName",
+                  },
+                  {
+                    label: "收款方ID",
+                    prop: "receiver",
+                  },
+                  {
+                    label: "收款方",
+                    prop: "receiverName",
+                  },
+                  {
+                    label: "交易类型",
+                    prop: "type",
+                    type: "select",
+                    dicData: [{
+                      label: "用户付款",
+                      value: "USER_PAY"
+                    }, {
+                      label: "代理充值",
+                      value: "AGENT_CHARGE"
+                    }, {
+                      label: "微信充值",
+                      value: "WECHAT_PAY"
+                    }, {
+                      label: "商家充值",
+                      value: "PAY_CONSUMER"
+                    }]
+                  },
+                  {
+                    label: "手续费",
+                    prop: "fee",
+                  },
+                  {
+                    label: "交易金额",
+                    prop: "price",
+                  },
+                  {
+                    label: "交易时间",
+                    prop: "createTime",
+                    type: "datetime",
+                  },
+                ]
+              );
+            }
+          } else if (name === "pointBills") {
+            option.group[0].label = '积分流水';
+            option.group[0].icon = 'icon-jifen';
+            if (data.pointBills !== null) {
+              option.group[0].column = option.group[0].column.concat(
+                [
+                  {
+                    label: '订单号',
+                    prop: 'id',
+                  },
+                  {
+                    label: "付款方ID",
+                    prop: "payId",
+                  },
+                  {
+                    label: "付款方",
+                    prop: "payerName",
+                  },
+                  {
+                    label: "收款方ID",
+                    prop: "receiveId",
+                  },
+                  {
+                    label: "收款方",
+                    prop: "receiverName",
+                  },
+                  {
+                    label: "交易状态",
+                    prop: "payStatus",
+                    type: "select",
+                    dicData: [{
+                      label: "待付款",
+                      value: "待付款"
+                    }, {
+                      label: "付款成功",
+                      value: "付款成功"
+                    }, {
+                      label: "已完结",
+                      value: "已完结"
+                    }, {
+                      label: "取消付款",
+                      value: "取消付款"
+                    }],
+                  },
+                  {
+                    label: "手续费",
+                    prop: "fee",
+                  },
+                  {
+                    label: "交易金额",
+                    prop: "price",
+                  },
+                  {
+                    label: "交易类型",
+                    prop: "type",
+                    type: "select",
+                    dicData: [{
+                      label: "用户付款",
+                      value: "PAY_CONSUMER"
+                    }, {
+                      label: "商场交易",
+                      value: "MALL_SEND"
+                    }, {
+                      label: "商户交易",
+                      value: "SHOP_SEND"
+                    }],
+                  },
+                  {
+                    label: "渠道名称",
+                    prop: "channelName",
+                  },
+                  {
+                    label: "渠道积分兑率",
+                    prop: "channelPointRate",
+                    labelWidth: "120",
+                  },
+                  {
+                    label: "是否核销",
+                    prop: "isCheak",
+                    type: "select",
+                    dicData: [
+                      {
+                        label: "否",
+                        value: 0
+                      },
+                      {
+                        label: "是",
+                        value: 1
+                      }
+                    ],
+                  },
+                  {
+                    label: "交易时间",
+                    prop: "createTime",
+                    type: "datetime",
+                  },
+                ]
+              );
+            }
+          } else if (name === "balanceBills") {
+            option.group[0].label = '余额流水';
+            option.group[0].icon = 'icon-yue';
+            if (data.balanceBills !== null) {
+              option.group[0].column = option.group[0].column.concat(
+                [
+                  {
+                    label: '订单号',
+                    prop: 'id',
+                  },
+                  {
+                    label: "付款方ID",
+                    prop: "payId",
+                  },
+                  {
+                    label: "付款方",
+                    prop: "payerName",
+                  },
+                  {
+                    label: "收款方ID",
+                    prop: "receiveId",
+                  },
+                  {
+                    label: "收款方",
+                    prop: "receiverName",
+                  },
+                  {
+                    label: "手续费",
+                    prop: "fee",
+                  },
+                  {
+                    label: "交易金额",
+                    prop: "price",
+                  },
+                  {
+                    label: "交易总金额",
+                    prop: "totalPrice",
+                  },
+                  {
+                    label: "交易状态",
+                    prop: "payStatus",
+                    type: "select",
+                    dicData: [{
+                      label: "待付款",
+                      value: "待付款"
+                    }, {
+                      label: "付款成功",
+                      value: "付款成功"
+                    }, {
+                      label: "已完结",
+                      value: "已完结"
+                    }, {
+                      label: "取消付款",
+                      value: "取消付款"
+                    }]
+                  },
+                  {
+                    label: "交易类型",
+                    prop: "type",
+                    type: "select",
+                    dicData: [{
+                      label: "用户付款",
+                      value: "PAY_CONSUMER"
+                    }, {
+                      label: "商场交易",
+                      value: "MALL_SEND"
+                    }, {
+                      label: "商户交易",
+                      value: "SHOP_SEND"
+                    }]
+                  },
+                  {
+                    label: "交易时间",
+                    prop: "createTime",
+                    type: "datetime",
+                  },
+                ]
+              );
+            }
+          } else if (name === "frozenRec") {
+            option.group[0].label = '冻结流水';
+            option.group[0].icon = 'icon-suoding';
+            if (data.frozenRec !== null) {
+              option.group[0].column = option.group[0].column.concat(
+                [
+                  {
+                    label: '订单号',
+                    prop: 'id',
+                  },
+                  {
+                    label: "冻结用户",
+                    prop: "userName",
+                  },
+                  {
+                    label: "账户类型",
+                    prop: "frozenType",
+                    type: "select",
+                    dicData: [
+                      {
+                        label: "渠道积分",
+                        value: "POINT"
+                      },
+                      {
+                        label: "普通积分",
+                        value: "BALANCE"
+                      }
+                    ]
+                  },
+                  {
+                    label: "冻结前金额",
+                    prop: "beforeNum",
+                  },
+                  {
+                    label: "冻结金额",
+                    prop: "frozenNum",
+                  },
+                  {
+                    label: "冻结状态",
+                    prop: "frozenSatus",
+                    type: "select",
+                    dicData: [
+                      {
+                        label: "已完成",
+                        value: "SUCCEED_FROZEN"
+                      },
+                      {
+                        label: "已退回",
+                        value: "RETURNED_FROZEN"
+                      }
+                    ],
+                  },
+                  {
+                    label: "交易时间",
+                    prop: "createTime",
+                    type: "datetime",
+                  },
+                ]
+              );
+            }
+          }
+          option.data = data[name] != null ? data[name] : {};
+          this.options.push(option);
+        }
       });
     },
   }