review.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <div>
  3. <uni-nav-bar title="退仓复核" :status-bar="true" background-color="#3F92F9" color="#FFF">
  4. <view slot="left">
  5. <u-icon name="account-fill" color="#FFF" size="35"></u-icon>
  6. <span style="padding: 0 5rpx;color: #FFFFFF;">{{ userInfo.name }}</span>
  7. </view>
  8. <view slot="right" @tap="$utils.open(`/pages/index/index`)">
  9. <span style="color: #FFFFFF;">返回</span>
  10. </view>
  11. </uni-nav-bar>
  12. <ul>
  13. <li v-for="i in checkList" :key="i.stockBackId">
  14. <view class="text">
  15. 退仓人员:{{i.realName}}
  16. </view>
  17. <view class="text">
  18. 提交时间:{{i.operationTime}}
  19. </view>
  20. <view class="text">
  21. 面料卷数:{{i.operationNum}}
  22. </view>
  23. <view class="text">
  24. 面料米数:{{i.operationMeters}}
  25. </view>
  26. <view class="btn-warp">
  27. <button style="background-color: red;" @click="open(i.stockBackId)">删除</button>
  28. <button style="" @click="toDtl(i.stockBackId)">去复核</button>
  29. </view>
  30. </li>
  31. </ul>
  32. <u-modal v-model="show" @confirm="listDetele(deleteid)" :content="content" :show-cancel-button="true" :mask-close-able="true"></u-modal>
  33. </div>
  34. </template>
  35. <script>
  36. export default {
  37. name: "xx",
  38. data() {
  39. return {
  40. checkList: [],
  41. show:false,
  42. content:"你确定删除这条信息?",
  43. deleteid:null,
  44. }
  45. },
  46. created() {
  47. this.selectList()
  48. },
  49. methods: {
  50. open(_id) {
  51. this.deleteid = _id
  52. this.show = true
  53. },
  54. toDtl(_id) {
  55. console.log(_id)
  56. const v = this
  57. uni.removeStorage({
  58. key: 'reviewDtl',
  59. success: function(res) {
  60. v.$utils.open(`/pages/warehouse/reviewDtl?id=${_id}`)
  61. },
  62. fail() {
  63. v.$utils.open(`/pages/warehouse/reviewDtl?id=${_id}`)
  64. }
  65. });
  66. },
  67. listDetele(_id) {
  68. uni.request({
  69. url: 'http://120.79.80.64:8050' + '/cloudApi/stockBack/delete',
  70. method: 'POST',
  71. header: {
  72. 'Content-Type': 'application/json',
  73. },
  74. data: {
  75. stockBackId: _id
  76. },
  77. success: res => {
  78. this.$msg.showToast('操作成功!')
  79. this.selectList()
  80. },
  81. });
  82. },
  83. selectList() {
  84. const v = this
  85. uni.request({
  86. url: 'http://120.79.80.64:8050' + '/cloudApi/stockBack/checkList',
  87. method: 'POST',
  88. header: {
  89. 'Content-Type': 'application/json',
  90. },
  91. data: v.req,
  92. success: res => {
  93. console.log(res)
  94. this.checkList = res.data.data
  95. },
  96. });
  97. },
  98. },
  99. }
  100. </script>
  101. <style scoped lang="less">
  102. ul {
  103. padding: 0 20rpx;
  104. li {
  105. .text {
  106. height: 60rpx;
  107. line-height: 60rpx;
  108. padding: 0 20rpx;
  109. }
  110. border-radius: 5rpx;
  111. list-style: none;
  112. background-color: #fff;
  113. overflow: hidden;
  114. margin-top: 20rpx;
  115. .btn-warp {
  116. display: flex;
  117. justify-content: space-between;
  118. }
  119. button {
  120. background-color: blue;
  121. margin-top: 20prx;
  122. color: #fff;
  123. width: 48%;
  124. }
  125. }
  126. }
  127. </style>