Commit a683010f by allen

Merge branch 'master' of ssh://119.23.72.7:22611/zhujilai/Order into lt_订单周迭代3.09

parents 8cc80fd3 c38278c0
......@@ -171,7 +171,7 @@ function getGoodsName($goods_id)
}
// 获取订单来源
function getOrderSource($order_id, $order_type=1)
function getOrderSource($order_id, $order_type=1, $order_goods_type=1)
{
if ($order_type == 1) {
$order = DB::connection('order')->table('lie_order_extend')->where('order_id', $order_id)->select('order_type')->first();
......@@ -203,7 +203,7 @@ function getOrderSource($order_id, $order_type=1)
} else if ($order_type == 3) {
return '京东';
} else if ($order_type == 4) {
return '象牙宝';
return $order_goods_type == 1 ? '开放平台' : '象牙宝';
}
return false;
......@@ -483,7 +483,7 @@ Class OrderController extends Controller
$size = 10;
if ($tid == 1) {
$map['order_type_filter'] = in_array($info['role'], [1, 13]) ? [1, 2, 3] : [1]; // 管理员和尽调账号可以查看平台、ERP、京东订单
$map['order_type_filter'] = in_array($info['role'], [1, 13]) ? [1, 2, 3, 4] : [1, 4]; // 管理员和尽调账号可以查看平台、ERP、京东订单
} else if ($tid == 2) {
$size = 20;
$map['order_type_filter'] = [1, 3, 4]; // 1.网站 3.京东 4.象牙宝
......
......@@ -365,7 +365,7 @@ class OrderModel extends Model
$tmp[$i]['create_time_date'] = date('Y-m-d', $order[$i]['create_time']);
$tmp[$i]['create_time_sec'] = date('H:i:s', $order[$i]['create_time']);
$tmp[$i]['com_name'] = !empty($order[$i]['tax_title']) ? $order[$i]['tax_title'] : $current_com_name;
$tmp[$i]['items_source'] = $this->getOrderSource($order[$i]['order_id'], $order[$i]['order_type'], $order[$i]['extend_order_type'], $order[$i]['order_source']);
$tmp[$i]['items_source'] = $this->getOrderSource($order[$i]['order_id'], $order[$i]['order_type'], $order[$i]['order_goods_type'], $order[$i]['extend_order_type'], $order[$i]['order_source']);
$tmp[$i]['goods_id'] = $order[$i]['goods_id'];
......@@ -448,12 +448,10 @@ class OrderModel extends Model
$tmp[$i]['self_supplier_type'] = $self_supplier_type[$order[$i]['self_supplier_type']]; // 自采标记
$tmp[$i]['sample_demand_desc'] = $order[$i]['sample_demand_desc']; // 样片项目需求描述
//收货地址的电话
$tmp[$i]['receiving_address'] = isset($current_order_addr['address_mobile']) ? $current_order_addr['address_mobile'] : '';
$tmp[$i]['receiving_address'] = isset($current_order_addr['mobile']) ? $current_order_addr['mobile'] : '';
} else {
$tmp[$i]['is_new_order'] = $order[$i]['is_new_order'] == 1 ? '是' : '否'; // 是否为新订单
}
unset($sales);
}
}
return $tmp;
......@@ -539,7 +537,7 @@ class OrderModel extends Model
}
// 获取订单来源
public function getOrderSource($order_id, $order_type=1, $extend_order_type=0, $order_source='')
public function getOrderSource($order_id, $order_type=1, $order_goods_type=1, $extend_order_type=0, $order_source='')
{
if ($order_type == 1) {
if ($extend_order_type) return '后台';
......@@ -560,7 +558,7 @@ class OrderModel extends Model
} else if ($order_type == 3) {
return '京东';
} else if ($order_type == 4) {
return '象牙宝';
return $order_goods_type == 1 ? '开放平台' : '象牙宝';
}
return false;
......
......@@ -187,6 +187,7 @@
<option value="4">京东</option>
<option value="5">ERP</option>
<option value="6">小程序</option>
<option value="7">开放平台</option>
</select>
</dd>
</dl>
......
......@@ -298,7 +298,7 @@
<td class="show-list"><?php print_r(App\Http\Controllers\getSalesName($v['sale_id'])); ?></td>
<td class="show-list"><?php echo App\Http\Controllers\getOrderSource($v['order_id'], $v['order_type']); ?></td>
<td class="show-list"><?php echo App\Http\Controllers\getOrderSource($v['order_id'], $v['order_type'], 2); ?></td>
<td class="show-list" class="show-list">
<?php
......
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