editcompany.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167
  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, 1000)" 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. _this.columns=[]
  819. if (res.data.bankNameZhihang) {
  820. _this.columns.push(res.data
  821. .bankNameZhihang)
  822. }
  823. _this.$forceUpdate()
  824. })
  825. .catch(res => {
  826. uni.$u.toast(res.message);
  827. });
  828. break;
  829. }
  830. }
  831. )
  832. }
  833. });
  834. // } else {
  835. // uni.chooseImage({
  836. // count: 1,
  837. // sourceType: ['camera'],
  838. // success: function(res) {
  839. // console.log(JSON.stringify(res.tempFilePaths));
  840. // uploadImage('image', res.tempFilePaths[0], 'appData/',
  841. // result => {
  842. // // 上传成功回调函数
  843. // console.log('图片地址', result)
  844. // switch (_this.uploadType) {
  845. // // 身份正面
  846. // case 1:
  847. // // 识别
  848. // _this.$request.baseRequest('get',
  849. // '/cargoOwnerInfo/api/licenseShibie', {
  850. // licenseImg: result,
  851. // }).then(res => {
  852. // if (res.code == '200') {
  853. // if (res.data.validPeriod == '29991231') {
  854. // _this.dataDetails.businessTermDate = '长期'
  855. // }
  856. // _this.dataDetails.unifiedSocialCreditCode = res
  857. // .data.regNum
  858. // _this.dataDetails.legalPersonName = res.data
  859. // .licensePerson
  860. // _this.dataDetails.companyName = res.data
  861. // .licenseName
  862. // console.log(res)
  863. // _this.$forceUpdate()
  864. // }
  865. // })
  866. // .catch(res => {
  867. // uni.$u.toast(res.message);
  868. // });
  869. // _this.dataDetails.businessLicenseAddressUrl = result
  870. // console.log(_this.dataDetails.businessLicenseAddressUrl)
  871. // break
  872. // // 身份反面
  873. // case 2:
  874. // _this.dataDetails.propertyAddressUrl = result
  875. // console.log(_this.dataDetails.propertyAddressUrl)
  876. // break
  877. // case 3:
  878. // break;
  879. // }
  880. // }
  881. // )
  882. // }
  883. // });
  884. // }
  885. },
  886. uploadImg(type) {
  887. this.uploadType = type
  888. this.imgTypeSelect()
  889. // this.index = index
  890. },
  891. goDetailPage(src) {
  892. uni.setStorageSync('companydata', this.dataDetails);
  893. uni.$u.route(src);
  894. },
  895. selectValidityPeriod(type) {
  896. this.ValidityPeriodType = type
  897. this.isShowcardValidity = true
  898. },
  899. changeHandler(e) {
  900. const {
  901. columnIndex,
  902. value,
  903. values,
  904. index,
  905. picker = this.$refs.uPicker
  906. } = e
  907. // if (columnIndex === 0) {
  908. //
  909. // if (e.index != 0) {
  910. // picker.setColumnValues(1, this.validityPeriod[1].shift())
  911. // }
  912. // } else if (columnIndex === 1) {
  913. // if (e.index != 0) {
  914. // picker.setColumnValues(2, this.validityPeriod[2].shift())
  915. // }
  916. // }
  917. },
  918. }
  919. }
  920. </script>
  921. <style lang="scss" scoped>
  922. .content {
  923. padding: 0 0 200rpx 0;
  924. }
  925. /deep/.uni-input-input:disabled {
  926. background: transparent;
  927. }
  928. page {
  929. background: #F5F6FA;
  930. }
  931. .next {
  932. color: #2772FB;
  933. font-size: 13px;
  934. }
  935. .wrap {
  936. background: #fff;
  937. padding:10rpx 30rpx 20rpx;
  938. border-radius: 5px;
  939. margin: 20rpx;
  940. .left-text {
  941. // background: red;
  942. width: 50%;
  943. color: #333333;
  944. display: flex;
  945. align-items: center;
  946. font-size: 14px;
  947. }
  948. .left {
  949. width: 240rpx;
  950. font-size: 28rpx;
  951. }
  952. .right {
  953. font-size: 28rpx;
  954. width: calc(100% - 240rpx);
  955. }
  956. }
  957. .preview-card-img {
  958. overflow: hidden;
  959. // /deep/uni-image>div, uni-image>img {
  960. // transform: scale(1.5) rotate(-90deg);
  961. // }
  962. }
  963. .type {
  964. background: #2772FB;
  965. border-radius: 10rpx;
  966. color: white;
  967. box-sizing: border-box;
  968. padding: 4rpx 10rpx;
  969. font-size: 26rpx;
  970. display: flex;
  971. justify-content: center;
  972. align-items: center;
  973. height: 68rpx;
  974. min-width: 124rpx;
  975. }
  976. .picture {
  977. margin-top: 20rpx;
  978. background: #F5F6FA;
  979. width: 100%;
  980. height: 440rpx;
  981. border-radius: 20rpx;
  982. display: flex;
  983. flex-direction: column;
  984. justify-content: center;
  985. align-items: center;
  986. color: #6A7282;
  987. }
  988. .picture1 {
  989. background: url(../../../static/images/mine/zm.png);
  990. background-size: 100% 100%;
  991. }
  992. .picture2 {
  993. background: url(../../../static/images/mine/gh.png);
  994. background-size: 100% 100%;
  995. }
  996. .content1 {
  997. background: #fff;
  998. padding:20rpx 20rpx 0;
  999. margin: 20rpx;
  1000. border-radius: 10rpx;
  1001. .row {
  1002. border-bottom: 1px solid #EEEEEE;
  1003. padding-bottom: 28rpx;
  1004. margin-top: 26rpx;
  1005. }
  1006. .left-text {
  1007. // background: red;
  1008. width: 320rpx;
  1009. color: #333333;
  1010. display: flex;
  1011. align-items: center;
  1012. font-size: 14px;
  1013. }
  1014. .picture {
  1015. position: relative;
  1016. width: 100%;
  1017. height: 440rpx;
  1018. display: flex;
  1019. justify-content: center;
  1020. flex-direction: column;
  1021. align-items: center;
  1022. .text {
  1023. margin-top: 20rpx;
  1024. }
  1025. }
  1026. .picture7 {
  1027. background: url(../../../static/mine/cy.png);
  1028. background-size: 100% 100%;
  1029. }
  1030. .xj-image {
  1031. width: 100rpx;
  1032. height: 100rpx;
  1033. }
  1034. .title {
  1035. color: #333333;
  1036. margin: 20rpx 0;
  1037. }
  1038. }
  1039. .content2,
  1040. .content3,
  1041. .content4 {
  1042. background: #fff;
  1043. padding: 20rpx;
  1044. margin: 20rpx;
  1045. border-radius: 10rpx;
  1046. }
  1047. .u-input {
  1048. font-size: 16px;
  1049. }
  1050. .content4 {}
  1051. .del-card {
  1052. position: absolute;
  1053. top: -10rpx;
  1054. right: -6rpx;
  1055. width: 80rpx;
  1056. height: 80rpx;
  1057. z-index: 9;
  1058. }
  1059. .footer {
  1060. position: fixed;
  1061. background: #fff;
  1062. width: 100%;
  1063. bottom: 0;
  1064. left: 0;
  1065. padding: 40rpx 60rpx;
  1066. box-sizing: border-box;
  1067. }
  1068. .newlyIncreased {
  1069. width: 100%;
  1070. height: 80rpx;
  1071. margin: 0 auto;
  1072. text-align: center;
  1073. color: #fff;
  1074. background: #2772FB;
  1075. background-size: 100%;
  1076. border-radius: 50rpx;
  1077. display: flex;
  1078. align-items: center;
  1079. justify-content: center;
  1080. }
  1081. .u-checkbox-label--left {
  1082. margin: 0 10px;
  1083. }
  1084. .service {
  1085. font-size: 24rpx;
  1086. margin: 20rpx;
  1087. justify-content: center;
  1088. /deep/.u-image {
  1089. margin: 0 20rpx;
  1090. }
  1091. }
  1092. .video-icon {
  1093. margin-top: 20rpx;
  1094. background: #F5F6FA;
  1095. width: 212rpx;
  1096. height: 211rpx;
  1097. border-radius: 20rpx;
  1098. display: flex;
  1099. flex-direction: column;
  1100. justify-content: center;
  1101. align-items: center;
  1102. color: #6A7282;
  1103. }
  1104. .myVideo {}
  1105. </style>