weigh.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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="i.materialId" @click="toRouter(index)">
  6. <view class="fl">
  7. <view class="" style="color: #aaaaaa;">
  8. 质检单编号:{{i.id}}
  9. </view>
  10. <view class="">
  11. 物料名称:<span>{{i.materialName}}</span>
  12. </view>
  13. <view class="">
  14. 合同编号:{{i.purchaseBillNo}} <span style="margin-left: 40rpx;">批次号:{{i.batchNo}}</span>
  15. </view>
  16. <view class="name">
  17. 待质检数:{{i.notCheckNum}}
  18. </view>
  19. </view>
  20. <view class="fr">
  21. <uni-icons type="forward" color="#0066CC" size="30"></uni-icons>
  22. </view>
  23. </view>
  24. <view class="commons-no-data" v-if="listData.length == 0">
  25. 已经没有数据了。。
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import {
  31. getInfo
  32. } from "@/util/api.js";
  33. export default {
  34. data() {
  35. return {
  36. listData:[],
  37. req:{
  38. keyword:null,
  39. }
  40. }
  41. },
  42. onLoad() {
  43. const v = this
  44. v.getData()
  45. },
  46. methods: {
  47. reload(){
  48. this.req.keyword = null
  49. this.getData()
  50. },
  51. getData(){
  52. const v = this
  53. v.$post('/wx/check/list',v.req).then(res=>{
  54. v.listData = res.data
  55. })
  56. },
  57. toRouter(i){
  58. const v = this
  59. uni.navigateTo({
  60. url: '/pages/weigh/checkDtl?data=' + encodeURIComponent(JSON.stringify(v.listData[i]))
  61. })
  62. },
  63. },
  64. }
  65. </script>
  66. <style lang="less">
  67. .check{
  68. .addQrcode-list {
  69. height: 120rpx;
  70. display: flex;
  71. justify-content: space-between;
  72. padding: 15rpx;
  73. border-bottom: 1rpx solid #dcdcdc;
  74. font-size: 24rpx;
  75. .fr {
  76. line-height: 120rpx;
  77. color: #0066CC;
  78. }
  79. }
  80. }
  81. </style>