AuditApplay.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <template>
  2. <view :class="['qn-page-' + theme]">
  3. <view v-if="merchantInfo.id">
  4. <view class="tip-view">
  5. <view v-if="merchantInfo.auditStatus === 1" class="ibonfont ibonshenhezhong"></view>
  6. <view style="font-size: 160rpx;" v-if="merchantInfo.auditStatus === 2" class="ibonfont ibonshenhechenggong"></view>
  7. <view v-if="merchantInfo.auditStatus === 3" class="ibonfont ibonshenheshibai"></view>
  8. <view v-if="merchantInfo.auditStatus === 1">谢谢您的支持,请等待主商城审核</view>
  9. <view v-if="merchantInfo.auditStatus === 2">入驻成功</view>
  10. <view v-if="merchantInfo.auditStatus === 3">拒绝原因:{{ merchantInfo.auditFailReason }}</view>
  11. <view>申请时间:{{ $u.timeFormat(merchantInfo.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
  12. </view>
  13. <view class="info-view">
  14. <view class="info-item clearfix" v-for="(item, index) in apply_term" :key="index">
  15. <!-- 参数字段label -->
  16. <view class="float_left info-label">{{ item.name }}</view>
  17. <!-- 参数Value -->
  18. <!-- type===1, 系统自带字段 -->
  19. <block v-if="item.type === 1">
  20. <!--
  21. data_type=1 单行文本
  22. data_type=2 多行文本
  23. data_type=3 地区
  24. data_type=4 图片
  25. -->
  26. <view class="float_right info-val" v-if="item.data_type === 4">
  27. <image style="margin-top: 20rpx;" class="info-val-img" :src="merchantInfo[item.prop]" mode="aspectFilt"></image>
  28. </view>
  29. <view class="float_right info-val" v-else-if="item.data_type === 3">
  30. {{ merchantInfo.area.provinceName }}-{{ merchantInfo.area.cityName }}-{{ merchantInfo.area.districtName }}
  31. </view>
  32. <view class="float_right info-val" v-else>{{ merchantInfo[item.prop] }}</view>
  33. </block>
  34. <block v-else>
  35. <view class="float_right info-val" v-if="item.data_type !== 4">{{ merchantInfo.info[index - form_length].value }}</view>
  36. <view class="float_right info-val" v-else>
  37. <image style="margin-top: 20rpx;" class="info-val-img" :src="merchantInfo.info[index - form_length].value" mode="aspectFilt"></image>
  38. </view>
  39. </block>
  40. </view>
  41. </view>
  42. <view class="btn-bottom">
  43. <view class="btn-li primary-btn-pain" @click="goPage('/pages/index/index', 'switchTab')">回到首页</view>
  44. <view
  45. class="btn-li primary-btn"
  46. v-if="merchantInfo.auditStatus === 2"
  47. @click="goPage('/pagesT/store/StoreHome?id=' + merchantInfo.id + '&shopName=' + merchantInfo.name)"
  48. >
  49. 进入商户主页
  50. </view>
  51. <view class="btn-li primary-btn" v-else @click="cancelApply">{{ merchantInfo.auditStatus === 1 ? '取消申请' : '重新申请' }}</view>
  52. </view>
  53. </view>
  54. <view v-else style="margin-top: 200rpx;">
  55. <u-empty text="该商家未开通商户入驻" mode="list"></u-empty>
  56. </view>
  57. </view>
  58. </template>
  59. <script>
  60. export default {
  61. props: {
  62. merchantInfo: {
  63. type: Object,
  64. default: () => {
  65. return {};
  66. }
  67. }
  68. },
  69. data() {
  70. return {
  71. apply_term: {},
  72. apply_set: {},
  73. form_length: 1
  74. };
  75. },
  76. created() {
  77. this.MerchantGetSeting();
  78. },
  79. methods: {
  80. cancelApply() {
  81. // 取消申请
  82. if (this.merchantInfo.auditStatus === 1) {
  83. this.$u.api.delApply(this.merchantInfo.id).then(res => {
  84. this.$api.msg('已取消');
  85. this.$emit('cancelApply');
  86. });
  87. } else {
  88. // 重新申请
  89. this.$emit('cancelApply');
  90. }
  91. },
  92. // 获取设置(小程序)
  93. MerchantGetSeting() {
  94. this.$u.api.MerchantGetSeting().then(res => {
  95. this.apply_set = res.data;
  96. if (this.apply_set.applyProp) {
  97. // 获取没有禁用的字段
  98. this.apply_term = this.apply_set.applyProp.filter(item => item.is_enable);
  99. // 获取系统自带字段的length
  100. this.form_length = this.apply_term.filter(item => item.type === 1).length;
  101. }
  102. });
  103. }
  104. }
  105. };
  106. </script>
  107. <style>
  108. page {
  109. background-color: #ffffff;
  110. }
  111. </style>
  112. <style scoped lang="scss">
  113. .tip-view {
  114. font-size: 24rpx;
  115. color: #999999;
  116. text-align: center;
  117. .ibonfont{
  118. font-size: 130rpx;
  119. margin: 20rpx 0 40rpx;
  120. }
  121. }
  122. .info-view {
  123. padding-top: 20rpx;
  124. .info-item {
  125. padding: 0 24rpx;
  126. line-height: 80rpx;
  127. border-bottom: 1px solid #f4f4f4;
  128. color: #666666;
  129. .info-val {
  130. font-size: 26rpx;
  131. color: #333333;
  132. .info-val-img {
  133. width: 120rpx;
  134. height: 120rpx;
  135. border-radius: 4rpx;
  136. }
  137. }
  138. }
  139. }
  140. .btn-bottom {
  141. position: fixed;
  142. bottom: 0;
  143. left: 0;
  144. width: 100%;
  145. padding: 20rpx;
  146. display: flex;
  147. background-color: #ffffff;
  148. border-top: 1px solid #f4f4f4;
  149. .btn-li {
  150. flex: 2;
  151. line-height: 70rpx;
  152. text-align: center;
  153. border-radius: 8rpx;
  154. &:first-child {
  155. border: 1px solid #f53c28;
  156. margin-right: 10rpx;
  157. }
  158. &:last-child {
  159. color: #ffffff;
  160. margin-left: 10px;
  161. }
  162. }
  163. }
  164. </style>