Step5.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. <template><page-meta :root-font-size="fontSize+'px'"></page-meta>
  2. <member-base :show="false"><view class="div container">
  3. <view class="div common-header-wrap">
  4. <view :style="'height:'+navHeight+'px'"></view>
  5. <view class="common-header-holder"></view>
  6. <view class="common-header-fixed">
  7. <title-header />
  8. <uni-nav-bar title="店铺入驻" class="common-header" left-icon="back" @clickLeft="goBack()">
  9. </uni-nav-bar>
  10. </view>
  11. </view>
  12. <step :options="options" :active="3"></step>
  13. <view class="div" v-if="storeJoinin.joinin_state==20 || storeJoinin.joinin_state==31">
  14. <view v-if="storeJoinin.joinin_state==31 || storeJoinin.joinin_state==11" class="div notice">{{title}}:{{message}}</view>
  15. <view v-if="storeJoinin.joinin_state!=11" class="div content">
  16. <view class="div" @click="showPopup('showDetail')"><flex-line :is-link="true" :show-border="true"><text class="span line-name">申请信息</text></flex-line></view>
  17. <flex-line :show-border="true"><text class="span line-name">应付金额</text><text class="span" slot="right">{{storeJoinin.paying_amount}}元</text></flex-line>
  18. <flex-line :show-border="true">
  19. <text class="span">支付方式</text>
  20. <view slot="right">
  21. <radio-group @change="radioChange">
  22. <label v-for="(item, index) in paymentTypeOption" :key="index">
  23. <radio :value="item.value" :checked="paymentType==item.value" />
  24. <text>{{item.label}}</text>
  25. </label>
  26. </radio-group>
  27. </view>
  28. </flex-line>
  29. <flex-line v-if="paymentType=='1'" class="pt-5" :show-border="true">
  30. <text class="span">付款凭证</text>
  31. <view class="div" slot="right">
  32. <view class="div user-avatar-wrapper">
  33. <view class="div user-avatar">
  34. <uni-file-picker class="common-avatar" v-model="imageValue" fileMediatype="image" mode="grid" :limit="1"
  35. :auto-upload="false" @select="uploadImage" @delete="dropImage()" :image-styles="{
  36. width:'200px',
  37. height:'160px',
  38. }"></uni-file-picker>
  39. </view>
  40. </view>
  41. </view>
  42. </flex-line>
  43. <flex-line v-if="paymentType=='1'" class="field-line" :show-border="true"><text class="span field-name">备注</text><view class="div field-line-right" slot="right"><input class="field-input" v-model="storeJoinin.paying_money_certificate_explain" /></view></flex-line>
  44. <view v-if="paymentType=='1'" class="payment-notice" @click="onAgreement()">不清楚平台收款账号?</view>
  45. </view>
  46. <view class="div common-btn ds-button-large mt-10" @click="nextStep">提交</view>
  47. </view>
  48. <view class="div main-content" v-else>
  49. <image mode="aspectFit" class="img center-image" :src="sellerjoininwait" />
  50. <view class="div big-title">{{title}}</view>
  51. <view class="div desc">{{message}}</view>
  52. </view>
  53. <view class="div">
  54. <uni-popup background-color="#fff" ref="showDetail" type="right" >
  55. <view :style="'width:'+screenWidth+'px'" class="common-popup-wrapper">
  56. <view class="div common-header-wrap">
  57. <view :style="'height:'+navHeight+'px'"></view>
  58. <view class="common-header-holder"></view>
  59. <view class="common-header-fixed">
  60. <title-header />
  61. <uni-nav-bar title="申请信息" class="common-header" left-icon="back" @clickLeft="hidePopup('showDetail')">
  62. </uni-nav-bar>
  63. </view>
  64. </view>
  65. <view class="div common-popup-content">
  66. <scroll-view style="position: absolute;top:0;right:0;left:0;bottom:0" scroll-y="true">
  67. <view class="div label">公司及联系人信息</view>
  68. <view class="div content">
  69. <flex-line :show-border="true"><text class="span line-name">{{storeJoinin.store_type==1?'店铺名称':'公司名称'}}</text><text class="span" slot="right">{{storeJoinin.company_name}}</text></flex-line>
  70. <flex-line :show-border="true"><text class="span line-name">所在地</text><text class="span" slot="right">{{storeJoinin.company_address}}</text></flex-line>
  71. <flex-line :show-border="true"><text class="span line-name">详细地址</text><text class="span" slot="right">{{storeJoinin.company_address_detail}}</text></flex-line>
  72. <flex-line v-if="storeJoinin.store_type==0" :show-border="true"><text class="span line-name">注册资金</text><text class="span" slot="right">{{storeJoinin.company_registered_capital}}万元</text></flex-line>
  73. <flex-line :show-border="true"><text class="span line-name">联系人姓名</text><text class="span" slot="right">{{storeJoinin.contacts_name}}</text></flex-line>
  74. <flex-line :show-border="true"><text class="span line-name">联系人电话</text><text class="span" slot="right">{{storeJoinin.contacts_phone}}</text></flex-line>
  75. <flex-line :show-border="true"><text class="span line-name">电子邮箱</text><text class="span" slot="right">{{storeJoinin.contacts_email}}</text></flex-line>
  76. </view>
  77. <view class="div label">营业执照信息(副本)</view>
  78. <view class="div content">
  79. <flex-line :show-border="true"><text class="span line-name">营业执照号</text><text class="span" slot="right">{{storeJoinin.business_licence_number}}</text></flex-line>
  80. <flex-line :show-border="true"><text class="span line-name">营业执照所在地</text><text class="span" slot="right">{{storeJoinin.business_licence_address}}</text></flex-line>
  81. <flex-line :show-border="true"><text class="span line-name">有效期起始</text><text class="span" slot="right">{{storeJoinin.business_licence_start}}</text></flex-line>
  82. <flex-line :show-border="true"><text class="span line-name">有效期结束</text><text class="span" slot="right">{{storeJoinin.business_licence_end}}</text></flex-line>
  83. <flex-line :show-border="true"><text class="span line-name">经营范围</text><text class="span" slot="right">{{storeJoinin.business_sphere}}</text></flex-line>
  84. <flex-line class="pt-5" :show-border="true">
  85. <text class="span">营业执照电子版</text>
  86. <view class="div" slot="right">
  87. <view class="div user-avatar-wrapper">
  88. <view class="div user-avatar">
  89. <image mode="aspectFit" class="img" :src="storeJoinin.paying_money_certificate_url" @click="openImage(storeJoinin.paying_money_certificate_url)">
  90. </view>
  91. </view>
  92. </view>
  93. </flex-line>
  94. </view>
  95. <view class="div" v-if="storeJoinin.store_type==0">
  96. <view class="div label">开户银行信息</view>
  97. <view class="div content">
  98. <flex-line :show-border="true"><text class="span line-name">银行开户名</text><text class="span" slot="right">{{storeJoinin.bank_account_name}}</text></flex-line>
  99. <flex-line :show-border="true"><text class="span line-name">公司银行账号</text><text class="span" slot="right">{{storeJoinin.bank_account_number}}</text></flex-line>
  100. <flex-line :show-border="true"><text class="span line-name">银行支行名称</text><text class="span" slot="right">{{storeJoinin.bank_name}}</text></flex-line>
  101. <flex-line :show-border="true"><text class="span line-name">银行所在地</text><text class="span" slot="right">{{storeJoinin.bank_address}}</text></flex-line>
  102. </view>
  103. <view class="div label">结算账号信息</view>
  104. <view class="div content">
  105. <flex-line :show-border="true"><text class="span line-name">银行开户名</text><text class="span" slot="right">{{storeJoinin.settlement_bank_account_name}}</text></flex-line>
  106. <flex-line :show-border="true"><text class="span line-name">公司银行账号</text><text class="span" slot="right">{{storeJoinin.settlement_bank_account_number}}</text></flex-line>
  107. <flex-line :show-border="true"><text class="span line-name">银行支行名称</text><text class="span" slot="right">{{storeJoinin.settlement_bank_name}}</text></flex-line>
  108. <flex-line :show-border="true"><text class="span line-name">银行所在地</text><text class="span" slot="right">{{storeJoinin.settlement_bank_address}}</text></flex-line>
  109. </view>
  110. </view>
  111. <view class="div" v-else>
  112. <view class="div label">结算账号信息</view>
  113. <view class="div content">
  114. <flex-line :show-border="true"><text class="span line-name">支付宝姓名</text><text class="span" slot="right">{{storeJoinin.settlement_bank_account_name}}</text></flex-line>
  115. <flex-line :show-border="true"><text class="span line-name">支付宝账号</text><text class="span" slot="right">{{storeJoinin.settlement_bank_account_number}}</text></flex-line>
  116. </view>
  117. </view>
  118. <view class="div content">
  119. <flex-line :show-border="true"><text class="span line-name">商家账号</text><text class="span" slot="right">{{storeJoinin.seller_name}}</text></flex-line>
  120. <flex-line :show-border="true"><text class="span line-name">店铺名称</text><text class="span" slot="right">{{storeJoinin.store_name}}</text></flex-line>
  121. <flex-line :show-border="true"><text class="span line-name">店铺等级</text><text class="span" slot="right">{{storeJoinin.storegrade_name}}</text></flex-line>
  122. <flex-line :show-border="true"><text class="span line-name">开店时长</text><text class="span" slot="right">{{storeJoinin.joinin_year}}年</text></flex-line>
  123. <flex-line :show-border="true"><text class="span line-name">店铺分类</text><text class="span" slot="right">{{storeJoinin.storeclass_name}}</text></flex-line>
  124. <view class="div" @click="showPopup('showGoodsClass')"><flex-line :is-link="true" :show-border="true"><text class="span line-name">经营类目</text></flex-line></view>
  125. </view>
  126. </scroll-view>
  127. </view>
  128. </view>
  129. </uni-popup>
  130. <uni-popup background-color="#fff" ref="showGoodsClass" type="right" >
  131. <view :style="'width:'+screenWidth+'px'" class="common-popup-wrapper">
  132. <view class="div common-header-wrap">
  133. <view :style="'height:'+navHeight+'px'"></view>
  134. <view class="common-header-holder"></view>
  135. <view class="common-header-fixed">
  136. <title-header />
  137. <uni-nav-bar title="经营类目" class="common-header" left-icon="back" @clickLeft="hidePopup('showGoodsClass')">
  138. </uni-nav-bar>
  139. </view>
  140. </view>
  141. <view class="div common-popup-content">
  142. <scroll-view style="position: absolute;top:0;right:0;left:0;bottom:0" scroll-y="true">
  143. <view class="div content">
  144. <view class="div" v-for="(goods_class,index) in storeJoinin.store_class_names" :key="index">
  145. <flex-line :show-border="true"><text class="span line-name">{{goods_class}}</text><text class="span" slot="right">{{storeJoinin.store_class_commis_rates[index]}}%</text></flex-line>
  146. </view>
  147. </view>
  148. </scroll-view>
  149. </view>
  150. </view>
  151. </uni-popup>
  152. <tui-picture-cropper v-if="cropperOption.imgUrl" :width="cropperOption.autoCropWidth" :height="cropperOption.autoCropHeight" :imageUrl="cropperOption.img" @ready="cropReady" @cropper="useCrop" @back="cropBack"></tui-picture-cropper>
  153. </view>
  154. <view class="div">
  155. <uni-popup background-color="#fff" ref="isshow" class="popup" >
  156. <image mode="aspectFit" class="img" :src="showimage" :style="getBannerStyle" @click="hidePopup('isshow')">
  157. </uni-popup>
  158. </view>
  159. </view></member-base>
  160. </template>
  161. <script>
  162. import {getFontSize} from '@/util/common'
  163. import TitleHeader from '../../TitleHeader'
  164. import MemberBase from '../MemberBase'
  165. import tuiPictureCropper from "@/components/thorui/tui-picture-cropper/tui-picture-cropper"
  166. import { mapState, mapMutations } from 'vuex'
  167. import Step from '../../Step'
  168. import { env } from '../../../static/config'
  169. import { getStoreJoinin, saveStoreJoinin5, uploadInfoFile } from '../../../api/seller'
  170. import flexLine from '../../flexLine'
  171. export default {
  172. components:{
  173. TitleHeader,
  174. MemberBase,
  175. flexLine,
  176. Step,
  177. tuiPictureCropper
  178. },
  179. data(){
  180. return {
  181. paymentType:'0',
  182. paymentTypeOption: [
  183. {
  184. label: '在线支付',
  185. value: '0'
  186. },
  187. {
  188. label: '线下支付',
  189. value: '1'
  190. }
  191. ],
  192. navHeight: 0,
  193. imageValue:[],
  194. screenWidth:0,
  195. screenHeight:0,
  196. cropperOption: {
  197. img: '',
  198. canMove: false,
  199. autoCrop: true,
  200. autoCropWidth: 100,
  201. autoCropHeight: 100,
  202. maxImgSize: 500,
  203. outputType: 'png'
  204. },
  205. options: [{ title: '公司资质' }, { title: '财务资质' }, { title: '店铺信息' }, { title: '合同签订' }],
  206. showimage: '',
  207. message: '',
  208. title: '',
  209. sellerjoininwait:env.SITE_URL + "/uploads/home/h5/sellerjoinin_wait.png"
  210. }
  211. },
  212. mounted(){
  213. // #ifdef MP-WEIXIN
  214. this.navHeight = uni.getMenuButtonBoundingClientRect().top
  215. // #endif
  216. const res = uni.getSystemInfoSync()
  217. this.screenWidth = res.windowWidth
  218. this.screenHeight = res.windowHeight
  219. },
  220. computed:{
  221. fontSize(){
  222. return getFontSize()
  223. },
  224. ...mapState({
  225. storeJoinin1: state => state.member.storeJoinin1,
  226. storeJoinin0: state => state.member.storeJoinin0,
  227. storeJoininType: state => state.member.storeJoininType,
  228. }),
  229. storeJoinin:function(){
  230. var data
  231. if(this.storeJoininType==1){
  232. data = this.storeJoinin1
  233. }else{
  234. data = this.storeJoinin0
  235. }
  236. if(data.paying_money_certificate_url){
  237. this.imageValue = [{
  238. name: 'paying_money_certificate',
  239. extname: 'jpg',
  240. url: data.paying_money_certificate_url
  241. }]
  242. }
  243. return data
  244. },
  245. getBannerStyle: function () {
  246. let itemWidth = this.screenWidth
  247. let itemHeight = this.screenHeight
  248. return "max-width:"+itemWidth +"px;max-height:"+itemHeight +"px"
  249. }
  250. },
  251. created: function () {
  252. getStoreJoinin().then(res => {
  253. var store_joinin = res.result.store_joinin
  254. if (store_joinin) {
  255. if (store_joinin.joinin_state == 40) {
  256. uni.showToast({icon:'none',title: '您的店铺已开通'})
  257. return
  258. }
  259. this.sellerJoininSave({ storeJoinin: store_joinin })
  260. if (store_joinin.joinin_state == 10) {
  261. this.message = '感谢您在本平台申请商家入驻'
  262. this.title = '正在审核中'
  263. } else if (store_joinin.joinin_state == 11) {
  264. this.title = '付款审核中'
  265. this.message = '请等待管理员审核打款'
  266. } else {
  267. // if (store_joinin.joinin_state == 20) {
  268. // this.title = '初审成功'
  269. // this.message = '应付金额' + store_joinin.paying_amount + '元'
  270. // } else {
  271. if (store_joinin.joinin_state == 30) {
  272. this.title = '初审失败'
  273. }
  274. if (store_joinin.joinin_state == 31) {
  275. this.title = '付款审核失败'
  276. }
  277. this.message = store_joinin.joinin_message
  278. // }
  279. }
  280. }
  281. }).catch(error => {
  282. uni.showToast({icon:'none',title: error.message})
  283. })
  284. },
  285. methods:{
  286. radioChange(e){
  287. this.paymentType=e.detail.value
  288. },
  289. showPopup(id){
  290. this.$refs[id].open()
  291. },
  292. hidePopup(id){
  293. this.$refs[id].close()
  294. },
  295. goBack(){uni.navigateBack({delta:1})},
  296. ...mapMutations({
  297. sellerJoininSave: 'sellerJoininSave'
  298. }),
  299. nextStep () {
  300. if(this.paymentType=='1'){
  301. saveStoreJoinin5(this.storeJoinin).then(res => {
  302. this.sellerJoininSave({ storeJoinin: this.storeJoinin })
  303. this.storeJoinin.joinin_state = 11
  304. this.title = '付款审核中'
  305. this.message = '请等待管理员审核打款'
  306. }).catch(error => {
  307. uni.showToast({icon:'none',title: error.message})
  308. })
  309. }else{
  310. uni.navigateTo({url:'/pages/member/buy/pay?pay_type=sj_pay'})
  311. }
  312. },
  313. openImage (src) {
  314. this.showimage = src
  315. this.showPopup('isshow')
  316. },
  317. dropImage () {
  318. this.storeJoinin.paying_money_certificate = ''
  319. },
  320. uploadImage(event) {
  321. var file = event.tempFiles[0]
  322. var that = this
  323. that.cropperOption.imgUrl = file.path
  324. that.cropperOption.autoCropWidth = uni.getSystemInfoSync().windowWidth
  325. that.cropperOption.autoCropHeight = uni.getSystemInfoSync().windowWidth
  326. that.cropperOption.maxImgSize = uni.getSystemInfoSync().windowHeight - 40
  327. that.$forceUpdate()
  328. },
  329. useCrop(res) {
  330. var formdata = {
  331. filePath: res.url,
  332. name: 'file'
  333. }
  334. uni.showLoading({
  335. title: '加载中'
  336. })
  337. uploadInfoFile(formdata).then(res => {
  338. this.storeJoinin.paying_money_certificate = res.result.path
  339. this.storeJoinin.paying_money_certificate_url = res.result.url
  340. this.imageValue = [{
  341. name: 'paying_money_certificate',
  342. extname: 'jpg',
  343. url: this.storeJoinin.paying_money_certificate_url
  344. }]
  345. this.cropperOption.imgUrl = ''
  346. this.$forceUpdate()
  347. uni.hideLoading()
  348. }).catch(function(error) {
  349. uni.showToast({
  350. icon: 'none',
  351. title: error.message
  352. })
  353. uni.hideLoading()
  354. this.cropperOption.imgUrl = ''
  355. this.$forceUpdate()
  356. })
  357. },
  358. cropReady() {
  359. this.cropperOption.img = this.cropperOption.imgUrl
  360. },
  361. cropBack(){
  362. this.cropperOption.imgUrl=''
  363. this.$forceUpdate()
  364. },
  365. onAgreement () {
  366. uni.navigateTo({ url: '/pages/home/article/Document?type=open_store'})
  367. },
  368. }
  369. }
  370. </script>
  371. <style lang="scss" scoped>
  372. .common-header{
  373. .btn{background: #000;color: #fff;box-shadow: 0px 2px 4px #d2d2d2;}
  374. }
  375. .content{background: #fff;padding:0 $pageSpace}
  376. .container {
  377. background: #fff;
  378. }
  379. .label {
  380. padding: .5rem;
  381. font-size:$subFontSize;
  382. background: #eee;
  383. }
  384. .notice{font-size:$subFontSize;padding:.5rem;background:#FCF8E3;color:#C09853;line-height: 1.65rem;}
  385. .center-image{width: 300rpx;height: 217rpx;}
  386. .main-content{text-align: center;padding:2rem}
  387. .big-title{margin-top:2rem;margin-bottom: 1rem;}
  388. .desc{font-size:$h2;color:#666}
  389. .payment-notice{
  390. font-size:$fontSize;
  391. color:$primaryColor;
  392. padding:1rem 0;
  393. text-align: right;
  394. }
  395. </style>