transferCompositeList.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <div>
  3. <view class="ul">
  4. <view class="li" v-for="i in dataList" :key="i.id">
  5. <view class="line">
  6. 提交人员:{{i.submitUser}}
  7. <view class="span">
  8. 接收人员:<span>{{i.receiveUser}}</span>
  9. </view>
  10. </view>
  11. <view class="line">
  12. 提交时间:{{i.submitTime}}
  13. </view>
  14. <view class="line">
  15. 面料卷数:{{i.submitNum}}
  16. <view class="span">
  17. 面料米数:<span >{{i.submitMeters}}</span>
  18. </view>
  19. </view>
  20. <view class="btn-warp">
  21. <button @click="listDelete(i.id)" style="background-color: red;color:#fff">删除</button>
  22. <button @click="operation(i.id)" style="background-color: blue;color:#fff">去复核</button>
  23. </view>
  24. </view>
  25. </view>
  26. </div>
  27. </template>
  28. <script>
  29. export default{
  30. name:"xx",
  31. data(){
  32. return{
  33. userInfo:null,
  34. dataList:[],
  35. }
  36. },
  37. created(){
  38. setTimeout(()=>{
  39. this.getList()
  40. },100)
  41. },
  42. methods:{
  43. listDelete(_id){
  44. const v = this
  45. uni.showModal({
  46. title: "提示",
  47. content: "你确定删除此信息么?",
  48. success(res) {
  49. if (res.confirm) {
  50. v.$post('/stockTransfer/delete',{
  51. id:_id,
  52. }).then(res=>{
  53. uni.showToast({
  54. title: '删除成功!',
  55. icon:"none"
  56. })
  57. v.getList()
  58. })
  59. }
  60. }
  61. })
  62. },
  63. operation(_id){
  64. const v = this
  65. uni.navigateTo({
  66. url: '/pages/materialTransfer/transferComposite?id=' + _id
  67. })
  68. },
  69. getList(){
  70. const v = this
  71. uni.getStorage({
  72. key: 'Authorization',
  73. success: function (res) {
  74. v.$post('/stockTransfer/page',{
  75. account:res.data.account,
  76. pageNum:1,
  77. pageSize:10000,
  78. }).then(res=>{
  79. console.log(res)
  80. v.dataList = res.data.records
  81. })
  82. }
  83. });
  84. },
  85. },
  86. }
  87. </script>
  88. <style scoped lang="less">
  89. .ul{
  90. min-height: 100vh;
  91. background-color: #f2f2f2;
  92. }
  93. .li{
  94. background-color: #fff;
  95. margin: 20rpx 20rpx 0;
  96. padding: 20rpx;
  97. list-style: none;
  98. .line{
  99. position: relative;
  100. line-height: 70rpx;
  101. border: none;
  102. display: flex;
  103. padding: 0 20rpx;
  104. .span{
  105. position: absolute;
  106. left: 50%;
  107. }
  108. }
  109. }
  110. .btn-warp{
  111. display: flex;
  112. justify-content: space-between;
  113. button{
  114. width: 48%;
  115. }
  116. }
  117. .footer-btn{
  118. position: fixed;
  119. bottom: 10rpx;
  120. left: 10rpx;
  121. right: 10rpx;
  122. background-color: red;
  123. color: #fff;
  124. }
  125. </style>