Commit b5bbd0c8 by 胡悦

提交

1 parent 8cd92db1
import { http } from '@/main'
import { http, http_common } from '@/main'
const defaultPath = 'scrm.api.carlife.'
const getMerchantGoodsListApi = params => {
......@@ -75,4 +74,14 @@ const getClassifyListApi = params => {
})
}
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getZoneListApi, getClassifyListApi }
const pictureUpload = params => {
params.method = "glsx.accounts.biz.common.pictureUpload"
return http_common({
url: '/router?method=glsx.accounts.biz.common.pictureUpload',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getZoneListApi, getClassifyListApi, pictureUpload }
......@@ -20,3 +20,4 @@ Vue.prototype.size = 'small'
start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
export const http_common = params => Vue.prototype.$http_common(params)
......@@ -3,14 +3,16 @@ import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import ElementUI from 'element-ui'
import render from './render'
import 'glsx-components/dist/glsx-components.css'
let routes = []
let router = null
let instance = null
Vue.use(ElementUI)
Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState }) {
const { response, request, sign, secret } = await fetchConfig()
const { response, request, sign, secret, sign_common, request_common } = await fetchConfig()
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
......@@ -18,6 +20,7 @@ export async function bootstrap({ history, common, messenger, globalState }) {
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers)
......
......@@ -24,7 +24,7 @@ export async function start() {
// .forEach(item => {
// urlParams[item.split('=')[0]] = item.split('=')[1]
// })
var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'mini-619efaf8-543c-4ad6-a7dc-e73c8dd74e5e-rop'
var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'mini-f4e9b4ba-b16f-491f-bf84-40f2b896dc93-rop'
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: token } })
Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/', routes)
......
......@@ -64,7 +64,7 @@
v-for="item in groupList"
:key="item.id"
:label="item.groupName"
:value="item.chatId"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
......@@ -125,7 +125,7 @@
<div class="filter-number">
查看预计群发人数
<span v-show="isUpdate" @click="viewMembers">查看</span>
<span v-show="!isUpdate">2</span>
<span v-show="!isUpdate">{{groupNumber}}</span>
</div>
</div>
</div>
......@@ -277,15 +277,16 @@ export default {
selectData: [],
// 是否有修改筛选成员
isUpdate: true,
tagging: []
tagging: [],
groupNumber: ''
}
},
mounted() {
this.getGroupList()
// // let clientHeight = document.documentElement.clientHeight
// this.footerLeft = document.querySelector('.base-container-right').offsetLeft
// this.footerWidth = document.documentElement.clientWidth - this.footerLeft
// // this.boxHeight = clientHeight - 200
let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.boxHeight = clientHeight - 200
},
methods: {
openMembers() {
......@@ -325,18 +326,22 @@ export default {
this.$refs.groupForm.validate(v => {
if (v) {
console.log(v)
const params = {
type: 1,
attachmentList: this.basicForm.attachmentList,
selectType: this.basicForm.selectType,
sendType: this.basicForm.sendType
}
params.userList = this.basicForm.userList.map(item => {
return {
staffId: item.staffId,
staffName: item.staffName
}
})
const params = this.getSiftMembers()
params.type = 1
params.attachmentList = this.basicForm.attachmentList
params.sendType = this.basicForm.sendType
// const params = {
// type: 1,
// attachmentList: this.basicForm.attachmentList,
// selectType: this.basicForm.selectType,
// sendType: this.basicForm.sendType
// }
// params.userList = this.basicForm.userList.map(item => {
// return {
// staffId: item.staffId,
// staffName: item.staffName
// }
// })
if (params.sendType == 2) {
params.sendTime = this.basicForm.sendTime + ' ' + this.basicForm.sendDate
}
......@@ -377,7 +382,6 @@ export default {
})
}
this.tagging = arr
console.log(this.tagging)
},
// 删除标签
......@@ -396,35 +400,63 @@ export default {
this.groupList = res
})
},
// 查看群发人数
viewMembers() {
console.log(this.basicForm)
if (!this.basicForm.userList || this.basicForm.userList.length == 0) {
this.$message({
type: 'error',
message: '请选择群发账号'
})
return
}
getSiftMembers() {
const params = {
selectType: this.basicForm.selectType,
condition: {
sex: this.basicForm.condition.sex,
chatId: this.basicForm.condition.chatId
chatId: this.basicForm.condition.chatId.join(','),
tagId: JSON.stringify(this.tagging)
}
}
params.condition.startTime = dayjs(this.basicForm.condition.date[0]).format('YYYY-MM-DD')
params.condition.endTime = dayjs(this.basicForm.condition.date[1]).format('YYYY-MM-DD')
if (this.basicForm.condition.date) {
params.condition.startTime = dayjs(this.basicForm.condition.date[0]).format('YYYY-MM-DD')
params.condition.endTime = dayjs(this.basicForm.condition.date[1]).format('YYYY-MM-DD')
}
params.userList = this.basicForm.userList.map(item => {
return {
staffId: item.staffId,
staffName: item.staffName
}
})
return params
},
// 查看群发人数
viewMembers() {
console.log(this.basicForm)
if (!this.basicForm.userList || this.basicForm.userList.length == 0) {
this.$message({
type: 'error',
message: '请选择群发账号'
})
return
}
const params = this.getSiftMembers()
// const params = {
// selectType: this.basicForm.selectType,
// condition: {
// sex: this.basicForm.condition.sex,
// chatId: this.basicForm.condition.chatId
// }
// }
// if (this.basicForm.condition.date) {
// params.condition.startTime = dayjs(this.basicForm.condition.date[0]).format('YYYY-MM-DD')
// params.condition.endTime = dayjs(this.basicForm.condition.date[1]).format('YYYY-MM-DD')
// }
// params.userList = this.basicForm.userList.map(item => {
// return {
// staffId: item.staffId,
// staffName: item.staffName
// }
// })
console.log(params)
this.$apis.customerTransform.customerCount(params).then(res => {
console.log(res)
if (res) {
this.groupNumber = res
} else {
this.groupNumber = '-'
}
this.isUpdate = false
})
}
......
......@@ -26,6 +26,7 @@
:disable-transitions="false"
@close="remove(tag)"
>{{ tag.staffName }}</el-tag>
<el-input size="small" style="outline: none; border: none"></el-input>
</div>
</div>
<div class="form-tips">群主收到通知后,可选择他管理的客户群并群发该内容。</div>
......@@ -168,12 +169,12 @@ export default {
key: new Date()
}
},
// mounted() {
// // let clientHeight = document.documentElement.clientHeight
// this.footerLeft = document.querySelector('.base-container-right').offsetLeft
// this.footerWidth = document.documentElement.clientWidth - this.footerLeft
// // this.boxHeight = clientHeight - 200
// },
mounted() {
let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.boxHeight = clientHeight - 200
},
methods: {
openMembers() {
this.membersVisible = !this.membersVisible
......@@ -188,11 +189,11 @@ export default {
type: 'error',
message: '请选择群主'
})
} else if (this.$refs.membersForm.innerTags.length > 1) {
this.$message({
type: 'error',
message: '只可选择一个群主'
})
// } else if (this.$refs.membersForm.innerTags.length > 1) {
// this.$message({
// type: 'error',
// message: '只可选择一个群主'
// })
} else {
this.basicForm.userList = this.$refs.membersForm.innerTags
this.openMembers()
......@@ -211,7 +212,8 @@ export default {
const params = {
type: 2,
attachmentList: this.basicForm.attachmentList,
sendType: this.basicForm.sendType
sendType: this.basicForm.sendType,
massName: this.basicForm.massName
}
params.userList = this.basicForm.userList.map(item => {
return {
......@@ -308,4 +310,60 @@ export default {
color: #f56c6c;
margin-right: 4 px;
}
.label-text {
margin-left: 10px;
font-size: 14px;
span {
color: #5850ff;
}
}
.sale-select {
display: flex;
align-items: center;
}
.input-tag-wrapper {
max-width: 300px;
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #606266;
display: inline-block;
outline: none;
padding: 0 10px 0 5px;
flex-wrap: wrap;
line-height: 32px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%;
display: flex;
align-items: center;
/deep/ input {
/* input { */
/* background-color: red!important; 调试用的样式 */
outline: none !important;
border: none !important;
}
/deep/ .el-input {
min-width: 150px;
width: auto;
flex: 1;
}
}
.el-tag {
margin-right: 4px;
height: 26px;
line-height: 24px;
}
.tag-input {
background: transparent;
border: none !important;
font-size: 14px;
height: 32px;
outline: none;
padding-left: 0;
width: 100px;
}
</style>
......@@ -2,14 +2,18 @@
<div class="select-emp-panel">
<div class="scrm-p10 emp-tree-panel">
<div class="popper-arrow"></div>
<div
class="emp-scroll-panel"
:style="{
<div class="emp-scroll-panel" :style="{
height: treeHeight + 'px'
}"
>
}">
<div class="tree-title">所在门店/部门</div>
<el-tree :data="listTree" :expand-on-click-node="false" highlight-current :props="defaultProps" @node-click="handleNodeClick"></el-tree>
<el-tree
v-loading="loading"
:data="listTree"
:expand-on-click-node="false"
highlight-current
:props="defaultProps"
@node-click="handleNodeClick"
></el-tree>
</div>
</div>
<el-col
......@@ -18,7 +22,15 @@
height: treeHeight + 20 + 'px'
}"
>
<GLTable ref="saleTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" @selectionTable="selectionTable"></GLTable>
<GLTable
v-loading="loading"
ref="saleTable"
:tableData="tableEmpData"
:tableParams="tableParams"
:hasNum="false"
:hasPage="false"
@selectionTable="selectionTable"
></GLTable>
</el-col>
</div>
</template>
......@@ -57,7 +69,9 @@ export default {
]
},
tableEmpData: [],
group: {}
group: {},
currentArr: [],
loading: true
}
},
methods: {
......@@ -67,8 +81,10 @@ export default {
listDepartmentTree() {
this.$apis.customerTransform.listDepartmentTree({ merchantId: 10001001, addChildrensFlag: true }).then(res => {
this.listTree = res
this.loading = false
this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree)
console.log(this.listTree)
this.currentArr = this.$common.utils.deepClone(this.listTree[0].entmicroStaffResponses)
this.selectData.forEach(i => {
const row = this.getEmployee(this.listTree).find(j => j.id == i.staffId)
console.log(row)
......@@ -90,6 +106,7 @@ export default {
handleNodeClick(data) {
this.departmentId = data.id
this.tableEmpData = data.entmicroStaffResponses
this.currentArr = this.$common.utils.deepClone(data.entmicroStaffResponses)
// this.listEntmicroStaff()
},
getEmployee(d, arr = []) {
......@@ -104,6 +121,17 @@ export default {
}
})
return arr
},
searchTable(search) {
const arr = []
this.currentArr.forEach(item => {
console.log(item.staffName.indexOf(search) != -1)
if (item.staffName.indexOf(search) != -1) {
console.log(item)
arr.push(item)
}
})
this.tableEmpData = arr
}
// listEntmicroStaff(staffName) {
// let params = {
......
......@@ -4,16 +4,33 @@
<el-form-item label="请选择成员">
<div class="sale-select">
<div class="el-input-tag input-tag-wrapper" @click="foucusTagInput">
<el-tag v-for="(tag, idx) in innerTags" :key="idx" closable :disable-transitions="false" @close="remove(tag)">
{{ tag.staffName }}
</el-tag>
<el-input size="small" v-model.trim="newTag" placeholder="选择员工" @input="inputTag" style="outline: none; border: none"></el-input>
<el-tag
v-for="(tag, idx) in innerTags"
:key="idx"
closable
:disable-transitions="false"
@close="remove(tag)"
>{{ tag.staffName }}</el-tag>
<el-input
size="small"
v-model.trim="newTag"
placeholder="选择员工"
@input="inputTag"
style="outline: none; border: none"
></el-input>
</div>
<div>
<el-button size="small" class="sale-select-btn" type="primary" @click="searchEmp">查询</el-button>
</div>
<div><el-button size="small" class="sale-select-btn" type="primary" @click="searchEmp">查询</el-button></div>
</div>
<div>
<div class="select-sale-panel">
<select-emp :selectData="selectData" @group="handlGroup" @selectTable="selectTable" ref="selectEmpTabel"></select-emp>
<select-emp
:selectData="selectData"
@group="handlGroup"
@selectTable="selectTable"
ref="selectEmpTabel"
></select-emp>
<div class="popper__arrow"></div>
</div>
</div>
......@@ -66,7 +83,7 @@ export default {
},
//查询
searchEmp() {
this.$refs.selectEmpTabel.listDepartmentTree(this.newTag)
this.$refs.selectEmpTabel.searchTable(this.newTag)
},
onSubmit() {
if (this.innerTags.length == 0) {
......
......@@ -19,12 +19,13 @@
:getListApi="getListApi"
:searchForm="searchForm"
:tableParams="tableParams"
:hasPage="false"
:pageConf="pageConf"
>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button
type="text"
:disabled="scope.scope.isRemind == 1"
:disabled="scope.scope.remindStatus == 1"
@click="remind(scope.scope)"
>提醒发送</el-button>
</div>
......@@ -151,6 +152,10 @@ export default {
const id = this.$route.params.id
this.getCustomerDetail(id)
this.searchForm.massId = id
let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.boxHeight = clientHeight - 200
},
methods: {
handleCancel() {
......@@ -164,6 +169,11 @@ export default {
})
.then(res => {
console.log(res)
this.handleSearch()
this.$message({
type: 'success',
message: '已提醒!'
})
// this.$set(this.employeelist[index], 'isRemind', true)
})
},
......
......@@ -31,8 +31,13 @@
<div class="info-num">共{{ item.customerCount }}个客户</div>
</div>
<div class="info-right">
<div v-if="item.isRemind">已提醒</div>
<el-button size="mini" type="primary" @click="remind(item, index)">提醒</el-button>
<div v-if="item.remindStatus == 1">已提醒</div>
<el-button
:disabled="item.remindStatus == 1"
size="mini"
type="primary"
@click="remind(item, index)"
>提醒</el-button>
</div>
</div>
</div>
......@@ -153,6 +158,10 @@ export default {
mounted() {
this.getStaffList()
this.getCustomerList()
let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.boxHeight = clientHeight - 200
},
methods: {
handleSelect(val) {
......@@ -167,14 +176,19 @@ export default {
this.$router.go(-1)
},
remind(data, index) {
if (!data.isRemind) {
if (!data.remindStatus) {
this.$apis.customerTransform
.listRemindOperate({
id: data.id,
type: 1
})
.then(res => {
this.$set(this.employeelist[index], 'isRemind', true)
this.getStaffList(this.activeIndex)
this.$message({
type: 'success',
message: '已提醒!'
})
// this.$set(this.employeelist[index], 'remindStatus', true)
})
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!