| | |
| | | } |
| | | }}, |
| | | {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:'160px',fixed:'true', |
| | | formatter: function (value, row) { |
| | | if (row.status === 1){ |
| | | return '<a href="#" onclick="TDriver.searchTDriverDetail('+row.id+')" style="color:green">详情</a>' +' ' + |
| | |
| | | TDriver.stop = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '停用', |
| | | area: ['45%', '50%'], //宽高 |
| | | title: '冻结', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_start_and_stop?id='+id |
| | |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '启用', |
| | | area: ['45%', '50%'], //宽高 |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_start_and_stop?id='+id |
| | |
| | | * 提交启用冻结 |
| | | */ |
| | | TDriver.updateStatus = function () { |
| | | |
| | | var status = $("#status").val(); |
| | | console.log(status) |
| | | if(status == 1 && ($("#stopRemark").val() == '' || $("#stopRemark").val() == null)){ |
| | | Feng.info("请输入冻结理由!") |
| | | return; |
| | | } |
| | | if(status == 2 && ($("#startRemark").val() == '' || $("#startRemark").val() == null)){ |
| | | Feng.info("请输入解冻理由!") |
| | | return; |
| | | } |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/update-status", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TDriverInfoDlg.close(); |
| | |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '充值余额', |
| | | area: ['45%', '20%'], //宽高 |
| | | area: ['800px', '220px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/rechargeBalancePage?id=' + id |
| | |
| | | * 提交充值 |
| | | */ |
| | | TDriver.rechargeBalance = function () { |
| | | var balance = $('#backgroundBalance').val().trim(); |
| | | var reg=/^[1-9]\d*$/;//由 1-9开头 的正则表达式 |
| | | //先判断是否为整数 在判断 是否在 1-总页 整数范围之内 |
| | | if(reg.test(balance)){ |
| | | if(parseInt(balance) <= 0){ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | }else{ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/recharge-balance", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TDriverInfoDlg.close(); |
| | |
| | | * 提交审核 |
| | | */ |
| | | TDriver.auditSubmit = function () { |
| | | |
| | | if($("#approvalStatus").val() == 3 && ($("#approvalNotes").val() == '' || $("#approvalNotes").val() == null)){ |
| | | Feng.info("请输入驳回原因!"); |
| | | return; |
| | | } |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/auditSubmit", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TDriverInfoDlg.close(); |
| | |
| | | TDriver.submitArea = function () { |
| | | var province = document.getElementById('province'); |
| | | var provinceIndex= province.selectedIndex ; |
| | | var provinceName = province.options[provinceIndex].value; |
| | | var provinceId = province.options[provinceIndex].id; |
| | | |
| | | var provinceId = province.options[provinceIndex].value; |
| | | var provinceName = province.options[provinceIndex].innerText; |
| | | console.log(provinceId) |
| | | console.log(provinceName) |
| | | if(provinceName == null || provinceName == ''){ |
| | | Feng.error("请选择省份!") |
| | | return; |
| | |
| | | var cityIndex= city.selectedIndex ; |
| | | var cityId = city.options[cityIndex].value; |
| | | var cityName = city.options[cityIndex].innerText; |
| | | |
| | | console.log(cityId) |
| | | console.log(cityName) |
| | | if(cityName == null || cityName == '' || cityName =='请选择'){ |
| | | Feng.error("请选择市区!") |
| | | return; |
| | |
| | | var districtIndex= district.selectedIndex ; |
| | | var districtId = district.options[districtIndex].value; |
| | | var districtName = district.options[districtIndex].innerText; |
| | | |
| | | if(districtName == null || districtName == '' || districtName =='请选择'){ |
| | | Feng.error("请选择区县!") |
| | | return; |
| | | console.log(districtId) |
| | | console.log(districtName) |
| | | if(districtName == '' || districtName == null || districtName == '请选择'){ |
| | | parent.$("#area").val(provinceName+'/'+cityName) |
| | | parent.$("#areaId").val(provinceId+'/'+cityId) |
| | | }else { |
| | | parent.$("#area").val(provinceName+'/'+cityName+'/'+districtName) |
| | | parent.$("#areaId").val(provinceId+'/'+cityId+'/'+districtId) |
| | | } |
| | | |
| | | parent.$("#area").val(provinceName+'/'+cityName+'/'+districtName) |
| | | parent.$("#areaId").val(provinceId+'/'+cityId+'/'+districtId) |
| | | TDriverInfoDlg.close(); |
| | | } |
| | | |