门店查询逻辑

This commit is contained in:
李琦
2026-01-26 15:37:53 +08:00
parent 0f51b369f4
commit 1ed7173915

View File

@@ -150,7 +150,7 @@ class ProductOrderController extends BaseAppController
$this->requestValidate($post, [
['prescription_id', 'required']
]);
$ProductOrder = ProductOrder::find()->select('id,order_no,su_id,p_id,user_id,is_pay,prescription_type,address_id,address,decoct_price,order_type,items_price,process_price,treatement_price,total_pay_price,pay_method,trans_expenses,created_at,received_time,cancel_status,refund_status,status')->where([
$ProductOrder = ProductOrder::find()->select('id,order_no,is_online,su_id,p_id,user_id,is_pay,prescription_type,address_id,address,decoct_price,order_type,items_price,process_price,treatement_price,total_pay_price,pay_method,trans_expenses,created_at,received_time,cancel_status,refund_status,status')->where([
'p_id' => $post['prescription_id'],
'user_id' => \Yii::$app->user->identity->getId(),
// 'store_id' => $post['store_id']
@@ -358,6 +358,9 @@ class ProductOrderController extends BaseAppController
} else { //门店自提
if(!$ProductOrder->delivery_method){
if ($ProductOrder->is_online != 0) {
throw new Exception('在线复诊订单不支持药店自提请选择收货地址');
}
$ProductOrder->address_id = 0;
$ProductOrder->address = '';
$ProductOrder->express_name = '';