editcompany.vue 33 KB

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