Home.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. <template>
  2. <view class="bg container">
  3. <view class="top" :style="{ paddingTop: `${systemInfo.statusBarHeight}px` }">
  4. <view class="name">益禾堂</view>
  5. <view class="sub">
  6. <text>(江宁学院一食堂)</text>
  7. <text class="status">营业中</text>
  8. </view>
  9. </view>
  10. <u-row gutter="0" class="menu">
  11. <u-col span="4">
  12. <view class="menu-item" @click="navigateTo('/pages/Addstores')">
  13. <image src="../static/uview/imgs/info_icon_01.png" mode="widthFix"></image>
  14. <text>商品管理</text>
  15. </view>
  16. </u-col>
  17. <u-col span="4">
  18. <view class="menu-item" @click="navigateTo('/pages/Wallet')">
  19. <image src="../static/uview/imgs/info_icon_02.png" mode="widthFix"></image>
  20. <text>财务中心</text>
  21. </view>
  22. </u-col>
  23. <u-col span="4">
  24. <view class="menu-item">
  25. <image src="../static/uview/imgs/info_icon_03.png" mode="widthFix"></image>
  26. <text>营业状态</text>
  27. </view>
  28. </u-col>
  29. <u-col span="4">
  30. <view class="menu-item" @click="navigateTo('/pages/Evaluate')">
  31. <image src="../static/uview/imgs/info_icon_04.png" mode="widthFix"></image>
  32. <text>评价管理</text>
  33. </view>
  34. </u-col>
  35. <u-col span="4">
  36. <view class="menu-item" @click="navigateTo('/pages/News')">
  37. <image src="../static/uview/imgs/info_icon_05.png" mode="widthFix"></image>
  38. <text>消息中心</text>
  39. </view>
  40. </u-col>
  41. <u-col span="4">
  42. <view class="menu-item" @click="tool">
  43. <image src="../static/uview/imgs/info_icon_06.png" mode="widthFix"></image>
  44. <text>店铺工具</text>
  45. </view>
  46. </u-col>
  47. </u-row>
  48. <view class="card order">
  49. <view class="name">
  50. <text class="text1">代处理订单</text>
  51. <view class="more">
  52. <text @click="all">更多</text>
  53. <u-icon name="arrow-right"></u-icon>
  54. </view>
  55. </view>
  56. <u-row gutter="0" class="order-menu">
  57. <u-col span="4">
  58. <view class="text-item line">
  59. <text class="text1">20</text>
  60. <text class="text2">代付款</text>
  61. </view>
  62. </u-col>
  63. <u-col span="4">
  64. <view class="text-item line">
  65. <text class="text1">20</text>
  66. <text class="text2">待配送</text>
  67. </view>
  68. </u-col>
  69. <u-col span="4">
  70. <view class="text-item">
  71. <text class="text1">20</text>
  72. <text class="text2">带退款</text>
  73. </view>
  74. </u-col>
  75. </u-row>
  76. </view>
  77. <view class="card datas">
  78. <view class="name"><text class="text1">数据统计</text></view>
  79. <!-- <view style="padding-left:10px;"> -->
  80. <u-tabs :list="tabs" :current="nowTab" :is-scroll="false" :active-color="$colors.prim" @change="changeTabs"></u-tabs>
  81. <!-- </view> -->
  82. <u-row gutter="0">
  83. <u-col span="4">
  84. <view class="text-item">
  85. <text class="text1">22</text>
  86. <text class="text2">营业收入(元)</text>
  87. </view>
  88. </u-col>
  89. <u-col span="4">
  90. <view class="text-item">
  91. <text class="text1">22</text>
  92. <text class="text2">营业收入(元)</text>
  93. </view>
  94. </u-col>
  95. <u-col span="4">
  96. <view class="text-item">
  97. <text class="text1">22</text>
  98. <text class="text2">营业收入(元)</text>
  99. </view>
  100. </u-col>
  101. <u-col span="4">
  102. <view class="text-item">
  103. <text class="text1">22</text>
  104. <text class="text2">营业收入(元)</text>
  105. </view>
  106. </u-col>
  107. <u-col span="4">
  108. <view class="text-item">
  109. <text class="text1">22</text>
  110. <text class="text2">营业收入(元)</text>
  111. </view>
  112. </u-col>
  113. <u-col span="4">
  114. <view class="text-item">
  115. <text class="text1">22</text>
  116. <text class="text2">营业收入(元)</text>
  117. </view>
  118. </u-col>
  119. </u-row>
  120. </view>
  121. <view class="card">
  122. <view class="name">
  123. <text class="text1">销售数据</text>
  124. <view class="btns">
  125. <view class="btn-item" :class="{ active: type === 0 }" @click="type = 0">本周</view>
  126. <view class="btn-item" :class="{ active: type === 1 }" @click="type = 1">本月</view>
  127. </view>
  128. </view>
  129. <view class="charts-box"><qiun-data-charts type="line" :chartData="chartData" :echartsApp="true" :disableScroll="true" background="none" /></view>
  130. </view>
  131. </view>
  132. </template>
  133. <script>
  134. import { mapState } from 'vuex';
  135. export default {
  136. data() {
  137. return {
  138. tabs: [
  139. {
  140. name: '今天'
  141. },
  142. {
  143. name: '昨天'
  144. },
  145. {
  146. name: '本周'
  147. },
  148. {
  149. name: '本月'
  150. },
  151. {
  152. name: '本周'
  153. }
  154. ],
  155. nowTab: 0,
  156. type: 0,
  157. chartData: {
  158. categories: ['2016', '2017', '2018', '2019', '2020', '2021'],
  159. series: [
  160. {
  161. name: '成交量A',
  162. data: [35, 8, 25, 37, 4, 20]
  163. }
  164. ]
  165. }
  166. };
  167. },
  168. computed: {
  169. ...mapState(['systemInfo'])
  170. },
  171. methods: {
  172. changeTabs(index) {
  173. this.nowTab = index;
  174. },
  175. all(){
  176. uni.switchTab({
  177. url: '/pages/Orders'
  178. });
  179. },
  180. tool(){
  181. uni.switchTab({
  182. url: '/pages/Mine'
  183. });
  184. }
  185. }
  186. };
  187. </script>
  188. <style lang="scss" scoped>
  189. .container {
  190. padding: 0 20px 50px;
  191. }
  192. .bg {
  193. background: linear-gradient(180deg, #214bbe 0%, #214bbe 128px, #214bbe 150px, rgba(33, 75, 190, 0) 280px, #f2f3f5 280px);
  194. }
  195. .top {
  196. .name {
  197. font-size: 22px;
  198. color: #fff;
  199. }
  200. .sub {
  201. font-size: 16px;
  202. font-weight: bold;
  203. color: #ffffff;
  204. line-height: 26px;
  205. .status {
  206. font-size: 13px;
  207. font-weight: normal;
  208. color: #f4f7ff;
  209. background-color: rgba(255, 255, 255, 0.4);
  210. padding: 2px 5px;
  211. margin-left: 12px;
  212. }
  213. }
  214. }
  215. .menu {
  216. margin: 20px 0;
  217. border-radius: 12px;
  218. background-color: #ffffff;
  219. padding: 12px 0;
  220. }
  221. .menu-item {
  222. display: flex;
  223. flex-direction: column;
  224. align-items: center;
  225. padding: 19px 0 23px;
  226. &:active {
  227. background-color: rgba($color: #000000, $alpha: 0.05);
  228. border-radius: 12px;
  229. }
  230. image {
  231. width: 36px;
  232. height: 36px;
  233. }
  234. text {
  235. font-size: 14px;
  236. color: #000000;
  237. line-height: 20px;
  238. margin-top: 6px;
  239. }
  240. }
  241. .card {
  242. background: #ffffff;
  243. border-radius: 16px;
  244. padding-bottom: 10px;
  245. margin-bottom: 20px;
  246. .name {
  247. display: flex;
  248. align-items: center;
  249. justify-content: space-between;
  250. padding: 20px 12px 10px;
  251. .text1 {
  252. font-size: 18px;
  253. font-weight: bolder;
  254. color: #1c1c1c;
  255. line-height: 26px;
  256. }
  257. .more {
  258. font-size: 13px;
  259. color: #aaabad;
  260. line-height: 24px;
  261. display: flex;
  262. align-items: center;
  263. }
  264. .btns {
  265. display: flex;
  266. align-items: center;
  267. .btn-item {
  268. width: 66px;
  269. height: 32px;
  270. text-align: center;
  271. line-height: 32px;
  272. font-size: 12px;
  273. color: #626366;
  274. background-color: #f8f9fa;
  275. &.active {
  276. background-color: $u-type-primary-light;
  277. color: $u-type-primary;
  278. }
  279. &:active {
  280. background-color: $u-type-primary;
  281. color: #fff;
  282. }
  283. }
  284. }
  285. }
  286. }
  287. .order {
  288. .line {
  289. &::after {
  290. content: '';
  291. width: 1px;
  292. position: absolute;
  293. right: 0;
  294. top: 7px;
  295. bottom: 6px;
  296. background-color: #e5e5e5;
  297. }
  298. }
  299. }
  300. .text-item {
  301. position: relative;
  302. display: flex;
  303. flex-direction: column;
  304. align-items: center;
  305. justify-content: center;
  306. padding: 10px 0;
  307. &:active {
  308. background-color: rgba($color: #000000, $alpha: 0.05);
  309. border-radius: 4px;
  310. }
  311. .text1 {
  312. font-size: 30px;
  313. font-family: OSP;
  314. color: $u-type-primary;
  315. line-height: 40px;
  316. margin-top: 0;
  317. }
  318. .text2 {
  319. font-size: 13px;
  320. color: $u-type-primary;
  321. line-height: 18px;
  322. margin-top: 5px;
  323. }
  324. }
  325. .datas {
  326. .text-item {
  327. align-items: flex-start;
  328. padding: 10px 18px;
  329. }
  330. }
  331. </style>