editcompany.vue 33 KB

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