|
@@ -22,24 +22,33 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
pk: 'id',
|
|
|
sortName: 'id',
|
|
|
sortOrder: 'desc',
|
|
|
+ fixedColumns: true,
|
|
|
+ fixedRightNumber: 1,
|
|
|
columns: [
|
|
|
[
|
|
|
- {checkbox: true},
|
|
|
- {field: 'id', title: __('Id'), operate: false, sortable: true},
|
|
|
- {field: 'name', title: '姓名', operate: 'LIKE'},
|
|
|
- {field: 'phone', title: '联系电话', operate: 'LIKE'},
|
|
|
- {field: 'user.nickname', title: '用户昵称', operate: false},
|
|
|
- {field: 'user.mobile', title: '用户手机', operate: false},
|
|
|
- {field: 'province_name', title: '省份', operate: false},
|
|
|
- {field: 'city_name', title: '城市', operate: false},
|
|
|
- {field: 'district_name', title: '区县', operate: false},
|
|
|
- {field: 'apply_time_text', title: '申请时间', operate: false, sortable: true},
|
|
|
- {field: 'audit_status', title: '审核状态', searchList: {"1":"审核中","2":"审核通过","3":"审核驳回"}, formatter: Table.api.formatter.status, custom: {"1":"warning","2":"success","3":"danger"}},
|
|
|
- {field: 'audit_time_text', title: '审核时间', operate: false},
|
|
|
- {field: 'reject_reason', title: '驳回原因', operate: false, formatter: function(value, row, index) {
|
|
|
+ {checkbox: true, width: 50},
|
|
|
+ {field: 'id', title: __('Id'), operate: false, sortable: true, width: 80},
|
|
|
+ {field: 'name', title: '姓名', operate: 'LIKE', width: 100},
|
|
|
+ {field: 'phone', title: '联系电话', operate: 'LIKE', width: 120},
|
|
|
+ {field: 'user.nickname', title: '用户昵称', operate: false, width: 100},
|
|
|
+ {field: 'user.mobile', title: '用户手机', operate: false, width: 120},
|
|
|
+ {field: 'supplier.name', title: '绑定供应商', operate: false, width: 120, formatter: function(value, row, index) {
|
|
|
+ if (row.supplier && row.supplier.name) {
|
|
|
+ return '<span class="label label-info">' + row.supplier.name + '</span>';
|
|
|
+ }
|
|
|
+ return '<span class="text-muted">未绑定</span>';
|
|
|
+ }},
|
|
|
+ {field: 'id_card', title: '身份证号', operate: false, width: 150},
|
|
|
+ {field: 'province_name', title: '省份', operate: false, width: 80},
|
|
|
+ {field: 'city_name', title: '城市', operate: false, width: 80},
|
|
|
+ {field: 'district_name', title: '区县', operate: false, width: 80},
|
|
|
+ {field: 'apply_time_text', title: '申请时间', operate: false, sortable: true, width: 140},
|
|
|
+ {field: 'audit_status', title: '审核状态', searchList: {"1":"审核中","2":"审核通过","3":"审核驳回"}, formatter: Table.api.formatter.status, custom: {"1":"warning","2":"success","3":"danger"}, width: 100},
|
|
|
+ {field: 'audit_time_text', title: '审核时间', operate: false, width: 140},
|
|
|
+ {field: 'reject_reason', title: '驳回原因', operate: false, width: 200, formatter: function(value, row, index) {
|
|
|
return value ? '<span class="text-danger">' + value + '</span>' : '-';
|
|
|
}},
|
|
|
- {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate,
|
|
|
+ {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, width: 150, fixed: 'right',
|
|
|
buttons: [
|
|
|
{
|
|
|
name: 'detail',
|
|
@@ -173,13 +182,22 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
$(document).on('change', 'input[name="audit_status"]', function() {
|
|
|
var status = $(this).val();
|
|
|
if (status == '3') {
|
|
|
+ // 审核驳回
|
|
|
$('#reject-reason-group').show();
|
|
|
$('#reject_reason').attr('data-rule', 'required');
|
|
|
+ $('#supplier-group').hide();
|
|
|
+ $('#c-supplier_id').removeAttr('data-rule');
|
|
|
} else {
|
|
|
+ // 审核通过
|
|
|
$('#reject-reason-group').hide();
|
|
|
$('#reject_reason').removeAttr('data-rule').val('');
|
|
|
+ $('#supplier-group').show();
|
|
|
+ $('#c-supplier_id').attr('data-rule', 'required');
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ // 初始化状态
|
|
|
+ $('input[name="audit_status"]:checked').trigger('change');
|
|
|
},
|
|
|
|
|
|
api: {
|