Commit 54ea59e4 by cwq0219

merge

2 parents 9855551a b1a3a716
......@@ -3673,6 +3673,11 @@
"assert-plus": "^1.0.0"
}
},
"dayjs": {
"version": "1.10.7",
"resolved": "https://registry.nlark.com/dayjs/download/dayjs-1.10.7.tgz",
"integrity": "sha1-LPX5Gt0oEWdIRAhmoKHSbzps5Gg="
},
"de-indent": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
......
......@@ -9,6 +9,7 @@
},
"dependencies": {
"core-js": "^3.4.4",
"dayjs": "^1.10.7",
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.6",
......
import { http } from '@/main'
const defaultPath = 'scrm.api.coupon.'
//优惠券列表
const getMerchantListApi = params => {
params.method = `${defaultPath}list.merchant`
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
//生效/失效
const effectiveCouponApi = params => {
params.method = `${defaultPath}effective`
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//删除
const deleteCouponApi = params => {
params.method = `${defaultPath}delete`
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//核销记录列表
const getVerificationListApi = params => {
params.method = `${defaultPath}verification.code.verification.list`
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
//查看优惠券
const getCouponDetailApi = params => {
params.method = `${defaultPath}detail`
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
//优惠券核销
const codeVerificationApi = params => {
params.method = `${defaultPath}verification.code.verification`
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//创建优惠券
const createCouponApi = params => {
params.method = `${defaultPath}create`
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//修改优惠券
const updateCouponApi = params => {
params.method = `${defaultPath}update`
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getMerchantListApi, getVerificationListApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi }
import { http } from '@/main'
const defaultPath = 'scrm.api.shopmall.activity.'
//分页查询活动
const getActivityPageApi = params => {
params.method = `${defaultPath}page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
//开始/结束活动
const toggleStatusApi = params => {
params.method = `${defaultPath}toggle.status`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//删除活动
const deleteActivityApi = params => {
params.method = `${defaultPath}delete`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//置顶活动
const topActivityApi = params => {
params.method = `${defaultPath}top`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getActivityPageApi, toggleStatusApi, deleteActivityApi, topActivityApi }
......@@ -16,6 +16,7 @@ import '@/components'
import { start } from '@/setup'
Vue.config.productionTip = false
Vue.prototype.$apis = apis
Vue.prototype.size = 'small'
start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
......@@ -65,6 +65,18 @@ const staticRoutes = Object.freeze([
meta: {}
},
{
name: 'couponManage',
path: '/couponManage/index',
component: resolve => require([`@/views/couponManage/index.vue`], resolve),
meta: {}
},
{
name: 'editCashCoupon',
path: '/couponManage/editCashCoupon/:addOrEdit',
component: resolve => require([`@/views/couponManage/editCashCoupon.vue`], resolve),
meta: {}
},
{
name: 'customerTransform',
path: '/customerTransform/index',
component: resolve => require([`@/views/customerTransform/index.vue`], resolve),
......@@ -105,7 +117,18 @@ const staticRoutes = Object.freeze([
path: '/orderManage/orderDetail',
component: resolve => require([`@/views/orderManage/orderDetail.vue`], resolve),
meta: {}
},
{
name: 'detailCustomer',
path: '/customerTransform/detailCustomer',
component: resolve => require([`@/views/customerTransform/detailCustomer.vue`], resolve),
meta: {}
},
{
name: 'detaiCustomeGroup',
path: '/customerTransform/detaiCustomeGroup',
component: resolve => require([`@/views/customerTransform/detaiCustomeGroup.vue`], resolve),
meta: {}
}
])
export default staticRoutes
<!-- 商品管理-门店 -->
<template>
<div class="marketing pro-group">
<div class="container">
<div>
<glsx-combi-form ref="showSearch" labelWidth="100px" :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>
<el-button :size="size" type="primary" @click="writeOff">优惠券核销</el-button>
<el-button :size="size" type="primary" @click="goback">返回</el-button>
</span>
</glsx-combi-form>
</div>
<div class="icon-tips icon-green" style="width: 98%;display: inline-block; margin-bottom: 20px;">
<img src="../../images/comment.png" />
<span>优惠券名称:<i>{{coupon.couponName}}</i></span>
<span>发行总量:<i>{{coupon.stock}}</i></span>
<span>核销总量:<i>{{coupon.usedAmount}}</i></span>
<span>有效期:<i>{{effective}}</i></span>
<span>使用限制:<i>{{useB}}</i></span>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="writeOffList" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
</GLTable>
<!-- 表格区域 end -->
</div>
<!-- 优惠券核销 -->
<glsx-dialog title="优惠券核销(请确保用户到店后核销,避免引起不必要问题)" :isVisible.sync="writeOffVisible" @confirmDialog="handleDownConfirm" @closeDialog="handleDownClose">
<el-form ref="writeOffRef" label-width="100px" :rules="writeOffRules" :model="writeOffForm">
<el-form-item label="核销码" prop="verficationCode">
<el-input :size="size" v-model="writeOffForm.verficationCode" placeholder="请输入核销码" style="width:300px;" maxlength="32"></el-input>
</el-form-item>
</el-form>
</glsx-dialog>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
export default {
name: 'writeOffDetail',
data() {
return {
size: 'small',
// 下架
writeOffVisible: false,
coupon: {
couponName: '',
stock: '',
usedAmount: ''
},
effective: '',
useB: '',
writeOffForm: {
verficationCode: ''
},
writeOffRules: {
verficationCode: [{ required: true, message: '请输入核销码', trigger: 'change' }]
},
shareForm: {},
// 表格
searchForm: {
verificationCode: ''
},
tableSearchForm: {},
// 搜索
searchFormData: [
{
label: '核销码',
name: 'verificationCode',
type: 'input',
maxlength: 20
}
],
// 表格
getListApi: this.$apis.couponManage.getVerificationListApi,
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '核销码',
prop: 'verificationCode'
},
{
label: '手机号',
prop: 'phone'
},
{
label: '领取时间',
prop: 'createdDate',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '核销时间',
prop: 'verificationTime',
formatter: cellValue => {
return dayjs(cellValue.verificationTime).format('YYYY-MM-DD HH:mm:ss')
}
},
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
baseData: {
},
}
},
components: {
},
mounted() {
this.getOptionsList('searchFormData')
this.getInfo(this.$route.params.id)
},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
params.couponId = this.$route.params.id
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
resolve()
})
},
getInfo(couponId) {
var params = {}
params.couponId = couponId
this.$apis.couponManage.getCouponDetailApi(params).then(res => {
this.coupon = res
this.effective = ''
this.useB = ''
var coupon = res
//有效期
if(coupon.effectiveType == 1){//固定天数,领取后计算
this.effective = coupon.effectiveDays + '天'
}else if(coupon.effectiveType == 2){//时间段
this.effective = coupon.effectiveStartTime + ' - ' + coupon.effectiveEndTime
}else if(coupon.effectiveType == 3){//无有效期
this.effective = '无有效期'
}
if(coupon.discountType == 3){//代金券
//使用限制
if(coupon.useBarriers == 1){//无限制
this.useB = '无限制'
}else if(coupon.useBarriers == 2){//满减
this.useB = '满' + coupon.full + '元可用'
}
}
if(coupon.discountType == 7){//会员服务
//使用限制
if(coupon.useType == 0){//无限制
this.useB = '无限制'
}else if(coupon.useType == 1){//有效期内可使用次数
this.useB = '有效期内可使用' + coupon.useAmount + '次'
}else if(coupon.useType == 2){//有效期内多少天内可使用次数
this.useB = '有效期内' + coupon.useLimitDays + '天可使用' + coupon.usedAmount + '次'
}
}
})
},
writeOff(){
this.writeOffVisible = !this.writeOffVisible
},
//返回
goback(){
this.$router.push('/couponManage/index')
},
dwonVisibleChange() {
this.$refs.writeOffRef && this.$refs.writeOffRef.clearValidate()
this.writeOffVisible = !this.writeOffVisible
},
handleDownClose() {
this.dwonVisibleChange()
this.writeOffForm = {
verficationCode: ''
}
},
handleDownConfirm() {
this.$refs.writeOffRef.validate(valid => {
if (valid) {
this.$apis.couponManage.codeVerificationApi(this.writeOffForm).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.handleDownClose()
this.handleSearch()
}
})
}
})
},
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.writeOffList.refreshTable()
},
handleReset() {
this.searchForm = {
verificationCode: ''
}
this.handleSearch()
}
}
}
</script>
<style scoped>
.modal-title span {
font-size: 12px;
font-weight: 400;
}
.icon-green {
background-color: rgba(3,153,69,.2);
border: 1px solid rgba(3,153,69,.2);
}
.icon-tips {
border-radius: 2px;
font-size: 12px;
color: #333;
line-height: 30px;
padding: 0 10px 0 30px;
position: relative;
}
.icon-tips span {
margin-right: 10px;
}
.icon-tips i {
font-style: normal;
color: #ff3f3f;
margin: 0 3px;
}
.icon-tips img {
position: absolute;
top: 8px;
left: 10px;
}
</style>
......@@ -7,24 +7,49 @@
<div class="info-box">
<div class="info-content">
<el-form :model="basicForm" :rules="basicRules" ref="basicForm" label-width="120px">
<el-form-item label="组名" prop="name">
<el-input v-model="basicForm.name" placeholder="为群聊设置一个组名" maxlength="10"></el-input>
</el-form-item>
<el-form-item label="群聊名称" prop="groupName">
<el-input v-model="basicForm.groupName" placeholder="设置群聊名称前缀,如新车售后一组" maxlength="10"></el-input>
<div class="form-tips">群聊名称后缀将以日期及序号进行累加,如“新车售后一组211011-1群”</div>
</el-form-item>
<el-form-item label="默认成员" prop="groupName">
<el-form-item label="选择群发账号" prop="groupName">
<el-button size="small" @click="openMembers">
<i class="el-icon-plus"></i>
全部成员
</el-button>
<!-- <el-input v-model="basicForm.groupName" placeholder="设置群聊名称前缀,如新车售后一组"></el-input> -->
<div class="form-tips">必须配置2个及以上成员</div>
</el-form-item>
<el-form-item label="选择客户" prop="select">
<el-radio-group v-model="basicForm.radio">
<el-radio :label="1">全部成员</el-radio>
<el-radio :label="2">筛选成员</el-radio>
</el-radio-group>
</el-form-item>
<div class="filter-box" v-show="basicForm.radio == 2">
<div class="filter-memeber">
<el-form-item label="性别">
<el-radio-group v-model="basicForm.sex">
<el-radio :label="1">全部</el-radio>
<el-radio :label="2">男性</el-radio>
<el-radio :label="3">女性</el-radio>
<el-radio :label="4">未知性别</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="所在群聊">
<el-select v-model="basicForm.value" multiple collapse-tags placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="添加客户时间">
<el-date-picker v-model="basicForm.date" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" size="small"></el-date-picker>
</el-form-item>
<el-form-item label="标签筛选"></el-form-item>
</div>
<div class="filter-footer">
<span>将消息发送给客户符合条件的客户</span>
<div class="filter-number">
查看预计群发人数
<span>6</span>
</div>
</div>
</div>
</el-form>
<!-- 编辑入群欢迎语 -->
<div class="title">编辑入群欢迎语</div>
<div class="title">编辑群发内容</div>
<div>
<WelcomeWords :eventBus="eventBus"></WelcomeWords>
</div>
......@@ -46,7 +71,7 @@
}"
>
<el-button type="primary" @click="handleNext">确定</el-button>
<el-button type="primary" @click="handleNext">取消</el-button>
<el-button type="primary" @click="handleCancel">取消</el-button>
</div>
</div>
</template>
......@@ -70,7 +95,29 @@ export default {
name: [{ required: true, message: '请输入组名', trigger: 'blur' }],
groupName: [{ required: true, message: '请输入群聊名称', trigger: 'blur' }]
},
membersVisible: false
membersVisible: false,
options: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎'
},
{
value: '选项4',
label: '龙须面'
},
{
value: '选项5',
label: '北京烤鸭'
}
]
}
},
// mounted() {
......@@ -82,6 +129,9 @@ export default {
methods: {
openMembers() {
this.membersVisible = !this.membersVisible
},
handleCancel() {
this.$router.go(-1)
}
}
}
......@@ -98,9 +148,6 @@ export default {
font-size: 16px;
color: #333;
border-bottom: 1px solid #d8d8d8;
&::after {
content: '';
}
}
.info-box {
display: inline-flex;
......@@ -110,7 +157,30 @@ export default {
justify-content: space-between;
.info-content {
width: calc(100% - 360px);
// flex: 1;
.filter-box {
margin-left: 120px;
background-color: #f7f7f7;
.filter-memeber {
padding: 20px 0;
border-bottom: 1px solid #dcdfe6;
}
.filter-footer {
display: flex;
padding: 14px 20px;
justify-content: space-between;
align-items: center;
color: #999;
font-size: 14px;
.filter-number {
padding: 7px 14px;
background-color: #e6e9ff;
color: #333;
span {
color: #5850ff;
}
}
}
}
}
}
......
......@@ -7,24 +7,19 @@
<div class="info-box">
<div class="info-content">
<el-form :model="basicForm" :rules="basicRules" ref="basicForm" label-width="120px">
<el-form-item label="组名" prop="name">
<el-input v-model="basicForm.name" placeholder="为群聊设置一个组名" maxlength="10"></el-input>
</el-form-item>
<el-form-item label="群聊名称" prop="groupName">
<el-input v-model="basicForm.groupName" placeholder="设置群聊名称前缀,如新车售后一组" maxlength="10"></el-input>
<div class="form-tips">群聊名称后缀将以日期及序号进行累加,如“新车售后一组211011-1群”</div>
<el-input v-model="basicForm.groupName" placeholder="群发名称仅内部可见" maxlength="10"></el-input>
</el-form-item>
<el-form-item label="默认成员" prop="groupName">
<el-form-item label="选择群主" prop="groupName">
<el-button size="small" @click="openMembers">
<i class="el-icon-plus"></i>
全部成员
全部账号
</el-button>
<!-- <el-input v-model="basicForm.groupName" placeholder="设置群聊名称前缀,如新车售后一组"></el-input> -->
<div class="form-tips">必须配置2个及以上成员</div>
<div class="form-tips">群主收到通知后,可选择他管理的客户群并群发该内容。</div>
</el-form-item>
</el-form>
<!-- 编辑入群欢迎语 -->
<div class="title">编辑入群欢迎语</div>
<div class="title">编辑群发内容</div>
<div>
<WelcomeWords :eventBus="eventBus"></WelcomeWords>
</div>
......@@ -43,7 +38,7 @@
}"
>
<el-button type="primary" @click="handleNext">确定</el-button>
<el-button type="primary" @click="handleNext">取消</el-button>
<el-button type="primary" @click="handleCancel">取消</el-button>
</div>
<glsx-dialog :title="'选择成员'" :width="'712px'" :isVisible="membersVisible" @confirmDialog="handleConfirm" @closeDialog="membersVisible = !membersVisible">
<SelectMembers ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp"></SelectMembers>
......@@ -82,6 +77,9 @@ export default {
methods: {
openMembers() {
this.membersVisible = !this.membersVisible
},
handleCancel() {
this.$router.go(-1)
}
}
}
......@@ -98,9 +96,6 @@ export default {
font-size: 16px;
color: #333;
border-bottom: 1px solid #d8d8d8;
&::after {
content: '';
}
}
.info-box {
display: inline-flex;
......
<template>
<div class="container">
<div class="title">基础信息</div>
<div class="content">
<div class="content-info">
<div class="content-text">
<div class="detail-item">
<div class="detail-label">创建者:</div>
<div class="detail-value">超级管理员</div>
</div>
<div class="detail-item">
<div class="detail-label">群发内容:</div>
<div class="detail-value">超级管理员</div>
<div class="detail-tips">详见右侧视图</div>
</div>
<div class="detail-item">
<div class="detail-label">创建者:</div>
<div class="detail-value">超级管理员</div>
</div>
<div class="detail-item">
<div class="detail-label">创建者:</div>
<div class="detail-value">超级管理员</div>
</div>
</div>
<div class="title">数据统计</div>
<div class="statistics-info">
<div class="statistics-ul">
<div class="statistics-li statistics-border">
<div class="statistics-number">
<span>0</span>
人
</div>
<div>已发送群主</div>
</div>
<div class="statistics-li">
<div class="statistics-number">
<span>0</span>
人
</div>
<div>已发送群主</div>
</div>
</div>
<div class="statistics-ul">
<div class="statistics-li statistics-border">
<div class="statistics-number">
<span>0</span>
人
</div>
<div>已发送群主</div>
</div>
<div class="statistics-li">
<div class="statistics-number">
<span>0</span>
人
</div>
<div>已发送群主</div>
</div>
</div>
<div class="statistics-ul">
<div class="statistics-li">
<div class="statistics-number">
<span>0</span>
人
</div>
<div>已发送群主</div>
</div>
</div>
</div>
</div>
<Preview></Preview>
</div>
</div>
</template>
<script>
import Preview from '../components/preview.vue'
export default {
name: 'BasicInof',
components: {
Preview
},
data() {},
methods: {}
}
</script>
<style lang="scss" scope>
.container {
margin-bottom: 20px;
background-color: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
.title {
padding: 20px 0 17px 20px;
font-size: 16px;
color: #333;
border-bottom: 1px solid #d8d8d8;
}
.content {
display: flex;
align-items: flex-end;
justify-content: space-between;
box-sizing: border-box;
width: 100%;
height: 100%;
padding: 20px 24px 40px 0;
.content-info {
width: calc(100% - 360px);
.content-text {
padding-left: 52px;
height: 400px;
}
.detail-item {
display: flex;
font-size: 14px;
color: #333;
line-height: 20px;
margin-bottom: 24px;
.detail-tips {
margin-left: 8px;
color: #939393;
}
}
.statistics-info {
display: flex;
justify-content: space-between;
margin-top: 24px;
margin-left: 52px;
.statistics-ul {
border-radius: 2px;
background-color: #f6f6ff;
border: 1px solid rgba(88, 80, 255, 0.8);
}
.statistics-li {
display: inline-block;
width: 142px;
color: #424242;
font-size: 14px;
text-align: center;
margin: 42px 35px;
&.statistics-border {
padding-right: 35 px;
margin-right: 0;
border-right: 1px solid #5850ff;
}
.statistics-number {
margin-bottom: 12px;
font-size: 16px;
color: #333;
span {
font-size: 26px;
}
}
}
}
}
}
}
</style>
......@@ -41,17 +41,20 @@ export default {
currentTime: ''
}
},
created() {
this.eventBus.$on('update', val => {
console.log(val)
this.previewList = val
})
},
mounted() {
console.log(1111, this.eventBus)
const date = new Date()
let hours = date.getHours()
hours = hours < 10 ? `0${hours}` : hours
let minutes = date.getMinutes()
minutes = minutes < 10 ? `0${minutes}` : minutes
this.currentTime = `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日 ${hours}:${minutes}`
this.eventBus.$on('update', val => {
console.log(val)
this.previewList = val
})
}
}
</script>
......
<template>
<div class="welcome-box">
<div class="required">入群欢迎语</div>
<div class="content">
<div class="content content-bg">
<el-input type="textarea" :rows="9" maxlength="600" show-word-limit v-model="guestForm.name" placeholder="请输入内容"></el-input>
<div>
<div class="welcome-file" v-for="itm in previewList" :key="itm.id">
<div class="welcome-file" v-for="(itm, index) in previewList" :key="itm.id">
<template v-if="itm.type == 'img'">
<img src="../../../assets/guestCustom/icon-img.png" alt="" />
<span>{{ itm.name }}</span>
......@@ -17,7 +17,7 @@
<img src="../../../assets/guestCustom/icon-applet.png" alt="" />
<span>{{ itm.title }}</span>
</template>
<i class="el-icon-circle-close"></i>
<i class="el-icon-circle-close" @click="close(index)"></i>
</div>
</div>
<div class="btn-group">
......@@ -30,11 +30,23 @@
</div>
<div class="tips-text">
<img src="../../../assets/guestCustom/tips.png" class="tips-icon" alt="" />
<span>欢迎语将在客户进群时发送一次,不设置时不发送入群欢迎语。</span>
<span>客户每个月最多接收来自同一企业的管理员的 4 条群发消息,4条消息可在同一天发送,达到上限后,无法再接收管理员的群发消息。</span>
</div>
</div>
<div class="required">发送时间</div>
<div class="content">
<el-radio-group v-model="radio">
<el-radio :label="1">立即发送</el-radio>
<el-radio :label="2">定时发送</el-radio>
</el-radio-group>
<div v-show="radio == 2" class="date-picker">
<el-date-picker v-model="value1" size="small" type="date" placeholder="选择日期"></el-date-picker>
-
<el-time-picker v-model="value2" size="small" placeholder="选择时间"></el-time-picker>
</div>
</div>
<basic-dialog :title="dialogTitle" :width="'712px'" :isVisible="dialogVisible" @confirmDialog="handleConfirm" @closeDialog="dialogVisible = !dialogVisible">
<glsx-dialog :title="dialogTitle" :width="'712px'" :isVisible="dialogVisible" @confirmDialog="handleConfirm" @closeDialog="dialogVisible = !dialogVisible">
<slot>
<el-form v-if="dialogTitle == '添加网页消息'" :model="linkForm" :rules="linkRules" ref="linkForm" label-width="120px">
<el-form-item label="网页标题" prop="name">
......@@ -65,7 +77,7 @@
</el-form-item>
</el-form>
</slot>
</basic-dialog>
</glsx-dialog>
</div>
</template>
......@@ -167,10 +179,14 @@ export default {
type: 'text',
content: 'fasf'
}
]
],
radio: '',
value1: '',
value2: ''
}
},
mounted() {
console.log(this.previewList)
this.eventBus.$emit('update', this.previewList)
},
methods: {
......@@ -239,6 +255,10 @@ export default {
default:
console.log(dialogTitle)
}
},
close(index) {
this.previewList.splice(index, 1)
this.eventBus.$emit('update', this.previewList)
}
}
}
......@@ -249,12 +269,14 @@ export default {
padding-top: 20px;
margin-left: 87px;
}
.content-bg {
background-color: #f7f7f7;
}
.content {
display: inline-block;
vertical-align: text-top;
width: calc(100% - 103px);
margin-left: 12px;
background-color: #f7f7f7;
.welcome-file {
display: flex;
align-items: center;
......@@ -311,10 +333,17 @@ export default {
}
}
}
.date-picker {
margin-top: 10px;
font-size: 14px;
color: #999;
}
}
.required {
display: inline-block;
line-height: 40px;
text-align: right;
width: 90px;
}
.required::before {
content: '*';
......
<template>
<div>
<BasicInof></BasicInof>
<div class="detail-container">
<glsx-combi-form ref="showSearch" labelWidth="90px" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="search-btns">
<el-button :size="size" type="primary" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
<!-- 表格区域 开始 -->
<GLTable ref="table" :tableData="tableData" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" :disabled="scope.scope.isRemind == 1" @click="btnClick('edit', scope.scope)">提醒发送</el-button>
</div>
</GLTable>
</div>
<div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button type="primary" @click="handleNext">确定</el-button>
<el-button type="primary" @click="handleCancel">取消</el-button>
</div>
</div>
</template>
<script>
import BasicInof from './components/basicInfo.vue'
export default {
components: {
BasicInof
},
data() {
return {
searchForm: {},
searchFormData: [
{
label: '群聊名称',
name: 'zoneName',
type: 'input',
maxlength: 20
},
{
label: '群主',
name: 'createDate',
type: 'select',
isClear: true,
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: 12,
value: 12
}
]
},
{
label: '送达状态',
name: 'createDate',
type: 'select',
isClear: true,
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: 12,
value: 12
}
]
}
],
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '群聊名称',
prop: 'zoneName'
},
{
label: '群主',
prop: 'zoneName'
},
{
label: '群主所在部门',
prop: 'zoneName'
},
{
label: '群客户人数',
prop: 'zoneName'
},
{
label: '消息送达状态',
prop: 'zoneName'
},
{
label: '确认发送时间',
prop: 'createdDate',
formatter: cellValue => {
return new Date(cellValue.createdDate).toLocaleDateString().replace(/\//g, '-')
}
},
{
label: '操作',
prop: 'optionBtns',
width: '140px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
tableData: [
{
zoneName: 'fasd',
isRemind: 1
},
{
zoneName: 'fasd',
isRemind: 2
}
]
}
},
methods: {
handleCancel() {
this.$router.go(-1)
}
}
}
</script>
<style lang="scss" scope>
.detail-container {
margin-bottom: 84px;
padding: 20px;
background-color: #ffffff;
box-shadow: 0px 1px 5px 0px rgba(38, 38, 38, 0.1);
.search-btns {
float: right;
}
}
.footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
width: 100%;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
</style>
<template>
<div>
<BasicInof></BasicInof>
<div class="detail-container">
<div class="detail-modular">
<div class="title">员工详情</div>
<div class="detail-info">
<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
<el-menu-item index="1">全部</el-menu-item>
<el-menu-item index="2">已发送员工</el-menu-item>
<el-menu-item index="3">未发送员工</el-menu-item>
<el-menu-item index="4">员工发送失败</el-menu-item>
</el-menu>
<div class="detail-total">共 {{ employeelist.length || 0 }} 人</div>
<div class="info-list">
<div class="info-item" v-for="item in employeelist" :key="item.id">
<img class="info-avatar" src="../../assets/logo.png" alt="" />
<div class="info-content">
<div class="info-text">
<div class="info-name">
{{ item.name }}
<span :class="[item.status == 1 ? 'unsend' : 'send']">{{ item.status == 1 ? '未' : '已' }}发送</span>
</div>
<div class="info-num">共{{ item.num }}个客户</div>
</div>
<div class="info-right">
<div v-if="item.status == 1">已提醒</div>
<el-button size="mini" type="primary">提醒</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="detail-modular">
<div class="title">客户详情</div>
<div class="detail-info">
<el-menu :default-active="customIndex" class="el-menu-demo" mode="horizontal" @select="handleCustomSelect">
<el-menu-item index="1">全部</el-menu-item>
<el-menu-item index="2">已发送员工</el-menu-item>
<el-menu-item index="3">未发送员工</el-menu-item>
<el-menu-item index="4">员工发送失败</el-menu-item>
</el-menu>
<div class="detail-total">共 {{ employeelist.length || 0 }} 人</div>
<div class="info-list">
<div class="info-item" v-for="item in employeelist" :key="item.id">
<img class="info-avatar" src="../../assets/logo.png" alt="" />
<div class="info-content info-custom">
<div class="info-text">
<div class="info-name">
{{ item.name }}
<div :class="[item.status == 1 ? 'unsend' : 'send']">{{ item.status == 1 ? '未' : '已' }}发送</div>
</div>
</div>
<div class="info-right">
<div>通过 胡悦发送</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button type="primary" @click="handleNext">确定</el-button>
<el-button type="primary" @click="handleCancel">取消</el-button>
</div>
</div>
</template>
<script>
import BasicInof from './components/basicInfo.vue'
export default {
components: {
BasicInof
},
data() {
return {
activeIndex: '1',
customIndex: '1',
employeelist: [
{
id: 1,
name: 'anadf',
status: 1,
num: 1,
url: 'dfsa'
},
{
id: 2,
name: 'anadf',
status: 2,
num: 1,
url: 'dfsa'
},
{
id: 3,
name: 'anadf',
status: 2,
num: 1,
url: 'dfsa'
},
{
id: 4,
name: 'anadf',
status: 2,
num: 1,
url: 'dfsa'
},
{
id: 5,
name: 'anadf',
status: 2,
num: 1,
url: 'dfsa'
},
{
id: 6,
name: 'anadf',
status: 2,
num: 1,
url: 'dfsa'
}
]
}
},
methods: {
handleSelect(val) {
console.log(val)
this.activeIndex = val
},
handleCustomSelect(val) {
this.customIndex = val
},
handleCancel() {
this.$router.go(-1)
}
}
}
</script>
<style lang="scss" scope>
.detail-container {
display: flex;
width: 100%;
justify-content: space-between;
margin-bottom: 84px;
.detail-modular {
width: calc(50% - 10px);
background-color: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
}
.title {
padding: 20px 0 17px 20px;
font-size: 16px;
color: #333;
border-bottom: 1px solid #d8d8d8;
}
.detail-info {
padding: 0 20px;
.detail-total {
padding: 31px 0 14px;
font-size: 14px;
color: #333;
line-height: 16px;
}
.info-list {
max-height: 432px;
overflow: auto;
margin-bottom: 20px;
}
.info-item {
display: flex;
align-items: center;
background-color: #f6f6ff;
border-radius: 2px;
border: 1px solid rgba(88, 80, 255, 0.8);
padding: 15px;
margin-bottom: 20px;
&:last-child {
margin-bottom: 0;
}
.info-avatar {
width: 58px;
height: 58px;
margin-right: 20px;
}
.info-content {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
.info-text {
height: 62px;
}
.info-right {
display: flex;
align-items: center;
font-size: 16px;
color: #5850ff;
line-height: 22px;
}
.info-name {
font-size: 16px;
color: #333;
font-weight: 500;
line-height: 22px;
margin-bottom: 14px;
span {
display: inline-block;
margin-left: 10px;
font-size: 14px;
}
.send {
color: #666;
}
.unsend {
padding: 3px 10px;
background-color: #eb4e4e;
color: #fff;
border-radius: 2px;
}
div {
margin-top: 10px;
font-size: 14px;
}
}
.info-num {
font-size: 14px;
color: #666;
line-height: 20px;
}
button {
margin-left: 10px;
padding: 9px 28px;
}
}
}
}
.el-menu.el-menu--horizontal {
border-bottom: none;
}
.el-menu--horizontal > .el-menu-item.is-active {
border-bottom-color: #5850ff;
color: #5850ff;
}
}
.footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
width: 100%;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
</style>
......@@ -15,8 +15,8 @@
<span v-for="(i, index) in scope.scope.userList" :key="index">{{ i.name }}({{ i.tips }});</span>
</div> -->
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" :disabled="scope.scope.isRemind == 1" @click="btnClick('edit', scope.scope)">提醒发送</el-button>
<el-button type="text" @click="btnClick('detail', scope.scope)">详情</el-button>
<el-button type="text" :disabled="scope.scope.isRemind == 1" @click="btnClick('edit', 1, scope.scope)">提醒发送</el-button>
<el-button type="text" @click="btnClick('detail', 2, scope.scope)">详情</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -32,8 +32,8 @@
<span v-for="(i, index) in scope.scope.userList" :key="index">{{ i.name }}({{ i.tips }});</span>
</div> -->
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" :disabled="scope.scope.isRemind == 1" @click="btnClick('edit', scope.scope)">提醒发送</el-button>
<el-button type="text" @click="btnClick('detail', scope.scope)">详情</el-button>
<el-button type="text" :disabled="scope.scope.isRemind == 1" @click="btnClick('edit', 2, scope.scope)">提醒发送</el-button>
<el-button type="text" @click="btnClick('detail', 2, scope.scope)">详情</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -197,6 +197,13 @@ export default {
this.$router.push('/customerTransform/addCustomerGroup')
}
break
case 'detail':
if (type == 1) {
this.$router.push('/customerTransform/detailCustomer')
} else {
this.$router.push('/customerTransform/detaiCustomeGroup')
}
break
default:
console.log(11)
}
......
<!-- 商品管理-门店 -->
<template>
<div class="marketing pro-group">
<div class="m-b-20">
<el-button :size="size" type="primary" class="el-icon-plus" @click="addCashCoupon()">新增秒杀活动</el-button>
</div>
<div class="container">
<div>
<glsx-combi-form ref="showSearch" labelWidth="100px" :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="coupon" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<template slot="activityImg" slot-scope="scope">
<img class="img-60" :src="scope.scope.activityImg"/>
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="scope.scope.activityStatus == '1'" type="text" @click="start(scope.scope)">开始</el-button>
<el-button v-if="scope.scope.activityStatus == '2'" type="text" @click="end(scope.scope)">结束</el-button>
<el-button v-if="scope.scope.activityStatus == '1'" type="text" @click="handleEdit(2,scope.scope)">编辑</el-button>
<el-button v-if="scope.scope.activityStatus == '2' || scope.scope.activityStatus == '3'" type="text" @click="handleEdit(3,scope.scope)">查看</el-button>
<el-button v-if="scope.scope.activityStatus == '3'" type="text" @click="del(scope.scope)">删除</el-button>
<el-button type="text" @click="topping(scope.scope)">置顶</el-button>
<el-button v-if="scope.scope.activityStatus == '1' || scope.scope.activityStatus == '2'" type="text" @click="share(scope.scope)">分享</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
<!-- 分享 -->
<share-dialog :isShareVisible="isShareVisible" :shareForm="shareForm" @handleShareClose="handleShareClose"></share-dialog>
</div>
</template>
<script>
import shareDialog from '../productGroup/components/shareDialog'
import * as dayjs from 'dayjs'
export default {
name: 'coupon',
data() {
return {
size: 'small',
downForm: {
id: '',
offReason: '',
goodsStatus: 0
},
// 分享
isShareVisible: false,
shareForm: {},
// 表格
searchForm: {
activityName: '',
activityStatus: ''
},
tableSearchForm: {},
// 搜索
searchFormData: [
{
label: '活动名称',
name: 'activityName',
type: 'input',
maxlength: 20
},
{
label: '状态',
name: 'activityStatus',
type: 'select',
width: '160px',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'statusList'
}
],
// 表格
getListApi: this.$apis.seckillActivity.getActivityPageApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '活动名称',
prop: 'activityName'
},
{
label: '缩略图',
prop: 'activityImg',
addHtml: 'activityImg'
},
{
label: '浏览量(次)',
prop: 'viewAmount'
},
{
label: '销量',
prop: 'saleAmount'
},
{
label: '秒杀价(元)',
name: 'activityPrice',
formatter: cellValue => {
if(cellValue.activityPrice){
return (cellValue.activityPrice/100).toFixed(2);
}
return '';
}
},
{
label: '库存',
prop: 'goodsStock'
},
{
label: '创建日期',
name: 'createdDate',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '活动状态',
name: 'activityStatus',
formatter: cellValue => {
return this.baseData.statusList.find(item => item.confId == cellValue.activityStatus).confName
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total'},
baseData: {
statusList: [{
confId: '1',
confName: '未开始 '
}, {
confId: '2',
confName: '进行中'
}, {
confId: '3',
confName: '已结束'
}],
}
}
},
components: {
shareDialog
},
mounted() {
this.getOptionsList('searchFormData')
},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
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()
}
})
}
}
})
},
//开始
start(item){
this.startOrEndConfirm('开始',item)
},
//结束
end(item){
this.startOrEndConfirm('结束',item)
},
startOrEndConfirm(txt,row) {
var title = txt
var params = {}
params.id = row.id
if(txt == '开始'){
params.activityStatus = '2' //活动状态(1:未开始,2:开始,3:结束)
}else if(txt == '结束'){
params.activityStatus = '3' //活动状态(1:未开始,2:开始,3:结束)
}
this.secondConfirm(title, '确定要' + txt + '此活动?', 'seckillActivity', 'toggleStatusApi', params)
},
//置顶
topping(row){
var params = {}
params.id = row.id
this.secondConfirm('删除', '确定置顶此活动?', 'seckillActivity', 'topActivityApi', params)
},
//删除
del(row){
var params = {}
params.id = row.id
this.secondConfirm('删除', '确定删除此活动?', 'seckillActivity', 'deleteActivityApi', params)
},
//新增代金券
addCashCoupon() {
this.$router.push('/couponManage/editCashCoupon/1')
},
// addOrEdit:1-新增;2-编辑;3-查看
handleEdit(addOrEdit, row) {
var goto = ''
if(row.discountType == '3'){//代金券
goto = '/couponManage/editCashCoupon/'
}else if(row.discountType == '7'){//会员服务
goto = '/couponManage/editMemberService/'
}
console.log(goto + addOrEdit + '/' + row.id);
this.$router.push(goto + addOrEdit + '/' + row.id)
},
handleShare(row) {
this.$apis.proManage.getProShareApi({ id: row.id }).then(res => {
this.shareForm = res
this.handleShareClose()
})
},
handleShareClose() {
this.isShareVisible = !this.isShareVisible
},
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.coupon.refreshTable()
},
handleReset() {
this.searchForm = {
activityName: '',
activityStatus: ''
}
this.handleSearch()
}
}
}
</script>
<style scoped></style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!