From cc102ff09d069bb64c9d78b5b6943bc926e00a5c Mon Sep 17 00:00:00 2001 From: yanzai Date: Tue, 28 Oct 2025 14:42:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=BA=92=E6=96=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/ComboItemController.php | 16 +++++++++++++++- 北京国康小程序/api/api.js | 2 +- 北京国康小程序/api/index.js | 2 +- 北京国康小程序/pages/buy/items/items.vue | 5 +++++ 北京国康报告对比/api/index.js | 2 +- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/ComboItemController.php b/app/Http/Controllers/ComboItemController.php index 8aca9b2..9ed07c8 100644 --- a/app/Http/Controllers/ComboItemController.php +++ b/app/Http/Controllers/ComboItemController.php @@ -98,6 +98,7 @@ class ComboItemController extends Controller 'clinic' => $item['科室Id'], 'clinic_name' => $item['科室名称'], 'choose' => $item['可选'], + 'beizhu'=> $item['备注'] ]; } return $list; @@ -227,6 +228,7 @@ class ComboItemController extends Controller $price = 0; $original_price = 0; $combo_info = false; + $shuxing=[];//项目属性,用来判断互斥 if (!!$combo) { $combo_info = self::combo_info($hospital, [ '套餐Id' => $combo, @@ -273,7 +275,7 @@ class ComboItemController extends Controller ]); } $item_list_ret = []; - + $has_huchi=false; //如果是团检并且选择了自选 $fenzu=false; if(!!$group and count($items) != 0){ @@ -285,6 +287,17 @@ class ComboItemController extends Controller } foreach ($items_list as $item) { + if($item['beizhu']<>'' and $item['beizhu']<>null and json_decode($item['beizhu'],true) ) { + $beizhu=json_decode($item['beizhu'], true); + $item_fenlei=$beizhu['分类']; + if(!in_array($item_fenlei, $shuxing)){ + $shuxing[]=$item_fenlei; + }else{ + $has_huchi=true; + continue; + } + + } $count++; if($fenzu !==false and isset($fenzu['分组'])){ $item['price']=$item['price']*$fenzu['分组'][0]['增项折扣']; @@ -351,6 +364,7 @@ class ComboItemController extends Controller 'id' => 0, 'date' => date('Y-m-d'), ], + 'has_huchi'=>$has_huchi ]); } diff --git a/北京国康小程序/api/api.js b/北京国康小程序/api/api.js index 7c9478c..84970f8 100644 --- a/北京国康小程序/api/api.js +++ b/北京国康小程序/api/api.js @@ -2,7 +2,7 @@ let url_ = "https://bjgk-api.sixinyun.com"; let report_url_ = "https://bjgk-api.sixinyun.com"; //let report_url_ = "http://192.168.31.106:5173"; let h5_url_ = "https://bjgk-api.sixinyun.com"; -const dev =0; +const dev =1; if (dev === 1) { url_ = "http://beijingguokang"; report_url_ = "http://192.168.31.106:5173"; diff --git a/北京国康小程序/api/index.js b/北京国康小程序/api/index.js index 6b76c97..ec3b0b0 100644 --- a/北京国康小程序/api/index.js +++ b/北京国康小程序/api/index.js @@ -4,7 +4,7 @@ import { import $api from './api.js' let url_ = "https://bjgk-api.sixinyun.com"; let chat_url = "https://bjgk-api.sixinyun.com" -const dev = 0 +const dev = 1 if (dev === 1) { url_ = "http://beijingguokang" chat_url = "http://192.168.31.106:5173" diff --git a/北京国康小程序/pages/buy/items/items.vue b/北京国康小程序/pages/buy/items/items.vue index c90ed8e..977562d 100644 --- a/北京国康小程序/pages/buy/items/items.vue +++ b/北京国康小程序/pages/buy/items/items.vue @@ -26,6 +26,11 @@ const response = await BuyInfoAction($store.buy_info) $response(response, () => { buy_info.value = response.data + if(buy_info.value.has_huchi){ + uni.$lu.toast("该项目与已有项目互斥,禁止勾选") + $store.buy_info.items.splice($store.buy_info.items.length-1, 1) + console.log($store.buy_info.items); + } if (items) BuyItems() }) } diff --git a/北京国康报告对比/api/index.js b/北京国康报告对比/api/index.js index c67d2b9..9559847 100644 --- a/北京国康报告对比/api/index.js +++ b/北京国康报告对比/api/index.js @@ -2,7 +2,7 @@ import { $post } from '@/lu/axios.js' let url_ = "https://bjgk-api.sixinyun.com"; -const dev = 1 +const dev = 0 if (dev === 1) { url_ = "http://beijingguokang" }