storeDetail.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <template>
  2. <view class="container-body">
  3. <view class="box">
  4. <view class="storeInfo title">基础信息</view>
  5. <view class="storeInfo-item x-start">
  6. <view class="label" style="width: 4rem;">公司全称</view>
  7. <view class="val">{{storeInfo.fullName|| ''}}</view>
  8. </view>
  9. <view class="storeInfo-item x-start">
  10. <view class="label" style="width: 4rem;">联系电话</view>
  11. <view class="val">{{storeInfo.sendPhone|| ''}}</view>
  12. </view>
  13. <view class="storeInfo-item x-start">
  14. <view class="label" style="width: 4rem;">详细地址</view>
  15. <view class="val">{{storeInfo.address|| ''}}{{storeInfo.enterpriseAddress||''}}</view>
  16. </view>
  17. <view class="storeInfo-item x-start">
  18. <view class="label" style="width: 4rem;">经营范围</view>
  19. <view id="descbox-desc" :class="showDes|| !showExpandText? 'opacity descbox-desc':'descbox-desc' "
  20. :style="{height: isExpand ? 'auto': '84rpx'}">
  21. {{storeInfo.businessScope|| ''}}
  22. <!-- <view class="expand x-ac">
  23. {{!isExpand&&showExpandText ? '展开':'收起'}}
  24. <u-icon name="arrow-down" color="#333" size="14"></u-icon>
  25. <u-icon name="arrow-up" color="#333" size="14"></u-icon>
  26. </view> -->
  27. </view>
  28. </view>
  29. </view>
  30. <view class="box mb20">
  31. <view class="storeInfo title">资质信息</view>
  32. <view class="storeInfo-item mb20">
  33. <view class="label mb20">营业执照</view>
  34. <view class="label mb20" v-if="storeInfo.businessCode">营业执照上传编码 {{storeInfo.businessCode}}</view>
  35. <view class="val x-f">
  36. <template v-if="storeInfo.businessLicense">
  37. <u-image v-for="(img,i) in storeInfo.businessLicense.split(',')" shape="square" lazyLoad :src="img"
  38. width="600rpx" height="auto" mode="widthFix" radius="6"
  39. @click="previewImage('businessLicense')"></u-image>
  40. </template>
  41. <view v-else>暂未上传</view>
  42. </view>
  43. </view>
  44. <view class="storeInfo-item mb20" v-if="storeInfo.medicalDevice2">
  45. <view class="label" mb20>2类器械生产备案</view>
  46. <view class="label mb20" v-if="storeInfo.medicalDevice2Code">二类器械生产备案文件编码 {{storeInfo.medicalDevice2Code}}</view>
  47. <view class="val x-f">
  48. <u-image v-if="storeInfo.medicalDevice2" shape="square" lazyLoad :src="storeInfo.medicalDevice2"
  49. width="600rpx" height="auto" mode="widthFix" radius="6"
  50. @click="previewImage('medicalDevice2')"></u-image>
  51. <view v-else>暂未上传</view>
  52. </view>
  53. </view>
  54. <view class="storeInfo-item mb20" v-if="storeInfo.medicalDevice1">
  55. <view class="label mb20">1类医疗器械备案</view>
  56. <view class="label mb20" v-if="storeInfo.medicalDevice1Code">一类器械生产备案文件编码 {{storeInfo.medicalDevice1Code}}</view>
  57. <view class="val x-start">
  58. <u-image v-if="storeInfo.medicalDevice1" shape="square" lazyLoad :src="storeInfo.medicalDevice1"
  59. width="600rpx" height="auto" mode="widthFix" radius="6"
  60. @click="previewImage('medicalDevice1')"></u-image>
  61. <view v-else>暂未上传</view>
  62. </view>
  63. </view>
  64. <view class="storeInfo-item mb20" v-if="storeInfo.medicalDevice3">
  65. <view class="label mb20">3类器械经营许可证</view>
  66. <view class="label mb20" v-if="storeInfo.medicalDevice3Code">三类器械生产备案文件编码 {{storeInfo.medicalDevice3Code}}</view>
  67. <view class="val x-f">
  68. <u-image v-if="storeInfo.medicalDevice3" shape="square" lazyLoad :src="storeInfo.medicalDevice3"
  69. width="600rpx" height="auto" mode="widthFix" radius="6"
  70. @click="previewImage('medicalDevice3')"></u-image>
  71. <view v-else>暂未上传</view>
  72. </view>
  73. </view>
  74. <view class="storeInfo-item mb20" v-if="storeInfo.foodLicense">
  75. <view class="label mb20">食品经营许可证/备案凭证</view>
  76. <view class="label mb20" v-if="storeInfo.foodCode">食品经营许可证/备案凭证编码 {{storeInfo.foodCode}}</view>
  77. <view class="val x-f">
  78. <template v-if="storeInfo.foodLicense">
  79. <u-image shape="square" lazyLoad v-for="(img,i) in storeInfo.foodLicense.split(',')" :key="i" :src="img"
  80. width="600rpx" height="auto" mode="widthFix" radius="6"
  81. @click="previewImage('foodLicense')"></u-image>
  82. </template>
  83. <view v-else>暂未上传</view>
  84. </view>
  85. </view>
  86. <!-- <view class="storeInfo-item mb20" v-if="storeInfo.medicalLicense">
  87. <view class="label mb20">医疗机构执业许可证</view>
  88. <view class="label mb20" v-if="storeInfo.medicalCode">医疗机构执业许可证上传编码 {{storeInfo.medicalCode}}</view>
  89. <view class="val x-f">
  90. <u-image v-if="storeInfo.medicalLicense" shape="square" lazyLoad :src="storeInfo.medicalLicense"
  91. width="600rpx" height="auto" mode="widthFix" radius="6"
  92. @click="previewImage('medicalLicense')"></u-image>
  93. <view v-else>暂未上传</view>
  94. </view>
  95. </view> -->
  96. <view class="storeInfo-item mb20" v-if="storeInfo.drugLicense">
  97. <view class="label mb20">药品经营许可证</view>
  98. <view class="label mb20" v-if="storeInfo.drugCode">药品经营许可证编码 {{storeInfo.drugCode}}</view>
  99. <view class="val x-f">
  100. <u-image v-if="storeInfo.drugLicense" shape="square" lazyLoad :src="storeInfo.drugLicense"
  101. width="600rpx" height="auto" mode="widthFix" radius="6"
  102. @click="previewImage('drugLicense')"></u-image>
  103. <view v-else>暂未上传</view>
  104. </view>
  105. </view>
  106. <view class="storeInfo-item mb20" v-if="storeInfo&&storeInfo.doctorList&&storeInfo.doctorList.length>0">
  107. <view v-for="(item,index) in storeInfo.doctorList" :key="index">
  108. <view class="label mb20">药师职业证书:{{item.doctorName}}</view>
  109. <view class="label mb20" v-if="item.practiseCode">药师职业许可证编码 {{item.practiseCode}}</view>
  110. <view class="val ">
  111. <!-- <view v-for="(img,indexs) in item.imagesArray" :key="indexs">
  112. <u-image shape="square" lazyLoad :src="img"
  113. width="600rpx" height="auto" mode="widthFix" radius="6"
  114. @click="previewImages(item.imagesArray,indexs)"></u-image>
  115. </view>
  116. -->
  117. <view v-if="item.imagesArray&&item.imagesArray.length>0">
  118. <u-image shape="square" lazyLoad :src="item.imagesArray[0]"
  119. width="600rpx" height="auto" mode="widthFix" radius="6"
  120. @click="previewImages(item.imagesArray,indexs)"></u-image>
  121. </view>
  122. <!-- <u-image v-if="item.practiseImages" shape="square" lazyLoad :src="item.practiseImages"
  123. width="600rpx" height="auto" mode="widthFix" radius="6"
  124. @click="previewImage('drugLicense')"></u-image> -->
  125. <view v-else>暂未上传</view>
  126. </view>
  127. </view>
  128. </view>
  129. <view class="storeInfo-item mb20" v-if="storeInfo.otherSpecialQualificationCode">
  130. <view class="label mb20">其它特殊资质编码 {{storeInfo.otherSpecialQualificationCode}}
  131. </view>
  132. </view>
  133. <view class="storeInfo-item mb20" v-if="storeInfo.qualityAssuranceAgreementCode">
  134. <view class="label mb20">质量保证协议编码 {{storeInfo.qualityAssuranceAgreementCode}}</view>
  135. </view>
  136. <view class="storeInfo-item mb20" v-if="storeInfo.settlementAgreementCode">
  137. <view class="label mb20">其它资质入驻协议编码 {{storeInfo.settlementAgreementCode}}</view>
  138. </view>
  139. </view>
  140. </view>
  141. </template>
  142. <script>
  143. export default {
  144. props: ['storeInfo', 'source'],
  145. data() {
  146. return {
  147. showDes: false,
  148. showExpandText: false,
  149. isExpand: true,
  150. textHeight: 0, //文本高度
  151. }
  152. },
  153. methods: {
  154. sliceimg(){
  155. console.log(this.storeInfo)
  156. if (this.storeInfo.doctorList && this.storeInfo.doctorList.length > 0) {
  157. this.storeInfo.doctorList = this.storeInfo.doctorList.map(doctor => {
  158. if (doctor.practiseImages) {
  159. doctor.practiseImages = doctor.practiseImages.split(',').map(img => img.trim());
  160. }
  161. return doctor;
  162. });
  163. }
  164. console.log(this.storeInfo.doctorList)
  165. },
  166. previewImage(type) {
  167. uni.previewImage({
  168. current: 0,
  169. urls: [this.storeInfo[type]]
  170. });
  171. },
  172. previewImages(type,indexs) {
  173. uni.previewImage({
  174. current: type[indexs],
  175. urls: [type[0]]
  176. });
  177. },
  178. getDescHeight() {
  179. return
  180. this.$nextTick(() => {
  181. const query = uni.createSelectorQuery().in(this);
  182. query
  183. .select("#descbox-desc")
  184. .boundingClientRect((data) => {
  185. this.textHeight = data.height
  186. this.isExpand = this.textHeight > uni.upx2px(84) ? false : true
  187. this.showExpandText = this.textHeight >= uni.upx2px(84) ? true : false
  188. this.showDes = true
  189. })
  190. .exec();
  191. })
  192. },
  193. }
  194. }
  195. </script>
  196. <style scoped lang="scss">
  197. .mb20 {
  198. margin-bottom: 20rpx;
  199. }
  200. .box {
  201. padding: 0 32rpx 26rpx 32rpx;
  202. background-color: #fff;
  203. }
  204. .opacity {
  205. position: relative !important;
  206. opacity: 1 !important;
  207. z-index: 1 !important;
  208. }
  209. .descbox-desc {
  210. color: #222;
  211. font-weight: 400;
  212. font-size: 28rpx;
  213. color: #222222;
  214. word-break: break-all;
  215. overflow: hidden;
  216. line-height: 42rpx;
  217. position: absolute;
  218. opacity: 0;
  219. z-index: -1;
  220. }
  221. .container-body {
  222. font-family: PingFang SC, PingFang SC;
  223. font-weight: 400;
  224. font-size: 28rpx;
  225. color: #939599;
  226. }
  227. .businessLicense {
  228. height: 80rpx;
  229. width: 80rpx;
  230. border-radius: 8rpx;
  231. }
  232. .storeInfo {
  233. &-item {
  234. padding: 6rpx 0;
  235. .label {
  236. flex-shrink: 0;
  237. }
  238. .val {
  239. color: #222;
  240. }
  241. }
  242. }
  243. .title {
  244. font-family: PingFang SC, PingFang SC;
  245. font-weight: 600;
  246. font-size: 30rpx;
  247. color: #222222;
  248. padding: 24rpx 0;
  249. }
  250. </style>