packs_information.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  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. <!-- 监护人姓名 -->
  101. <uni-list-item :border="false">
  102. <!-- 自定义左(header)右(footer)的内容 -->
  103. <view slot="header">
  104. <text class="xinghao">*</text>
  105. <text style="font-size: 28rpx;">监护人姓名</text>
  106. </view>
  107. <view slot="footer">
  108. <u-input v-model="guardianName" type="text" :border="false" placeholder="请填写您真实姓名" :clearable="false"
  109. input-align="right" height="50" />
  110. </view>
  111. </uni-list-item>
  112. <!-- 关系 -->
  113. <uni-list-item :border="false" :showArrow="true" :clickable="true" @click="relationship = true">
  114. <!-- 自定义左(header)右(footer)的内容 -->
  115. <view slot="header">
  116. <text class="xinghao">*</text>
  117. <text style="font-size: 28rpx;">与宝贝的关系</text>
  118. </view>
  119. <view slot="footer">
  120. <!-- <view style="color: #AAAAAA;" v-if="nRelationship == '' ">请选择</view> -->
  121. <view style="color: #AAAAAA;">{{nRelationship.label}}</view>
  122. </view>
  123. </uni-list-item>
  124. </uni-list>
  125. </view>
  126. </view>
  127. </view>
  128. <!-- 按钮 -->
  129. <view class="cu-bar bg-white tabbar border shop" style="position: fixed; bottom: 0; z-index: 99;width: 100%;">
  130. <view class="submit text-white" @click="next" style="background-color: rgb(11,115,186); font-size: 32rpx;">下一步</view>
  131. </view>
  132. </view>
  133. </template>
  134. <script>
  135. export default {
  136. onLoad(op) {
  137. // console.log(JSON.parse(op.data))
  138. this.packs = JSON.parse(op.data)
  139. },
  140. onShow() {
  141. this.getarchives()
  142. },
  143. mounted() {
  144. },
  145. data() {
  146. return {
  147. //当前处于第几步
  148. current: 0,
  149. numList: [{
  150. name: '基本信息'
  151. }, {
  152. name: '确认订单'
  153. }, {
  154. name: '支付结果'
  155. }],
  156. list: [{
  157. name: '是',
  158. disabled: false
  159. },
  160. {
  161. name: '否',
  162. disabled: false
  163. }
  164. ],
  165. //控制列选择器
  166. choiceName: false,
  167. relationship: false,
  168. choicelist: [{
  169. value: '1',
  170. label: '测试1'
  171. },
  172. {
  173. value: '2',
  174. label: '测试2'
  175. }
  176. ],
  177. guanxilist: [{
  178. value: '1',
  179. label: '父亲'
  180. },
  181. {
  182. value: '2',
  183. label: '母亲'
  184. },
  185. {
  186. value: '3',
  187. label: '祖父'
  188. },
  189. {
  190. value: '4',
  191. label: '祖母'
  192. },
  193. {
  194. value: '5',
  195. label: '外祖父'
  196. },
  197. {
  198. value: '6',
  199. label: '外祖母'
  200. },
  201. {
  202. value: '7',
  203. label: '叔侄'
  204. },
  205. {
  206. value: '8',
  207. label: '其他'
  208. }
  209. ],
  210. /**
  211. * 需要传的数据
  212. * 名字
  213. * 身份证
  214. * 社保 值为 是 否
  215. * 监护人姓名
  216. * */
  217. babyNmae: {
  218. label: "请选择",
  219. value: ""
  220. },
  221. babyID: '',
  222. guarantee: '',
  223. guardianName: '',
  224. nRelationship: {
  225. value: "",
  226. label: "请选择"
  227. },
  228. babyList: [],
  229. isindex: -1,
  230. packs: "",
  231. showpeople: false,
  232. value: "请选择",
  233. huanzheID: ""
  234. }
  235. },
  236. methods: {
  237. getarchives: async function() {
  238. let res = await this.$request.post("/api/v1/patient/patientList")
  239. if (res.status == 0) {
  240. this.babyList = res.data.data
  241. }
  242. },
  243. peopleRadioChange(e) {
  244. console.log(e);
  245. },
  246. xuanzehuanzhe(item) {
  247. if (item.card_back_img_url == '' && item.card_img_url == '') {
  248. uni.showModal({
  249. title: "提示",
  250. content: "该档案人未上传证件照无法购买本服务包",
  251. confirmText: "前往设置",
  252. success: (res) => {
  253. if (res.confirm) {
  254. uni.navigateTo({
  255. url: "../archives/upcard?id=" + item.id
  256. })
  257. this.showpeople = false
  258. } else if (res.cancel) {
  259. this.showpeople = false
  260. }
  261. }
  262. })
  263. return false
  264. }
  265. this.huanzheID = item.id
  266. this.value = item.name
  267. this.showpeople = false
  268. },
  269. addPeople(e) {
  270. uni.navigateTo({
  271. url: "../archives/add_archives"
  272. })
  273. },
  274. // 选中任一radio时,由radio-group触发
  275. radioGroupChange(e) {
  276. if (e == "是") {
  277. this.isindex = 1
  278. } else {
  279. this.isindex = 0
  280. }
  281. console.log(this.isindex)
  282. },
  283. confirm1(e) {
  284. console.log(e)
  285. this.babyNmae = e[0]
  286. },
  287. confirm2(e) {
  288. this.nRelationship = e[0]
  289. },
  290. //下一步
  291. next(e) {
  292. if (this.value == "请选择") {
  293. uni.showToast({
  294. title: "请选择宝贝",
  295. icon: "none"
  296. })
  297. return false
  298. }
  299. if (this.isindex == -1) {
  300. uni.showToast({
  301. title: "请选择是否有社保",
  302. icon: "none"
  303. })
  304. return false
  305. }
  306. if (this.guardianName == "") {
  307. uni.showToast({
  308. title: "请填写监护人姓名",
  309. icon: "none"
  310. })
  311. return false
  312. }
  313. if (this.nRelationship.label == "请选择") {
  314. uni.showToast({
  315. title: "请选择关系",
  316. icon: "none"
  317. })
  318. return false
  319. }
  320. let obj = {
  321. product_type: 6,
  322. patient_id: this.huanzheID,
  323. total_amount: this.packs.price / 100,
  324. service_pack_id: this.packs.id,
  325. is_security: this.isindex,
  326. guardian_name: this.guardianName,
  327. relationship_type: this.nRelationship.value,
  328. payment_type: 2
  329. }
  330. console.log(obj)
  331. uni.navigateTo({
  332. url: "../order/payment?data=" + JSON.stringify(obj)
  333. })
  334. }
  335. }
  336. }
  337. </script>
  338. <style lang="scss">
  339. .steps {
  340. padding-top: 50rpx;
  341. padding-bottom: 30rpx;
  342. height: auto;
  343. background-color: #FFFFFF;
  344. }
  345. /* 信息标题 */
  346. .information-title {
  347. height: auto;
  348. width: auto;
  349. font-size: 30rpx;
  350. font-weight: 600;
  351. padding: 30rpx 0 20rpx 30rpx;
  352. background-color: #FFFFFF;
  353. }
  354. /* 星号 */
  355. .xinghao {
  356. width: 20px;
  357. height: 20px;
  358. display: inline-block;
  359. vertical-align: middle;
  360. text-align: center;
  361. line-height: 26px;
  362. font-size: 15px;
  363. color: #f00;
  364. }
  365. .information-button {
  366. height: 10vh;
  367. padding: 0 20rpx;
  368. }
  369. .popup_title {
  370. height: 15%;
  371. width: 100%;
  372. display: flex;
  373. justify-content: center;
  374. align-items: center;
  375. border-bottom: 1rpx solid #f9f9f9;
  376. }
  377. .textareasty {
  378. background-color: white;
  379. border: 1px solid #efefef;
  380. border-radius: 16rpx;
  381. padding: 15rpx;
  382. margin: 15rpx auto;
  383. }
  384. .popup_title_text {
  385. width: auto;
  386. height: auto;
  387. font-size: 34rpx;
  388. font-weight: 540;
  389. }
  390. .popup_list {
  391. display: flex;
  392. height: 10vh;
  393. width: auto;
  394. border-bottom: 1rpx solid #f9f9f9;
  395. }
  396. .popup_list_title {
  397. height: 100%;
  398. width: 90%;
  399. display: inline-block;
  400. padding: 0 0 0 30rpx;
  401. .title {
  402. height: 50%;
  403. width: auto;
  404. font-size: 32rpx;
  405. font-weight: 500;
  406. padding: 20rpx 0 0 0;
  407. }
  408. .body {
  409. height: 50%;
  410. color: #a1a1a1;
  411. height: auto;
  412. width: auto;
  413. font-size: 30rpx;
  414. padding: 10rpx 0 0 0;
  415. }
  416. }
  417. .popup_button {
  418. height: 80rpx;
  419. width: 100%;
  420. display: flex;
  421. justify-content: center;
  422. align-items: center;
  423. view {
  424. color: #0b73ba;
  425. font-weight: 500;
  426. }
  427. }
  428. </style>