gzsq.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <template>
  2. <view class="content">
  3. <view class="tab-wrapper">
  4. <view class="itemx">
  5. <view class="item-tit">公司名称:</view>
  6. <input type="text" v-model="companyname" placeholder="请输入公司名称" />
  7. </view>
  8. <view class="itemx">
  9. <view class="item-tit">负责人姓名:</view>
  10. <input type="text" v-model="name" placeholder="请输入负责人姓名" />
  11. </view>
  12. <view class="itemx">
  13. <view class="item-tit">联系方式:</view>
  14. <input type="text" v-model="phone" placeholder="请输入联系方式" />
  15. </view>
  16. <view class="itemx">
  17. <view class="item-tit">身份证号:</view>
  18. <input type="text" v-model="cardid" placeholder="请输入身份证号" />
  19. </view>
  20. </view>
  21. <view class="scsfz-wrap">
  22. <image v-if="imagezm == ''" src="../../static/img/sfzzm.png" mode="" @click="uploads('imagezm')"></image>
  23. <image v-if="imagezm != ''" :src="imagezm" mode="" @click="uploads('imagezm')"></image>
  24. <view class="" style="padding-bottom: 33rpx;">
  25. 添加身份证正面
  26. </view>
  27. <image v-if="imagefm == ''" src="../../static/img/sfzzm.png" mode="" @click="uploads('imagefm')"></image>
  28. <image v-if="imagefm != ''" :src="imagefm" mode="" @click="uploads('imagefm')"></image>
  29. <view class="">
  30. 添加身份证反面
  31. </view>
  32. </view>
  33. <view class="tab-wrapper" style="padding-top: 0;">
  34. <view class="itemx">
  35. <view class="item-tit">店铺地址:</view>
  36. <input type="text" v-model="address" placeholder="请输入店铺地址" />
  37. </view>
  38. <view class="itemx" style="height: 250rpx;">
  39. <view class="item-tit">营业执照:</view>
  40. <image v-if="yyzz == ''" src="../../static/img/add.png" mode="" @click="uploads('yyzz')"></image>
  41. <image v-if="yyzz != ''" :src="yyzz" mode="" @click="uploads('yyzz')"></image>
  42. </view>
  43. </view>
  44. <view class="tab-wrapper" style="padding-top: 0;">
  45. <view class="itemx" style="height: 250rpx;">
  46. <view class="item-tit">门店照片:</view>
  47. <image v-if="imageshop == ''" src="../../static/img/add.png" mode="" @click="uploads('imageshop')"></image>
  48. <image v-if="imageshop != ''" :src="imageshop" mode="" @click="uploads('imageshop')"></image>
  49. </view>
  50. </view>
  51. <view class="sq-xz" @click="dagou = !dagou">
  52. <text class="sq-gou" v-if="!dagou"></text>
  53. <image src="../../static/icon/gou.png" mode="" class="sq-gou-g" v-else></image>
  54. <text>我已阅读并同意</text><text style="color: #DC262B;">《馆长申请须知》</text>
  55. </view>
  56. <view class="sq-btn" @click="subSq()">
  57. 提交申请
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. import { upload } from '@/api/order.js';
  63. import { apply } from '@/api/user.js'
  64. export default {
  65. data() {
  66. return {
  67. dagou: true,
  68. companyname:'',//公司名称
  69. name:'',//负责人姓名
  70. phone:'',//联系方式
  71. cardid:'',//身份证号码
  72. imagezm:'',//身份证正面
  73. imagefm:'',//身份证反面
  74. address:'',//店铺地址
  75. yyzz:'',//营业执照
  76. imageshop:'',//门店照片
  77. upFileLoding:false,
  78. }
  79. },
  80. methods: {
  81. subSq() {
  82. let obj = this
  83. if(obj.companyname == ''){
  84. return this.$api.msg("请填写公司名称")
  85. }
  86. if(obj.name == ''){
  87. return this.$api.msg("请填写负责人姓名")
  88. }
  89. if(obj.phone == ''){
  90. return this.$api.msg("请填写联系方式")
  91. }
  92. if(obj.cardid == ''){
  93. return this.$api.msg("请填写身份证号码")
  94. }
  95. if(obj.imagezm == ''){
  96. return this.$api.msg("请填写身份证正面")
  97. }
  98. if(obj.imagefm == ''){
  99. return this.$api.msg("请填写身份证反面")
  100. }
  101. if(obj.address == ''){
  102. return this.$api.msg("请填写店铺地址")
  103. }
  104. if(obj.yyzz == ''){
  105. return this.$api.msg("请填写营业执照")
  106. }
  107. if(obj.imageshop == ''){
  108. return this.$api.msg("请填写门店照片")
  109. }
  110. // if(!obj.dagou) {
  111. // return this.$api.msg('')
  112. // }
  113. apply().then(({data}) =>{
  114. this.$api.msg('申请成功')
  115. })
  116. },
  117. uploads(type) {
  118. const that = this;
  119. if (that.upFileLoding) {
  120. return
  121. }
  122. that.upFileLoding = true;
  123. setTimeout(()=>{
  124. that.upFileLoding = false;
  125. },1000);
  126. upload({
  127. filename: ''
  128. }).then(data => {
  129. that[type] = data[0].url;
  130. }).catch((err) => {
  131. console.log(err);
  132. })
  133. }
  134. }
  135. }
  136. </script>
  137. <style lang="scss">
  138. .tab-wrapper {
  139. padding: 20rpx 30rpx;
  140. // background-color: #f2f3f5;
  141. }
  142. .itemx {
  143. margin: 0 auto;
  144. width: 100%;
  145. background-color: #fff !important;
  146. height: 100rpx;
  147. display: flex;
  148. // width: 690px;
  149. border: 1px #f4f4f4 solid;
  150. image {
  151. margin-top: 63rpx;
  152. margin-left: 55rpx;
  153. width: 160rpx;
  154. height: 160rpx;
  155. }
  156. .code {
  157. width: 150rpx;
  158. flex-shrink: 0;
  159. text-align: center;
  160. font-size: 28rpx;
  161. font-family: PingFang SC;
  162. font-weight: 500;
  163. color: #FF4C4C;
  164. line-height: 100rpx;
  165. }
  166. .item-tit {
  167. height: 100rpx;
  168. line-height: 100rpx;
  169. padding-left: 30rpx;
  170. width: 220rpx;
  171. font-size: 30rpx;
  172. font-family: PingFang SC;
  173. font-weight: 500;
  174. color: #666666;
  175. flex-shrink: 0;
  176. }
  177. input {
  178. width: 530rpx;
  179. padding-right: 20rpx;
  180. height: 100rpx;
  181. line-height: 100rpx;
  182. font-size: 30rpx;
  183. font-family: PingFang SC;
  184. font-weight: 500;
  185. color: #333333;
  186. }
  187. }
  188. .scsfz-wrap {
  189. width: 690rpx;
  190. height: 673rpx;
  191. background: #FFFFFF;
  192. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  193. border-radius: 10rpx;
  194. margin: 0 auto 20rpx;
  195. font-size: 29rpx;
  196. font-family: SourceHanSansCN;
  197. font-weight: 400;
  198. color: #B2B2B2;
  199. text-align: center;
  200. padding-top: 33rpx;
  201. image {
  202. display: block;
  203. width: 354rpx;
  204. height: 240rpx;
  205. margin: auto;
  206. }
  207. }
  208. .sq-btn {
  209. width: 750rpx;
  210. height: 98rpx;
  211. line-height: 98rpx;
  212. background: #DC262B;
  213. text-align: center;
  214. font-size: 36rpx;
  215. font-family: PingFang SC;
  216. font-weight: 500;
  217. color: #FFFFFF;
  218. }
  219. .sq-xz {
  220. height: 32rpx;
  221. line-height: 32rpx;
  222. display: flex;
  223. margin: 21rpx 0 75rpx 30rpx;
  224. font-size: 24rpx;
  225. font-family: PingFang SC;
  226. font-weight: 500;
  227. color: #0C1732;
  228. .sq-gou {
  229. display: inline-block;
  230. width: 32rpx;
  231. height: 32rpx;
  232. border-radius: 50%;
  233. border: 1px solid #999;
  234. margin-right: 15rpx;
  235. }
  236. .sq-gou-g {
  237. width: 32rpx;
  238. height: 32rpx;
  239. border-radius: 50%;
  240. margin-right: 15rpx;
  241. }
  242. }
  243. </style>