addcompany.vue 34 KB

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