Просмотр исходного кода

:sparkles: 添加新特性。支付功能 升级依赖版本 avue 2.0.3

pigxcloud 6 лет назад
Родитель
Сommit
0a4db4a0e6

+ 1 - 1
package.json

@@ -16,7 +16,7 @@
     "clipboard": "^2.0.4",
     "crypto-js": "^3.1.9-1",
     "echarts": "^4.2.1",
-    "element-ui": "~2.8.2",
+    "element-ui": "~2.9.1",
     "js-cookie": "^2.2.0",
     "net": "^1.0.2",
     "nprogress": "^0.2.0",

Разница между файлами не показана из-за своего большого размера
+ 3 - 23074
public/cdn/avue/index.js


+ 1 - 1
public/index.html

@@ -34,7 +34,7 @@
             </div>
             <div class="avue-home__footer">
                 <a href="https://pig4cloud.com/zh-cn" target="_blank">
-                    Copyright © 2018 pig4cloud.com</a>
+                    Copyright © 2019 pig4cloud.com</a>
             </div>
         </div>
     </div>

+ 56 - 0
src/api/pay/paygoodsorder.js

@@ -0,0 +1,56 @@
+/*
+ *    Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+import request from '@/router/axios'
+
+export function fetchList(query) {
+  return request({
+    url: '/pay/goods/page',
+    method: 'get',
+    params: query
+  })
+}
+
+export function addObj(obj) {
+  return request({
+    url: '/pay/goods',
+    method: 'post',
+    data: obj
+  })
+}
+
+export function getObj(id) {
+  return request({
+    url: '/pay/goods/' + id,
+    method: 'get'
+  })
+}
+
+export function delObj(id) {
+  return request({
+    url: '/pay/goods/' + id,
+    method: 'delete'
+  })
+}
+
+export function putObj(obj) {
+  return request({
+    url: '/pay/goods',
+    method: 'put',
+    data: obj
+  })
+}

+ 56 - 0
src/api/pay/paynotifyrecord.js

@@ -0,0 +1,56 @@
+/*
+ *    Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+import request from '@/router/axios'
+
+export function fetchList(query) {
+  return request({
+    url: '/pay/notify/page',
+    method: 'get',
+    params: query
+  })
+}
+
+export function addObj(obj) {
+  return request({
+    url: '/pay/notify',
+    method: 'post',
+    data: obj
+  })
+}
+
+export function getObj(id) {
+  return request({
+    url: '/pay/notify/' + id,
+    method: 'get'
+  })
+}
+
+export function delObj(id) {
+  return request({
+    url: '/pay/notify/' + id,
+    method: 'delete'
+  })
+}
+
+export function putObj(obj) {
+  return request({
+    url: '/pay/notify',
+    method: 'put',
+    data: obj
+  })
+}

+ 56 - 0
src/api/pay/paytradeorder.js

@@ -0,0 +1,56 @@
+/*
+ *    Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+import request from '@/router/axios'
+
+export function fetchList(query) {
+  return request({
+    url: '/pay/order/page',
+    method: 'get',
+    params: query
+  })
+}
+
+export function addObj(obj) {
+  return request({
+    url: '/pay/order',
+    method: 'post',
+    data: obj
+  })
+}
+
+export function getObj(id) {
+  return request({
+    url: '/pay/order/' + id,
+    method: 'get'
+  })
+}
+
+export function delObj(id) {
+  return request({
+    url: '/pay/order/' + id,
+    method: 'delete'
+  })
+}
+
+export function putObj(obj) {
+  return request({
+    url: '/pay/order',
+    method: 'put',
+    data: obj
+  })
+}

+ 16 - 7
src/const/crud/pay/paychannel.js

@@ -32,10 +32,13 @@ export const tableOption = {
       addDisplay: false
     },
     {
-      label: '内部商户号',
-      prop: 'mchId',
-      editDisabled: false,
-      addDisplay: false
+      label: 'appId',
+      prop: 'appId',
+      rules: [{
+        required: true,
+        message: '请输入应用标识',
+        trigger: 'blur'
+      }]
     },
     {
       label: '支付类型',
@@ -87,15 +90,21 @@ export const tableOption = {
       minRows: 4,
       row: true,
       span: 24,
-      overHidden: true
+      overHidden: true,
+      rules: [{
+        required: true,
+        message: '请输入支付参数',
+        trigger: 'blur'
+      }]
     },
     {
+      width: 150,
       label: '创建时间',
       prop: 'createTime',
       type: 'datetime',
       format: 'yyyy-MM-dd HH:mm',
-      valueFormat: 'timestamp',
-      editDisabled: true,
+      valueFormat: 'yyyy-MM-dd HH:mm:ss',
+      editDisplay: false,
       addDisplay: false
     }
   ]

+ 71 - 0
src/const/crud/pay/paygoodsorder.js

@@ -0,0 +1,71 @@
+/*
+ *    Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+export const tableOption = {
+  border: true,
+  index: true,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  align: 'center',
+  column: [
+    {
+      label: '商品订单ID',
+      prop: 'goodsOrderId'
+    },
+    {
+      label: '商品ID',
+      prop: 'goodsId'
+    },
+    {
+      label: '商品名称',
+      prop: 'goodsName'
+    },
+    {
+      label: '金额,单位元',
+      prop: 'amount'
+    },
+    {
+      label: '用户ID',
+      prop: 'userId'
+    },
+    {
+      label: '订单状态,订单生成(0),支付成功(1),处理完成(2),处理失败(-1)',
+      prop: 'status'
+    },
+    {
+      label: '支付订单号',
+      prop: 'payOrderId'
+    },
+    {
+      label: '0-正常,1-删除',
+      prop: 'delFlag'
+    },
+    {
+      label: '创建时间',
+      prop: 'createTime'
+    },
+    {
+      label: '更新时间',
+      prop: 'updateTime'
+    },
+    {
+      label: '租户ID',
+      prop: 'tenantId'
+    }
+  ]
+}

+ 67 - 0
src/const/crud/pay/paynotifyrecord.js

@@ -0,0 +1,67 @@
+/*
+ *    Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+export const tableOption = {
+  border: true,
+  index: true,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  align: 'center',
+  column: [
+    {
+      label: 'ID',
+      prop: 'id'
+    },
+    {
+      label: '响应ID',
+      prop: 'notifyId'
+    },
+    {
+      label: '请求报文',
+      prop: 'request'
+    },
+    {
+      label: '响应报文',
+      prop: 'response'
+    },
+    {
+      label: '系统订单号',
+      prop: 'orderNo'
+    },
+    {
+      label: 'http状态',
+      prop: 'httpStatus'
+    },
+    {
+      label: '删除标记',
+      prop: 'delFlag'
+    },
+    {
+      label: '创建时间',
+      prop: 'createTime'
+    },
+    {
+      label: '更新时间',
+      prop: 'updateTime'
+    },
+    {
+      label: '租户ID',
+      prop: 'tenantId'
+    }
+  ]
+}

+ 127 - 0
src/const/crud/pay/paytradeorder.js

@@ -0,0 +1,127 @@
+/*
+ *    Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+export const tableOption = {
+  border: true,
+  index: true,
+  indexLabel: '序号',
+  stripe: true,
+  menuAlign: 'center',
+  align: 'center',
+  column: [
+    {
+      label: '支付订单号',
+      prop: 'orderId'
+    },
+    {
+      label: '渠道ID',
+      prop: 'channelId'
+    },
+    {
+      label: '支付金额,单位分',
+      prop: 'amount'
+    },
+    {
+      label: '三位货币代码,人民币:cny',
+      prop: 'currency'
+    },
+    {
+      label: '支付状态,0-订单生成,1-支付中(目前未使用),2-支付成功,3-业务处理完成',
+      prop: 'status'
+    },
+    {
+      label: '客户端IP',
+      prop: 'clientIp'
+    },
+    {
+      label: '设备',
+      prop: 'device'
+    },
+    {
+      label: '商品标题',
+      prop: 'subject'
+    },
+    {
+      label: '商品描述信息',
+      prop: 'body'
+    },
+    {
+      label: '特定渠道发起时额外参数',
+      prop: 'extra'
+    },
+    {
+      label: '渠道商户ID',
+      prop: 'channelMchId'
+    },
+    {
+      label: '渠道订单号',
+      prop: 'channelOrderNo'
+    },
+    {
+      label: '渠道支付错误码',
+      prop: 'errCode'
+    },
+    {
+      label: '渠道支付错误描述',
+      prop: 'errMsg'
+    },
+    {
+      label: '扩展参数1',
+      prop: 'param1'
+    },
+    {
+      label: '扩展参数2',
+      prop: 'param2'
+    },
+    {
+      label: '通知地址',
+      prop: 'notifyUrl'
+    },
+    {
+      label: '通知次数',
+      prop: 'notifyCount'
+    },
+    {
+      label: '最后一次通知时间',
+      prop: 'lastNotifyTime'
+    },
+    {
+      label: '订单失效时间',
+      prop: 'expireTime'
+    },
+    {
+      label: '订单支付成功时间',
+      prop: 'paySuccTime'
+    },
+    {
+      label: '创建时间',
+      prop: 'createTime'
+    },
+    {
+      label: '更新时间',
+      prop: 'updateTime'
+    },
+    {
+      label: '删除标记',
+      prop: 'delFlaag'
+    },
+    {
+      label: '租户ID',
+      prop: 'tenantId'
+    }
+  ]
+}

+ 2 - 2
src/main.js

@@ -26,12 +26,12 @@ Vue.use(vueJsonTreeView)
 Vue.use(VueAxios, axios)
 
 Vue.use(ElementUI,{
-  size: 'mini',
+  size: 'medium',
   menuType: 'text'
 })
 
 Vue.use(window.AVUE, {
-  size: 'mini',
+  size: 'medium',
   menuType: 'text'
 })
 

+ 2 - 2
src/page/wel.vue

@@ -4,9 +4,9 @@
       <div class="banner-text">
         <span>
           <a href="https://avue.top/#/pay" target="_blank">
-            <img src="https://img.shields.io/badge/Avue-2.0.0-green.svg" alt="Build Status">
+            <img src="https://img.shields.io/badge/Avue-2.0.3-green.svg" alt="Build Status">
           </a>
-          <img src="https://img.shields.io/badge/Spring%20Boot-2.1.5.RELEASE-yellowgreen.svg" alt="Downloads">
+          <img src="https://img.shields.io/badge/Spring%20Boot-2.1.6.RELEASE-yellowgreen.svg" alt="Downloads">
           <img src="https://img.shields.io/badge/Spring%20Cloud-Greenwich.SR1-blue.svg" alt="Coverage Status">
         </span>
         <br>

+ 1 - 0
src/views/admin/dict/index.vue

@@ -36,6 +36,7 @@
           <el-button
             v-if="permissions.sys_dict_add"
             type="text"
+            size="mini"
             icon="el-icon-menu"
             @click="handleItem(scope.row,scope.index)">字典项
           </el-button>

+ 3 - 0
src/views/admin/role/index.vue

@@ -62,18 +62,21 @@
           <el-button
             v-if="roleManager_btn_edit"
             type="text"
+            size="mini"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row,scope.index)">编辑
           </el-button>
           <el-button
             v-if="roleManager_btn_del"
             type="text"
+            size="mini"
             icon="el-icon-delete"
             @click="handleDelete(scope.row,scope.index)">删除
           </el-button>
           <el-button
             v-if="roleManager_btn_perm"
             type="text"
+            size="mini"
             icon="el-icon-plus"
             @click="handlePermission(scope.row,scope.index)">权限
           </el-button>

+ 1 - 1
src/views/admin/social/index.vue

@@ -80,7 +80,7 @@ export default {
         this.tableLoading = false
       })
     },
-    handleDelete: function(row, index) {
+    rowDel: function(row, index) {
       var _this = this
       this.$confirm('是否确认删除ID为' + row.id, '提示', {
         confirmButtonText: '确定',

+ 3 - 0
src/views/admin/user/index.vue

@@ -53,6 +53,7 @@
                 v-if="sys_user_add"
                 class="filter-item"
                 type="primary"
+                size="mini"
                 icon="el-icon-edit"
                 @click="handleCreate">添加
               </el-button>
@@ -87,12 +88,14 @@
               <el-button
                 v-if="sys_user_edit"
                 type="text"
+                size="mini"
                 icon="el-icon-edit"
                 @click="handleUpdate(scope.row,scope.index)">编辑
               </el-button>
               <el-button
                 v-if="sys_user_del"
                 type="text"
+                size="mini"
                 icon="el-icon-delete"
                 @click="deletes(scope.row,scope.index)">删除
               </el-button>

+ 1 - 1
src/views/pay/cd/index.vue

@@ -40,7 +40,7 @@ export default {
   data() {
     return {
       amount: '1',
-      msg: 'http://pigx.huaxiadaowei.com/pay/goods/buy?amount=0.01',
+      msg: 'http://pigx.huaxiadaowei.com/pay/goods/buy?amount=1',
       options: {
         size: 300
       }

+ 143 - 0
src/views/pay/goods/index.vue

@@ -0,0 +1,143 @@
+<!--
+  -    Copyright (c) 2018-2025, lengleng All rights reserved.
+  -
+  - Redistribution and use in source and binary forms, with or without
+  - modification, are permitted provided that the following conditions are met:
+  -
+  - Redistributions of source code must retain the above copyright notice,
+  - this list of conditions and the following disclaimer.
+  - Redistributions in binary form must reproduce the above copyright
+  - notice, this list of conditions and the following disclaimer in the
+  - documentation and/or other materials provided with the distribution.
+  - Neither the name of the pig4cloud.com developer nor the names of its
+  - contributors may be used to endorse or promote products derived from
+  - this software without specific prior written permission.
+  - Author: lengleng (wangiegie@gmail.com)
+  -->
+<template>
+  <div class="execution">
+    <basic-container>
+      <avue-crud
+        ref="crud"
+        :page="page"
+        :data="tableData"
+        :permission="permissionList"
+        :table-loading="tableLoading"
+        :option="tableOption"
+        @on-load="getList"
+        @search-change="searchChange"
+        @refresh-change="refreshChange"
+        @row-update="handleUpdate"
+        @row-save="handleSave"
+        @row-del="rowDel"/>
+    </basic-container>
+  </div>
+</template>
+
+<script>
+import { addObj, delObj, fetchList, putObj } from '@/api/pay/paygoodsorder'
+import { tableOption } from '@/const/crud/pay/paygoodsorder'
+import { mapGetters } from 'vuex'
+
+export default {
+  name: 'Paygoodsorder',
+  data() {
+    return {
+      tableData: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 20 // 每页显示多少条
+      },
+      tableLoading: false,
+      tableOption: tableOption
+    }
+  },
+  computed: {
+    ...mapGetters(['permissions']),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permissions.generator_paygoodsorder_add, false),
+        delBtn: this.vaildData(this.permissions.generator_paygoodsorder_del, false),
+        editBtn: this.vaildData(this.permissions.generator_paygoodsorder_edit, false)
+      }
+    }
+  },
+  methods: {
+    getList(page, params) {
+      this.tableLoading = true
+      fetchList(Object.assign({
+        current: page.currentPage,
+        size: page.pageSize
+      }, params)).then(response => {
+        this.tableData = response.data.data.records
+        this.page.total = response.data.data.total
+        this.tableLoading = false
+      }).catch(() => {
+        this.tableLoading = false
+      })
+    },
+    rowDel: function(row, index) {
+      var _this = this
+      this.$confirm('是否确认删除ID为' + row.goodsOrderId, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delObj(row.goodsOrderId)
+      }).then(data => {
+        _this.tableData.splice(index, 1)
+        _this.$message({
+          showClose: true,
+          message: '删除成功',
+          type: 'success'
+        })
+        this.getList(this.page)
+      })
+    },
+    handleUpdate: function(row, index, done, loading) {
+      putObj(row).then(data => {
+        this.tableData.splice(index, 1, Object.assign({}, row))
+        this.$message({
+          showClose: true,
+          message: '修改成功',
+          type: 'success'
+        })
+        done()
+        this.getList(this.page)
+      }).catch(() => {
+        loading()
+      })
+    },
+    handleSave: function(row, done, loading) {
+      addObj(row).then(data => {
+        this.tableData.push(Object.assign({}, row))
+        this.$message({
+          showClose: true,
+          message: '添加成功',
+          type: 'success'
+        })
+        done()
+        this.getList(this.page)
+      }).catch(() => {
+        loading()
+      })
+    },
+    /**
+       * 搜索回调
+       */
+    searchChange(form) {
+      this.getList(this.page, this.filterForm(form))
+    },
+    /**
+       * 刷新回调
+       */
+    refreshChange() {
+      this.getList(this.page)
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 146 - 0
src/views/pay/notify/index.vue

@@ -0,0 +1,146 @@
+<!--
+  -    Copyright (c) 2018-2025, lengleng All rights reserved.
+  -
+  - Redistribution and use in source and binary forms, with or without
+  - modification, are permitted provided that the following conditions are met:
+  -
+  - Redistributions of source code must retain the above copyright notice,
+  - this list of conditions and the following disclaimer.
+  - Redistributions in binary form must reproduce the above copyright
+  - notice, this list of conditions and the following disclaimer in the
+  - documentation and/or other materials provided with the distribution.
+  - Neither the name of the pig4cloud.com developer nor the names of its
+  - contributors may be used to endorse or promote products derived from
+  - this software without specific prior written permission.
+  - Author: lengleng (wangiegie@gmail.com)
+  -->
+<template>
+  <div class="execution">
+    <basic-container>
+      <avue-crud
+        ref="crud"
+        :page="page"
+        :data="tableData"
+        :permission="permissionList"
+        :table-loading="tableLoading"
+        :option="tableOption"
+        @on-load="getList"
+        @search-change="searchChange"
+        @refresh-change="refreshChange"
+        @row-update="handleUpdate"
+        @row-save="handleSave"
+        @row-del="rowDel"/>
+    </basic-container>
+  </div>
+</template>
+
+<script>
+import {
+  fetchList,
+  addObj,
+  putObj,
+  delObj
+} from '@/api/pay/paynotifyrecord'
+import {
+  tableOption
+} from '@/const/crud/pay/paynotifyrecord'
+import {
+  mapGetters
+} from 'vuex'
+
+export default {
+  name: 'Paynotifyrecord',
+  data() {
+    return {
+      tableData: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 20 // 每页显示多少条
+      },
+      tableLoading: false,
+      tableOption: tableOption
+    }
+  },
+  computed: {
+    ...mapGetters(['permissions']),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permissions.generator_paynotifyrecord_add, false),
+        delBtn: this.vaildData(this.permissions.generator_paynotifyrecord_del, false),
+        editBtn: this.vaildData(this.permissions.generator_paynotifyrecord_edit, false)
+      }
+    }
+  },
+  methods: {
+    getList(page, params) {
+      this.tableLoading = true
+      fetchList(Object.assign({
+        current: page.currentPage,
+        size: page.pageSize
+      }, params)).then(response => {
+        this.tableData = response.data.data.records
+        this.page.total = response.data.data.total
+        this.tableLoading = false
+      }).catch(() => {
+        this.tableLoading = false
+      })
+    },
+    rowDel: function(row, index) {
+      var _this = this
+      this.$confirm('是否确认删除ID为' + row.id, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delObj(row.id)
+      }).then(data => {
+        _this.tableData.splice(index, 1)
+        _this.$message({
+          showClose: true,
+          message: '删除成功',
+          type: 'success'
+        })
+        this.getList(this.page)
+      })
+    },
+    handleUpdate: function(row, index, done, loading) {
+      putObj(row).then(data => {
+        this.tableData.splice(index, 1, Object.assign({}, row))
+        this.$message({
+          showClose: true,
+          message: '修改成功',
+          type: 'success'
+        })
+        done()
+        this.getList(this.page)
+      }).catch(() => {
+        loading()
+      })
+    },
+    handleSave: function(row, done, loading) {
+      addObj(row).then(data => {
+        this.tableData.push(Object.assign({}, row))
+        this.$message({
+          showClose: true,
+          message: '添加成功',
+          type: 'success'
+        })
+        done()
+        this.getList(this.page)
+      }).catch(() => {
+        loading()
+      })
+    },
+    searchChange(form) {
+      this.getList(this.page, this.filterForm(form))
+    },
+    refreshChange() {
+      this.getList(this.page)
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 146 - 0
src/views/pay/orders/index.vue

@@ -0,0 +1,146 @@
+<!--
+  -    Copyright (c) 2018-2025, lengleng All rights reserved.
+  -
+  - Redistribution and use in source and binary forms, with or without
+  - modification, are permitted provided that the following conditions are met:
+  -
+  - Redistributions of source code must retain the above copyright notice,
+  - this list of conditions and the following disclaimer.
+  - Redistributions in binary form must reproduce the above copyright
+  - notice, this list of conditions and the following disclaimer in the
+  - documentation and/or other materials provided with the distribution.
+  - Neither the name of the pig4cloud.com developer nor the names of its
+  - contributors may be used to endorse or promote products derived from
+  - this software without specific prior written permission.
+  - Author: lengleng (wangiegie@gmail.com)
+  -->
+<template>
+  <div class="execution">
+    <basic-container>
+      <avue-crud
+        ref="crud"
+        :page="page"
+        :data="tableData"
+        :permission="permissionList"
+        :table-loading="tableLoading"
+        :option="tableOption"
+        @on-load="getList"
+        @search-change="searchChange"
+        @refresh-change="refreshChange"
+        @row-update="handleUpdate"
+        @row-save="handleSave"
+        @row-del="rowDel"/>
+    </basic-container>
+  </div>
+</template>
+
+<script>
+import {
+  fetchList,
+  addObj,
+  putObj,
+  delObj
+} from '@/api/pay/paytradeorder'
+import {
+  tableOption
+} from '@/const/crud/pay/paytradeorder'
+import {
+  mapGetters
+} from 'vuex'
+
+export default {
+  name: 'Paytradeorder',
+  data() {
+    return {
+      tableData: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 20 // 每页显示多少条
+      },
+      tableLoading: false,
+      tableOption: tableOption
+    }
+  },
+  computed: {
+    ...mapGetters(['permissions']),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permissions.generator_paytradeorder_add, false),
+        delBtn: this.vaildData(this.permissions.generator_paytradeorder_del, false),
+        editBtn: this.vaildData(this.permissions.generator_paytradeorder_edit, false)
+      }
+    }
+  },
+  methods: {
+    getList(page, params) {
+      this.tableLoading = true
+      fetchList(Object.assign({
+        current: page.currentPage,
+        size: page.pageSize
+      }, params)).then(response => {
+        this.tableData = response.data.data.records
+        this.page.total = response.data.data.total
+        this.tableLoading = false
+      }).catch(() => {
+        this.tableLoading = false
+      })
+    },
+    rowDel: function(row, index) {
+      var _this = this
+      this.$confirm('是否确认删除ID为' + row.orderId, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delObj(row.orderId)
+      }).then(data => {
+        _this.tableData.splice(index, 1)
+        _this.$message({
+          showClose: true,
+          message: '删除成功',
+          type: 'success'
+        })
+        this.getList(this.page)
+      })
+    },
+    handleUpdate: function(row, index, done, loading) {
+      putObj(row).then(data => {
+        this.tableData.splice(index, 1, Object.assign({}, row))
+        this.$message({
+          showClose: true,
+          message: '修改成功',
+          type: 'success'
+        })
+        done()
+        this.getList(this.page)
+      }).catch(() => {
+        loading()
+      })
+    },
+    handleSave: function(row, done, loading) {
+      addObj(row).then(data => {
+        this.tableData.push(Object.assign({}, row))
+        this.$message({
+          showClose: true,
+          message: '添加成功',
+          type: 'success'
+        })
+        done()
+        this.getList(this.page)
+      }).catch(() => {
+        loading()
+      })
+    },
+    searchChange(form) {
+      this.getList(this.page, this.filterForm(form))
+    },
+    refreshChange() {
+      this.getList(this.page)
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 1 - 1
src/views/pay/paychannel/index.vue

@@ -150,7 +150,7 @@ export default {
              * 搜索回调
              */
     searchChange(form) {
-      this.getList(this.page,form)
+      this.getList(this.page, this.filterForm(form))
     },
     /**
              * 刷新回调