Commit 96d6a0e3 by 朱继来

调整导入报价

parent 2dab6b04
Showing with 2 additions and 2 deletions
...@@ -475,12 +475,12 @@ class QuoteModel extends Model ...@@ -475,12 +475,12 @@ class QuoteModel extends Model
array_walk($excel, function($val, $key) use($required, $required_keys, &$err) { array_walk($excel, function($val, $key) use($required, $required_keys, &$err) {
// 跳过第一条 // 跳过第一条
if ($key != 0) { if ($key != 0) {
if ($val['price_origin'] <= 0) { if ($val['currency'] == 'USD' && $val['price_origin'] <= 0) {
$err[] = '第'.($key+1).'行,单价等于或小于0'; $err[] = '第'.($key+1).'行,单价等于或小于0';
return; return;
} }
if (!preg_match('/^\d{0,9}(\.\d{0,6})?$/', $val['price_origin'])) { if ($val['currency'] == 'USD' && !preg_match('/^\d{0,9}(\.\d{0,6})?$/', $val['price_origin'])) {
$err[] = '第'.($key+1).'行,单价格式错误'; $err[] = '第'.($key+1).'行,单价格式错误';
return; return;
} }
......
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