手动结束订单按钮调整位置
This commit is contained in:
@ -163,9 +163,6 @@ public class ZcOrderMainController extends BaseController
|
||||
public AjaxResult manualEndOrder(Long orderId)
|
||||
{
|
||||
int flag = zcOrderMainService.updateManualEndOrder(orderId);
|
||||
if(flag > 0) {
|
||||
|
||||
}
|
||||
return toAjax(flag);
|
||||
}
|
||||
|
||||
|
||||
@ -175,7 +175,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<button type="button" th:if="not (*{orderStatus} == 'AUTO_END' or *{orderStatus} == 'MANUAL_END' or *{orderStatus} == 'WAIT_PAY')" class="btn btn-success btn-xs" onclick="manualEndOrder()">手动结束订单</i></button>
|
||||
<!-- <button type="button" th:if="not (*{orderStatus} == 'AUTO_END' or *{orderStatus} == 'MANUAL_END' or *{orderStatus} == 'WAIT_PAY')" class="btn btn-success btn-xs" onclick="manualEndOrder()">手动结束订单</i></button>-->
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
|
||||
@ -140,7 +140,11 @@
|
||||
width: '220px',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
if(row.orderStatus != "AUTO_END" && row.orderStatus != "MANUAL_END" && row.orderStatus != "WAIT_PAY"){
|
||||
actions.push('<a class="btn btn-primary btn-xs btnOption" href="javascript:void(0)" onclick="manualClose(\'' + row.orderId + '\')">' + value + '</a> ');
|
||||
}else{
|
||||
actions.push('<a class="btn btn-success btn-xs btnOption" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.orderId + '\',1300,800)">' + value + '</a> ');
|
||||
}
|
||||
return actions.join('');
|
||||
}
|
||||
},
|
||||
@ -255,6 +259,43 @@
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function manualClose(id){
|
||||
var index = layer.open({
|
||||
type: 2, // iframe模式
|
||||
title: '确认手动结束订单?',
|
||||
area: ['1300px', '800px'],
|
||||
content: prefix + "/edit/" + id,
|
||||
btn: ['<i class="fa fa-check"></i> 手动结束订单', '<i class="fa fa-close"></i> 关闭'],
|
||||
yes: function(index, layero){
|
||||
// 通过提现申请
|
||||
manualEndOrder(id, index);
|
||||
return false;
|
||||
},
|
||||
btn2: function(index, layero){
|
||||
// 关闭
|
||||
layer.close(index);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function manualEndOrder(orderId,index){
|
||||
$.modal.confirm("确认手动结束该订单<br/><span style='color: red'>请确认车辆是否己归还,如未归还需要进行车辆丢失报损。<br/>结束此订单不再计算租车费用,己支付租金不做退款。</span>", function() {
|
||||
$.operate.post(prefix + "/manualEndOrder", { "orderId": orderId}, function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$.modal.msgSuccess("操作成功");
|
||||
// 关闭
|
||||
layer.close(index);
|
||||
var parent = activeWindow();
|
||||
parent.$.table.refresh();
|
||||
|
||||
} else {
|
||||
$.modal.msgError(result.msg);
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user