InventoryDtl.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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.recordDetailsId" @click="toRouter(i)">
  6. <view class="fl">
  7. <view class="" style="color: #aaaaaa;">
  8. {{i.materialId}} <span style="margin-left: 50rpx;">{{i.materialName}} </span>
  9. </view>
  10. <view class="">
  11. 库存件数:{{i.materialCount}} <span style="margin-left: 50rpx;">库存数量:{{i.materialSum}}</span>
  12. </view>
  13. <view :style="i.recordNum == 0 ? 'color:#D9001B' : 'color:#70B603'">
  14. 已盘点:{{i.recordNum}}
  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>
  22. </template>
  23. <script>
  24. import {
  25. getInfo
  26. } from "@/util/api.js";
  27. import {dateFormat,getTime} from '../../util/uitl.js'
  28. export default {
  29. data() {
  30. return {
  31. listData:[],
  32. req:{
  33. keyword:null,
  34. }
  35. }
  36. },
  37. onLoad(option) {
  38. const v = this
  39. v.req.recordId = option.id
  40. v.getData()
  41. },
  42. methods: {
  43. reload(){
  44. this.req.keyword = null
  45. this.getData()
  46. },
  47. getData(){
  48. const v = this
  49. v.$post('/wx/record/getDetailsList',v.req).then(res=>{
  50. v.listData = res.data
  51. })
  52. },
  53. toRouter(id){
  54. const v = this
  55. uni.navigateTo({
  56. url: '/pages/Inventory/InventorySubmit?data=' + encodeURIComponent(JSON.stringify(id))
  57. })
  58. },
  59. },
  60. }
  61. </script>
  62. <style lang="less">
  63. .check{
  64. .addQrcode-list {
  65. height: 100rpx;
  66. display: flex;
  67. justify-content: space-between;
  68. padding: 15rpx;
  69. border-bottom: 1rpx solid #dcdcdc;
  70. font-size: 24rpx;
  71. .fr {
  72. line-height: 100rpx;
  73. color: #0066CC;
  74. }
  75. }
  76. }
  77. </style>