Businesses.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605
  1. <template>
  2. <view class="page" :style="{'min-height':h+'px'}">
  3. <view class="tenant-title">
  4. <text>基本信息</text>
  5. </view>
  6. <view class="from-content">
  7. <view class="one-realName">
  8. <view class="realName">
  9. 商户名称
  10. </view>
  11. <!-- <u--input v-model="realName" border="none" pl ></u--input> -->
  12. <view class="right">
  13. <input type="text" v-model="list.name" border="none" placeholder="请输入昵称" />
  14. </view>
  15. </view>
  16. <view class="one" @click="nav">
  17. <view class="">
  18. 商户类型
  19. </view>
  20. <view class="">
  21. 渔家乐
  22. <!-- <u-icon name="arrow-right"></u-icon> -->
  23. </view>
  24. </view>
  25. <view class="one-mobile">
  26. <view class="mobile">
  27. 企业名称
  28. </view>
  29. <view class="right">
  30. <input type="text" v-model="list.busName" border="none" placeholder="请输入" style="height: 48rpx;" />
  31. </view>
  32. </view>
  33. <view class="one" @click="nav">
  34. <view class="">
  35. 企业类型
  36. </view>
  37. <view class="">
  38. <!-- <u-icon name="arrow-right"></u-icon> -->
  39. 渔家乐
  40. </view>
  41. </view>
  42. <view class="one-mobile">
  43. <view class="mobile">
  44. 企业法人
  45. </view>
  46. <view class="right">
  47. {{list.legalPerson}}
  48. </view>
  49. </view>
  50. <view class="one-mobile">
  51. <view class="mobile">
  52. 法人身份证号码
  53. </view>
  54. <view class="right">
  55. {{list.idCard}}
  56. </view>
  57. </view>
  58. <view class="one-mobile">
  59. <view class="mobile" style="width: 350rpx;">
  60. 统一社区信用代码
  61. </view>
  62. <view class="right">
  63. {{list.creditCode}}
  64. </view>
  65. </view>
  66. <view class="one-mobile">
  67. <view class="mobile">
  68. 企业地址
  69. </view>
  70. <view class="right">
  71. {{list.areaDetail}}
  72. </view>
  73. </view>
  74. </view>
  75. <view class="tenant-title">
  76. <text>联系人信息</text>
  77. </view>
  78. <view class="from-content">
  79. <view class="one-mobile">
  80. <view class="mobile">
  81. 联系人姓名
  82. </view>
  83. <view class="right">
  84. {{list.linkName}}
  85. </view>
  86. </view>
  87. <view class="one-mobile">
  88. <view class="mobile">
  89. 联系人号码
  90. </view>
  91. <view class="right">
  92. {{list.phone}}
  93. </view>
  94. </view>
  95. </view>
  96. <view class="tenant-title">
  97. <text>商家相册</text>
  98. </view>
  99. <view class="from-content" style="padding: 30rpx;">
  100. <view class="tenant-image">
  101. <view @click="idCardFront">
  102. <image :src="list.idCardFront" mode=""></image>
  103. <view>法人身份证国徽面</view>
  104. </view>
  105. <view @click="idCardReverse">
  106. <image :src="list.idCardReverse" mode=""></image>
  107. <view>法人身份证人像面</view>
  108. </view>
  109. <view @click="licensePic">
  110. <image :src="list.licensePic" mode=""></image>
  111. <view>营业执照</view>
  112. </view>
  113. <view @click="usccl">
  114. <image :src="list.usccl" mode=""></image>
  115. <view>统一社会信息代码证</view>
  116. </view>
  117. <view @click="shopSign">
  118. <image :src="list.shopSign" mode=""></image>
  119. <view>门头照</view>
  120. </view>
  121. <view @click="shopImgs">
  122. <image :src="list.shopImgs" mode=""></image>
  123. <view>店铺照片</view>
  124. </view>
  125. </view>
  126. </view>
  127. <!-- 选择弹框学历要求 -->
  128. <u-popup :show="showTwo" @close="close" :round="24" @open="open">
  129. <view class="pop">
  130. <view class="hander">
  131. <view class="left" @click="showTwo=false">
  132. 取消
  133. </view>
  134. <view class="center">
  135. <!-- 学历要求 -->
  136. </view>
  137. <view class="right" @click="showTwo=false">
  138. 确定
  139. </view>
  140. </view>
  141. <view class="At-last" v-for="item,index in JobList">
  142. <view class="item" @click="choose(item,index)" :class="indexDb==index?'activeItem':''">
  143. {{item.name}}
  144. </view>
  145. </view>
  146. </view>
  147. </u-popup>
  148. <view class="from-content">
  149. <button class="tenant-button" @click="merchant">
  150. 立即保存
  151. </button>
  152. </view>
  153. </view>
  154. </template>
  155. <script>
  156. export default {
  157. data() {
  158. return {
  159. h: uni.getSystemInfoSync().windowHeight - 87,
  160. mt: uni.getSystemInfoSync().statusBarHeight + 44,
  161. titleHeader: '个人信息',
  162. fileList: [],
  163. JobList: [{
  164. name: '不限'
  165. }, {
  166. name: '高中',
  167. },
  168. {
  169. name: '中专/技校',
  170. },
  171. {
  172. name: '大专',
  173. },
  174. {
  175. name: '本科',
  176. },
  177. {
  178. name: '硕士',
  179. }
  180. ],
  181. fishermanId: uni.getStorageSync('merchantId'),
  182. list: {},
  183. dto: {
  184. name: '', //商户名称
  185. busName: '', //企业名称
  186. merchantType: 10, //商户类型
  187. companyType: '', //企业类型
  188. legalPerson: '', //企业法人
  189. idCard: '', //法人身份证号码
  190. creditCode: '', //统一社区信用代码
  191. areaDetail: '', //企业地址
  192. linkName: '', //联系人姓名
  193. phone: '', //联系人号码
  194. idCardFront: '', //法人身份证国徽面
  195. idCardReverse: '', //法人身份证人像面
  196. licensePic: '', //营业执照
  197. usccl: '', //统一社会信息代码证
  198. shopSign: '', //门头照
  199. shopImgs: '', //店铺照片
  200. id: ''
  201. }
  202. }
  203. },
  204. onLoad() {
  205. this.getList()
  206. },
  207. methods: {
  208. getList() {
  209. // this.$api.get('/merchant/merchantFisherman/home?id=' + this.homestayId).then(res => {
  210. // console.log(res.data);
  211. // })
  212. let id = this.fishermanId
  213. this.$api.get(`/merchant/merchantFisherman/home/${id}`).then(res => {
  214. console.log(res.data);
  215. this.list = res.data.data
  216. })
  217. },
  218. // 立即保存
  219. merchant() {
  220. this.dto.name = this.list.name
  221. this.dto.busName = this.list.busName
  222. this.dto.merchantType = this.list.merchantType
  223. this.dto.companyType = this.list.companyType
  224. this.dto.legalPerson = this.list.legalPerson
  225. this.dto.idCard = this.list.idCard
  226. this.dto.creditCode = this.list.creditCode
  227. this.dto.idCardReverse = this.list.idCardReverse
  228. this.dto.licensePic = this.list.licensePic
  229. this.dto.usccl = this.list.usccl
  230. this.dto.shopSign = this.list.shopSign
  231. this.dto.shopImgs = this.list.shopImgs
  232. this.dto.id = uni.getStorageSync('merchantId')
  233. this.$api.put('/merchant/merchantFisherman/home', this.dto).then(res => {
  234. console.log(res);
  235. })
  236. },
  237. // 上传头像法人身份证国徽面
  238. idCardFront() {
  239. uni.chooseImage({
  240. sourceType: ['album'], //从相册选择
  241. success: chooseImageRes => {
  242. const tempFilePaths = chooseImageRes.tempFilePaths;
  243. uni.uploadFile({
  244. url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
  245. filePath: tempFilePaths[0],
  246. name: 'file',
  247. header: {
  248. token: wx.getStorageSync('access_token')
  249. },
  250. success: res => {
  251. // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
  252. let data = JSON.parse(res.data);
  253. this.dto.idCardFront = data.data.url
  254. this.list.idCardFront = data.data.url
  255. }
  256. });
  257. },
  258. fail: err => {
  259. this.myToast('图片上传失败', 'none');
  260. }
  261. });
  262. },
  263. // 上传法人身份证人像面
  264. idCardReverse() {
  265. uni.chooseImage({
  266. sourceType: ['album'], //从相册选择
  267. success: chooseImageRes => {
  268. const tempFilePaths = chooseImageRes.tempFilePaths;
  269. uni.uploadFile({
  270. url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
  271. filePath: tempFilePaths[0],
  272. name: 'file',
  273. header: {
  274. token: wx.getStorageSync('access_token')
  275. },
  276. success: res => {
  277. // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
  278. let data = JSON.parse(res.data);
  279. this.dto.idCardReverse = data.data.url
  280. this.list.idCardReverse = data.data.url
  281. }
  282. });
  283. },
  284. fail: err => {
  285. this.myToast('图片上传失败', 'none');
  286. }
  287. });
  288. }, // 上传营业执照
  289. licensePic() {
  290. uni.chooseImage({
  291. sourceType: ['album'], //从相册选择
  292. success: chooseImageRes => {
  293. const tempFilePaths = chooseImageRes.tempFilePaths;
  294. uni.uploadFile({
  295. url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
  296. filePath: tempFilePaths[0],
  297. name: 'file',
  298. header: {
  299. token: wx.getStorageSync('access_token')
  300. },
  301. success: res => {
  302. // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
  303. let data = JSON.parse(res.data);
  304. this.dto.licensePic = data.data.url
  305. this.list.licensePic = data.data.url
  306. }
  307. });
  308. },
  309. fail: err => {
  310. this.myToast('图片上传失败', 'none');
  311. }
  312. });
  313. }, // 上传统一社会信息代码证
  314. usccl() {
  315. uni.chooseImage({
  316. sourceType: ['album'], //从相册选择
  317. success: chooseImageRes => {
  318. const tempFilePaths = chooseImageRes.tempFilePaths;
  319. uni.uploadFile({
  320. url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
  321. filePath: tempFilePaths[0],
  322. name: 'file',
  323. header: {
  324. token: wx.getStorageSync('access_token')
  325. },
  326. success: res => {
  327. // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
  328. let data = JSON.parse(res.data);
  329. this.dto.usccl = data.data.url
  330. this.list.usccl = data.data.url
  331. }
  332. });
  333. },
  334. fail: err => {
  335. this.myToast('图片上传失败', 'none');
  336. }
  337. });
  338. }, // 上传门头照
  339. shopSign() {
  340. uni.chooseImage({
  341. sourceType: ['album'], //从相册选择
  342. success: chooseImageRes => {
  343. const tempFilePaths = chooseImageRes.tempFilePaths;
  344. uni.uploadFile({
  345. url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
  346. filePath: tempFilePaths[0],
  347. name: 'file',
  348. header: {
  349. token: wx.getStorageSync('access_token')
  350. },
  351. success: res => {
  352. // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
  353. let data = JSON.parse(res.data);
  354. this.dto.shopSign = data.data.url
  355. this.list.shopSign = data.data.url
  356. }
  357. });
  358. },
  359. fail: err => {
  360. this.myToast('图片上传失败', 'none');
  361. }
  362. });
  363. }, // 上传店铺照片
  364. shopImgs() {
  365. uni.chooseImage({
  366. sourceType: ['album'], //从相册选择
  367. success: chooseImageRes => {
  368. const tempFilePaths = chooseImageRes.tempFilePaths;
  369. uni.uploadFile({
  370. url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
  371. filePath: tempFilePaths[0],
  372. name: 'file',
  373. header: {
  374. token: wx.getStorageSync('access_token')
  375. },
  376. success: res => {
  377. // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
  378. let data = JSON.parse(res.data);
  379. this.dto.shopImgs = data.data.url
  380. this.list.shopImgs = data.data.url
  381. }
  382. });
  383. },
  384. fail: err => {
  385. this.myToast('图片上传失败', 'none');
  386. }
  387. });
  388. },
  389. }
  390. }
  391. </script>
  392. <style lang="scss" scoped>
  393. .page {
  394. box-sizing: border-box;
  395. // padding: 30rpx;
  396. // padding-top: 150rpx;
  397. }
  398. //标题样式
  399. .tenant-title {
  400. height: 88rpx;
  401. background: #F5F8FA;
  402. padding-left: 30rpx;
  403. text {
  404. line-height: 88rpx;
  405. font-size: 28rpx;
  406. color: #007A69;
  407. }
  408. }
  409. //商家相册样式
  410. .tenant-image {
  411. width: 100%;
  412. display: flex;
  413. flex-wrap: wrap;
  414. justify-content: space-around;
  415. >view {
  416. width: 47%;
  417. text-align: center;
  418. image {
  419. width: 100%;
  420. height: 212rpx;
  421. background: #F6F8F9;
  422. }
  423. view {
  424. margin: 15rpx 0 45rpx 0;
  425. }
  426. }
  427. }
  428. //保存样式
  429. .tenant-button {
  430. background: #007A69;
  431. border-radius: 40rpx;
  432. font-weight: bold;
  433. font-size: 28rpx;
  434. color: #FFFFFF;
  435. }
  436. .from-content {
  437. padding: 30rpx;
  438. .title {
  439. margin: 40rpx 0 36rpx;
  440. font-size: 30rpx;
  441. font-weight: Regular;
  442. color: #111111;
  443. }
  444. .one-image {
  445. width: 100%;
  446. display: flex;
  447. justify-content: space-between;
  448. .image {
  449. width: 124rpx;
  450. height: 124rpx;
  451. border-radius: 100rpx;
  452. image {
  453. width: 100%;
  454. height: 100%;
  455. border-radius: 100rpx;
  456. }
  457. }
  458. .user {
  459. margin-top: 24rpx;
  460. font-size: 30rpx;
  461. color: #111;
  462. font-weight: Regular;
  463. }
  464. }
  465. .one-realName {
  466. width: 100%;
  467. display: flex;
  468. align-items: center;
  469. height: 120rpx;
  470. line-height: 120rpx;
  471. border-bottom: 1rpx solid #EFEFEF;
  472. .realName {
  473. width: 188rpx;
  474. height: 120rpx;
  475. font-size: 30rpx;
  476. color: #333333;
  477. font-weight: Regular;
  478. }
  479. .right {
  480. text-align: right;
  481. width: 100%;
  482. font-size: 30rpx;
  483. color: #666666;
  484. font-weight: Regular;
  485. // display: flex;
  486. // justify-content: space-between;
  487. }
  488. }
  489. .one-mobile {
  490. display: flex;
  491. width: 100%;
  492. align-items: center;
  493. height: 120rpx;
  494. line-height: 120rpx;
  495. border-bottom: 1rpx solid #EFEFEF;
  496. .right {
  497. width: 100%;
  498. text-align: right;
  499. font-size: 30rpx;
  500. color: #666666;
  501. font-weight: Regular;
  502. }
  503. .mobile {
  504. width: 380rpx !important;
  505. height: 120rpx;
  506. font-size: 30rpx;
  507. color: #333333;
  508. font-weight: Regular;
  509. }
  510. .replacement {
  511. border-radius: 50rpx;
  512. width: 80rpx;
  513. height: 48rpx;
  514. line-height: 48rpx;
  515. border: 1rpx solid #025EA7;
  516. color: #025EA7;
  517. font-weight: Regular;
  518. font-size: 24rpx;
  519. text-align: center;
  520. }
  521. }
  522. .one {
  523. height: 120rpx;
  524. line-height: 120rpx;
  525. display: flex;
  526. border-bottom: 1rpx solid #EFEFEF;
  527. justify-content: space-between;
  528. align-items: center;
  529. font-size: 30rpx;
  530. color: #333333;
  531. font-weight: Regular;
  532. }
  533. }
  534. .btn {
  535. margin: 120rpx auto;
  536. width: 650rpx;
  537. height: 88rpx;
  538. display: flex;
  539. background-color: #01B9F9;
  540. line-height: 88rpx;
  541. border-radius: 50rpx;
  542. .btn-btn {
  543. margin: 0 auto;
  544. font-size: 32rpx;
  545. color: #FFFFFF;
  546. font-weight: Regular;
  547. }
  548. }
  549. </style>