workTable.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. <template>
  2. <view class="wrap">
  3. <view class="orderMonitor">
  4. <u-row class="userinfo-topbox" gutter="16" justify="center">
  5. <u-col span="6" text-align="center" style="margin: 1px;">
  6. <view style="color: #CCFFFF;">豫A99uk68</view>
  7. </u-col>
  8. <u-col span="6" text-align="center" style="margin: 1px;">
  9. <view style="color: #CCFFFF;"></view>
  10. </u-col>
  11. </u-row>
  12. <u-row style="margin-top: -25rpx;" class="userinfo-topbox" gutter="16" justify="center">
  13. <u-col span="6" text-align="center" style="margin: 1px;">
  14. <view style="color: #CCFFFF;">未配送订单</view>
  15. <view class="number">50</view>
  16. </u-col>
  17. <u-col span="6" text-align="center" style="margin: 1px;">
  18. <view style="color: #CCFFFF;">已配送订单</view>
  19. <view class="number">20</view>
  20. </u-col>
  21. </u-row>
  22. </view>
  23. <view class="workbench-title">常用应用</view>
  24. <view class="toolbar">
  25. <u-grid class="grid" :col="4" :border="false">
  26. <u-grid-item @click="navTo('/pages/feedback/scanOrderCode')" :index="0">
  27. <view class="home-icon icon-color02">
  28. <i class="iconfont icon-cangpeitubiao_huanhuorukutuihuoruku"></i>
  29. </view>
  30. <view class="grid-text">扫码装车</view>
  31. </u-grid-item>
  32. <u-grid-item @click="navTo('/pages/feedback/print')" :index="1">
  33. <view class="home-icon icon-color02">
  34. <i class="iconfont icon-fahuo"></i>
  35. </view>
  36. <view class="grid-text">支线交接</view>
  37. </u-grid-item>
  38. <u-grid-item @click="scanFabClick" :index="2">
  39. <view class="home-icon icon-color02">
  40. <i class="iconfont icon-kechengfankui"></i>
  41. </view>
  42. <view class="grid-text">扫码签收</view>
  43. </u-grid-item>
  44. </u-grid>
  45. </view>
  46. </view>
  47. </template>
  48. <script>
  49. import request from '@/common/libs/request.js';
  50. export default {
  51. data() {
  52. return {
  53. orderData:[],
  54. cardData: "",
  55. listData: {
  56. total: 0,
  57. page: 1,
  58. pageSize: 20
  59. },
  60. }
  61. },
  62. onLoad(){
  63. },
  64. mounted: function(option) {
  65. console.log("111111111111")
  66. // this.getCurrentItems();
  67. //不再这里调用,由主页刷新获取
  68. // this.getIndexCardPanelData();
  69. },
  70. methods: {
  71. navTo(url) {
  72. uni.navigateTo({
  73. url: url
  74. });
  75. },
  76. scanClickCar(){
  77. let _that = this;
  78. console.log("1111")
  79. uni.reLaunch({
  80. url: '/pages/feedback/scanOrderCode',
  81. })
  82. },
  83. scanFabClick(e) {
  84. let _that = this;
  85. //扫码
  86. uni.scanCode({
  87. onlyFromCamera: true,
  88. scanType: ['barCode', 'qrCode'],
  89. success: function(res) {
  90. console.log("121221",res)
  91. _that.billScanOrderCode(res.result)
  92. }
  93. })
  94. },
  95. billScanOrderCode(idOrder) {
  96. let _that = this;
  97. let dataInfo = {
  98. "idOrder": idOrder,
  99. }
  100. request.httpPost("/apis/dnyDriver/scanOrderCode", dataInfo, true).then(res => {
  101. if (res.httpCode == 200) {
  102. console.log("3333",res)
  103. }
  104. });
  105. },
  106. getCurrentItems(){
  107. const _that = this;
  108. var page = {
  109. pageIndex: _that.listData.page,
  110. pageSize: _that.listData.pageSize
  111. }
  112. var data = {
  113. "page": JSON.stringify(page)
  114. }
  115. request.httpPost("/apis/dnyDriver/showCurrentTransitioningItems", data, false).then(res => {
  116. if (res.httpCode == 200) {
  117. console.log("4444",res)
  118. _that.orderData = res.data
  119. }else {
  120. uni.showToast({
  121. title: res.msg,
  122. icon: "error"
  123. })
  124. }
  125. })
  126. },
  127. }
  128. }
  129. </script>
  130. <style lang="scss">
  131. .orderMonitor {
  132. height: 190upx;
  133. border-radius: 4upx;
  134. color: #F0F0F0;
  135. // background-image: linear-gradient(to right, #ffffff 0%, #ffffff 100%);
  136. background-image: linear-gradient(to right, #006699 0%, #6699CC 100%);
  137. border: #ffffff;
  138. padding: 16upx;
  139. margin: 16upx;
  140. box-shadow: 4upx 4upx 6upx rgba(102, 153, 204, 0.4);
  141. }
  142. .userinfo-topbox{
  143. padding: 4px 8px;
  144. color: #000000;
  145. .number{
  146. font-size: 14px;
  147. font-weight: bold;
  148. color: #FF9900;
  149. }
  150. }
  151. .userinfo-infobox{
  152. color: #000000;
  153. background-image: linear-gradient(to right, #CCCCCC 0%, #CCCCCC 100%);
  154. .number{
  155. font-size: 12px;
  156. }
  157. }
  158. .wrap {
  159. background: #FFFFFF;
  160. .search {
  161. padding: 20rpx 20rpx 0;
  162. background: #f8f8f8;
  163. height: 105rpx;
  164. }
  165. .scroll-list {
  166. height: calc(100vh - var(--window-top) - var(--window-bottom) - 105rpx); // 105rpx 为 .search 的高度
  167. width: 100%;
  168. .loadmore {
  169. padding: 30rpx;
  170. }
  171. }
  172. .box {
  173. padding-bottom: 10rpx;
  174. .item {
  175. margin: 0 20rpx 20rpx;
  176. padding: 8rpx 20rpx;
  177. border-radius: 20rpx;
  178. box-sizing: border-box;
  179. background-color: #fff;
  180. font-size: 28rpx;
  181. .title {
  182. display: flex;
  183. justify-content: space-between;
  184. background-color: #fff;
  185. padding-left: 15rpx;
  186. align-items: center;
  187. .text {
  188. margin: 0 20rpx;
  189. font-size: 35rpx;
  190. font-weight: bold;
  191. }
  192. }
  193. }
  194. }
  195. .list {
  196. .u-cell-item-box {
  197. .u-swipe-content {
  198. width: 750rpx;
  199. }
  200. .u-cell_title {
  201. overflow: hidden;
  202. white-space: nowrap;
  203. text-overflow: ellipsis;
  204. min-width: 655rpx;
  205. }
  206. .u-border-bottom:last-child:after {
  207. border-bottom: 0;
  208. }
  209. }
  210. }
  211. .form {
  212. display: flex;
  213. flex-direction: column;
  214. padding: 20rpx 30rpx;
  215. .u-cell-item-box {
  216. border-radius: 20rpx;
  217. }
  218. }
  219. .form-footer {
  220. display: flex;
  221. margin: 10rpx;
  222. padding-bottom: 30rpx;
  223. .btn {
  224. flex: 1;
  225. margin: 20rpx;
  226. }
  227. }
  228. .u-cell-box {
  229. .u-cell {
  230. font-size: 30rpx;
  231. }
  232. .u-cell_title {
  233. font-size: 30rpx;
  234. }
  235. .u-cell__left-icon-wrap {
  236. margin-right: 18rpx;
  237. }
  238. }
  239. }
  240. .workbench-title {
  241. font-size: 32rpx;
  242. font-weight: bold;
  243. color: #333333;
  244. padding: 15px 30rpx;
  245. }
  246. .grid {
  247. .grid-icon {
  248. color: #666;
  249. }
  250. .grid-text {
  251. font-size: 24rpx;
  252. padding: 15rpx;
  253. color: #202328;
  254. }
  255. }
  256. .toolbar {
  257. background-color: #fff;
  258. }
  259. </style>