Commit 9febdead by 朱继来

Merge branch 'zjl_create_order_20180813' into development

parents 221f37ac 03a2741f
......@@ -552,9 +552,9 @@ Class AddOrderController extends Controller
}
if (!empty($update)) {
return ['errcode' => 0, 'errmsg' => '审核成功'];
return ['errcode' => 0, 'errmsg' => '操作成功'];
} else {
return ['errcode' => -1, 'errmsg' => '审核失败'];
return ['errcode' => -1, 'errmsg' => '操作失败'];
}
}
}
......
......@@ -11,12 +11,12 @@
this.bind(2, 1);
},
offline: function() { // 自营线下订单
this.bind(2, 0);
this.lists(user_id, 2, 0);
offline: function(internal_uid) { // 自营线下订单
this.bind(2, 0, internal_uid);
this.lists(internal_uid, 2, 0);
},
bind: function(goods_type, is_online) { //goods_type:1-联营,2-自营 is_online:是否线上订单
bind: function(goods_type, is_online, internal_uid='') { //goods_type:1-联营,2-自营 is_online:是否线上订单
var loading = this;
// 获取用户信息
......@@ -280,9 +280,15 @@
var goods_min_num = $(this).parents('.sku-info').find('.goods-min-num').text();
var goods_id = $(this).siblings('.goods_id').val();
var delivery_place = 1; // 1.大陆,2.香港 自营默认是大陆
var user_id = 0;
if (is_online) { // 线上订单
var user_id = $('.user_id').val();
user_id = $('.user_id').val();
if (!user_id) {
layer.msg('请先选择用户');
return false;
}
if (goods_type == 1) { // 联营需要选择交货地
delivery_place = $('input[name=delivery_place]:checked').val();
......@@ -294,10 +300,7 @@
}
}
if (!user_id) {
layer.msg('请先选择用户');
return false;
}
user_id = internal_uid ? internal_uid : user_id;
var datax = {
uid: user_id,
......@@ -325,11 +328,14 @@
var self = $(this);
var num = self.val();
var cart_id = self.parents('tr').data('cid');
var user_id = 0;
if (is_online) {
var user_id = $('.user_id').val();
user_id = $('.user_id').val();
}
user_id = internal_uid ? internal_uid : user_id;
$.ajax({
type: "POST",
url: '/ajax/changeNum',
......@@ -353,11 +359,14 @@
$('.shop-table').delegate('.remove-goods', 'click', function() {
var self = $(this);
var cart_id = self.parents('tr').data('cid');
var user_id = 0;
if (is_online) {
var user_id = $('.user_id').val();
user_id = $('.user_id').val();
}
user_id = internal_uid ? internal_uid : user_id;
layer.open({
title: '删除提示',
content: '确定删除该商品吗?',
......@@ -412,11 +421,14 @@
var address_id = $('input[name=address_id]').val();
var type = $(this).data('type');
var cart_ids = [];
var user_id = 0;
if (is_online) {
var user_id = $('.user_id').val();
user_id = $('.user_id').val();
}
user_id = internal_uid ? internal_uid : user_id;
$('.shop-table tbody tr').each(function() {
var cid = $(this).data('cid');
cart_ids.push(cid);
......
......@@ -216,9 +216,9 @@
</div>
<script>
var user_id = "{{$internal_uid}}";
var internal_uid = "{{$internal_uid}}";
var sale_id = "{{$sale_id}}";
var URL_api = "{{Config('website.api_domain')}}";
$.lie.add_order.offline();
$.lie.add_order.offline(internal_uid);
</script>
\ No newline at end of file
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