Administrator
6 days ago 7d47e9d021938dba5a203bb93dde424255030de4
fix(config): 更新测试环境数据库配置并优化国家配送列表界面

- 更改测试环境数据库连接信息,更新用户名密码及连接地址
- 调整国家配送列表表格列宽度配置
- 优化状态字段显示样式,使用颜色标识启用禁用状态
- 重新排列表格列顺序,将备注列移至操作列之前
- 修复表单数据提交逻辑,使用layui表单验证方法获取表单值
- 添加表单渲染成功回调函数确保单选框正常显示
2 files modified
42 ■■■■■ changed files
src/main/resources/application-test.yml 10 ●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/modules/system/countryDeliveryList.html 32 ●●●●● patch | view | raw | blame | history
src/main/resources/application-test.yml
@@ -17,10 +17,14 @@
      datasource:
        # 数据源-1,名称为 base
        base:
          username: db_e2
          password: db_e20806123!@#
#          username: db_e2
#          password: db_e20806123!@#
#          driver-class-name: com.mysql.cj.jdbc.Driver
#          url: jdbc:mysql://120.27.238.55:3406/db_e2?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
          username: root
          password: 1!qaz2@WSX
          driver-class-name: com.mysql.cj.jdbc.Driver
          url: jdbc:mysql://120.27.238.55:3406/db_e2?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
          url: jdbc:mysql://159.198.39.140:3306/db_e2?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
  redis:
    # Redis数据库索引(默认为 0)
src/main/resources/templates/febs/views/modules/system/countryDeliveryList.html
@@ -86,14 +86,15 @@
                    {field: 'countryCode', title: '国家编码', width: 120, align: 'center'},
                    {field: 'countryName', title: '国家名称', width: 150, align: 'center'},
                    {field: 'shippingFee', title: '运费(元)', width: 120, align: 'center'},
                    {field: 'status', title: '状态', width: 80, align: 'center',
                    {field: 'status', title: '状态', width: 100, align: 'center',
                        templet: function (d) {
                            return d.status === 1 ? '<span class="layui-badge layui-bg-green">启用</span>'
                                : '<span class="layui-badge">禁用</span>';
                            return d.status === 1
                                ? '<span style="color:#5FB878;">● 启用</span>'
                                : '<span style="color:#999;">● 禁用</span>';
                        }
                    },
                    {field: 'remark', title: '备注', minWidth: 150, align: 'left'},
                    {title: '操作', templet: '#country-delivery-option', width: 120, align: 'center'}
                    {title: '操作', templet: '#country-delivery-option', width: 120, align: 'center'},
                    {field: 'remark', title: '备注', minWidth: 100, align: 'center'},
                ]]
            });
        }
@@ -143,25 +144,14 @@
                title: title,
                area: ['500px', '420px'],
                content: html,
                success: function (layero) {
                    form.render('radio', 'country-delivery-form');
                },
                btn: ['保存', '取消'],
                yes: function (index, layero) {
                    var formObj = $(layero).find('form');
                    var fieldData = {};
                    formObj.find('input[name]').each(function () {
                        var name = $(this).attr('name');
                        var type = $(this).attr('type');
                        if (type === 'radio' && !$(this).prop('checked')) return;
                        if (type !== 'radio') {
                            fieldData[name] = $(this).val();
                        } else {
                            fieldData[name] = $(this).val();
                        }
                    });
                    // radio
                    var statusVal = formObj.find('input[name="status"]:checked').val();
                    fieldData.status = statusVal;
                    febs.post(ctx + 'admin/system/countryDeliverySave', fieldData, function (res) {
                    var data = form.val("country-delivery-form");
                    febs.post(ctx + 'admin/system/countryDeliverySave', data, function (res) {
                        layer.close(index);
                        febs.alert.success('保存成功');
                        tableIns.reload();