Administrator
9 days ago a2ed552b0baa75c355c9ff9edce6edcf2f83a8eb
src/main/resources/templates/febs/views/modules/system/countryDeliveryList.html
@@ -85,15 +85,16 @@
                cols: [[
                    {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: 'shippingFee', title: '运费($)', width: 120, 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'},
                ]]
            });
        }
@@ -118,7 +119,7 @@
                '    </div>' +
                '  </div>' +
                '  <div class="layui-form-item">' +
                '    <label class="layui-form-label febs-form-item-require">运费(元)</label>' +
                '    <label class="layui-form-label febs-form-item-require">运费($)</label>' +
                '    <div class="layui-input-block">' +
                '      <input type="number" name="shippingFee" class="layui-input" ' + (data ? 'value="' + data.shippingFee + '"' : 'placeholder="运费金额"') + ' lay-verify="required|number">' +
                '    </div>' +
@@ -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();