Commit 72cf551e by wangql
2 parents 1d5bda04 7b951254
......@@ -143,7 +143,8 @@ const groupDetailList = params => {
sign: true
})
}
// 根据id提醒用户
// 详情页客户群提醒
const listRemindOperate = params => {
params.method = `${path}listRemindOperate`
return http({
......@@ -153,7 +154,7 @@ const listRemindOperate = params => {
sign: true
})
}
// 详情页客户群提醒
// 根据id提醒用户
const remindUserGroup = params => {
params.method = `${path}remindUserGroup`
return http({
......
import { http } from '@/main'
const defaultPath = 'scrm.api.shopmall.'
const getListApi = params => {
params.method = `${defaultPath}order.page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
const getCountApi = params => {
params.method = `${defaultPath}order.count`
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
const getOrderDetailApi = params => {
params.method = `${defaultPath}order.detail`
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
const orderExportApi = params => {
params.method = `${defaultPath}order.export`
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
// 订单核销
const writeOffApi = params => {
params.method = `${defaultPath}order.verfication`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 快递信息
const addDeliveryApi = params => {
params.method = `${defaultPath}order.addDelivery`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 退款审核 - 详情
const examineDetailApi = params => {
params.method = `${defaultPath}orderRefund.detail`
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
// 退款审核 - 提交
const examineAllowApi = params => {
params.method = `${defaultPath}orderRefund.allow`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 确认收货
const confirmReceiptGoodsApi = params => {
params.method = `${defaultPath}order.refund.confirmReceiptGoods`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, addDeliveryApi, examineDetailApi, examineAllowApi, confirmReceiptGoodsApi }
\ No newline at end of file
......@@ -66,4 +66,4 @@ const updateShareRecordApi = params => {
})
}
export default { getListApi, getShareRecordInfoApi, deleteShareRecordApi, revokeShareRecordApi, addShareRecordApi, updateShareRecordApi }
export default { getListApi, getShareRecordInfoApi, deleteShareRecordApi, revokeShareRecordApi, addShareRecordApi, updateShareRecordApi }
\ No newline at end of file
......@@ -9,7 +9,6 @@ html {
}
.marketing .container {
padding: 0px 20px 20px 40px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
......@@ -56,9 +55,30 @@ html {
background: linear-gradient(to right, transparent, #fff 55%);
}
.marketing .list-tips {
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
padding: 10px 16px;
height: 20px;
line-height: 20px;
background-color: #E6E9FF;
border: 1px solid #5850FF;
margin-bottom: 20px;
border-radius: 4px;
}
.marketing .list-tips .tips-img {
vertical-align: middle;
margin: -2px 8px 0 0;
}
.marketing .list-tips .red-txt {
color: #EB4E4E;
}
.marketing .wechat-container {
width: 375px;
margin-right: 45px;
margin-left: 32px;
background: #ffffff;
position: relative;
}
......
......@@ -27,52 +27,32 @@ function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, max
}
}
const liveStatusList = [{
confId: '101',
confName: '直播中'
},
{
confId: '102',
confName: '未开始'
},
{
confId: '103',
confName: '已结束'
},
{
confId: '104',
confName: '禁播'
},
{
confId: '105',
confName: '暂停'
},
{
confId: '106',
confName: '异常'
},
{
confId: '107',
confName: '已过期'
}
const orderManageStatusList = [
{ confId: '1', confName: '未支付' },
// { id: '2', confName: '已支付' },
{ confId: '3', confName: '已失效' },
{ confId: '4', confName: '已发货' },
{ confId: '5', confName: '已收货' },
{ confId: '6', confName: '待审核' },
{ confId: '7', confName: '审核成功' },
{ confId: '8', confName: '审核失败' },
{ confId: '9', confName: '待确认' },
{ confId: '10', confName: '退款中' },
{ confId: '11', confName: '已退款' },
{ confId: '12', confName: '退款失败' },
{ confId: '13', confName: '待发货' },
{ confId: '14', confName: '已安装' }
]
const auditStatusList = [{
confId: 0,
confName: '未审核'
},
{
confId: 1,
confName: '审核中'
},
{
confId: 2,
confName: '审核通过'
},
{
confId: 3,
confName: '审核失败'
}
const orderSourceList = [
{ confId: '1', confName: '商城订单' },
{ confId: '2', confName: '直播订单' },
{ confId: '3', confName: '活动订单' }
]
const deliveryTypeList = [
{ confId: '1', confName: '到店核销' },
{ confId: '2', confName: '快递到家' }
]
//会员中心得状态list
......@@ -124,7 +104,7 @@ const orderStatusList = [
},
{
confId: 6,
confName: '已经退款'
confName: '已退款'
},
]
const serviceStatusList = [{
......@@ -166,8 +146,9 @@ const stateList = [{
export {
limitPrice,
liveStatusList,
auditStatusList,
orderManageStatusList,
orderSourceList,
deliveryTypeList,
statusList,
serviceStatusList,
memberTypeList,
......
const staticRoutes = Object.freeze([
{
const staticRoutes = Object.freeze([{
name: 'default',
path: '/',
redirect: { name: 'home' }
......@@ -131,6 +130,18 @@ const staticRoutes = Object.freeze([
meta: {}
},
{
name: 'orderComment',
path: '/orderComment/index',
component: resolve => require([`@/views/orderManage/index.vue`], resolve),
meta: {}
},
{
name: 'commentDetail',
path: '/orderComment/commentDetail',
component: resolve => require([`@/views/orderComment/commentDetail.vue`], resolve),
meta: {}
},
{
name: 'detailCustomer',
path: '/customerTransform/detailCustomer/:id',
component: resolve => require([`@/views/customerTransform/detailCustomer.vue`], resolve),
......@@ -197,4 +208,4 @@ const staticRoutes = Object.freeze([
meta: {}
},
])
export default staticRoutes
export default staticRoutes
\ No newline at end of file
......@@ -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-983e626d-4250-42b0-be9c-a9845552ae20-rop'
var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'mini-53e870b5-80d5-483e-8277-cdc4dec0ad80-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)
......
......@@ -36,7 +36,7 @@
</div>
</el-form-item>
<el-form-item label="选择客户" prop="selectType">
<el-radio-group v-model="basicForm.selectType">
<el-radio-group @change="selectChange" v-model="basicForm.selectType">
<el-radio :label="1">全部成员</el-radio>
<el-radio :label="2">筛选成员</el-radio>
</el-radio-group>
......@@ -296,7 +296,6 @@ export default {
}
},
mounted() {
this.getGroupList()
let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
......@@ -307,6 +306,7 @@ export default {
this.membersVisible = !this.membersVisible
},
handleCancel() {
// this.$router.push('/customerTransform/index')
this.$router.go(-1)
},
// 成员弹窗
......@@ -352,9 +352,10 @@ export default {
params.sendType = this.basicForm.sendType
const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
const attachmentList = previewList.map(item => {
// const attachmentList = this.$common.utils.deepClone(this.$refs.welcome.previewList).map(item => {
if (item.attType == 1) {
item.attContent = item.attContent.replace('@昵称', '[@昵称]')
} else if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
return item
})
......@@ -483,6 +484,12 @@ export default {
selectableRange: '00:00:00 - 23:59:59'
}
}
},
selectChange(val) {
console.log(val)
if (val == 2) {
this.getGroupList()
}
}
}
}
......
......@@ -225,10 +225,20 @@ export default {
this.$refs.groupForm.validate(v => {
const params = {
type: 2,
attachmentList: this.basicForm.attachmentList,
// attachmentList: this.basicForm.attachmentList,
sendType: this.basicForm.sendType,
massName: this.basicForm.massName
}
const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
const attachmentList = previewList.map(item => {
if (item.attType == 1) {
item.attContent = item.attContent.replace('@昵称', '[@昵称]')
} else if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
return item
})
params.attachmentList = attachmentList
params.userList = this.basicForm.userList.map(item => {
return {
staffId: item.staffId,
......
......@@ -117,7 +117,11 @@ export default {
this.$apis.customerTransform.customerDetail({ id }).then(res => {
console.log(res)
this.basicInfo = res
this.eventBus.$emit('update', this.basicInfo.attachmentList)
const previewList = res.attachmentList.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
return item
})
this.eventBus.$emit('update', previewList)
})
},
getStatistic() {
......
......@@ -127,13 +127,16 @@ export default {
},
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)
}
})
if (this.currentArr && this.currentArr.length != 0) {
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) {
......
......@@ -43,15 +43,17 @@
<div class="tag-select-box">
<div class="tag-box-header">标签名称({{ selectNum }}项)</div>
<div class="tag-selected-box">
<template v-for="item in labelTreeRets">
<el-tag
class="tag-selected-item"
v-for="(tag, idx) in item.tagChecked"
:key="idx"
closable
:disable-transitions="false"
@close="remove(item, idx)"
>{{ tag.name }}</el-tag>
<template v-for="item in labelTreeRetSelect">
<template v-for="(tag, idx) in item.tagChecked">
<el-tag
class="tag-selected-item"
:key="idx"
v-if="tag"
closable
:disable-transitions="false"
@close="remove(item, idx)"
>{{ tag.name }}</el-tag>
</template>
</template>
</div>
</div>
......@@ -75,6 +77,8 @@ export default {
dialogVisible: false,
labelGroupName: '',
selectNum: 0,
searchStatus: false,
labelTreeRetSelect: [],
labelTreeRets: [
{
labelGroup: { id: '109', name: '湖口123' },
......@@ -116,10 +120,12 @@ export default {
},
methods: {
init(item) {
this.labelGroupName = ''
this.dialogVisible = true
this.querylabeltree(item)
},
handleSearch() {
this.searchStatus = true
this.querylabeltree()
},
querylabeltree(selectItem) {
......@@ -148,17 +154,29 @@ export default {
selectItem.forEach(item => {
this.labelTreeRets.forEach(tag => {
if (item.labelGroup.id == tag.labelGroup.id) {
let labelList = []
item.labelList.forEach(x => {
labelList.push(x.id)
})
this.$nextTick(() => {
tag.tagChecked = item.labelList
tag.tagChecked = tag.labelList.filter(i => labelList.includes(i.id))
})
}
})
})
this.labelTreeRets.forEach(item => {
this.labelTreeRetSelect.forEach(itm => {
if (itm.labelGroup.id == item.labelGroup.id) {
item.tagChecked = utils.deepClone(itm.tagChecked)
}
})
})
this.labelTreeRets.forEach((item, index) => {
this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index)
})
})
this.labelTreeRetSelect = utils.deepClone(this.labelTreeRets)
} else {
this.labelTreeRets = res.labelTreeRets.map(item => {
return {
......@@ -170,16 +188,43 @@ export default {
checkAll: false
}
})
this.labelTreeRets.forEach((item, index) => {
this.labelTreeRetSelect.forEach(itm => {
if (itm.labelGroup.id == item.labelGroup.id && itm.tagChecked.length > 0) {
let tagChecked = []
itm.tagChecked.forEach(x => {
tagChecked.push(x.id)
})
this.$nextTick(() => {
item.tagChecked = item.labelList.filter(i => tagChecked.includes(i.id))
})
this.$nextTick(() => {
this.handleCheckedChange(itm.tagChecked, index, 1)
})
}
})
})
if (this.labelTreeRetSelect.length == 0) {
this.labelTreeRetSelect = utils.deepClone(this.labelTreeRets)
}
}
})
},
remove(item, idx) {
item.tagChecked.splice(idx, 1)
if (item.tagChecked.length == 0) {
this.$nextTick(() => {
item.checkAll = false
this.labelTreeRets.forEach(item => {
this.labelTreeRetSelect.forEach(itm => {
if (item.labelGroup.id == itm.labelGroup.id) {
item.tagChecked = utils.deepClone(itm.tagChecked)
}
if (item.tagChecked.length == 0) {
this.$nextTick(() => {
item.checkAll = false
})
}
})
}
})
this.labelTreeRets.forEach((item, index) => {
this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index)
......@@ -189,7 +234,7 @@ export default {
//选中
handleSelect() {
this.dialogVisible = false
let labelTreeRets = this.labelTreeRets
let labelTreeRets = this.labelTreeRetSelect
.map(item => {
if (item.tagChecked.length) {
return {
......@@ -206,19 +251,35 @@ export default {
handleCheckAllChange(val, index) {
if (val) {
this.labelTreeRets[index].tagChecked = []
for (let i in this.labelTreeRets[index].labelList) {
this.labelTreeRets[index].tagChecked.push(this.labelTreeRets[index].labelList[i])
}
this.labelTreeRets[index].labelList.forEach(item => {
this.labelTreeRets[index].tagChecked.push(item)
})
} else {
this.labelTreeRets[index].tagChecked = []
}
this.labelTreeRets[index].isIndeterminate = false
this.labelTreeRets.forEach(item => {
this.labelTreeRetSelect.forEach(itm => {
if (item.labelGroup.id == itm.labelGroup.id) {
itm.tagChecked = utils.deepClone(item.tagChecked)
}
})
})
},
//选中
handleCheckedChange(value, index) {
handleCheckedChange(value, index, status) {
let checkedCount = value.length
this.labelTreeRets[index].checkAll = checkedCount === this.labelTreeRets[index].labelList.length
this.labelTreeRets[index].isIndeterminate = checkedCount > 0 && checkedCount < this.labelTreeRets[index].labelList.length
if (!status) {
this.labelTreeRets.forEach(item => {
this.labelTreeRetSelect.forEach(itm => {
if (item.labelGroup.id == itm.labelGroup.id) {
itm.tagChecked = utils.deepClone(item.tagChecked)
}
})
})
}
}
},
mounted() {
......@@ -285,7 +346,7 @@ export default {
.tag-selected-item {
margin: 0px 6px 6px 0px;
height: 26px;
line-height: 22px;
line-height: 24px;
}
.el-tree-node__expand-icon {
color: #5850ff;
......
<template>
<div class="w-textarea" ref="wTextarea">
<div
class="w-textarea_input"
ref="wTextareaContent"
contenteditable="true"
:id="contentId"
@click="inputClick($event)"
@focus="isLocked = true"
@blur="isLocked = false"
@keydown.delete="handleDelete($event)"
@input="handleInput($event.target)"
></div>
<!-- <div class="w-textarea_tools" v-if="tools.length > 0 || maxlength">
<button
class="w-textarea_tools__item"
v-for="item in tools"
:key="item.type"
@click="openTagDialog(item.type)"
>{{item.text}}</button>
<span
:class="['w-textarea_tools__text',
count.num < 0 ? '__danger' : '']"
v-if="maxlength"
>{{count.text}}</span>
</div>-->
<!-- <div class="w-textarea_dialog">
<slot></slot>
</div>-->
</div>
</template>
<script>
export default {
name: 'wTextarea',
data() {
return {
// 记录currentText以计算长度
currentText: this.value,
// 为input区域生成随机id,当在页面上有多个组件时,用于监听光标的变化
contentId: `content${this.getGuid()}`,
// 输入的时候锁定,禁止更新innerHTML
isLocked: false,
// 记录当前选中tag的ID
currentTagId: null,
// 当前光标位置
savedRange: {}
}
},
props: {
value: {
type: String,
default: ''
},
tag: {
// 自定义模版标签的标签名
type: String,
// 默认使用wise作为标签名,并添加了默认样式
// 当使用其他标签名的时候,需要另写标签样式
default: 'wise'
},
tools: {
// 自定义扩展功能:超链接'link',模版标签'tag'
type: Array,
default() {
return [
{ type: 'link', text: '添加超链接' },
{ type: 'tag', text: '添加模版标签' }
]
}
},
maxlength: {
// 最大输入长度
type: [String, Number],
default: ''
}
},
computed: {
count() {
// 字符长度记数
let num = this.maxlength - this.currentText.length
let text = num < 0 ? `已超出${Math.abs(num)}个字符` : `还可以输入${num}个字符`
return { num, text }
}
},
mounted() {
// 初始化数据
this.currentText && (this.$refs.wTextareaContent.innerHTML = this.currentText)
// 创建模版标签的style
this.createStyle()
// 每次光标变化的时候,保存 range
document.addEventListener('selectionchange', this.selectHandler)
},
beforeDestroy() {
// 卸载事件
document.removeEventListener('selectionchange', this.selectHandler)
},
methods: {
updateData(text) {
this.$emit('input', text)
},
createStyle() {
// 为自定义的模版标签添加样式,使之不可编辑
let style = document.createElement('style')
style.innerHTML = `.w-textarea ${this.tag} {
cursor: default;
-webkit-user-modify: read-only !important;
}`
this.$refs.wTextarea.appendChild(style)
},
closeModal() {
this.form.text = ''
this.showModal = false
},
openTagDialog(type) {
// if (addLink)
// 将事件抛给父组件处理
// 处理后需要调用 addTag() 或者 addLink() 将内容传回来
this.$emit('add', type)
},
addTag(text) {
// 创建模版标签
let node = document.createElement(this.tag)
node.innerText = text
// 添加id便于删除
node.id = this.getGuid()
this.insertNode(node)
},
addLink(text, url) {
// 创建a标签
let node = document.createElement('a')
node.innerText = text
node.href = url
node.target = 'blank'
this.insertNode(node)
},
insertNode(node) {
// 在内容中插入标签
// 删掉选中的内容(如有)
this.savedRange.deleteContents()
// 插入链接
this.savedRange.insertNode(node)
// 更新双向绑定数据
let target = this.$refs.wTextareaContent
this.updateData(target.innerHTML)
this.currentText = target.innerText
this.$emit('updateText', this.currentText)
},
handleInput(target) {
// 即时更新数据
this.updateData(target.innerHTML)
this.currentText = target.innerText
this.$emit('updateText', this.currentText)
},
handleDelete(e) {
// 监听“删除”事件
if (this.currentTagId) {
// 若已选中模版标签,直接删除dom节点
let t = document.getElementById(this.currentTagId)
this.$refs.wTextareaContent.removeChild(t)
this.currentTagId = null
// 阻止浏览器默认的删除事件,并手动更新数据
e.preventDefault()
this.handleInput(e.target)
}
},
inputClick(e) {
console.log(this.tag.toUpperCase(), e.target.nodeName, e)
// 监听点击事件
this.isLocked = true
const TAG_NAME = e.target.nodeName
if (TAG_NAME === this.tag.toUpperCase()) {
// 点击模版标签时,记录id
this.currentTagId = e.target.id
e.target.className = 'active'
} else if (this.currentTagId) {
// 清空active样式
let target = document.getElementById(this.currentTagId)
target.className = ''
this.currentTagId = null
} else {
this.currentTagId = null
}
},
getGuid() {
// 生成随机ID
return `r${new Date().getTime()}d${Math.ceil(Math.random() * 1000)}`
},
selectHandler() {
// 监听选定文本的变动
let sel = window.getSelection()
let range = sel.rangeCount > 0 ? sel.getRangeAt(0) : null
if (range && range.commonAncestorContainer.ownerDocument.activeElement.id === this.contentId) {
this.savedRange = range
}
}
},
watch: {
value(val) {
// 非锁定状态下,实时更新innerHTML
if (!this.isLocked) {
this.$refs.wTextareaContent.innerHTML = val
}
}
}
}
</script>
<style lang="scss">
// 给标签默认样式,不可scoped
.w-textarea {
wise {
border-radius: 2px;
background-color: #fff;
font-size: 14px;
color: #5850ff;
line-height: 20px;
padding: 2px;
margin: 0 5px;
color: #26a2ff;
// padding: 0 1px;
white-space: nowrap;
cursor: default;
-webkit-user-modify: read-only !important;
}
.active {
background: #dcdfe6;
}
}
</style>
<style lang="scss" scoped>
$borderColor: #dcdfe6;
$bgColor: #f5f7fa;
$textColor: #666;
.w-textarea {
width: 100%;
box-sizing: border-box;
// border-radius: 4px;
border: 1px solid $borderColor;
min-height: 200px;
// margin-bottom: 15px;
overflow: hidden;
position: relative;
&_input {
width: 100%;
min-height: 200px;
box-sizing: border-box;
padding: 10px;
line-height: 1.5;
word-break: break-word;
// 允许编辑,禁止富文本
-webkit-user-modify: read-write-plaintext-only !important;
&:focus {
outline: none;
}
}
&_tools {
padding: 0 10px;
height: 40px;
line-height: 40px;
border-top: 1px solid $borderColor;
background-color: $bgColor;
color: $textColor;
font-size: 12px;
&__item {
display: inline-block;
line-height: 1;
padding: 5px 8px;
margin-right: 8px;
color: $textColor;
cursor: pointer;
border: 1px solid $borderColor;
border-radius: 4px;
background: #fff;
transition: all 0.3s;
&:hover {
background: $bgColor;
opacity: 0.7;
}
&:focus {
outline: none;
}
}
&__text {
display: inline-block;
line-height: 40px;
padding: 0 8px;
float: right;
color: $textColor;
cursor: default;
transition: all 0.3s;
&:hover {
opacity: 1;
}
&.__danger {
color: red;
}
}
}
}
</style>
\ No newline at end of file
......@@ -9,14 +9,15 @@
</div>-->
<!-- <div id="toolbar-container" style="display: none;"></div>
<div id="text-container" class="editor-container"></div>-->
<div
<!-- <div
id="editor"
ref="editor"
@input="changeInput"
class="text-editor"
contenteditable="true"
autofocus
></div>
></div>-->
<wTextarea ref="textContent" @updateText="updateText"></wTextarea>
<!-- <el-input
type="textarea"
:rows="9"
......@@ -97,11 +98,13 @@ const ATT_TYPE = {
}
// import E from 'wangeditor'
import ActivityModel from './activityModel'
import wTextarea from './tag-textarea'
import { debounce } from '@/utils/index'
export default {
name: 'WelcomeWords',
components: {
ActivityModel
ActivityModel,
wTextarea
},
props: { eventBus: Object },
data() {
......@@ -221,24 +224,7 @@ export default {
// 添加昵称
handleFun(name) {
if (name == 'nickname') {
this.$refs.editor.focus()
this.insertHtmlAtCaret('@昵称')
this.changeInput()
// var range = window.getSelection().getRangeAt(0)
// console.log(range)
// range.selectNodeContents(range.endContainer.childNodes[range.startOffset - 2])
// var el = document.createElement('span')
// el.setAttribute('contenteditable', false)
// el.setAttribute('class', 'nickname')
// el.innerHTML = '@昵称<i class="el-icon-error"></i>'
// el.innerHTML = '<span id="nick" contenteditable="false" class="nickname">@昵称<i class="el-icon-error"></i></span>'
// var node = document.getElementById('nick')
// var targetNode = document.getElementById('editor')
// targetNode.appendChild(el)
// var EL = document.createElement('div')
// EL.setAttribute('contenteditable', true)
// targetNode.appendChild(EL)
// this.editor.txt.append('<span class="nickname">@昵称<i class="el-icon-error"></i><span>')
this.$refs.textContent.addTag('@昵称')
} else if (name == 'activity') {
this.$refs.activity.init()
}
......@@ -250,24 +236,46 @@ export default {
textInput(val) {
const hasText = this.previewList.some(item => item.attType == 1)
if (hasText) {
this.$set(this.previewList, 0, {
attContent: val,
attType: ATT_TYPE.TEXT
})
if (val) {
this.$set(this.previewList, 0, {
attContent: val,
attType: ATT_TYPE.TEXT
})
} else {
this.previewList.splice(0, 1)
}
} else {
this.previewList.unshift({
attContent: val,
attType: ATT_TYPE.TEXT
})
if (val) {
this.previewList.unshift({
attContent: val,
attType: ATT_TYPE.TEXT
})
} else {
this.previewList.splice(0, 1)
}
}
},
selectActivity(val) {
console.log(val)
let idx
const hasActivity = this.previewList.some((item, index) => {
if (item.attType == 7) {
idx = index
return item
}
})
if (val) {
this.previewList.push({
attContent: val,
attType: ATT_TYPE.ACTIVITY
})
if (hasActivity) {
this.$set(this.previewList, idx, {
attContent: val,
attType: ATT_TYPE.ACTIVITY
})
} else {
this.previewList.push({
attContent: val,
attType: ATT_TYPE.ACTIVITY
})
}
}
},
insertHtmlAtCaret(html) {
......@@ -298,20 +306,9 @@ export default {
}
}
},
changeInput: debounce(function() {
console.log(document.getElementById('editor').childNodes)
var allNodes = document.getElementById('editor').childNodes
var str = ''
allNodes.forEach(item => {
if (item.className == 'nickname') {
str += item.innerText
} else if (item.data) {
str += item.data
}
})
console.log(str)
this.textInput(str)
})
updateText(val) {
this.textInput(val)
}
}
}
</script>
......
......@@ -19,7 +19,11 @@
<div class="detail-total">共 {{ employeelist.length || 0 }} 人</div>
<div v-if="employeelist.length != 0" class="info-list">
<div class="info-item" v-for="(item, index) in employeelist" :key="item.id">
<img class="info-avatar" :src="item.avatar" alt />
<img
class="info-avatar"
:src="item.avatar ? item.avatar : require('@/assets/guestCustom/default-avatar.png')"
alt
/>
<div class="info-content">
<div class="info-text">
<div class="info-name">
......@@ -62,7 +66,11 @@
<div class="detail-total">共 {{ customerlist.length || 0 }} 人</div>
<div v-if="customerlist.length != 0" class="info-list">
<div class="info-item" v-for="item in customerlist" :key="item.id">
<img class="info-avatar" :src="item.avatar" alt />
<img
class="info-avatar"
:src="item.avatar ? item.avatar : require('@/assets/guestCustom/default-avatar.png')"
alt
/>
<div class="info-content info-custom">
<div class="info-text">
<div class="info-name">
......
......@@ -204,14 +204,12 @@ export default {
}
}
},
watch: {
$route(val) {
console.log(val)
if (val.path == '/customerTransform/index') {
this.$refs.customer.refreshTable()
this.$refs.customerGroup.refreshTable()
}
}
beforeRouteEnter(to, from, next) {
next(vm => {
const path = from.path
const pathArr = path.split('/')
if (pathArr[2] == 'addCustomerGroup' || pathArr[2] == 'detaiCustomeGroup') vm.activeIndex = 2
})
},
methods: {
switchMenu(val) {
......@@ -251,7 +249,7 @@ export default {
type
}
// if (type == 1) {
this.$apis.customerTransform.listRemindOperate(params).then(res => {
this.$apis.customerTransform.remindUserGroup(params).then(res => {
console.log(res)
this.$message({
type: 'success',
......
......@@ -18,13 +18,18 @@
</div>
<div class="marketing-content">{{item.content}}</div>
<div class="marketing-btn">
<el-button type="primary" size="small" @click="jumpPage(item.path)">{{item.linkName}}</el-button>
<el-button
:disabled="!$globalState.routers.find(i => i.compath == item.path)"
type="primary"
size="small"
@click="jumpPage(item.path)"
>{{item.linkName}}</el-button>
</div>
</div>
</div>
<!-- 客户分群 -->
<div class="customer-group">
<div class="title">客户分群</div>
<div class="title">营销数据</div>
<div class="customer-content">
<!-- 券类营销 -->
<div class="border coupons">
......@@ -69,7 +74,7 @@
</div>
<div class="data-item">
<span class="data-title w-90">
核销总数
核销率
<el-popover
placement="top-start"
title="核销总数"
......@@ -125,7 +130,7 @@
title="浏览量"
width="200"
trigger="hover"
content="进入活动页面但未购买商品的张傲数量+购买活动商品的账号数量。"
content="进入活动页面但未购买商品的账号数量+购买活动商品的账号数量。"
>
<img slot="reference" :src="iconUrl" alt />
</el-popover>
......@@ -310,7 +315,7 @@ export default {
title: '会员服务',
content: '会员服务由门店根据自店服务项目创建的线上服务券,如“一年十二次洗车券”、“陶瓷镀膜”等,客户购买后可到店出示服务券享受服务,门店扫码进行次数核销。',
linkName: '设置会员服务',
path: '/memberCenter/center'
path: '/memberCenter/service'
},
{
title: '商品销售',
......@@ -337,6 +342,7 @@ export default {
this.$set(this.date, 0, start.setTime(start.getTime() - 3600 * 1000 * 24 * 14))
this.$set(this.date, 1, new Date())
this.init(this.date)
console.log(this.$globalState)
},
methods: {
init(date) {
......@@ -348,11 +354,12 @@ export default {
this.equityStatistical()
this.merchantStatistical()
},
dateChange(val) {
dateChange(val, pointUnit = 1) {
console.log(val)
const params = {
dataStartDateStr: dayjs(val[0]).format('YYYY-MM-DD'),
dataEndDateStr: dayjs(val[1]).format('YYYY-MM-DD')
dataEndDateStr: dayjs(val[1]).format('YYYY-MM-DD'),
pointUnit
}
this.timePeriodStatistics(params)
},
......@@ -386,7 +393,7 @@ export default {
// endTime = new Date(nowYear, 11, 31)
this.$set(this.date, 0, startTime)
this.$set(this.date, 1, endTime)
this.dateChange(this.date)
this.dateChange(this.date, 2)
break
}
},
......
......@@ -2,12 +2,6 @@
<template>
<div class="home-set marketing p-t-20">
<div class="container edit-container flex">
<div class="wechat-container">
<div class="wechat-box">
<img class="w-100-per" src="./images/home-set-head.png" />
<img class="w-100-per" src="./images/home-set-footer.png" />
</div>
</div>
<div class="home-set-form flex-grow">
<div v-for="(item, index) in externalFormList" :key="index">
<p class="edit-sub-title">{{ item.title }}</p>
......@@ -67,6 +61,12 @@
</glsx-combi-form>
</div>
</div>
<div class="wechat-container">
<div class="wechat-box">
<img class="w-100-per" src="./images/home-set-head.png" />
<img class="w-100-per" src="./images/home-set-footer.png" />
</div>
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" @click="handleConfirm">确定</el-button>
......
......@@ -96,8 +96,8 @@ export default {
},
{
label: '说明',
prop: 'notes'
// line: 1
prop: 'notes',
line: 4
},
{
label: '状态',
......
<!-- 评论详情 -->
<template>
<div class="edit-share marketing">
<div class="container edit-container">
<p class="edit-title">{{ title }}</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"></glsx-combi-form>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button>
</div>
</div>
</template>
<script>
export default {
name: 'commentDetail',
data() {
return {
size: 'small',
title: '评论详情',
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
routeInfo: {
// 1-新增;2-编辑;3-查看
addOrEdit: 1,
id: ''
},
editForm: {
// 专区类型(1发现频道,2商城专区)
zoneType: '2',
zoneName: '',
zoneImg: '',
merchantList: []
},
editRule: {
zoneName: [{ required: true, message: '请输入专区名称', trigger: 'change' }],
zoneImg: [{ required: true, message: '请选择专区图片', trigger: 'change' }],
merchantList: [{ required: true, message: '请选择门店', trigger: 'change' }]
},
editFormData: [
{
label: '专区名称',
name: 'zoneName',
width: '320px',
type: 'input',
maxlength: 20
},
{
label: '专区图片',
name: 'zoneImg',
type: 'upload',
width: '320px',
limitSize: 10,
maxPhotoNum: 1,
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.editForm[targetItem.name] = res
this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name)
})
}
}
]
}
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params
this.getInfo()
},
methods: {
getInfo() {
// this.$apis.zoneList.getZoneInfoApi({ id: this.routeInfo.id }).then(res => {
// this.editForm.zoneName = res.zoneName
// this.editForm.zoneImg = res.zoneImg
// this.editForm.merchantList = res.merchantRefList
// this.editForm.merchantList.forEach(item => {
// item.merchantNo = item.merchantId
// })
// })
},
handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.editForm)
if (this.routeInfo.addOrEdit == 2) {
params.id = this.routeInfo.id
}
// this.$apis.zoneList.insertZoneApi(params).then(res => {
// this.$message({
// message: res.code == '0' ? '操作成功' : '操作失败',
// type: res.code == '0' ? 'success' : 'error'
// })
// if (res.code == '0') {
// this.handleCancel()
// }
// })
}
})
},
handleCancel() {
this.$router.push({
path: '/orderComment/index'
})
}
}
}
</script>
<style scoped></style>
<!-- 评价管理-->
<template>
<div class="marketing">
<div class="container">
<div>
<glsx-combi-form ref="showSearch" labelWidth="90px" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="commentRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="scope.scope.shareStatus == 0" type="text" @click="handleRevoke(scope.scope)">发布</el-button>
<el-button v-if="scope.scope.shareStatus == 1" type="text" @click="handleRevoke(scope.scope)">撤回</el-button>
<el-button type="text" @click="handleDetail(scope.scope)">查看</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
export default {
name: 'orderComment',
data() {
return {
size: 'small',
searchForm: {
commentStatus: '',
createDate: []
},
tableSearchForm: {},
// 搜索
searchFormData: [
{
label: '评价日期',
name: 'createDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '评价状态',
name: 'commentStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'commentStatusList'
}
],
// 表格
getListApi: this.$apis.orderShare.getListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '评价日期',
prop: 'createdDate',
width: '180',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '评价状态',
prop: 'shareSource'
// formatter: cellValue => {
// return this.baseData.sourceList.find(item => item.confId == cellValue.shareSource).confName
// }
},
{
label: '评论人',
prop: 'shareStatus'
// formatter: cellValue => {
// return this.baseData.statusList.find(item => item.confId == cellValue.shareStatus).confName
// }
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
baseData: {
commentStatusList: [
{
confId: '0',
confName: '未发布'
},
{
confId: '1',
confName: '已发布'
}
]
}
}
},
mounted() {
this.getOptionsList('searchFormData')
},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate.length) {
params.createStartDate = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.createEndDate = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
delete params.createDate
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
delete this.tableSearchForm.createDate
resolve()
})
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
// this.$apis[apiModule][apiName](apiParams).then(res => {
// this.$message({
// message: res.code == '0' ? '操作成功' : res.message,
// type: res.code == '0' ? 'success' : 'error'
// })
// if (res.code == '0') {
// fn && fn()
// this.handleSearch()
// }
// })
}
}
})
},
// 1-新增;2-编辑
// handleEdit(addOrEdit, row) {
// addOrEdit == 1 ? this.$router.push('/orderShare/editShare/' + addOrEdit) : this.$router.push('/orderShare/editShare/' + addOrEdit + '/' + row.id)
// },
// 查看
handleDetail(row) {
this.$router.push('/orderComment/commentDetail/' + row.id)
},
// 发布/撤回
handleRevoke(row) {
this.secondConfirm('撤回', '是否确认撤回该评论?', 'orderShare', 'revokeShareRecordApi', { id: row.id })
},
handleDelete(row) {
this.secondConfirm('删除', '是否确认删除该评论?', 'orderShare', 'deleteShareRecordApi', { id: row.id })
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
handleSearch() {
this.$refs.commentRef.refreshTable()
},
handleReset() {
this.searchForm = {
commentStatus: '',
createDate: []
}
this.handleSearch()
}
}
}
</script>
<style scoped></style>
<!-- 订单详情 -->
<template>
<div>订单详情</div>
<div class="order-detail marketing">
<div class="container m-b-20">
<p class="edit-title">订单信息</p>
<el-form label-width="100px" :inline="true">
<el-row v-for="(item, index) in detailFormDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label">
<span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{detailForm[subItem.name]}}</span>
</el-form-item>
</el-row>
</el-form>
</div>
<div :class="['container', orderRefund ? 'm-b-20' : 'edit-container']">
<p class="edit-title">发货信息</p>
<el-form label-width="100px" :inline="true">
<el-form-item label="物流信息">
<span>{{detailForm.deliveryCompany}}&nbsp;&nbsp;&nbsp;{{detailForm.deliveryNumber}}</span>
</el-form-item>
</el-form>
<div v-if="orderGoods.length">
<table class="show-table">
<tbody>
<tr v-for="(item, index) in orderGoods" :key="index">
<td><img :src="item.goodsImage" class="img-60" /></td>
<td>{{ item.goodsName }}</td>
<td>{{ item.specificationData }}</td>
<td>{{ item.activityPrice ? item.activityPrice : item.retailPrice }}元 * {{item.goodsNumber}}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="container edit-container" v-if="orderRefund">
<p class="edit-title">售后信息</p>
<el-form label-width="100px" :inline="true">
<el-row v-for="(item, index) in afterInfoDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label">
<span class="detail-txt ellipsis-1" :title="orderRefund[subItem.name]">{{orderRefund[subItem.name] || '-'}}</span>
</el-form-item>
</el-row>
</el-form>
<div class="flex">
<img v-for="(item, index) in orderRefund.imgUrls" :key="index" class="img-60" :src="item"/>
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="default" @click="handleCancel">返回</el-button>
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import { orderManageStatusList, orderSourceList, deliveryTypeList } from '@/common/constant'
export default {
name: 'orderDetail',
data() {
return { }
return {
size: 'small',
title: '查看订单',
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
routeInfo: {
orderCode: ''
},
detailForm: {},
orderRefund: null,
orderGoods: [],
// 订单信息
detailFormDataRow: [],
detailFormData: [
{
label: '订单编号',
name: 'orderCode'
},
{
label: '订单时间',
name: 'createdDate'
},
{
label: '客户信息',
name: 'customerName'
},
{
label: '订单类型',
name: 'orderSourceName'
},
{
label: '门店信息',
name: 'merchantName'
},
{
label: '订单状态',
name: 'orderStatusName'
},
{
label: '支付总价',
name: 'payPrice'
},
{
label: '发货地址',
name: 'shipAddress'
}
],
// 售后信息
afterInfoDataRow: [],
afterInfoData: [
{
label: '售后类型',
name: 'refundTypeName'
},
{
label: '申请金额',
name: 'refundPrice'
},
{
label: '申请时间',
name: 'createdDateStr'
},
{
label: '快递公司',
name: 'deliveryCompany'
},
{
label: '快递单号',
name: 'deliveryNumber'
},
{
label: '申请描述',
name: 'remark'
}
],
// 基本数据
baseData: {
orderStatusList: orderManageStatusList,
orderSourceList: orderSourceList,
deliveryTypeList: deliveryTypeList,
refundTypeList: [
{ confId: '1', confName: '退款退货' },
{ confId: '2', confName: '退款不退货' }
]
}
}
},
mounted() {},
created() {
this.formToRow('detailFormData')
this.formToRow('afterInfoData')
},
methods: {}
}
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params
this.getInfo()
},
methods: {
formToRow(formName, numOfRow = 3) {
var rowNum = Math.ceil(this[formName].length / numOfRow)
for(var i = 0; i < rowNum; i++) {
for(var j = 0; j < numOfRow; j++) {
if(j == 0) {
this[formName + 'Row'][i] = {
rowList: []
}
}
if((i * numOfRow + j) < this[formName].length) {
this[formName + 'Row'][i].rowList.push(this[formName][i * numOfRow + j])
}
}
}
},
getInfo() {
this.$apis.orderManage.getOrderDetailApi({ orderCode: this.routeInfo.orderCode }).then(res => {
this.detailForm = res
this.orderRefund = res.orderRefund || null
if(this.orderRefund) {
this.orderRefund.refundTypeName = this.baseData.refundTypeList.map(item => item.confId).includes(res.orderRefund.refundType + '') ? this.baseData.refundTypeList.find(item => item.confId == res.orderRefund.refundType).confName : '-'
this.orderRefund.createdDateStr = dayjs(this.orderRefund.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
this.orderGoods = res.orderGoods || []
this.detailForm.payPrice = res.payPrice ? (res.payPrice + '元') : '-'
this.detailForm.orderSourceName = this.baseData.orderSourceList.map(item => item.confId).includes(res.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == res.orderSource).confName : '-'
this.detailForm.orderStatusName = this.baseData.orderStatusList.map(item => item.confId).includes(res.orderStatus + '') ? this.baseData.orderStatusList.find(item => item.confId == res.orderStatus).confName : '-'
})
},
handleCancel() {
this.$router.push({
path: '/orderManage/index'
})
}
}
}
</script>
<style scoped>
<style>
.marketing.order-detail .el-form--inline .el-form-item {
margin: 0;
}
.marketing.order-detail .el-form--inline .el-form-item__content {
height: 30px;
}
.marketing.order-detail .flex {
justify-content: flex-start;
}
.detail-txt {
display: inline-block;
width: 220px;
}
.marketing.order-detail .show-table>tbody>tr>td {
text-align: center;
vertical-align: middle;
}
.marketing.order-detail .show-table td {
padding-right: 20px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!