订单详情关联
This commit is contained in:
@@ -181,12 +181,13 @@ class ProductOrderController extends BaseAppController
|
||||
|
||||
// 获取处方来源诊所信息
|
||||
$prescriptionStore = null;
|
||||
if ($prescription && isset($prescription['store_id']) && $prescription['store_id']) {
|
||||
$prescriptionStore = Store::find()->select('id,name,mobile,position')->where(['id' => $prescription['store_id']])->asArray()->one();
|
||||
if ($prescription && $prescription->store_id) {
|
||||
$prescriptionStore = Store::find()->select('id,name,mobile,position')->where(['id' => $prescription->store_id])->asArray()->one();
|
||||
}
|
||||
|
||||
if($prescription && $prescription['wr_ids']){
|
||||
$wr_ids = explode(',', $prescription['wr_ids']);
|
||||
$count = 0;
|
||||
if($prescription && $prescription->wr_ids){
|
||||
$wr_ids = explode(',', $prescription->wr_ids);
|
||||
if ($ProductOrder['prescription_type'] == 5) {
|
||||
$west = ServicePackageRepice::find()->select('content,number,total_price')->where([
|
||||
'in', 'id', $wr_ids
|
||||
@@ -200,8 +201,8 @@ class ProductOrderController extends BaseAppController
|
||||
$value['content']=Json::decode($value['content']);
|
||||
}
|
||||
$count = count($west);
|
||||
}else if($prescription && $prescription['cr_ids']){
|
||||
$cr_ids = explode(',', $prescription['cr_ids']);
|
||||
}else if($prescription && $prescription->cr_ids){
|
||||
$cr_ids = explode(',', $prescription->cr_ids);
|
||||
$chinese = ChineseRepice::find()->select('content,total_price')->where([
|
||||
'in', 'id', $cr_ids
|
||||
])->all();
|
||||
@@ -212,8 +213,8 @@ class ProductOrderController extends BaseAppController
|
||||
}
|
||||
}
|
||||
$count = count($chinese['list']);
|
||||
}else{
|
||||
$gr_ids = explode(',', $prescription['gr_ids']);
|
||||
}else if($prescription && $prescription->gr_ids){
|
||||
$gr_ids = explode(',', $prescription->gr_ids);
|
||||
$granular = GranularRepice::find()->select('content,total_price')->where([
|
||||
'in', 'id', $gr_ids
|
||||
])->all();
|
||||
@@ -226,7 +227,7 @@ class ProductOrderController extends BaseAppController
|
||||
$count = count($granular['list']);
|
||||
}
|
||||
if ($ProductOrder['p_id'] !== 0 && $ProductOrder['order_type'] !== 2) {
|
||||
if ($prescription && isset($prescription['category']) && $prescription['category'] === 2) {
|
||||
if ($prescription && $prescription->category === 2) {
|
||||
$ProductOrder['total_pay_price'] = $ProductOrder['trans_expenses'];
|
||||
$ProductOrder['items_price'] = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user