addcompany.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. <template>
  2. <view class="content">
  3. <u-navbar leftText="返回" title="企业认证" :safeAreaInsetTop="false">
  4. <view class="u-nav-slot" slot="left">
  5. <u-icon @click='navback' name="arrow-left" size="19"></u-icon>
  6. </view>
  7. <view class="u-nav-slot" slot="right">
  8. <view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='next'>下一步</view>
  9. </view>
  10. </u-navbar>
  11. <view style='margin:50px 0 0 19px;font-size:12px;color:#EF4034;'>注:企业认证仅限该企业法定代表人本人完成。</view>
  12. <view class='wrap'>
  13. <view class="flex border-bottom mt20 align-center">
  14. <view class="left">企业名称</view>
  15. <view class="flex right">
  16. <u--input placeholder="输入企业名称" inputAlign='left' border="none" v-model="dataDetails.companyName">
  17. </u--input>
  18. </view>
  19. </view>
  20. <view class="flex border-bottom mt20 align-center">
  21. <view class="left">法定代表人姓名</view>
  22. <view class="flex right">
  23. <u--input placeholder="输入法定代表人姓名" inputAlign='left' border="none"
  24. v-model="dataDetails.legalPersonName">
  25. </u--input>
  26. </view>
  27. </view>
  28. <view class="flex border-bottom mt20 align-center">
  29. <view class="left">联系电话</view>
  30. <view class="flex right">
  31. <u--input disabledColor='#fff' disabled placeholder="输入联系电话" inputAlign='left' border="none"
  32. v-model="dataDetails.phone">
  33. </u--input>
  34. </view>
  35. </view>
  36. <view class="flex mt20 align-center">
  37. <view class="left">注册实缴金额</view>
  38. <view class="flex right align-center">
  39. <u--input placeholder="输入企业注册实缴金额" inputAlign='left' border="none"
  40. v-model="dataDetails.registeredPaidAmount">
  41. </u--input>
  42. <view>万元</view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class='content1'>
  47. <view class="title">上传营业执照</view>
  48. <view style='position:relative;'>
  49. <view v-if='!dataDetails.businessLicenseAddressUrl' @click="uploadImg(1)" class="picture picture7">
  50. <image class="xj-image" src="@/static/mine/ic_shanchuan@2x.png"></image>
  51. <view class="text">上传营业执照</view>
  52. </view>
  53. <view v-if='dataDetails.businessLicenseAddressUrl' @click.stop="uploadImg(1)"
  54. class="preview-card-img picture ">
  55. <view @click.stop="delCard(1)">
  56. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  57. </image>
  58. </view>
  59. <image class="" :src="dataDetails.businessLicenseAddressUrl" mode="aspectFit"></image>
  60. </view>
  61. </view>
  62. <view class="flex row">
  63. <view class="left-text">营业期限截止日期</view>
  64. <view style='font-size:16px;width:50%;' class='flex flex-space-between'
  65. @click="selectValidityPeriod(0)">
  66. <view :style="{'color':dataDetails.businessTermDate ? '#000':'#C6CBD5'}">
  67. {{dataDetails.businessTermDate?dataDetails.businessTermDate:'选择期限截止日期'}}
  68. </view>
  69. <view>
  70. <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
  71. </view>
  72. </view>
  73. </view>
  74. <view class="flex row noborder">
  75. <view class="left-text">统一社会信用代码</view>
  76. <u--input placeholder="请输入统一社会信用代码" inputAlign='left' border="none"
  77. v-model="dataDetails.unifiedSocialCreditCode">
  78. </u--input>
  79. </view>
  80. <view class="flex row noborder">
  81. <view class="left-text">企业用地是否自有</view>
  82. <u-radio-group placement="row" class="select-type" v-model="dataDetails.landOwnership">
  83. <u-radio :customStyle="radioCustomStyle" v-for="(item, index) in radiolist1" :key="index"
  84. :label="item.name" :name="item.name" @change="radioChange($event,item)" labelSize='12px'
  85. :iconSize='4'>
  86. </u-radio>
  87. </u-radio-group>
  88. </view>
  89. </view>
  90. <view class='content2'>
  91. <view class="title">{{dataDetails.landOwnership=='自有'?'上传房产证':'上传租赁合同(扫描件或图片)'}}</view>
  92. <view style='position:relative;'>
  93. <view v-if='!dataDetails.propertyAddressUrl' @click="uploadImg(2)" class="picture">
  94. <image class="xj-image" src="@/static/mine/company/tianjiazhaopian@3x.png"></image>
  95. </view>
  96. <view v-if='dataDetails.propertyAddressUrl' @click.stop="uploadImg(2)" class="preview-card-img picture">
  97. <view @click.stop="delCard(2)">
  98. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  99. </image>
  100. </view>
  101. <image class="uploadimage" :src="dataDetails.propertyAddressUrl" mode="aspectFit"></image>
  102. </view>
  103. </view>
  104. </view>
  105. <view class='content3' v-if="dataDetails.landOwnership=='租赁'">
  106. <view class="flex row flex-space-between">
  107. <view class="left-text">场地租赁截止日期</view>
  108. <view class='flex flex-space-between' @click="selectValidityPeriod(1)">
  109. <view :style="{'color':dataDetails.siteLeaseDate ? '#000':'#C6CBD5'}">
  110. {{dataDetails.siteLeaseDate?dataDetails.siteLeaseDate:'选择日期'}}
  111. </view>
  112. <view>
  113. <u-icon name="arrow-right" color="#7E7E7E" size="12"></u-icon>
  114. </view>
  115. </view>
  116. </view>
  117. </view>
  118. <view class="content4">
  119. <view class="flex row noborder mt20 flex-space-between">
  120. <view class="left-text">申请开通平台垫付运费业务</view>
  121. <view>
  122. <u-switch @change="change" v-model="value" inactiveColor='#ABB0BB' size="20"></u-switch>
  123. </view>
  124. </view>
  125. <view class="flex service align-center">
  126. <u--image @click='consent'
  127. :src="consentStatus==true?'../../static/images/mine/duihao@2x.png':'../../static/images/mine/wxz.png'"
  128. width="12px" height="12px"></u--image>
  129. 我已阅读并同意
  130. <navigator
  131. url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/userAgreement.html"
  132. class="path" hover-class="navigator-hover">《服务协议》</navigator>和<navigator
  133. url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/screctAgreement.html"
  134. class="path" hover-class="navigator-hover">《隐私政策》</navigator>
  135. </view>
  136. </view>
  137. <view class='footer'>
  138. <view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='newlyIncreased'>下一步</view>
  139. </view>
  140. <u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
  141. @change="changeHandler" @cancel="isShowcardValidity=false">
  142. </u-picker>
  143. <u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
  144. @select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
  145. </u-action-sheet>
  146. </view>
  147. </template>
  148. <script>
  149. import {
  150. mapState
  151. } from 'vuex';
  152. import upload from '@/components/upload.vue';
  153. import uploadImage from '@/components/ossutil/uploadFile.js';
  154. export default {
  155. components: {},
  156. data() {
  157. return {
  158. consentStatus: false,
  159. ValidityPeriodType: '',
  160. value: true,
  161. radioCustomStyle: {
  162. margin: '0 0 0 20rpx'
  163. },
  164. radiolist1: [{
  165. name: '自有',
  166. disabled: false
  167. },
  168. {
  169. name: '租赁',
  170. disabled: false
  171. },
  172. ],
  173. isShowcardValidity: false,
  174. uploadType: '',
  175. index: '',
  176. isShowimgType: false,
  177. validityPeriod: [],
  178. checked: false,
  179. checked1: false,
  180. dataDetails: {
  181. phone: '',
  182. businessLicenseAddressUrl: '',
  183. propertyAddressUrl: '',
  184. advanceFreightService: 1,
  185. landOwnership: '自有'
  186. }
  187. }
  188. },
  189. onLoad() {
  190. this.validityPeriod = this.$helper.makeValidityPeriod(0, '长期')
  191. console.log(this)
  192. this.dataDetails.commonId = this.userInfo.id
  193. this.dataDetails.phone = this.userInfo.phone
  194. },
  195. computed: {
  196. ...mapState(['hasLogin', 'userInfo']),
  197. },
  198. methods: {
  199. consent() {
  200. this.consentStatus = !this.consentStatus
  201. },
  202. change(e) {
  203. if (this.value) {
  204. this.$set(this.dataDetails, 'advanceFreightService', 1)
  205. } else {
  206. this.$set(this.dataDetails, 'advanceFreightService', 0)
  207. }
  208. },
  209. radioChange(n) {
  210. console.log('radioChange', n);
  211. this.dataDetails.landOwnership = n
  212. console.log('this.dataDetails.landOwnership', this.dataDetails.landOwnership);
  213. },
  214. delCard() {
  215. this.dataDetails.businessLicenseAddressUrl = ''
  216. this.$forceUpdate()
  217. },
  218. navBack() {
  219. uni.navigateBack();
  220. },
  221. checkedchange() {
  222. this.checked = !this.checked
  223. if (this.checked) {
  224. this.dataDetails.landOwnership = 0
  225. this.checked1 = false
  226. } else {
  227. }
  228. },
  229. checkedchange1() {
  230. this.checked1 = !this.checked1
  231. if (this.checked1) {
  232. this.dataDetails.landOwnership = 1
  233. this.checked = false
  234. } else {
  235. }
  236. },
  237. clickcancel() {
  238. this.isShowcardValidity = false
  239. },
  240. imgTypeSelect(val) {
  241. var _this = this
  242. if (val.name == '相册') {
  243. uni.chooseImage({
  244. count: 1,
  245. sourceType: this.$helper.chooseImage.sourceType,
  246. success: function(res) {
  247. console.log(JSON.stringify(res.tempFilePaths));
  248. uploadImage(res.tempFilePaths[0], 'appData/',
  249. result => {
  250. // 上传成功回调函数
  251. console.log('图片地址', result)
  252. switch (_this.uploadType) {
  253. // 身份正面
  254. case 1:
  255. _this.dataDetails.businessLicenseAddressUrl = result
  256. console.log(_this.dataDetails.businessLicenseAddressUrl)
  257. break
  258. // 身份反面
  259. case 2:
  260. _this.dataDetails.propertyAddressUrl = result
  261. console.log(_this.dataDetails.propertyAddressUrl)
  262. break
  263. case 3:
  264. break;
  265. }
  266. }
  267. )
  268. }
  269. });
  270. } else {
  271. uni.chooseImage({
  272. count: 1,
  273. sourceType: ['camera'],
  274. success: function(res) {
  275. console.log(JSON.stringify(res.tempFilePaths));
  276. uploadImage(res.tempFilePaths[0], 'appData/',
  277. result => {
  278. // 上传成功回调函数
  279. console.log('图片地址', result)
  280. _this.dataDetails.businessLicenseAddressUrl = result
  281. }
  282. )
  283. }
  284. });
  285. }
  286. },
  287. uploadImg(type) {
  288. this.uploadType = type
  289. this.isShowimgType = true
  290. // this.index = index
  291. },
  292. goDetailPage(src) {
  293. uni.setStorage({
  294. key: 'companydata',
  295. data: JSON.stringify(this.dataDetails)
  296. });
  297. uni.$u.route(src);
  298. },
  299. selectValidityPeriod(type) {
  300. this.ValidityPeriodType = type
  301. this.isShowcardValidity = true
  302. },
  303. confirmValidityPeriod(e) {
  304. switch (this.ValidityPeriodType) {
  305. case 0:
  306. if (e.value[0] == '长期') {
  307. this.dataDetails.businessTermDate = e.value[0]
  308. } else {
  309. this.dataDetails.businessTermDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
  310. }
  311. break
  312. case 1:
  313. if (e.value[0] == '长期') {
  314. this.dataDetails.siteLeaseDate = e.value[0]
  315. } else {
  316. this.dataDetails.siteLeaseDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
  317. }
  318. break
  319. }
  320. console.log('confirm', e)
  321. this.isShowcardValidity = false
  322. },
  323. changeHandler(e) {
  324. const {
  325. columnIndex,
  326. value,
  327. values,
  328. index,
  329. picker = this.$refs.uPicker
  330. } = e
  331. // if (columnIndex === 0) {
  332. // debugger
  333. // if (e.index != 0) {
  334. // picker.setColumnValues(1, this.validityPeriod[1].shift())
  335. // }
  336. // } else if (columnIndex === 1) {
  337. // if (e.index != 0) {
  338. // picker.setColumnValues(2, this.validityPeriod[2].shift())
  339. // }
  340. // }
  341. },
  342. }
  343. }
  344. </script>
  345. <style lang="scss" scoped>
  346. .content {
  347. padding-bottom: 200rpx;
  348. }
  349. page {
  350. background: #F5F6FA;
  351. }
  352. .next {
  353. color: #2772FB;
  354. font-size: 13px;
  355. }
  356. .wrap {
  357. background: #fff;
  358. padding: 20rpx 30rpx;
  359. border-radius: 5px;
  360. margin: 20rpx;
  361. .left {
  362. width: 240rpx;
  363. font-size: 28rpx;
  364. }
  365. .right {
  366. font-size: 28rpx;
  367. width: calc(100% - 240rpx);
  368. }
  369. }
  370. .preview-card-img {
  371. // /deep/uni-image>div, uni-image>img {
  372. // transform: scale(1.5) rotate(-90deg);
  373. // }
  374. }
  375. .picture {
  376. margin-top: 20rpx;
  377. background: #F5F6FA;
  378. width: 212rpx;
  379. height: 212rpx;
  380. border-radius: 20rpx;
  381. display: flex;
  382. flex-direction: column;
  383. justify-content: center;
  384. align-items: center;
  385. color: #6A7282;
  386. }
  387. .content1 {
  388. background: #fff;
  389. padding: 20rpx;
  390. margin: 20rpx;
  391. border-radius: 10rpx;
  392. .row {
  393. border-bottom: 1px solid #EEEEEE;
  394. padding-bottom: 28rpx;
  395. margin-top: 26rpx;
  396. }
  397. .left-text {
  398. // background: red;
  399. width: 320rpx;
  400. color: #333333;
  401. display: flex;
  402. align-items: center;
  403. font-size: 14px;
  404. }
  405. .picture {
  406. position: relative;
  407. width: 100%;
  408. height: 440rpx;
  409. display: flex;
  410. justify-content: center;
  411. flex-direction: column;
  412. align-items: center;
  413. .text {
  414. margin-top: 20rpx;
  415. }
  416. }
  417. .picture7 {
  418. background: url(../../../static/mine/cy.png);
  419. background-size: 100% 100%;
  420. }
  421. .xj-image {
  422. width: 100rpx;
  423. height: 100rpx;
  424. }
  425. .title {
  426. color: #999999;
  427. margin: 20rpx 0;
  428. }
  429. }
  430. .content2,
  431. .content3,.content4 {
  432. background: #fff;
  433. padding: 20rpx;
  434. margin: 20rpx;
  435. border-radius: 10rpx;
  436. }
  437. .u-input {
  438. font-size: 16px;
  439. }
  440. .content4 {
  441. }
  442. .del-card {
  443. position: absolute;
  444. top: -10rpx;
  445. right: -6rpx;
  446. width: 80rpx;
  447. height: 80rpx;
  448. z-index: 9;
  449. }
  450. .footer {
  451. position: fixed;
  452. background: #fff;
  453. width: 100%;
  454. bottom: 0;
  455. left: 0;
  456. padding: 15px 15px 30px;
  457. box-sizing: border-box;
  458. }
  459. .newlyIncreased {
  460. width: 100%;
  461. margin: 0 auto;
  462. text-align: center;
  463. height: 46px;
  464. line-height: 46px;
  465. color: #fff;
  466. background: url(../../../static/mine/huozhurenzheng/Mask@3x.png) no-repeat;
  467. background-size: 100%;
  468. }
  469. .u-checkbox-label--left {
  470. margin: 0 10px;
  471. }
  472. .service {
  473. font-size: 24rpx;
  474. margin: 20rpx;
  475. justify-content: center;
  476. /deep/.u-image {
  477. margin: 0 20rpx;
  478. }
  479. }
  480. </style>