From fa7e1930e0a2d2c8d426237f7cb03aad8138261c Mon Sep 17 00:00:00 2001 From: nidapeng <jp@doumee.com> Date: 星期二, 02 四月 2024 18:05:27 +0800 Subject: [PATCH] 提交一把 --- company/src/components/business/OperaApplyChangeDetailWindow.vue | 119 ++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 97 insertions(+), 22 deletions(-) diff --git a/company/src/components/business/OperaApplyChangeDetailWindow.vue b/company/src/components/business/OperaApplyChangeDetailWindow.vue index 74f831a..ed15eb5 100644 --- a/company/src/components/business/OperaApplyChangeDetailWindow.vue +++ b/company/src/components/business/OperaApplyChangeDetailWindow.vue @@ -14,6 +14,7 @@ <span v-if="model.status === 0">淇濆崟鐘舵�侊細<span :class="'change-status'+model.status" >寰呯缃�</span></span> <span v-if="model.status === 1">淇濆崟鐘舵�侊細<span :class="'change-status'+model.status" >寰呭鏍�</span></span> <span v-if="model.status === 2">淇濆崟鐘舵�侊細<span :class="'change-status'+model.status" >宸茬敓鏁�</span></span> + <span v-if="model.status === 9">淇濆崟鐘舵�侊細<span :class="'change-status'+model.status" >寰呭嚭鍗�</span></span> <span v-if="model.status === 3 || model.status === 4">淇濆崟鐘舵�侊細<span :class="'change-status'+model.status" >閫�鍥炵敵璇�</span></span> <span v-if="model.status === 5 || model.status === 8">淇濆崟鐘舵�侊細<span :class="'change-status'+model.status" >宸查��鍥�</span></span> <span v-if="model.status === 7 || model.status === 6">淇濆崟鐘舵�侊細<span :class="'change-status'+model.status" >宸插叧闂�</span></span> @@ -23,11 +24,11 @@ <template v-if="userInfo.type === 1"> <el-button type="primary" @click="$refs.ApplyChangeDetails.open('鍔犲噺淇濊鍗�',apply,model)">瀵煎嚭璇﹀崟</el-button> <el-button v-if="[5, 8].includes(model.status)" type="primary" @click="$refs.reinsurance.open('鍔犲噺淇濈敵璇�', {id: dataId, applyChangId: modelId})">鍐嶆鎶曚繚</el-button> - <el-button type="primary" v-if="model.status == 0" @click="$refs.operaverifyPhoneNumberWindew.open('楠岃瘉鎵嬫満鍙�')">绛剧讲鐢宠鍗�</el-button> - <el-button v-if="[0, 1, 3, 7].includes(model.status)" type="danger" @click="$refs.add_subtract_return.open('鐢宠閫�鍥�', { id: modelId })">鐢宠閫�鍥�</el-button> - <el-button v-if="model.status == 5" type="primary" @click="viewApplyFile">鏌ョ湅鐢宠鍗�</el-button> + <el-button type="primary" v-if="model.status == 0" @click="getSignLink(0)">绛剧讲鐢宠鍗�</el-button> + <el-button v-if="[0, 1, 3, 7].includes(model.status) && model.solutionType == 0" type="danger" @click="$refs.add_subtract_return.open('鐢宠閫�鍥�', { id: modelId })">鐢宠閫�鍥�</el-button> + <el-button v-if="[1,2,9].includes(model.status)" type="primary" @click="viewApplyFile">鏌ョ湅鐢宠鍗�</el-button> <el-button v-if="model.status == 2" type="primary" @click="viewPidan">鏌ョ湅鎵瑰崟</el-button> - <el-button v-if="[5, 8].includes(model.status)" type="primary" @click="closeOrder">鍏抽棴璁㈠崟</el-button> + <el-button v-if="[5,8].includes(model.status)" type="primary" @click="closeOrder">鍏抽棴璁㈠崟</el-button> </template> <template v-else> <el-button type="primary" @click="$refs.ApplyChangeDetails.open('鍔犲噺淇濊鍗�',apply,model)">瀵煎嚭璇﹀崟</el-button> @@ -192,8 +193,32 @@ <factoryChange ref="factoryChange" @success="successEvent" /> <!-- 鎶曚繚璇︽儏 --> <insuranceApplyDetails ref="insuranceApplyDetails" @success="successEvent" /> - <!-- 楠岃瘉鎵嬫満鍙� --> - <operaverifyPhoneNumberWindew ref="operaverifyPhoneNumberWindew" @success="goSign" /> + <!-- 淇敼鎵嬫満鍙� --> + <el-dialog + :title="signTitle" + :visible.sync="visiblePhone" + width="500px" + :modal="false" + :show-close="false" + :close-on-click-modal="false" + center> + <el-form :model="form" ref="form" :rules="rules"> + <el-form-item label="鎵嬫満鍙�" prop="phone"> + <el-input v-model="form.phone" placeholder="璇疯緭鍏�" disabled v-trim/> + </el-form-item> + <el-form-item label="楠岃瘉鐮�" prop="code"> + <div style="width: 100%; display: flex; align-items: center;"> + <el-input v-model="form.code" placeholder="璇疯緭鍏�" v-trim/> + <el-button type="primary" style="margin-left: 15px;" @click="send" v-if="num === 0">鍙戦�侀獙璇佺爜</el-button> + <el-button type="primary" style="margin-left: 15px;" v-else>{{num}}s</el-button> + </div> + </el-form-item> + </el-form> + <span slot="footer" class="dialog-footer"> + <el-button type="primary" @click="goSignDo()">纭� 瀹�</el-button> + <el-button @click="visiblePhone=false">鍙� 娑�</el-button> + </span> + </el-dialog> <template v-slot:footer> <el-button @click="visible=false">杩斿洖</el-button> </template> @@ -209,16 +234,16 @@ import reinsurance from '@/components/enterprise/reinsurance' import factoryChange from '@/components/enterprise/factoryChange' import add_subtract_return from '@/components/enterprise/add_subtract_return' -// import insuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow' import { getDetail, getChangeDetail, - applyChagneDetailPage, - getJiajianBaoSignLink + applyChagneDetailPage } from '@/api/business/insuranceApply' -import { applyChangeOpt } from '@/api/business/applyChange' +import { applyChangeOpt , + getChangeMemberListOnlineSignLink} from '@/api/business/applyChange' + +import {sendSms} from "@/api/business/smsEmail"; import OperaInsuranceApply from '@/components/enterprise/OperaInsuranceApplyWindow' -import operaverifyPhoneNumberWindew from '@/components/business/operaverifyPhoneNumberWindew' import { mapState } from 'vuex' export default { @@ -232,7 +257,6 @@ OperaInsuranceApply, reinsurance, factoryChange, - operaverifyPhoneNumberWindew, insuranceApplyDetails: () => import ('@/components/business/OperaInsuranceApplyWindow') }, data () { @@ -241,10 +265,17 @@ dataId:null, modelId:null, apply:{}, + num: 0, + timer: null, + signTitle: '鎵嬫満鍙烽獙璇�', model: {}, + visiblePhone: false, form: { + businessId: null, + phone: this.$store.state.userInfo.company.phone, id: null, - editDate: '' + editDate: '', + code:null }, // 楠岃瘉瑙勫垯 rules: { @@ -281,9 +312,62 @@ this.title = title this.dataId = target.applyId this.modelId = target.id + this.form.businessId = target.id + this.num=0 + this.timer=null this.getDetail() this.getList() }, + send () { + sendSms({ + phone: this.form.phone + }).then(res => { + this.num = 60 + this.setTime() + }) + }, + setTime () { + this.timer = setInterval(() => { + if (this.num === 0) { + clearInterval(this.timer) + this.timer = null + return + } + this.num = this.num - 1 + }, 1000) + }, + getSignLink (flag) { + if (flag === 0) { + this.signTitle = '绛剧讲鏂规纭涔�' + } else if (flag === 1) { + this.signTitle = '绛剧讲鐢宠鍗�' + } else if (flag === 2) { + this.signTitle = '绛剧讲鎶曚繚鍗�' + } + this.form.type = flag + this.visiblePhone = true + this.$nextTick(() => { + this.$refs.form.resetFields() + }); + }, + goSignDo(){ + this.$refs.form.validate((valid) => { + if (!valid) { + return + } + this.isWorking = true + if(this.form.type===0){ + getChangeMemberListOnlineSignLink(this.form).then(res => { + setTimeout(() => { + this.visiblePhone=false + window.open(res) + }, 500) + }).catch(err => { + this.$tip.apiFailed(err) + }) + } + }) + }, resetting() { this.search() }, @@ -326,15 +410,6 @@ this.activeName = e.index this.resetting() }, - goSign(){ - getJiajianBaoSignLink({id:this.modelId}).then(res => { - setTimeout(() => { - window.open(res) - }, 500); - }).catch(err => { - this.$tip.apiFailed(err) - }) - }, viewApplyFile(){ if(this.model.applyFile && this.model.applyFile.fileurlFull){ window.open(this.model.applyFile.fileurlFull) -- Gitblit v1.9.3