Inventory.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <view class="check">
  3. <uni-search-bar @confirm="getData" v-model="req.keyword" @cancel="reload">
  4. </uni-search-bar>
  5. <view class="addQrcode-list" v-for="(i,index) in listData" :key="index" @click="toRouter(i.id)">
  6. <view class="fl">
  7. <view class="" style="color: #aaaaaa;">
  8. 仓库名称:{{i.houseName}}
  9. </view>
  10. <view class="">
  11. 发起时间:<span>{{i.taskRunMinTime}}</span>
  12. </view>
  13. <view class="">
  14. 待盘点物料:{{i.notRecordNum}} <span style="color: #F59A23;margin-left: 40rpx;" >待盘点</span>
  15. </view>
  16. </view>
  17. <view class="fr">
  18. <uni-icons type="forward" color="#0066CC" size="30"></uni-icons>
  19. </view>
  20. </view>
  21. <view class="commons-no-data" v-if="listData.length == 0">
  22. 已经没有数据了。。
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import {
  28. getInfo
  29. } from "@/util/api.js";
  30. import {dateFormat,getTime} from '../../util/uitl.js'
  31. export default {
  32. data() {
  33. return {
  34. listData:[],
  35. req:{
  36. keyword:null,
  37. }
  38. }
  39. },
  40. onLoad() {
  41. const v = this
  42. v.getData()
  43. },
  44. methods: {
  45. reload(){
  46. this.req.keyword = null
  47. this.getData()
  48. },
  49. getData(){
  50. const v = this
  51. v.$post('/wx/record/getList',v.req).then(res=>{
  52. for (var i = 0; i < res.data.length; i++) {
  53. // res.data[i].taskRunMinTime = dateFormat(res.data[i].taskRunMinTime)
  54. }
  55. v.listData = res.data
  56. })
  57. },
  58. toRouter(id){
  59. const v = this
  60. console.log(id)
  61. uni.navigateTo({
  62. url: '/pages/Inventory/InventoryDtl?id=' + id
  63. })
  64. },
  65. },
  66. }
  67. </script>
  68. <style lang="less">
  69. .check{
  70. .addQrcode-list {
  71. height: 100rpx;
  72. display: flex;
  73. justify-content: space-between;
  74. padding: 15rpx;
  75. border-bottom: 1rpx solid #dcdcdc;
  76. font-size: 24rpx;
  77. .fr {
  78. line-height: 100rpx;
  79. color: #0066CC;
  80. }
  81. }
  82. }
  83. </style>