铝交易,微信公众号
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

502 lines
12 KiB

9 months ago
7 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
9 months ago
8 months ago
9 months ago
8 months ago
7 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
  1. <template>
  2. <view class="registerShop">
  3. <navbar
  4. v-if="key"
  5. :title="titleUpdateList[titleIndex]"
  6. leftClick
  7. @leftClick="$utils.navigateBack" />
  8. <navbar
  9. v-else
  10. :title="titleList[titleIndex]"
  11. leftClick
  12. @leftClick="$utils.navigateBack" />
  13. <view class="frame">
  14. <!--基本信息-->
  15. <view class="basicInfo">
  16. <!--用户名-->
  17. <view class="item">
  18. <view>账号/手机号</view>
  19. <!-- <view>{{ $t('components.username')}}</view> -->
  20. <view>
  21. <!-- <input v-model="form.userName" :placeholder="$t('components.enterUserName')" clearable></input> -->
  22. <input v-model="form.userName" placeholder="请输入账号/手机号" clearable></input>
  23. </view>
  24. </view>
  25. <!--密码-->
  26. <view class="item">
  27. <view>{{ $t('components.password')}}</view>
  28. <view>
  29. <input v-model="form.password" password clearable
  30. :placeholder="$t('components.enterYourPassword')" clearable></input>
  31. </view>
  32. </view>
  33. <!--公司名称-->
  34. <view class="item">
  35. <view>{{ $t('other.companyName')}}</view>
  36. <view>
  37. <input v-model="form.companyName" :placeholder="$t('other.enterCompanyName')"
  38. clearable></input>
  39. </view>
  40. </view>
  41. <!--税收编码-->
  42. <view class="item">
  43. <view>{{ $t('other.taxCode')}}</view>
  44. <view>
  45. <input v-model="form.taxCode" :placeholder="$t('other.enterTaxCode')" clearable></input>
  46. </view>
  47. </view>
  48. <!--公司地址-->
  49. <view class="item">
  50. <view>{{ $t('other.companyAddress')}}</view>
  51. <view>
  52. <input v-model="form.address" :placeholder="$t('other.enterCompanyAddress')" clearable></input>
  53. </view>
  54. </view>
  55. <!--联系电话-->
  56. <view class="item">
  57. <view>{{ $t('components.lxPhone')}}</view>
  58. <view>
  59. <input v-model="form.phone" :placeholder="$t('components.plePhoneNumber')" clearable></input>
  60. </view>
  61. </view>
  62. <!---->
  63. <view class="item">
  64. <view>{{ $t('other.companyAccount')}}</view>
  65. <view>
  66. <input v-model="form.bankAccount" :placeholder="$t('other.enterCompanyAccount')"
  67. clearable></input>
  68. </view>
  69. </view>
  70. <view class="item">
  71. <view>{{ $t('components.bankName')}}</view>
  72. <view>
  73. <input v-model="form.bankNama" :placeholder="$t('components.enterBankName')" clearable></input>
  74. </view>
  75. </view>
  76. </view>
  77. <!--证件信息-->
  78. <view class="certificateInfo">
  79. <!--营业执照-->
  80. <view class="certificateInfoItem">
  81. <view class="title">
  82. <span
  83. style="width: 10rpx;height: 40rpx;background-color: #f78142;border-radius: 10rpx;overflow: hidden;"></span>
  84. <span>{{ $t('components.businessLicense')}}</span>
  85. </view>
  86. <view class="upload">
  87. <uv-upload :fileList="yyzzfileList" :maxCount="4" multiple width="150rpx" height="150rpx"
  88. @delete="(file) => deleteImage(0, file)" @afterRead="(file) => afterRead(0, file)"
  89. :previewFullImage="true"></uv-upload>
  90. </view>
  91. </view>
  92. <!--基本户信息-->
  93. <view class="certificateInfoItem">
  94. <view class="title">
  95. <span
  96. style="width: 10rpx;height: 40rpx;background-color: #f78142;border-radius: 10rpx;overflow: hidden;"></span>
  97. <span>{{ $t('components.basicAccountInfo')}}</span>
  98. </view>
  99. <view class="upload">
  100. <uv-upload :fileList="jbhxxfileList" :maxCount="4" multiple width="150rpx" height="150rpx"
  101. @delete="(file) => deleteImage(1, file)" @afterRead="(file) => afterRead(1, file)"
  102. :previewFullImage="true"></uv-upload>
  103. </view>
  104. </view>
  105. <!--收款银行-->
  106. <view class="certificateInfoItem">
  107. <view class="title">
  108. <span
  109. style="width: 10rpx;height: 40rpx;background-color: #f78142;border-radius: 10rpx;overflow: hidden;"></span>
  110. <span>{{ $t('components.receivingBank')}}</span>
  111. </view>
  112. <view class="upload">
  113. <uv-upload :fileList="skyhfileList" :maxCount="4" multiple width="150rpx" height="150rpx"
  114. @delete="(file) => deleteImage(2, file)" @afterRead="(file) => afterRead(2, file)"
  115. :previewFullImage="true"></uv-upload>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. <view class="uni-color-btn"
  121. @click="showModel"
  122. v-if="key">
  123. 确认修改
  124. </view>
  125. <view class="bottom"
  126. v-else>
  127. <view class="btns">
  128. <!--申请审核-->
  129. <span @click="applyReview" class="sqsh">
  130. {{ $t('components.submitReview') }}
  131. </span>
  132. <!--联系我们-->
  133. <span @click="contactUs" class="lxwm">
  134. {{ $t('components.contactUs') }}
  135. </span>
  136. </view>
  137. <view class="others">
  138. <!--注册须知-->
  139. <span @click="$refs.popup.open('zcxz')" class="zcxz">
  140. {{ $t('components.registrationNotice') }}
  141. </span>
  142. <!--框架合同预览-->
  143. <span @click="$refs.popup.open('kjht')" class="kjhtyl">
  144. {{ $t('other.frameworkContractPreview') }}
  145. </span>
  146. </view>
  147. </view>
  148. <!-- 联系客服弹框 -->
  149. <customerServicePopup ref="customerServicePopup" />
  150. <configPopup ref="popup"></configPopup>
  151. </view>
  152. </template>
  153. <script>
  154. import customerServicePopup from "@/components/config/customerServicePopup.vue";
  155. import { mapState } from 'vuex'
  156. export default {
  157. components: {
  158. customerServicePopup
  159. },
  160. onLoad(option) {
  161. if(option.key){
  162. this.key = option.key
  163. this.form = this[option.key]
  164. this.titleIndex = ['buy', 'shopData'].indexOf(option.key)
  165. this.yyzzfileList = this.form.businessLicense.split(',').map(url => {
  166. return {
  167. url
  168. }
  169. })
  170. this.jbhxxfileList = this.form.basicAccount.split(',').map(url => {
  171. return {
  172. url
  173. }
  174. })
  175. this.skyhfileList = this.form.bankInfo.split(',').map(url => {
  176. return {
  177. url
  178. }
  179. })
  180. }else{
  181. this.titleIndex = option.identity
  182. this.form.role = option.identity
  183. }
  184. },
  185. computed : {
  186. ...mapState(['buy', 'shopData']),
  187. },
  188. data() {
  189. return {
  190. titleIndex: 0,
  191. titleList: [
  192. // 采购商注册 供应商注册 国内清关申请
  193. this.$t('other.buyerRegistration'),
  194. this.$t('other.supplierRegistration'),
  195. this.$t('other.domesticCustomsClearanceApplication')
  196. ],
  197. titleUpdateList: [
  198. // 采购商注册 供应商注册 国内清关申请
  199. '修改采购商信息',
  200. '修改供应商信息',
  201. ],
  202. form: {
  203. "address": "",
  204. "auditStatus": 0,
  205. "bankAccount": "",
  206. "bankInfo": "",
  207. "bankNama": "",
  208. "basicAccount": "",
  209. "businessLicense": "",
  210. "companyName": "",
  211. "password": "",
  212. "phone": "",
  213. "role": 0,
  214. "taxCode": "",
  215. "userName": ""
  216. },
  217. yyzzfileList: [],//营业执照
  218. jbhxxfileList: [],//基本户信息
  219. skyhfileList: [],//收款银行
  220. key : '',
  221. }
  222. },
  223. methods: {
  224. showModel(){
  225. uni.showModal({
  226. title: '确认修改吗?',
  227. content: '修改后该身份将需要重新审核!',
  228. success: (res) => {
  229. this.applyReview()
  230. }
  231. })
  232. },
  233. // 申请审核
  234. applyReview() {
  235. let data = JSON.parse(JSON.stringify(this.form))
  236. data.businessLicense = this.yyzzfileList.map((item) => item.url).join(",")
  237. data.basicAccount = this.jbhxxfileList.map((item) => item.url).join(",")
  238. data.bankInfo = this.skyhfileList.map((item) => item.url).join(",")
  239. if(this.$utils.verificationAll(data, {
  240. "userName": this.$t('components.enterUserName'),
  241. "password": this.$t('components.enterYourPassword'),
  242. "companyName": this.$t('other.enterCompanyName'),
  243. "taxCode": this.$t('other.enterTaxCode'),
  244. "address": this.$t('other.enterCompanyAddress'),
  245. "phone": this.$t('components.plePhoneNumber'),
  246. "bankAccount": this.$t('other.enterCompanyAccount'),
  247. "bankNama": this.$t('components.enterBankName'),
  248. "businessLicense": '请上传营业执照',
  249. "basicAccount": '请上传基本户信息照片',
  250. "bankInfo": '请上传收款银行照片',
  251. })){
  252. return
  253. }
  254. if (!this.$utils.verificationPhone(data.userName)) {
  255. return uni.showToast({
  256. title: '请输入合法的手机号',
  257. icon: 'none'
  258. })
  259. }
  260. let api = this.titleIndex == 2 ? 'addCustoms' : 'roleOption'
  261. if(this.key){
  262. api = 'updateRoleInfo'
  263. }
  264. this.$api(api, data, res => {
  265. if (res.code == 200) {
  266. // uni.removeStorageSync('token')
  267. // this.$store.state.userInfo = {}
  268. this.form = {}
  269. // uni.redirectTo({
  270. // url: '/pages/index/index'
  271. // })
  272. uni.showToast({
  273. title: '提交成功!耐心等待审核',
  274. icon: 'none'
  275. })
  276. if(this.key){
  277. setTimeout(uni.reLaunch, 1000, {
  278. url: '/pages_order/auth/selectionIdentity'
  279. })
  280. }else{
  281. setTimeout(uni.navigateBack, 1000, -1)
  282. }
  283. }
  284. })
  285. },
  286. // 联系我们
  287. contactUs() {
  288. console.log("打开客服弹框")
  289. this.$refs.customerServicePopup.open();
  290. },
  291. // 上传图片
  292. afterRead(type, e) {
  293. let self = this
  294. e.file.forEach(file => {
  295. self.$Oss.ossUpload(file.url).then(url => {
  296. if (type == 0) {
  297. self.yyzzfileList.push({
  298. url
  299. })
  300. } else if (type == 1) {
  301. self.jbhxxfileList.push({
  302. url
  303. })
  304. } else if (type == 2) {
  305. self.skyhfileList.push({
  306. url
  307. })
  308. }
  309. })
  310. })
  311. },
  312. // 删除图片
  313. deleteImage(type, e) {
  314. console.log(e, type, "===========")
  315. if (type == 0) {
  316. this.yyzzfileList.splice(e.index, 1)
  317. } else if (type == 1) {
  318. this.jbhxxfileList.splice(e.index, 1)
  319. } else if (type == 2) {
  320. this.skyhfileList.splice(e.index, 1)
  321. }
  322. },
  323. }
  324. }
  325. </script>
  326. <style scoped lang="scss">
  327. .registerShop {
  328. padding-bottom: 300rpx;
  329. .frame {
  330. min-height: 100vh;
  331. overflow: auto;
  332. .basicInfo {
  333. display: flex;
  334. flex-direction: column;
  335. gap: 5rpx;
  336. background-color: #FFF;
  337. margin-top: 20rpx;
  338. padding: 20rpx;
  339. .item {
  340. display: flex;
  341. align-items: center;
  342. background-color: #FFF;
  343. height: 80rpx;
  344. // margin: 10rpx 0 0 0;
  345. padding: 10rpx 0 0 20rpx;
  346. >view:nth-of-type(1) {
  347. width: 30%;
  348. // font-weight: 700;
  349. }
  350. >view:nth-of-type(2) {
  351. width: 70%;
  352. border-radius: 10rpx;
  353. overflow: hidden;
  354. input {
  355. background-color: #f5f5f5;
  356. font-size: 28rpx;
  357. padding: 16rpx 8rpx 16rpx 15rpx;
  358. }
  359. }
  360. }
  361. }
  362. .certificateInfo {
  363. display: flex;
  364. flex-direction: column;
  365. gap: 20rpx;
  366. background-color: #FFF;
  367. margin-top: 20rpx;
  368. padding: 20rpx;
  369. .certificateInfoItem {
  370. .title {
  371. display: flex;
  372. // padding-top: 40rpx;
  373. font-size: 30rpx;
  374. font-weight: 700;
  375. padding: 0 0 0 20rpx;
  376. >span:nth-of-type(1) {
  377. margin: 4rpx 0 0 8rpx;
  378. background-color: #FFF;
  379. }
  380. >span:nth-of-type(2) {
  381. margin: 0 0 0 8rpx;
  382. background-color: #FFF;
  383. }
  384. }
  385. .upload {
  386. margin: 5rpx 0 0 40rpx;
  387. }
  388. }
  389. }
  390. }
  391. .bottom {
  392. position: fixed;
  393. bottom: 10rpx;
  394. left: 0;
  395. right: 0;
  396. background-color: #FFF;
  397. .btns {
  398. display: flex;
  399. justify-content: center;
  400. align-items: center;
  401. gap: 40rpx;
  402. .sqsh {
  403. display: flex;
  404. align-items: center;
  405. justify-content: center;
  406. width: 40%;
  407. height: 70rpx;
  408. border-radius: 40rpx;
  409. color: white;
  410. font-size: 28rpx;
  411. margin: 20rpx 10rpx 0 0;
  412. background: #293143;
  413. //margin-top: 20rpx;
  414. border-radius: 40rpx;
  415. }
  416. .lxwm {
  417. display: flex;
  418. align-items: center;
  419. justify-content: center;
  420. width: 40%;
  421. height: 70rpx;
  422. border-radius: 40rpx;
  423. color: #000000;
  424. font-size: 28rpx;
  425. margin: 20rpx 10rpx 0 0;
  426. background: #f2f2f2;
  427. //margin-top: 20rpx;
  428. border-radius: 40rpx;
  429. }
  430. }
  431. .others {
  432. margin: 20rpx 0;
  433. display: flex;
  434. justify-content: center;
  435. align-items: center;
  436. gap: 200rpx;
  437. color: #707070;
  438. font-size: 24rpx;
  439. .zcxz {
  440. text-decoration: underline;
  441. }
  442. .kjhtyl {
  443. text-decoration: underline;
  444. }
  445. }
  446. }
  447. }
  448. </style>