materialReceiving.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view class="materialReceiving">
  3. <view class="radio">
  4. <uni-data-checkbox v-model="type" :localdata="typeList"></uni-data-checkbox>
  5. </view>
  6. <ul>
  7. <li v-for="i in listData" :key="i.id" v-if="i.status == type || type == 0">
  8. <view class="text-content" style="padding: 0 20rpx;">
  9. <view class="">
  10. 物料编码:{{i.materialCode}}
  11. </view>
  12. <view class="">
  13. 物料名称:{{i.materialName}}
  14. </view>
  15. <view class="" style="overflow: hidden;">
  16. 出库时间:{{i.submitTime}}
  17. <span class="right-text">数量 <e style="color: #EF0000;">{{i.quantity}}</e></span>
  18. </view>
  19. <view class="" style="border-bottom: 1px solid #979797;overflow: hidden;">
  20. 出库人员:{{i.submitUserName}}
  21. <span class="right-text">接收人员: {{i.receiveUserName}}</span>
  22. </view>
  23. </view>
  24. <view class="list-btn-box">
  25. <span>
  26. 待接收
  27. </span>
  28. <view class="canle" v-if="i.status == 4" @click="ignore(i.id)">
  29. 忽略
  30. </view>
  31. </view>
  32. </li>
  33. </ul>
  34. </view>
  35. </template>
  36. <script>
  37. export default{
  38. data(){
  39. return{
  40. type:0,
  41. typeList:[{
  42. text: '全部',
  43. value: 0
  44. },{
  45. text: '待接收',
  46. value: 2
  47. }, {
  48. text: '已驳回',
  49. value: 4
  50. }],
  51. listData:[],
  52. account:null,
  53. }
  54. },
  55. methods:{
  56. getList(account){
  57. const v =this
  58. v.$post('/materialReceiving/toBeReceivedList',{
  59. submitUserAccount:account
  60. }).then(res=>{
  61. v.listData = res.data
  62. })
  63. },
  64. ignore(id){
  65. const v = this
  66. v.$post('/materialReceiving/ignore',{
  67. id:id
  68. }).then(res=>{
  69. if(res.code == 200){
  70. uni.showToast({
  71. title: '操作成功'
  72. })
  73. this.getList(v.account)
  74. }
  75. })
  76. },
  77. },
  78. onLoad(){
  79. const v = this
  80. uni.getStorage({
  81. key: 'Authorization',
  82. success: function (res) {
  83. v.account = res.data.account
  84. v.getList(v.account)
  85. }
  86. });
  87. },
  88. }
  89. </script>
  90. <style lang="less">
  91. .materialReceiving{
  92. min-height: 100vh;
  93. background: #f2f2f2;
  94. .radio{
  95. padding: 20rpx 30rpx;
  96. }
  97. ul{
  98. padding: 0 20rpx;
  99. li{
  100. background: #fff;
  101. margin-bottom: 36rpx;
  102. line-height: 70rpx;
  103. font-size: 28rpx;
  104. .right-text{
  105. float: right;
  106. display: inline-block;
  107. width: 240rpx;
  108. }
  109. .list-btn-box{
  110. height: 80rpx;
  111. line-height: 80rpx;
  112. color: #EF0000;
  113. padding-left: 60rpx;
  114. .canle{
  115. float: right;
  116. margin: 10rpx 26rpx 10rpx 0;
  117. background-color: #EF0000;
  118. color: #fff;
  119. line-height: 60rpx;
  120. height: 60rpx;
  121. width: 170rpx;
  122. text-align: center;
  123. border-radius: 10rpx;
  124. }
  125. }
  126. }
  127. }
  128. }
  129. </style>