|
@@ -897,11 +897,13 @@ class OrderController extends BaseController
|
|
|
util::fail('请选择客户');
|
|
util::fail('请选择客户');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $actPrice = $post['actPrice'] ?? 0;
|
|
|
|
|
|
|
+ $modifyPrice = $post['modifyPrice'] ?? 0;
|
|
|
$pattern = '/^\d+(\.\d{1,2})?$/';
|
|
$pattern = '/^\d+(\.\d{1,2})?$/';
|
|
|
- if (preg_match($pattern, $actPrice) == false) {
|
|
|
|
|
- //容错前端
|
|
|
|
|
- util::fail('金额不能超2位小数');
|
|
|
|
|
|
|
+ if ($modifyPrice > 0) {
|
|
|
|
|
+ if (preg_match($pattern, $modifyPrice) == false) {
|
|
|
|
|
+ //容错前端
|
|
|
|
|
+ util::fail('金额不能超2位小数');
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$custom = CustomClass::getCustom($customId);
|
|
$custom = CustomClass::getCustom($customId);
|