vaccines_info.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  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">
  39. <view class="flex flex-direction align-center justify-center" @click="gotodoctorinfo(item.id)" style="width: 120rpx;" v-for="(item,index) in doctor.docter"
  40. :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. export default {
  88. onLoad() {
  89. this.getarchives()
  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. },
  101. data() {
  102. return {
  103. showpeople: false,
  104. huanzheID: "",
  105. value: "请选择接种用户",
  106. patientList: [],
  107. show: false,
  108. yuyuevalue: "请选择预约时间",
  109. multiSelector: [],
  110. timehour: "",
  111. doctor: {},
  112. servicejigou: "请选择服务机构",
  113. jigouID: "",
  114. yimiao: "请选择接种疫苗",
  115. yimiaoInfo: {},
  116. time: ""
  117. }
  118. },
  119. methods: {
  120. // 选中某个单选框时,由radio时触发
  121. peopleRadioChange(e) {
  122. console.log(e);
  123. },
  124. xuanzehuanzhe(item) {
  125. this.huanzheID = item.id
  126. this.value = item.name
  127. this.showpeople = false
  128. },
  129. getarchives: async function() {
  130. let res = await this.$request.post("/api/v1/patient/patientList")
  131. if (res.status == 0) {
  132. this.patientList = res.data.data
  133. }
  134. },
  135. gettime: async function() {
  136. let res = await this.$request.post("/api/v1/docter/timePeriodList")
  137. console.log(res)
  138. if (res.status == 0) {
  139. res.data.list.forEach(item => {
  140. item.start_time_period = item.start_time_period + '-' + item.end_time_period
  141. })
  142. this.multiSelector.push(res.data.dates)
  143. this.multiSelector.push(res.data.list)
  144. }
  145. },
  146. callbacktime(arr) {
  147. this.timehour = this.multiSelector[1][arr[1]].id
  148. this.yuyuevalue = this.multiSelector[0][arr[0]] + " " + this.multiSelector[1][arr[1]].start_time_period
  149. this.time = new Date().getFullYear() + "-" + this.multiSelector[0][arr[0]]
  150. },
  151. //添加就诊人
  152. addPeople(e) {
  153. uni.navigateTo({
  154. url: "../archives/add_archives"
  155. })
  156. },
  157. xuanzefuwu() {
  158. uni.navigateTo({
  159. url: "mechanism"
  160. })
  161. },
  162. vaccinesList() {
  163. uni.navigateTo({
  164. url: "vaccinesList"
  165. })
  166. },
  167. yuyuetime() {
  168. this.show = true
  169. },
  170. gotopay() {
  171. if (this.yimiaoInfo != null && this.doctor != null && this.huanzheID != "" && this.timehour != "") {
  172. let obj = {
  173. product_type: 4,
  174. patient_id: this.huanzheID,
  175. total_amount: this.yimiaoInfo.price / 100,
  176. organization_id: this.doctor.id,
  177. schedule_date: this.time,
  178. time_period_id: this.timehour,
  179. vaccine_id: this.yimiaoInfo.id,
  180. payment_type: 2
  181. }
  182. uni.navigateTo({
  183. url: "../order/payment?data=" + JSON.stringify(obj)
  184. })
  185. } else {
  186. uni.showToast({
  187. title: "请填写完整",
  188. icon: "none"
  189. })
  190. }
  191. },
  192. gotodoctorinfo(id){
  193. uni.navigateTo({
  194. url: "../doctor_related/doctor_info?id=" + id
  195. })
  196. }
  197. }
  198. }
  199. </script>
  200. <style lang="scss" scoped>
  201. .main {}
  202. .popup_title {
  203. height: 15%;
  204. width: 100%;
  205. display: flex;
  206. justify-content: center;
  207. align-items: center;
  208. border-bottom: 1rpx solid #f9f9f9;
  209. }
  210. .textareasty {
  211. background-color: white;
  212. border: 1px solid #efefef;
  213. border-radius: 16rpx;
  214. padding: 15rpx;
  215. margin: 15rpx auto;
  216. }
  217. .popup_title_text {
  218. width: auto;
  219. height: auto;
  220. font-size: 34rpx;
  221. font-weight: 540;
  222. }
  223. .popup_list {
  224. display: flex;
  225. height: 10vh;
  226. width: auto;
  227. border-bottom: 1rpx solid #f9f9f9;
  228. }
  229. .popup_list_title {
  230. height: 100%;
  231. width: 90%;
  232. display: inline-block;
  233. padding: 0 0 0 30rpx;
  234. .title {
  235. height: 50%;
  236. width: auto;
  237. font-size: 32rpx;
  238. font-weight: 500;
  239. padding: 20rpx 0 0 0;
  240. }
  241. .body {
  242. height: 50%;
  243. color: #a1a1a1;
  244. height: auto;
  245. width: auto;
  246. font-size: 30rpx;
  247. padding: 10rpx 0 0 0;
  248. }
  249. }
  250. .popup_button {
  251. height: 80rpx;
  252. width: 100%;
  253. display: flex;
  254. justify-content: center;
  255. align-items: center;
  256. view {
  257. color: #0b73ba;
  258. font-weight: 500;
  259. }
  260. }
  261. /**选择号码的样式和选择患者不同
  262. 需要更改样式*/
  263. .phone {
  264. height: 20%;
  265. width: 100%;
  266. .list {
  267. height: 100%;
  268. width: 100%;
  269. display: flex;
  270. padding: 0 10rpx 0 30rpx;
  271. .title {
  272. height: 100%;
  273. width: 65%;
  274. font-size: 32rpx;
  275. color: #7d7d7d;
  276. display: flex;
  277. align-items: center;
  278. }
  279. .phone {
  280. height: 100%;
  281. width: 30%;
  282. font-size: 32rpx;
  283. font-weight: 500;
  284. display: flex;
  285. justify-content: center;
  286. align-items: center;
  287. }
  288. .button {
  289. height: 100%;
  290. width: 5%;
  291. display: flex;
  292. justify-content: center;
  293. align-items: center;
  294. }
  295. }
  296. }
  297. </style>