Commit d6ceda04 by xuyl

Merge branch 'v2.0.0' of http://192.168.3.233:8090/saas/scrm-micro-marketing into xuyl-dev-v2.0.0

2 parents 6df7890e 213f28a4

351 Bytes | W: | H:

599 Bytes | W: | H:

src/assets/guestCustom/icon-video.png
src/assets/guestCustom/icon-video.png
src/assets/guestCustom/icon-video.png
src/assets/guestCustom/icon-video.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -20,7 +20,7 @@ export const fetchConfig = function (isEnv = true) {
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
// return new Http().get('http://192.168.3.171:7300/mock/619c87331072f92988f05a29/marketing/config')
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
}
export const config = {
install(vue, cfg) {
......
......@@ -33,17 +33,36 @@
<el-radio v-model="editForm.useChannel" label="1" :disabled="apear != 'couponAdd'">线上商品</el-radio>
<el-radio v-model="editForm.useChannel" label="2" :disabled="apear != 'couponAdd'">到店核销</el-radio>
</template>
<template slot="directionalFlagHtml">
<template slot="directionalFlagHtml" v-if="editForm.useChannel != 1">
<div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">创建成功后立即生效,所有小程序用户均可领用</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<span class="promptCopy">企微员工通过企微工作台定向礼包发送给客户</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
<span class="promptCopy">关联商品,用户支付成功后才能进行核销使用</span>
</div>
</template>
<template slot="directionalFlagHtml" v-else>
<div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">创建成功后立即生效,所有小程序用户均可领用</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<span class="promptCopy">企微员工通过企微工作台定向礼包发送给客户</span>
</div>
</template>
<template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="3" :disabled="apear != 'couponAdd'">无有效期</el-radio>
<br />
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'">
<el-date-picker v-model="editForm.effectiveTime" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOption" :default-time="defaultTime" :format="format" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
<el-date-picker v-model="editForm.effectiveTime" @change="haveChange" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOption" :default-time="defaultTime" :format="format" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays">
......@@ -342,7 +361,8 @@ export default {
},
'editForm.effectiveTime'(newValue, oldValue) {
if (newValue && newValue.length == 2) {
this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
// this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
this.couponTime = newValue[0] + ' ~ ' + newValue[1]
} else {
this.couponTime = ''
}
......@@ -416,6 +436,11 @@ export default {
},
methods: {
haveChange() {
let oDateOne = new Date(this.editForm.effectiveTime[0]).getTime()
let timeStamp = new Date().getTime()
if(oDateOne < timeStamp) this.editForm.effectiveTime = []
},
// 编辑按钮
editMessage() {
let anticipatedCostIndex = this.editFormData.findIndex(item => item.name == 'anticipatedCost')
......@@ -845,4 +870,10 @@ export default {
word-break: break-word;
overflow: auto;
}
.promptCopy {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
margin-left: -10px;
}
</style>
......@@ -50,14 +50,23 @@
<p class="edit-title">{{ title }}折扣劵</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="directionalFlagHtml">
<div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">创建成功后立即生效,所有小程序用户均可领用</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<span class="promptCopy">企微员工通过企微工作台定向礼包发送给客户</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
<span class="promptCopy">关联商品,用户支付成功后才能进行核销使用</span>
</div>
</template>
<template slot="effectiveHtml">
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'">
<el-date-picker v-model="editForm.effectiveTime" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
<el-date-picker v-model="editForm.effectiveTime" @change="haveChange" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays">
......@@ -242,7 +251,8 @@ export default {
},
'editForm.effectiveTime'(newValue, oldValue) {
if (newValue && newValue.length == 2) {
this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
// this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
this.couponTime = newValue[0] + ' ~ ' + newValue[1]
} else {
this.couponTime = ''
}
......@@ -257,6 +267,11 @@ export default {
},
methods: {
haveChange() {
let oDateOne = new Date(this.editForm.effectiveTime[0]).getTime()
let timeStamp = new Date().getTime()
if(oDateOne < timeStamp) this.editForm.effectiveTime = []
},
// 编辑按钮
editMessage() {
let anticipatedCostIndex = this.editFormData.findIndex(item => item.name == 'anticipatedCost')
......@@ -642,4 +657,10 @@ export default {
word-break: break-word;
overflow: auto;
}
.promptCopy {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
margin-left: -10px;
}
</style>
......@@ -29,14 +29,23 @@
<p class="edit-title">{{ title }}兑换券</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="directionalFlagHtml">
<div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">创建成功后立即生效,所有小程序用户均可领用</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<span class="promptCopy">企微员工通过企微工作台定向礼包发送给客户</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
<span class="promptCopy">关联商品,用户支付成功后才能进行核销使用</span>
</div>
</template>
<template slot="effectiveHtml">
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'">
<el-date-picker v-model="editForm.effectiveTime" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
<el-date-picker v-model="editForm.effectiveTime" @change="haveChange" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays">
......@@ -220,7 +229,8 @@ export default {
},
'editForm.effectiveTime'(newValue, oldValue) {
if (newValue && newValue.length == 2) {
this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
// this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
this.couponTime = newValue[0] + ' ~ ' + newValue[1]
} else {
this.couponTime = ''
}
......@@ -235,6 +245,11 @@ export default {
},
methods: {
haveChange() {
let oDateOne = new Date(this.editForm.effectiveTime[0]).getTime()
let timeStamp = new Date().getTime()
if(oDateOne < timeStamp) this.editForm.effectiveTime = []
},
// 编辑按钮
editMessage() {
let anticipatedCostIndex = this.editFormData.findIndex(item => item.name == 'anticipatedCost')
......@@ -516,4 +531,10 @@ export default {
word-break: break-word;
overflow: auto;
}
.promptCopy {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
margin-left: -10px;
}
</style>
......@@ -38,7 +38,7 @@
<i :class="{ 'el-icon-refresh': true, 'wait-status': refreshStatus }"></i>
更新数据
</span>
<span class="info-time">更新于:{{basicInfo.updatedTime}}</span>
<span class="info-time">更新于:{{this.updatedTime}}</span>
</div>
<div class="statistics-info">
<div class="statistics-ul">
......@@ -98,6 +98,7 @@ export default {
},
data() {
return {
updatedTime: '',
refreshStatus: false,
STATUS_TYPE: STATUS,
SEX_TYPE: SEX,
......@@ -141,6 +142,7 @@ export default {
getCustomerDetail() {
const id = this.$route.query.id
this.$apis.friendGroup.momentDetail({ id }).then(res => {
this.updatedTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
this.basicInfo = res
// console.log(this.basicInfo, '123');
// this.basicInfo.sendTime = dayjs(this.basicInfo.sendTime).format('YYYY-MM-DD HH:mm:ss')
......
<template>
<div class="img-bg">
<div class="preview-content">
<div class="preview-info">
<div class="preview-info" v-show="previewList.length">
<img class="avatar" src="@/assets/guestCustom/default-customer.png" alt />
<div class="preview-box" v-for="item in previewList" :key="item.id">
<div class="preview-box-desc">
......@@ -38,10 +38,12 @@
<div class="preview-operation">赞 | 评论</div>
</div>
</div>
<el-dialog :visible.sync="videoShow" width="50%" :before-close="handleClose" class="video-dialog">
<div slot="title" style="height: 18px"></div>
<video v-if="videoShow" width="100%" height="100%" autoplay controls :src="this.videoUrl"></video>
</el-dialog>
<div class="video-dialog" v-if="videoShow">
<div class="video-dialog-panel">
<div class="video-close"><i class="el-icon-close" @click="videoShow = false"></i></div>
<video height="100%" autoplay controls :src="this.videoUrl"></video>
</div>
</div>
</div>
</template>
......@@ -112,10 +114,9 @@ export default {
}
</script>
<style lang="scss" scope>
<style lang="scss" scoped>
.img-list {
margin-right: 3px;
margin-bottom: -10px;
}
.img-bg {
position: relative;
......@@ -166,7 +167,7 @@ export default {
color: #556993;
}
.video-panel {
width: 136px;
width: 100%;
height: 102px;
display: flex;
align-items: center;
......@@ -183,20 +184,23 @@ export default {
}
}
.preview-text {
font-size: 14px;
position: relative;
color: #333;
background-color: #fff;
border-radius: 4px;
word-break: break-all;
display: flex;
img {
line-height: 20px;
/deep/ img {
width: 20px;
height: 20px;
vertical-align: middle;
}
}
.text {
font-size: 12px;
padding: 8px 0px;
padding: 0px;
margin-bottom: 6px;
}
.preview-link {
padding: 6px 0px;
......@@ -270,12 +274,35 @@ export default {
}
}
.video-dialog {
.el-dialog__header {
border-bottom: 0px;
background-color: rgb(0, 0, 0);
z-index: 2001;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: auto;
background: rgba($color: #000000, $alpha: 0.5);
&-panel {
background: #000000;
position: absolute;
top: 100px;
left: 50%;
transform: translateX(-50%);
height: calc(100% - 200px);
width: auto;
box-sizing: border-box;
padding: 10px 20px 20px;
overflow: hidden;
.video-close {
display: flex;
justify-content: flex-end;
height: 40px;
i {
cursor: pointer;
font-size: 25px;
color: #5850ff;
}
}
.el-dialog__body {
padding: 0px;
}
}
</style>
......@@ -350,6 +350,7 @@ export default {
-webkit-user-select: none;
cursor: default;
pointer-events: none;
vertical-align: middle;
}
.active {
background: #dcdfe6;
......
......@@ -2,7 +2,7 @@
<div class="welcome-box">
<!-- <div class="required">入群欢迎语</div> -->
<div class="content">
<div class="content-bg">
<div class="content-bg" v-loading="loading">
<!-- <div id="nick" contenteditable="false" class="nickname">
@昵称
<i class="el-icon-error"></i>
......@@ -196,7 +196,6 @@ export default {
this.$message.error('上传图片大小不能超过' + limitSize + 'MB!')
return true
}
this.loading = true
reader.readAsDataURL(file)
reader.onload = e => {
var image = new Image()
......@@ -225,6 +224,7 @@ export default {
console.log(imgIndex)
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
this.loading = true
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
let len = this.previewList.length - 1
if (res) {
......@@ -261,6 +261,7 @@ export default {
return item.attType == ATT_TYPE.TEXT
})
this.eventBus.$emit('update', this.previewList)
this.loading = true
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
this.previewList.push({
......@@ -271,6 +272,7 @@ export default {
this.eventBus.$emit('update', this.previewList)
})
}
this.loading = false
})
document.querySelector('.upload-video').value = ''
}
......
......@@ -24,6 +24,15 @@
</el-tag>
</div>
</div>
<div class="filter-footer">
<!-- <span>将消息发送给客户符合条件的客户</span> -->
<div class="filter-number">
查看客户数
<el-button type="text" v-show="isUpdate" :loading="viewLoading" @click="viewMembers">查看</el-button>
<!-- <span v-show="isUpdate" @click="viewMembers">查看</span> -->
<span v-show="!isUpdate">{{ groupNumber }}</span>
</div>
</div>
</el-form-item>
</el-form>
<!-- 编辑入群欢迎语 -->
......@@ -60,8 +69,8 @@
</glsx-dialog>
</div>
<GLFooter>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" v-loading="addLoading" @click="handleSubmit">通知成员发送</el-button>
<el-button type="primary" @click="handleCancel">取消</el-button>
</GLFooter>
</div>
</template>
......@@ -140,12 +149,12 @@ export default {
type: 'video',
funName: 'video'
},
{
id: 4,
name: '活动',
type: 'acivity',
funName: 'activity'
}
// {
// id: 4,
// name: '活动',
// type: 'acivity',
// funName: 'activity'
// }
],
basicForm: {
selectType: 1,
......@@ -230,6 +239,41 @@ export default {
this.$router.push('/friendGroup/index')
}
},
// 查看群发人数
viewMembers() {
if (!this.basicForm.userList) {
this.$message({
type: 'error',
message: '请选择发表成员'
})
return
}
this.viewLoading = true
const userList = this.basicForm.userList.map(item => {
return {
staffId: item.staffId,
staffName: item.staffName,
masterStatus: item.masterStatus,
follow: item.follow
}
})
let params = {
userList
}
this.$apis.friendGroup
.momentCount(params)
.then(res => {
// if (res) {
this.viewLoading = false
this.groupNumber = res
// }
this.isUpdate = false
})
.catch(err => {
this.viewLoading = false
this.groupNumber = 0
})
},
// 成员弹窗
handleConfirm() {
console.log(this.$refs.membersForm.innerTags)
......@@ -387,6 +431,7 @@ export default {
font-size: 14px;
color: #999999;
margin-left: 10px;
font-weight: 100;
}
}
.info-box {
......@@ -412,6 +457,7 @@ export default {
}
.filter-footer {
margin-top: 10px;
display: flex;
// padding: 14px 20px;
justify-content: space-between;
......
......@@ -269,7 +269,7 @@ export default {
border-bottom: 1px solid #d8d8d8;
}
.detail-info {
padding: 0 20px;
padding: 0 20px 20px;
.detail-total {
padding: 20px 0 14px;
font-size: 14px;
......
......@@ -3,7 +3,7 @@
<div class="marketing pro-group p-t-20">
<div class="m-b-20 friend-title">
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建商品</el-button> -->
<el-button :size="size" type="primary" fn="发布朋友圈" @click="handleEdit(1)">发布朋友圈</el-button>
<GLButton :size="size" type="primary" fn="编辑朋友圈" @click="handleEdit(1)">发布朋友圈</GLButton>
<span>管理员可直接在后台为员工创建朋友圈,员工收到朋友圈新消息提醒后,可快捷将管理员创建的朋友圈发送到自己朋友圈中。</span>
</div>
<div class="container">
......@@ -28,23 +28,26 @@
<div class="image-num">{{ scope.scope.previewListImg.length }}</div>
<div class="image-panel"><img src="@/assets/imgNum.png" /></div>
</div>
<div class="attachmentList-image attachmentList-video" v-if="index == 0 && item.attType == 3 && scope.scope.materialType == 3"><i class="el-icon-video-play"></i></div>
<div class="attachmentList-image attachmentList-video" v-if="index == 0 && item.attType == 3 && scope.scope.materialType == 3"><img src="@/assets/guestCustom/video-list.png" /></div>
</div>
<div v-for="item in scope.scope.previewListText" :key="item.id">
<div class="attachmentList-text" v-if="item.attContent">{{ item.attContent[0] }}</div>
</div>
</div>
</div>
<div slot="sendType" slot-scope="scope">
<span style="color: #eb4e4e" v-if="scope.scope.sendType == 2">定时发送</span>
<span v-if="scope.scope.sendType == 1">立即发送</span>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" disabled v-if="scope.scope.status == 2">创建中</el-button>
<el-button type="text" disabled v-if="scope.scope.status == 1">开始创建</el-button>
<el-button type="text" disabled v-if="scope.scope.status == 2 || scope.scope.status == 1">创建中</el-button>
<el-button type="text" disabled v-if="scope.scope.status == -1">创建失败</el-button>
<el-button type="text" disabled v-if="scope.scope.status == 4">取消发送</el-button>
<el-button type="text" v-if="scope.scope.sendType == 2 && getTimeStatus(scope.scope.sendTime) && scope.scope.status != 4" @click="handleCancel(scope.scope)">取消发送</el-button>
<el-popover v-if="scope.scope.status == 0" placement="top" width="230" trigger="click" content="未到朋友圈发送时间,无法查看详情">
<el-button slot="reference" type="text" style="color: #999999">详情</el-button>
</el-popover>
<el-button type="text" v-if="scope.scope.sendType == 2 && getTimeStatus(scope.scope.sendTime) && scope.scope.status != 4" @click="handleCancel(scope.scope)">取消发送</el-button>
<el-button type="text" v-if="scope.scope.status == 3" @click="handleDetail(scope.scope)">详情</el-button>
<GLButton type="text" fn="详情" v-if="scope.scope.status == 3" @click="handleDetail(scope.scope)">详情</GLButton>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -95,12 +98,6 @@ export default {
// 搜索
searchFormData: [
{
label: '创建人',
name: 'createdName',
type: 'input',
maxlength: 20
},
{
label: '创建日期',
name: 'createDate',
type: 'datePicker',
......@@ -111,6 +108,7 @@ export default {
label: '类型',
name: 'type',
type: 'select',
placeholder: '请选择',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
......@@ -120,6 +118,7 @@ export default {
label: '发布方式',
name: 'sendType',
type: 'select',
placeholder: '请选择',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
......@@ -135,14 +134,13 @@ export default {
{
label: '内容',
prop: 'attachmentList',
addHtml: 'attachmentList'
addHtml: 'attachmentList',
width: '240'
},
{
label: '发布方式',
name: 'sendType',
formatter: cellValue => {
return this.baseData.modeStatusList.find(item => item.confId == cellValue.sendType).confName
},
addHtml: 'sendType',
width: '120'
},
{
......@@ -325,7 +323,7 @@ export default {
const time = new Date().getTime()
const sendTime = new Date(row.sendTime).getTime()
if (sendTime - time < 2 * 60 * 1000) {
this.$message.error('当前数据已经超时了')
this.$message.error('任务临近发送时间,无法取消')
return
}
this.$apis.friendGroup
......@@ -341,14 +339,6 @@ export default {
// this.$set(this.employeelist[index], 'remindStatus', true)
})
},
handleUpOrDown(row) {
if (row.goodsStatus) {
this.downForm.id = row.id
this.dwonVisibleChange()
return true
}
this.secondConfirm('上架', '是否确认上架该商品?', 'proManage', 'updateStatusProApi', { id: row.id, goodsStatus: 1 })
},
dwonVisibleChange() {
this.$refs.downRef && this.$refs.downRef.clearValidate()
this.isDownVisible = !this.isDownVisible
......@@ -361,34 +351,6 @@ export default {
goodsStatus: 0
}
},
handleDownConfirm() {
this.$refs.downRef.validate(valid => {
if (valid) {
this.$apis.proManage.updateStatusProApi(this.downForm).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.handleDownClose()
this.handleSearch()
}
})
}
})
},
// 置顶
handleTop(row) {
this.secondConfirm('置顶', '是否确认置顶该商品?', 'proManage', 'topProApi', { id: row.id })
},
handleShare(row) {
this.$apis.proManage.getProShareApi({ id: row.id }).then(res => {
this.shareForm = res
this.handleShareClose()
})
},
handleShareClose() {
this.isShareVisible = !this.isShareVisible
},
......@@ -400,7 +362,7 @@ export default {
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].optionId] = null
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
......@@ -410,7 +372,7 @@ export default {
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].optionId] = null
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
......@@ -439,7 +401,9 @@ export default {
.friend-title {
color: #666666;
span {
font-size: 14px;
margin-left: 10px;
font-weight: 100;
}
}
.attachmentList-box {
......@@ -480,12 +444,12 @@ export default {
&.attachmentList-video {
background: rgba($color: #000000, $alpha: 0.7);
position: relative;
i {
img {
position: absolute;
font-size: 24px;
top: 5px;
left: 5px;
color: #fff;
top: 6px;
left: 6px;
width: 24px;
height: 24px;
}
}
> img {
......
......@@ -5,12 +5,12 @@
<el-form-item label="分组名称:" prop="materialGroupName">
<el-input v-model="materialGroupAddForm.materialGroupName" maxlength="8" show-word-limit :size="size" placeholder="请输入分组名称" style="width: 567px"></el-input>
</el-form-item>
<el-form-item label="业务类型:" prop="businessType">
<!-- <el-form-item label="业务类型:" prop="businessType">
<el-checkbox-group class="checkbox-group" :max="3" v-model="materialGroupAddForm.businessType">
<el-checkbox v-for="item in businessTypes" :key="item.id" :label="item.dictLabel"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<span class="tips">添加业务类型,该素材组里面的所有素材均会添加此业务类型</span>
<span class="tips">添加业务类型,该素材组里面的所有素材均会添加此业务类型</span> -->
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
......@@ -25,9 +25,9 @@ export default {
name: 'addMaterialGroupDia',
props: {
eventBus: Object,
businessTypes: {
type: Array
}
// businessTypes: {
// type: Array
// }
},
data() {
return {
......@@ -54,7 +54,7 @@ export default {
this.dialogVisible = true
this.materialGroupAddForm = {
materialGroupName: '',
businessType: []
// businessType: []
}
this.groupCounter = group
if (addOrEdit == 2) {
......@@ -68,36 +68,42 @@ export default {
this.$apis.material.materialGroupDetail(params).then(res => {
console.log(res, '---')
this.materialGroupAddForm = res
if (res.businessType) {
this.materialGroupAddForm.businessType = this.materialGroupAddForm.businessType.split(',')
} else {
this.materialGroupAddForm.businessType = []
}
// if (res.businessType) {
// this.materialGroupAddForm.businessType = this.materialGroupAddForm.businessType.split(',')
// } else {
// this.materialGroupAddForm.businessType = []
// }
})
}
// Object.assign(this.materialGroupAddForm, value)
},
// 获取所有业务类型
findAllDictData(dictType) {
var params = {
dictType
}
this.$apis.material.findAllDictData(params).then(res => {
if (res) {
if (dictType == 'business_type') {
this.businessTypes = res
}
}
})
// findAllDictData(dictType) {
// var params = {
// dictType
// }
// this.$apis.material.findAllDictData(params).then(res => {
// if (res) {
// if (dictType == 'business_type') {
// this.businessTypes = res
// }
// }
// })
// },
getParams() {
var params = JSON.parse(JSON.stringify(this.materialGroupAddForm))
return params
},
// 创建
submitForm() {
console.log(this.materialGroupAddForm)
this.$refs.materialGroupAddForm.validate(valid => {
if (valid) {
var params = this.getParams()
params.orderFlag = true
// 判断是创建还是编辑
if (this.materialGroupAddForm.id) {
this.eventBus.$emit('editMaterialGroup', this.materialGroupAddForm)
this.eventBus.$emit('editMaterialGroup', params)
this.dialogVisible = false
return
}
......@@ -114,7 +120,7 @@ export default {
})
return
}
this.eventBus.$emit('addMaterialGroup', this.materialGroupAddForm)
this.eventBus.$emit('addMaterialGroup', params)
this.dialogVisible = false
} else {
this.$message({
......@@ -125,11 +131,11 @@ export default {
}
})
},
handleCheckChange(val) {
console.log(val)
this.materialGroupAddForm.businessType = val
// console.log(this.materialGroupAddForm);
}
// handleCheckChange(val) {
// console.log(val)
// this.materialGroupAddForm.businessType = val
// // console.log(this.materialGroupAddForm);
// }
}
}
</script>
......
......@@ -13,9 +13,18 @@
<el-popover placement="right" trigger="hover">
<div>
<ul>
<li @click="handleStick(item)">{{ item.orderTime ? '取消置顶' : '置顶' }}</li>
<li @click="handleAddGroup(2,item)">修改</li>
<li @click="handleDeleteGroup(item.id)" v-if="item.isDefault == -1">删除</li>
<!-- <li @click="handleStick(item)">{{ item.orderTime ? '取消置顶' : '置顶' }}</li> -->
<li>
<GLButton :size="size" type="text" fn="置顶" @click="handleStick(item)">{{ item.orderTime ? '取消置顶' : '置顶' }}</GLButton>
</li>
<!-- <li @click="handleAddGroup(2,item)">修改</li> -->
<li>
<GLButton :size="size" type="text" fn="修改" @click="handleAddGroup(2,item)">修改</GLButton>
</li>
<!-- <li @click="handleDeleteGroup(item.id)" v-if="item.isDefault == -1">删除</li> -->
<li>
<GLButton :size="size" type="text" fn="删除" @click="handleAddGroup(2,item)">删除</GLButton>
</li>
</ul>
</div>
<i slot="reference" class="el-icon-more"></i>
......@@ -44,7 +53,7 @@ export default {
},
mounted() {
this.eventBus.$on('addMaterialGroup', data => {
data.businessType = data.businessType.toString()
// data.businessType = data.businessType.toString()
this.$apis.material.addMaterialGroup(data).then(res => {
if (res) {
this.getMaterialList()
......
<template>
<div class="main-container">
<div class="top">
<el-button type="primary" @click="addMaterial(1)" :size="size">
<!-- <el-button type="primary" @click="addMaterial(1)" :size="size">
<i class="el-icon-plus"></i>
创建营销素材
</el-button>
</el-button> -->
<GLButton :size="size" type="primary" fn="新增营销素材" class="el-icon-plus" @click="addMaterial(1)">创建营销素材</GLButton>
</div>
<span @click="showIntroductionDialog">
功能介绍
<i class="el-icon-arrow-right"></i>
</span>
</div>
<div class="container">
<div class="search-form">
<glsx-combi-form ref="materialFormRef1" :isEdit="isEdit" :formObj="searchForm" :formData="materialFormData1" :inline="true"></glsx-combi-form>
......@@ -72,11 +73,20 @@
</div>
<span slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button>
<el-button type="text" @click="addMaterial(2, scope.scope)">编辑</el-button>
<GLButton type="text" fn="详情" @click="handleDetail(scope.scope)">详情</GLButton>
<!-- <el-button type="text" @click="addMaterial(2, scope.scope)">编辑</el-button> -->
<GLButton :size="size" type="text" fn="编辑" @click="addMaterial(2, scope.scope)">编辑</GLButton>
<!-- <GLButton :size="size" type="text" fn="详情" class="el-icon-plus" @click="addMaterial(1)">详情</GLButton> -->
<el-popover placement="right" trigger="click">
<ul>
<li @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</li>
<li @click="handleDelete(scope.scope)">删除</li>
<li>
<!-- <el-button :size="size" type="text" @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</el-button> -->
<GLButton :size="size" type="text" fn="禁用" @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</GLButton>
</li>
<li>
<!-- <el-button :size="size" type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<GLButton :size="size" type="text" fn="删除营销素材" @click="handleDelete(scope.scope)">删除</GLButton>
</li>
</ul>
<el-button type="text" slot="reference" class="btn-more">更多</el-button>
</el-popover>
......@@ -308,13 +318,14 @@ export default {
}
]
},
tableTotal: 4
tableTotal: 0
}
},
mounted() {
let clientHeight = document.documentElement.clientHeight
let offTop = document.querySelector('.tabelList').offsetTop
this.boxHeight = clientHeight - offTop - 20 + 'px'
console.log(clientHeight, offTop);
this.boxHeight = clientHeight - offTop - 40 + 'px'
this.findAllDictData('business_type')
this.firstCome()
this.getListApi()
......@@ -486,6 +497,7 @@ export default {
.main-container {
height: 100%;
.top {
display: inline-flex;
span {
margin-left: 16px;
font-size: 16px;
......
......@@ -38,7 +38,8 @@
<label>*</label>
素材类型:
</div>
{{ detailInfo.materialType }}
<span v-if="detailInfo.materialType == 1">PDF</span>
<span v-if="detailInfo.materialType == 3">图文</span>
</div>
<div class="materialDetail-desc-item">
<div class="materialDetail-item-name">动态通知:</div>
......@@ -194,6 +195,7 @@ export default {
getMaterialdetail() {
var params = {}
params.id = this.routerInfo.id
params.flag = 0
this.$apis.material.materialDetail(params).then(res => {
console.log(res, 'dhakfh')
this.detailInfo = res
......
......@@ -97,8 +97,8 @@
</div>
</div>
<template slot="association">
<el-button type="text" @click="dialogTableVisible = true" v-if="routeInfo.addOrEdit !== 3">选择</el-button>
<el-dialog title="选择优惠券" v-if="dialogTableVisible" :visible.sync="dialogTableVisible">
<el-button type="default" @click="dialogTableVisible = true" v-if="routeInfo.addOrEdit !== 3">+选择</el-button>
<glsx-dialog title="选择优惠券" :isVisible.sync="dialogTableVisible" width="50%" @confirmDialog="associationConfirm" @closeDialog="associationCancel" >
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
......@@ -110,11 +110,11 @@
</div>
</GLTable>
<!-- 表格区域 end -->
<div class="associationBtn">
<!-- <div class="associationBtn">
<el-button type="primary" @click="associationConfirm">确定</el-button>
<el-button type="default" @click="associationCancel">取消</el-button>
</div>
</el-dialog>
</div> -->
</glsx-dialog>
<div class="association-X" v-if="editForm.relatedCouponId">
<div class="associationRow">
<span class="associationLists">名称</span>
......@@ -122,13 +122,13 @@
<span class="associationLists">使用途径</span>
<span class="associationLists" v-if="routeInfo.addOrEdit !== 3">操作</span>
</div>
<div class="associationRow">
<div class="associationRow" style="background:white;">
<el-tooltip effect="dark" :content="editForm.relatedCouponName" placement="bottom">
<span class="associationLists">{{editForm.relatedCouponName}}</span>
<span class="associationLists-X">{{editForm.relatedCouponName}}</span>
</el-tooltip>
<span class="associationLists">{{editForm.relatedDiscountType}}</span>
<span class="associationLists">{{editForm.relatedUseChannel}}</span>
<span class="associationLists-X">{{editForm.relatedDiscountType}}</span>
<span class="associationLists-X">{{editForm.relatedUseChannel}}</span>
<span class="associationLists" v-if="routeInfo.addOrEdit !== 3"><el-button type="text" @click="del()">删除</el-button></span>
</div>
</div>
......@@ -999,7 +999,6 @@ export default {
this.routeInfo.groupOrStore == 2 && this.storeNoExitAttr()
this.routeInfo.addOrEdit != 1 ? this.getInfo() : ''
this.routeInfo.addOrEdit == 3 && this.setAllDisabled()
this.getOptionsList('searchFormData')
},
methods: {
......@@ -1655,7 +1654,7 @@ export default {
// console.log('this.$refs.coupon',this.$refs.coupon[0])
//接收到的数据为空
this.templateSelection = this.$refs.coupon[0].data;
this.$refs.coupon[0].data.length ? (this.$refs.coupon[0].tableHeightValues = '') : this.$refs.coupon[0].setTableHeightFun()
// this.$refs.coupon[0].data.length ? (this.$refs.coupon[0].tableHeightValues = '') : this.$refs.coupon[0].setTableHeightFun()
},
handleSearch() {
this.$refs.coupon[0].refreshTable()
......@@ -1846,12 +1845,17 @@ export default {
bottom: 26px;
}
.association-X {
width: 320px;
margin-left: -25px;
width: 670px;
height: 108px;
border: 1px solid #EEE;
margin-top: 10px;
}
.association-X .associationRow {
display: flex;
/* justify-content:space-evenly; */
height: 54px;
background: #F4F6FC;
align-items: center;
justify-content: center;
}
.association-X .associationRow .associationLists {
display: block;
......@@ -1860,5 +1864,25 @@ export default {
text-overflow: ellipsis;
flex: 1;
text-align: center;
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #424242;
}
.association-X .associationRow .associationLists-X {
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
text-align: center;
font-size: 14px;
color: #666;
}
.marketing .footer-btns {
float: none !important;
}
.el-checkbox__input.is-checked+.el-checkbox__label {
color: #606266;
}
</style>
......@@ -20,7 +20,7 @@
已完成任务数
<img src="@/assets/sop/task.png" />
</div>
<p class="analysis-num">{{ sopInfo.sopStatistics.finishEventCount }}</p>
<p class="analysis-num">{{ sopInfo.sopStatistics.finishTaskCount }}</p>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">总任务完成率</div>
......@@ -75,7 +75,7 @@ export default {
label: '个人完成率',
prop: 'percent',
formatter: cellValue => {
return cellValue.issuedTaskCount ? ((cellValue.finishTaskCount - cellValue.issuedTaskCount) / 100).toFixed(2) + '%' : '0%'
return cellValue.issuedTaskCount ? ((cellValue.finishTaskCount / cellValue.issuedTaskCount) * 100).toFixed(2) + '%' : '0%'
}
}
]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!