退款必须选原因、号源bug

main
yanzai 9 months ago
parent d69ba1b4eb
commit 333ee0e33e

@ -101,6 +101,7 @@ class PlanController extends Controller
$person_id=request('person_id'); $person_id=request('person_id');
$person_sex=request('person_sex'); $person_sex=request('person_sex');
$combo_id=request('combo_id'); $combo_id=request('combo_id');
$item_ids=request('item_ids');
$date=request('date'); $date=request('date');
$use_type=request('use_type');//使用类型 1个检 2团检 $use_type=request('use_type');//使用类型 1个检 2团检
$checkup_type_id=(string)request('checkup_type_id');//体检类型表对应id $checkup_type_id=(string)request('checkup_type_id');//体检类型表对应id
@ -126,6 +127,10 @@ class PlanController extends Controller
} }
$comboItemsNmr=DB::table('combo_items')->where(['combo_id'=>$combo_id])->where('name', 'like', '%磁%')->get(); $comboItemsNmr=DB::table('combo_items')->where(['combo_id'=>$combo_id])->where('name', 'like', '%磁%')->get();
} }
$ItemsNmr=[];//自选核磁项目
if(isset($item_ids) and !empty($item_ids)){
$ItemsNmr=DB::table('items')->whereIn('item_id',$item_ids)->where('name', 'like', '%磁%')->get();
}
if(!!$personInfo){ if(!!$personInfo){
$list=$list->whereIn('sex',[0,$personInfo->sex]); $list=$list->whereIn('sex',[0,$personInfo->sex]);
} }
@ -144,7 +149,7 @@ class PlanController extends Controller
}); });
} }
$list=$list->orderBy('time','asc')->get(); $list=$list->orderBy('time','asc')->get();
if(count($comboItemsNmr)>0){ if(count($comboItemsNmr)>0 or count($ItemsNmr)>0){
//如果有核磁项目11点往后的号源不可用 //如果有核磁项目11点往后的号源不可用
foreach ($list as $key=>$item) { foreach ($list as $key=>$item) {
if($item->time > '11:00:00' and $item->time <= '12:00:00'){ if($item->time > '11:00:00' and $item->time <= '12:00:00'){

@ -155,7 +155,13 @@
} }
} }
const tuikuan=async(id)=>{ const tuikuan=async(id)=>{
console.log(tuikuan_yuanyin.value) if(tuikuan_yuanyin.value==null || tuikuan_yuanyin.value=='' ){
uni.showToast({
icon:"none",
title: "请选择退款原因",
});
return false
}
uni.showLoading(); uni.showLoading();
const response = await $api("Refund", { const response = await $api("Refund", {
openid: localStorage.getItem("OPENID"), openid: localStorage.getItem("OPENID"),

@ -100,6 +100,7 @@
let person_name = ref('') let person_name = ref('')
let combo_name = ref('') let combo_name = ref('')
let combo_id=ref(null); let combo_id=ref(null);
let item_ids=ref([]);
const getBuyInfoFuc = async () => { const getBuyInfoFuc = async () => {
// //
@ -136,7 +137,8 @@
use_type: use_type.value, use_type: use_type.value,
checkup_type_id: checkup_type_id.value, checkup_type_id: checkup_type_id.value,
amount: amount.value, amount: amount.value,
combo_id:combo_id.value combo_id:combo_id.value,
item_ids:item_ids.value
} }
const response = await $api("GetDayPlanList", data); const response = await $api("GetDayPlanList", data);
uni.hideLoading(); uni.hideLoading();
@ -166,6 +168,7 @@
NmrInfo: {} NmrInfo: {}
}) })
const GetOrderInfo = async () => { const GetOrderInfo = async () => {
item_ids.value=[];
uni.showLoading(); uni.showLoading();
const response = await $api("GetOrderDetail", { const response = await $api("GetOrderDetail", {
id: OrderId.value id: OrderId.value
@ -176,8 +179,8 @@
doctor_name.value = orderInfo.value.doctor doctor_name.value = orderInfo.value.doctor
itemSelected.value.type = 'tj' itemSelected.value.type = 'tj'
selectedTime.value = orderInfo.value.appointment_time // selectedTime.value = orderInfo.value.appointment_time
selectedDate.value = orderInfo.value.appointment_date // selectedDate.value = orderInfo.value.appointment_date
@ -194,6 +197,12 @@
person_name.value = orderInfo.value.name person_name.value = orderInfo.value.name
combo_name.value = orderInfo.value.title combo_name.value = orderInfo.value.title
combo_id.value=orderInfo.value.combo_id combo_id.value=orderInfo.value.combo_id
if(orderInfo.value.buy_info?.items){
orderInfo.value.buy_info.items.forEach((v,i)=>{
item_ids.value.push(v.id)
})
}
GetDayPlanListFunc() GetDayPlanListFunc()
}); });
@ -541,8 +550,10 @@
// //
temp = $store.getYytjInfo() temp = $store.getYytjInfo()
temp.doctor_name = "" temp.doctor_name = ""
temp.doctor_date = ""
$store.setYytjInfo(temp) $store.setYytjInfo(temp)
selectedDate.value = GetToday() selectedDate.value = GetToday()
console.log(selectedDate.value)
tj_date.value = GetToday() tj_date.value = GetToday()
if (OrderId.value) { if (OrderId.value) {
GetOrderInfo() GetOrderInfo()
@ -575,7 +586,13 @@
if (temp.doctor_name != null && temp.doctor_name != '') { if (temp.doctor_name != null && temp.doctor_name != '') {
doctor_name.value = temp.doctor_name doctor_name.value = temp.doctor_name
} }
if (temp.doctor_date != null && temp.doctor_date != '') {
selectedDate.value = temp.doctor_date
GetDayPlanListFunc()
}
}) })
const GetToday = () => { const GetToday = () => {
const date = new Date(); const date = new Date();

Loading…
Cancel
Save