|
@@ -85,33 +85,16 @@
|
|
<ws-input v-model="customerList.customerPhone" placeholder="请输入手机号" maxlength="100" size="small"
|
|
<ws-input v-model="customerList.customerPhone" placeholder="请输入手机号" maxlength="100" size="small"
|
|
:disabled="disabled" />
|
|
:disabled="disabled" />
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
- <!-- 验证码 -->
|
|
|
|
- <!-- <el-form-item prop="veriCode" :label="$t('login.register08')">
|
|
|
|
- <el-input v-model="form.name"></el-input>
|
|
|
|
- <div style="display: flex; justify-content: space-between">
|
|
|
|
- <el-input
|
|
|
|
- v-model="form.name"
|
|
|
|
- :disabled="disabledFlag"
|
|
|
|
- class="code_style"
|
|
|
|
- :placeholder="$t('login.registerVerif08')"
|
|
|
|
- />
|
|
|
|
- <div>
|
|
|
|
- <ws-button
|
|
|
|
- v-show="verification"
|
|
|
|
- type="primary"
|
|
|
|
- @click="toSend"
|
|
|
|
- >{{ $t('login.sendVerification') }}</ws-button
|
|
|
|
- >
|
|
|
|
- <ws-button v-show="!verification" class="retry" disabled
|
|
|
|
- >{{ $t('login.retry') }}({{ count }})s</ws-button
|
|
|
|
- >
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </el-form-item> -->
|
|
|
|
<ws-form-item label="联系地址" span="1" prop="compAddress">
|
|
<ws-form-item label="联系地址" span="1" prop="compAddress">
|
|
<ws-input v-model="customerList.compAddress" placeholder="请输入联系地址" maxlength="100" size="small"
|
|
<ws-input v-model="customerList.compAddress" placeholder="请输入联系地址" maxlength="100" size="small"
|
|
:disabled="disabled" />
|
|
:disabled="disabled" />
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
|
|
+ <ws-form-item label="验证码" label-width="0px" span="1" prop="compAddress">
|
|
|
|
+ <el-button type="primary" class="veriCode" @click="toSend()" v-if="!sendDisabled">获取验证码</el-button>
|
|
|
|
+ <el-button type="warning" class="veriCode" v-if="sendDisabled">{{sendText}}</el-button>
|
|
|
|
+
|
|
|
|
+ <ws-input v-model="verifyCode" placeholder="请输入验证码" maxlength="100" size="small" :disabled="disabled" />
|
|
|
|
+ </ws-form-item>
|
|
</ws-info-table>
|
|
</ws-info-table>
|
|
<div class="but">
|
|
<div class="but">
|
|
<el-button type="primary" @click="commit" v-if="switchType == 1 || switchType == 3">提交</el-button>
|
|
<el-button type="primary" @click="commit" v-if="switchType == 1 || switchType == 3">提交</el-button>
|
|
@@ -128,7 +111,9 @@
|
|
getCustomerLook,
|
|
getCustomerLook,
|
|
CustomerEdit,
|
|
CustomerEdit,
|
|
getIdentity,
|
|
getIdentity,
|
|
- getBank
|
|
|
|
|
|
+ getBank,
|
|
|
|
+ GetCustomerCode,
|
|
|
|
+ GetCustomerCodeJY
|
|
} from '@/model/houseSelfCollect/index'
|
|
} from '@/model/houseSelfCollect/index'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -170,17 +155,20 @@
|
|
identityLow: 'low',
|
|
identityLow: 'low',
|
|
bankUps: 'bankUp',
|
|
bankUps: 'bankUp',
|
|
bankLows: 'bankLow',
|
|
bankLows: 'bankLow',
|
|
|
|
+ sendText: '',
|
|
|
|
+ sendDisabled: false,
|
|
|
|
+ verifyCode: ""
|
|
}
|
|
}
|
|
},
|
|
},
|
|
activated() {
|
|
activated() {
|
|
this.switchType = this.$route.query.types
|
|
this.switchType = this.$route.query.types
|
|
if (this.$route.query.types == null) {
|
|
if (this.$route.query.types == null) {
|
|
this.switchType = 1
|
|
this.switchType = 1
|
|
- this.imageUrl1=""
|
|
|
|
- this.imageUrl2=""
|
|
|
|
- this.imageUrl3=""
|
|
|
|
- this.imageUrl4=""
|
|
|
|
- this.customerList={}
|
|
|
|
|
|
+ this.imageUrl1 = ""
|
|
|
|
+ this.imageUrl2 = ""
|
|
|
|
+ this.imageUrl3 = ""
|
|
|
|
+ this.imageUrl4 = ""
|
|
|
|
+ this.customerList = {}
|
|
}
|
|
}
|
|
let id = this.$route.query.id
|
|
let id = this.$route.query.id
|
|
if (this.switchType == 2) {
|
|
if (this.switchType == 2) {
|
|
@@ -241,41 +229,30 @@
|
|
},
|
|
},
|
|
// 发送验证码
|
|
// 发送验证码
|
|
toSend() {
|
|
toSend() {
|
|
- if (this.registerForm.linkmanPhone) {
|
|
|
|
- if (validUserCellPhone(this.registerForm.linkmanPhone)) {
|
|
|
|
- this.disabledFlag = false
|
|
|
|
- clearInterval(this.timer)
|
|
|
|
- this.timer = null
|
|
|
|
- const TIME_COUNT = 60
|
|
|
|
- if (!this.timer) {
|
|
|
|
- this.count = TIME_COUNT
|
|
|
|
- this.verification = false
|
|
|
|
- let data = {
|
|
|
|
- mobilePhone: this.registerForm.linkmanPhone,
|
|
|
|
- }
|
|
|
|
- sendRegisterCode(data)
|
|
|
|
- .toPromise()
|
|
|
|
- .then((res) => {
|
|
|
|
- this.timer = setInterval(() => {
|
|
|
|
- if (this.count > 0 && this.count <= TIME_COUNT) {
|
|
|
|
- this.count--
|
|
|
|
- } else {
|
|
|
|
- this.verification = true
|
|
|
|
- clearInterval(this.timer)
|
|
|
|
- this.timer = null
|
|
|
|
- }
|
|
|
|
- }, 1000)
|
|
|
|
- })
|
|
|
|
- .catch((err) => {
|
|
|
|
- this.verification = true
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- EventBus.$emit('error', this.$t('login.registerVerif09'))
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- EventBus.$emit('error', this.$t('login.registerVerif05'))
|
|
|
|
|
|
+ let that = this;
|
|
|
|
+ if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.customerList.customerPhone)) {
|
|
|
|
+ GetCustomerCode({
|
|
|
|
+ phone: this.customerList.customerPhone
|
|
|
|
+ })
|
|
|
|
+ .toPromise().then((response) => {
|
|
|
|
+ console.log(response)
|
|
|
|
+ if (response == 'ok') {
|
|
|
|
+ that.sendDisabled = true
|
|
|
|
+ let sec = 60
|
|
|
|
+ let interval = setInterval(() => {
|
|
|
|
+ sec--;
|
|
|
|
+ that.sendText = sec + 'S后重发'
|
|
|
|
+ if (sec <= 0) {
|
|
|
|
+ that.sendDisabled = false
|
|
|
|
+ that.sendText = "获取验证码"
|
|
|
|
+ clearInterval(interval)
|
|
|
|
+ }
|
|
|
|
+ }, 1000)
|
|
|
|
+ } else {}
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
cancel() {
|
|
cancel() {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
@@ -352,54 +329,63 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
commit() {
|
|
commit() {
|
|
- this.customerList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
|
- this.customerList.cardAddressUrl = this.identity.toString()
|
|
|
|
- this.customerList.payeeAddressUrl = this.bank.toString()
|
|
|
|
- this.customerList.customerTypeFlag = 1
|
|
|
|
- this.customerList.customerType = '个人'
|
|
|
|
- if (this.switchType == 1) {
|
|
|
|
- this.$confirm('确定提交客户信息?', '提示', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- .then(() => {
|
|
|
|
- customerAdd(this.customerList)
|
|
|
|
- .toPromise()
|
|
|
|
- .then((response) => {
|
|
|
|
- // this.customerList.id = response
|
|
|
|
- // customerIdentity(this.customerList)
|
|
|
|
- // .toPromise()
|
|
|
|
- // .then((response) => {
|
|
|
|
- // this.$message.success('添加成功')
|
|
|
|
- // this.$router.push({ path: 'customerManagement' })
|
|
|
|
- // })
|
|
|
|
- this.$router.go(-1)
|
|
|
|
|
|
+ // 验证码校验
|
|
|
|
+ GetCustomerCodeJY({
|
|
|
|
+ phone: this.customerList.customerPhone,
|
|
|
|
+ verifyCode: this.verifyCode
|
|
|
|
+ })
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ debugger
|
|
|
|
+ this.customerList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
|
+ this.customerList.cardAddressUrl = this.identity.toString()
|
|
|
|
+ this.customerList.payeeAddressUrl = this.bank.toString()
|
|
|
|
+ this.customerList.customerTypeFlag = 1
|
|
|
|
+ this.customerList.customerType = '个人'
|
|
|
|
+ if (this.switchType == 1) {
|
|
|
|
+ this.$confirm('确定提交客户信息?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
})
|
|
})
|
|
- })
|
|
|
|
- .catch(() => {
|
|
|
|
- return false
|
|
|
|
- })
|
|
|
|
- } else if (this.switchType == 3) {
|
|
|
|
- this.$confirm('确定修改客户信息?', '提示', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- .then(() => {
|
|
|
|
- CustomerEdit(this.customerList)
|
|
|
|
- .toPromise()
|
|
|
|
- .then((response) => {
|
|
|
|
- this.$message.success('修改成功')
|
|
|
|
- this.$router.push({
|
|
|
|
- path: 'customerManagement'
|
|
|
|
- })
|
|
|
|
|
|
+ .then(() => {
|
|
|
|
+ customerAdd(this.customerList)
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ // this.customerList.id = response
|
|
|
|
+ // customerIdentity(this.customerList)
|
|
|
|
+ // .toPromise()
|
|
|
|
+ // .then((response) => {
|
|
|
|
+ // this.$message.success('添加成功')
|
|
|
|
+ // this.$router.push({ path: 'customerManagement' })
|
|
|
|
+ // })
|
|
|
|
+ this.$router.go(-1)
|
|
|
|
+ })
|
|
})
|
|
})
|
|
- })
|
|
|
|
- .catch(() => {
|
|
|
|
- return false
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ .catch(() => {
|
|
|
|
+ return false
|
|
|
|
+ })
|
|
|
|
+ } else if (this.switchType == 3) {
|
|
|
|
+ this.$confirm('确定修改客户信息?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ CustomerEdit(this.customerList)
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.$message.success('修改成功')
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: 'customerManagement'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ return false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
getList(ids) {
|
|
getList(ids) {
|
|
getCustomerLook({
|
|
getCustomerLook({
|
|
@@ -415,10 +401,10 @@
|
|
this.bank = this.customerList.payeeAddressUrl.split(',')
|
|
this.bank = this.customerList.payeeAddressUrl.split(',')
|
|
// this.bankImgUp[0].url = this.bank[0]
|
|
// this.bankImgUp[0].url = this.bank[0]
|
|
// this.bankImgLow[0].url = this.bank[1]
|
|
// this.bankImgLow[0].url = this.bank[1]
|
|
- this.imageUrl1=this.identity[0]
|
|
|
|
- this.imageUrl2=this.identity[1]
|
|
|
|
- this.imageUrl3=this.bank[0]
|
|
|
|
- this.imageUrl4=this.bank[1]
|
|
|
|
|
|
+ this.imageUrl1 = this.identity[0]
|
|
|
|
+ this.imageUrl2 = this.identity[1]
|
|
|
|
+ this.imageUrl3 = this.bank[0]
|
|
|
|
+ this.imageUrl4 = this.bank[1]
|
|
})
|
|
})
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -440,9 +426,11 @@
|
|
.avatar-uploader4 {
|
|
.avatar-uploader4 {
|
|
background: url('../../../public/img/banklow.png');
|
|
background: url('../../../public/img/banklow.png');
|
|
}
|
|
}
|
|
-/deep/.el-upload{
|
|
|
|
- height: 200px;
|
|
|
|
-}
|
|
|
|
|
|
+
|
|
|
|
+ /deep/.el-upload {
|
|
|
|
+ height: 200px;
|
|
|
|
+ }
|
|
|
|
+
|
|
.avatar-uploader {
|
|
.avatar-uploader {
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
}
|
|
}
|
|
@@ -469,8 +457,8 @@
|
|
}
|
|
}
|
|
|
|
|
|
.avatar {
|
|
.avatar {
|
|
- width: 330px;
|
|
|
|
- height: 103%;
|
|
|
|
|
|
+ width: 330px;
|
|
|
|
+ height: 103%;
|
|
display: block;
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -570,4 +558,8 @@
|
|
.unload-img {
|
|
.unload-img {
|
|
margin: 20px 0;
|
|
margin: 20px 0;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ .veriCode {
|
|
|
|
+ margin-right: 20px;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|