Commit b38f375a by 朱继来

temp2

parent 370faca8
......@@ -590,6 +590,7 @@ Class AddOrderController extends Controller
if ($request->isMethod('post')) {
$is_online = $request->input('is_online');
$data['uid'] = $request->input('uid', 0);
$data['shipping_type'] = $request->input('shipping_type', 1);
$data['address_id'] = $request->input('address_id', 0);
$data['cart_id'] = $request->input('cart_ids', '');
$data['user_coupon_id'] = $request->input('user_coupon_id', 0);
......
......@@ -119,9 +119,29 @@
if (shipping_type == 2) {
$('.select-addr').hide();
$('.address-content').hide();
$('.address_id').val(1);
} else {
$('.select-addr').show();
}
var coupon_id = $('#user_coupon').val();
var address_id = $('.address_id').val();
var user_id = $('.user_id').val();
var cart_ids = [];
$('.shop-table tbody').find('tr').each(function() {
var cid = $(this).data('cid');
cart_ids.push(cid);
})
if (coupon_id) {
$('.user_coupon_id').val(coupon_id);
} else {
$('.user_coupon_id').val('');
}
loading.confirm(user_id, address_id, cart_ids, coupon_id, goods_type, is_online); // 确认订单信息
})
// 选择收货地址
......@@ -707,12 +727,13 @@
// 提交订单
// $('.submit-order').on('click', function() {
$('.submit-order').off().on('click', function() {
var self = $(this);
var address_id = $('input[name=address_id]').val();
var type = self.data('type'); // 1-联营线上,2-自营线上,3-自营线下,4-自营其他业务
var cart_ids = [];
var user_id = 0;
var remark = $('#remark').val(); // 订单备注
var self = $(this);
var shipping_type = $('#shipping_type').val(); // 配送方式
var address_id = $('input[name=address_id]').val();
var type = self.data('type'); // 1-联营线上,2-自营线上,3-自营线下,4-自营其他业务
var cart_ids = [];
var user_id = 0;
var remark = $('#remark').val(); // 订单备注
if (internal_uid) {
user_id = internal_uid;
......@@ -739,6 +760,7 @@
var datax = {
uid: user_id,
sale_id: sale_id,
shipping_type: shipping_type,
address_id: address_id,
type: type,
cart_ids: cart_ids,
......@@ -1131,6 +1153,7 @@
var self = this;
var business_type = $('#business_type'); // 自营其他业务
var zy_delivery_type = $('.zy_delivery_type').val(); // 发货方式
var shipping_type = $('#shipping_type').val(); // 配送方式
if (business_type.length > 0) {
business_type = business_type.val();
......@@ -1141,7 +1164,7 @@
$.ajax({
type: 'post',
url: '/ajax/confirm',
data: {uid: user_id, address_id: address_id, cart_ids: cart_ids, user_coupon_id: user_coupon_id, goods_type: goods_type, is_online: is_online, business_type: business_type, zy_delivery_type: zy_delivery_type},
data: {uid: user_id, shipping_type: shipping_type, address_id: address_id, cart_ids: cart_ids, user_coupon_id: user_coupon_id, goods_type: goods_type, is_online: is_online, business_type: business_type, zy_delivery_type: zy_delivery_type},
dataType: "json",
success: function(resp){
if (resp.errcode == 0) {
......
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