Commit 3f9cf170 by hcy001
parents d009d051 ef73785f
Showing with 15 additions and 1 deletions
......@@ -309,6 +309,12 @@ class QuoteModel extends Model
$inquiry_items_status = InquiryItemsModel::where('id', $quote_info['inquiry_items_id'])->value('status');
if ($inquiry_items_status == -1) return [1, '新增报价失败,该询价明细已关闭'];
$brand = json_decode($quote_info['brand_s'], true);
$quote_info['brand_id'] = $brand[0]['brand_id'];
$quote_info['brand_name'] = $brand[0]['brand_name'];
unset($quote_info['brand_s']);
$params = [];
$params['spu_name'] = strtoupper($quote_info['goods_name']);
$params['brand_name'] = $quote_info['brand_name'];
......@@ -581,7 +587,15 @@ class QuoteModel extends Model
if (!$input['quote_id']) return [-1, '参数缺失'];
try {
$this->where('id', $input['quote_id'])->update($input['quote_info']);
$quote_info = $input['quote_info'];
$brand = json_decode($quote_info['brand_s'], true);
$quote_info['brand_id'] = $brand[0]['brand_id'];
$quote_info['brand_name'] = $brand[0]['brand_name'];
unset($quote_info['brand_s']);
$this->where('id', $input['quote_id'])->update($quote_info);
$data = [];
$data['types'] = 2;
......
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