index.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view class="app-container">
  3. <uni-nav-bar ref="refTitle" dark :fixed="true" shadow background-color="#007AFF" status-bar :title="title" />
  4. <uni-card is-full :is-shadow="false" v-if="pendingStockMoveCount>0">
  5. <div class="uni-card-div" @click="navClick('pendingStockMove')" >
  6. <text class="t-icon iconhuoche"></text>
  7. <text style="font-size:20px;">司机审核</text>
  8. <text style="width:50px;text-align:center;font-size:16px;color:red;">
  9. {{ pendingStockMoveCount }}
  10. </text>
  11. </div>
  12. </uni-card>
  13. <uni-card is-full :is-shadow="false" v-if="taskStockMoveCount>0">
  14. <div class="uni-card-div" @click="navClick('taskStockMove')">
  15. <text class="t-icon icont-icon-svg-09"></text>
  16. <text style="font-size:20px;">移位任务</text>
  17. <text style="width:50px;text-align:center;font-size:16px;color:red;">
  18. {{ taskStockMoveCount }}
  19. </text>
  20. </div>
  21. </uni-card>
  22. <uni-list>
  23. <!-- <uni-list :border="true">
  24. <div style="display: flex;align-items:center;justify-content:space-between;height: 60px;" @click="navClick" v-if="pendingStockMoveCount>0">
  25. <text class="t-icon iconhuoche" ></text>
  26. <text style="font-size:20px;">司机审核</text>
  27. <text style="width:50px;text-align:center;font-size:16px;color:red;">
  28. {{ pendingStockMoveCount }}
  29. </text>
  30. </div>
  31. <div style="display: flex;align-items:center;justify-content:space-between;height: 60px;" @click="navClick" v-if="pendingStockMoveCount>0">
  32. <text class="t-icon iconhuoche" ></text>
  33. <text style="font-size:20px;">移位任务</text>
  34. <text style="width:50px;text-align:center;font-size:16px;color:red;">
  35. {{ pendingStockMoveCount }}
  36. </text>
  37. </div>
  38. </uni-list> -->
  39. </uni-list>
  40. </view>
  41. </template>
  42. <script>
  43. import {
  44. checkListStockMoveCount,
  45. taskMoveListCount
  46. } from '@/api/wms/report.js'
  47. export default {
  48. data() {
  49. return {
  50. pendingStockMoveCount: 0,
  51. taskStockMoveCount: 0,
  52. title: "任务",
  53. };
  54. },
  55. created() {
  56. //在onShow中执行了,所以不需要
  57. //this.getList()
  58. },
  59. onShow() {
  60. this.getList();
  61. },
  62. methods: {
  63. getList() {
  64. let that = this;
  65. let queryParams = {
  66. status: 1,
  67. }
  68. //司机审核
  69. checkListStockMoveCount(queryParams).then(res => {
  70. if (res.code === 200) {
  71. that.pendingStockMoveCount = res.data
  72. }
  73. });
  74. //移位单(发货员)
  75. taskMoveListCount().then(res => {
  76. if (res.code === 200) {
  77. that.taskStockMoveCount = res.data
  78. }
  79. });
  80. },
  81. navClick(flag) {
  82. if(flag=='pendingStockMove'){
  83. uni.navigateTo({
  84. url: "/pages/menu/stockMove/driverCheck"
  85. });
  86. }else if(flag=='taskStockMove'){
  87. uni.navigateTo({
  88. url: "/pages/menu/stockMove/taskStockMove"
  89. });
  90. }
  91. },
  92. },
  93. onLoad: function(options) {
  94. this.$nextTick(() => {
  95. this.title = "任务(" + uni.getStorageSync('name') + ")";
  96. });
  97. },
  98. }
  99. </script>
  100. <style lang="less">
  101. .t-icon {
  102. display: inline-block;
  103. width: 40px;
  104. height: 40px;
  105. background-repeat: no-repeat;
  106. background-position: center;
  107. background-size: 100%;
  108. }
  109. .uni-card-div {
  110. display: flex;
  111. align-items:center;
  112. justify-content:space-between;
  113. }
  114. </style>