creditReport.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. <template>
  2. <view class="container">
  3. <view class="content">
  4. <image :src="iconUrl.page_topBg" class="topBg_img"></image>
  5. <view class="memeberInfo">
  6. <image :src="iconUrl.credit_memberBg" class="credit_memberBg" mode="widthFix"></image>
  7. <view class="memeberInfo_box">
  8. <view class="memeberInfo_boxData displayFlexBetween">
  9. <view class="boxData_left displayFlexLeft">
  10. <image class="credit_memberBgT" :src="iconUrl.credit_memberBgT"/>
  11. <view class="">
  12. <view class="displayFlexLeft">
  13. <text class="boxData_leftName">{{myInfo?.memberName}}</text>
  14. <text class="boxData_leftTip backgroundCustom">本人</text>
  15. </view>
  16. <view class="colorCustom">福建省诊疗信用管理平台</view>
  17. </view>
  18. </view>
  19. <view class="boxData_right">
  20. <image class="credit_iconResk" :src="myInfo?.isCredit == 2 ? iconUrl.credit_iconResk : iconUrl.credit_iconExcell"></image>
  21. <view class="boxData_rightText">
  22. <!-- <image class="credit_iconReskText" :src="iconUrl.credit_iconReskText"></image> -->
  23. <!-- <text class="">更新信用状态</text> -->
  24. </view>
  25. </view>
  26. </view>
  27. <view class="memeberInfo_boxTip">
  28. <view class="bg backgroundCustom"></view>
  29. <view v-if="myInfo?.isCredit == 2" class="colorRed">提醒:您存在信用风险,请及时处理</view>
  30. <view v-if="myInfo?.isCredit == 1" class="colorCustom_F08">诊疗信用良好,可享受先诊疗后付费权益</view>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="youCredit">
  35. <!-- <view class="checkCreditReport displayFlexBetween">
  36. <view class="time_box displayFlexRow">
  37. <picker class="displayFlexRow" mode="date" :value="query.startDate" :start="pickerStart" :end="query.endDate" @change="changeStartDate">
  38. <view class="picker ">
  39. {{query.startDate}}
  40. </view>
  41. </picker>
  42. <text class="textTag">至</text>
  43. <picker class="displayFlexRow" mode="date" :value="query.endDate" :start="query.startDate" :end="pickerEnd" @change="changeEndDate">
  44. <view class="picker ">
  45. {{query.endDate}}
  46. </view>
  47. </picker>
  48. </view>
  49. <picker class="sele_box displayFlexBetween" @change="bindPickerChange" :value="index" :range="array">
  50. <view class="picker">{{array[index]}}</view>
  51. <image class="public_right_img public_right_img30" :src="iconUrl.icon_right"></image>
  52. </picker>
  53. </view> -->
  54. <view class="title border_bottom">服务使用记录</view>
  55. <view class="displayFlexRow">
  56. <view class="creditReport displayFlexCol">
  57. <view class="creditReport_title">爽约记录</view>
  58. <view class="creditReport_num">{{appoinmentList.length}}</view>
  59. </view>
  60. <view class="creditReport displayFlexCol">
  61. <view class="creditReport_title">欠费逾期</view>
  62. <view class="creditReport_num">{{(overdueList[0] && overdueList[0].ItemList && overdueList[0].ItemList.length) || 0}}</view>
  63. </view>
  64. </view>
  65. </view>
  66. <view class="floot" v-if="appoinmentList.length > 0">
  67. <view class="floot_title">预约记录</view>
  68. <view class="floot_listBox displayFlexBetween" v-for="(item, index) in appoinmentList" :key="index">
  69. <view class="yyInfo">
  70. <view class="listBox_name">{{item.HospitalName}}-{{item.DeptName}}</view>
  71. <view class="listBox_time">预约时间:{{item.RegDate+" "+item.CommendTime}}</view>
  72. </view>
  73. <view class="yyTip">爽约</view>
  74. </view>
  75. </view>
  76. <view class="floot" v-if="overdueList.length > 0">
  77. <view class="floot_title">欠费结算记录</view>
  78. <view class="floot_listBox " v-for="(item, index) in overdueList" :key="index">
  79. <view class="costInfo">
  80. <view class="listBox_name">福州大学省立医院</view>
  81. <view class="displayFlexBetween">
  82. <view class="listBox_time">2024.09.01 08:00</view>
  83. <view class="listBox_time colorRed">-¥104.21</view>
  84. </view>
  85. <view class="costInfo_tip">提醒:在本院有一笔未及时缴清费用,将会影响您先诊疗后付费</view>
  86. <view class=" displayFlexLeft">
  87. <view class="costInfo_btn border boderColorCustom colorCustom">去结算</view>
  88. <view class="costInfo_btn backgroundCustom">更新信用</view>
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. </template>
  96. <script lang="ts" setup>
  97. import { ref, reactive } from 'vue';
  98. import { useOnLoad } from '@/hook';
  99. import { queryOverdueData, queryBreakAppoinmentList } from '@/pagesPersonal/service/patientManagement';
  100. import {common} from "@/utils";
  101. import icon from "@/utils/icon";
  102. const app = getApp();
  103. // 定义响应式数据
  104. const iconUrl = ref(icon);
  105. const myInfo = ref<any>({});
  106. const overdueList = ref<any[]>([]);
  107. const appoinmentList = ref([]);
  108. const query = reactive({
  109. startDate: common.aFewDaysago(15),
  110. endDate: common.afterFewDays(1)
  111. });
  112. const pickerStart = ref(common.aFewDaysago(3650));
  113. const pickerEnd = ref(common.afterFewDays(3650));
  114. const array = ref(['全部']);
  115. const index = ref(0);
  116. useOnLoad((options) => {
  117. if (options && options.myInfo) {
  118. try {
  119. let info = JSON.parse(decodeURIComponent(options.myInfo));
  120. myInfo.value = info;
  121. getCredit(info);
  122. } catch (e) {
  123. console.error('解析myInfo失败', e);
  124. }
  125. }
  126. });
  127. const getCredit = async (info: any) => {
  128. // 获取欠费逾期记录
  129. let { resData: overdue } = await queryOverdueData({
  130. MemberId: info.memberId,
  131. });
  132. // 获取爽约记录条数
  133. let { resData: appointment } = await queryBreakAppoinmentList({
  134. memberId: info.memberId,
  135. });
  136. const overdueData = overdue || [];
  137. const appointmentData = appointment || [];
  138. if (common.isNotEmpty(overdueData[0]?.OneSelfUnpayAmount) || common.isNotEmpty(appointmentData)) {
  139. // 判断当前用户有存在欠费 或者爽约记录大于等于2
  140. let creditLevel = ((overdueData[0]?.ItemList && overdueData[0]?.ItemList.length > 0) || appointmentData.length >= 2) ? 2 : 1;
  141. if (myInfo.value) {
  142. myInfo.value.isCredit = creditLevel;
  143. }
  144. }
  145. overdueList.value = overdueData[0]?.ItemList || [];
  146. appoinmentList.value = appointmentData;
  147. };
  148. // Picker change events if needed in future (currently commented out in template but logic exists)
  149. // const changeStartDate = (e) => { query.startDate = e.detail.value }
  150. // const changeEndDate = (e) => { query.endDate = e.detail.value }
  151. // const bindPickerChange = (e) => { index.value = e.detail.value }
  152. </script>
  153. <style lang="scss" scoped>
  154. /* pagesPersonal/st1/business/creditManagement/creditReport/creditReport.wxss */
  155. .topBg_img {
  156. width: 100%;
  157. height: 750upx;
  158. position: fixed;
  159. top: 0;
  160. left: 0;
  161. }
  162. .memeberInfo{
  163. width: 698upx;
  164. height: 267upx;
  165. position: relative;
  166. margin: 30upx auto 0;
  167. }
  168. .memeberInfo .credit_memberBg{
  169. position: absolute;
  170. z-index: 0;
  171. top: 0;
  172. left: 0;
  173. }
  174. .memeberInfo .memeberInfo_box{
  175. position: relative;
  176. z-index: 1;
  177. height: 100%;
  178. }
  179. .memeberInfo .memeberInfo_boxData{
  180. height: 207upx;
  181. padding-top: 30upx;
  182. }
  183. .memeberInfo .boxData_left .credit_memberBgT{
  184. width: 102upx;
  185. height: 102upx;
  186. margin:0 30upx;
  187. }
  188. .memeberInfo .boxData_leftName{
  189. font-weight: bold;
  190. font-size: 36upx;
  191. margin-right: 22upx;
  192. margin-bottom: 12upx;
  193. }
  194. .memeberInfo .boxData_leftTip{
  195. padding: 6upx;
  196. font-size: 22upx;
  197. margin-bottom: 9upx;
  198. border-radius: 4upx;
  199. }
  200. .memeberInfo .boxData_right {
  201. position: absolute;
  202. right: 28upx;
  203. top: 7upx;
  204. }
  205. .memeberInfo .boxData_right .credit_iconResk{
  206. width: 155upx;
  207. height: 155upx;
  208. }
  209. .memeberInfo .boxData_rightText{
  210. position: relative;
  211. left: -12upx;
  212. z-index: 1;
  213. width: 176upx;
  214. height: 60upx;
  215. }
  216. .memeberInfo .boxData_rightText .credit_iconReskText{
  217. position: absolute;
  218. }
  219. .memeberInfo .boxData_rightText text{
  220. position: absolute;
  221. top: 24upx;
  222. width: 100%;
  223. text-align: center;
  224. color: #fff;
  225. }
  226. .memeberInfo .memeberInfo_box .memeberInfo_boxTip{
  227. height: 60upx;
  228. border-radius: 0upx 0 20upx 20upx;
  229. font-size: 24upx;
  230. padding-left: 32upx;
  231. position: relative;
  232. overflow: hidden;
  233. display: flex;
  234. align-items: center;
  235. }
  236. .memeberInfo .memeberInfo_box .memeberInfo_boxTip .bg{
  237. position: absolute;
  238. width: 100%;
  239. height: 100%;
  240. left: 0;
  241. top: 0;
  242. opacity: .2;
  243. }
  244. /* 您的信用 */
  245. .youCredit,.floot{
  246. background: #fff;
  247. border-radius: 20upx;
  248. position: relative;
  249. width: 698upx;
  250. margin: 30upx auto 0;
  251. padding: 30upx;
  252. }
  253. .youCredit .time_box{
  254. border: 1upx solid #898999;
  255. /* padding: 19upx 24upx; */
  256. border-radius: 6upx;
  257. width: 449upx;
  258. height: 61upx;
  259. }
  260. .youCredit .time_box .textTag {
  261. margin: 0 10upx;
  262. }
  263. .youCredit .sele_box{
  264. border: 1upx solid #898999;
  265. border-radius: 6upx;
  266. width: 173upx;
  267. height: 61upx;
  268. position: relative;
  269. padding-left: 20upx;
  270. box-sizing: border-box;
  271. }
  272. .youCredit .picker {
  273. font-size: 32upx;
  274. color: #61616D;
  275. }
  276. .youCredit .title{
  277. font-weight: bold;
  278. font-size: 32upx;
  279. color: #212326;
  280. line-height: initial;
  281. padding-bottom: 30upx;
  282. }
  283. .youCredit .creditReport{
  284. width: 300upx;
  285. margin-top: 30upx;
  286. }
  287. .youCredit .creditReport_title{
  288. font-weight: bold;
  289. font-size: 28upx;
  290. color: #434349;
  291. margin-bottom: 30upx;
  292. }
  293. .youCredit .creditReport_num{
  294. font-weight: 800;
  295. font-size: 38upx;
  296. color: #FF5D5F;
  297. }
  298. .youCredit .checkCreditReport{
  299. margin-bottom: 30upx;
  300. }
  301. .floot .floot_title{
  302. font-size: 32upx;
  303. color: #212326;
  304. font-weight: bold;
  305. }
  306. .floot .floot_listBox{
  307. background: #ffffff;
  308. box-shadow: 0upx 0upx 30upx 0upx #d8d8d8;
  309. border-radius: 20upx;
  310. padding: 0 24upx 20upx 24upx;
  311. margin-top: 32upx;
  312. }
  313. .floot .floot_listBox .listBox_name{
  314. font-weight: bold;
  315. font-size: 30upx;
  316. color: #212326;
  317. padding: 32upx 0 24upx;
  318. }
  319. .floot .floot_listBox .listBox_time{
  320. font-weight: 500;
  321. font-size: 26upx;
  322. color: #898999;
  323. padding-bottom: 19upx ;
  324. }
  325. .yyTip{
  326. font-size: 24upx;
  327. border-radius: 6upx;
  328. padding: 5upx 13upx;
  329. color: #FF5D5F;
  330. border: 2upx solid #FF5D5F;
  331. }
  332. .costInfo_tip{
  333. font-size: 22upx;
  334. color: #FF5D5F;
  335. text-align: justify;
  336. line-height: 30upx;
  337. }
  338. .costInfo_btn{
  339. width: 170upx;
  340. height: 66upx;
  341. line-height: 66upx;
  342. text-align: center;
  343. font-size: 30upx;
  344. margin-top: 28upx;
  345. border-radius: 33upx;
  346. margin-right: 16upx;
  347. }
  348. </style>