editcompany.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. <template>
  2. <view>
  3. <u-navbar leftText="返回" title="企业认证" :safeAreaInsetTop="false">
  4. <view class="u-nav-slot" slot="left">
  5. <u-icon @clcik='navback' name="arrow-left" size="19"></u-icon>
  6. </view>
  7. <view class="u-nav-slot" slot="right">
  8. <view @click="goDetailPage('/pages/mine/company/addcompanytwo')" class='next'>下一步</view>
  9. </view>
  10. </u-navbar>
  11. <view style='margin:50px 0 0 19px;font-size:12px;color:#EF4034;'>注:企业认证仅限该企业法定代表人本人完成。</view>
  12. <view class='wrap'>
  13. <view class="flex border-bottom mt20 align-center">
  14. <view class="left">企业名称</view>
  15. <view class="flex right">
  16. <u--input placeholder="输入企业名称" inputAlign='left' border="none" v-model="dataDetails.companyName">
  17. </u--input>
  18. </view>
  19. </view>
  20. <view class="flex border-bottom mt20 align-center">
  21. <view class="left">法定代表人姓名</view>
  22. <view class="flex right">
  23. <u--input placeholder="输入法定代表人姓名" inputAlign='left' border="none" v-model="dataDetails.legalPersonName">
  24. </u--input>
  25. </view>
  26. </view>
  27. <view class="flex border-bottom mt20 align-center">
  28. <view class="left">联系电话</view>
  29. <view class="flex right">
  30. <u--input disabledColor='#fff' disabled placeholder="输入联系电话" inputAlign='left' border="none" v-model="dataDetails.phone">
  31. </u--input>
  32. </view>
  33. </view>
  34. <view class="flex mt20 align-center">
  35. <view class="left">注册实缴金额</view>
  36. <view class="flex right align-center">
  37. <u--input placeholder="输入企业注册实缴金额" inputAlign='left' border="none" v-model="dataDetails.registeredPaidAmount">
  38. </u--input>
  39. <view>万元</view>
  40. </view>
  41. </view>
  42. </view>
  43. <view class='content1'>
  44. <view class="title">上传营业执照</view>
  45. <view style='position:relative;'>
  46. <view v-if='!dataDetails.businessLicenseAddressUrl' @click="uploadImg(1)" class="picture picture7">
  47. <image class="xj-image" src="@/static/mine/ic_shanchuan@2x.png"></image>
  48. <view class="text">上传营业执照</view>
  49. </view>
  50. <view v-if='dataDetails.businessLicenseAddressUrl' @click.stop="uploadImg(1)"
  51. class="preview-card-img picture ">
  52. <view @click.stop="delCard(1)">
  53. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  54. </image>
  55. </view>
  56. <image class="" :src="dataDetails.businessLicenseAddressUrl" mode="aspectFit"></image>
  57. </view>
  58. </view>
  59. <view class="flex row">
  60. <view class="left-text">营业期限截止日期</view>
  61. <view style='font-size:16px;width:50%;' class='flex flex-space-between' @click="selectValidityPeriod">
  62. <view :style="{'color':dataDetails.businessTermDate ? '#000':'#C6CBD5'}">{{dataDetails.businessTermDate?dataDetails.businessTermDate:'选择期限截止日期'}}</view>
  63. <view><u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon></view>
  64. </view>
  65. </view>
  66. <view class="flex row noborder">
  67. <view class="left-text">统一社会信用代码</view>
  68. <u--input placeholder="请输入统一社会信用代码" inputAlign='left' border="none" v-model="dataDetails.unifiedSocialCreditCode">
  69. </u--input>
  70. </view>
  71. <u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod"
  72. @confirm="confirmValidityPeriod" @change="changeHandler" @cancel="clickcancel">
  73. </u-picker>
  74. </view>
  75. <view class='footer'>
  76. <view @click="goDetailPage('/pages/mine/company/addcompanytwo')" class='newlyIncreased'>下一步</view>
  77. </view>
  78. <u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
  79. @select="imgTypeSelect" :closeOnClickOverlay="false" :closeOnClickAction="true" @close="isShowimgType=false">
  80. </u-action-sheet>
  81. </view>
  82. </template>
  83. <script>
  84. import {
  85. mapState
  86. } from 'vuex';
  87. import upload from '@/components/upload.vue';
  88. import uploadImage from '@/components/ossutil/uploadFile.js';
  89. export default {
  90. components:{
  91. },
  92. data() {
  93. return {
  94. isShowcardValidity:false,
  95. uploadType:'',
  96. index:'',
  97. isShowimgType:false,
  98. validityPeriod:[],
  99. dataDetails:{
  100. phone:'',
  101. businessLicenseAddressUrl:'',
  102. propertyAddressUrl:'',
  103. advanceFreightService:1
  104. }
  105. }
  106. },
  107. onLoad(options){
  108. this.dataDetails.id=options.id
  109. this.validityPeriod = this.$helper.makeValidityPeriod(0,30)
  110. this.dataDetails.commonId=this.userInfo.id
  111. this.dataDetails.phone=this.userInfo.phone
  112. this.getList()
  113. },
  114. computed: {
  115. ...mapState(['hasLogin', 'userInfo']),
  116. },
  117. methods: {
  118. delCard() {
  119. this.dataDetails.businessLicenseAddressUrl = ''
  120. this.$forceUpdate()
  121. },
  122. navBack() {
  123. uni.navigateBack();
  124. },
  125. getList(){
  126. uni.showLoading({
  127. title: '加载中',
  128. mask:true
  129. })
  130. var _this=this
  131. this.$request.baseRequest('get', '/companyInfo/getCompanyInfo', {id:this.dataDetails.id}).then(res => {
  132. uni.hideLoading()
  133. _this.dataDetails=res.data
  134. })
  135. .catch(res => {
  136. uni.hideLoading()
  137. uni.showToast({
  138. title: res.message,
  139. icon: 'none',
  140. duration: 2000
  141. })
  142. });
  143. },
  144. clickcancel(){
  145. this.isShowcardValidity=false
  146. },
  147. imgTypeSelect(val) {
  148. var _this=this
  149. if (val.name == '相册') {
  150. uni.chooseImage({
  151. count: 1,
  152. sourceType: this.$helper.chooseImage.sourceType,
  153. success: function(res) {
  154. console.log(JSON.stringify(res.tempFilePaths));
  155. uploadImage(res.tempFilePaths[0], 'appData/',
  156. result => {
  157. // 上传成功回调函数
  158. console.log('图片地址', result)
  159. _this.dataDetails.businessLicenseAddressUrl=result
  160. console.log(_this.dataDetails.businessLicenseAddressUrl)
  161. }
  162. )
  163. }
  164. });
  165. } else {
  166. uni.chooseImage({
  167. count: 1,
  168. sourceType: ['camera'],
  169. success: function(res) {
  170. console.log(JSON.stringify(res.tempFilePaths));
  171. uploadImage(res.tempFilePaths[0], 'appData/',
  172. result => {
  173. // 上传成功回调函数
  174. console.log('图片地址', result)
  175. _this.dataDetails.businessLicenseAddressUrl=result
  176. }
  177. )
  178. }
  179. });
  180. }
  181. },
  182. uploadImg(type, index) {
  183. this.uploadType = type
  184. this.isShowimgType = true
  185. this.index = index
  186. },
  187. goDetailPage(src) {
  188. uni.setStorage({key: 'companydata',data: JSON.stringify(this.dataDetails)});
  189. uni.$u.route(src);
  190. },
  191. selectValidityPeriod() {
  192. this.isShowcardValidity = true
  193. },
  194. confirmValidityPeriod(e) {
  195. console.log('confirm', e)
  196. if (e.value[0] == '长期') {
  197. this.dataDetails.businessTermDate = e.value[0]
  198. } else {
  199. this.dataDetails.businessTermDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
  200. }
  201. this.isShowcardValidity = false
  202. },
  203. changeHandler(e) {
  204. const {
  205. columnIndex,
  206. value,
  207. values,
  208. index,
  209. picker = this.$refs.uPicker
  210. } = e
  211. // if (columnIndex === 0) {
  212. //
  213. // if (e.index != 0) {
  214. // picker.setColumnValues(1, this.validityPeriod[1].shift())
  215. // }
  216. // } else if (columnIndex === 1) {
  217. // if (e.index != 0) {
  218. // picker.setColumnValues(2, this.validityPeriod[2].shift())
  219. // }
  220. // }
  221. },
  222. }
  223. }
  224. </script>
  225. <style lang="scss" scoped>
  226. page{
  227. background:#F5F6FA;
  228. }
  229. .next{
  230. color:#2772FB;
  231. font-size:13px;
  232. }
  233. .wrap{
  234. background:#fff;
  235. padding:20rpx 30rpx;
  236. border-radius:5px;
  237. margin:20rpx;
  238. .left{
  239. width: 240rpx;
  240. font-size: 28rpx;
  241. }
  242. .right{
  243. font-size: 28rpx;
  244. width: calc(100% - 240rpx);
  245. }
  246. }
  247. .preview-card-img {
  248. // /deep/uni-image>div, uni-image>img {
  249. // transform: scale(1.5) rotate(-90deg);
  250. // }
  251. }
  252. .picture {
  253. margin-top: 20rpx;
  254. background: #F5F6FA;
  255. width: 212rpx;
  256. height: 212rpx;
  257. border-radius: 20rpx;
  258. display: flex;
  259. flex-direction: column;
  260. justify-content: center;
  261. align-items: center;
  262. color: #6A7282;
  263. }
  264. .content1 {
  265. background:#fff;
  266. padding:40rpx 20rpx 20rpx;
  267. margin:20rpx 20rpx 200rpx;
  268. border-radius: 10rpx;
  269. .row {
  270. border-bottom: 1px solid #EEEEEE;
  271. padding-bottom: 28rpx;
  272. margin-top: 26rpx;
  273. }
  274. .left-text {
  275. width: 320rpx;
  276. color: #333333;
  277. display: flex;
  278. align-items: center;
  279. font-size:14px;
  280. }
  281. .picture {
  282. position: relative;
  283. width: 100%;
  284. height: 440rpx;
  285. display: flex;
  286. justify-content: center;
  287. flex-direction: column;
  288. align-items: center;
  289. overflow: hidden;
  290. .text {
  291. margin-top: 20rpx;
  292. }
  293. }
  294. .picture7 {
  295. background: url(../../../static/mine/cy.png);
  296. background-size: 100% 100%;
  297. }
  298. .xj-image {
  299. width: 100rpx;
  300. height: 100rpx;
  301. }
  302. .title {
  303. color: #999999;
  304. margin: 20rpx 0;
  305. }
  306. }
  307. .u-input{
  308. font-size:16px;
  309. }
  310. .content4 {
  311. position:fixed;
  312. bottom:0;
  313. background: white;
  314. width:100%;
  315. text-align:center;
  316. left:0;
  317. box-sizing: border-box;;
  318. padding:10px 15px;
  319. .line{
  320. position:absolute;
  321. left:0;
  322. margin-top:-9px;
  323. border-top:1px solid #eee;
  324. width:100%;
  325. }
  326. .next-btn {
  327. background: #F1F3F6;
  328. width: 85%;
  329. padding: 20rpx 20rpx;
  330. text-align: center;
  331. color: #C5CAD4;
  332. border-radius: 50rpx;margin:0 auto;
  333. margin-top:10px;
  334. }
  335. }
  336. .del-card {
  337. position: absolute;
  338. top: -10rpx;
  339. right: -6rpx;
  340. width: 80rpx;
  341. height: 80rpx;
  342. z-index: 9;
  343. }
  344. .footer{
  345. position:fixed;
  346. background:#fff;
  347. width:100%;
  348. bottom:0;
  349. left:0;
  350. padding:15px 15px 30px;
  351. box-sizing: border-box;
  352. }
  353. .newlyIncreased{
  354. width:100%;
  355. margin:0 auto;
  356. text-align:center;
  357. height:46px;
  358. line-height: 46px;
  359. color:#fff;
  360. background:url(../../../static/mine/huozhurenzheng/Mask@3x.png) no-repeat;
  361. background-size:100%;
  362. }
  363. </style>