Commit beed910b by 朱继来

修改询价

parent 406b9c35
...@@ -238,6 +238,10 @@ class InquiryItemsModel extends Model ...@@ -238,6 +238,10 @@ class InquiryItemsModel extends Model
"update_time"=>time() , "update_time"=>time() ,
]; ];
if (isset($b['not_quote']) && $b['not_quote'] == 'on') {
$insertArr['status'] = -2; // 无需报价
}
$inquiryItemsId = $this->insertGetId($insertArr); $inquiryItemsId = $this->insertGetId($insertArr);
#插入销售报价表 #插入销售报价表
...@@ -324,6 +328,9 @@ class InquiryItemsModel extends Model ...@@ -324,6 +328,9 @@ class InquiryItemsModel extends Model
"create_time"=>time() , "create_time"=>time() ,
"update_time"=>time() , "update_time"=>time() ,
]; ];
$updateArr['status'] = isset($b['not_quote']) && $b['not_quote'] == 'on' ? -2 : 1; // 无需报价没勾选,则默认为待报价
$this->where("id",$inquiry_items_id)->update($updateArr); $this->where("id",$inquiry_items_id)->update($updateArr);
#清空指定人 #清空指定人
......
...@@ -295,12 +295,12 @@ class InquiryModel extends Model ...@@ -295,12 +295,12 @@ class InquiryModel extends Model
/** /**
* 询价池展示条件: * 询价池展示条件:
* 1. 询价单启用状态; * 1. 询价单启用状态;
* 2. 询价明细需过滤已关闭、已确认和被指定的类型 * 2. 询价明细需过滤无需报价、已关闭、已确认和被指定的类型
* 3. 询价明细分配表需过滤当前用户或不存在的(未指定或领取的) * 3. 询价明细分配表需过滤当前用户或不存在的(未指定或领取的)
*/ */
if ($type == 1) { if ($type == 1) {
$query->where('a.status', 1) $query->where('a.status', 1)
->whereNotIn('b.status', [-1, 5]) ->whereNotIn('b.status', [-2, -1, 5])
->where('b.assign_type', 2) ->where('b.assign_type', 2)
->whereRaw('(lie_c.assign_uid != '.$user_id.' or lie_c.assign_uid is NULL)'); ->whereRaw('(lie_c.assign_uid != '.$user_id.' or lie_c.assign_uid is NULL)');
......
...@@ -3,7 +3,8 @@ namespace App\map; ...@@ -3,7 +3,8 @@ namespace App\map;
//询价枚举 //询价枚举
class InquiryMap{ class InquiryMap{
//状态 -1:已关闭 1:待报价 2:已报价 3:已选中 4:已领取 5:已确认 //状态 -2:无需报价 -1:已关闭 1:待报价 2:已报价 3:已选中 4:已领取 5:已确认
const status_not_quote = -2;
const status_close = -1; const status_close = -1;
const status_ready = 1; const status_ready = 1;
const status_replay = 2; const status_replay = 2;
...@@ -11,6 +12,7 @@ class InquiryMap{ ...@@ -11,6 +12,7 @@ class InquiryMap{
const status_fix = 4; const status_fix = 4;
const status_sure = 5; const status_sure = 5;
static $status =[ static $status =[
self::status_not_quote => "无需报价",
self::status_close => "已关闭", self::status_close => "已关闭",
self::status_ready => "待报价", self::status_ready => "待报价",
self::status_replay => "已报价", self::status_replay => "已报价",
......
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