manager.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. <template>
  2. <view class="container">
  3. <view class="user-info-box">
  4. <view class="box-l">
  5. <view class="img-box">
  6. <u-avatar :src="workbenchInfo.photographUrl || defaultImg" size="121rpx"
  7. mode="aspectFill"></u-avatar>
  8. </view>
  9. <view class="info-r">
  10. <view class="info-r-top">
  11. <span class="name">{{workbenchInfo.name || '-'}}</span>
  12. </view>
  13. <span class="phone">{{workbenchInfo.phoneNumber || '-'}}</span>
  14. </view>
  15. </view>
  16. <view class="box-r">
  17. <span class="btn" @click="toDept">查看管理科室</span>
  18. </view>
  19. </view>
  20. <view class="num-box flex-ac">
  21. <view class="num-item flex-ac">
  22. <view class="num-item-l">
  23. <span class="name">今日订单数</span>
  24. <span class="num">{{workbenchInfo.todayCount || 0}}</span>
  25. </view>
  26. <image src="/static/copy.png" mode="aspectFill"></image>
  27. </view>
  28. <view class="num-item flex-ac">
  29. <view class="num-item-l">
  30. <span class="name">总订单数</span>
  31. <span class="num">{{workbenchInfo.orderCount || 0}}</span>
  32. </view>
  33. <image src="/static/copy.png" mode="aspectFill"></image>
  34. </view>
  35. </view>
  36. <view class="order-box flex-dc">
  37. <view class="title-box flex-box-c-b">
  38. <span class="title">订单管理</span>
  39. <span class="more" @click="toPath(0)">查看全部></span>
  40. </view>
  41. <view class="order-list flex-box-a">
  42. <view class="order-item flex-box-cloum" v-for="item,index in orderType" :key="index"
  43. @click="toPath(item.index)">
  44. <image :src="item.icon" mode="aspectFill"></image>
  45. <span class="name">{{item.name}}</span>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="order-box flex-dc">
  50. <view class="title-box flex-box-c-b">
  51. <span class="title">应用中心</span>
  52. </view>
  53. <view class="order-list flex-box-a">
  54. <view class="order-item flex-box-cloum" @click="toPath(2)">
  55. <image src="@/static/my/icon-04.png" mode="aspectFill"></image>
  56. <span class="name">待服务</span>
  57. <u-badge type="error" max="99" :value="workbenchInfo.waitConfirmedCount" :offset="[-10, -10]"
  58. absolute></u-badge>
  59. </view>
  60. <view class="order-item flex-box-cloum" @click="toRefund">
  61. <image src="@/static/my/icon-04.png" mode="aspectFill"></image>
  62. <span class="name">退款售后</span>
  63. <u-badge type="error" max="99" :value="workbenchInfo.waitRefundCount" :offset="[-10, -10]"
  64. absolute></u-badge>
  65. </view>
  66. <view class="order-item flex-box-cloum" @click="toPage">
  67. <image src="@/static/my/icon-04.png" mode="aspectFill"></image>
  68. <span class="name">护工管理</span>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. </template>
  74. <script>
  75. import {
  76. getManageInfo,
  77. } from '@/api/hospital.js'
  78. export default {
  79. data() {
  80. return {
  81. defaultImg: require('@/static/default-head-photo.png'),
  82. workbenchInfo: {
  83. },
  84. orderType: [{
  85. index: 1,
  86. name: '待确认',
  87. icon: require('@/static/my/icon-04.png'),
  88. }, {
  89. index: 2,
  90. name: '待服务',
  91. icon: require('@/static/my/icon-04.png'),
  92. }, {
  93. index: 3,
  94. name: '服务中',
  95. icon: require('@/static/my/icon-04.png'),
  96. }, {
  97. index: 4,
  98. name: '待评价',
  99. icon: require('@/static/my/icon-04.png'),
  100. }, {
  101. index: 5,
  102. name: '已完成',
  103. icon: require('@/static/my/icon-04.png'),
  104. }, ],
  105. quickOrder: [{
  106. index: 1,
  107. name: '待服务',
  108. icon: require('@/static/my/icon-04.png'),
  109. value: 100
  110. }, {
  111. index: 2,
  112. name: '退款售后',
  113. icon: require('@/static/my/icon-04.png'),
  114. value: 10
  115. }, {
  116. index: 3,
  117. name: '护工管理',
  118. icon: require('@/static/my/icon-04.png'),
  119. value: 100
  120. }, ]
  121. }
  122. },
  123. onLoad() {
  124. this.getManageInfo()
  125. },
  126. methods: {
  127. //获取信息
  128. getManageInfo() {
  129. let that = this;
  130. getManageInfo().then(res => {
  131. if (res.code == 200) {
  132. let data = res.data;
  133. this.workbenchInfo = data;
  134. // data.unshift({
  135. // value: '全部',
  136. // code: undefined,
  137. // })
  138. // this.typeList = data;
  139. }
  140. })
  141. .catch((err) => {
  142. console.log(err);
  143. })
  144. },
  145. //查看管理科室
  146. toDept() {
  147. uni.navigateTo({
  148. url: '/pages/workbench/managementDept',
  149. })
  150. },
  151. toPath(val) {
  152. uni.navigateTo({
  153. url: '/pages/workbench/order/list?type=' + val
  154. })
  155. },
  156. toPage() {
  157. if (this.workbenchInfo.manageNursingFlag == 'Y') {
  158. uni.navigateTo({
  159. url: '/pages/workbench/caregiverManage?type=guanli',
  160. })
  161. } else {
  162. uni.showToast({
  163. title: '您没有权限',
  164. icon: 'none',
  165. duration: 2000,
  166. })
  167. }
  168. },
  169. toRefund(){
  170. uni.navigateTo({
  171. url: '/pages/workbench/refundOrder',
  172. })
  173. },
  174. //下拉刷新回调函数
  175. onPullDownRefresh() {
  176. // wx.setStorageSync('isChangeBanner', true);
  177. this.getManageInfo();
  178. setTimeout(function() {
  179. uni.stopPullDownRefresh();
  180. }, 1000);
  181. },
  182. }
  183. }
  184. </script>
  185. <style lang="scss" scoped>
  186. .container {
  187. padding: 30rpx;
  188. .user-info-box {
  189. display: flex;
  190. align-items: center;
  191. justify-content: space-between;
  192. padding: 20rpx;
  193. background-color: #fff;
  194. border-radius: 20rpx;
  195. .box-l {
  196. display: flex;
  197. align-items: center;
  198. .info-r {
  199. display: flex;
  200. flex-direction: column;
  201. margin-left: 25rpx;
  202. .info-r-top {
  203. display: flex;
  204. align-items: center;
  205. margin-bottom: 10rpx;
  206. .name {
  207. display: inline-flex;
  208. font-size: 36rpx;
  209. height: 36rpx;
  210. line-height: 36rpx;
  211. justify-content: center;
  212. font-weight: bold;
  213. }
  214. .status {
  215. display: inline-flex;
  216. font-size: 24rpx;
  217. margin-left: 10rpx;
  218. height: 40rpx;
  219. line-height: 40rpx;
  220. padding: 0 20rpx;
  221. background-color: #FFF9D9;
  222. color: #B16E55;
  223. border-radius: 50rpx;
  224. }
  225. }
  226. .phone {
  227. font-size: 28rpx;
  228. color: #101010;
  229. }
  230. }
  231. }
  232. .box-r {
  233. .btn {
  234. font-size: 28rpx;
  235. color: #B16E55;
  236. }
  237. }
  238. }
  239. .num-box {
  240. margin-top: 20rpx;
  241. .num-item {
  242. width: 48%;
  243. padding: 20rpx;
  244. background-color: #fff;
  245. border-radius: 20rpx;
  246. justify-content: center;
  247. &:first-child {
  248. margin-right: 20rpx;
  249. }
  250. .num-item-l {
  251. display: flex;
  252. align-items: center;
  253. flex-direction: column;
  254. margin-right: 20rpx;
  255. .name {
  256. font-size: 36rpx;
  257. color: #101010;
  258. }
  259. .num {
  260. font-size: 36rpx;
  261. font-weight: bold;
  262. color: #101010;
  263. }
  264. }
  265. image {
  266. width: 40rpx;
  267. height: 40rpx;
  268. border-radius: 50%;
  269. }
  270. }
  271. }
  272. .order-box {
  273. background-color: #fff;
  274. padding: 20rpx;
  275. border-radius: 20rpx;
  276. margin-top: 20rpx;
  277. .title-box {
  278. margin-bottom: 20rpx;
  279. .title {
  280. font-size: 36rpx;
  281. font-weight: bold;
  282. color: #101010;
  283. }
  284. .more {
  285. font-size: 28rpx;
  286. color: #9a9a9a;
  287. }
  288. }
  289. .order-list {
  290. .order-item {
  291. position: relative;
  292. margin: 20rpx 0;
  293. image {
  294. width: 90rpx;
  295. height: 90rpx;
  296. }
  297. .name {
  298. margin-top: 15rpx;
  299. font-size: 28rpx;
  300. color: #101010;
  301. }
  302. }
  303. }
  304. }
  305. }
  306. </style>