| | |
| | | {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'}, |
| | | ]] |
| | | }); |
| | | } |
| | |
| | | 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(); |