signInDetails.vue 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. <template>
  2. <view class="container">
  3. <view class="content">
  4. <view class="item_list">
  5. <view class="header_time border_bottom">
  6. <text>{{ queryBean.regDate }} {{ queryBean.week }}</text>
  7. </view>
  8. <view class="main_centent border_bottom">
  9. <view class="record_info">
  10. <text>预约科室</text>
  11. <text>{{ queryBean.deptName }}</text>
  12. </view>
  13. <view class="record_info">
  14. <text>预约医生</text>
  15. <text>{{ queryBean.doctorName || "--" }}</text>
  16. </view>
  17. <view class="record_info">
  18. <text>就诊时间</text>
  19. <text> {{ queryBean.timeSliceName }} {{ queryBean.commendTime }} {{ queryBean.sqNo }}号</text>
  20. </view>
  21. <view class="record_info">
  22. <text>就诊类型</text>
  23. <text v-if="queryBean.sourceType == '006'">视频问诊</text>
  24. <text v-else>普通问诊</text>
  25. </view>
  26. <view class="record_info">
  27. <text>就诊位置</text>
  28. <text>{{ queryBean.workPlace || "--" }}</text>
  29. </view>
  30. <view class="record_info">
  31. <text>就诊人</text>
  32. <text>{{ queryBean.name }}</text>
  33. </view>
  34. <view class="record_info" v-if="!withoutCard">
  35. <text>就诊卡号</text>
  36. <text v-if="queryBean.cardNo">{{ queryBean.cardNo }}</text>
  37. <text v-else>暂无</text>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="cardList_box">
  42. <view class="cardList_topText colorCustom_F08">
  43. 就诊人"{{ currentUser.memberName }}"名下已关联
  44. <text>{{ cardList.length }}张就诊卡</text>
  45. </view>
  46. <view class="card_item displayFlexRow" v-for="(item, index) in cardList" :key="index" @click="chooseCard(item)">
  47. <view class="member_item_info displayFlexCol">
  48. <view class="info_memberMsg_name ">{{ item.memberName }}</view>
  49. <view class="info_memberCard">
  50. 就诊卡:{{ item.cardNo }}
  51. </view>
  52. </view>
  53. <view class="set_default displayFlexRow">
  54. <image :src="changCardInfo.cardNo == item.cardNo ? iconUrl.circle_active : iconUrl.circle" />
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. <view class="public_btn_con">
  60. <view class="public_btn backgroundCustom" @click="dialogShowChange">确定</view>
  61. </view>
  62. <view class="public_dialog" v-if="dialogIsShow">
  63. <view class="dialog_inner">
  64. <image class="icon_commonDel" @click="dialogShowChange" :src="iconUrl.icon_commonDel"></image>
  65. <view class="dialog_tit">签到校验</view>
  66. <view class="dialog_subtit">为了确保您顺利就诊,系统需要您再次核对签到信息,请输入您当前携带的 <text class="colorCustom">实体就诊卡</text> 的卡号后 3
  67. 位数字</view>
  68. <view class="number_list flexCenter">
  69. <view class="num_item displayFlexBetween">
  70. <input class="number_input" maxlength="1" type='number' :focus="focusIndex == 0"
  71. @input="(e) => setVal(e, 0)"></input>
  72. <input class="number_input" maxlength="1" type='number' :focus="focusIndex == 1"
  73. @input="(e) => setVal(e, 1)"></input>
  74. <input class="number_input" maxlength="1" type='number' :focus="focusIndex == 2"
  75. @input="(e) => setVal(e, 2)"></input>
  76. </view>
  77. </view>
  78. <view @click="toDetail" class="public_btn backgroundCustom">确定</view>
  79. </view>
  80. </view>
  81. </view>
  82. </template>
  83. <script setup lang="ts">
  84. import { ref } from 'vue';
  85. import { onLoad } from '@dcloudio/uni-app';
  86. import { common } from '@/utils';
  87. import icon from '@/utils/icon';
  88. import { regSignForHis } from '@/pagesPatient/service/yygh';
  89. import { queryMemberCardList_V3 } from '@/pagesPersonal/service/patientManagement';
  90. const app = getApp();
  91. const iconUrl = ref(icon);
  92. const dialogIsShow = ref(false); //签到校验显隐
  93. const queryBean = ref<any>({}); // 签到预约记录信息
  94. const changCardInfo = ref<any>({}); //选中的卡信息
  95. const checkCode = ref<string[]>([]); //校验的后三位卡号
  96. const focusIndex = ref(0); //弹窗输入框获取焦点
  97. const pageConfig = ref<any>({});
  98. const currentUser = ref<any>({});
  99. const withoutCard = ref(false);
  100. const cardList = ref<any[]>([]);
  101. onLoad((options: any) => {
  102. let config = common.deepCopy(app.globalData.config.pageConfiguration.signInList_config);
  103. pageConfig.value = config;
  104. if (options.queryBean) {
  105. try {
  106. queryBean.value = JSON.parse(decodeURIComponent(options.queryBean));
  107. } catch (e) {
  108. console.error(e);
  109. queryBean.value = {};
  110. }
  111. }
  112. currentUser.value = app.globalData.currentUser;
  113. withoutCard.value = app.globalData.withoutCard;
  114. main();
  115. });
  116. const main = async () => {
  117. let list: any[] = [];
  118. let resp = await queryMemberCardList_V3({
  119. memberId: currentUser.value.memberId
  120. });
  121. if (common.isNotEmpty(resp)) {
  122. list = resp.filter((item: any) => item.cardType == 1);
  123. }
  124. console.log(list);
  125. // 判断卡号列表是否为空 ,为空提示患者到窗口绑卡
  126. if (list.length == 0) {
  127. common.showModal('暂无就诊卡,请先到窗口办卡', () => {
  128. common.navigateBack(1);
  129. });
  130. return;
  131. }
  132. cardList.value = list;
  133. changCardInfo.value = list[0];
  134. };
  135. /**
  136. * 就诊卡点击
  137. */
  138. const chooseCard = (item: any) => {
  139. changCardInfo.value = item;
  140. };
  141. /**
  142. * 签到校验赋值
  143. */
  144. const setVal = (e: any, index: number) => {
  145. let value = e.detail.value;
  146. // Update array directly
  147. checkCode.value[index] = value;
  148. if (common.isNotEmpty(value)) {
  149. focusIndex.value = index + 1;
  150. }
  151. };
  152. /**
  153. * 签到校验显隐状态更改
  154. */
  155. const dialogShowChange = () => {
  156. dialogIsShow.value = !dialogIsShow.value;
  157. checkCode.value = [];
  158. focusIndex.value = 0; // Reset focus when opening/closing
  159. };
  160. /**
  161. * 点击确认签到
  162. */
  163. const toDetail = async () => {
  164. let code = checkCode.value;
  165. let cardInfo = changCardInfo.value;
  166. if (code.join('') != cardInfo.cardNo.substring(cardInfo.cardNo.length - 3)) {
  167. common.showModal(`请输入正确的就诊卡卡号后3位`);
  168. return;
  169. }
  170. let user = currentUser.value;
  171. let item = queryBean.value;
  172. let querData = {
  173. DeptCode: item.deptCode,
  174. DoctorName: item.doctorName,
  175. CardNo: cardInfo.cardNo,
  176. CardType: cardInfo.cardType,
  177. MemberId: cardInfo.memberId,
  178. OrderId: "",
  179. ChannelId: item.channelId,
  180. DeptName: item.deptName,
  181. DoctorCode: item.doctorCode,
  182. HisOrderId: item.hisOrderId,
  183. IdCardId: user.idCardNo,
  184. QueueNo: item.sqNo,
  185. RegisterDate: item.regDate,
  186. SourceType: "",
  187. UserName: item.name,
  188. TimeSlice: item.timeSlice,
  189. //后端表示原因,在此用于区分是否走星网
  190. Reason: pageConfig.value.signReason,
  191. Store: {
  192. baseMemberEncryptionStore: user.baseMemberEncryptionStore,
  193. cardEncryptionStore: cardInfo.encryptionStore
  194. }
  195. };
  196. let resp = await regSignForHis(querData);
  197. if (!common.isEmpty(resp)) {
  198. let queryBeanStr = JSON.stringify({
  199. ...resp[0]
  200. });
  201. common.goToUrl(`/pagesPatient/st1/business/pay/payState/payState?pageType=signIn&queryBean=${queryBeanStr}`);
  202. }
  203. };
  204. </script>
  205. <style scoped>
  206. .content {
  207. padding-bottom: 150upx;
  208. }
  209. .item_list {
  210. background: white;
  211. margin: 30upx;
  212. box-sizing: border-box;
  213. border-radius: 24upx;
  214. }
  215. .header_time {
  216. height: 100upx;
  217. padding: 36upx;
  218. box-sizing: border-box;
  219. display: flex;
  220. flex-direction: row;
  221. justify-content: space-between;
  222. align-items: center;
  223. }
  224. .header_time text:nth-child(1) {
  225. line-height: 32upx;
  226. font-size: 32upx;
  227. color: #333;
  228. }
  229. .header_time text:nth-child(2) {
  230. display: inline-block;
  231. width: 168upx;
  232. line-height: 56upx;
  233. text-align: center;
  234. font-size: 28upx;
  235. position: relative;
  236. }
  237. .main_centent {
  238. padding: 36upx;
  239. box-sizing: border-box;
  240. }
  241. .record_info {
  242. margin-bottom: 36upx;
  243. display: flex;
  244. flex-direction: row;
  245. justify-content: space-between;
  246. align-items: center;
  247. }
  248. .record_info:last-child {
  249. margin-bottom: 0 !important;
  250. }
  251. .record_info text:nth-child(1) {
  252. width: 26%;
  253. display: inline-block;
  254. font-size: 30upx;
  255. color: #666;
  256. }
  257. .record_info text:nth-child(2) {
  258. width: 74%;
  259. display: inline-block;
  260. font-size: 30upx;
  261. color: #333;
  262. }
  263. .cardList_box {
  264. background: white;
  265. padding: 30upx;
  266. box-sizing: border-box;
  267. border-radius: 24upx;
  268. margin: 30upx;
  269. }
  270. .cardList_topText {
  271. font-size: 32upx;
  272. font-family: PingFang SC;
  273. font-weight: bold;
  274. margin: 6upx 3upx 0;
  275. line-height: 48upx;
  276. margin-bottom: 35upx;
  277. }
  278. .card_item {
  279. padding: 35upx 30upx;
  280. box-sizing: border-box;
  281. justify-content: space-between;
  282. box-shadow: 0px 0px 58px 0px rgba(0, 0, 0, 0.05);
  283. margin-bottom: 24upx;
  284. border-radius: 20upx;
  285. }
  286. .card_item .member_item_info {
  287. align-items: flex-start;
  288. }
  289. .card_item .member_item_info .info_memberMsg_name {
  290. font-size: 32upx;
  291. font-family: PingFang SC;
  292. font-weight: 800;
  293. color: #222326;
  294. margin-bottom: 21upx;
  295. }
  296. .card_item .member_item_info .info_memberCard {
  297. font-size: 28upx;
  298. font-family: PingFang SC;
  299. color: #62626D;
  300. }
  301. .set_default image {
  302. width: 40upx;
  303. height: 40upx;
  304. margin-left: 16upx;
  305. }
  306. .dialog_inner {
  307. width: 600upx;
  308. background: rgba(255, 255, 255, 1);
  309. border-radius: 24upx;
  310. position: relative;
  311. z-index: 3;
  312. padding: 0 30upx 40upx;
  313. }
  314. .icon_commonDel {
  315. width: 25upx;
  316. height: 25upx;
  317. position: absolute;
  318. top: 30upx;
  319. right: 30upx;
  320. }
  321. .dialog_tit {
  322. padding: 40upx 35upx;
  323. text-align: center;
  324. font-size: 36upx;
  325. font-family: PingFang SC;
  326. color: #333333;
  327. line-height: 38upx;
  328. }
  329. .dialog_subtit {
  330. font-size: 30upx;
  331. font-family: PingFang SC;
  332. color: #666666;
  333. line-height: 48upx;
  334. }
  335. .num_item {
  336. width: 100%;
  337. margin: 40upx 0;
  338. }
  339. .number_input {
  340. border: 1px solid #CCCCCC;
  341. width: 156upx;
  342. height: 110upx;
  343. line-height: 110upx;
  344. border-radius: 10upx;
  345. font-size: 60upx;
  346. text-align: center;
  347. color: #333333;
  348. }
  349. </style>