Commit 8ae2837c by 前端

Merge branch 'v3.24.0' of http://192.168.3.233:8090/saas/outbound into v3.24.0

2 parents fb07160a 278978eb
...@@ -137,6 +137,23 @@ img{ ...@@ -137,6 +137,23 @@ img{
max-width: 80%; max-width: 80%;
} }
} }
.el-cascader-menu__list {
&::after{
position: absolute;
left: 0;
top: 0;
background-color: #fff;
width: 20px;
height: 20px;
content: '';
}
.el-cascader-node:not(.is-disabled):focus, .el-cascader-node:not(.is-disabled):hover {
position: relative;
z-index: 2;
}
}
.table_circular_flex{ .table_circular_flex{
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -12,7 +12,7 @@ let cfg = require('./conf.js') ...@@ -12,7 +12,7 @@ let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function(common) { export const fetchConfig = function (common) {
// if (isEnv) { // if (isEnv) {
// let { request } = cfg // let { request } = cfg
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
...@@ -24,7 +24,7 @@ export const fetchConfig = function(common) { ...@@ -24,7 +24,7 @@ export const fetchConfig = function(common) {
return common.utils.getConfig(params) return common.utils.getConfig(params)
} }
export const config = { export const config = {
install(vue, cfg) { install (vue, cfg) {
vue.prototype.$config = cfg vue.prototype.$config = cfg
} }
} }
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
:tableParams="tableParams" :tableParams="tableParams"
:tableTotal="tableTotal" :tableTotal="tableTotal"
:pageConf="pageConf" :pageConf="pageConf"
@refreshTable="refreshTable"
ref="listRef" ref="listRef"
> >
</GLTable> </GLTable>
......
...@@ -91,6 +91,9 @@ export default { ...@@ -91,6 +91,9 @@ export default {
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
padding-top: 4px; padding-top: 4px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
&:hover { &:hover {
opacity: 0.95; opacity: 0.95;
......
...@@ -74,6 +74,9 @@ export default { ...@@ -74,6 +74,9 @@ export default {
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
padding-top: 4px; padding-top: 4px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
&:hover { &:hover {
opacity: 0.95; opacity: 0.95;
......
...@@ -379,9 +379,10 @@ export default { ...@@ -379,9 +379,10 @@ export default {
let arr = Array.from(new Set([...value.split('\n').map(e => e)])), let arr = Array.from(new Set([...value.split('\n').map(e => e)])),
str = [] str = []
arr.map(i => { arr.map(i => {
if (i && ((type === 1 || type === 2) && str.length < 10 || (type === 4 || type === 5))) { if (i) str.push(i.trim())
str.push(i.trim()) // if (i && ((type === 1 || type === 2) && str.length < 10 || (type === 4 || type === 5))) {
} // str.push(i.trim())
}) })
this.configForm[inputKeyObject[type]] = str.join('\n') this.configForm[inputKeyObject[type]] = str.join('\n')
}, },
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="活动模版:" prop="templateId" class="m-t-20"> <el-form-item label="活动模版:" prop="templateId" class="m-t-20">
<el-select :size="size" v-model="configForm.templateId" placeholder="请选择" @focus="getRedEnvelopeTemplateList" filterable > <el-select :size="size" v-model="configForm.templateId" placeholder="请选择" @focus="getRedEnvelopeTemplateList" filterable>
<el-option v-for="item in templateList" :key="item.id" :label="item.templateName" :value="item.id"></el-option> <el-option v-for="item in templateList" :key="item.id" :label="item.templateName" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<!-- :红包、实物、谢谢惠顾时,为输入框 优惠券,为下拉框 --> <!-- :红包、实物、谢谢惠顾时,为输入框 优惠券,为下拉框 -->
<el-form-item style="margin-bottom: 0px" :prop="'awardList.' + scope.index + '.couponId'" :rules="configRules.couponId"> <el-form-item style="margin-bottom: 0px" :prop="'awardList.' + scope.index + '.couponId'" :rules="configRules.couponId">
<el-select style="width: 100%" v-model="scope.scope.couponId" placeholder="请选择" @change="setAwardName(scope.scope)"> <el-select style="width: 100%" v-model="scope.scope.couponId" placeholder="请选择" @change="setAwardName(scope.scope)">
<el-option v-for="item in couponList" :key="item.id" :label="item.goodsName+'('+item.denomination/100+'元)'" :value="item.id"></el-option> <el-option v-for="item in couponList" :key="item.id" :label="item.goodsName + '(' + item.denomination / 100 + '元)'" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
...@@ -165,7 +165,8 @@ export const afterRangePickerOptions = { ...@@ -165,7 +165,8 @@ export const afterRangePickerOptions = {
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import { getMerchantListMixin } from '@/mixins' import { getMerchantListMixin } from '@/mixins'
import { awardType } from '@/common/constant' import { awardType } from '@/common/constant'
// 奖项类型: 0-红包、1-实物、2-优惠券、3-谢谢惠顾
const imgArr = []
export default { export default {
mixins: [getMerchantListMixin], mixins: [getMerchantListMixin],
name: '', name: '',
...@@ -178,7 +179,7 @@ export default { ...@@ -178,7 +179,7 @@ export default {
data() { data() {
return { return {
loading: false, loading: false,
activePage:1, activePage: 1,
templateList: [], templateList: [],
couponList: [], couponList: [],
afterRangePickerOptions, afterRangePickerOptions,
...@@ -296,16 +297,14 @@ export default { ...@@ -296,16 +297,14 @@ export default {
}, },
deep: true deep: true
}, },
'configForm.limiting'(newVal){ 'configForm.limiting'(newVal) {
if(newVal){ if (newVal) {
this.configForm.awardsConfig.limitTimes=1 this.configForm.awardsConfig.limitTimes = 1
this.configForm.awardsConfig.msg='' this.configForm.awardsConfig.msg = ''
} }
} }
}, },
mounted() { mounted() {
// this.getRedEnvelopeTemplateList()
this.getCouponList()
if (this.configForm.id) this.getRedEnvelopeActivityDetail() if (this.configForm.id) this.getRedEnvelopeActivityDetail()
}, },
methods: { methods: {
...@@ -316,7 +315,7 @@ export default { ...@@ -316,7 +315,7 @@ export default {
amount: '', amount: '',
total: '', total: '',
probability: '', probability: '',
picture: '', picture: data.type != 3 ? `https://img01.glsx.com.cn/weapp/resource/saas/scrm/redEnvelope/prize-${data.type}.png` : '',
couponId: '' couponId: ''
} }
this.$set(this.configForm.awardList, index, this.configForm.awardList[index]) this.$set(this.configForm.awardList, index, this.configForm.awardList[index])
...@@ -368,7 +367,8 @@ export default { ...@@ -368,7 +367,8 @@ export default {
getCouponList() { getCouponList() {
let params = { let params = {
pageSize: 10000, pageSize: 10000,
pageNum: 1 pageNum: 1,
status: 2
} }
this.$apis.redenvelope.getCouponList(params).then(res => { this.$apis.redenvelope.getCouponList(params).then(res => {
this.couponList = res.list this.couponList = res.list
...@@ -383,6 +383,7 @@ export default { ...@@ -383,6 +383,7 @@ export default {
}, },
async handleConfirm(val) { async handleConfirm(val) {
if (this.activePage == 1) { if (this.activePage == 1) {
this.getCouponList()
this.result = await this.$refs.configRef.validate() this.result = await this.$refs.configRef.validate()
} }
if (this.result) { if (this.result) {
...@@ -437,9 +438,9 @@ export default { ...@@ -437,9 +438,9 @@ export default {
} }
this.configForm.awardList.forEach(item => { this.configForm.awardList.forEach(item => {
if (item.type === 0) { if (item.type === 0) {
if(item.total) params.redEnvelopesTotal += Number(item.total) if (item.total) params.redEnvelopesTotal += Number(item.total)
if (item.amount && item.total) { if (item.amount && item.total) {
params.amountTotal += item.amount * item.total params.amountTotal += new BigNumber(item.amount).times(item.total).dp(2).toNumber()
} }
} }
}) })
......
...@@ -111,6 +111,11 @@ export default { ...@@ -111,6 +111,11 @@ export default {
} }
}, },
{ {
label: '活动形式',
prop: 'activityTypeStr',
minWidth: 100
},
{
label: '创建类型', label: '创建类型',
minWidth: 100, minWidth: 100,
formatter: cell => { formatter: cell => {
...@@ -118,11 +123,6 @@ export default { ...@@ -118,11 +123,6 @@ export default {
} }
}, },
{ {
label: '活动形式',
prop: 'activityTypeStr',
minWidth: 100
},
{
label: '红包链接总数', label: '红包链接总数',
prop: 'amount', prop: 'amount',
minWidth: 150 minWidth: 150
......
...@@ -12,13 +12,36 @@ ...@@ -12,13 +12,36 @@
:formData="formData" :formData="formData"
:formRules="rule" :formRules="rule"
> >
<template #merchantId>
<el-select
v-model="configForm.merchantId"
placeholder="请选择"
filterable
remote
:remote-method="remoteMethod"
v-reachbottom="onReachBottom"
@focus="selectFocus"
:loading="merchantObj.loading"
:disabled="disabled"
>
<el-option
v-for="item in merchantObj.data"
:key="item.confId"
:label="item.confName"
:value="item.confId"
></el-option>
<template v-if="merchantObj.nothing">
<div class="select-nothing">到底了!</div>
</template>
</el-select>
</template>
<div <div
slot="cover" slot="cover"
class="edit-tips" class="edit-tips"
>图片大小10M</div> >图片大小10M</div>
<template #endTimeType> <template #endTimeLimit>
<div <div
v-if="configForm.endTimeType == 1" v-if="configForm.endTimeLimit == 1"
class="item-box" class="item-box"
> >
<el-date-picker <el-date-picker
...@@ -41,7 +64,7 @@ ...@@ -41,7 +64,7 @@
:picker-options="afterRangePickerOptions" :picker-options="afterRangePickerOptions"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
class="end-time" class="end-time"
:disabled="(configForm.endTimeType == 1 && !configForm.endTime) || disabled " :disabled="(configForm.endTimeLimit == 1 && !configForm.endTime) || disabled "
> >
</el-date-picker> </el-date-picker>
</template> </template>
...@@ -101,9 +124,10 @@ ...@@ -101,9 +124,10 @@
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { formData, rule, afterRangePickerOptions } from './addJS/add.js' import { formData, rule, afterRangePickerOptions } from './addJS/add.js'
import PrizeBox from './components/PrizeBox.vue' import PrizeBox from './components/PrizeBox.vue'
import { getMerchantListMixin } from '@/mixins'
export default { export default {
components: { PrizeBox }, components: { PrizeBox },
mixins: [getMerchantListMixin],
name: '', name: '',
data () { data () {
return { return {
...@@ -119,7 +143,7 @@ export default { ...@@ -119,7 +143,7 @@ export default {
numLimit: 9, numLimit: 9,
numType: 1, numType: 1,
numWin: 0, numWin: 0,
endTimeType: 0, endTimeLimit: 0,
endTime: '', endTime: '',
lotteryTime: '', lotteryTime: '',
groupLimitOpen: false, groupLimitOpen: false,
...@@ -139,12 +163,10 @@ export default { ...@@ -139,12 +163,10 @@ export default {
watch: { watch: {
'configForm.merchantId' (n) { 'configForm.merchantId' (n) {
const { optionList } = this.formData.find(e => e.name == 'merchantId'), const { disabled } = this,
{ disabled } = this { groupLimitOpen } = this.configForm
optionList.map(e => { this.configForm.merchantName = this.merchantObj.data.find(e => e.confId == n).confName
if (e.confId == n) this.configForm.merchantName = e.confName if (groupLimitOpen) this.getMerchantWechatGroupList([n])
})
this.getMerchantWechatGroupList([n])
if (!disabled) { if (!disabled) {
this.$refs.prizeRef.reset() this.$refs.prizeRef.reset()
this.configForm.groupLimitList = [] this.configForm.groupLimitList = []
...@@ -161,9 +183,12 @@ export default { ...@@ -161,9 +183,12 @@ export default {
}) })
}, },
'configForm.groupLimitOpen' (n) { 'configForm.groupLimitOpen' (n) {
if (n == 1 && !this.configForm.merchantId) { const { merchantId } = this.configForm
this.configForm.groupLimitOpen = false if (n == 1) {
this.showError() if (!merchantId) {
this.configForm.groupLimitOpen = false
this.showError()
} else this.getMerchantWechatGroupList([merchantId])
} }
}, },
'configForm.numWin' (n) { 'configForm.numWin' (n) {
...@@ -187,6 +212,9 @@ export default { ...@@ -187,6 +212,9 @@ export default {
} }
}, },
methods: { methods: {
changt (id) {
},
showError (message) { showError (message) {
this.$message.error(message || '请先选择所属渠道!') this.$message.error(message || '请先选择所属渠道!')
}, },
...@@ -198,23 +226,17 @@ export default { ...@@ -198,23 +226,17 @@ export default {
console.log(data) console.log(data)
this.formData.map(e => { this.formData.map(e => {
e.isDisabled = disabled e.isDisabled = disabled
// if (disabled && e.name == 'description') this.$refs.formRef.forbidEdit(e)
if (e.name == 'merchantId') e.optionList = [{
confId: data.merchantId,
confName: data.merchantName
}]
}) })
this.merchantObj.data = [{
let description = decodeURIComponent(data.description), confId: data.merchantId,
endTimeType = 0, confName: data.merchantName
}]
let description = data.description,
numWin = data.numWin, numWin = data.numWin,
endTime = data.endTime, endTime = data.endTime,
groupLimitList = [] groupLimitList = []
this.$refs.formRef.$refs.descriptionTextBox[0].setEdit(description) this.$refs.formRef.$refs.descriptionTextBox[0].setEdit(description)
if (endTime) { if (endTime) endTime = dayjs(endTime).format('YYYY/MM/DD HH:mm:ss')
if (endTime != data.lotteryTime) endTimeType = 1
endTime = dayjs(endTime).format('YYYY/MM/DD HH:mm:ss')
}
if (data.numType == 1) numWin = 0 if (data.numType == 1) numWin = 0
if (data.groupLimitOpen) { if (data.groupLimitOpen) {
data.groupLimits.map(e => { data.groupLimits.map(e => {
...@@ -228,7 +250,7 @@ export default { ...@@ -228,7 +250,7 @@ export default {
title: data.title, title: data.title,
cover: data.cover, cover: data.cover,
numLimit: data.numLimit, numLimit: data.numLimit,
endTimeType, endTimeLimit: data.endTimeLimit,
lotteryTime: dayjs(data.lotteryTime).format('YYYY/MM/DD HH:mm:ss'), lotteryTime: dayjs(data.lotteryTime).format('YYYY/MM/DD HH:mm:ss'),
groupLimitOpen: data.groupLimitOpen, groupLimitOpen: data.groupLimitOpen,
groupLimitList, groupLimitList,
...@@ -245,30 +267,6 @@ export default { ...@@ -245,30 +267,6 @@ export default {
} }
}, },
async getMerchantList (merchantName = '') {
if (!merchantName) return
this.$loading()
try {
const { list } = await this.$apis.redenvelope.getRedEnvelopeMerchantList({
currentPage: 1,
merchantName,
pageSize: 999
}),
data = []
list && list.map(e => {
data.push({
confId: e.merchantNo,
confName: e.merchantName,
})
})
this.formData.find(e => e.name == 'merchantId').optionList = data
this.$loading().close()
} catch (error) {
console.log(error)
this.$loading().close()
}
},
choose ({ rewardId, rewardName, rewardType }) { choose ({ rewardId, rewardName, rewardType }) {
this.configForm.rewardId = rewardId this.configForm.rewardId = rewardId
this.configForm.rewardType = rewardType this.configForm.rewardType = rewardType
...@@ -282,8 +280,7 @@ export default { ...@@ -282,8 +280,7 @@ export default {
const params = JSON.parse(JSON.stringify(this.configForm)), const params = JSON.parse(JSON.stringify(this.configForm)),
{ relayLotteryId } = this { relayLotteryId } = this
if (params.numType == 1) delete params.numWin if (params.numType == 1) delete params.numWin
if (params.endTimeType == 0) { if (params.endTimeLimit == 0) {
delete params.endTimeType
delete params.endTime delete params.endTime
} }
this.$loading() this.$loading()
...@@ -369,12 +366,12 @@ export default { ...@@ -369,12 +366,12 @@ export default {
border-color: #f56c6c !important; border-color: #f56c6c !important;
} }
} }
/deep/.text-box-disabled{ /deep/.text-box-disabled {
.w-e-toolbar, .w-e-toolbar,
.w-e-text-container{ .w-e-text-container {
background-color: #eee !important; background-color: #eee !important;
border-color: #e4e7ed !important; border-color: #e4e7ed !important;
&:hover{ &:hover {
cursor: not-allowed; cursor: not-allowed;
} }
} }
......
...@@ -12,19 +12,19 @@ export const formData = that => { ...@@ -12,19 +12,19 @@ export const formData = that => {
{ {
label: '所属渠道', label: '所属渠道',
name: 'merchantId', name: 'merchantId',
type: 'select',
width: '432px', width: '432px',
attrs: { addHtml: 'merchantId'
'filter-method': (e) => { // attrs: {
that.getMerchantList(e) // 'filter-method': (e) => {
}, // that.getMerchantList(e)
remote: true // },
}, // remote: true
noFilter: false, // },
optionList: [], // noFilter: false,
optionId: 'confId', // optionList: [],
optionLabel: 'confName', // optionId: 'confId',
isDisabled: false // optionLabel: 'confName',
// isDisabled: false
}, },
{ {
label: '群接龙种类', label: '群接龙种类',
...@@ -112,7 +112,7 @@ export const formData = that => { ...@@ -112,7 +112,7 @@ export const formData = that => {
{ {
label: '接龙结束时间', label: '接龙结束时间',
type: 'radio', type: 'radio',
name: 'endTimeType', name: 'endTimeLimit',
optionList: [ optionList: [
{ {
text: '无限制', text: '无限制',
...@@ -125,7 +125,7 @@ export const formData = that => { ...@@ -125,7 +125,7 @@ export const formData = that => {
], ],
optionId: 'id', optionId: 'id',
optionLabel: 'text', optionLabel: 'text',
suffixSlot: 'endTimeType', suffixSlot: 'endTimeLimit',
isDisabled: false isDisabled: false
}, },
{ {
...@@ -170,10 +170,10 @@ export const rule = that => { ...@@ -170,10 +170,10 @@ export const rule = that => {
cover: [{ required, message: '请上传卡片封面', trigger }], cover: [{ required, message: '请上传卡片封面', trigger }],
numLimit: [{ required }], numLimit: [{ required }],
numWin: [{ required }], numWin: [{ required }],
endTimeType: [{ endTimeLimit: [{
required, required,
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if(that.disabled) callback() if (that.disabled) callback()
try { try {
if (value == 1) { if (value == 1) {
if (!that.configForm.endTime) throw '请选择接龙结束时间' if (!that.configForm.endTime) throw '请选择接龙结束时间'
...@@ -191,11 +191,11 @@ export const rule = that => { ...@@ -191,11 +191,11 @@ export const rule = that => {
required, trigger, required, trigger,
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
try { try {
if(that.disabled) callback() if (that.disabled) callback()
if (!value) throw '请选择接龙开奖时间' if (!value) throw '请选择接龙开奖时间'
else { else {
const valueTimestamp = dayjs(value).valueOf() const valueTimestamp = dayjs(value).valueOf()
if (that.configForm.endTimeType != 1) { if (that.configForm.endTimeLimit != 1) {
if (valueTimestamp < dayjs().valueOf()) throw '接龙开奖时间需大于当前时间' if (valueTimestamp < dayjs().valueOf()) throw '接龙开奖时间需大于当前时间'
} else { } else {
if (valueTimestamp < dayjs(that.configForm.endTime).valueOf()) throw '接龙开奖时间需大于或等于接龙结束时间' if (valueTimestamp < dayjs(that.configForm.endTime).valueOf()) throw '接龙开奖时间需大于或等于接龙结束时间'
......
...@@ -94,6 +94,9 @@ export default { ...@@ -94,6 +94,9 @@ export default {
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
padding: 10px 0 7px; padding: 10px 0 7px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
&:hover { &:hover {
opacity: 0.95; opacity: 0.95;
......
...@@ -198,10 +198,14 @@ export default { ...@@ -198,10 +198,14 @@ export default {
line-height: 28px; line-height: 28px;
} }
.content-box { .content-box {
display: grid; display: flex;
grid-template-columns: repeat(3, 1fr); flex-wrap: wrap;
gap: 16px; gap: 16px;
margin-top: 5px; margin-top: 5px;
.item{
width: calc(33.33% - 16px);
}
} }
.nothing { .nothing {
display: flex; display: flex;
......
...@@ -81,6 +81,9 @@ export default { ...@@ -81,6 +81,9 @@ export default {
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
padding: 10px 0 7px; padding: 10px 0 7px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
&:hover { &:hover {
opacity: 0.95; opacity: 0.95;
......
...@@ -211,7 +211,7 @@ export default { ...@@ -211,7 +211,7 @@ export default {
prop: 'cardTitle', prop: 'cardTitle',
minWidth: 100, minWidth: 100,
formatter: cell => { formatter: cell => {
return cell.numType == 1 ? `随机(${cell.numWin})` : cell.numWin return cell.numType == 1 ? `随机(${cell.numWin || '--'})` : cell.numWin
} }
}, },
{ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!