companyIdentity.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. <template>
  2. <view class="center">
  3. <view>
  4. <image @click='consent' style='width:14px;height:14px;position:relative;top:2px;margin-right:5px;'
  5. :src="consentStatus==true?'../../static/img/login/select@2x.png':'../../static/img/login/selected2.png'"
  6. alt=""></image>
  7. <text>公司</text>
  8. <image @click='consent' style='width:14px;height:14px;position:relative;top:2px;margin-right:5px;'
  9. :src="consentStatus1==true?'../../static/img/login/select@2x.png':'../../static/img/login/selected2.png'"
  10. alt=""></image>
  11. <text>个人</text>
  12. </view>
  13. <view v-if="consentStatus == true">
  14. <view>
  15. <button type="default" @click="license">上传营业执照</button>
  16. </view>
  17. <view class="c-row b-b">
  18. <text class="tit">公司名称</text>
  19. <view class="con-list">
  20. <input placeholder="请填写公司名称" name="input" v-model="identityAuthenticationInfo.compName"></input>
  21. </view>
  22. </view>
  23. <view class="c-row b-b">
  24. <text class="tit">纳税人识别号</text>
  25. <view class="con-list">
  26. <input placeholder="请填写纳税人识别号" name="input"
  27. v-model="identityAuthenticationInfo.payTaxesCard"></input>
  28. </view>
  29. </view>
  30. <view>
  31. <button type="default">上传身份证正面</button>
  32. <button type="default">上传身份证反面</button>
  33. </view>
  34. <view class="c-row b-b">
  35. <text class="tit">姓名</text>
  36. <view class="con-list">
  37. <input placeholder="请填写姓名" name="input" v-model="identityAuthenticationInfo.customerName"></input>
  38. </view>
  39. </view>
  40. <view class="c-row b-b">
  41. <text class="tit">身份证号</text>
  42. <view class="con-list">
  43. <input placeholder="请填写身份证号" name="input"
  44. v-model="identityAuthenticationInfo.customerNumberCard"></input>
  45. </view>
  46. </view>
  47. <view>
  48. <button type="default">上传银行卡正面</button>
  49. <button type="default">上传银行卡反面</button>
  50. </view>
  51. <view class="c-row b-b">
  52. <text class="tit">银行卡号</text>
  53. <view class="con-list">
  54. <input placeholder="请填写银行卡号" name="input" v-model="identityAuthenticationInfo.bankCard"></input>
  55. </view>
  56. </view>
  57. <view class="c-row b-b">
  58. <text class="tit">开户行</text>
  59. <view class="con-list">
  60. <input placeholder="请填写开户行" name="input" v-model="identityAuthenticationInfo.bankDeposit"></input>
  61. </view>
  62. </view>
  63. <view class="c-row b-b">
  64. <text class="tit">开户支行</text>
  65. <view class="con-list">
  66. <input placeholder="请填写开户支行" name="input"
  67. v-model="identityAuthenticationInfo.bankDepositBranch"></input>
  68. </view>
  69. </view>
  70. <view class="c-row b-b">
  71. <text class="tit">手机号</text>
  72. <view class="con-list">
  73. <input placeholder="请填写手机号" @input='phoneinput' v-model="identityAuthenticationInfo.customerPhone"></input>
  74. </view>
  75. </view>
  76. <view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
  77. <button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
  78. class='getcode'>{{sendText}}</button>
  79. <view style='width:70%;position:relative;margin-left: 200px;'>
  80. <input v-model='verifyCode' placeholder="请输入验证码" type="text">
  81. </view>
  82. </view>
  83. <view class="c-row b-b">
  84. <text class="tit">公司地址</text>
  85. <view class="con-list">
  86. <input placeholder="请填写公司地址" name="input" v-model="identityAuthenticationInfo.compAddress"></input>
  87. </view>
  88. </view>
  89. </view>
  90. <view v-else>
  91. <view>
  92. <button type="default">上传身份证正面</button>
  93. <button type="default">上传身份证反面</button>
  94. </view>
  95. <view class="c-row b-b">
  96. <text class="tit">姓名</text>
  97. <view class="con-list">
  98. <input placeholder="请填写姓名" name="input" v-model="identityAuthenticationInfo.customerName"></input>
  99. </view>
  100. </view>
  101. <view class="c-row b-b">
  102. <text class="tit">身份证号</text>
  103. <view class="con-list">
  104. <input placeholder="请填写身份证号" name="input"
  105. v-model="identityAuthenticationInfo.customerNumberCard"></input>
  106. </view>
  107. </view>
  108. <view>
  109. <button type="default">上传银行卡正面</button>
  110. <button type="default">上传银行卡反面</button>
  111. </view>
  112. <view class="c-row b-b">
  113. <text class="tit">银行卡号</text>
  114. <view class="con-list">
  115. <input placeholder="请填写银行卡号" name="input" v-model="identityAuthenticationInfo.bankCard"></input>
  116. </view>
  117. </view>
  118. <view class="c-row b-b">
  119. <text class="tit">开户行</text>
  120. <view class="con-list">
  121. <input placeholder="请填写开户行" name="input" v-model="identityAuthenticationInfo.bankDeposit"></input>
  122. </view>
  123. </view>
  124. <view class="c-row b-b">
  125. <text class="tit">开户支行</text>
  126. <view class="con-list">
  127. <input placeholder="请填写开户支行" name="input"
  128. v-model="identityAuthenticationInfo.bankDepositBranch"></input>
  129. </view>
  130. </view>
  131. <view class="c-row b-b">
  132. <text class="tit">收款人姓名</text>
  133. <view class="con-list">
  134. <input placeholder="请填写收款人姓名" name="input" v-model="identityAuthenticationInfo.payeeName"></input>
  135. </view>
  136. </view>
  137. <view class="c-row b-b">
  138. <text class="tit">收款人身份证号</text>
  139. <view class="con-list">
  140. <input placeholder="请填写收款身份证号" name="input"
  141. v-model="identityAuthenticationInfo.payeeNumberCard"></input>
  142. </view>
  143. </view>
  144. <view class="c-row b-b">
  145. <text class="tit">手机号</text>
  146. <view class="con-list">
  147. <input placeholder="请填写手机号" @input='phoneinput' v-model="identityAuthenticationInfo.customerPhone"></input>
  148. </view>
  149. </view>
  150. <view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
  151. <button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
  152. class='getcode'>{{sendText}}</button>
  153. <view style='width:70%;position:relative;margin-left: 200px;'>
  154. <input v-model='verifyCode' placeholder="请输入验证码" type="text">
  155. </view>
  156. </view>
  157. <view class="c-row b-b">
  158. <text class="tit">联系地址</text>
  159. <view class="con-list">
  160. <input placeholder="请填写联系地址" name="input" v-model="identityAuthenticationInfo.compAddress"></input>
  161. </view>
  162. </view>
  163. </view>
  164. <view class="padding flex flex-direction">
  165. <button class="cu-btn bg-red margin-tb-sm lg" @click="commit">提交</button>
  166. </view>
  167. </view>
  168. </template>
  169. <script>
  170. export default {
  171. name: "buy",
  172. data() {
  173. return {
  174. inputContent: null,
  175. customerPhone: '',
  176. consentStatus: true,
  177. consentStatus1: false,
  178. codestatus: false,
  179. verifyCode: null,
  180. inputStatus: 'none',
  181. sendText: '获取验证码',
  182. platform: '',
  183. sendDisabled: false,
  184. identityAuthenticationInfo: {
  185. customerPhone: '',
  186. },
  187. tempFilePaths: [],
  188. businessLicenseAddressUrl:"",
  189. userInfo:{
  190. phone: ''
  191. },
  192. identityAuthenticationInfo: {},
  193. };
  194. },
  195. methods: {
  196. consent() {
  197. if (this.consentStatus == false && this.consentStatus1 == true) {
  198. this.consentStatus = true
  199. this.consentStatus1 = false
  200. } else if (this.consentStatus == true && this.consentStatus1 == false) {
  201. this.consentStatus = false
  202. this.consentStatus1 = true
  203. }
  204. },
  205. license() {
  206. wx.chooseImage({
  207. success: function(res) {
  208. wx.uploadFile({
  209. url: 'https://www.zthymaoyi.com/upload/admin',
  210. filePath: res.tempFilePaths[0],
  211. name: 'file',
  212. success(res) {
  213. const data = res.data
  214. const strToObj = JSON.parse(data)
  215. this.businessLicenseAddressUrl = strToObj.url
  216. console.log(this.businessLicenseAddressUrl)
  217. }
  218. })
  219. }
  220. })
  221. },
  222. getcode() {
  223. var that = this
  224. if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.identityAuthenticationInfo.customerPhone)) {
  225. this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
  226. phone: this.identityAuthenticationInfo.customerPhone
  227. }).then(res => {
  228. if (res.data.code == 200) {
  229. that.sendDisabled = true
  230. let sec = 60
  231. let interval = setInterval(() => {
  232. sec--;
  233. that.sendText = sec + 's后重发'
  234. if (sec <= 0) {
  235. that.sendDisabled = false
  236. that.sendText = "获取验证码"
  237. clearInterval(interval)
  238. }
  239. }, 1000)
  240. } else {
  241. uni.showToast({
  242. title: res.data.message,
  243. icon: 'none',
  244. duration: 2000
  245. })
  246. }
  247. })
  248. .catch(res => {
  249. uni.showToast({
  250. title: res.data.message,
  251. icon: 'none',
  252. duration: 2000
  253. })
  254. });
  255. } else {
  256. uni.showToast({
  257. title: '请输入正确的手机号',
  258. icon: 'none',
  259. duration: 2000
  260. })
  261. }
  262. },
  263. phoneinput(e){
  264. if(e.detail.value.length==11){
  265. this.codestatus=true
  266. }
  267. },
  268. verifyCodeInput(e) {
  269. this.verifyCode = e.detail.value
  270. },
  271. cancel() {
  272. this.inputShow = false
  273. this.inputStatus = 'none'
  274. this.isPhone = false
  275. },
  276. commit() {
  277. this.identityAuthenticationInfo.businessLicenseAddressUrl = 111
  278. console.log(this.businessLicenseAddressUrl,"好了")
  279. console.log(this.identityAuthenticationInfo.businessLicenseAddressUrl,"好了吗")
  280. console.log(this.identityAuthenticationInfo,"对象")
  281. return
  282. this.$api.doRequest('post', '/identityAuthenticationInfo/api/addIdentityAuthenticationInfo', this
  283. .identityAuthenticationInfo)
  284. .then(res => {
  285. console.log(12545645)
  286. }).catch(res => {
  287. uni.showToast({
  288. title: res.data.message,
  289. icon: 'none',
  290. duration: 2000
  291. })
  292. })
  293. },
  294. },
  295. }
  296. </script>
  297. <style>
  298. .center {
  299. padding: 10px 20px;
  300. }
  301. .c-row {
  302. display: -webkit-box;
  303. display: -webkit-flex;
  304. display: flex;
  305. -webkit-box-align: center;
  306. -webkit-align-items: center;
  307. align-items: center;
  308. padding: 20rpx 30rpx;
  309. position: relative;
  310. }
  311. .con-list {
  312. -webkit-box-flex: 1;
  313. -webkit-flex: 1;
  314. flex: 1;
  315. display: -webkit-box;
  316. display: -webkit-flex;
  317. display: flex;
  318. -webkit-box-orient: vertical;
  319. -webkit-box-direction: normal;
  320. -webkit-flex-direction: column;
  321. flex-direction: column;
  322. color: #303133;
  323. line-height: 40rpx;
  324. text-align: right;
  325. padding-right: 20rpx;
  326. font-size: 14px;
  327. }
  328. .getcode {
  329. font-size: 14px;
  330. position: absolute;
  331. top: 50%;
  332. transform: translateY(-50%);
  333. color: #AFB3BF;
  334. background: #F5F6F9;
  335. height: 30px;
  336. line-height: 30px;
  337. }
  338. .getcode.active {
  339. border: none;
  340. }
  341. .uni-navigator{
  342. display:inline-block;
  343. color:#22C572;
  344. }
  345. .getcode.active {
  346. background: #22C572;
  347. color: #fff;
  348. }
  349. </style>