调整细节,调转 报告解读

wenjuan
yanzai 1 year ago
parent 7be8b26dab
commit efca93d403

@ -200,7 +200,7 @@ select combo_id as c_id,count(*) as count from orders where status in(2,4) group
$group_id = request('group_id'); //团检登记id $group_id = request('group_id'); //团检登记id
if (!isset($hospital_id)) return \Yz::echoError1("医院id不能为空"); if (!isset($hospital_id)) return \Yz::echoError1("医院id不能为空");
$hospital = DB::table('hospitals')->where(['id' => 1, 'status' => 1, 'is_del' => 0])->first(); $hospital = DB::table('hospitals')->where(['id' => 1, 'status' => 1, 'is_del' => 0])->first();
$combo_info = [];//套餐信息 $combo_info = false;//套餐信息
$pay_item_count = 0;//需自费项目个数 $pay_item_count = 0;//需自费项目个数
$all_original_price = 0; $all_original_price = 0;
$true_price = 0; $true_price = 0;
@ -254,7 +254,7 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
$pay_item_count += $combo->item_count; $pay_item_count += $combo->item_count;
$true_price += $combo_info['price']; $true_price += $combo_info['price'];
} }
$items_info = [];//自选项目信息 $items_info = false;//自选项目信息
if (isset($item_ids) and !empty($item_ids)) { if (isset($item_ids) and !empty($item_ids)) {
$price = 0; $price = 0;
$items_original_price = 0; $items_original_price = 0;
@ -350,13 +350,13 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
'group_info' => $group_info, 'group_info' => $group_info,
'combo_info' => $combo_info, 'combo_info' => $combo_info,
'items_info' => $items_info, 'items_info' => $items_info,
'integral_money' => $integral_money, 'integral_money' => number_format($integral_money, 2, '.', ''),
'save_money' => $save_money, 'save_money' =>number_format($save_money, 2, '.', ''),
'coupon_money' => $coupon_money, 'coupon_money' => number_format($coupon_money, 2, '.', ''),
'true_price' => $true_price,//需要用户支付的金的 'true_price' =>number_format($true_price, 2, '.', ''),//需要用户支付的金的
'original_price' => $all_original_price,//总原价 'original_price' =>number_format($all_original_price, 2, '.', '') ,//总原价
'pay_item_count' => $pay_item_count,//需要付费的项目数量 'pay_item_count' => $pay_item_count,//需要付费的项目数量
'lose_price'=>$lose_price,//剩余的不用就会浪费的金额 'lose_price'=>number_format($lose_price, 2, '.', ''),//剩余的不用就会浪费的金额
'nmr_list' => [[ 'nmr_list' => [[
'item_id' => "1", 'item_id' => "1",
"name" => "磁共振平扫(腰椎)" "name" => "磁共振平扫(腰椎)"

@ -58,9 +58,9 @@ class HomeController extends Controller
'jump' => '/pages/main/cjwt/cjwt', 'jump' => '/pages/main/cjwt/cjwt',
'icon' => '/assets/h5/changjianwenti.png' 'icon' => '/assets/h5/changjianwenti.png'
], [ ], [
'message' => '暂未开放', 'message' => '',
'name' => '预检咨询', 'name' => '预检咨询',
'jump' => '/pages/main/cjwt/cjwt', 'jump' => 'XCX/pages/other/entry/index?path=/pages/outpatient/doctor-appointment/index&scene=1035&hospitalAreaId=6&departmentCode=A0030077&subDepartmentCode=4773794195699464904',
'icon' => '/assets/h5/changjianwenti.png' 'icon' => '/assets/h5/changjianwenti.png'
], [ ], [
'message' => '暂未开放', 'message' => '暂未开放',

@ -102,6 +102,7 @@ class OrderController extends Controller
$group_id = request('group_id');//团检id $group_id = request('group_id');//团检id
$item_ids = request('item_ids');//自选item的ids $item_ids = request('item_ids');//自选item的ids
$plan_id = request('plan_id');//号源id $plan_id = request('plan_id');//号源id
$plan_nmr_id = request('plan_nmr_id');//核磁号源id
if (!isset($hospital_id)) return \Yz::echoError1('医院id不能为空'); if (!isset($hospital_id)) return \Yz::echoError1('医院id不能为空');
if (!isset($openid)) return \Yz::echoError1('openid不能为空'); if (!isset($openid)) return \Yz::echoError1('openid不能为空');
@ -294,7 +295,7 @@ class OrderController extends Controller
//如果是免费的,直接去预约 //如果是免费的,直接去预约
$yuyue= self::Finish($order_num); $yuyue= self::Finish($order_num);
if($yuyue['status']===true){ if($yuyue['status']===true){
return \Yz::return(true, "操作成功", ['action' => $action]); return \Yz::return(true, "操作成功", ['action' => $action,'orderid'=>$insert]);
}else{ }else{
return \Yz::echoError1($yuyue['msg']); return \Yz::echoError1($yuyue['msg']);
} }
@ -303,7 +304,7 @@ class OrderController extends Controller
//如果大于0则提示前端去支付 //如果大于0则提示前端去支付
$action="pay"; $action="pay";
} }
return \Yz::return(true, "操作成功", ['action' => $action]); return \Yz::return(true, "操作成功", ['action' => $action,'orderid'=>$insert]);
} else { } else {
DB::rollBack(); DB::rollBack();
return \Yz::echoError1('操作失败'); return \Yz::echoError1('操作失败');

@ -145,6 +145,16 @@ class UserController extends Controller
'birthday' => '1990-01-01', 'birthday' => '1990-01-01',
'patientType' => '1', 'patientType' => '1',
'marriage' => '1', 'marriage' => '1',
],
[
'ghzid' => 'ghz22555',
'idNumber'=>'411329199901052356',
'name' => '信息科1',
'phone' => '222222222',
'sex' => '1',
'birthday' => '1990-01-01',
'patientType' => '1',
'marriage' => '1',
] ]
]; ];
} }

@ -37,7 +37,12 @@
if ('message' in info && !!info.message) { if ('message' in info && !!info.message) {
uni.$lu.toast(info.message) uni.$lu.toast(info.message)
} else { } else {
if (info.jump.indexOf('http') !== -1) { if (info.jump.indexOf('XCX') !== -1) {
let url =info.jump.slice(3)
wx.miniProgram.navigateTo({
url: url
})
}else (info.jump.indexOf('http') !== -1) {
window.location.href = info.jump window.location.href = info.jump
} else { } else {
if (switch_arr.includes(info.jump)) { if (switch_arr.includes(info.jump)) {
@ -255,7 +260,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="botm_blank_wrapper"></view> <view class="botm_blank_wrapper" style="font-size: 18rpx;color: #ccc;">09261052</view>
</view> </view>
</view> </view>
</template> </template>

@ -30,6 +30,9 @@
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}); });
uni.redirectTo({
url: '/pages/main/order/order'
});
} }
}) })
} }

@ -7,7 +7,8 @@
import { import {
ref, ref,
computed, computed,
nextTick nextTick,
provide
} from 'vue' } from 'vue'
import { import {
$api, $api,
@ -88,6 +89,11 @@
status_active.value = status status_active.value = status
}) })
} }
provide('ReLoadOrderList', (value) => {
if(value=="orderUpdate"){
getOrderList()
}
});
onShow(() => { onShow(() => {
if (!!config_ref.value) { if (!!config_ref.value) {

@ -6,7 +6,8 @@
*/ */
import { import {
ref, ref,
onMounted onMounted,
inject
} from 'vue' } from 'vue'
import { import {
$api, $api,
@ -15,7 +16,7 @@
import { import {
onShow onShow
} from '@dcloudio/uni-app' } from '@dcloudio/uni-app'
import wx from 'weixin-js-sdk' import wx from 'weixin-js-sdk'
const $props = defineProps({ const $props = defineProps({
info: { info: {
type: Object, type: Object,
@ -52,24 +53,45 @@ import wx from 'weixin-js-sdk'
order_info.value.status = 3 order_info.value.status = 3
} }
} }
const StartPay=async(id)=>{// const StartPay = async (id) => { //
uni.showLoading() uni.showLoading()
const response = await $api('StartPay' ,{ const response = await $api('StartPay', {
openid: localStorage.getItem('OPENID'), openid: localStorage.getItem('OPENID'),
id: id, id: id,
}) })
uni.hideLoading() uni.hideLoading()
$response(response, () => { $response(response, () => {
if(response.status){ if (response.status) {
let info=response.data.info let info = response.data.info
let p='&appid='+info.appid+'&sub_org_code='+info.sub_org_code+'&ghzid='+info.ghzid+'&orderid='+info.orderid+'&order_desc='+info.order_desc+'&amount='+info.amount+'&notify_url='+info.notify_url+'&timestamp='+info.timestamp+'&nonce='+info.nonce+'&signature='+info.signature; let p = '&appid=' + info.appid + '&sub_org_code=' + info.sub_org_code + '&ghzid=' + info
.ghzid + '&orderid=' + info.orderid + '&order_desc=' + info.order_desc + '&amount=' +
info.amount + '&notify_url=' + info.notify_url + '&timestamp=' + info.timestamp +
'&nonce=' + info.nonce + '&signature=' + info.signature;
console.log(p); console.log(p);
wx.miniProgram.navigateTo({ wx.miniProgram.navigateTo({
url: '/pages/other/entry/index?path=/pages/physical-examination/payment/index'+p url: '/pages/other/entry/index?path=/pages/physical-examination/payment/index' +
p
}) })
} }
}) })
} }
const ReLoadOrderList = inject('ReLoadOrderList');
const Refound = async (id) => {
uni.showLoading()
const response = await $api('Refund', {
openid: localStorage.getItem('OPENID'),
id: id,
})
uni.hideLoading()
$response(response, () => {
if (response.status) {
uni.showToast({
title: '退款完成'
});
ReLoadOrderList("orderUpdate");
}
})
}
onMounted(() => { onMounted(() => {
deepInfo() deepInfo()
@ -136,9 +158,12 @@ import wx from 'weixin-js-sdk'
</view> </view>
</view> </view>
<view class="order_pay_button_wrapper"> <view class="order_pay_button_wrapper">
<view v-if="[1].includes(order_info.status)" @click="StartPay(order_info.id)" class="button_item_wrapper pay_button_wrapper"></view> <view v-if="[1].includes(order_info.status)" @click="StartPay(order_info.id)"
<view v-if="[2].includes(order_info.status)" class="button_item_wrapper change_button_wrapper"></view> class="button_item_wrapper pay_button_wrapper">继续付款</view>
<view v-if="[2].includes(order_info.status)" class="button_item_wrapper refund_button_wrapper">退</view> <view v-if="[2].includes(order_info.status)" class="button_item_wrapper change_button_wrapper">
改约</view>
<view v-if="[2].includes(order_info.status)" @click="Refound(order_info.id)"
class="button_item_wrapper refund_button_wrapper">退款</view>
<view v-if="[4].includes(order_info.status) && order_info.report" <view v-if="[4].includes(order_info.status) && order_info.report"
class="button_item_wrapper report_button_wrapper"> class="button_item_wrapper report_button_wrapper">
查看报告 查看报告
@ -232,7 +257,7 @@ import wx from 'weixin-js-sdk'
line-height: 1; line-height: 1;
margin-top: 28rpx; margin-top: 28rpx;
text-align: right; text-align: right;
margin-right: 30rpx; margin-right: 30rpx;
font-size: 26rpx; font-size: 26rpx;
} }

Loading…
Cancel
Save