packs_information.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  1. <template>
  2. <view style="background-color: #f7f4f8; width: auto;">
  3. <view style="height: 100%;">
  4. <!-- 列选择器 -->
  5. <!-- <u-select v-model="choiceName" :list="babyList" value-name="id" label-name="name" @confirm="confirm1"></u-select> -->
  6. <u-select v-model="relationship" :list="guanxilist" @confirm="confirm2"></u-select>
  7. <!-- model控制开关 mode控制显示方向-->
  8. <u-popup v-model="showpeople" mode="bottom" border-radius="14" length="50%">
  9. <view class="popup_title">
  10. <view class="popup_title_text">选择就诊人</view>
  11. </view>
  12. <scroll-view style="height: 70%;" scroll-y="true">
  13. <view class="popup_list" v-for="(item, index) in babyList" :key="index" :data-index="index" @click="xuanzehuanzhe(item)">
  14. <view class="popup_list_title">
  15. <view class="title">{{item.name}}</view>
  16. <view class="body">
  17. {{item.sex==1?'男':'女'}}
  18. </view>
  19. </view>
  20. <view class="popup_list_button flex align-center">
  21. <u-radio-group v-model="value">
  22. <u-radio @change="peopleRadioChange" :key="index" :name="item.name">
  23. </u-radio>
  24. </u-radio-group>
  25. </view>
  26. </view>
  27. </scroll-view>
  28. <u-gap height="10" bg-color="#f9f9f9"></u-gap>
  29. <view class="popup_button">
  30. <image style="width: 32rpx;height: 32rpx;margin-right: 15rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/addjiu.png"
  31. mode=""></image>
  32. <view class="" @click="addPeople">
  33. 添加就诊人档案
  34. </view>
  35. </view>
  36. </u-popup>
  37. <!-- 步骤条 -->
  38. <!-- <view class="steps">
  39. <u-steps :list="numList" :current="current"></u-steps>
  40. </view> -->
  41. <!-- 分隔 -->
  42. <u-gap height="30" bg-color="#f9f9f9"></u-gap>
  43. <!-- 宝贝信息 -->
  44. <view>
  45. <view>
  46. <!-- 标题 -->
  47. <view class="information-title">患者计划</view>
  48. <u-line color="#ededed" />
  49. <!-- 姓名 -->
  50. <uni-list :border="false">
  51. <uni-list-item :border="false" :clickable="true" @click="showpeople = true">
  52. <!-- 自定义左(header)右(footer)的内容 -->
  53. <view slot="header">
  54. <text class="xinghao">*</text>
  55. <text style="font-size: 28rpx;">用户姓名</text>
  56. </view>
  57. <view slot="footer">
  58. <text style="font-size: 30rpx;">{{value}}</text>
  59. </view>
  60. </uni-list-item>
  61. <!-- 身份证 -->
  62. <!-- <uni-list-item :border="false">
  63. <view slot="header">
  64. <text class="xinghao">*</text>
  65. <text style="font-size: 28rpx;">宝贝身份证</text>
  66. </view>
  67. <view slot="footer">
  68. <u-input v-model="babyID" type="idcard" :border="false" placeholder="请填写宝贝身份证" :clearable="false" input-align="right"
  69. height="50" />
  70. </view>
  71. </uni-list-item> -->
  72. <!-- 社保 -->
  73. <uni-list-item :border="false">
  74. <!-- 自定义左(header)右(footer)的内容 -->
  75. <view slot="header">
  76. <text class="xinghao">*</text>
  77. <text style="font-size: 28rpx;">是否有社保</text>
  78. </view>
  79. <view slot="footer">
  80. <u-radio-group v-model="guarantee" @change="radioGroupChange">
  81. <u-radio v-for="(item, index) in list" :key="index" :name="item.name" :disabled="item.disabled">
  82. {{item.name}}
  83. </u-radio>
  84. </u-radio-group>
  85. </view>
  86. </uni-list-item>
  87. </uni-list>
  88. </view>
  89. </view>
  90. <!-- 分隔 -->
  91. <u-gap height="30" bg-color="#f9f9f9"></u-gap>
  92. <!-- 监护人信息 -->
  93. <view>
  94. <view>
  95. <!-- 标题 -->
  96. <!-- <view class="information-title">监护人信息</view> -->
  97. <!-- 线条 -->
  98. <u-line color="#ededed" />
  99. <!-- <uni-list :border="false">
  100. <uni-list-item :border="false">
  101. <view slot="header">
  102. <text class="xinghao">*</text>
  103. <text style="font-size: 28rpx;">监护人姓名</text>
  104. </view>
  105. <view slot="footer">
  106. <u-input v-model="guardianName" type="text" :border="false" placeholder="请填写您真实姓名" :clearable="false"
  107. input-align="right" height="50" />
  108. </view>
  109. </uni-list-item>
  110. <uni-list-item :border="false" :showArrow="true" :clickable="true" @click="relationship = true">
  111. <view slot="header">
  112. <text class="xinghao">*</text>
  113. <text style="font-size: 28rpx;">与患者的关系</text>
  114. </view>
  115. <view slot="footer">
  116. <view style="color: #AAAAAA;" v-if="nRelationship == '' ">请选择</view>
  117. <view style="color: #AAAAAA;">{{nRelationship.label}}</view>
  118. </view>
  119. </uni-list-item>
  120. </uni-list> -->
  121. </view>
  122. </view>
  123. <view class="flex align-center padding bg-white" v-if="packs.is_need_insure==1">
  124. <u-switch v-model="checked" size="40"></u-switch>
  125. <view class="margin-left-sm">
  126. 本服务包赠送一份保险服务,是否领取保险。如领取保险需要同意<text class="text-blue" @click.stop="gotoxieyi(packs.service_pack_protocol)">《保单协议》</text>
  127. </view>
  128. </view>
  129. </view>
  130. <!-- 按钮 -->
  131. <view class="cu-bar bg-white tabbar border shop" style="position: fixed; bottom: 0; z-index: 99;width: 100%;">
  132. <view class="submit text-white" @click="next" style="background-color: rgb(11,115,186); font-size: 32rpx;">下一步</view>
  133. </view>
  134. </view>
  135. </template>
  136. <script>
  137. export default {
  138. onLoad(op) {
  139. // console.log(JSON.parse(op.data))
  140. this.packs = JSON.parse(op.data)
  141. },
  142. onShow() {
  143. this.getarchives()
  144. },
  145. mounted() {
  146. },
  147. data() {
  148. return {
  149. //当前处于第几步
  150. current: 0,
  151. numList: [{
  152. name: '基本信息'
  153. }, {
  154. name: '确认订单'
  155. }, {
  156. name: '支付结果'
  157. }],
  158. list: [{
  159. name: '是',
  160. disabled: false
  161. },
  162. {
  163. name: '否',
  164. disabled: false
  165. }
  166. ],
  167. //控制列选择器
  168. choiceName: false,
  169. relationship: false,
  170. choicelist: [{
  171. value: '1',
  172. label: '测试1'
  173. },
  174. {
  175. value: '2',
  176. label: '测试2'
  177. }
  178. ],
  179. guanxilist: [{
  180. value: '1',
  181. label: '父子'
  182. },
  183. {
  184. value: '2',
  185. label: '母子'
  186. },
  187. {
  188. value: '3',
  189. label: '祖孙'
  190. },
  191. {
  192. value: '4',
  193. label: '亲属'
  194. },
  195. {
  196. value: '5',
  197. label: '本人'
  198. },
  199. {
  200. value: '6',
  201. label: '其他'
  202. }
  203. ],
  204. /**
  205. * 需要传的数据
  206. * 名字
  207. * 身份证
  208. * 社保 值为 是 否
  209. * 监护人姓名
  210. * */
  211. babyNmae: {
  212. label: "请选择",
  213. value: ""
  214. },
  215. babyID: '',
  216. guarantee: '',
  217. guardianName: '',
  218. nRelationship: {
  219. value: "",
  220. label: "请选择"
  221. },
  222. babyList: [],
  223. isindex: -1,
  224. packs: "",
  225. showpeople: false,
  226. value: "",
  227. huanzheID: "",
  228. checked: false,
  229. isagreement: false,
  230. currentbaby: {}
  231. }
  232. },
  233. methods: {
  234. gotoxieyi(item) {
  235. uni.navigateTo({
  236. url: "../index/agreement?data=" + item
  237. })
  238. },
  239. getarchives: async function() {
  240. let res = await this.$request.post("/api/v1/patient/patientList")
  241. if (res.status == 0) {
  242. this.babyList = res.data.data
  243. this.value = this.babyList[0].name
  244. this.huanzheID = this.babyList[0].id
  245. this.currentbaby = this.babyList[0]
  246. // if (this.babyList[0].card_back_img_url == '' && this.babyList[0].card_img_url == '') {
  247. // let imglist = [{
  248. // url: this.babyList[0].card_img_url
  249. // }, {
  250. // url: this.babyList[0].card_back_img_url
  251. // }]
  252. // uni.showModal({
  253. // title: "提示",
  254. // content: "该档案人未上传证件照无法购买本服务包",
  255. // confirmText: "前往设置",
  256. // success: (res) => {
  257. // if (res.confirm) {
  258. // uni.navigateTo({
  259. // url: "../archives/upcard?id=" + this.babyList[0].id + "&data=" + JSON.stringify(imglist)
  260. // })
  261. // // this.showpeople = false
  262. // } else if (res.cancel) {
  263. // // this.showpeople = false
  264. // }
  265. // }
  266. // })
  267. // }
  268. }
  269. },
  270. peopleRadioChange(e) {
  271. console.log(e);
  272. },
  273. xuanzehuanzhe(item) {
  274. // if (item.card_back_img_url == '' && item.card_img_url == '') {
  275. // let imglist = [{
  276. // url: item.card_img_url
  277. // }, {
  278. // url: item.card_back_img_url
  279. // }]
  280. // uni.showModal({
  281. // title: "提示",
  282. // content: "该档案人未上传证件照无法购买本服务包",
  283. // confirmText: "前往设置",
  284. // success: (res) => {
  285. // if (res.confirm) {
  286. // uni.navigateTo({
  287. // url: "../archives/upcard?id=" + item.id + "&data=" + JSON.stringify(imglist)
  288. // })
  289. // this.showpeople = false
  290. // } else if (res.cancel) {
  291. // this.showpeople = false
  292. // }
  293. // }
  294. // })
  295. // return false
  296. // }
  297. this.currentbaby = item
  298. this.huanzheID = item.id
  299. this.value = item.name
  300. this.showpeople = false
  301. },
  302. addPeople(e) {
  303. uni.navigateTo({
  304. url: "../archives/add_archives"
  305. })
  306. },
  307. // 选中任一radio时,由radio-group触发
  308. radioGroupChange(e) {
  309. if (e == "是") {
  310. this.isindex = 1
  311. } else {
  312. this.isindex = 0
  313. }
  314. console.log(this.isindex)
  315. },
  316. confirm1(e) {
  317. console.log(e)
  318. this.babyNmae = e[0]
  319. },
  320. confirm2(e) {
  321. this.nRelationship = e[0]
  322. },
  323. //下一步
  324. next(e) {
  325. if (this.currentbaby.card_number == '' && this.checked) {
  326. uni.showModal({
  327. title: "提示",
  328. content: "该宝贝尚未填写身份证,请前往填写",
  329. confirmText: "去填写",
  330. showCancel: false,
  331. success: (res) => {
  332. if (res.confirm) {
  333. uni.navigateTo({
  334. url: "../archives/add_archives?info=" + JSON.stringify(this.currentbaby)
  335. })
  336. }
  337. }
  338. })
  339. return false
  340. }
  341. if (this.value == "请选择") {
  342. uni.showToast({
  343. title: "请选择宝贝",
  344. icon: "none"
  345. })
  346. return false
  347. }
  348. if (this.isindex == -1) {
  349. uni.showToast({
  350. title: "请选择是否有社保",
  351. icon: "none"
  352. })
  353. return false
  354. }
  355. // if (this.guardianName == "") {
  356. // uni.showToast({
  357. // title: "请填写监护人姓名",
  358. // icon: "none"
  359. // })
  360. // return false
  361. // }
  362. // if (this.nRelationship.label == "请选择") {
  363. // uni.showToast({
  364. // title: "请选择关系",
  365. // icon: "none"
  366. // })
  367. // return false
  368. // }
  369. // if (!this.isagreement) {
  370. // uni.showToast({
  371. // title: "请先同意保单协议",
  372. // icon: "none"
  373. // })
  374. // return false
  375. // }
  376. // if (this.babyID == '') {
  377. // uni.showToast({
  378. // title: "请填写宝贝身份证号",
  379. // icon: "none"
  380. // })
  381. // return false
  382. // }
  383. let obj = {
  384. product_type: 6,
  385. patient_id: this.huanzheID,
  386. total_amount: this.packs.price / 100,
  387. service_pack_id: this.packs.id,
  388. is_security: this.isindex,
  389. guardian_name: this.guardianName,
  390. relationship_type: this.nRelationship.value,
  391. is_need_insurance: this.checked,
  392. payment_type: 2,
  393. team_id: this.packs.team_id
  394. }
  395. console.log(obj)
  396. uni.navigateTo({
  397. url: "../order/payment?data=" + JSON.stringify(obj)
  398. })
  399. }
  400. }
  401. }
  402. </script>
  403. <style lang="scss">
  404. .steps {
  405. padding-top: 50rpx;
  406. padding-bottom: 30rpx;
  407. height: auto;
  408. background-color: #FFFFFF;
  409. }
  410. /* 信息标题 */
  411. .information-title {
  412. height: auto;
  413. width: auto;
  414. font-size: 30rpx;
  415. font-weight: 600;
  416. padding: 30rpx 0 20rpx 30rpx;
  417. background-color: #FFFFFF;
  418. }
  419. /* 星号 */
  420. .xinghao {
  421. width: 20px;
  422. height: 20px;
  423. display: inline-block;
  424. vertical-align: middle;
  425. text-align: center;
  426. line-height: 26px;
  427. font-size: 15px;
  428. color: #f00;
  429. }
  430. .information-button {
  431. height: 10vh;
  432. padding: 0 20rpx;
  433. }
  434. .popup_title {
  435. height: 15%;
  436. width: 100%;
  437. display: flex;
  438. justify-content: center;
  439. align-items: center;
  440. border-bottom: 1rpx solid #f9f9f9;
  441. }
  442. .textareasty {
  443. background-color: white;
  444. border: 1px solid #efefef;
  445. border-radius: 16rpx;
  446. padding: 15rpx;
  447. margin: 15rpx auto;
  448. }
  449. .popup_title_text {
  450. width: auto;
  451. height: auto;
  452. font-size: 34rpx;
  453. font-weight: 540;
  454. }
  455. .popup_list {
  456. display: flex;
  457. height: 10vh;
  458. width: auto;
  459. border-bottom: 1rpx solid #f9f9f9;
  460. }
  461. .popup_list_title {
  462. height: 100%;
  463. width: 90%;
  464. display: inline-block;
  465. padding: 0 0 0 30rpx;
  466. .title {
  467. height: 50%;
  468. width: auto;
  469. font-size: 32rpx;
  470. font-weight: 500;
  471. padding: 20rpx 0 0 0;
  472. }
  473. .body {
  474. height: 50%;
  475. color: #a1a1a1;
  476. height: auto;
  477. width: auto;
  478. font-size: 30rpx;
  479. padding: 10rpx 0 0 0;
  480. }
  481. }
  482. .popup_button {
  483. height: 80rpx;
  484. width: 100%;
  485. display: flex;
  486. justify-content: center;
  487. align-items: center;
  488. view {
  489. color: #0b73ba;
  490. font-weight: 500;
  491. }
  492. }
  493. </style>