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