gzsq.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  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. }
  78. },
  79. methods: {
  80. subSq() {
  81. let obj = this
  82. if(obj.companyname == ''){
  83. return this.$api.msg("请填写公司名称")
  84. }
  85. if(obj.name == ''){
  86. return this.$api.msg("请填写负责人姓名")
  87. }
  88. if(obj.phone == ''){
  89. return this.$api.msg("请填写联系方式")
  90. }
  91. if(obj.cardid == ''){
  92. return this.$api.msg("请填写身份证号码")
  93. }
  94. if(obj.imagezm == ''){
  95. return this.$api.msg("请填写身份证正面")
  96. }
  97. if(obj.imagefm == ''){
  98. return this.$api.msg("请填写身份证反面")
  99. }
  100. if(obj.address == ''){
  101. return this.$api.msg("请填写店铺地址")
  102. }
  103. if(obj.yyzz == ''){
  104. return this.$api.msg("请填写营业执照")
  105. }
  106. if(obj.imageshop == ''){
  107. return this.$api.msg("请填写门店照片")
  108. }
  109. // if(!obj.dagou) {
  110. // return this.$api.msg('')
  111. // }
  112. apply().then(({data}) =>{
  113. this.$api.msg('申请成功')
  114. })
  115. },
  116. uploads(type) {
  117. console.log(type);
  118. if(type == 'imagezm'){
  119. upload({
  120. filename: ''
  121. }).then(data => {
  122. this.imagezm = data[0].url;
  123. })
  124. }
  125. if(type == 'imagefm'){
  126. upload({
  127. filename: ''
  128. }).then(data => {
  129. this.imagefm = data[0].url;
  130. })
  131. }
  132. if(type == 'yyzz'){
  133. upload({
  134. filename: ''
  135. }).then(data => {
  136. this.yyzz = data[0].url;
  137. })
  138. }
  139. if(type == 'imageshop'){
  140. upload({
  141. filename: ''
  142. }).then(data => {
  143. this.imageshop = data[0].url;
  144. })
  145. }
  146. }
  147. }
  148. }
  149. </script>
  150. <style lang="scss">
  151. .tab-wrapper {
  152. padding: 20rpx 30rpx;
  153. // background-color: #f2f3f5;
  154. }
  155. .itemx {
  156. margin: 0 auto;
  157. width: 100%;
  158. background-color: #fff !important;
  159. height: 100rpx;
  160. display: flex;
  161. // width: 690px;
  162. border: 1px #f4f4f4 solid;
  163. image {
  164. margin-top: 63rpx;
  165. margin-left: 55rpx;
  166. width: 160rpx;
  167. height: 160rpx;
  168. }
  169. .code {
  170. width: 150rpx;
  171. flex-shrink: 0;
  172. text-align: center;
  173. font-size: 28rpx;
  174. font-family: PingFang SC;
  175. font-weight: 500;
  176. color: #FF4C4C;
  177. line-height: 100rpx;
  178. }
  179. .item-tit {
  180. height: 100rpx;
  181. line-height: 100rpx;
  182. padding-left: 30rpx;
  183. width: 220rpx;
  184. font-size: 30rpx;
  185. font-family: PingFang SC;
  186. font-weight: 500;
  187. color: #666666;
  188. flex-shrink: 0;
  189. }
  190. input {
  191. width: 530rpx;
  192. padding-right: 20rpx;
  193. height: 100rpx;
  194. line-height: 100rpx;
  195. font-size: 30rpx;
  196. font-family: PingFang SC;
  197. font-weight: 500;
  198. color: #333333;
  199. }
  200. }
  201. .scsfz-wrap {
  202. width: 690rpx;
  203. height: 673rpx;
  204. background: #FFFFFF;
  205. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  206. border-radius: 10rpx;
  207. margin: 0 auto 20rpx;
  208. font-size: 29rpx;
  209. font-family: SourceHanSansCN;
  210. font-weight: 400;
  211. color: #B2B2B2;
  212. text-align: center;
  213. padding-top: 33rpx;
  214. image {
  215. display: block;
  216. width: 354rpx;
  217. height: 240rpx;
  218. margin: auto;
  219. }
  220. }
  221. .sq-btn {
  222. width: 750rpx;
  223. height: 98rpx;
  224. line-height: 98rpx;
  225. background: #DC262B;
  226. text-align: center;
  227. font-size: 36rpx;
  228. font-family: PingFang SC;
  229. font-weight: 500;
  230. color: #FFFFFF;
  231. }
  232. .sq-xz {
  233. height: 32rpx;
  234. line-height: 32rpx;
  235. display: flex;
  236. margin: 21rpx 0 75rpx 30rpx;
  237. font-size: 24rpx;
  238. font-family: PingFang SC;
  239. font-weight: 500;
  240. color: #0C1732;
  241. .sq-gou {
  242. display: inline-block;
  243. width: 32rpx;
  244. height: 32rpx;
  245. border-radius: 50%;
  246. border: 1px solid #999;
  247. margin-right: 15rpx;
  248. }
  249. .sq-gou-g {
  250. width: 32rpx;
  251. height: 32rpx;
  252. border-radius: 50%;
  253. margin-right: 15rpx;
  254. }
  255. }
  256. </style>