index.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <template>
  2. <view class="operation-container">
  3. <!-- 快递操作区域 -->
  4. <view class="section">
  5. <view class="section-title">快递</view>
  6. <view class="grid-container">
  7. <view v-for="(item, index) in expressOperations" :key="index" class="grid-item" :class="item.type"
  8. @click="handleNavigation(item.path)">
  9. {{ item.name }}
  10. </view>
  11. </view>
  12. </view>
  13. <!-- 审核操作区域 -->
  14. <view class="section">
  15. <view class="section-title">审核</view>
  16. <view class="grid-container">
  17. <view v-for="(item, index) in auditOperations" :key="index" class="grid-item" :class="item.type"
  18. @click="handleNavigation(item.path)">
  19. {{ item.name }}
  20. </view>
  21. </view>
  22. </view>
  23. <!-- 统计操作区域 -->
  24. <view class="section">
  25. <view class="section-title">统计</view>
  26. <view class="grid-container">
  27. <view v-for="(item, index) in statisticsOperations" :key="index" class="grid-item" :class="item.type"
  28. :style="{ gridColumn: item.span ? 'span 2' : 'span 1' }" @click="handleNavigation(item.path)">
  29. {{ item.name }}
  30. </view>
  31. </view>
  32. </view>
  33. <!-- WMS操作区域 -->
  34. <view class="section">
  35. <view class="section-title">WMS操作</view>
  36. <view class="grid-container">
  37. <view v-for="(item, index) in wmsOperations" :key="index" class="grid-item" :class="item.type"
  38. :style="{ gridColumn: item.span ? 'span 2' : 'span 1' }" @click="handleNavigation(item.path)">
  39. {{ item.name }}
  40. </view>
  41. </view>
  42. </view>
  43. <!-- 线下核单 -->
  44. <view class="section">
  45. <view class="section-title">线下核单</view>
  46. <view class="grid-container">
  47. <view v-for="(item, index) in offlineOperations" :key="index" class="grid-item" :class="item.type"
  48. @click="handleNavigation(item.path)">
  49. {{ item.name }}
  50. </view>
  51. </view>
  52. </view>
  53. <!-- 录入信息 -->
  54. <view class="section">
  55. <view class="section-title">录入信息</view>
  56. <view class="grid-container">
  57. <view v-for="(item, index) in entryOperations" :key="index" class="grid-item" :class="item.type"
  58. @click="handleNavigation(item.path)">
  59. {{ item.name }}
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </template>
  65. <script setup>
  66. import {
  67. ref
  68. } from 'vue'
  69. // 快递操作列表
  70. const expressOperations = ref([{
  71. name: '中转\n\r签收',
  72. path: '/pages/index/express/transfer-sign',
  73. type: 'primary'
  74. },
  75. {
  76. name: '到仓\n\r签收',
  77. path: '/pages/index/express/warehouse-sign',
  78. type: 'warning'
  79. },
  80. {
  81. name: '重量\n\r修改',
  82. path: '/pages/index/express/weight-modify',
  83. type: 'primary'
  84. },
  85. {
  86. name: '快速\n\r验收',
  87. path: '/pages/index/express/quick-check',
  88. type: 'warning'
  89. },
  90. {
  91. name: '路由签收\n\r异常',
  92. path: '/pages/index/express/route-exception',
  93. type: 'primary'
  94. },
  95. {
  96. name: '快速\n\r拆包',
  97. path: '/pages/index/express/quick-unpack',
  98. type: 'warning'
  99. },
  100. ])
  101. // 审核操作列表
  102. const auditOperations = ref([{
  103. name: '确认\n\r收货',
  104. path: '/pages/index/audit/confirm-receipt',
  105. type: 'primary'
  106. },
  107. {
  108. name: '扫书\n\r查单',
  109. path: '/pages/index/audit/scan-order',
  110. type: 'warning'
  111. },
  112. {
  113. name: '根据快递单\n\r或订单',
  114. path: '/pages/index/audit/express-order',
  115. type: 'warning'
  116. },
  117. {
  118. name: '根据\n\r发件人',
  119. path: '/pages/index/audit/sender',
  120. type: 'primary'
  121. },
  122. ])
  123. // WMS操作列表
  124. const wmsOperations = ref([{
  125. name: '中等\n\r入库',
  126. path: '/pages/index/wms/medium-in',
  127. type: 'primary'
  128. },
  129. {
  130. name: '良品\n\r入库',
  131. path: '/pages/index/wms/good-in',
  132. type: 'warning'
  133. },
  134. {
  135. name: '次品\n\r入库',
  136. path: '/pages/index/wms/secondary-in',
  137. type: 'primary'
  138. },
  139. {
  140. name: '不良\n\r入库',
  141. path: '/pages/index/wms/bad-in',
  142. type: 'warning'
  143. },
  144. {
  145. name: '不良\n\r出库',
  146. path: '/pages/index/wms/bad-out',
  147. type: 'primary'
  148. },
  149. {
  150. name: '不良\n\r下架',
  151. path: '/pages/index/wms/bad-off',
  152. type: 'warning'
  153. },
  154. {
  155. name: '订单\n\r查询',
  156. path: '/pages/index/wms/order-query',
  157. type: 'primary'
  158. },
  159. {
  160. name: '库位\n\r订单',
  161. path: '/pages/index/wms/location-order',
  162. type: 'warning'
  163. },
  164. {
  165. name: '快速盘点',
  166. path: '/pages/index/wms/speedy-check',
  167. type: 'primary',
  168. span: 24
  169. },
  170. ])
  171. // 统计操作列表
  172. const statisticsOperations = ref([{
  173. name: '审核统计',
  174. path: '/pages/index/statistic/audit',
  175. type: 'warning',
  176. span: 24
  177. },
  178. {
  179. name: '售后\n\r统计',
  180. path: '/pages/index/statistic/after-sale',
  181. type: 'primary'
  182. },
  183. {
  184. name: '打包\n\r统计',
  185. path: '/pages/index/statistic/package',
  186. type: 'warning'
  187. },
  188. ])
  189. //线下核单
  190. const offlineOperations = ref([{
  191. name: '线下\n\r核单',
  192. path: '/pages/index/offline/check-order',
  193. type: 'primary'
  194. },
  195. {
  196. name: '核单\n\r记录',
  197. path: '/pages/index/offline/check-record',
  198. type: 'warning'
  199. },
  200. ])
  201. //录入信息
  202. const entryOperations = ref([{
  203. name: '扫码\n\r查书',
  204. path: '/pages/index/entry/scan-book',
  205. type: 'primary'
  206. },
  207. {
  208. name: '录入\n\r书籍重量',
  209. path: '/pages/index/entry/book-weight',
  210. type: 'warning'
  211. },
  212. ])
  213. // 页面跳转方法
  214. const handleNavigation = (path) => {
  215. uni.navigateTo({
  216. url: path,
  217. fail: () => {
  218. uni.showToast({
  219. title: '页面跳转失败',
  220. icon: 'none',
  221. })
  222. },
  223. })
  224. }
  225. </script>
  226. <style lang="scss" scoped>
  227. .operation-container {
  228. padding: 20rpx;
  229. box-sizing: border-box;
  230. /* #ifdef H5 */
  231. padding-bottom: 100rpx;
  232. /* #endif */
  233. }
  234. .section {
  235. margin-bottom: 30rpx;
  236. background: #ffffff;
  237. border-radius: 16rpx;
  238. padding: 20rpx;
  239. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
  240. .section-title {
  241. font-size: 50rpx;
  242. font-weight: 600;
  243. color: #333;
  244. padding: 20rpx;
  245. padding-top: 0;
  246. border-bottom: 2rpx solid #f0f0f0;
  247. margin-bottom: 20rpx;
  248. }
  249. .grid-container {
  250. display: grid;
  251. grid-template-columns: repeat(2, 1fr);
  252. gap: 20rpx;
  253. padding: 10rpx;
  254. .grid-item {
  255. min-height: 148rpx;
  256. display: flex;
  257. align-items: center;
  258. justify-content: center;
  259. text-align: center;
  260. padding: 20rpx 30rpx;
  261. line-height: 60rpx;
  262. font-size: 50rpx;
  263. border-radius: 12rpx;
  264. color: #ffffff;
  265. transition: all 0.3s;
  266. white-space: pre-wrap;
  267. &.primary {
  268. background: linear-gradient(135deg, #4cd964, #3ac555);
  269. &:active {
  270. background: linear-gradient(135deg, #3ac555, #2fb548);
  271. }
  272. }
  273. &.warning {
  274. background: linear-gradient(135deg, #ff9500, #ff8000);
  275. &:active {
  276. background: linear-gradient(135deg, #ff8000, #e67300);
  277. }
  278. }
  279. &:active {
  280. transform: scale(0.98);
  281. }
  282. }
  283. }
  284. }
  285. </style>