infor2.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <template>
  2. <view class="content">
  3. <view class="topbar" v-show="isIphone">
  4. </view>
  5. <view class="status_bar">
  6. <view class="left" @click="goBack"><u-icon name="arrow-left"></u-icon>返回</view>
  7. <span style="font-size: 36rpx;">详情</span>
  8. <view class="right"></view>
  9. </view>
  10. <view class="mainCont">
  11. <view class="title">
  12. {{ info.packCode }}
  13. <span style="float: right; color: #1890FF" v-show="info.packState == '3'">待验收</span>
  14. <span style="float: right; color: #BCBCBC" v-show="info.packState == '4'">已完成</span>
  15. </view>
  16. <u-cell-group style="margin-bottom: 10px">
  17. <u-cell-item :arrow="false" :value-style="{textAlign: 'left',paddingLeft: '10px'}">
  18. <view slot="title"><span class="red"></span>科&emsp;&emsp;室:</view>
  19. {{ info.positionName }}
  20. </u-cell-item>
  21. </u-cell-group>
  22. <u-cell-group style="margin-bottom: 10px">
  23. <u-cell-item :arrow="false" :value-style="{textAlign: 'left',paddingLeft: '10px'}">
  24. <view slot="title"><span class="red"></span>分&emsp;&emsp;类:</view>
  25. {{ info.rubbishCategoryStr }}
  26. </u-cell-item>
  27. <u-cell-item :arrow="false" :value-style="{textAlign: 'left',paddingLeft: '10px'}">
  28. <view slot="title"><span class="red"></span>重&emsp;&emsp;量:</view>
  29. {{ info.packWeight }}kg
  30. </u-cell-item>
  31. <u-cell-item :arrow="false" :value-style="{textAlign: 'left',paddingLeft: '10px'}">
  32. <view slot="title"><span class="red"></span>打&ensp;包&ensp;人:</view>
  33. {{ info.createUserName }}
  34. </u-cell-item>
  35. <u-cell-item :arrow="false" :value-style="{textAlign: 'left',paddingLeft: '10px'}">
  36. <view slot="title"><span class="red"></span>打包时间:</view>
  37. {{ info.createTime }}
  38. </u-cell-item>
  39. <u-cell-item :arrow="false" :value-style="{textAlign: 'left',paddingLeft: '10px'}">
  40. <view slot="title"><span class="red"></span>暂&ensp;存&ensp;点:</view>
  41. {{ info.provisionalName }}
  42. </u-cell-item>
  43. </u-cell-group>
  44. <view class="imgupload">
  45. <view>{{ info.packRemake }}</view>
  46. <view class="imgbox">
  47. <img v-for="(item,index) in fileList" :src="item.filePath" alt="">
  48. </view>
  49. <!-- <u-upload :action="action" :file-list="fileList"></u-upload> -->
  50. </view>
  51. <u-cell-group style="margin-bottom: 10px">
  52. <u-cell-item :arrow="false" :value-style="{textAlign: 'left',paddingLeft: '10px'}">
  53. <view slot="title"><span class="red"></span>收&ensp;集&ensp;人:</view>
  54. {{ info.collectUserName }}
  55. </u-cell-item>
  56. <u-cell-item :arrow="false" :value-style="{textAlign: 'left',paddingLeft: '10px'}">
  57. <view slot="title"><span class="red"></span>收集时间:</view>
  58. {{ info.updateTime }}
  59. </u-cell-item>
  60. </u-cell-group>
  61. <u-cell-group style="margin-bottom: 10px" v-show="info.checkUserName">
  62. <u-cell-item :arrow="false" :value-style="{textAlign: 'left',paddingLeft: '10px'}">
  63. <view slot="title"><span class="red"></span>验&ensp;收&ensp;人:</view>
  64. {{ info.checkUserName }}
  65. </u-cell-item>
  66. <u-cell-item :arrow="false" :value-style="{textAlign: 'left',paddingLeft: '10px'}">
  67. <view slot="title"><span class="red"></span>验收时间:</view>
  68. {{ info.checkTime }}
  69. </u-cell-item>
  70. </u-cell-group>
  71. </view>
  72. </view>
  73. </template>
  74. <script>
  75. const NET = require('@/utils/request')
  76. const API = require('@/config/api')
  77. export default {
  78. data() {
  79. return {
  80. remark: "",
  81. action: "",
  82. fileList: [],
  83. imgList: [],
  84. id: "",
  85. info: {},
  86. isIphone: false,
  87. }
  88. },
  89. onLoad(options) {
  90. uni.getSystemInfo({
  91. success: (res) => {
  92. console.log(res)
  93. if (res.model == 'iPhone') {
  94. this.isIphone = true;
  95. }
  96. },
  97. fail: (err) => {
  98. console.log(err)
  99. }
  100. })
  101. this.id = options.id
  102. NET.request(API.getPackageInfo + '/' + options.id, {}).then(res => {
  103. this.info = res.data
  104. this.fileList = res.data.packFiles
  105. }).catch(error => {
  106. this.$refs.uToast.show({
  107. title: error.msg,
  108. type: 'warning',
  109. })
  110. })
  111. },
  112. onReady() {
  113. if (this.isIphone) {
  114. document.getElementsByClassName('mainCont')[0].style.height = document.getElementsByClassName('mainCont')[
  115. 0].clientHeight - 25 + 'px'
  116. }
  117. },
  118. methods: {
  119. goBack() {
  120. uni.navigateBack({
  121. delta: 1
  122. });
  123. },
  124. }
  125. }
  126. </script>
  127. <style lang="scss">
  128. .mainCont {
  129. height: calc(100% - 80rpx);
  130. padding-bottom: 10px;
  131. overflow-y: scroll;
  132. }
  133. .title {
  134. height: 40px;
  135. line-height: 20px;
  136. padding: 10px;
  137. }
  138. .red {
  139. display: inline-block;
  140. width: 10px;
  141. height: 10px;
  142. color: red;
  143. }
  144. .imgupload {
  145. margin-bottom: 10px;
  146. padding: 10px 25px;
  147. background: #fff;
  148. .imgbox {
  149. img {
  150. width: 80px;
  151. height: 80px;
  152. margin: 10px 10px 10px 0;
  153. }
  154. }
  155. }
  156. .slot-btn {
  157. width: 80px;
  158. height: 80px;
  159. display: flex;
  160. justify-content: center;
  161. align-items: center;
  162. border: 1px solid #c0c4cc;
  163. border-radius: 5px;
  164. }
  165. /deep/ .u-cell__value {
  166. color: #1c1c1c;
  167. }
  168. </style>