@@ -83,7 +83,7 @@ | |||||
<view class="img" v-else-if="item.level==4">D</view> | <view class="img" v-else-if="item.level==4">D</view> | ||||
<view class="name">{{item.agentName || '--'}}</view> | <view class="name">{{item.agentName || '--'}}</view> | ||||
<view class="status" v-if="item.replace==1">代接待</view> | |||||
<view class="status" v-if="item.replaceReception==1">代接待</view> | |||||
</view> | </view> | ||||
<!-- <view class="right"> | <!-- <view class="right"> | ||||
<view class="point"></view> | <view class="point"></view> | ||||
@@ -43,7 +43,7 @@ | |||||
<view class="left"> | <view class="left"> | ||||
<!-- <view class="img">{{item.agentName.slice(0,1)}}</view> --> | <!-- <view class="img">{{item.agentName.slice(0,1)}}</view> --> | ||||
<view class="name">{{item.agentName}}</view> | <view class="name">{{item.agentName}}</view> | ||||
<view class="status" v-if="item.replace==1">代接待</view> | |||||
<view class="status" v-if="item.replaceReception==1">代接待</view> | |||||
</view> | </view> | ||||
<!-- <view class="right"> | <!-- <view class="right"> | ||||
<view class="point"></view> | <view class="point"></view> | ||||
@@ -11,7 +11,7 @@ | |||||
<view class="left"> | <view class="left"> | ||||
<!-- <view class="img">{{item.agentName.slice(0,1)}}</view> --> | <!-- <view class="img">{{item.agentName.slice(0,1)}}</view> --> | ||||
<view class="name">{{item.agentName}}</view> | <view class="name">{{item.agentName}}</view> | ||||
<view class="status" v-if="item.replace==1">代接待</view> | |||||
<view class="status" v-if="item.replaceReception==1">代接待</view> | |||||
</view> | </view> | ||||
<!-- <view class="right"> | <!-- <view class="right"> | ||||
<view class="point"></view> | <view class="point"></view> | ||||
@@ -46,7 +46,7 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<image v-if="isAdd == 0&&(dataCode!=6||(dataCode==6&&addAccount==0))" @click="addreception()" class="add" src="/static/images/add.png" mode=""></image> | |||||
<image v-if="isAdd == 0 && (dataCode!=6||(dataCode==6&&addAccount==0))" @click="addreception()" class="add" src="/static/images/add.png" mode=""></image> | |||||
<image class="add2" @click="reshCustom()" src="https://static.quhouse.com/zhikong_xcx_img/refresh.png" mode=""></image> | <image class="add2" @click="reshCustom()" src="https://static.quhouse.com/zhikong_xcx_img/refresh.png" mode=""></image> | ||||
</view> | </view> | ||||
</template> | </template> | ||||
@@ -58,7 +58,8 @@ | |||||
buildingID:'', | buildingID:'', | ||||
waitCustomList:[], | waitCustomList:[], | ||||
isAdd:'', | isAdd:'', | ||||
dataCode:'' | |||||
dataCode:'', | |||||
addAccount:'', | |||||
}; | }; | ||||
}, | }, | ||||
components: {}, | components: {}, | ||||
@@ -69,8 +70,8 @@ | |||||
addAccount, | addAccount, | ||||
dataCode | dataCode | ||||
} = uni.getStorageSync("weapp_session_userInfo_data"); | } = uni.getStorageSync("weapp_session_userInfo_data"); | ||||
this.addAccount=addAccount | |||||
this.dataCode=dataCode | |||||
this.addAccount=addAccount; | |||||
this.dataCode=dataCode; | |||||
this.init() | this.init() | ||||
this.queryHaveDept() | this.queryHaveDept() | ||||
}, | }, | ||||
@@ -118,6 +119,12 @@ | |||||
return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
this.$u.get("/user/queryHaveDept?houseId="+this.buildingID).then(res => { | this.$u.get("/user/queryHaveDept?houseId="+this.buildingID).then(res => { | ||||
this.isAdd=res; | this.isAdd=res; | ||||
// if(this.isAdd == 0 && (this.dataCode!=6||(dataCode==6&&addAccount==0))){ | |||||
// } | |||||
resolve(); | resolve(); | ||||
}) | }) | ||||
}) | }) | ||||
@@ -187,7 +194,7 @@ | |||||
} | } | ||||
if(this.waitCustomList.length==0){ | if(this.waitCustomList.length==0){ | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: "/pages/customer/add/add" | |||||
url: '/pages/mine/reception/addreception' | |||||
}) | }) | ||||
return | return | ||||
}else{ | }else{ | ||||
@@ -202,7 +209,7 @@ | |||||
return | return | ||||
}else{ | }else{ | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: "/pages/customer/add/add" | |||||
url: '/pages/mine/reception/addreception' | |||||
}) | }) | ||||
return | return | ||||
} | } | ||||
@@ -69,13 +69,12 @@ | |||||
<view v-if="Showhid"> | <view v-if="Showhid"> | ||||
<u-select :mask-close-able="false" v-model="Showhid" mode="single-column" :list="freeList" @cancel="cancel1" @confirm="confirm1"></u-select> | <u-select :mask-close-able="false" v-model="Showhid" mode="single-column" :list="freeList" @cancel="cancel1" @confirm="confirm1"></u-select> | ||||
</view> | </view> | ||||
<u-modal v-model="show" :title="'代接待提醒'" :confirm-text="confirmtext" :cancel-text='canceltext' @cancel="confirmA" @confirm="confirmB" :show-cancel-button='true' :content="content"></u-modal> | |||||
<u-modal v-model="show" :mask-close-able="true" :title="'代接待提醒'" :confirm-text="confirmtext" :cancel-text='canceltext' @cancel="confirmA" @confirm="confirmB" :show-cancel-button='true' :content="content"></u-modal> | |||||
</view> | </view> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
var app = getApp(); | var app = getApp(); | ||||
var util = require("../../../utils/util.js"); | |||||
var config = require("../../../config"); | var config = require("../../../config"); | ||||
export default { | export default { | ||||
@@ -95,7 +94,8 @@ | |||||
sourceName: null, | sourceName: null, | ||||
howMany: 1, | howMany: 1, | ||||
agentId:null, | agentId:null, | ||||
projectId:'' | |||||
projectId:'', | |||||
replaceReception:0 | |||||
}, | }, | ||||
shifoinfo:0, | shifoinfo:0, | ||||
freeList:[], | freeList:[], | ||||
@@ -105,6 +105,7 @@ | |||||
content: '东临碣石,以观沧海', | content: '东临碣石,以观沧海', | ||||
confirmtext:'1',//确认文字 | confirmtext:'1',//确认文字 | ||||
canceltext:'2',//取消文字 | canceltext:'2',//取消文字 | ||||
daitiReceptionobj:{} | |||||
}; | }; | ||||
}, | }, | ||||
onShow: function() { | onShow: function() { | ||||
@@ -115,11 +116,22 @@ | |||||
methods: { | methods: { | ||||
//取消 | //取消 | ||||
confirmA(){ | confirmA(){ | ||||
console.log("1") | |||||
if(this.daitiReceptionobj.assign!=null){ | |||||
this.parames.agentId=this.daitiReceptionobj.assign.accountId; | |||||
this.baochunfun() | |||||
}else{ | |||||
uni.showToast({ | |||||
icon: "none", | |||||
title: "【"+this.daitiReceptionobj.owner.name+"】正在接待中" | |||||
}) | |||||
return; | |||||
} | |||||
}, | }, | ||||
// 确认 | // 确认 | ||||
confirmB(){ | confirmB(){ | ||||
console.log("2") | |||||
this.parames.agentId=this.daitiReceptionobj.replacement.accountId; | |||||
this.parames.replaceReception=1; | |||||
this.baochunfun() | |||||
}, | }, | ||||
save() { | save() { | ||||
if (this.parames.name.length==0) { | if (this.parames.name.length==0) { | ||||
@@ -146,15 +158,26 @@ | |||||
that.baochunfun() | that.baochunfun() | ||||
}else{ | }else{ | ||||
if(res.zs==0){ | if(res.zs==0){ | ||||
that.parames.agentId=res.owner.accountId; | |||||
that.parames.agentId=res.assign.accountId; | |||||
that.baochunfun() | that.baochunfun() | ||||
}else{ | }else{ | ||||
if(res.owner==null&&res.replacement==null){ | |||||
if(res.assign==null&&res.replacement==null){ | |||||
that.baochunfun() | that.baochunfun() | ||||
}else{ | }else{ | ||||
if(res.assign==null){ | |||||
that.daitiReceptionobj=res; | |||||
that.content="此客户的顾问为【"+ res.owner.name +"】,确认让【"+ res.replacement.name +"】代接待吗?" | |||||
that.confirmtext=res.replacement.name +"代接代",//确认文字 | |||||
that.canceltext=res.owner.name +'接待',//取消文字 | |||||
that.show=true; | |||||
}else{ | |||||
that.daitiReceptionobj=res; | |||||
that.content="此客户的顾问为【"+ res.owner.name +"】,确认让【"+ res.replacement.name +"】代接待吗?" | |||||
that.confirmtext=res.replacement.name +"代接代",//确认文字 | |||||
that.canceltext=res.assign.name +'接待',//取消文字 | |||||
that.show=true; | |||||
} | |||||
} | } | ||||
// that.content=res | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
@@ -163,6 +186,9 @@ | |||||
const { | const { | ||||
dataCode | dataCode | ||||
} = uni.getStorageSync("weapp_session_userInfo_data"); | } = uni.getStorageSync("weapp_session_userInfo_data"); | ||||
if(this.parames.phone.length==0){ | |||||
this.parames.phone=null | |||||
} | |||||
uni.showLoading({ | uni.showLoading({ | ||||
title: "保存中", | title: "保存中", | ||||
mask: true | mask: true | ||||
@@ -36,7 +36,8 @@ | |||||
<view class="save" @click="save" :class="{active:chosedAgentId}"> | <view class="save" @click="save" :class="{active:chosedAgentId}"> | ||||
保存 | 保存 | ||||
</view> | </view> | ||||
<u-modal v-model="show" :confirm-text="confirmtext" :cancel-text='canceltext' @cancel="confirmA" @confirm="confirmB" :show-cancel-button='true' :content="content"></u-modal> | |||||
<u-modal v-model="show" :mask-close-able="true" :title="'代接待提醒'" :confirm-text="confirmtext" :cancel-text='canceltext' @cancel="confirmA" @confirm="confirmB" :show-cancel-button='true' :content="content"></u-modal> | |||||
</view> | </view> | ||||
</template> | </template> | ||||
@@ -54,6 +55,8 @@ | |||||
content: '东临碣石,以观沧海', | content: '东临碣石,以观沧海', | ||||
confirmtext:'1',//确认文字 | confirmtext:'1',//确认文字 | ||||
canceltext:'2',//取消文字 | canceltext:'2',//取消文字 | ||||
daitiReceptionobj:{}, | |||||
replaceReception:0 | |||||
} | } | ||||
}, | }, | ||||
onLoad(option) { | onLoad(option) { | ||||
@@ -64,28 +67,23 @@ | |||||
this.getFreeList(); | this.getFreeList(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
//取消 | |||||
confirmA(){ | |||||
console.log("1") | |||||
}, | |||||
// 确认 | |||||
confirmB(){ | |||||
console.log("2") | |||||
}, | |||||
getFreeList() { | |||||
this.$u.get("/zkAgentPool/freeList?itemId=" + this.buildingID).then(res => { | |||||
if (res.length == 0) { | |||||
this.freeList = [] | |||||
} else { | |||||
this.freeList = res; | |||||
this.textcdhSKJ = res[0].name | |||||
} | |||||
//取消 | |||||
confirmA(){ | |||||
if(this.daitiReceptionobj.assign!=null){ | |||||
this.baochunfun() | |||||
}else{ | |||||
uni.showToast({ | |||||
icon: "none", | |||||
title: "【"+this.daitiReceptionobj.owner.name+"】正在接待中" | |||||
}) | }) | ||||
}, | |||||
radioChange: function(evt) { | |||||
this.chosedAgentId = ''; | |||||
this.chosedAgentId = evt.detail.value; | |||||
}, | |||||
return; | |||||
} | |||||
}, | |||||
// 确认 | |||||
confirmB(){ | |||||
this.replaceReception=1; | |||||
this.baochunfun() | |||||
}, | |||||
save() { | save() { | ||||
console.log(this.chosedAgentId) | console.log(this.chosedAgentId) | ||||
if (!this.chosedAgentId) { | if (!this.chosedAgentId) { | ||||
@@ -95,6 +93,39 @@ | |||||
}) | }) | ||||
return | return | ||||
} | } | ||||
const that = this; | |||||
this.$u.post("customer/daitiReception", { | |||||
agentId: that.chosedAgentId, | |||||
id: that.customerId | |||||
}).then(res => { | |||||
if(res.unchecked==0){ | |||||
that.baochunfun() | |||||
}else{ | |||||
if(res.zs==0){ | |||||
that.baochunfun() | |||||
}else{ | |||||
if(res.assign==null&&res.replacement==null){ | |||||
that.baochunfun() | |||||
}else{ | |||||
if(res.assign==null){ | |||||
that.daitiReceptionobj=res; | |||||
that.content="此客户的顾问为【"+ res.owner.name +"】,确认让【"+ res.replacement.name +"】代接待吗?" | |||||
that.confirmtext=res.replacement.name +"代接代",//确认文字 | |||||
that.canceltext=res.owner.name +'接待',//取消文字 | |||||
that.show=true; | |||||
}else{ | |||||
that.daitiReceptionobj=res; | |||||
that.content="此客户的顾问为【"+ res.owner.name +"】,确认让【"+ res.replacement.name +"】代接待吗?" | |||||
that.confirmtext=res.replacement.name +"代接代",//确认文字 | |||||
that.canceltext=res.assign.name +'接待',//取消文字 | |||||
that.show=true; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}); | |||||
}, | |||||
baochunfun(){ | |||||
uni.showLoading({ | uni.showLoading({ | ||||
title: "保存中", | title: "保存中", | ||||
mask: true | mask: true | ||||
@@ -111,7 +142,21 @@ | |||||
uni.navigateBack(); | uni.navigateBack(); | ||||
uni.hideLoading(); | uni.hideLoading(); | ||||
}); | }); | ||||
} | |||||
}, | |||||
getFreeList() { | |||||
this.$u.get("/zkAgentPool/freeList?itemId=" + this.buildingID).then(res => { | |||||
if (res.length == 0) { | |||||
this.freeList = [] | |||||
} else { | |||||
this.freeList = res; | |||||
this.textcdhSKJ = res[0].name | |||||
} | |||||
}) | |||||
}, | |||||
radioChange: function(evt) { | |||||
this.chosedAgentId = ''; | |||||
this.chosedAgentId = evt.detail.value; | |||||
}, | |||||
} | } | ||||
} | } | ||||
</script> | </script> | ||||