workTable.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  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;">{{defaultTruckCode}}</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/scancodeCar')" :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. defaultTruckCode:"",
  54. orderData:[],
  55. cardData: "",
  56. listData: {
  57. total: 0,
  58. page: 1,
  59. pageSize: 20
  60. },
  61. }
  62. },
  63. onLoad(){
  64. },
  65. mounted: function(option) {
  66. this.initData()
  67. // this.getCurrentItems();
  68. //不再这里调用,由主页刷新获取
  69. // this.getIndexCardPanelData();
  70. },
  71. methods: {
  72. initData() {
  73. let _that = this;
  74. request.httpPost("/dnyDriver/getDriverInfo", {}).then(res => {
  75. if (res.httpCode == 200) {
  76. uni.setStorageSync("idDefaultTruck", res.data.idDefaultTruck);
  77. _that.defaultTruckCode = res.data.defaultTruckCode
  78. } else {
  79. uni.showToast({
  80. title: res.msg,
  81. icon: "error"
  82. })
  83. }
  84. });
  85. },
  86. navTo(url) {
  87. uni.navigateTo({
  88. url: url
  89. });
  90. },
  91. scanClickCar(){
  92. let _that = this;
  93. console.log("1111")
  94. uni.reLaunch({
  95. url: '/pages/feedback/scanOrderCode',
  96. })
  97. },
  98. scanFabClick(e) {
  99. let _that = this;
  100. //扫码
  101. uni.scanCode({
  102. onlyFromCamera: true,
  103. scanType: ['barCode', 'qrCode'],
  104. success: function(res) {
  105. console.log("121221",res)
  106. _that.billScanOrderCode(res.result)
  107. }
  108. })
  109. },
  110. billScanOrderCode(idOrder) {
  111. let _that = this;
  112. let dataInfo = {
  113. "idOrder": idOrder,
  114. }
  115. request.httpPost("/dnyDriver/scanOrderCode", dataInfo, true).then(res => {
  116. if (res.httpCode == 200) {
  117. console.log("3333",res)
  118. }
  119. });
  120. },
  121. getCurrentItems(){
  122. const _that = this;
  123. var page = {
  124. pageIndex: _that.listData.page,
  125. pageSize: _that.listData.pageSize
  126. }
  127. var data = {
  128. "page": JSON.stringify(page)
  129. }
  130. request.httpPost("/dnyDriver/showCurrentTransitioningItems", data, false).then(res => {
  131. if (res.httpCode == 200) {
  132. console.log("4444",res)
  133. _that.orderData = res.data
  134. }else {
  135. uni.showToast({
  136. title: res.msg,
  137. icon: "error"
  138. })
  139. }
  140. })
  141. },
  142. }
  143. }
  144. </script>
  145. <style lang="scss">
  146. .orderMonitor {
  147. height: 190upx;
  148. border-radius: 4upx;
  149. color: #F0F0F0;
  150. // background-image: linear-gradient(to right, #ffffff 0%, #ffffff 100%);
  151. background-image: linear-gradient(to right, #006699 0%, #6699CC 100%);
  152. border: #ffffff;
  153. padding: 16upx;
  154. margin: 16upx;
  155. box-shadow: 4upx 4upx 6upx rgba(102, 153, 204, 0.4);
  156. }
  157. .userinfo-topbox{
  158. padding: 4px 8px;
  159. color: #000000;
  160. .number{
  161. font-size: 14px;
  162. font-weight: bold;
  163. color: #FF9900;
  164. }
  165. }
  166. .userinfo-infobox{
  167. color: #000000;
  168. background-image: linear-gradient(to right, #CCCCCC 0%, #CCCCCC 100%);
  169. .number{
  170. font-size: 12px;
  171. }
  172. }
  173. .wrap {
  174. background: #FFFFFF;
  175. .search {
  176. padding: 20rpx 20rpx 0;
  177. background: #f8f8f8;
  178. height: 105rpx;
  179. }
  180. .scroll-list {
  181. height: calc(100vh - var(--window-top) - var(--window-bottom) - 105rpx); // 105rpx 为 .search 的高度
  182. width: 100%;
  183. .loadmore {
  184. padding: 30rpx;
  185. }
  186. }
  187. .box {
  188. padding-bottom: 10rpx;
  189. .item {
  190. margin: 0 20rpx 20rpx;
  191. padding: 8rpx 20rpx;
  192. border-radius: 20rpx;
  193. box-sizing: border-box;
  194. background-color: #fff;
  195. font-size: 28rpx;
  196. .title {
  197. display: flex;
  198. justify-content: space-between;
  199. background-color: #fff;
  200. padding-left: 15rpx;
  201. align-items: center;
  202. .text {
  203. margin: 0 20rpx;
  204. font-size: 35rpx;
  205. font-weight: bold;
  206. }
  207. }
  208. }
  209. }
  210. .list {
  211. .u-cell-item-box {
  212. .u-swipe-content {
  213. width: 750rpx;
  214. }
  215. .u-cell_title {
  216. overflow: hidden;
  217. white-space: nowrap;
  218. text-overflow: ellipsis;
  219. min-width: 655rpx;
  220. }
  221. .u-border-bottom:last-child:after {
  222. border-bottom: 0;
  223. }
  224. }
  225. }
  226. .form {
  227. display: flex;
  228. flex-direction: column;
  229. padding: 20rpx 30rpx;
  230. .u-cell-item-box {
  231. border-radius: 20rpx;
  232. }
  233. }
  234. .form-footer {
  235. display: flex;
  236. margin: 10rpx;
  237. padding-bottom: 30rpx;
  238. .btn {
  239. flex: 1;
  240. margin: 20rpx;
  241. }
  242. }
  243. .u-cell-box {
  244. .u-cell {
  245. font-size: 30rpx;
  246. }
  247. .u-cell_title {
  248. font-size: 30rpx;
  249. }
  250. .u-cell__left-icon-wrap {
  251. margin-right: 18rpx;
  252. }
  253. }
  254. }
  255. .workbench-title {
  256. font-size: 32rpx;
  257. font-weight: bold;
  258. color: #333333;
  259. padding: 15px 30rpx;
  260. }
  261. .grid {
  262. .grid-icon {
  263. color: #666;
  264. }
  265. .grid-text {
  266. font-size: 24rpx;
  267. padding: 15rpx;
  268. color: #202328;
  269. }
  270. }
  271. .toolbar {
  272. background-color: #fff;
  273. }
  274. </style>