review.vue 3.3 KB

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