Commit 30672430 by LJM

订单详情

parent 2f63c767
......@@ -2,7 +2,7 @@ layui.use(['form', 'table', 'laydate'], function () {
var $ = layui.$;
var form = layui.form;
var table = layui.table;
var order_id = $("input[name='order_id']").val();
var order_id = $("#order_id").val();
window.IndexController = {
init: function () {
......@@ -124,7 +124,16 @@ layui.use(['form', 'table', 'laydate'], function () {
}
Request('/api/order/editOrderItems', 'POST', params, function (res) {
if (res.code === 0) {
layer.msg('修改成功', {shift: 0, time: 2000}, function () {
$("#editOrderItems").empty().text('修改');
$("#editOrderItems").next().hide();
$("#order_remark").hide().next().show();//订单备注
table.reload('list', {
page: {
curr: 1
}
});
});
} else {
layer.msg(res.msg);
}
......@@ -156,6 +165,71 @@ layui.use(['form', 'table', 'laydate'], function () {
},
handleBind: function () {
//收货信息
layui.form.on('submit(receiveInfoSubmit)', function (data) {
var text = $(data.elem).text();
if (text == '修改') {
$(data.elem).text('保存');
$(data.elem).next().show();
$(data.elem).parent().parent().find('.show').prev().hide();
$(data.elem).parent().parent().find('.show').show();
return false;
} else {
Request('/api/order/editOrderAdress', 'POST', data.field, function (res) {
if (res.code == 0) {
layer.msg('操作成功', {shift: 0, time: 2000}, function () {
layer.closeAll();
window.location.reload();
});
} else {
layer.msg(res.msg);
}
});
}
return false;
});
//结算信息
layui.form.on('submit(settlementInfoSubmit)', function (data) {
var text = $(data.elem).text();
if (text == '修改') {
$(data.elem).text('保存');
$(data.elem).next().show();
$(data.elem).parent().parent().find('.show').prev().hide();
$(data.elem).parent().parent().find('.show').show();
return false;
} else {
Request('/api/order/editOrderSettlement', 'POST', data.field, function (res) {
if (res.code == 0) {
layer.msg('操作成功', {shift: 0, time: 2000}, function () {
layer.closeAll();
window.location.reload();
});
} else {
layer.msg(res.msg);
}
});
}
return false;
});
//取消
layui.form.on('submit(canelSubmit)', function (data) {
$(data.elem).hide();
$(data.elem).prev().empty().text('修改');
$(data.elem).parent().parent().find('.show').prev().show();
$(data.elem).parent().parent().find('.show').hide();
});
//监听运费 支付手续费
$(document).on('input', '.change-num', debounce(function (e) {
var self = $(this);
var freight_charge = layui.form.val('settlementInfoForm').freight_charge * 1;
var pay_commission = layui.form.val('settlementInfoForm').pay_commission * 1;
var order_amount = layui.form.val('settlementInfoForm').order_amount * 1;
$("#order_total_amount").empty().text(freight_charge + pay_commission + order_amount);
}, 800))
return this;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment