Commit 72a21e08 authored by danfuman's avatar danfuman

修改

parent 5c30560f
......@@ -59,6 +59,22 @@ let cancelClaim= function cancelClaim(data) {
// data: data
})
}
// 历史认领用户
let historyClaim= function historyClaim(data) {
return request({
url: '/customer/historyClaim/'+data,
method: 'put',
// data: data
})
}
// 客户状态
let customerStatus= function customerStatus(data) {
return request({
url: '/customer/status/'+data,
method: 'get',
// data: data
})
}
// 查建筑企业
let enterprisePage= function enterprisePage(param) {
......@@ -80,4 +96,4 @@ let infoHeader= function infoHeader(param) {
export default {aptitudeCode,personCert,searchDic,regionWebList,uipGroupData,uipSerach,claim,cancelClaim,enterprisePage,infoHeader}
\ No newline at end of file
export default {aptitudeCode,personCert,searchDic,regionWebList,uipGroupData,uipSerach,claim,cancelClaim,enterprisePage,infoHeader,historyClaim,customerStatus}
......@@ -134,6 +134,13 @@
<span class="dialog-footer-btn2" @click="renHide()">稍后</span>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible2" custom-class='dialog-renlin' title="重新认领" width="260px" :show-close="false">
<div>再次认领将会恢复客户数据</div>
<div slot="footer" class="dialog-footer">
<span class="dialog-footer-btn1" type="primary" @click="handleHistoryClaim()">确认</span>
<span class="dialog-footer-btn2" @click="dialogVisible2 = false">关闭</span>
</div>
</el-dialog>
<el-dialog
title="取消认领"
:visible.sync="dialogVisible1"
......@@ -185,6 +192,7 @@ export default {
enterpriseLabel:[],//企业标签
dialogVisible: false,
dialogVisible1: false,
dialogVisible2: false,
}
},
created() {
......@@ -211,12 +219,18 @@ export default {
registerAddress:this.companyInfo.provinceName+(this.companyInfo.cityName?'-'+this.companyInfo.cityName:'')+(this.companyInfo.districtName?'-'+this.companyInfo.districtName:''),
creditCode:this.companyInfo.creditCode
}
let res = await claim(param)
this.claimLoading = false
if(res.code==200){
this.dialogVisible=true
this.companyInfo.claimStatus = 1
this.customerId = res.data.customerId
let res = await api.customerStatus(this.companyInfo.companyName)
if(res.data === 1){
this.claimLoading = false
this.dialogVisible2=true;
}else{
let res = await claim(param)
this.claimLoading = false
if(res.code==200){
this.dialogVisible=true
this.companyInfo.claimStatus = 1
this.customerId = res.data.customerId
}
}
}else{
this.$message.warning('对不起,当前不能认领')
......@@ -226,6 +240,16 @@ export default {
cancelClaimClick(){
this.dialogVisible1 = true;
},
async handleHistoryClaim(){
let res = await api.historyClaim(this.companyInfo.companyName)
if(res.code==200){
this.dialogVisible2 = false;
this.companyInfo.claimStatus = 1
}else{
this.$message.error(res.msg)
}
},
async confirm(){
let res = await api.cancelClaim(this.companyInfo.companyName)
if(res.code==200){
......@@ -235,7 +259,7 @@ export default {
this.$message.error(res.msg)
}
// api.cancelClaim(this.companyInfo.companyName).then(res=>{
// })
},
companySwiper(){
......@@ -329,9 +353,9 @@ export default {
renlin(){
this.dialogVisible=false;
// window.location.href = window.location.origin+window.location.pathname+'?customerId='+this.customerId+'&path=business'
this.$router.replace({
this.$router.replace({
path: '/enterprise/'+encodeStr(this.companyId),
query: {
query: {
'customerId': this.customerId,
'path':'business'
} ,
......@@ -711,6 +735,12 @@ export default {
text-align: center;
padding-bottom: 24px;
}
.el-dialog__header{
text-align: center;
.el-dialog__title{
font-size: 16px;
}
}
.el-dialog__footer{
padding: 0px;
padding-bottom: 24px;
......
......@@ -34,8 +34,8 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `http://47.104.91.229:9099/prod-api`,
target: `http://122.9.160.122:9011`,
target: `http://47.104.91.229:9099/prod-api`,
// target: `http://122.9.160.122:9011`,
// target: `http://192.168.60.126:9011`,
// target: `http://192.168.60.27:8766`,
changeOrigin: true,
......
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