Commit b059eabd by 朱继来

下单修改询报价状态

parent 53b6b3af
......@@ -711,12 +711,24 @@ Class AddOrderController extends Controller
// dd(curlApi($url, $data));
$response = json_decode(curlApi($url, $data), true);
if ($response['err_code'] == 0) {
return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg'], 'data'=>['order_id' => $response['data'], 'type' => $data['type']]];
if ($response['err_code'] != 0) return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg']];
// 若存在销售报价明细ID,则修改对应报价单状态为已成单
$report_ids = $request->input('report_ids', '');
if ($report_ids) {
$ids = explode(',', $report_ids);
foreach ($ids as $v) {
$quote_id = DB::connection('frq')->table('inquiry_items_report')->where('id', $v)->value('quote_id');
if (!$quote_id) continue;
DB::connection('frq')->table('quote')->where('id', $quote_id)->update(['status'=>4, 'update_time'=>time()]);
}
}
return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg']];
return ['errcode'=>$response['err_code'], 'errmsg'=>$response['err_msg'], 'data'=>['order_id'=>$response['data'], 'type'=>$data['type']]];
}
}
......
......@@ -759,6 +759,7 @@ layui.config({
remark: remark,
user_coupon_id: user_coupon_id,
cart_ids: cart_ids,
report_ids: report_ids, // 询价明细ID
}
// if (is_dgk) { // 联营包含digikey商品,则填写终端资料
......@@ -875,7 +876,7 @@ layui.config({
,{field: 'goods_price', title: '采购单价', edit: 'text', style: 'cursor: pointer;'}
,{field: 'goods_amount_format', title: '小计'}
,{field: 'delivery_time', title: '货期', edit: 'text', style: 'cursor: pointer;'}
,{field: 'buyer_id', title: '采购员', templet: '#t_buyer_id', style: 'overflow: visible;'}
,{field: 'buyer_id', title: '采购员', templet: '#t_buyer_id'}
,{field: 'batch', title: '批次', edit: 'text', style: 'cursor: pointer;'}
,{title: '操作', align:'center', fixed: 'right', toolbar: '#list_action', width: 80}
]]
......
......@@ -96,7 +96,7 @@
<style>
.carts-info{ display: none; }
.carts-info .laytable-cell-1-0-9{ overflow: visible; } /* 指定采购列 */
.carts-info .layui-table-cell{ overflow: visible; }
</style>
<!-- 商品列表 -->
<div class="carts-info">
......
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