From 790221ce9c7cba9fe455493c7a0e84695c021c3d Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 26 一月 2024 15:03:33 +0800
Subject: [PATCH] Mr.Shi
---
company/src/components/business/OperaCompanyDescWindow.vue | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 106 insertions(+), 9 deletions(-)
diff --git a/company/src/components/business/OperaCompanyDescWindow.vue b/company/src/components/business/OperaCompanyDescWindow.vue
index c7c3c9a..a5b131e 100644
--- a/company/src/components/business/OperaCompanyDescWindow.vue
+++ b/company/src/components/business/OperaCompanyDescWindow.vue
@@ -1,7 +1,8 @@
<template>
<GlobalWindow
:title="title"
- width="80%"
+ width="100%"
+ :withFooter="false"
:visible.sync="visible"
:confirm-working="isWorking"
@confirm="confirm"
@@ -9,7 +10,10 @@
<div class="info">
<div class="info_label">
<span>浼佷笟璇︽儏</span>
- <el-button type="primary" @click="$refs.operaCompanyWindow.open('缂栬緫浼佷笟淇℃伅', row)">淇敼浼佷笟淇℃伅</el-button>
+ <div>
+ <el-button type="primary" @click="$refs.modification.open('淇敼淇濋櫓鏂规', form)">鏇存敼淇濋櫓鏂规</el-button>
+ <el-button type="primary" @click="$refs.operaCompanyWindow.open('缂栬緫浼佷笟淇℃伅', form)">淇敼浼佷笟淇℃伅</el-button>
+ </div>
</div>
<div class="info_list">
<div class="info_list_item">
@@ -118,6 +122,9 @@
</div>
<!-- 鏂板缓/淇敼 -->
<OperaCompanyWindow ref="operaCompanyWindow" @success="callback"/>
+ <!-- 淇敼淇濋櫓鏂规 -->
+ <modification ref="modification" @success="callback"/>
+ <!-- 淇敼鎵嬫満鍙� -->
<el-dialog
title="鏇存敼缁戝畾鎵嬫満鍙�"
:visible.sync="visiblePhone"
@@ -130,20 +137,21 @@
<div class="form_item">
<div class="form_item_label">缁戝畾鎵嬫満鍙凤細</div>
<div class="form_item_val">
- <input type="text" placeholder="璇疯緭鍏�" />
+ <el-input v-model="phone" placeholder="璇疯緭鍏�"></el-input>
</div>
</div>
<div class="form_item">
<div class="form_item_label">楠岃瘉鐮侊細</div>
<div class="form_item_val">
- <input type="text" placeholder="璇疯緭鍏�" />
- <el-button type="primary" style="margin-left: 20px;">鍙戦�侀獙璇佺爜</el-button>
+ <el-input v-model="code" placeholder="璇疯緭鍏�"></el-input>
+ <el-button type="primary" style="margin-left: 20px;" @click="send" v-if="num === 0">鍙戦�侀獙璇佺爜</el-button>
+ <el-button type="primary" style="flex-shrink: 0; margin-left: 15px;" v-else>{{num}}s</el-button>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
- <el-button @click="visiblePhone = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="visiblePhone = false">鎻� 浜�</el-button>
+ <el-button @click="close">鍙� 娑�</el-button>
+ <el-button type="primary" @click="updatePhoneEvent">鎻� 浜�</el-button>
</span>
</el-dialog>
</GlobalWindow>
@@ -153,20 +161,26 @@
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import OperaCompanyWindow from '@/components/business/OperaCompanyWindow'
- import { getById } from '@/api/business/company'
+ import modification from '@/components/business/modification'
+ import { getById, updatePhone } from '@/api/business/company'
import { listForCompany } from '@/api/business/solutions'
+ import { sendSms } from '@/api/business/smsEmail'
export default {
name: 'OperaCompanyDescWindow',
extends: BaseOpera,
- components: { GlobalWindow, OperaCompanyWindow },
+ components: { GlobalWindow, OperaCompanyWindow, modification },
data () {
return {
ruleForm: {
phone: '',
code: ''
},
+ num: 0,
+ timer: null,
// 琛ㄥ崟鏁版嵁
form: {},
+ phone: '',
+ code: '',
visiblePhone: false,
options: [],
tableData: []
@@ -179,12 +193,94 @@
})
},
methods: {
+ close() {
+ this.visiblePhone = false
+ this.phone = ''
+ this.code = ''
+ clearInterval(this.timer)
+ this.num = 0
+ },
+ updatePhoneEvent() {
+ if (!this.phone) {
+ this.$message.warning('璇疯緭鍏ユ墜鏈哄彿')
+ return
+ }
+ if (!this.code) {
+ this.$message.warning('璇疯緭鍏ラ獙璇佺爜')
+ return
+ }
+ updatePhone({
+ id: this.form.id,
+ captche: this.code,
+ phone: this.phone
+ }).then(res => {
+ this.form.phone = JSON.parse(JSON.stringify(this.phone))
+ this.$message.success('鎿嶄綔鎴愬姛')
+ this.visiblePhone = false
+ this.phone = ''
+ this.code = ''
+ clearInterval(this.timer)
+ this.num = 0
+ })
+ },
+ send() {
+ if (!this.phone) {
+ this.$message.warning('璇疯緭鍏ユ墜鏈哄彿')
+ return
+ }
+ sendSms({ phone: this.phone })
+ .then(res => {
+ this.num = 60
+ this.setTime()
+ })
+ },
+ setTime() {
+ this.timer = setInterval(() => {
+ this.num -= 1
+ if (this.num === 0) {
+ clearInterval(this.timer)
+ this.num = 0
+ }
+ }, 1000)
+ },
open (title, target) {
const that = this;
this.title = title
+ this.phone = ''
+ this.code = ''
+ clearInterval(this.timer)
+ this.num = 0
getById(target.id)
.then(res => {
this.form = res
+ this.form.type = 1
+
+ this.form.file = {
+ imgurl: '',
+ imgurlfull: ''
+ }
+ this.form.file1 = {
+ imgurl: '',
+ imgurlfull: ''
+ }
+ this.form.file2 = {
+ imgurl: '',
+ imgurlfull: ''
+ }
+ this.form.file3 = {
+ imgurl: '',
+ imgurlfull: ''
+ }
+
+ this.form.file.imgurl = res.businessImg.fileurl
+ this.form.file.imgurlfull = res.businessImg.fileurlFull
+ this.form.file1.imgurl = res.idcardImgList[0].fileurl
+ this.form.file1.imgurlfull = res.idcardImgList[0].fileurlFull
+ this.form.file2.imgurl = res.idcardImgList[1].fileurl
+ this.form.file2.imgurlfull = res.idcardImgList[1].fileurlFull
+ this.form.file3.imgurl = res.signImg.fileurl
+ this.form.file3.imgurlfull = res.signImg.fileurlFull
+
listForCompany({ companyId: target.id })
.then(resa => {
that.form.solutionList = resa.map(item => {
@@ -201,6 +297,7 @@
canReduce: item.canReduce
}
})
+ console.log(that.form)
that.visible = true
})
})
--
Gitblit v1.9.3