index.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <!-- 首页 -->
  3. <view>
  4. <view class="card_gas_cylinder">气瓶安全追溯管理系统</view>
  5. <view class="card_port center_in">{{genreTitle}}</view>
  6. <view class="card_cylinder">
  7. <view class="card_bottle" v-for="(item,index) in dataList" :key="index" @click="scanCodes(item)">
  8. <view class="card_fiche" :style="{backgroundColor:item.color}">
  9. <span class="iconfont icon_image" :class="item.icon"></span>
  10. <view class="title_hint">{{item.title}}</view>
  11. </view>
  12. </view>
  13. <!-- <view class="card_bottle" @click="scanning">
  14. <view class="card_fiche" :style="{backgroundColor:'#67C23A'}">
  15. <span class="iconfont icon_image icon-saomachaxun"></span>
  16. <view class="title_hint">扫码查询气瓶流转信息</view>
  17. </view>
  18. </view> -->
  19. <view style="width: 40%;margin: 30rpx 0rpx;"></view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. data() {
  26. return {
  27. dataList: [],
  28. aspirated: [{
  29. id: '25',
  30. title: '领重瓶出库',
  31. icon: 'icon-chukudan',
  32. color: '#22b9f9',
  33. }, {
  34. id: '27',
  35. title: '扫空瓶入库',
  36. icon: 'icon-fankudengji',
  37. color: '#6db1ff',
  38. }],
  39. shopList: [{
  40. id: '37',
  41. title: '门店重瓶出库',
  42. icon: 'icon-peizaizhuangche',
  43. color: '#f4b237',
  44. }, {
  45. id: '10',
  46. title: '门店空瓶出库',
  47. icon: 'icon-peizaizhuangche-xianxing',
  48. color: '#f4b237',
  49. }, {
  50. id: '21',
  51. title: '门店回收空瓶',
  52. icon: 'icon-recycling',
  53. color: '#8ac247',
  54. }, {
  55. id: '35',
  56. title: '门店确定未配送重瓶返库',
  57. icon: 'icon-fankudengji',
  58. color: '#22b9f9',
  59. }, {
  60. id: '33',
  61. title: '门店将重瓶退回司机',
  62. icon: 'icon-tuihuo',
  63. color: '#6db1ff',
  64. }],
  65. driverList: [{
  66. id: '11',
  67. title: '司机确定空瓶装车',
  68. icon: 'icon-owNote',
  69. color: '#22b9f9',
  70. }, {
  71. id: '12',
  72. title: '司机运输空瓶到达气站',
  73. icon: 'icon-yidaoda',
  74. color: '#8ac247',
  75. }, {
  76. id: '17',
  77. title: '司机确定重瓶从气站出库',
  78. icon: 'icon-chukudan',
  79. color: '#6db1ff',
  80. }, {
  81. id: '19',
  82. title: '司机交付门店',
  83. icon: 'icon-yunsonghejiaofu',
  84. color: '#f4b237',
  85. }],
  86. stationList: [{
  87. id: 'inspect',
  88. title: '充气前后检查',
  89. icon: 'icon-jianchaxiang',
  90. color: '#f4b237',
  91. }],
  92. genreTitle: '',
  93. }
  94. },
  95. mounted() {
  96. var userInfo = this.$cache.getCache('userInfo')
  97. if (userInfo.provUser) {
  98. if (userInfo.provUser.isorders == 0 && userInfo.provUser.userType == 3) {
  99. this.dataList = this.aspirated
  100. this.genreTitle = '送气员端'
  101. } else if (userInfo.provUser.userType == 3) {
  102. this.dataList = this.shopList
  103. this.genreTitle = '门店端'
  104. } else if (userInfo.provUser.userType == 4) {
  105. this.dataList = this.driverList
  106. this.genreTitle = '司机端'
  107. } else if (userInfo.provUser.userType == 5) {
  108. this.dataList = this.stationList
  109. this.genreTitle = '气站端'
  110. }
  111. } else {
  112. this.dataList = this.aspirated
  113. this.genreTitle = '送气员端'
  114. }
  115. },
  116. methods: {
  117. scanCodes(value) {
  118. if (['25', '27', '11', '12', '17', '19'].includes(value.id)) {
  119. uni.navigateTo({
  120. url: '/pages/home/selectStore?id=' + value.id + '&title=' + value.title
  121. });
  122. } else {
  123. uni.navigateTo({
  124. url: '/pages/order/delivery?id=' + value.id + '&title=' + value.title
  125. });
  126. }
  127. },
  128. // 扫码溯源
  129. scanning() {
  130. uni.navigateTo({
  131. url: '/pages/index/codeTracing'
  132. });
  133. }
  134. }
  135. }
  136. </script>
  137. <style lang="scss">
  138. .card_gas_cylinder {
  139. display: flex;
  140. justify-content: center;
  141. align-items: center;
  142. font-size: 46rpx;
  143. font-weight: bold;
  144. color: #027DB4;
  145. padding: 50rpx 20rpx 0rpx 20rpx;
  146. }
  147. .card_port {
  148. font-size: 40rpx;
  149. font-weight: bold;
  150. color: #027DB4;
  151. padding-bottom: 20rpx;
  152. }
  153. .card_cylinder {
  154. display: flex;
  155. flex-direction: row;
  156. flex-wrap: wrap;
  157. justify-content: space-evenly;
  158. }
  159. .card_bottle {
  160. margin: 30rpx 0rpx;
  161. width: 40%;
  162. display: flex;
  163. flex-direction: column;
  164. align-items: center;
  165. }
  166. .card_fiche {
  167. display: flex;
  168. align-items: center;
  169. flex-direction: column;
  170. justify-content: center;
  171. width: 100%;
  172. height: 240rpx;
  173. background-color: #027DB4;
  174. border-radius: 26rpx;
  175. }
  176. .icon_image {
  177. color: #fff;
  178. font-size: 80rpx;
  179. }
  180. .title_hint {
  181. margin-top: 20rpx;
  182. color: #fff;
  183. width: 80%;
  184. text-align: center;
  185. font-size: 32rpx;
  186. }
  187. </style>