nickchange
2023-10-27 a5fa1ac5cdcb1b436a96af8344a3a7bf5f83391d
10.27.3
1个文件已修改
1个文件已添加
509 ■■■■■ 已修改文件
cloud-server-activity/src/main/java/com/dsh/activity/service/impl/UserCouponServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/registerList.html 507 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-activity/src/main/java/com/dsh/activity/service/impl/UserCouponServiceImpl.java
@@ -165,7 +165,7 @@
            }
            if (type == 2) {//代金券{"num1":1}
                JSONObject jsonObject = JSON.parseObject(content);
                Double num1 = jsonObject.getDouble("deductionAmount");
                Double num1 = jsonObject.getDouble("conditionalAmount");
                if(num1==null){
                    num1=0d;
                }
cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/registerList.html
New file
@@ -0,0 +1,507 @@
<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8" />
  <title>amis demo</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta
          name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1"
  />
  <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  <link rel="stylesheet" href="${ctxPath}/sdk/sdk.css" />
  <link rel="stylesheet" href="${ctxPath}/sdk/helper.css" />
  <link rel="stylesheet" href="${ctxPath}/sdk/iconfont.css" />
  <!-- 这是默认主题所需的,如果是其他主题则不需要 -->
  <!-- 从 1.1.0 开始 sdk.css 将不支持 IE 11,如果要支持 IE11 请引用这个 css,并把前面那个删了 -->
  <!-- <link rel="stylesheet" href="sdk-ie11.css" /> -->
  <!-- 不过 amis 开发团队几乎没测试过 IE 11 下的效果,所以可能有细节功能用不了,如果发现请报 issue -->
  <style>
    html,
    body,
    .app-wrapper {
      position: relative;
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 0;
    }
  </style>
</head>
<body>
<div id="root" class="app-wrapper"></div>
<script src="${ctxPath}/sdk/sdk.js"></script>
<script type="text/javascript">
  (function () {
    let amis = amisRequire('amis/embed');
    // 通过替换下面这个配置来生成不同页面
    let amisJSON = {
      "type": "page",
      "title": "",
      "regions": [
        "body",
        "toolbar",
        "header"
      ],
      "body": [
        {
          "type": "crud",
          "id": "u:e103c7434df8",
          "syncLocation": false,
          "api": {
            "method": "post",
            "url": "/ball/getRegisterList",
            "messages": {
            }
          },
          "columns": [
            {
              "label": "所在市",
              "type": "text",
              "name": "city",
              "id": "u:71aded278293"
            },
            {
              "label": "管理员姓名",
              "type": "text",
              "name": "adminName",
              "id": "u:22cab5368b85",
              "classNameExpr": "<%= data.courseName === '总计' ? 'bg-danger' : '' %>",
              "placeholder": "-"
            },
            {
              "label": "管理员手机号",
              "type": "text",
              "name": "adminPhone",
              "id": "u:100d93c3a7af",
              "classNameExpr": "<%= data.courseName === '总计' ? 'bg-danger' : '' %>",
              "placeholder": "-"
            },
            {
              "label": "认证平台",
              "type": "mapping",
              "name": "ptType",
              "id": "u:0529135bd40c",
              "placeholder": "-",
              "map": {
                "1": "支付宝",
                "2": "微信"
              }
            },
            {
              "label": "认证类型",
              "type": "mapping",
              "name": "regisType",
              "id": "u:89e54c565da1",
              "placeholder": "-",
              "map": {
                "1": "法人",
                "2": "个人"
              }
            },
            {
              "label": "分账比例",
              "type": "text",
              "name": "percent",
              "id": "u:9f3c838b4dce",
              "placeholder": "-",
              "classNameExpr": "<%= data.courseName === '总计' ? 'bg-danger' : '' %>"
            },
            {
              "type": "mapping",
              "name": "isPass",
              "label": "审核状态",
              "id": "u:89e54c565da1",
              "placeholder": "-",
              "map": {
                "1": "待审核",
                "2": "审核中",
                "3": "已通过",
                "4": "已拒绝"
              }
            },
            {
              "type": "operation",
              "id": "u:d69a8d60da29",
              "buttons": [
                {
                  "type": "button",
                  "label": "详情",
                  "onEvent": {
                    "click": {
                      "actions": [
                        {
                          "args": {
                            "options": {
                              "silent": false
                            },
                            "api": {
                              "url": "/ball/toRegister/$id",
                              "method": "get"
                            }
                          },
                          "actionType": "ajax"
                        }
                      ]
                    }
                  },
                  "id": "u:ed2016be790a",
                  "class": "link",
                  "level": "link"
                }
              ]
            }
          ],
          "bulkActions": [
            {
              "type": "button",
              "level": "danger",
              "label": "批量删除",
              "actionType": "ajax",
              "confirmText": "确定要删除?",
              "api": "/xxx/batch-delete",
              "id": "u:e179a3daeee8"
            },
            {
              "type": "button",
              "label": "批量编辑",
              "actionType": "dialog",
              "dialog": {
                "title": "批量编辑",
                "size": "md",
                "body": {
                  "type": "form",
                  "api": "/xxx/bacth-edit",
                  "body": [
                    {
                      "label": "字段1",
                      "text": "字段1",
                      "type": "input-text"
                    }
                  ]
                }
              },
              "id": "u:4bbe1e5df5ed"
            }
          ],
          "itemActions": [
            {
              "label": "分账比例",
              "type": "button",
              "id": "u:0120816fbcb0",
              "level": "info",
              "onEvent": {
                "click": {
                  "actions": [
                    {
                      "args": {
                      },
                      "dialog": {
                        "type": "dialog",
                        "title": "弹框标题",
                        "body": [
                          {
                            "type": "form",
                            "title": "表单",
                            "body": [
                              {
                                "label": "测试分账id",
                                "type": "input-text",
                                "name": "id",
                                "id": "u:64ad701b83c3"
                              },
                              {
                                "label": "支付宝分账比例",
                                "type": "input-text",
                                "name": "ali",
                                "id": "u:91534896ba54"
                              },
                              {
                                "label": "微信分账比例",
                                "type": "input-text",
                                "name": "text",
                                "id": "u:4649d90555b1"
                              }
                            ],
                            "api": {
                              "url": "/ball/resSet",
                              "method": "get"
                            },
                            "id": "u:01f28ccf4fb8"
                          }
                        ],
                        "showCloseButton": true,
                        "showErrorMsg": true,
                        "showLoading": true,
                        "id": "u:073191c211be"
                      },
                      "actionType": "dialog"
                    }
                  ],
                  "weight": 0
                }
              }
            }
          ],
          "filterSettingSource": [
            "id",
            "customerName",
            "simName",
            "address",
            "industryId",
            "email",
            "createBy",
            "updateBy",
            "remark",
            "customerCode"
          ],
          "features": [
            "create",
            "filter",
            "bulkDelete",
            "view",
            "delete",
            "update",
            "bulkUpdate"
          ],
          "filterColumnCount": 3,
          "filterEnabledList": [
          ],
          "headerToolbar": [
            {
              "label": "新增",
              "type": "button",
              "actionType": "dialog",
              "level": "primary",
              "dialog": {
                "title": "新增",
                "body": {
                  "type": "form",
                  "api": {
                    "method": "post",
                    "url": "/ball/getRegisterList",
                    "messages": {
                    }
                  },
                  "body": [
                    {
                      "type": "input-text",
                      "name": "city",
                      "label": "所在市"
                    },
                    {
                      "type": "input-text",
                      "name": "adminName",
                      "label": "管理员姓名"
                    },
                    {
                      "type": "input-text",
                      "name": "adminPhone",
                      "label": "管理员手机号"
                    },
                    {
                      "type": "select",
                      "name": "ptType",
                      "label": "认证平台"
                    },
                    {
                      "type": "select",
                      "name": "regisType",
                      "label": "认证类型"
                    },
                    {
                      "type": "input-text",
                      "name": "percent",
                      "label": "分账比例"
                    },
                    {
                      "type": "select",
                      "name": "isPass",
                      "label": "审核状态"
                    },
                    {
                      "type": "input-operation"
                    }
                  ]
                }
              },
              "id": "u:7ab8ef9ba27f"
            },
            "bulkActions"
          ],
          "filter": {
            "title": "查询条件",
            "columnCount": 3,
            "mode": "horizontal",
            "body": [
              {
                "type": "input-city",
                "label": "城市选择",
                "name": "cityCode",
                "allowDistrict": false,
                "id": "u:16db9fd9fe42",
                "mode": "horizontal",
                "horizontal": {
                  "left": 3,
                  "right": 9
                },
                "className": ""
              },
              // {
              //   "type": "select",
              //   "label": "客户简称",
              //   "name": "simName",
              //   "id": "u:1942896a0f61",
              //   "multiple": false,
              //   "source": {
              //     "url": "/api/v1/rep/cus/getselect",
              //     "method": "get",
              //     "messages": {
              //     }
              //   },
              //   "labelField": "simName",
              //   "valueField": "simName",
              //   "searchable": true
              // },
              {
                "type": "input-date-range",
                "label": "日期范围",
                "name": "times",
                "id": "u:5ea0ab341c9e",
                "embed": false,
                "format": "YYYY-MM-DD",
                "inputFormat": "YYYY-MM-DD"
              },
              {
                "type": "input-text",
                "label": "管理员姓名",
                "name": "adminName",
                "id": "u:528726820775"
              },
              {
                "type": "select",
                "label": "认证平台",
                "name": "ptType",
                "options": [
                  {
                    "label": "全部",
                    "value": ""
                  },
                  {
                    "label": "支付宝",
                    "value": "1"
                  },
                  {
                    "label": "微信",
                    "value": "2"
                  }
                ],
                "id": "u:3f0a0a09ae17",
                "multiple": false
              },
              {
                "type": "select",
                "label": "认证类型",
                "name": "regisType",
                "options": [
                  {
                    "label": "全部",
                    "value": "全部"
                  },
                  {
                    "label": "法人",
                    "value": "1"
                  },
                  {
                    "label": "个人",
                    "value": "2"
                  }
                ],
                "id": "u:62ad230ae3e4",
                "multiple": false
              },
              {
                "type": "select",
                "label": "审核状态",
                "name": "isPass",
                "options": [
                  {
                    "label": "全部",
                    "value": "全部"
                  },
                  {
                    "label": "待审核",
                    "value": "1"
                  },
                  {
                    "label": "审核中",
                    "value": "2"
                  },
                  {
                    "label": "已通过",
                    "value": "3"
                  },
                  {
                    "label": "已拒绝",
                    "value": "4"
                  }
                ],
                "id": "u:b5833dda16af",
                "multiple": false
              }
            ],
            "id": "u:2c92f31a25d0",
            "name": "select1",
            "rules": [
            ]
          },
          "perPageAvailable": [
            10,
            20,
            50,
            100
          ],
          "messages": {
          },
          "footerToolbar": [
            {
              "type": "statistics",
              "align": "left"
            },
            {
              "type": "pagination",
              "align": "left"
            },
            {
              "type": "switch-per-page",
              "tpl": "内容",
              "align": "left"
            }
          ],
          "columnsTogglable": "auto",
          "pageField": "",
          "perPageField": "",
          "alwaysShowPagination": true,
          "loadDataOnce": true,
          "perPage": 5,
          "combineNum": 3
        }
      ],
      "id": "u:b14a93e2aeb3"
    };
    let amisScoped = amis.embed('#root', amisJSON);
  })();
  function test(){
    console.log("测试成功")
  }
  var myButton = document.getElementById("ttt");
  myButton.addEventListener("click",test);
</script>
</body>
</html>