Commit 65782a1e by 赵增煜

Merge branch 'develop' of http://git.imohe.com/zhaozengyu/tzt-admin into develop

parents 3bde6d9e fdf71c62
......@@ -183,7 +183,7 @@ public function drugLimit(Request $request)
}
$buyedCount = $drugCounts[$drug['drug_id']] ?? 0; // 历史已购买数量
$canBuyCount = $drug['limit_num'] - $buyedCount; // 普通药品剩余可购买数量
if ($canBuyCount <= 0) {
if ($canBuyCount < $drug['num']) {
$errMsg = '药品['.$drugModel->name.']剩余购买数量不足~';
return $this->failed($errMsg, ['add_status' => false]);
......
......@@ -448,7 +448,7 @@ public function enter(Request $request)
// 用药信息 中药:[['pharmacy_drug_id'=>2,'unit'=>'盒','num'=>1]]
$drug_info = [];
foreach ($drugs as $drug) {
if( intval($drug['num']) <= 0 ){
if (intval($drug['num']) <= 0) {
return $this->failed('请输入正确的中药数量!');
}
$pharmacyDrugQueryInfo = PharmacyDrugModel::with(['drug', 'dosage'])->find($drug['pharmacy_drug_id']);
......
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