Commit f2e86f74 by 杜文军

撤销报价取消

parent e0ec3925
Showing with 4 additions and 6 deletions
...@@ -208,7 +208,7 @@ class QuoteModel extends Model ...@@ -208,7 +208,7 @@ class QuoteModel extends Model
$map['create_uid'] = isset($input['create_uid']) ? $input['create_uid'] : ''; // 报价制单人 $map['create_uid'] = isset($input['create_uid']) ? $input['create_uid'] : ''; // 报价制单人
if ($type == 1) { if ($type == 1) {
$list = $list->where('q.create_uid', $input['user_id'])->where('q.status', '<>', 0); // 过滤报价草稿 $list = $list->where('q.create_uid', $input['user_id'])->whereNotIn('q.status', [0, -1]); // 过滤报价草稿
} else { } else {
if ($type == 2) { if ($type == 2) {
$perm = new PermController; $perm = new PermController;
...@@ -219,13 +219,13 @@ class QuoteModel extends Model ...@@ -219,13 +219,13 @@ class QuoteModel extends Model
$list = $list->whereIn('q.create_uid', $sub_sale_ids); $list = $list->whereIn('q.create_uid', $sub_sale_ids);
} }
$list = $list->where('q.status', '<>', 0); // 过滤报价草稿 $list = $list->whereNotIn('q.status', [0, -1]); // 过滤报价草稿
} elseif (@$input['inquiry_items_id'] > 0) { } elseif (@$input['inquiry_items_id'] > 0) {
$list = $list->where('q.status', 0)->where('q.inquiry_items_id', $input['inquiry_items_id']); $list = $list->whereNotIn('q.status', [0, -1])->where('q.inquiry_items_id', $input['inquiry_items_id']);
} elseif (isset($input['inquiry_items_ids']) && $input['inquiry_items_ids']) { } elseif (isset($input['inquiry_items_ids']) && $input['inquiry_items_ids']) {
$inquiry_items_ids = explode(",", $input['inquiry_items_ids']); $inquiry_items_ids = explode(",", $input['inquiry_items_ids']);
$inquiry_items_ids = array_values(array_filter($inquiry_items_ids)); $inquiry_items_ids = array_values(array_filter($inquiry_items_ids));
$list = $list->where('q.status', 0)->whereIn('q.inquiry_items_id', $inquiry_items_ids); $list = $list->whereNotIn('q.status', [0, -1])->whereIn('q.inquiry_items_id', $inquiry_items_ids);
} }
} }
...@@ -511,7 +511,6 @@ class QuoteModel extends Model ...@@ -511,7 +511,6 @@ class QuoteModel extends Model
public function add($input) public function add($input)
{ {
$quote_info = $input['quote_info']; $quote_info = $input['quote_info'];
if (!$quote_info) { if (!$quote_info) {
return [1, '报价数据不存在']; return [1, '报价数据不存在'];
} }
......
<?php <?php
return [ return [
'quote_status' => [ // 报价状态 'quote_status' => [ // 报价状态
-1 => '已撤销',
0 => '草稿', 0 => '草稿',
1 => '已报价', 1 => '已报价',
2 => '已选中', 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