qualifications-details.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <template>
  2. <view class="container qualifications" :style="{paddingBottom :isIphoneX ? (150+68)+'rpx' : '150rpx'}">
  3. <view class="qualifications-content" v-if="!isEmpty">
  4. <view class="list" v-for="(item,index) in qualificationsList" :key="index">
  5. <view class="list-view-title">商品{{ index+1 }}</view>
  6. <view class="list-view">
  7. <view class="list-view-label">商品</view>
  8. <view class="list-view-text">{{ item.name }}</view>
  9. </view>
  10. <view class="list-view">
  11. <view class="list-view-label">SN码</view>
  12. <view class="list-view-text">{{ item.code }}</view>
  13. </view>
  14. <view class="list-view" v-for="(file,fileIndex) in item.fileList" :key="fileIndex">
  15. <view class="list-view-label">资质文件</view>
  16. <view class="list-view-text">{{ file.ossName }}</view>
  17. </view>
  18. <view class="list-view-title none">图片</view>
  19. <view class="list-view-upload clearfix">
  20. <view class="photo-item" v-for="(image, index) in item.imageList" :key="index">
  21. <image :src="image" mode="aspectFill" @click.stop="previewImg(item.imageList,index)"></image>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="qualifications-btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '0'}">
  26. <view class="edit-button">编辑</view>
  27. </view>
  28. </view>
  29. <view v-else class="cart-content empty">
  30. <view class="empty-container">
  31. <image class="empty-container-image" src="https://static.caimei365.com/app/img/icon/icon-ques-empty@2x.png" mode="aspectFit"></image>
  32. <text class="error-text">暂无商品资质信息</text>
  33. <view class="login-btn" @click="goIndex">去补充</view>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import { mapState,mapMutations } from 'vuex'
  40. import authorize from '@/common/config/authorize.js'
  41. var isPreviewImg;
  42. export default{
  43. data() {
  44. return{
  45. isIphoneX:this.$store.state.isIphoneX,
  46. isEmpty:false,
  47. qualificationsList:[
  48. {
  49. name:'美国第六代光子多功能智能平台M22',
  50. code:'SN2562659874565',
  51. fileList:[
  52. {
  53. ossName:'深圳市和创元文件.pdf'
  54. },
  55. {
  56. ossName:'深圳市和创元文件.pdf'
  57. },
  58. ],
  59. imageList:[
  60. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  61. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  62. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  63. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  64. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  65. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  66. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  67. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  68. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  69. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  70. ]
  71. },
  72. {
  73. name:'美国第六代光子多功能智能平台M22',
  74. code:'SN2562659874565',
  75. fileList:[
  76. {
  77. ossName:'深圳市和创元文件.pdf'
  78. },
  79. {
  80. ossName:'深圳市和创元文件.pdf'
  81. },
  82. ],
  83. imageList:[
  84. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  85. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  86. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  87. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  88. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  89. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  90. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  91. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  92. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  93. 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',
  94. ]
  95. },
  96. ]
  97. }
  98. },
  99. onLoad(option) {
  100. },
  101. methods:{
  102. ...mapMutations(['login']),
  103. initGetLogisticsInfo(){
  104. this.ShopService.GetLogisticsInfo({ logisticsBatchId : this.logisticsBatchId, shopOrderId:this.info.shopOrderId }).then(response =>{
  105. const data = response.data.logisticsBatch
  106. if(data.remarkImages!=null){
  107. this.photoLists = data.remarkImages
  108. }else{
  109. this.photoLists =[]
  110. }
  111. this.info.note = data.remark
  112. }).catch(error =>{
  113. this.$util.msg(error.msg,2000);
  114. })
  115. },
  116. previewImg (Array,index) {//顶部商品图片预览
  117. console.log(Array)
  118. isPreviewImg = true
  119. let previewUrls = Array
  120. uni.previewImage({
  121. current: index, //图片索引
  122. urls: previewUrls, //必须是http图片,本地图片无效
  123. longPressActions:''
  124. })
  125. },
  126. },
  127. onShow() {
  128. }
  129. }
  130. </script>
  131. <style lang="scss">
  132. page {
  133. height: auto;
  134. background:#F7F7F7;
  135. }
  136. .qualifications-content{
  137. width: 100%;
  138. height: auto;
  139. .list{
  140. width: 100%;
  141. height: auto;
  142. background-color: #FFFFFF;
  143. box-sizing: border-box;
  144. margin-bottom: 20rpx;
  145. padding: 0 24rpx;
  146. .list-view-title{
  147. width: 100%;
  148. height: 92rpx;
  149. border-bottom: 1px solid #E1E1E1;
  150. line-height: 92rpx;
  151. font-size: $font-size-30;
  152. color: #333333;
  153. text-align: left;
  154. &.none{
  155. border-bottom: none;
  156. color: #666666;
  157. }
  158. }
  159. .list-view{
  160. width: 100%;
  161. height: 92rpx;
  162. border-bottom: 1px solid #E1E1E1;
  163. line-height: 92rpx;
  164. font-size: $font-size-30;
  165. .list-view-label{
  166. width: 192rpx;
  167. color: #666666;
  168. float: left;
  169. }
  170. .list-view-text{
  171. width: 510rpx;
  172. color: #333333;
  173. text-overflow: ellipsis;
  174. overflow: hidden;
  175. display: -webkit-box;
  176. -webkit-line-clamp: 1;
  177. line-clamp: 1;
  178. -webkit-box-orient: vertical;
  179. float: right;
  180. }
  181. }
  182. .list-view-upload{
  183. width: 100%;
  184. height: auto;
  185. padding: 10rpx 0;
  186. .photo-item{
  187. display: inline-block;
  188. width: 112rpx;
  189. height: 112rpx;
  190. margin: 10rpx 0;
  191. margin-right: 25rpx;
  192. border-radius: 10rpx;
  193. border:1px solid #F5F5F5;
  194. position: relative;
  195. float: left;
  196. &.add{
  197. width: 112rpx;
  198. height: 112rpx;
  199. border-color: #FFC684;
  200. text-align: center;
  201. line-height: 112rpx;
  202. margin-right: 0rpx;
  203. .icon-jiahao{
  204. font-size: $font-size-44;
  205. color:#FFC684 ;
  206. font-weight: bold;
  207. }
  208. }
  209. .icon-iconfontguanbi{
  210. width: 30rpx;
  211. height: 30rpx;
  212. border-radius:50%;
  213. display: block;
  214. position: absolute;
  215. right: -10rpx;
  216. top: -10rpx;
  217. background: #f94b4b;
  218. text-align: center;
  219. line-height: 30rpx;
  220. color: #FFFFFF;
  221. font-size: $font-size-22;
  222. }
  223. image{
  224. width: 112rpx;
  225. height: 112rpx;
  226. border-radius: 10rpx;
  227. }
  228. }
  229. .photo-list{
  230. width: 100%;
  231. height: 116rpx;
  232. overflow: hidden;
  233. white-space: nowrap;
  234. display: flex;
  235. align-items: flex-start;
  236. }
  237. .scoll-wrapper{
  238. display:flex;
  239. align-items: flex-start;
  240. }
  241. }
  242. }
  243. .qualifications-btn{
  244. width: 100%;
  245. height: 90rpx;
  246. padding-top: 60rpx;
  247. position: fixed;
  248. bottom: 0;
  249. left: 0;
  250. background-color: #FFFFFF;
  251. .edit-button{
  252. width: 600rpx;
  253. height: 90rpx;
  254. background: $btn-confirm;
  255. line-height: 90rpx;
  256. text-align: center;
  257. color: #FFFFFF;
  258. font-size: 30rpx;
  259. margin: 0 auto;
  260. border-radius: 45rpx;
  261. }
  262. }
  263. }
  264. </style>