vaccines_info.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. <template>
  2. <view class="">
  3. <view class="cu-list menu">
  4. <view class="cu-item arrow" @click="showpeople=true">
  5. <view class="content">
  6. <text class="text-grey">接种用户</text>
  7. </view>
  8. <view class="action">
  9. <text class="text-grey text-sm">{{value}}</text>
  10. </view>
  11. </view>
  12. <view class="cu-item arrow" @click="vaccinesList">
  13. <view class="content">
  14. <text class="text-grey">接种疫苗</text>
  15. </view>
  16. <view class="action">
  17. <text class="text-grey text-sm">{{yimiao}}</text>
  18. </view>
  19. </view>
  20. <view class="cu-item arrow" @click="yuyuetime">
  21. <view class="content">
  22. <text class="text-grey">预约时间</text>
  23. </view>
  24. <view class="action">
  25. <text class="text-grey text-sm">{{yuyuevalue}}</text>
  26. </view>
  27. </view>
  28. <view class="cu-item arrow" @click="xuanzefuwu">
  29. <view class="content">
  30. <text class="text-grey">服务机构</text>
  31. </view>
  32. <view class="action">
  33. <text class="text-grey text-sm">{{servicejigou}}</text>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="padding-sm bg-white" v-if="doctor.docter.length!=0">
  38. <scroll-view scroll-x="true" enable-flex="true" style="display: flex;height: 145rpx;">
  39. <view class="flex flex-direction align-center justify-center" @click="gotodoctorinfo(item.id)" style="width: 120rpx;height: 130rpx;"
  40. v-for="(item,index) in doctor.docter" :key="index">
  41. <u-avatar :src="item.avatar" mode="circle"></u-avatar>
  42. <view class="">
  43. {{item.name}}
  44. </view>
  45. </view>
  46. </scroll-view>
  47. </view>
  48. <u-picker mode="multiSelector" @confirm="callbacktime" v-model="show" :default-selector='[0, 1]' range-key="start_time_period"
  49. :range="multiSelector"></u-picker>
  50. <u-popup v-model="showpeople" mode="bottom" border-radius="14" length="50%">
  51. <view class="popup_title">
  52. <view class="popup_title_text">选择就诊人</view>
  53. </view>
  54. <scroll-view style="height: 70%;" scroll-y="true">
  55. <view class="popup_list" v-for="(item, index) in patientList" :key="index" :data-index="index" @click="xuanzehuanzhe(item)">
  56. <view class="popup_list_title">
  57. <view class="title">{{item.name}}</view>
  58. <view class="body">
  59. {{item.sex==1?'男':'女'}}
  60. </view>
  61. </view>
  62. <view class="popup_list_button flex align-center">
  63. <u-radio-group v-model="value">
  64. <u-radio @change="peopleRadioChange" :key="index" :name="item.name">
  65. </u-radio>
  66. </u-radio-group>
  67. </view>
  68. </view>
  69. </scroll-view>
  70. <u-gap height="10" bg-color="#f9f9f9"></u-gap>
  71. <view class="popup_button">
  72. <image style="width: 32rpx;height: 32rpx;margin-right: 15rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/addjiu.png"
  73. mode=""></image>
  74. <view class="" @click="addPeople">
  75. 添加就诊人档案
  76. </view>
  77. </view>
  78. </u-popup>
  79. <view class="cu-bar bg-white tabbar" style="position: fixed;bottom: 0;width: 100%;">
  80. <view class="submit" style="background-color: #0B73B9;color: white;" @click="gotopay">
  81. 提交申请
  82. </view>
  83. </view>
  84. </view>
  85. </template>
  86. <script>
  87. var user = require('../../common/user.js');
  88. export default {
  89. onLoad() {
  90. this.gettime()
  91. },
  92. onShow() {
  93. if (this.doctor != null) {
  94. this.servicejigou = this.doctor.name
  95. this.jigouID = this.doctor.id
  96. }
  97. if (this.yimiaoInfo != null) {
  98. this.yimiao = this.yimiaoInfo.name
  99. }
  100. this.getarchives()
  101. },
  102. data() {
  103. return {
  104. showpeople: false,
  105. huanzheID: "",
  106. value: "请选择接种用户",
  107. patientList: [],
  108. show: false,
  109. yuyuevalue: "请选择预约时间",
  110. multiSelector: [],
  111. timehour: "",
  112. doctor: "",
  113. servicejigou: "请选择服务机构",
  114. jigouID: "",
  115. yimiao: "请选择接种疫苗",
  116. yimiaoInfo: "",
  117. time: ""
  118. }
  119. },
  120. methods: {
  121. // 选中某个单选框时,由radio时触发
  122. peopleRadioChange(e) {
  123. console.log(e);
  124. },
  125. xuanzehuanzhe(item) {
  126. this.huanzheID = item.id
  127. this.value = item.name
  128. this.showpeople = false
  129. },
  130. getarchives: async function() {
  131. let res = await this.$request.post("/api/v1/patient/patientList")
  132. if (res.status == 0) {
  133. this.patientList = res.data.data
  134. }
  135. },
  136. gettime: async function() {
  137. let res = await this.$request.post("/api/v1/docter/timePeriodList")
  138. console.log(res)
  139. if (res.status == 0) {
  140. res.data.list.forEach(item => {
  141. item.start_time_period = item.start_time_period + '-' + item.end_time_period
  142. })
  143. this.multiSelector.push(res.data.dates)
  144. this.multiSelector.push(res.data.list)
  145. }
  146. },
  147. callbacktime(arr) {
  148. this.timehour = this.multiSelector[1][arr[1]].id
  149. this.yuyuevalue = this.multiSelector[0][arr[0]] + " " + this.multiSelector[1][arr[1]].start_time_period
  150. this.time = new Date().getFullYear() + "-" + this.multiSelector[0][arr[0]]
  151. },
  152. //添加就诊人
  153. addPeople(e) {
  154. uni.navigateTo({
  155. url: "../archives/add_archives"
  156. })
  157. },
  158. xuanzefuwu() {
  159. uni.navigateTo({
  160. url: "mechanism"
  161. })
  162. },
  163. vaccinesList() {
  164. uni.navigateTo({
  165. url: "vaccinesList"
  166. })
  167. },
  168. yuyuetime() {
  169. this.show = true
  170. },
  171. gotopay() {
  172. if (this.huanzheID == "") {
  173. uni.showToast({
  174. title: "请先选择接种用户",
  175. icon: "none"
  176. })
  177. return false
  178. }
  179. if (this.yimiaoInfo == "") {
  180. uni.showToast({
  181. title: "请先选择疫苗",
  182. icon: "none"
  183. })
  184. return false
  185. }
  186. if (this.timehour == "") {
  187. uni.showToast({
  188. title: "请先选择预约时间",
  189. icon: "none"
  190. })
  191. return false
  192. }
  193. if (this.doctor == "") {
  194. uni.showToast({
  195. title: "请先选择机构",
  196. icon: "none"
  197. })
  198. return false
  199. }
  200. let obj = {
  201. product_type: 4,
  202. patient_id: this.huanzheID,
  203. total_amount: this.yimiaoInfo.price / 100,
  204. organization_id: this.doctor.id,
  205. schedule_date: this.time,
  206. time_period_id: this.timehour,
  207. vaccine_id: this.yimiaoInfo.id,
  208. payment_type: 2
  209. }
  210. uni.navigateTo({
  211. url: "../order/payment?data=" + JSON.stringify(obj)
  212. })
  213. },
  214. gotodoctorinfo(id) {
  215. uni.navigateTo({
  216. url: "../doctor_related/doctor_info?id=" + id + "&index=2"
  217. })
  218. }
  219. }
  220. }
  221. </script>
  222. <style lang="scss" scoped>
  223. .main {}
  224. .popup_title {
  225. height: 15%;
  226. width: 100%;
  227. display: flex;
  228. justify-content: center;
  229. align-items: center;
  230. border-bottom: 1rpx solid #f9f9f9;
  231. }
  232. .textareasty {
  233. background-color: white;
  234. border: 1px solid #efefef;
  235. border-radius: 16rpx;
  236. padding: 15rpx;
  237. margin: 15rpx auto;
  238. }
  239. .popup_title_text {
  240. width: auto;
  241. height: auto;
  242. font-size: 34rpx;
  243. font-weight: 540;
  244. }
  245. .popup_list {
  246. display: flex;
  247. height: 10vh;
  248. width: auto;
  249. border-bottom: 1rpx solid #f9f9f9;
  250. }
  251. .popup_list_title {
  252. height: 100%;
  253. width: 90%;
  254. display: inline-block;
  255. padding: 0 0 0 30rpx;
  256. .title {
  257. height: 50%;
  258. width: auto;
  259. font-size: 32rpx;
  260. font-weight: 500;
  261. padding: 20rpx 0 0 0;
  262. }
  263. .body {
  264. height: 50%;
  265. color: #a1a1a1;
  266. height: auto;
  267. width: auto;
  268. font-size: 30rpx;
  269. padding: 10rpx 0 0 0;
  270. }
  271. }
  272. .popup_button {
  273. height: 80rpx;
  274. width: 100%;
  275. display: flex;
  276. justify-content: center;
  277. align-items: center;
  278. view {
  279. color: #0b73ba;
  280. font-weight: 500;
  281. }
  282. }
  283. /**选择号码的样式和选择患者不同
  284. 需要更改样式*/
  285. .phone {
  286. height: 20%;
  287. width: 100%;
  288. .list {
  289. height: 100%;
  290. width: 100%;
  291. display: flex;
  292. padding: 0 10rpx 0 30rpx;
  293. .title {
  294. height: 100%;
  295. width: 65%;
  296. font-size: 32rpx;
  297. color: #7d7d7d;
  298. display: flex;
  299. align-items: center;
  300. }
  301. .phone {
  302. height: 100%;
  303. width: 30%;
  304. font-size: 32rpx;
  305. font-weight: 500;
  306. display: flex;
  307. justify-content: center;
  308. align-items: center;
  309. }
  310. .button {
  311. height: 100%;
  312. width: 5%;
  313. display: flex;
  314. justify-content: center;
  315. align-items: center;
  316. }
  317. }
  318. }
  319. </style>