| | |
| | | }}, |
| | | {title: '驾驶证号码', field: 'driverLicenseNumber', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '身份证号码', field: 'idcard', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '身份证', field: 'source', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所属代理商', field: 'agentId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所属分公司', field: 'branchOfficeId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '身份证', field: 'source', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (null != row.idcardFront){ |
| | | return '<span>已上传</span>' |
| | | }else{ |
| | | return '<span>未上传</span>' |
| | | } |
| | | }}, |
| | | {title: '所属代理商', field: 'agentName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所属分公司', field: 'branchName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '钱包余额', field: 'balance', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '累计订单量', field: 'approvalStatus', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '当月订单量', field: 'approvalNotes', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '累计订单量', field: 'cumulativeOrderCount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '当月订单量', field: 'monthOrderCount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '积分', field: 'integral', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '拒单次数', field: 'approvalUserId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '拒单次数', field: 'refusalCount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.status === 1){ |
| | | return '<span>正常</span>' |
| | | }else if (row.status === 2){ |
| | | return '<span>冻结</span>' |
| | | }else if (row.status === 3){ |
| | | return '<span>已删除</span>' |
| | | } |
| | | }}, |
| | | {title: '审核状态', field: 'approvalStatus', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.approvalStatus === 1){ |
| | | return '<span>待审核</span>' |
| | | }else if (row.approvalStatus === 2){ |
| | | return '<span>审核通过</span>' |
| | | }else if (row.approvalStatus === 3){ |
| | | return '<span>审核不通过</span>' |
| | | } |
| | | }}, |
| | | {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, |
| | | formatter: function (value, row) { |
| | | /*if(row.approvalStatus === 1){ |
| | | return '<a href="#" onclick="TDriver.stop('+row.id+','+row.status+')" style="color:red">驳回</a>' +' ' + |
| | | '<a href="#" onclick="TDriver.searchTAppUserDetail('+row.id+','+row.status+')" style="color:green">详情</a>' |
| | | }else */if (row.status === 1){ |
| | | return '<a href="#" onclick="TDriver.stop('+row.id+','+row.status+')" style="color:red">停用</a>' +' ' + |
| | | '<a href="#" onclick="TDriver.searchTAppUserDetail('+row.id+','+row.status+')" style="color:green">详情</a>' |
| | | if (row.status === 1){ |
| | | return '<a href="#" onclick="TDriver.searchTDriverDetail('+row.id+')" style="color:green">详情</a>' +' ' + |
| | | '<a href="#" onclick="TDriver.stop('+row.id+','+row.status+')" style="color:red">冻结</a>' +' ' + |
| | | '<a href="#" onclick="TDriver.updateInfo('+row.id+')" style="color:green">编辑</a>' |
| | | }else if (row.status === 2){ |
| | | return '<a href="#" onclick="TDriver.start('+row.id+','+row.status+')" style="color:green">启用</a>' +' ' + |
| | | '<a href="#" onclick="TDriver.searchTAppUserDetail('+row.id+','+row.status+')" style="color:green">详情</a>' |
| | | return '<a href="#" onclick="TDriver.searchTDriverDetail('+row.id+')" style="color:green">详情</a>' +' ' + |
| | | '<a href="#" onclick="TDriver.start('+row.id+','+row.status+')" style="color:green">解冻</a>' |
| | | } |
| | | } |
| | | } |
| | |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情(使用中) |
| | | */ |
| | | TDriver.searchTDriverDetail = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/driverDetail?tDriverId=' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TDriver.delete = function () { |
| | |
| | | }; |
| | | |
| | | /** |
| | | * 停用页面 |
| | | */ |
| | | TDriver.stop = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '停用', |
| | | area: ['45%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_start_and_stop?id='+id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 启动页面 |
| | | */ |
| | | TDriver.start = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '启用', |
| | | area: ['45%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_start_and_stop?id='+id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 提交启用冻结 |
| | | */ |
| | | TDriver.updateStatus = function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/update-status", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TDriverInfoDlg.close(); |
| | | parent.TDriver.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("status",$("#status").val()); |
| | | if($("#status").val() == 1){ |
| | | ajax.set("remark",$("#stopRemark").val()); |
| | | } |
| | | if($("#status").val() == 2){ |
| | | ajax.set("remark",$("#startRemark").val()); |
| | | } |
| | | ajax.start(); |
| | | }; |
| | | |
| | | /** |
| | | * 跳转充值余额页面 |
| | | * @param id |
| | | */ |
| | | TDriver.rechargeBalancePage = function () { |
| | | if (this.check()) { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | var id = selected[0].id; |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '充值余额', |
| | | area: ['45%', '20%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/rechargeBalancePage?id=' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 提交充值 |
| | | */ |
| | | TDriver.rechargeBalance = function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/recharge-balance", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TDriverInfoDlg.close(); |
| | | parent.TDriver.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("money",$("#backgroundBalance").val()); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | /** |
| | | * 司机信息导出 |
| | | */ |
| | | TDriver.export=function(){ |
| | | var createTime=$("#createTime").val() |
| | | var phone=$("#phone").val() |
| | | var status=$("#status").val() |
| | | window.location.href=Feng.ctxPath + "/tDriver/export?createTime="+createTime |
| | | +"&status="+status |
| | | +"&phone="+phone |
| | | ; |
| | | } |
| | | |
| | | /** |
| | | * 跳转审核页面 |
| | | * @param id |
| | | */ |
| | | TDriver.auditPage = function () { |
| | | if (this.check()) { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | var id = selected[0].id; |
| | | var approvalStatus = selected[0].approvalStatus; |
| | | if(approvalStatus != 1){ |
| | | Feng.info("该条数据已审核!"); |
| | | return false; |
| | | } |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '审核详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/auditPage?id=' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 提交审核 |
| | | */ |
| | | TDriver.auditSubmit = function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/auditSubmit", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TDriverInfoDlg.close(); |
| | | parent.TDriver.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("approvalStatus",$("#approvalStatus").val()); |
| | | ajax.set("approvalNotes",$("#approvalNotes").val()); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TDriver.search = function () { |