Commit ea33030b authored by caixingbing's avatar caixingbing

*

parent 9cf622f0
...@@ -8,3 +8,12 @@ export const idRemark = (data) => { ...@@ -8,3 +8,12 @@ export const idRemark = (data) => {
data: data data: data
}) })
} }
// 认领用户
export const claim= function claim(param) {
return request({
url: '/customer/claim',
method: 'post',
data: param
})
}
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</div> </div>
</div> </div>
<div class="company-menu"> <div class="company-menu">
<el-button @click="handleClaim" v-if="ifClaim" class="hasClaim" v-loading="claimLoading"><i class="el-ico-claim" alt="已认领" title="已认领"></i> 已认领</el-button> <el-button @click="handleClaim" v-if="ifClaim==1" class="hasClaim" v-loading="claimLoading"><i class="el-ico-claim" alt="已认领" title="已认领"></i> 已认领</el-button>
<el-button @click="handleClaim" v-else class="claim" v-loading="claimLoading"><i class="el-ico-claim" alt="认领客户" title="认领客户"></i> 认领客户</el-button> <el-button @click="handleClaim" v-else class="claim" v-loading="claimLoading"><i class="el-ico-claim" alt="认领客户" title="认领客户"></i> 认领客户</el-button>
</div> </div>
...@@ -121,6 +121,19 @@ ...@@ -121,6 +121,19 @@
</div> </div>
<!-- 分条件:滚动与不滚动 --> <!-- 分条件:滚动与不滚动 -->
</div> </div>
<el-dialog
title=""
:visible.sync="dialogVisible"
:modal="false"
custom-class='dialog-renlin'
:show-close="false"
width="244px">
<span>认领成功,是否完善客户信息?</span>
<div slot="footer" class="dialog-footer">
<span class="dialog-footer-btn1" type="primary" @click="renlin()">立即完善</span>
<span class="dialog-footer-btn2" @click="renHide()">稍后</span>
</div>
</el-dialog>
</div> </div>
</template> </template>
...@@ -128,6 +141,7 @@ ...@@ -128,6 +141,7 @@
import { changePath } from '@/assets/js/common' import { changePath } from '@/assets/js/common'
var Swiper = require('@/assets/lib/swiper/swiper-bundle.min.js') var Swiper = require('@/assets/lib/swiper/swiper-bundle.min.js')
import "@/assets/lib/swiper/swiper-bundle.css" import "@/assets/lib/swiper/swiper-bundle.css"
import { claim } from "@/api/common"
export default { export default {
name: 'Infoheader', name: 'Infoheader',
props: ['companyId', 'companyInfo', 'statistic'], props: ['companyId', 'companyInfo', 'statistic'],
...@@ -136,7 +150,7 @@ export default { ...@@ -136,7 +150,7 @@ export default {
newStatic: null, newStatic: null,
labelList: [], //企业标签 labelList: [], //企业标签
claimLoading: false, claimLoading: false,
ifClaim: false, //是否认领 ifClaim: 0, //是否认领
showMore: false, showMore: false,
showState: false, showState: false,
graphList: [ graphList: [
...@@ -151,6 +165,7 @@ export default { ...@@ -151,6 +165,7 @@ export default {
//风险扫描 //风险扫描
labelArr:['失信联合惩戒企业','司法纠纷','注销'], //负向经营状态 labelArr:['失信联合惩戒企业','司法纠纷','注销'], //负向经营状态
enterpriseLabel:[],//企业标签 enterpriseLabel:[],//企业标签
dialogVisible: false
} }
}, },
created() { created() {
...@@ -163,16 +178,18 @@ export default { ...@@ -163,16 +178,18 @@ export default {
methods: { methods: {
//认领 //认领
async handleClaim(){ async handleClaim(){
let _this = this if(this.companyInfo.uipId){
_this.claimLoading = true this.claimLoading = true
setTimeout(function (){ let param = {companyId:this.companyId, uipId:this.companyInfo.uipId, companyName:this.companyInfo.companyName}
_this.claimLoading = false let res = await claim(param)
_this.$confirm(`认领成功,是否完善客户信息`, '提示', { this.tableLoading = false
type: 'warning' if(res.code==200){
}).then(async () => { this.dialogVisible=true
console.log('操作跳转!') this.ifClaim = true
}) }
}, 1000) }else{
this.$message.warning('对不起,当前不能认领')
}
}, },
companySwiper(){ companySwiper(){
new Swiper('.swiper-info', { new Swiper('.swiper-info', {
...@@ -208,8 +225,8 @@ export default { ...@@ -208,8 +225,8 @@ export default {
this.companySwiper() //swiper滚动板块 this.companySwiper() //swiper滚动板块
}, },
//获取认领状态 //获取认领状态
async getClaimStatus(){ getClaimStatus(){
this.ifClaim = false this.ifClaim = this.companyInfo.regCapital
}, },
handleWidth(){ handleWidth(){
if(this.companyInfo.introduction){ if(this.companyInfo.introduction){
...@@ -261,6 +278,14 @@ export default { ...@@ -261,6 +278,14 @@ export default {
if(it.id==302 && it.val){ if(it.id==302 && it.val){
changePath(this, 'administrative') changePath(this, 'administrative')
} }
},
renlin(){
this.dialogVisible=false;
// this.$router.push({path:'/home',query: {id:'1'}})
// 跳转地址
},
renHide(){
this.dialogVisible=false;
} }
}, },
watch: { watch: {
...@@ -619,4 +644,47 @@ export default { ...@@ -619,4 +644,47 @@ export default {
margin-left: 4px; margin-left: 4px;
} }
} }
::v-deep .dialog-renlin{
margin-top:40vh !important;
.el-dialog__body{
padding: 0;
text-align: center;
padding-bottom: 24px;
}
.el-dialog__footer{
padding: 0px;
padding-bottom: 24px;
.dialog-footer{
display: inline-flex;
align-items: center;
justify-content: center;
width: 100%;
.dialog-footer-btn1{
cursor: pointer;
width: 72px;
height: 28px;
background: #0081FF;
border-radius: 2px 2px 2px 2px;
font-size: 12px;
font-weight: 400;
color: #FFFFFF;
line-height: 28px;
text-align: center;
margin-right: 8px;
}
.dialog-footer-btn2{
cursor: pointer;
width: 72px;
height: 28px;
border-radius: 2px 2px 2px 2px;
border: 1px solid #CCCCCC;
line-height: 28px;
text-align: center;
font-size: 12px;
font-weight: 400;
color: rgba(35,35,35,0.8);
}
}
}
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment