addcompany.vue 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226
  1. <template>
  2. <view class="content">
  3. <!-- <web-view :src="srcHandler()" v-if="isSshowPlayVideo"></web-view> -->
  4. <!-- <u-navbar leftText="返回" title="企业认证" :safeAreaInsetTop="true">
  5. <view class="u-nav-slot" slot="left">
  6. <u-icon @click='navback' name="arrow-left" size="19"></u-icon>
  7. </view>
  8. <view class="u-nav-slot" slot="right">
  9. <view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='next'>下一步</view>
  10. </view>
  11. </u-navbar> -->
  12. <view v-show="videoPlay">
  13. <video controls id="myvideo" :src="dataDetails.videoAddressUrl" @fullscreenchange="screenChange"></video>
  14. </view>
  15. <view style='margin:10px 0 0 19px;font-size:13px;color:#EF4034;'>注:企业认证仅限该企业法定代表人本人完成。</view>
  16. <view class='content1'>
  17. <view class="title">上传营业执照</view>
  18. <view style='position:relative;' @click="uploadImg(1)">
  19. <view v-if='!dataDetails.businessLicenseAddressUrl' class="picture picture7">
  20. <image class="xj-image" src="@/static/mine/ic_shanchuan@2x.png"></image>
  21. <view class="text">上传营业执照</view>
  22. </view>
  23. <view v-if='dataDetails.businessLicenseAddressUrl' @click.stop="uploadImg(1)"
  24. class="preview-card-img picture ">
  25. <view @click.stop="delCard(1)">
  26. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  27. </image>
  28. </view>
  29. <image class="" :src="dataDetails.businessLicenseAddressUrl" mode="aspectFit"></image>
  30. </view>
  31. </view>
  32. <view class="flex row flex-space-between">
  33. <view class="left-text">营业期限截止日期</view>
  34. <view style='' class='flex flex-space-between align-center' @click="selectData(0)">
  35. <view :style="{'color':dataDetails.businessTermDate ? '#000':'#C6CBD5'}">
  36. {{dataDetails.businessTermDate?dataDetails.businessTermDate:'选择期限截止日期'}}
  37. </view>
  38. <u-icon name="arrow-right" color="#7E7E7E" size="14"></u-icon>
  39. </view>
  40. </view>
  41. <view class="flex row noborder flex-space-between">
  42. <view class="left-text">统一社会信用代码</view>
  43. <u--input @blur='codeBlur' placeholder="请输入统一社会信用代码" inputAlign='right' border="none"
  44. v-model="dataDetails.unifiedSocialCreditCode" maxlength='18'>
  45. </u--input>
  46. </view>
  47. </view>
  48. <view class='wrap'>
  49. <view class="flex border-bottom mt20 flex-space-between">
  50. <view class="left">企业名称</view>
  51. <view class="flex right">
  52. <u--input placeholder="输入企业名称" @input='companyNamechange' inputAlign='right' border="none"
  53. v-model="dataDetails.companyName" @blur='companyNameBlur'>
  54. </u--input>
  55. </view>
  56. </view>
  57. <view class="flex border-bottom mt20 flex-space-between">
  58. <view class="left">法定代表人姓名</view>
  59. <view class="flex">
  60. <!-- <u--input disabled placeholder="输入法定代表人姓名" inputAlign='right' border="none"
  61. v-model="dataDetails.legalPersonName" >
  62. </u--input> -->
  63. {{dataDetails.legalPersonName}}
  64. </view>
  65. </view>
  66. <view class="flex border-bottom mt20 flex-space-between">
  67. <view class="left">联系电话</view>
  68. <view class="flex right">
  69. <u--input disabledColor='#fff' placeholder="输入联系电话" maxlength="15" inputAlign='right' border="none"
  70. v-model="dataDetails.phone">
  71. </u--input>
  72. </view>
  73. </view>
  74. <view class="flex border-bottom mt20 flex-space-between">
  75. <view class="left">通讯地址</view>
  76. <view class="flex right">
  77. <u--input disabledColor='#fff' placeholder="输入通讯地址" maxlength="15" inputAlign='right' border="none"
  78. v-model="dataDetails.mailingAddress">
  79. </u--input>
  80. </view>
  81. </view>
  82. <view class="title">上传身份证人像面</view>
  83. <view @click.stop="uploadImg(2)" class="picture picture1" v-if="!dataDetails.cardAddressUrl">
  84. <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
  85. <view class="text">上传身份证人像面</view>
  86. </view>
  87. <view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(2)" class="preview-card-img picture">
  88. <image class="" :src="dataDetails.cardAddressUrl" mode="aspectFit" style=""></image>
  89. </view>
  90. <view class="title">上传身份证国徽面</view>
  91. <view @click="uploadImg(3)" class="picture picture2" v-if="!dataDetails.cardBackAddressUrl">
  92. <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
  93. <view class="text">上传身份证国徽面</view>
  94. </view>
  95. <view v-if="dataDetails.cardBackAddressUrl" @click.stop="uploadImg(3)" class="preview-card-img picture">
  96. <image class="" :src="dataDetails.cardBackAddressUrl" mode="aspectFit" style=""></image>
  97. </view>
  98. <view class="flex border-bottom mt20 flex-space-between">
  99. <view class="left-text">身份证号</view>
  100. <view class="flex right">
  101. <u--input disabledColor='#fff' placeholder="输入身份证号" maxlength="18" inputAlign='right' border="none"
  102. v-model="dataDetails.cardNumber">
  103. </u--input>
  104. </view>
  105. </view>
  106. <view class="flex border-bottom mt20 flex-space-between align-center">
  107. <view class="left-text">身份证有效期</view>
  108. <view class='flex' @click="selectData(1)">
  109. <span :style="{'color':dataDetails.cardValidityDate ? '#000':'#C6CBD5'}">
  110. {{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择身份证有效期'}}
  111. </span>
  112. <u-icon name="arrow-right" color="#7E7E7E" size="14"></u-icon>
  113. </view>
  114. </view>
  115. <view class="flex row border-bottom mt20 flex-space-between">
  116. <view class="left-text">对公账户</view>
  117. <view class="flex">
  118. <!-- <u--input disabled placeholder="户名与企业名称一致" inputAlign='right' border="none"
  119. v-model="dataDetails.corporateAccount">
  120. </u--input> -->
  121. {{dataDetails.corporateAccount}}
  122. </view>
  123. </view>
  124. <view class="flex row border-bottom mt20 flex-space-between">
  125. <view class="left-text">卡号</view>
  126. <view class="flex right">
  127. <u--input maxlength='19' placeholder="输入银行卡号码" inputAlign='right' border="none"
  128. v-model="dataDetails.bankCard">
  129. </u--input>
  130. <view class="" @click="uploadImg(5)" style="display: flex;align-items: center;margin-left: 20rpx;">
  131. <image src="../../../static/images/xiangji-2.png" mode="" style="width: 40rpx ;height: 40rpx;">
  132. </image>
  133. </view>
  134. </view>
  135. </view>
  136. <view class="flex row border-bottom mt20 flex-space-between">
  137. <view class="left-text">开户行</view>
  138. <view class="flex right">
  139. <u--input placeholder="输入开户行" inputAlign='right' border="none" v-model="dataDetails.bankDeposit">
  140. </u--input>
  141. </view>
  142. </view>
  143. <view class="flex row border-bottom mt20 flex-space-between noborder">
  144. <view class="left-text khzh-styel">开户支行</view>
  145. <view class="flex align-center" v-if="isShowManualInput">
  146. <u--input class="select-bankzh point" placeholder="输入开户支行" inputAlign='left' border="none"
  147. v-model="dataDetails.bankDepositBranch">
  148. </u--input>
  149. <view @click="manualInput" class="type">选择支行</view>
  150. </view>
  151. <view class="flex align-center" v-if="!isShowManualInput">
  152. <view class="select-bankzh" @click="selectZhbank">
  153. {{dataDetails.bankDepositBranch?dataDetails.bankDepositBranch:'选择开户支行'}}
  154. </view>
  155. <view @click="manualInput" class="type">手动输入</view>
  156. </view>
  157. </view>
  158. <!-- <view class="flex row noborder">
  159. <view class="left-text">身份证截止日期</view>
  160. <view class="" @click="selectData(1)">
  161. {{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择身份证截止日期>'}}
  162. </view>
  163. </view> -->
  164. </view>
  165. <!-- <view class='content3' v-if="!dataDetails.videoAddressUrl"
  166. @click="goDetailPage('/pages/mine/company/companyvideo')">
  167. <view class="left-text">视频验证(打开摄像头并阅读提示文字)</view>
  168. <view class="video-icon">
  169. <u-icon size="40" name="camera-fill"></u-icon>
  170. </view>
  171. </view> -->
  172. <!-- <view class='content3' v-if="dataDetails.videoAddressUrl">
  173. <view class="flex row noborder mt20 flex-space-between">
  174. <view class="left-text">视频验证(点击按钮播放视频)</view>
  175. <view>
  176. <u-button color='#2772FB' type="primary" @click="goDetailPage('/pages/mine/company/companyvideo')"
  177. size="mini">重新上传
  178. </u-button>
  179. </view>
  180. </view>
  181. <view>
  182. <view class="video-icon">
  183. <u-icon size="40" name="play-circle-fill" @click="videoShow()"></u-icon>
  184. </view>
  185. </view>
  186. </view> -->
  187. <view class='content3'>
  188. <view class="flex row noborder flex-space-between">
  189. <view class="left-text">申请开通平台垫付运费业务</view>
  190. <view>
  191. <u-switch @change="change" v-model="value" inactiveColor='#ABB0BB' size="20"></u-switch>
  192. </view>
  193. </view>
  194. </view>
  195. <!-- <view v-if="value" class='content1'>
  196. <view class="flex row">
  197. <view class="left-text">企业用地是否自有</view>
  198. <view class="flex right">
  199. <u-radio-group placement="row" class="select-type" v-model="dataDetails.landOwnership">
  200. <u-radio :customStyle="radioCustomStyle" v-for="(item, index) in radiolist1" :key="index"
  201. :label="item.name" :name="item.name" @change="radioChange($event,item)" labelSize='12px'
  202. :iconSize='10'>
  203. </u-radio>
  204. </u-radio-group>
  205. </view>
  206. </view>
  207. <view class="title">{{dataDetails.landOwnership=='自有'?'上传房产证':'上传租赁合同(扫描件或图片)'}}</view>
  208. <view style='position:relative;'>
  209. <view v-if='!dataDetails.propertyAddressUrl' @click="uploadImg(4)" class="picture">
  210. <image class="xj-image" src="@/static/mine/company/tianjiazhaopian@3x.png"></image>
  211. </view>
  212. <view v-if='dataDetails.propertyAddressUrl' @click.stop="uploadImg(4)" style='position:relative;'
  213. class="preview-card-img picture">
  214. <view @click.stop="delCard(2)">
  215. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  216. </image>
  217. </view>
  218. <image class="uploadimage uploadimage-small" :src="dataDetails.propertyAddressUrl" mode="aspectFit">
  219. </image>
  220. </view>
  221. </view>
  222. <view v-if="dataDetails.landOwnership=='租赁'" class="flex border-bottom mt20 align-center">
  223. <view class="left-text">场地租赁截止日期</view>
  224. <view style='font-size:14px;width:50%;' class='flex flex-space-between'
  225. @click="selectValidityPeriod(1)">
  226. <view :style="{'color':dataDetails.siteLeaseDate ? '#000':'#C6CBD5'}">
  227. {{dataDetails.siteLeaseDate?dataDetails.siteLeaseDate:'选择日期'}}
  228. </view>
  229. <view>
  230. <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
  231. </view>
  232. </view>
  233. </view>
  234. </view> -->
  235. <view class="content4">
  236. <view class="flex service align-center">
  237. <u--image @click='consent'
  238. :src="consentStatus==true?'../../../static/images/mine/duihao@2x.png':'../../../static/images/mine/wxz.png'"
  239. width="12px" height="12px"></u--image>
  240. 我已阅读并同意
  241. <navigator
  242. url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/userAgreement.html"
  243. class="path" hover-class="navigator-hover">《服务协议》</navigator>和<navigator
  244. url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/screctAgreement.html"
  245. class="path" hover-class="navigator-hover">《隐私政策》</navigator>
  246. </view>
  247. </view>
  248. <view class='footer'>
  249. <!-- <view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='newlyIncreased'>下一步</view> -->
  250. <view @click="$u.throttle(submit(), 1000)" class='newlyIncreased'>提交</view>
  251. </view>
  252. <itmister-date-picker :overdueContent="overdueContent" :dateStatus="1" :periodOfValidity="true" :futureYear="30"
  253. ref="dateValidityPeriod" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
  254. <u-picker :show="isShowBank" :columns="columns" :closeOnClickOverlay='true' @close='zhBankClose'
  255. @cancel='zhBankClose' @confirm='confirmBank'></u-picker>
  256. </u-picker>
  257. <u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
  258. @select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
  259. </u-action-sheet>
  260. <u-toast ref="uToast"></u-toast>
  261. </view>
  262. </template>
  263. <script>
  264. import {
  265. mapState
  266. } from 'vuex';
  267. import upload from '@/components/upload.vue';
  268. import permision from "@/js_sdk/wa-permission/permission.js"
  269. import uploadImage from '@/components/ossutil/uploadFile.js';
  270. export default {
  271. components: {},
  272. data() {
  273. return {
  274. videoPlay: false,
  275. isSshowPlayVideo: false,
  276. srcHandler() {
  277. return `/hybrid/html/play.html?src=${this.dataDetails.videoAddressUrl}`
  278. },
  279. consentStatus: false,
  280. ValidityPeriodType: '',
  281. isShowManualInput: false,
  282. value: false,
  283. isShowBank: false,
  284. columns: [],
  285. overdueContent: '',
  286. radioCustomStyle: {
  287. margin: '0 0 0 20rpx'
  288. },
  289. radiolist1: [{
  290. name: '自有',
  291. disabled: false
  292. },
  293. {
  294. name: '租赁',
  295. disabled: false
  296. },
  297. ],
  298. uploadType: '',
  299. index: '',
  300. isShowimgType: false,
  301. validityPeriod: [],
  302. submitstatus: false,
  303. checked: false,
  304. checked1: false,
  305. dataDetails: {
  306. legalPersonName: '',
  307. cardAddressUrl: '',
  308. cardBackAddressUrl: '',
  309. cardNumber: '',
  310. cardValidityDate: '',
  311. phone: '',
  312. businessLicenseAddressUrl: '',
  313. propertyAddressUrl: '',
  314. advanceFreightService: 0,
  315. landOwnership: '自有',
  316. videoAddressUrl: null,
  317. corporateAccount: ''
  318. },
  319. dataType: ""
  320. }
  321. },
  322. onShow() {
  323. var viderSrc = uni.getStorageSync("videoSrc")
  324. if (viderSrc) {
  325. this.dataDetails.videoAddressUrl = viderSrc
  326. }
  327. },
  328. onLoad(options) {
  329. this.dataDetails.videoAddressUrl = options.videoSrc
  330. // #ifdef APP-PLUS
  331. this.get_camera_permission()
  332. //#endif
  333. this.getName()
  334. },
  335. computed: {
  336. ...mapState(['hasLogin', 'userInfo']),
  337. },
  338. methods: {
  339. async get_camera_permission() {
  340. var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
  341. if (photol == false) {
  342. uni.showModal({
  343. title: '提示',
  344. content: '您已经关闭相机权限,去设置',
  345. success: function(res) {
  346. if (res.confirm) {
  347. permision.gotoAppPermissionSetting()
  348. // plus.runtime.openURL("app-settings:");
  349. } else if (res.cancel) {
  350. console.log('用户点击取消');
  351. }
  352. }
  353. });
  354. }
  355. },
  356. selectData(num) {
  357. this.dataType = num
  358. if (num == 0) {
  359. this.overdueContent = '营业执照已过期'
  360. } else if (num == 1) {
  361. this.overdueContent = '身份证已过期'
  362. }
  363. this.$refs.dateValidityPeriod.show()
  364. },
  365. zhBankClose() {
  366. this.isShowBank = false
  367. },
  368. // 选择支行
  369. selectZhbank() {
  370. if (uni.$u.test.isEmpty(this.columns)) {
  371. this.$refs.uToast.show({
  372. type: 'error',
  373. message: "支行获取失败,请手动输入!",
  374. })
  375. return true
  376. }
  377. this.isShowBank = true
  378. },
  379. manualInput() {
  380. if (this.isShowManualInput) {
  381. // this.isShowBank = true
  382. // if (uni.$u.test.isEmpty(this.dataDetails.payeeAddressUrl)) {
  383. // this.$refs.uToast.show({
  384. // type: 'error',
  385. // message: "请填写卡号!",
  386. // })
  387. // return true
  388. // }
  389. // if (this.columns.length == 0) {
  390. // this.$refs.uToast.show({
  391. // type: 'error',
  392. // message: "请选择手动输入!",
  393. // })
  394. // return true
  395. // }
  396. } else {
  397. // this.isShowBank = false
  398. }
  399. this.isShowManualInput = !this.isShowManualInput
  400. },
  401. confirmBank(e) {
  402. console.log(e)
  403. this.dataDetails.bankDepositBranch = e.value[0]
  404. this.isShowBank = false
  405. },
  406. // uploadImg() {
  407. // this.uploadType = 5
  408. // this.imgTypeSelect()
  409. // // this.isShowimgType = true
  410. // },
  411. confirmValidityPeriod(date) {
  412. console.log(date, this.dataType)
  413. switch (this.dataType) {
  414. case 0:
  415. this.dataDetails.businessTermDate = date.date
  416. break
  417. case 1:
  418. this.dataDetails.cardValidityDate = date.date
  419. break
  420. }
  421. this.$forceUpdate()
  422. },
  423. screenChange(e) {
  424. let fullScreen = e.detail.fullScreen; // 值true为进入全屏,false为退出全屏
  425. console.log(e, "全屏");
  426. if (!fullScreen) {
  427. //退出全屏
  428. this.videoPlay = false; // 隐藏播放盒子
  429. }
  430. },
  431. // 触发全屏播放的点击事件
  432. videoShow() {
  433. this.videoContext = uni.createVideoContext("myvideo", this); // this这个是实例对象 必传
  434. this.videoContext.requestFullScreen({
  435. direction: 270
  436. });
  437. this.videoContext.play();
  438. console.log(this.videoContext)
  439. this.videoPlay = true; // 显示播放盒子
  440. },
  441. // getList(){
  442. // uni.showLoading({
  443. // title: '加载中',
  444. // mask:true
  445. // })
  446. // var _this=this
  447. // this.$request.baseRequest('get', '/companyInfo/getCompanyInfo', {id:this.dataDetails.id}).then(res => {
  448. // uni.hideLoading()
  449. // _this.dataDetails=res.data
  450. // })
  451. // .catch(res => {
  452. // uni.hideLoading()
  453. // uni.showToast({
  454. // title: res.message,
  455. // icon: 'none',
  456. // duration: 2000
  457. // })
  458. // });
  459. // },
  460. companyNamechange(e) {
  461. console.log(e)
  462. this.dataDetails.corporateAccount = e
  463. },
  464. companyNameBlur() {
  465. this.$request.baseRequest('get', '/companyInfo/repeatCompanyInfo', {
  466. commonId: this.userInfo.id,
  467. companyName: this.dataDetails.companyName
  468. }).then(res => {
  469. console.log(res)
  470. if (res.code == 200) {
  471. // that.dataDetails.legalPersonName = res.data.name
  472. } else {
  473. uni.showToast({
  474. title: res.message,
  475. icon: 'none',
  476. duration: 2000
  477. })
  478. }
  479. })
  480. .catch(res => {
  481. console.log(res)
  482. uni.hideLoading()
  483. uni.showToast({
  484. title: res.message,
  485. icon: 'none',
  486. duration: 2000
  487. })
  488. });
  489. },
  490. codeBlur() {
  491. this.$request.baseRequest('get', '/companyInfo/checkCreditCode', {
  492. unifiedSocialCreditCode: this.dataDetails.unifiedSocialCreditCode
  493. }).then(res => {
  494. console.log(res)
  495. if (res.code == 200) {
  496. // that.dataDetails.legalPersonName = res.data.name
  497. } else {
  498. uni.showToast({
  499. title: res.message,
  500. icon: 'none',
  501. duration: 2000
  502. })
  503. }
  504. })
  505. .catch(res => {
  506. console.log(res)
  507. uni.hideLoading()
  508. uni.showToast({
  509. title: res.message,
  510. icon: 'none',
  511. duration: 2000
  512. })
  513. });
  514. },
  515. getName() {
  516. let that = this
  517. this.$request.baseRequest('get', '/cargoOwnerInfo/selectCargoOwner', {
  518. commonId: this.userInfo.id
  519. }).then(res => {
  520. if (res.code == 200) {
  521. console.log(this, res.data)
  522. if (uni.getStorageSync('companydata')) {
  523. this.dataDetails = uni.getStorageSync('companydata')
  524. if (!this.dataDetails.businessLicenseAddressUrl) {
  525. this.dataDetails.businessLicenseAddressUrl = ""
  526. }
  527. }
  528. that.dataDetails.commonId = that.userInfo.id
  529. that.dataDetails.phone = that.userInfo.phone
  530. that.dataDetails.legalPersonName = res.data.name
  531. that.dataDetails.cardAddressUrl = res.data.cardAddressUrl
  532. that.dataDetails.cardBackAddressUrl = res.data.cardBackAddressUrl
  533. that.dataDetails.cardNumber = res.data.cardNumber
  534. that.dataDetails.cardValidityDate = res.data.cardValidityDate
  535. }
  536. })
  537. .catch(res => {
  538. uni.hideLoading()
  539. uni.showToast({
  540. title: res.message,
  541. icon: 'none',
  542. duration: 2000
  543. })
  544. });
  545. },
  546. loadedmetadata(event) {
  547. console.log(event)
  548. },
  549. loadeddata(event) {
  550. console.log(event)
  551. },
  552. videoErrorCallback: function(e) {
  553. uni.showModal({
  554. content: e.target.errMsg,
  555. showCancel: false
  556. })
  557. },
  558. validate() {
  559. if (uni.$u.test.isEmpty(this.dataDetails.companyName)) {
  560. this.$refs.uToast.show({
  561. type: 'error',
  562. message: "企业名称不能为空!",
  563. })
  564. return true
  565. }
  566. if (this.dataDetails.companyName.length < 4 || this.dataDetails.companyName.length > 25) {
  567. this.$refs.uToast.show({
  568. type: 'error',
  569. message: "企业名称字数在4-25个字!",
  570. })
  571. return true
  572. }
  573. if (uni.$u.test.isEmpty(this.dataDetails.legalPersonName)) {
  574. this.$refs.uToast.show({
  575. type: 'error',
  576. message: "法定代表人姓名不能为空!",
  577. })
  578. return true
  579. }
  580. if (uni.$u.test.isEmpty(this.dataDetails.phone)) {
  581. this.$refs.uToast.show({
  582. type: 'error',
  583. message: "联系电话不能为空!",
  584. })
  585. return true
  586. }
  587. if (uni.$u.test.isEmpty(this.dataDetails.mailingAddress)) {
  588. this.$refs.uToast.show({
  589. type: 'error',
  590. message: "通讯地址不能为空!",
  591. })
  592. return true
  593. }
  594. // if (uni.$u.test.isEmpty(this.dataDetails.registeredPaidAmount)) {
  595. // this.$refs.uToast.show({
  596. // type: 'error',
  597. // message: "注册实缴金额不能为空!",
  598. // })
  599. // return true
  600. // }
  601. if (this.dataDetails.cardNumber.length != 18) {
  602. this.$refs.uToast.show({
  603. type: 'error',
  604. message: "身份证号输入错误!",
  605. })
  606. return true
  607. }
  608. if (uni.$u.test.isEmpty(this.dataDetails.businessLicenseAddressUrl)) {
  609. this.$refs.uToast.show({
  610. type: 'error',
  611. message: "营业执照不能为空!",
  612. })
  613. return true
  614. }
  615. if (uni.$u.test.isEmpty(this.dataDetails.businessTermDate)) {
  616. this.$refs.uToast.show({
  617. type: 'error',
  618. message: "营业期限截止日期不能为空!",
  619. })
  620. return true
  621. }
  622. if (uni.$u.test.isEmpty(this.dataDetails.unifiedSocialCreditCode)) {
  623. this.$refs.uToast.show({
  624. type: 'error',
  625. message: "统一社会信用代码不能为空!",
  626. })
  627. return true
  628. }
  629. if (this.dataDetails.unifiedSocialCreditCode.length != 18) {
  630. this.$refs.uToast.show({
  631. type: 'error',
  632. message: "统一社会信用代码输出错误!",
  633. })
  634. return true
  635. }
  636. if (uni.$u.test.isEmpty(this.dataDetails.bankCard)) {
  637. this.$refs.uToast.show({
  638. type: 'error',
  639. message: "卡号不能为空!",
  640. })
  641. return true
  642. }
  643. if (this.dataDetails.bankCard.length < 16 || this.dataDetails.bankCard.length > 19) {
  644. this.$refs.uToast.show({
  645. type: 'error',
  646. message: "卡号输出错误!",
  647. })
  648. return true
  649. }
  650. if (uni.$u.test.isEmpty(this.dataDetails.bankDeposit)) {
  651. this.$refs.uToast.show({
  652. type: 'error',
  653. message: "开户行不能为空!",
  654. })
  655. return true
  656. }
  657. if (uni.$u.test.isEmpty(this.dataDetails.bankDepositBranch)) {
  658. this.$refs.uToast.show({
  659. type: 'error',
  660. message: "开户支行不能为空!",
  661. })
  662. return true
  663. }
  664. //先注释掉
  665. // if (this.dataDetails.advanceFreightService == 1 && uni.$u.test.isEmpty(this.dataDetails
  666. // .propertyAddressUrl)) {
  667. // this.$refs.uToast.show({
  668. // type: 'error',
  669. // message: "房产证或租赁合同不能为空!",
  670. // })
  671. // return true
  672. // }
  673. // if (this.dataDetails.advanceFreightService == 1 && this.dataDetails.landOwnership == '租赁') {
  674. // if (uni.$u.test.isEmpty(this.dataDetails.siteLeaseDate)) {
  675. // this.$refs.uToast.show({
  676. // type: 'error',
  677. // message: "场地租赁截止日期不能为空!",
  678. // })
  679. // return true
  680. // }
  681. // }
  682. // if (uni.$u.test.isEmpty(this.dataDetails.videoAddressUrl)) {
  683. // this.$refs.uToast.show({
  684. // type: 'error',
  685. // message: "视频认证不能为空!",
  686. // })
  687. // return true
  688. // }
  689. },
  690. submit() {
  691. if (this.validate()) return
  692. if (!this.consentStatus) {
  693. uni.showToast({
  694. title: '请勾选协议',
  695. icon: 'none',
  696. duration: 2000
  697. })
  698. return
  699. }
  700. uni.showLoading({
  701. title: '加载中',
  702. mask: true
  703. })
  704. var _this = this
  705. this.$request.baseRequest('post', '/companyInfo/api/addCompanyInfo', _this.dataDetails).then(res => {
  706. uni.hideLoading()
  707. uni.$u.toast('提交成功')
  708. this.submitstatus = false
  709. uni.removeStorageSync("videoSrc")
  710. uni.navigateBack({
  711. delta: 1
  712. })
  713. })
  714. .catch(res => {
  715. uni.hideLoading()
  716. this.submitstatus = false
  717. uni.showToast({
  718. title: res.message,
  719. icon: 'none',
  720. duration: 2000
  721. })
  722. });
  723. },
  724. consent() {
  725. this.consentStatus = !this.consentStatus
  726. },
  727. change(e) {
  728. if (this.value) {
  729. this.$set(this.dataDetails, 'advanceFreightService', 1)
  730. } else {
  731. this.$set(this.dataDetails, 'advanceFreightService', 0)
  732. }
  733. },
  734. radioChange(n) {
  735. console.log('radioChange', n);
  736. this.dataDetails.landOwnership = n
  737. console.log('this.dataDetails.landOwnership', this.dataDetails.landOwnership);
  738. },
  739. delCard(type) {
  740. if (type == 1) {} else {
  741. }
  742. this.dataDetails.businessLicenseAddressUrl = ''
  743. this.$forceUpdate()
  744. },
  745. navBack() {
  746. uni.navigateBack();
  747. },
  748. checkedchange() {
  749. this.checked = !this.checked
  750. if (this.checked) {
  751. this.dataDetails.landOwnership = 0
  752. this.checked1 = false
  753. } else {
  754. }
  755. },
  756. checkedchange1() {
  757. this.checked1 = !this.checked1
  758. if (this.checked1) {
  759. this.dataDetails.landOwnership = 1
  760. this.checked = false
  761. } else {
  762. }
  763. },
  764. imgTypeSelect(val) {
  765. var _this = this
  766. // if (val.name == '相册') {
  767. uni.chooseImage({
  768. count: 1,
  769. sizeType: ['compressed'],
  770. // sourceType: ,
  771. success: function(res) {
  772. console.log(_this.uploadType);
  773. uploadImage('image', res.tempFilePaths[0], 'appData/',
  774. result => {
  775. // 上传成功回调函数
  776. switch (_this.uploadType) {
  777. case 1:
  778. _this.dataDetails.businessLicenseAddressUrl = result
  779. // 识别
  780. _this.$request.baseRequest('get',
  781. '/cargoOwnerInfo/api/licenseShibie', {
  782. licenseImg: result,
  783. }).then(res => {
  784. if (res.code == '200') {
  785. if (res.data) {
  786. if (res.data.validPeriod == '29991231') {
  787. _this.dataDetails.businessTermDate = '长期'
  788. }
  789. _this.dataDetails.unifiedSocialCreditCode = res
  790. .data.regNum
  791. // _this.dataDetails.legalPersonName = res.data
  792. // .licensePerson
  793. _this.dataDetails.companyName = res.data
  794. .licenseName
  795. _this.dataDetails.corporateAccount = _this
  796. .dataDetails.companyName
  797. console.log(res)
  798. _this.$forceUpdate()
  799. }
  800. }
  801. })
  802. .catch(res => {
  803. console.log(res)
  804. uni.$u.toast(res.message);
  805. });
  806. console.log(_this.dataDetails.businessLicenseAddressUrl)
  807. break
  808. // 身份正面
  809. case 2:
  810. _this.dataDetails.cardAddressUrl = result
  811. // 识别
  812. _this.$request.baseRequest('get',
  813. '/driverInfo/personShibie', {
  814. personImg: result,
  815. flag: 1
  816. }).then(res => {
  817. _this.dataDetails.cardNumber = res.data.recPersonNo
  818. _this.$forceUpdate()
  819. })
  820. .catch(res => {
  821. uni.$u.toast(res.message);
  822. });
  823. break
  824. case 3:
  825. _this.dataDetails.cardBackAddressUrl = result
  826. // 识别
  827. _this.$request.baseRequest('get',
  828. '/driverInfo/personShibie', {
  829. personImg: result,
  830. flag: 2
  831. }).then(res => {
  832. if (res.data.idCardValidity) {
  833. let date = res.data.idCardValidity.split("-")[1]
  834. _this.dataDetails.cardValidityDate = date.replace(
  835. '.', '-').replace('.', '-')
  836. }
  837. _this.$forceUpdate()
  838. })
  839. .catch(res => {
  840. uni.$u.toast(res.message);
  841. });
  842. _this.$forceUpdate()
  843. break;
  844. case 4:
  845. _this.dataDetails.propertyAddressUrl = result
  846. break;
  847. case 5:
  848. _this.$request.baseRequest('get',
  849. '/driverInfo/bankShibie', {
  850. bankImg: result,
  851. }).then(res => {
  852. console.log(res)
  853. _this.dataDetails.payeeAddressUrl = result
  854. if (res.data.bankNo) {
  855. _this.dataDetails.bankCard = res.data.bankNo
  856. }
  857. if (res.data.bankName) {
  858. _this.dataDetails.bankDeposit = res.data.bankName
  859. }
  860. // 开户支行LIst
  861. if (res.data.bankNameZhihang) {
  862. _this.columns.push(res.data
  863. .bankNameZhihang)
  864. } else {
  865. _this.columns = []
  866. }
  867. _this.$forceUpdate()
  868. })
  869. .catch(res => {
  870. uni.$u.toast(res.message);
  871. });
  872. break;
  873. }
  874. }
  875. )
  876. }
  877. });
  878. // } else {
  879. // uni.chooseImage({
  880. // count: 1,
  881. // sourceType: ['camera'],
  882. // success: function(res) {
  883. // console.log(JSON.stringify(res.tempFilePaths));
  884. // uploadImage('image', res.tempFilePaths[0], 'appData/',
  885. // result => {
  886. // // 上传成功回调函数
  887. // console.log('图片地址', result)
  888. // switch (_this.uploadType) {
  889. // // 身份正面
  890. // case 1:
  891. // // 识别
  892. // _this.$request.baseRequest('get',
  893. // '/cargoOwnerInfo/api/licenseShibie', {
  894. // licenseImg: result,
  895. // }).then(res => {
  896. // if (res.code == '200') {
  897. // if (res.data.validPeriod == '29991231') {
  898. // _this.dataDetails.businessTermDate = '长期'
  899. // }
  900. // _this.dataDetails.unifiedSocialCreditCode = res
  901. // .data.regNum
  902. // _this.dataDetails.legalPersonName = res.data
  903. // .licensePerson
  904. // _this.dataDetails.companyName = res.data
  905. // .licenseName
  906. // console.log(res)
  907. // _this.$forceUpdate()
  908. // }
  909. // })
  910. // .catch(res => {
  911. // uni.$u.toast(res.message);
  912. // });
  913. // _this.dataDetails.businessLicenseAddressUrl = result
  914. // console.log(_this.dataDetails.businessLicenseAddressUrl)
  915. // break
  916. // // 身份反面
  917. // case 2:
  918. // _this.dataDetails.propertyAddressUrl = result
  919. // console.log(_this.dataDetails.propertyAddressUrl)
  920. // break
  921. // case 3:
  922. // break;
  923. // }
  924. // }
  925. // )
  926. // }
  927. // });
  928. // }
  929. },
  930. uploadImg(type) {
  931. this.uploadType = type
  932. this.imgTypeSelect()
  933. // this.isShowimgType = true
  934. // this.index = index
  935. },
  936. goDetailPage(src) {
  937. uni.setStorageSync('companydata', this.dataDetails);
  938. uni.$u.route(src);
  939. },
  940. selectValidityPeriod(type) {
  941. this.ValidityPeriodType = type
  942. this.imgTypeSelect()
  943. },
  944. changeHandler(e) {
  945. const {
  946. columnIndex,
  947. value,
  948. values,
  949. index,
  950. picker = this.$refs.uPicker
  951. } = e
  952. // if (columnIndex === 0) {
  953. //
  954. // if (e.index != 0) {
  955. // picker.setColumnValues(1, this.validityPeriod[1].shift())
  956. // }
  957. // } else if (columnIndex === 1) {
  958. // if (e.index != 0) {
  959. // picker.setColumnValues(2, this.validityPeriod[2].shift())
  960. // }
  961. // }
  962. },
  963. }
  964. }
  965. </script>
  966. <style lang="scss" scoped>
  967. .content {
  968. padding: 0 0 200rpx 0;
  969. }
  970. page {
  971. background: #F5F6FA;
  972. }
  973. /deep/uni-image.uploadimage-small {
  974. width: 100% !important;
  975. }
  976. .title {
  977. color: #333333;
  978. margin: 20rpx 0;
  979. }
  980. .next {
  981. color: #2772FB;
  982. font-size: 13px;
  983. }
  984. .wrap {
  985. background: #fff;
  986. padding: 20rpx 30rpx;
  987. border-radius: 5px;
  988. margin: 20rpx;
  989. .left {
  990. // width: 50%;
  991. // font-size: 28rpx;
  992. }
  993. .left-text {
  994. // background: red;
  995. // width: 50%;
  996. color: #333333;
  997. display: flex;
  998. align-items: center;
  999. // font-size: 14px;
  1000. }
  1001. .right {
  1002. font-size: 32rpx;
  1003. width: calc(100% - 240rpx);
  1004. }
  1005. }
  1006. .preview-card-img {
  1007. // /deep/uni-image>div, uni-image>img {
  1008. // transform: scale(1.5) rotate(-90deg);
  1009. // }
  1010. }
  1011. .picture {
  1012. margin-top: 20rpx;
  1013. background: #F5F6FA;
  1014. width: 100%;
  1015. height: 440rpx;
  1016. border-radius: 20rpx;
  1017. display: flex;
  1018. flex-direction: column;
  1019. justify-content: center;
  1020. align-items: center;
  1021. color: #6A7282;
  1022. }
  1023. .picture1 {
  1024. background: url(../../../static/images/mine/zm.png);
  1025. background-size: 100% 100%;
  1026. }
  1027. .picture2 {
  1028. background: url(../../../static/images/mine/gh.png);
  1029. background-size: 100% 100%;
  1030. }
  1031. .type {
  1032. background: #2772FB;
  1033. border-radius: 10rpx;
  1034. color: white;
  1035. box-sizing: border-box;
  1036. padding: 8rpx 14rpx;
  1037. // font-size: 26rpx;
  1038. display: flex;
  1039. justify-content: center;
  1040. align-items: center;
  1041. margin-left: 8rpx;
  1042. // height: 68rpx;
  1043. min-width: 160rpx;
  1044. }
  1045. .content1 {
  1046. background: #fff;
  1047. padding: 20rpx;
  1048. margin: 20rpx;
  1049. border-radius: 10rpx;
  1050. .row {
  1051. border-bottom: 1px solid #EEEEEE;
  1052. padding-bottom: 28rpx;
  1053. margin-top: 26rpx;
  1054. }
  1055. .left-text {
  1056. // background: red;
  1057. // width: 320rpx;
  1058. color: #333333;
  1059. display: flex;
  1060. align-items: center;
  1061. // font-size: 14px;
  1062. }
  1063. .picture {
  1064. position: relative;
  1065. width: 100%;
  1066. height: 440rpx;
  1067. display: flex;
  1068. justify-content: center;
  1069. flex-direction: column;
  1070. align-items: center;
  1071. .text {
  1072. margin-top: 20rpx;
  1073. }
  1074. }
  1075. .picture7 {
  1076. background: url(../../../static/mine/cy.png);
  1077. background-size: 100% 100%;
  1078. }
  1079. .xj-image {
  1080. width: 100rpx;
  1081. height: 100rpx;
  1082. }
  1083. }
  1084. .content2,
  1085. .content3,
  1086. .content4 {
  1087. background: #fff;
  1088. padding: 20rpx;
  1089. margin: 20rpx;
  1090. border-radius: 10rpx;
  1091. }
  1092. .u-input {
  1093. // font-size: 16px;
  1094. }
  1095. .content4 {}
  1096. .del-card {
  1097. position: absolute;
  1098. top: -10rpx;
  1099. right: -6rpx;
  1100. width: 80rpx;
  1101. height: 80rpx;
  1102. z-index: 9;
  1103. }
  1104. .footer {
  1105. position: fixed;
  1106. background: #fff;
  1107. width: 100%;
  1108. bottom: 0;
  1109. left: 0;
  1110. padding: 40rpx 60rpx;
  1111. box-sizing: border-box;
  1112. z-index: 9999;
  1113. }
  1114. .newlyIncreased {
  1115. width: 100%;
  1116. height: 80rpx;
  1117. margin: 0 auto;
  1118. text-align: center;
  1119. color: #fff;
  1120. background: #2772FB;
  1121. background-size: 100%;
  1122. border-radius: 50rpx;
  1123. display: flex;
  1124. align-items: center;
  1125. justify-content: center;
  1126. }
  1127. .u-checkbox-label--left {
  1128. margin: 0 10px;
  1129. }
  1130. .service {
  1131. font-size: 24rpx;
  1132. margin: 20rpx;
  1133. justify-content: center;
  1134. /deep/.u-image {
  1135. margin: 0 20rpx;
  1136. }
  1137. }
  1138. .video-icon {
  1139. margin-top: 20rpx;
  1140. background: #F5F6FA;
  1141. width: 212rpx;
  1142. height: 211rpx;
  1143. border-radius: 20rpx;
  1144. display: flex;
  1145. flex-direction: column;
  1146. justify-content: center;
  1147. align-items: center;
  1148. color: #6A7282;
  1149. }
  1150. .myVideo {}
  1151. .khzh-styel {
  1152. min-width: 160rpx;
  1153. }
  1154. // /deep/.u-input:disabled{
  1155. // background:transparent !important;
  1156. // }
  1157. </style>