diff --git a/src/views/bl/commission/fxy/fxyApply.vue b/src/views/bl/commission/fxy/fxyApply.vue index 9b358bc..7978396 100644 --- a/src/views/bl/commission/fxy/fxyApply.vue +++ b/src/views/bl/commission/fxy/fxyApply.vue @@ -168,7 +168,7 @@ @click="handleApply(scope.row)" >授权 - 授权 - { diff --git a/src/views/bl/commission/ywy/ywyApply.vue b/src/views/bl/commission/ywy/ywyApply.vue index d77688c..8110bce 100644 --- a/src/views/bl/commission/ywy/ywyApply.vue +++ b/src/views/bl/commission/ywy/ywyApply.vue @@ -70,17 +70,15 @@ prop="id" label="编号" width="80" - fixed="left" > - + @@ -438,6 +728,7 @@ export default { userName: "", name: "", phone: "", + userPhone: "", remarks: "", status: "", opinion: "", @@ -445,14 +736,31 @@ export default { endTime: "", page: 1, limit: 10, + rate: "", dialogFormVisible: false, + dialogFormViewVisible: false, dialogApproveFormVisible: false, dialogUserListFormVisible: false, userTableDataLoading: false, + dialogFormVisibleRate: false, userPage: 1, userLimit: 10, userTableData:{}, invitationCode: "", + dialogQdsVisible: false, + dialogAddQdsVisible: false, + qdsTableDataLoading: false, + qdsTableData:{}, + qdsName: "", + qdsPhone: "", + qdsPage: 1, + qdsLimit: 10, + qdsAddTableData:{}, + qdsAddName: "", + qdsAddPhone: "", + qdsAddPage: 1, + qdsAddLimit: 10, + dialogDlsVisible: false, }; }, methods: { @@ -512,7 +820,19 @@ export default { this.page = val; this.handleSelect(); }, - + handleView(row){ + this.titles = "查看"; + this.id = row.id; + this.userId = row.userId; + this.name = row.name; + this.phone = row.phone; + this.avatar = row.avatar; + this.userName = row.userName; + this.remarks = row.remarks; + this.status = row.status; + this.opinion = row.opinion; + this.dialogFormViewVisible = true; + }, handleApply(row) { this.titles = "审批"; this.id = row.id; @@ -554,7 +874,7 @@ export default { this.dialogFormVisible = true; }, - closeFxy(){ + closeYwy(){ this.handleClear(); }, @@ -634,7 +954,7 @@ export default { } }); }, - // 提交添加、修改服务包 + //授权 handleApprove() { if (this.status == "") { this.$notify({ @@ -663,6 +983,7 @@ export default { id: this.id, opinion: this.opinion, status: this.status, + userId: this.userId, }), }).then(({data}) => { if (data.code == 0) { @@ -687,7 +1008,41 @@ export default { } }); }, - + //取消授权 + handleCancelApply(row){ + let id = row.id; + let userId = row.userId; + this.$http({ + url: this.$http.adornUrl("commission/ywyApply/approve"), + method: "post", + params: this.$http.adornParams({ + id: id, + opinion: '系统取消授权', + status: 0, + userId: userId, + }), + }).then(({data}) => { + if (data.code == 0) { + this.clearDatas(); + this.$message({ + message: "取消成功", + type: "success", + duration: 1500, + onClose: () => { + this.handleSelect(); + }, + }); + } else { + this.$message({ + message: data.msg, + type: "warning", + duration: 1500, + onClose: () => { + }, + }); + } + }); + }, clearDatas(){ this.apiUrl=""; this.tableDataLoading= false; @@ -708,7 +1063,7 @@ export default { }, showUsersView(){ - this.handleSelectUsers(); + this.handleClearUsers(); this.dialogUserListFormVisible = true; }, handleSelectUsers(){ @@ -719,6 +1074,9 @@ export default { params: this.$http.adornParams({ userPage: this.userPage, userLimit: this.userLimit, + invitationCode: this.invitationCode, + userName: this.userName, + phone: this.userPhone }), }).then(({data}) => { if (data.code == 0) { @@ -750,7 +1108,7 @@ export default { // 重置 handleClearUsers() { this.userName = ""; - this.phone = ""; + this.userPhone = ""; this.invitationCode = ""; this.userPage = 1; this.userLimit = 10; @@ -763,6 +1121,206 @@ export default { this.userName = row.userName; this.dialogUserListFormVisible = false; }, + // 修改提成比例 + showUpdateRateView(row) { + this.id = row.id; + this.rate = row.rate; + this.dialogFormVisibleRate = true; + }, + // 修改提成比例 + updateRate() { + this.$http({ + url: this.$http.adornUrl("commission/ywyApply/updateRate"), + method: "post", + params: this.$http.adornParams({ + id: this.id, + rate: this.rate, + }), + }).then(({data}) => { + if (data.code == 0) { + this.$message({ + message: "修改成功", + type: "success", + duration: 1500, + onClose: () => { + this.handleSelect(); + }, + }); + this.dialogFormVisibleRate = false; + } else { + this.$message({ + message: data.msg, + type: "warning", + duration: 1500, + onClose: () => { + }, + }); + } + }); + }, + bindQdsView(row){ + this.invitationCode = row.invitationCode; + this.handleClearQds(); + this.dialogQdsVisible = true; + }, + //分页 + handleQdsSizeChange(val) { + this.qdsLimit = val; + this.handleSelectQds(); + }, + //翻页 + handleQdsCurrentChange(val) { + this.qdsPage = val; + this.handleSelectQds(); + }, + // 重置 + handleClearQds() { + this.qdsName = ""; + this.qdsPhone = ""; + this.qdsPage = 1; + this.qdsLimit = 10; + this.handleSelectQds(); + }, + handleSelectQds(){ + this.qdsTableDataLoading = true; + this.$http({ + url: this.$http.adornUrl("commission/ywyApply/invitationQdsPage"), + method: "get", + params: this.$http.adornParams({ + userPage: this.qdsPage, + userLimit: this.qdsLimit, + invitationCode: this.invitationCode, + userName: this.qdsName, + phone: this.qdsPhone + }), + }).then(({data}) => { + if (data.code == 0) { + this.qdsTableData = data.data; + } else { + this.$notify({ + title: "提示", + duration: 1800, + message: data.msg, + type: "warning", + }); + } + this.qdsTableDataLoading = false; + }); + }, + //取消邀请 + handleDeleteQds(row) { + let userId = row.userId; + this.$http({ + url: this.$http.adornUrl("commission/ywyApply/deleteQds"), + method: "post", + params: this.$http.adornParams({ + userId: userId, + }), + }).then(({data}) => { + if (data.code == 0) { + this.$message({ + message: "取消邀请成功", + type: "success", + duration: 1500, + onClose: () => { + this.handleSelectQds(); + }, + }); + } else { + this.$message({ + message: data.msg, + type: "warning", + duration: 1500, + onClose: () => { + }, + }); + } + }); + }, + bindQdsNotBindView(){ + this.handleClearQdsNotBind(); + this.dialogAddQdsVisible = true; + }, + //分页 + handleAddQdsSizeChange(val) { + this.qdsAddLimit = val; + this.handleSelectQdsNotBind(); + }, + //翻页 + handleAddQdsCurrentChange(val) { + this.qdsAddPage = val; + this.handleSelectQdsNotBind(); + }, + // 重置 + handleClearQdsNotBind() { + this.qdsAddName = ""; + this.qdsAddPhone = ""; + this.qdsAddPage = 1; + this.qdsAddLimit = 10; + this.handleSelectQdsNotBind(); + }, + handleSelectQdsNotBind(){ + this.qdsTableDataLoading = true; + this.$http({ + url: this.$http.adornUrl("commission/ywyApply/invitationQdsNotBindPage"), + method: "get", + params: this.$http.adornParams({ + userPage: this.qdsAddPage, + userLimit: this.qdsAddLimit, + invitationCode: this.invitationCode, + userName: this.qdsAddName, + phone: this.qdsAddPhone + }), + }).then(({data}) => { + if (data.code == 0) { + this.qdsAddTableData = data.data; + } else { + this.$notify({ + title: "提示", + duration: 1800, + message: data.msg, + type: "warning", + }); + } + this.qdsTableDataLoading = false; + }); + }, + handleAddQds(row){ + let userId = row.userId; + this.$http({ + url: this.$http.adornUrl("commission/ywyApply/addQds"), + method: "post", + params: this.$http.adornParams({ + userId: userId, + invitationCode: this.invitationCode, + }), + }).then(({data}) => { + if (data.code == 0) { + this.$message({ + message: "邀请成功", + type: "success", + duration: 1500, + onClose: () => { + this.dialogAddQdsVisible = false; + this.handleSelectQds(); + }, + }); + } else { + this.$message({ + message: data.msg, + type: "warning", + duration: 1500, + onClose: () => { + }, + }); + } + }); + }, + bindDlsView(row){ + this.invitationCode = row.invitationCode; + this.handleClearQds(); + this.dialogQdsVisible = true; + }, }, mounted() { diff --git a/src/views/vueMchat/vueMchat.vue b/src/views/vueMchat/vueMchat.vue index 7e97ff2..7096f85 100644 --- a/src/views/vueMchat/vueMchat.vue +++ b/src/views/vueMchat/vueMchat.vue @@ -168,9 +168,9 @@ - 发送 + 发送1 - 发送 + 发送2 @@ -270,7 +270,7 @@ import { serverPaths } from '@/utils/enumData' // 数据接收 let msg = JSON.parse(e.data); this.dialogueList.push(msg); - console.log(msg); + console.log(this.dialogueList); let ele = document.getElementById("ele"); this.dataSelect(); @@ -369,26 +369,27 @@ import { serverPaths } from '@/utils/enumData' this.initWebSocket(); }, - clickItem2() { - this.$http({ - url: this.$http.adornUrl("chat/selectChatContent"), - method: "get", - params: this.$http.adornParams({ - chatConversationId: this.chatId, - page: 1, - limit: 10, - }), - }).then(({ - data - }) => { - let returnData = data.data; - this.dialogueList = returnData.list.reverse(); - let ele = document.getElementById("ele"); - this.$nextTick(() => { - ele.scrollTop = ele.scrollHeight; + if(this.chatId != null && this.chatId != ''){ + this.$http({ + url: this.$http.adornUrl("chat/selectChatContent"), + method: "get", + params: this.$http.adornParams({ + chatConversationId: this.chatId, + page: 1, + limit: 10, + }), + }).then(({ + data + }) => { + let returnData = data.data; + this.dialogueList = returnData.list.reverse(); + let ele = document.getElementById("ele"); + this.$nextTick(() => { + ele.scrollTop = ele.scrollHeight; + }); }); - }); + } }, // 点击发送 sendTextarea(type) { @@ -406,7 +407,7 @@ import { serverPaths } from '@/utils/enumData' console.log(`🚀 ~ sendTextarea ~ data:`, data) this.websock.send(data); this.content = ""; - this.dialogueList.push(this.numlist); + // this.dialogueList.push(this.numlist); let ele = document.getElementById("ele"); this.$nextTick(() => { ele.scrollTop = ele.scrollHeight; @@ -491,7 +492,8 @@ import { serverPaths } from '@/utils/enumData' this.dataSelect() this.timer = window.setInterval(() => { setTimeout(() => { - this.dataSelect() + this.dataSelect(); + this.clickItem2(); },0) },4000) },