picking.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <view class="aa">
  3. <view class="card-content">
  4. <uni-collapse accordion :show-animation="true">
  5. <uni-collapse-item :show-animation="true" :typeOpen='1' v-for="item in list" :key="item.matnr">
  6. <view slot='title' class="collapse-title">
  7. <view class="report-item" >
  8. <view class="report-col">{{item.matnr}}</view>
  9. <view class="report-col">投料数量:{{item.menge}}</view>
  10. </view>
  11. </view>
  12. <view class="card-list">
  13. <view class="list-item" v-for="(itm, index) in processeDetail" :key='index'>
  14. <view class="label">{{itm.label}}</view>
  15. <view>{{item[itm.key]}}</view>
  16. </view>
  17. </view>
  18. </uni-collapse-item>
  19. </uni-collapse>
  20. <view class="noData" v-if="!list.length">
  21. 暂无数据
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import card from '@/components/card/card'
  28. import { getFeedInfo } from "@/api/report/index"
  29. export default {
  30. components:{card},
  31. props:{
  32. orderId:[Number, String],
  33. },
  34. data(){
  35. return {
  36. processeDetail:[
  37. {label:'投料时间', key: 'budat'},
  38. {label:'投料库存地点', key: 'lgort'},
  39. {label:'物料代码', key: 'matnr'},
  40. {label:'物料描述', key: 'maktx'},
  41. {label:'投料批次', key: 'charg'},
  42. {label:'投料数量', key: 'menge'},
  43. ],
  44. list:[],
  45. detailObj:{},
  46. curId:null,
  47. }
  48. },
  49. watch:{
  50. orderId:{
  51. immediate: true,
  52. handler(){
  53. if(this.orderId){
  54. this.getDetail()
  55. }
  56. }
  57. }
  58. },
  59. methods:{
  60. getDetail(){
  61. getFeedInfo(this.orderId).then(res => {
  62. console.log(res,'res');
  63. this.list = res
  64. })
  65. },
  66. handleClose(){
  67. this.$refs.inputDialog.close()
  68. }
  69. }
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. .report-item{
  74. display: flex;
  75. justify-content: space-between;
  76. align-items: flex-start;
  77. flex-wrap: wrap;
  78. margin-bottom: 30rpx;
  79. padding: 10rpx 0;
  80. border-bottom: 1rpx solid #ccc;
  81. .report-col{
  82. width: 50%;
  83. margin-bottom: 10rpx;
  84. font-size: $uni-font-size-lg;
  85. .view-detail{
  86. width: 180rpx;
  87. height: 60rpx;
  88. line-height: 60rpx;
  89. color: $j-primary-green;
  90. margin: 0 0 0 auto;
  91. }
  92. }
  93. }
  94. .collapse-title{
  95. font-size: $uni-font-size-lg;
  96. }
  97. .card-list{
  98. padding: 30rpx;
  99. border-bottom: 1rpx solid #ccc;
  100. .list-item{
  101. border-bottom: 1rpx dashed #ccc;
  102. font-size: $uni-font-size-lg;
  103. display: flex;
  104. justify-content: space-between;
  105. align-items: center;
  106. padding: 16rpx 0;
  107. }
  108. }
  109. .noData {
  110. font-size: $uni-font-size-lg;
  111. text-align: center;
  112. padding: 20rpx 0;
  113. }
  114. </style>