Commit 40bf4461 by 朱继来

调整下单购物车采购员字段

parent 7913c973
...@@ -452,11 +452,19 @@ Class AddOrderController extends Controller ...@@ -452,11 +452,19 @@ Class AddOrderController extends Controller
return ['code'=>$response['err_code'], 'msg'=>$response['err_msg'], 'data'=>$data, 'count'=>count($data)]; return ['code'=>$response['err_code'], 'msg'=>$response['err_msg'], 'data'=>$data, 'count'=>count($data)];
} }
if ($response['err_code'] == 0) { if ($response['err_code'] != 0) return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg']];
return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg'], 'data'=>$response['data']];
$CmsModel = new CmsModel();
foreach ($response['data']['list'] as &$v) {
$v['buyer_name'] = '';
if ($v['buyer_id']) {
$v['buyer_name'] = $CmsModel->getUserName($v['buyer_id']);
}
} }
return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg']]; return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg'], 'data'=>$response['data']];
} }
} }
......
...@@ -1015,7 +1015,7 @@ ...@@ -1015,7 +1015,7 @@
if (len == 0) return false; if (len == 0) return false;
var buyer = ''; // var buyer = '';
// list = list.reverse(); // list = list.reverse();
// 购物车列表 // 购物车列表
for (var i = len - 1 ; i >= 0; i--) { for (var i = len - 1 ; i >= 0; i--) {
...@@ -1048,9 +1048,9 @@ ...@@ -1048,9 +1048,9 @@
if (goods_type == 1) { if (goods_type == 1) {
html += '<td>'+list[i].supplier_name+'</td>'; html += '<td>'+list[i].supplier_name+'</td>';
buyer = list[i].buyer_id != '0' ? list[i].buyer_id : ''; // buyer = list[i].buyer_id != '0' ? list[i].buyer_id : '';
html += '<td>'+buyer+'</td>'; html += '<td>'+list[i].buyer_name+'</td>';
html += '<td>'+list[i].batch+'</td>'; html += '<td>'+list[i].batch+'</td>';
} }
......
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