Merge branch 'bd-dev' of 47.94.45.65:angelo/web-base-admin into bd-test

This commit is contained in:
woody 2025-09-17 17:53:12 +08:00
commit 3140f01bb0
10 changed files with 604 additions and 1544 deletions

View File

@ -342,3 +342,30 @@ export function waresRuleConfigSubmit(data) {
data data
}) })
} }
// 抽奖配置
export function lotteryRuleConfigSubmit(data) {
return request({
url: '/sale/manage/draw-gift-config/submit',
method: 'post',
data
})
}
// 直推赠送
export function directRuleConfigSubmit(data) {
return request({
url: '/sale/manage/recommend/submit',
method: 'post',
data
})
}
// 旅游活动
export function tourismRuleConfigSubmit(data) {
return request({
url: '/sale/manage/tourism/submit',
method: 'post',
data
})
}

View File

@ -2007,13 +2007,6 @@ export const constantRoutes = [
component: () => import('@/views/marketing/lottery/lotteryGiftSet'), component: () => import('@/views/marketing/lottery/lotteryGiftSet'),
meta: { title: '奖品设置' }, meta: { title: '奖品设置' },
hidden: true hidden: true
},
{
path: 'lotteryGiftZxqc',
name: 'LotteryGiftZxqc',
component: () => import('@/views/marketing/lottery/lotteryGiftZxqc'),
meta: { title: '在线签呈' },
hidden: true
} }
] ]
}, },
@ -2035,13 +2028,6 @@ export const constantRoutes = [
component: () => import('@/views/marketing/directGifts/addDirect'), component: () => import('@/views/marketing/directGifts/addDirect'),
meta: { title: '基本信息' }, meta: { title: '基本信息' },
hidden: true hidden: true
},
{
path: 'directZxqc',
name: 'DirectZxqc',
component: () => import('@/views/marketing/directGifts/directZxqc'),
meta: { title: '在线签呈' },
hidden: true
} }
] ]
}, },
@ -2129,13 +2115,6 @@ export const constantRoutes = [
component: () => import('@/views/marketing/tourismAct/addTourismAct'), component: () => import('@/views/marketing/tourismAct/addTourismAct'),
meta: { title: '基本信息' }, meta: { title: '基本信息' },
hidden: true hidden: true
},
{
path: 'tourismActZxqc',
name: 'TourismActZxqc',
component: () => import('@/views/marketing/tourismAct/tourismActZxqc'),
meta: { title: '在线签呈' },
hidden: true
} }
] ]
}, },

View File

@ -11,10 +11,10 @@
:moren="moren"></topBar> --> :moren="moren"></topBar> -->
<div class="topbox"> <div class="topbox">
<div <div
class="levelList_i"
:class="tabActive == item.id ? 'act' : ''"
v-for="(item, index) in topList" v-for="(item, index) in topList"
:key="index" :key="index"
class="levelList_i"
:class="tabActive == item.id ? 'act' : ''"
@click.prevent="handleLink(item.id)" @click.prevent="handleLink(item.id)"
> >
{{ item.name }} {{ item.name }}
@ -25,11 +25,11 @@
<div class="main"> <div class="main">
<div v-show="tabActive == 0"> <div v-show="tabActive == 0">
<div class="tit">{{ '基本信息' }}</div> <div class="tit">{{ '基本信息' }}</div>
<div class="xian"></div> <div class="xian" />
<el-form <el-form
ref="ruleForm"
:model="ruleForm" :model="ruleForm"
:rules="rules" :rules="rules"
ref="ruleForm"
label-width="auto" label-width="auto"
class="demo-ruleForm" class="demo-ruleForm"
> >
@ -37,10 +37,10 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="'活动名称'" prop="actName"> <el-form-item :label="'活动名称'" prop="actName">
<el-input <el-input
clearable
v-model="ruleForm.actName" v-model="ruleForm.actName"
clearable
:disabled="lookOver" :disabled="lookOver"
></el-input> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -53,10 +53,10 @@
:disabled="lookOver"></el-input> --> :disabled="lookOver"></el-input> -->
<editor <editor
ref="sptwEditor" ref="sptwEditor"
:readOnly="lookOver"
v-model="ruleForm.actExplain" v-model="ruleForm.actExplain"
:read-only="lookOver"
:min-height="196" :min-height="196"
:uploadUrl="uploadImgUrl" :upload-url="uploadImgUrl"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -73,12 +73,11 @@
<el-form-item :label="'目标用户群体'" required> <el-form-item :label="'目标用户群体'" required>
<div class="flexed"> <div class="flexed">
<el-checkbox <el-checkbox
v-model="ruleForm.checked1"
class="flexed_l" class="flexed_l"
:disabled="lookOver" :disabled="lookOver"
@change="getCheckTit($event, 1)" @change="getCheckTit($event, 1)"
v-model="ruleForm.checked1" >{{ '注册等级' }}</el-checkbox>
>{{ '注册等级' }}</el-checkbox
>
<el-checkbox-group <el-checkbox-group
v-model="ruleForm.levelList" v-model="ruleForm.levelList"
:disabled="lookOver" :disabled="lookOver"
@ -88,18 +87,16 @@
v-for="item in gradeList" v-for="item in gradeList"
:key="item.pkId" :key="item.pkId"
:label="item.pkId" :label="item.pkId"
>{{ item.gradeName }}</el-checkbox >{{ item.gradeName }}</el-checkbox>
>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div class="flexed"> <div class="flexed">
<el-checkbox <el-checkbox
v-model="ruleForm.checked2"
class="flexed_l" class="flexed_l"
:disabled="lookOver" :disabled="lookOver"
@change="getCheckTit($event, 2)" @change="getCheckTit($event, 2)"
v-model="ruleForm.checked2" >{{ '真实奖衔' }}</el-checkbox>
>{{ '真实奖衔' }}</el-checkbox
>
<el-checkbox-group <el-checkbox-group
v-model="ruleForm.realList" v-model="ruleForm.realList"
:disabled="lookOver" :disabled="lookOver"
@ -109,18 +106,16 @@
v-for="item in awardsList" v-for="item in awardsList"
:key="item.pkId" :key="item.pkId"
:label="item.pkId" :label="item.pkId"
>{{ item.awardsName }}</el-checkbox >{{ item.awardsName }}</el-checkbox>
>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div class="flexed"> <div class="flexed">
<el-checkbox <el-checkbox
v-model="ruleForm.checked3"
class="flexed_l" class="flexed_l"
:disabled="lookOver" :disabled="lookOver"
@change="getCheckTit($event, 3)" @change="getCheckTit($event, 3)"
v-model="ruleForm.checked3" >{{ '权限中心' }}</el-checkbox>
>{{ '权限中心' }}</el-checkbox
>
<el-checkbox-group <el-checkbox-group
v-model="ruleForm.centerList" v-model="ruleForm.centerList"
:disabled="lookOver" :disabled="lookOver"
@ -130,8 +125,7 @@
v-for="item in registList" v-for="item in registList"
:key="item.value" :key="item.value"
:label="item.value" :label="item.value"
>{{ item.label }}</el-checkbox >{{ item.label }}</el-checkbox>
>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
</el-form-item> </el-form-item>
@ -141,16 +135,15 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="'活动时间'" prop="ruleFormTime"> <el-form-item :label="'活动时间'" prop="ruleFormTime">
<el-date-picker <el-date-picker
:disabled="lookOver"
v-model="ruleForm.ruleFormTime" v-model="ruleForm.ruleFormTime"
@change="changeTime" :disabled="lookOver"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange" type="datetimerange"
:range-separator="'至'" :range-separator="'至'"
:start-placeholder="'开始日期'" :start-placeholder="'开始日期'"
:end-placeholder="'结束日期'" :end-placeholder="'结束日期'"
> @change="changeTime"
</el-date-picker> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -158,59 +151,56 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="'展示时间'" prop="ruleFormTime1"> <el-form-item :label="'展示时间'" prop="ruleFormTime1">
<el-date-picker <el-date-picker
:disabled="lookOver"
v-model="ruleForm.ruleFormTime1" v-model="ruleForm.ruleFormTime1"
@change="changeTime1" :disabled="lookOver"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange" type="datetimerange"
:range-separator="'至'" :range-separator="'至'"
:start-placeholder="'开始日期'" :start-placeholder="'开始日期'"
:end-placeholder="'结束日期'" :end-placeholder="'结束日期'"
> @change="changeTime1"
</el-date-picker> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<repurchQuan v-show="tabActive == 1" ref="repurchQuan"></repurchQuan> <repurchQuan v-show="tabActive == 1" ref="repurchQuan" />
<directUpdata v-show="tabActive == 2" ref="directUpdata"></directUpdata> <directUpdata v-show="tabActive == 2" ref="directUpdata" />
<directAverage <directAverage
v-show="tabActive == 3" v-show="tabActive == 3"
ref="directAverage" ref="directAverage"
></directAverage> />
</div> </div>
<div class="footer" v-show="controlType != 4"> <div v-show="controlType != 4" class="footer">
<el-button size="small" class="cancelBtn"> <el-button size="small" class="cancelBtn" @click="$router.back()">
{{ '取消' }}</el-button {{ '取消' }}</el-button>
> <el-button size="small" class="sureBtn" @click="submit('ruleForm')">
<el-button size="small" @click="submit('ruleForm')" class="sureBtn"> {{ '确认' }}</el-button>
{{ '确认' }}</el-button
>
</div> </div>
<!-- </div> --> <!-- </div> -->
</div> </div>
</template> </template>
<script> <script>
import Editor from "@/components/Editor"; import Editor from '@/components/Editor'
import * as api from "@/api/giftGoods.js"; import * as api from '@/api/giftGoods.js'
import topBar from "@/components/topBar"; import topBar from '@/components/topBar'
import ImageUpload from "@/components/ImageUpload"; import ImageUpload from '@/components/ImageUpload'
import repurchQuan from "@/views/marketing/directGifts/repurchQuan"; import repurchQuan from '@/views/marketing/directGifts/repurchQuan'
import directUpdata from "@/views/marketing/directGifts/directUpdata"; import directUpdata from '@/views/marketing/directGifts/directUpdata'
import directAverage from "@/views/marketing/directGifts/directAverage"; import directAverage from '@/views/marketing/directGifts/directAverage'
export default { export default {
name: "GiftGoodsList", name: 'GiftGoodsList',
components: { components: {
topBar, topBar,
ImageUpload, ImageUpload,
repurchQuan, repurchQuan,
directUpdata, directUpdata,
directAverage, directAverage,
Editor, Editor
}, },
data() { data() {
return { return {
@ -218,22 +208,22 @@ export default {
topList: [ topList: [
{ {
name: '基本信息', name: '基本信息',
id: 0, id: 0
}, },
{ {
name: '复购券', name: '复购券',
id: 1, id: 1
}, },
{ {
name: '直推升级', name: '直推升级',
id: 2, id: 2
}, },
{ {
name: '复购券均分', name: '复购券均分',
id: 3, id: 3
}, }
], ],
uploadImgUrl: process.env.VUE_APP_BASE_API + "/system/upload", uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload',
ruleForm: { ruleForm: {
checked1: false, checked1: false,
checked2: false, checked2: false,
@ -243,210 +233,210 @@ export default {
centerList: [], centerList: [],
goalMemberConfigList: [], goalMemberConfigList: [],
ruleFormTime: [], ruleFormTime: [],
ruleFormTime1: [], ruleFormTime1: []
}, },
rules: { rules: {
actName: [ actName: [
{ required: true, message: '请输入活动名称', trigger: "blur" }, { required: true, message: '请输入活动名称', trigger: 'blur' }
], ],
actExplain: [ actExplain: [
{ required: true, message: '请输入活动说明', trigger: "blur" }, { required: true, message: '请输入活动说明', trigger: 'blur' }
], ],
actCover: [ actCover: [
{ required: true, message: '请上传活动封面', trigger: "change" }, { required: true, message: '请上传活动封面', trigger: 'change' }
], ],
goalMemberConfigList: [ goalMemberConfigList: [
{ required: true, message: '请选择目标用户群体', trigger: "change" }, { required: true, message: '请选择目标用户群体', trigger: 'change' }
], ],
ruleFormTime: [ ruleFormTime: [
{ required: true, message: '请选择活动时间', trigger: "change" }, { required: true, message: '请选择活动时间', trigger: 'change' }
], ],
ruleFormTime1: [ ruleFormTime1: [
{ required: true, message: '请选择展示时间', trigger: "change" }, { required: true, message: '请选择展示时间', trigger: 'change' }
], ]
}, },
lookOver: false, lookOver: false,
gradeList: [], gradeList: [],
awardsList: [], awardsList: [],
registList: [], registList: [],
pkId: "", pkId: '',
repurchaseCouponsShowList: [], repurchaseCouponsShowList: [],
controlType: "", controlType: '',
addData: {}, addData: {}
}; }
}, },
mounted() { mounted() {
this.getData(); this.getData()
// 1=,2=,3=4 // 1=,2=,3=4
if ( if (
this.$route.query.controlType == 4 || this.$route.query.controlType == 4 ||
this.$route.query.controlType == 3 this.$route.query.controlType == 3
) { ) {
this.lookOver = true; this.lookOver = true
} else { } else {
this.lookOver = false; this.lookOver = false
} }
this.controlType = this.$route.query.controlType; this.controlType = this.$route.query.controlType
this.pkId = this.$route.query.pkId || ""; this.pkId = this.$route.query.pkId || ''
if (this.pkId) { if (this.pkId) {
this.getDetails(); this.getDetails()
} }
if (this.$route.query.data) { if (this.$route.query.data) {
this.addData = JSON.parse(this.$route.query.data); this.addData = JSON.parse(this.$route.query.data)
this.getDetails1(); this.getDetails1()
} }
}, },
methods: { methods: {
getDetails() { getDetails() {
api api
.recommendDetail({ .recommendDetail({
activityId: this.pkId, activityId: this.pkId
}) })
.then((res) => { .then((res) => {
this.addData = res.data; this.addData = res.data
this.$set(this.ruleForm, "actName", res.data.activityParam.actName); this.$set(this.ruleForm, 'actName', res.data.activityParam.actName)
this.$set( this.$set(
this.ruleForm, this.ruleForm,
"actExplain", 'actExplain',
res.data.activityParam.actExplain res.data.activityParam.actExplain
); )
this.$set(this.ruleForm, "actCover", res.data.activityParam.actCover); this.$set(this.ruleForm, 'actCover', res.data.activityParam.actCover)
this.ruleForm.pkId = res.data.activityParam.pkId; this.ruleForm.pkId = res.data.activityParam.pkId
this.ruleForm.actStartDate = res.data.activityParam.actStartDate; this.ruleForm.actStartDate = res.data.activityParam.actStartDate
this.ruleForm.actEndDate = res.data.activityParam.actEndDate; this.ruleForm.actEndDate = res.data.activityParam.actEndDate
this.ruleForm.disStartDate = res.data.activityParam.disStartDate; this.ruleForm.disStartDate = res.data.activityParam.disStartDate
this.ruleForm.disEndDate = res.data.activityParam.disEndDate; this.ruleForm.disEndDate = res.data.activityParam.disEndDate
this.$set(this.ruleForm, "ruleFormTime", [ this.$set(this.ruleForm, 'ruleFormTime', [
res.data.activityParam.actStartDate, res.data.activityParam.actStartDate,
res.data.activityParam.actEndDate, res.data.activityParam.actEndDate
]); ])
this.$set(this.ruleForm, "ruleFormTime1", [ this.$set(this.ruleForm, 'ruleFormTime1', [
res.data.activityParam.disStartDate, res.data.activityParam.disStartDate,
res.data.activityParam.disEndDate, res.data.activityParam.disEndDate
]); ])
let arr1 = [], const arr1 = []
arr2 = [], const arr2 = []
arr3 = []; const arr3 = []
res.data.activityParam.goalMemberConfigList.forEach((item) => { res.data.activityParam.goalMemberConfigList.forEach((item) => {
if (item.memberType == 1) { if (item.memberType == 1) {
arr1.push(item.pkLevel); arr1.push(item.pkLevel)
} else if (item.memberType == 2) { } else if (item.memberType == 2) {
arr2.push(item.pkLevel); arr2.push(item.pkLevel)
} else if (item.memberType == 3) { } else if (item.memberType == 3) {
arr3.push(item.pkLevel); arr3.push(item.pkLevel)
} }
}); })
this.$set(this.ruleForm, "levelList", arr1); this.$set(this.ruleForm, 'levelList', arr1)
this.$set(this.ruleForm, "realList", arr2); this.$set(this.ruleForm, 'realList', arr2)
this.$set(this.ruleForm, "centerList", arr3); this.$set(this.ruleForm, 'centerList', arr3)
this.$refs.repurchQuan.getPage( this.$refs.repurchQuan.getPage(
this.addData.repurchaseCouponsShowList || "" this.addData.repurchaseCouponsShowList || ''
); )
this.$refs.directUpdata.getPage( this.$refs.directUpdata.getPage(
this.addData.recommendUpgradeList || "" this.addData.recommendUpgradeList || ''
); )
this.$refs.directUpdata.getPages(this.addData.authorityList || ""); this.$refs.directUpdata.getPages(this.addData.authorityList || '')
this.$refs.directAverage.getPage( this.$refs.directAverage.getPage(
this.addData.acRecommendSharVO || "" this.addData.acRecommendSharVO || ''
); )
let that = this; const that = this
setTimeout(() => { setTimeout(() => {
that.getCheck(); that.getCheck()
}, 50); }, 50)
}); })
}, },
getDetails1() { getDetails1() {
this.$set(this.ruleForm, "actName", this.addData.activityParam.actName); this.$set(this.ruleForm, 'actName', this.addData.activityParam.actName)
this.$set( this.$set(
this.ruleForm, this.ruleForm,
"actExplain", 'actExplain',
this.addData.activityParam.actExplain this.addData.activityParam.actExplain
); )
this.$set(this.ruleForm, "actCover", this.addData.activityParam.actCover); this.$set(this.ruleForm, 'actCover', this.addData.activityParam.actCover)
this.$set(this.ruleForm, "ruleFormTime", [ this.$set(this.ruleForm, 'ruleFormTime', [
this.addData.activityParam.actStartDate, this.addData.activityParam.actStartDate,
this.addData.activityParam.actEndDate, this.addData.activityParam.actEndDate
]); ])
this.$set(this.ruleForm, "ruleFormTime1", [ this.$set(this.ruleForm, 'ruleFormTime1', [
this.addData.activityParam.disStartDate, this.addData.activityParam.disStartDate,
this.addData.activityParam.disEndDate, this.addData.activityParam.disEndDate
]); ])
let arr1 = [], const arr1 = []
arr2 = [], const arr2 = []
arr3 = []; const arr3 = []
this.addData.activityParam.goalMemberConfigList.forEach((item) => { this.addData.activityParam.goalMemberConfigList.forEach((item) => {
if (item.memberType == 1) { if (item.memberType == 1) {
arr1.push(item.pkLevel); arr1.push(item.pkLevel)
} else if (item.memberType == 2) { } else if (item.memberType == 2) {
arr2.push(item.pkLevel); arr2.push(item.pkLevel)
} else if (item.memberType == 3) { } else if (item.memberType == 3) {
arr3.push(item.pkLevel); arr3.push(item.pkLevel)
} }
}); })
this.$set(this.ruleForm, "levelList", arr1); this.$set(this.ruleForm, 'levelList', arr1)
this.$set(this.ruleForm, "realList", arr2); this.$set(this.ruleForm, 'realList', arr2)
this.$set(this.ruleForm, "centerList", arr3); this.$set(this.ruleForm, 'centerList', arr3)
this.$refs.repurchQuan.getPage( this.$refs.repurchQuan.getPage(
this.addData.repurchaseCouponsShowList || "" this.addData.repurchaseCouponsShowList || ''
); )
this.$refs.directUpdata.getPage(this.addData.recommendUpgradeList || ""); this.$refs.directUpdata.getPage(this.addData.recommendUpgradeList || '')
this.$refs.directUpdata.getPages(this.addData.authorityList || ""); this.$refs.directUpdata.getPages(this.addData.authorityList || '')
this.$refs.directAverage.getPage(this.addData.acRecommendSharVO || ""); this.$refs.directAverage.getPage(this.addData.acRecommendSharVO || '')
let that = this; const that = this
setTimeout(() => { setTimeout(() => {
that.getCheck(); that.getCheck()
}, 500); }, 500)
}, },
// tab // tab
handleLink(id) { handleLink(id) {
this.tabActive = id; this.tabActive = id
}, },
// //
getCheck() { getCheck() {
let arr1 = []; const arr1 = []
let arr2 = []; const arr2 = []
let arr3 = []; const arr3 = []
// //
this.ruleForm.levelList.forEach((item) => { this.ruleForm.levelList.forEach((item) => {
arr1.push({ arr1.push({
memberType: 1, memberType: 1,
pkLevel: item, pkLevel: item
}); })
}); })
// //
this.ruleForm.realList.forEach((item) => { this.ruleForm.realList.forEach((item) => {
arr2.push({ arr2.push({
memberType: 2, memberType: 2,
pkLevel: item, pkLevel: item
}); })
}); })
// //
this.ruleForm.centerList.forEach((item) => { this.ruleForm.centerList.forEach((item) => {
arr3.push({ arr3.push({
memberType: 3, memberType: 3,
pkLevel: item, pkLevel: item
}); })
}); })
this.ruleForm.goalMemberConfigList = [...arr1, ...arr2, ...arr3]; this.ruleForm.goalMemberConfigList = [...arr1, ...arr2, ...arr3]
// //
if (this.ruleForm.levelList.length == this.gradeList.length) { if (this.ruleForm.levelList.length == this.gradeList.length) {
this.ruleForm.checked1 = true; this.ruleForm.checked1 = true
} else { } else {
this.ruleForm.checked1 = false; this.ruleForm.checked1 = false
} }
if (this.ruleForm.realList.length == this.awardsList.length) { if (this.ruleForm.realList.length == this.awardsList.length) {
this.ruleForm.checked2 = true; this.ruleForm.checked2 = true
} else { } else {
this.ruleForm.checked2 = false; this.ruleForm.checked2 = false
} }
if (this.ruleForm.centerList.length == this.registList.length) { if (this.ruleForm.centerList.length == this.registList.length) {
this.ruleForm.checked3 = true; this.ruleForm.checked3 = true
} else { } else {
this.ruleForm.checked3 = false; this.ruleForm.checked3 = false
} }
}, },
// //
@ -454,52 +444,52 @@ export default {
// //
if (index == 1 && val) { if (index == 1 && val) {
this.ruleForm.levelList = this.gradeList.map((item) => { this.ruleForm.levelList = this.gradeList.map((item) => {
return item.pkId; return item.pkId
}); })
} else if (index == 1 && !val) { } else if (index == 1 && !val) {
this.ruleForm.levelList = []; this.ruleForm.levelList = []
} }
// //
if (index == 2 && val) { if (index == 2 && val) {
this.ruleForm.realList = this.awardsList.map((item) => { this.ruleForm.realList = this.awardsList.map((item) => {
return item.pkId; return item.pkId
}); })
} else if (index == 2 && !val) { } else if (index == 2 && !val) {
this.ruleForm.realList = []; this.ruleForm.realList = []
} }
// //
if (index == 3 && val) { if (index == 3 && val) {
this.ruleForm.centerList = this.registList.map((item) => { this.ruleForm.centerList = this.registList.map((item) => {
return item.value; return item.value
}); })
} else if (index == 3 && !val) { } else if (index == 3 && !val) {
this.ruleForm.centerList = []; this.ruleForm.centerList = []
} }
this.getCheck(); this.getCheck()
}, },
changeTime(val) { changeTime(val) {
this.ruleForm.actStartDate = val[0]; this.ruleForm.actStartDate = val[0]
this.ruleForm.actEndDate = val[1]; this.ruleForm.actEndDate = val[1]
}, },
changeTime1(val) { changeTime1(val) {
this.ruleForm.disStartDate = val[0]; this.ruleForm.disStartDate = val[0]
this.ruleForm.disEndDate = val[1]; this.ruleForm.disEndDate = val[1]
}, },
getData() { getData() {
api.awardsList().then((res) => { api.awardsList().then((res) => {
this.awardsList = res.rows; this.awardsList = res.rows
}); })
api.gradeList().then((res) => { api.gradeList().then((res) => {
this.gradeList = res.rows; this.gradeList = res.rows
}); })
api.registerPowerState().then((res) => { api.registerPowerState().then((res) => {
this.registList = res.data; this.registList = res.data
}); })
}, },
submit() { submit() {
this.$refs["ruleForm"].validate((valid) => { this.$refs['ruleForm'].validate((valid) => {
if (valid) { if (valid) {
let obj = Object.assign( const obj = Object.assign(
{}, {},
{ {
controlType: this.controlType, controlType: this.controlType,
@ -508,22 +498,23 @@ export default {
recommendUpgradeList: recommendUpgradeList:
this.$refs.directUpdata.recommendUpgradeList, this.$refs.directUpdata.recommendUpgradeList,
authorityList: this.$refs.directUpdata.form.waresAuthorityList, authorityList: this.$refs.directUpdata.form.waresAuthorityList,
acRecommendSharVO: this.$refs.directAverage.allData, acRecommendSharVO: this.$refs.directAverage.allData?.[0] || ''
} }
); )
this.$router.push({ api.directRuleConfigSubmit(obj).then((res) => {
path: "directZxqc", if (res.code === 200) {
query: { this.$message({
data: JSON.stringify(obj), message: res.msg || '操作成功',
approvalBusiness: 723, type: 'success'
controlType: this.controlType, })
}, this.$router.back()
}); }
})
} }
}); })
}, }
}, }
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -8,52 +8,73 @@
<div class=""> <div class="">
<div class="tit">{{ '复购券均分' }} </div> <div class="tit">{{ '复购券均分' }} </div>
<div class="xian"></div> <div class="xian" />
<div class="table"> <div class="table">
<el-table :data="allData" <el-table
border :data="allData"
style="width: 60%;"> border
<el-table-column align="center" style="width: 60%;"
prop="actName" >
:label="'订单类型'"> <el-table-column
align="center"
prop="actName"
:label="'订单类型'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.orderTypeList" <el-select
size="medium" v-model="scope.row.orderTypeList"
multiple size="medium"
:placeholder="'订单类型'"> multiple
<el-option v-for="item in orderList" :placeholder="'订单类型'"
:key="item.value" >
:label="item.label" <el-option
:value="item.value"> v-for="item in orderList"
</el-option> :key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" <el-table-column
prop="actStartDate" align="center"
label="满足金额(¥)"> prop="actStartDate"
label="满足金额(¥)"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.orderAmount" <el-input
size="medium" v-model="scope.row.orderAmount"
placeholder="请输入满足金额(¥)"></el-input> size="medium"
type="number"
placeholder="请输入满足金额(¥)"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" <el-table-column
prop="actEndDate" align="center"
:label="'满足业绩'+`(${isLocals()})`"> prop="actEndDate"
:label="'满足业绩'+`(${isLocals()})`"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.orderAchieve" <el-input
size="medium" v-model="scope.row.orderAchieve"
:placeholder="'请输入满足业绩'+`(${isLocals()})`"></el-input> size="medium"
type="number"
:placeholder="'请输入满足业绩'+`(${isLocals()})`"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" <el-table-column
prop="status" align="center"
:label="'比例'"> prop="status"
:label="'比例'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.ratioValue" <el-input
size="medium" v-model="scope.row.ratioValue"
:placeholder="'请输入'"></el-input> size="medium"
:placeholder="'请输入'"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -63,7 +84,7 @@
<script> <script>
import * as api from '@/api/giftGoods.js' import * as api from '@/api/giftGoods.js'
import {isLocals} from "@/utils/numberToCurrency"; import { isLocals } from '@/utils/numberToCurrency'
export default { export default {
components: {}, components: {},
data() { data() {
@ -73,10 +94,10 @@ export default {
orderTypeList: [], orderTypeList: [],
orderAmount: '', orderAmount: '',
orderAchieve: '', orderAchieve: '',
ratioValue: '', ratioValue: ''
}, }
], ],
orderList: [], orderList: []
} }
}, },
mounted() { mounted() {
@ -93,7 +114,7 @@ export default {
api.getOrderType().then((res) => { api.getOrderType().then((res) => {
this.orderList = res.data this.orderList = res.data
}) })
}, }
// tableRowClassName({ row, rowIndex }) { // tableRowClassName({ row, rowIndex }) {
// if (rowIndex % 2 == 1) { // if (rowIndex % 2 == 1) {
// return 'warning-row' // return 'warning-row'
@ -102,7 +123,7 @@ export default {
// } // }
// return '' // return ''
// }, // },
}, }
} }
</script> </script>

View File

@ -1,497 +0,0 @@
<!--
* @Descripttion:
* @version:
* @Author: 王三华
* @Date: 2023-05-09 10:57:15
-->
<template>
<div class="page">
<topBar
v-if="topList.length > 0"
:top-list="topList"
:moren="moren"
/>
<div class="main">
<div class="thetable">
<div class="fontTitle">{{ '在线签呈' }}</div>
<div class="titleflex">
<div>{{ '编号' }} :</div>
<div>
<el-radio-group v-model="allData.signType">
<el-radio
v-for="ctem in checkList"
:key="ctem.value"
:label="ctem.value"
>{{ ctem.label }}</el-radio>
</el-radio-group>
</div>
</div>
<table id="tfhover" class="tftable" border="1">
<tr>
<td colspan="1" width="190px" align="center">
{{ '发起部门' }} :
</td>
<td v-if="allData.signData" colspan="1" width="435px">
{{ allData.signData.deptName }}
</td>
<td colspan="1" width="140px" align="center">
{{ '发起人' }} :
</td>
<td v-if="allData.signData" colspan="1">
{{ allData.signData.userName }}
</td>
</tr>
<tr>
<td colspan="1" align="center">{{ '主旨' }} :</td>
<td v-if="allData.signData" colspan="1">
{{ allData.signData.approvalBusinessVal }}{{ controlType }}
</td>
<td colspan="1" align="center">{{ '日期' }} :</td>
<td v-if="allData.signData" colspan="1">
{{ allData.signData.creationTime }}
</td>
</tr>
<!-- // -->
<tr>
<td colspan="1" align="center">{{ '审批流程' }}</td>
<td colspan="3">
<div class="disflex">
<span
v-for="(ctem, cndex) in allData.signData.detailList"
style="margin: 0 5px 5px 0"
>
<el-select
v-model="ctem.pkApprover"
filterable
size="mini"
:placeholder="'请选择'"
@change="getApprover"
>
<el-option
v-for="item in approbalList"
:key="item.userId"
:label="item.nickName + '(' + item.deptName + ')'"
:value="item.userId"
/>
</el-select>
</span>
<span style="margin: 0 5px 5px 0">
<i
v-show="allData.signData.detailList.length > 0"
class="el-icon-remove-outline"
style="font-size: 18px; margin-right: 5px"
@click.stop="delData"
/>
<i
class="el-icon-circle-plus-outline"
style="font-size: 18px"
@click.stop="addData"
/>
</span>
</div>
</td>
</tr>
<tr>
<td colspan="1" align="center">{{ '抄送人' }}</td>
<td colspan="3">
<div class="disflex">
<span
v-for="(ctem, cndex) in allData.signData.sendList"
style="margin: 0 5px 5px 0"
>
<el-select
v-model="ctem.pkSend"
filterable
size="mini"
:placeholder="'请选择'"
@change="getApprover"
>
<el-option
v-for="item in userAllList"
:key="item.userId"
:label="item.nickName + '(' + item.deptName + ')'"
:value="item.userId"
/>
</el-select>
</span>
<span style="margin: 0 5px 5px 0">
<i
v-show="allData.signData.sendList.length > 0"
class="el-icon-remove-outline"
style="font-size: 18px; margin-right: 5px"
@click.stop="delData1"
/>
<i
class="el-icon-circle-plus-outline"
style="font-size: 18px"
@click.stop="addData1"
/>
</span>
</div>
</td>
</tr>
<tr>
<td style="height: 190px" align="center">{{ '情况说明' }}</td>
<td colspan="3" style="padding: 0">
<div>
<!-- <el-input type="textarea"
:rows="6"
:placeholder="'请输入'"
v-model="allData.remark">
</el-input> -->
<noImgEditor v-model="allData.remark" :min-height="190" />
</div>
</td>
</tr>
<tr>
<td style="height: 193px" align="center">{{ '业务诉求' }}</td>
<td colspan="3" style="padding: 0; vertical-align: top">
<div>
<el-table
:data="allData.updateParentParamList"
style="width: 100%"
:header-cell-style="{ background: '#EEEEEE' }"
>
<el-table-column
v-for="ctem in allData.tableTit"
:key="ctem.value"
align="center"
:prop="ctem.value"
:label="ctem.label"
>
<template slot-scope="scope">
<div v-show="ctem.value == 'actExplain'">
<div
style="
color: #48b2fd;
text-decoration: underline;
cursor: pointer;
"
@click="details"
>
{{ '查看详情' }}
</div>
</div>
<div v-show="ctem.value != 'actExplain'">
<div>
{{ scope.row[ctem.value] }}
</div>
</div>
</template>
</el-table-column>
</el-table>
</div>
</td>
</tr>
<tr>
<td style="height: 190px" align="center">{{ '附件' }}</td>
<td colspan="3" style="padding: 0">
<div style="height: 100%; padding: 10px 20px">
<el-upload
class="upload-demo"
:action="uploadImgUrl"
:on-success="handleUploadSuccess"
:on-remove="removeFile"
multiple
:headers="headers"
:file-list="fileList"
>
<el-button size="small" type="primary">{{
'点击上传'
}}</el-button>
</el-upload>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="footer">
<div style="margin: 0 auto">
<el-button class="thebtn" @click="cancelCz">
{{ '取消' }}</el-button>
<el-button type="primary" class="thebtn" @click="saveDate">
{{ '确认' }}</el-button>
</div>
</div>
</div>
</template>
<script>
import topBar from '@/components/topBar'
import * as man from '@/api/manage'
import onlineSign from '../../dashboard/onlineSign.json'
import { getToken } from '@/utils/auth'
export default {
name: 'Zxqc',
components: {
topBar
},
data() {
return {
uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload', //
headers: {
Authorization: getToken()
},
onlineSign,
moren: 'specialZxqc',
topList: [
{
name: '在线签呈',
path: 'specialZxqc'
}
],
checkList: [],
allData: {
remark: '',
signType: 1,
fileList: [],
signData: {
detailList: [],
sendList: []
},
approvalBusiness: ''
},
signDataList: [],
fileList: [],
approbalList: [],
//
userAllList: [],
allObj: {},
controlType: '' // 1=,2=,3=
}
},
mounted() {
//
this.allObj = JSON.parse(this.$route.query.data)
console.log(this.allObj, 'this.allObj')
const controlType = this.$route.query.controlType
if (controlType == 1) {
this.controlType = '新增'
} else if (controlType == 2) {
this.controlType = '修改'
} else {
this.controlType = '删除'
}
this.allData.updateParentParamList = [this.allObj.activityParam]
//
this.allData.approvalBusiness = this.$route.query.approvalBusiness
this.getSignData([this.allData.approvalBusiness])
},
methods: {
details(code) {
this.$router.push({
path: '/marketing/directGifts/addDirect',
query: {
controlType: 4,
data: JSON.stringify(this.allObj)
}
})
},
getSignData(arr) {
man.signData(arr).then((res) => {
this.allData.signData = res.data[0]
//
this.$set(this.allData, 'signType', 1)
this.$set(this.allData, 'remark', '')
this.$set(this.allData, 'fileList', [])
// table
this.onlineSign.forEach((ctem) => {
if (this.allData.approvalBusiness == ctem.id) {
this.allData.tableTit = ctem.textList
}
})
this.$forceUpdate()
this.getApprove()
this.getSignType()
})
},
getApprove() {
//
man.approvalUser().then((res) => {
this.approbalList = res.data
})
man.userAll().then((res) => {
this.userAllList = res.data
})
},
getSignType() {
man.signType().then((res) => {
this.checkList = res.data
})
},
saveDate() {
//
this.allData.userIdList = this.allData.signData.detailList.map((item) => {
return item.pkApprover
})
this.allData.userIdList = this.allData.userIdList.filter((item) => item)
//
this.allData.sendIdList = this.allData.signData.sendList.map((item) => {
return item.pkSend
})
this.allData.sendIdList = this.allData.sendIdList.filter((item) => item)
this.allData.fileList = this.fileList.map((item) => {
return item.url
})
const obj = {
activityParam: this.allObj.activityParam,
controlType: this.allObj.controlType,
repurchaseCouponsShowList: this.allObj.repurchaseCouponsShowList,
recommendUpgradeList: this.allObj.recommendUpgradeList,
authorityList: this.allObj.authorityList,
acRecommendSharVO: this.allObj.acRecommendSharVO[0],
signType: this.allData.signType, //
remark: this.allData.remark, //
fileList: this.allData.fileList, // []
userIdList: this.allData.userIdList, // []
sendIdList: this.allData.sendIdList // []
}
man.recommendPetition(obj).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: 'success'
})
this.$router.push({
path: '/marketing/directGifts/directGiftsList'
})
}
})
},
cancelCz() {
this.$router.go(-1)
},
//
getApprover() {
this.$nextTick(() => {
this.$forceUpdate()
})
},
//
addData() {
const arr = JSON.parse(JSON.stringify(this.allData.signData.detailList))
arr.push({
pkApprover: ''
})
this.$set(this.allData.signData, 'detailList', arr)
this.$forceUpdate()
},
//
addData1() {
const arr = JSON.parse(JSON.stringify(this.allData.signData.sendList))
arr.push({
pkSend: ''
})
this.$set(this.allData.signData, 'sendList', arr)
this.$forceUpdate()
},
//
delData1() {
this.allData.signData.sendList.pop()
this.$forceUpdate()
},
//
delData() {
this.allData.signData.detailList.pop()
this.$forceUpdate()
},
handleUploadSuccess(res) {
if (res.code == 200) {
this.fileList.push(res.data)
} else {
this.$message({
type: 'error',
message: '上传失败'
})
}
},
removeFile(file, fileList) {
this.fileList.forEach((item, index) => {
if (file.uid == item.uid) {
this.fileList.splice(index, 1)
}
})
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-table thead {
color: #000000;
}
.page {
padding: 20px;
background: #f9f9f9;
font-size: 14px;
.main {
// margin-top: 20px;
background: #ffffff;
border-radius: 8px;
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
display: flex;
margin: 0 auto;
width: 100%;
padding: 20px;
flex-direction: column;
}
.thetable {
margin: 0 auto;
margin-bottom: 20px;
.fontTitle {
font-weight: bold;
font-size: 24px;
text-align: center;
}
.titleflex {
display: flex;
margin-top: 10px;
margin-bottom: 10px;
justify-content: space-between;
}
}
.tftable {
font-size: 14px;
border-collapse: collapse;
border-radius: 10px;
width: 1060px;
border: 1px solid #cccccc;
.spbox {
display: flex;
align-items: center;
justify-content: flex-end;
}
th {
font-size: 14px;
// padding: 20px;
}
tr td {
font-size: 14px;
padding: 10px 20px;
height: 60px;
}
}
.footer {
display: flex;
justify-content: center;
align-items: center;
padding: 15px 0;
.thebtn {
width: 120px;
height: 38px;
}
}
}
//
.disflex {
display: flex;
align-items: center;
flex-wrap: wrap;
}
</style>

View File

@ -2,9 +2,9 @@
<div class="page"> <div class="page">
<topBar <topBar
v-if="topList.length > 0" v-if="topList.length > 0"
:topList="topList" :top-list="topList"
:moren="moren" :moren="moren"
></topBar> />
<div class="thetopbox"> <div class="thetopbox">
<el-form ref="queryParams" :model="queryParams" label-width="100px"> <el-form ref="queryParams" :model="queryParams" label-width="100px">
<el-row> <el-row>
@ -14,7 +14,7 @@
prop="actName" prop="actName"
class="el-inputs" class="el-inputs"
> >
<el-input clearable v-model="queryParams.actName"></el-input> <el-input v-model="queryParams.actName" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
@ -23,44 +23,42 @@
prop="activityStatus" prop="activityStatus"
class="el-inputs" class="el-inputs"
> >
<el-select clearable v-model="queryParams.activityStatus"> <el-select v-model="queryParams.activityStatus" clearable>
<el-option <el-option
v-for="item in stateList" v-for="item in stateList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
></el-option> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="'开始日期'" prop="enableState"> <el-form-item :label="'开始日期'" prop="enableState">
<el-date-picker <el-date-picker
@change="changeTime" v-model="queryParams.thetime1"
type="datetimerange" type="datetimerange"
range-separator="——" range-separator="——"
:start-placeholder="'开始日期'" :start-placeholder="'开始日期'"
:end-placeholder="'结束日期'" :end-placeholder="'结束日期'"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
:unlink-panels="true" :unlink-panels="true"
v-model="queryParams.thetime1" @change="changeTime"
> />
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="'结束日期'" prop="enableState"> <el-form-item :label="'结束日期'" prop="enableState">
<el-date-picker <el-date-picker
@change="changeTime2" v-model="queryParams.thetime2"
type="datetimerange" type="datetimerange"
range-separator="——" range-separator="——"
:start-placeholder="'开始日期'" :start-placeholder="'开始日期'"
:end-placeholder="'结束日期'" :end-placeholder="'结束日期'"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
:unlink-panels="true" :unlink-panels="true"
v-model="queryParams.thetime2" @change="changeTime2"
> />
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -68,26 +66,23 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="'创建日期'" prop="enableState"> <el-form-item :label="'创建日期'" prop="enableState">
<el-date-picker <el-date-picker
@change="changeTime3" v-model="queryParams.thetime3"
type="datetimerange" type="datetimerange"
range-separator="——" range-separator="——"
:start-placeholder="'开始日期'" :start-placeholder="'开始日期'"
:end-placeholder="'结束日期'" :end-placeholder="'结束日期'"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
:unlink-panels="true" :unlink-panels="true"
v-model="queryParams.thetime3" @change="changeTime3"
> />
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" style="margin-left: 30px"> <el-col :span="4" style="margin-left: 30px">
<div class="searchbox"> <div class="searchbox">
<el-button class="my_search" @click="reSearch"> <el-button class="my_search" @click="reSearch">
{{ '搜索' }}</el-button {{ '搜索' }}</el-button>
>
<el-button class="my_reset" @click="reChongzhi"> <el-button class="my_reset" @click="reChongzhi">
{{ '重置' }}</el-button {{ '重置' }}</el-button>
>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -97,42 +92,38 @@
<div class="maintop"> <div class="maintop">
<div class="mainbtn"> <div class="mainbtn">
<el-button <el-button
v-hasButtons="['lotteryAdd']"
size="mini" size="mini"
class="thebtn1" class="thebtn1"
@click="adddate()" @click="adddate()"
v-hasButtons="['lotteryAdd']" >{{ '添加' }}</el-button>
>{{ '添加' }}</el-button
>
<el-button <el-button
size="mini"
@click="handleExport"
v-hasButtons="['lotteryExport']" v-hasButtons="['lotteryExport']"
size="mini"
class="exportBtn" class="exportBtn"
@click="handleExport"
> >
{{ '导出' }}</el-button {{ '导出' }}</el-button>
>
</div> </div>
</div> </div>
<div class="maintable"> <div class="maintable">
<el-table <el-table
:data="tableData"
v-loading="loading" v-loading="loading"
:data="tableData"
style="width: 100%" style="width: 100%"
height="680px" height="680px"
:header-cell-style="{ background: '#EEEEEE' }" :header-cell-style="{ background: '#EEEEEE' }"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
@selection-change="handleSelectionChange"
:span-method="objectSpanMethod" :span-method="objectSpanMethod"
@selection-change="handleSelectionChange"
> >
<el-table-column prop="colsele" type="selection" width="55"> <el-table-column prop="colsele" type="selection" width="55" />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="actName" prop="actName"
:label="'活动名称'" :label="'活动名称'"
> />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="giftCover" prop="giftCover"
@ -143,61 +134,53 @@
style="width: 48px; height: 48px" style="width: 48px; height: 48px"
:src="scope.row.giftCover" :src="scope.row.giftCover"
alt="" alt=""
/> >
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="giftName" prop="giftName"
:label="'奖品名称'" :label="'奖品名称'"
> />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="giftNumber" prop="giftNumber"
:label="'奖品数量'" :label="'奖品数量'"
> />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="minNumber" prop="minNumber"
:label="'最小中奖数量'" :label="'最小中奖数量'"
> />
</el-table-column>
<!-- <el-table-column align="center" prop="" label="奖品类型"> <!-- <el-table-column align="center" prop="" label="奖品类型">
</el-table-column> --> </el-table-column> -->
<el-table-column <el-table-column
align="center" align="center"
prop="grantWayStr" prop="grantWayStr"
:label="'发放方式'" :label="'发放方式'"
> />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="status" prop="status"
:label="'活动状态'" :label="'活动状态'"
> />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="actStartDate" prop="actStartDate"
:label="'开始日期'" :label="'开始日期'"
> />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="actEndDate" prop="actEndDate"
:label="'结束日期'" :label="'结束日期'"
> />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="creationTime" prop="creationTime"
:label="'创建日期'" :label="'创建日期'"
> />
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="caozuo" prop="caozuo"
@ -206,30 +189,30 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
style="color: #e70dec; padding: 0"
@click.native.prevent="toFixed(scope.row, 4)"
type="text"
v-hasButtons="['lotterySee']" v-hasButtons="['lotterySee']"
style="color: #e70dec; padding: 0"
type="text"
size="small" size="small"
@click.native.prevent="toFixed(scope.row, 4)"
> >
{{ '查看' }} {{ '查看' }}
</el-button> </el-button>
<el-button <el-button
style="color: #48b2fd; padding: 0"
@click.native.prevent="toFixed(scope.row, 2)"
type="text"
v-hasButtons="['lotteryUpdata']" v-hasButtons="['lotteryUpdata']"
style="color: #48b2fd; padding: 0"
type="text"
size="small" size="small"
@click.native.prevent="toFixed(scope.row, 2)"
> >
{{ '修改' }} {{ '修改' }}
</el-button> </el-button>
<el-button <el-button
@click.native.prevent="toFixed(scope.row, 3)"
type="text"
v-hasButtons="['lotteryDel']" v-hasButtons="['lotteryDel']"
type="text"
size="small" size="small"
style="color: #c73030; padding: 0" style="color: #c73030; padding: 0"
@click.native.prevent="toFixed(scope.row, 3)"
> >
{{ '删除' }} {{ '删除' }}
</el-button> </el-button>
@ -249,68 +232,69 @@
</template> </template>
<script> <script>
import topBar from "@/components/topBar"; import topBar from '@/components/topBar'
import * as api from "@/api/newgift"; import * as api from '@/api/newgift'
import { lotteryRuleConfigSubmit } from '@/api/giftGoods.js'
export default { export default {
name: "LotteryList", name: 'LotteryList',
components: { components: {
topBar, topBar
}, },
data() { data() {
return { return {
moren: "lotteryList", moren: 'lotteryList',
topList: [ topList: [
{ {
name: '抽奖配置', name: '抽奖配置',
path: "lotteryList", path: 'lotteryList'
}, }
], ],
total: 0, total: 0,
tableData: [], tableData: [],
loading:false, loading: false,
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 50, pageSize: 50
}, },
multipleSelection: [], multipleSelection: [],
stateList: [], stateList: [],
// //
needMergeArr: [ needMergeArr: [
{ {
colName: "colsele", colName: 'colsele',
mergeCheckNames: ["pkBaseId"], mergeCheckNames: ['pkBaseId']
}, },
{ {
colName: "actName", colName: 'actName',
mergeCheckNames: ["pkBaseId"], mergeCheckNames: ['pkBaseId']
}, },
{ {
colName: "activityStatusVal", colName: 'activityStatusVal',
mergeCheckNames: ["pkBaseId"], mergeCheckNames: ['pkBaseId']
}, },
{ {
colName: "caozuo", colName: 'caozuo',
mergeCheckNames: ["pkBaseId"], mergeCheckNames: ['pkBaseId']
}, },
{ {
colName: "creationTime", colName: 'creationTime',
mergeCheckNames: ["pkBaseId"], mergeCheckNames: ['pkBaseId']
}, },
{ {
colName: "actStartDate", colName: 'actStartDate',
mergeCheckNames: ["pkBaseId"], mergeCheckNames: ['pkBaseId']
}, },
{ {
colName: "actEndDate", colName: 'actEndDate',
mergeCheckNames: ["pkBaseId"], mergeCheckNames: ['pkBaseId']
}, }
], ],
rowMergeArrs: {}, // rowMergeArrs: {} //
}; }
}, },
created() { created() {
this.reSearch(); this.reSearch()
this.getOther(); this.getOther()
}, },
methods: { methods: {
deleteRow(row) { deleteRow(row) {
@ -324,140 +308,148 @@ export default {
// this.getList(); // this.getList();
// } // }
// }); // });
}); })
}, },
reChongzhi() { reChongzhi() {
this.queryParams = { this.queryParams = {
pageNum: 1, pageNum: 1,
pageSize: 50, pageSize: 50
}; }
this.reSearch(); this.reSearch()
}, },
getOther() { getOther() {
api.getActiveStatus().then((res) => { api.getActiveStatus().then((res) => {
this.stateList = res.data; this.stateList = res.data
}); })
}, },
reSearch() { reSearch() {
this.loading = true this.loading = true
api.getDrawGiftConfigList(this.queryParams).then((res) => { api.getDrawGiftConfigList(this.queryParams).then((res) => {
this.tableData = res.rows; this.tableData = res.rows
this.total = res.total; this.total = res.total
this.rowMergeArrs = this.rowMergeHandle( this.rowMergeArrs = this.rowMergeHandle(
this.needMergeArr, this.needMergeArr,
this.tableData this.tableData
); )
this.loading = false this.loading = false
}); })
}, },
adddate() { adddate() {
this.$router.push({ this.$router.push({
path: "lotteryInfo", path: 'lotteryInfo',
query: { query: {
controlType: 1, controlType: 1
}, }
}); })
}, },
// //
toFixed(row, index) { toFixed(row, index) {
if (index == 3) { if (index == 3) {
let obj = Object.assign( const obj = Object.assign(
{}, {},
{ {
controlType: index, controlType: index,
activityParam: row, activityParam: row
} }
); )
this.$router.push({ this.$confirm('确认删除该数据?', '提示', {
path: "lotteryGiftZxqc", confirmButtonText: '确定',
query: { cancelButtonText: '取消',
data: JSON.stringify(obj), type: 'warning'
approvalBusiness: 717, }).then(() => {
}, lotteryRuleConfigSubmit(obj).then((res) => {
}); if (res.code === 200) {
this.$message({
message: res.msg || '操作成功',
type: 'success'
})
this.reSearch()
}
})
})
} else { } else {
this.$router.push({ this.$router.push({
path: "lotteryInfo", path: 'lotteryInfo',
query: { query: {
pkId: row.pkBaseId, pkId: row.pkBaseId,
controlType: index, controlType: index
}, }
}); })
} }
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
return "warning-row"; return 'warning-row'
} else if (rowIndex % 2 == 0) { } else if (rowIndex % 2 == 0) {
return "success-row"; return 'success-row'
} }
return ""; return ''
}, },
changeTime(val) { changeTime(val) {
if (val) { if (val) {
this.queryParams.startActStartDate = val[0]; this.queryParams.startActStartDate = val[0]
this.queryParams.endActStartDate = val[1]; this.queryParams.endActStartDate = val[1]
} else { } else {
this.queryParams.startActStartDate = ""; this.queryParams.startActStartDate = ''
this.queryParams.endActStartDate = ""; this.queryParams.endActStartDate = ''
} }
}, },
changeTime2(val) { changeTime2(val) {
if (val) { if (val) {
this.queryParams.startActEndDate = val[0]; this.queryParams.startActEndDate = val[0]
this.queryParams.endActEndDate = val[1]; this.queryParams.endActEndDate = val[1]
} else { } else {
this.queryParams.startActEndDate = ""; this.queryParams.startActEndDate = ''
this.queryParams.endActEndDate = ""; this.queryParams.endActEndDate = ''
} }
}, },
changeTime3(val) { changeTime3(val) {
if (val) { if (val) {
this.queryParams.startCreationTime = val[0]; this.queryParams.startCreationTime = val[0]
this.queryParams.endCreationTime = val[1]; this.queryParams.endCreationTime = val[1]
} else { } else {
this.queryParams.startCreationTime = ""; this.queryParams.startCreationTime = ''
this.queryParams.endCreationTime = ""; this.queryParams.endCreationTime = ''
} }
}, },
// //
objectSpanMethod({ row, column, rowIndex, columnIndex }) { objectSpanMethod({ row, column, rowIndex, columnIndex }) {
let needMerge = this.needMergeArr.some((item) => { const needMerge = this.needMergeArr.some((item) => {
return item.colName === column.property; return item.colName === column.property
}); })
if (needMerge === true) { if (needMerge === true) {
return this.mergeAction(column.property, rowIndex, column); return this.mergeAction(column.property, rowIndex, column)
} }
}, },
mergeAction(val, rowIndex, colData) { mergeAction(val, rowIndex, colData) {
let _row = this.rowMergeArrs[val].rowArr[rowIndex]; const _row = this.rowMergeArrs[val].rowArr[rowIndex]
let _col = _row > 0 ? 1 : 0; const _col = _row > 0 ? 1 : 0
return [_row, _col]; return [_row, _col]
}, },
rowMergeHandle(arr, data) { rowMergeHandle(arr, data) {
if (!Array.isArray(arr) && !arr.length) return false; if (!Array.isArray(arr) && !arr.length) return false
if (!Array.isArray(data) && !data.length) return false; if (!Array.isArray(data) && !data.length) return false
let needMerge = {}; const needMerge = {}
arr.forEach((mergeItem) => { arr.forEach((mergeItem) => {
// //
needMerge[mergeItem.colName] = { needMerge[mergeItem.colName] = {
rowArr: [], rowArr: [],
rowMergeNum: 0, rowMergeNum: 0
}; }
let currentMergeItemData = needMerge[mergeItem.colName]; const currentMergeItemData = needMerge[mergeItem.colName]
// //
data.forEach((item, index) => { data.forEach((item, index) => {
if (index === 0) { if (index === 0) {
currentMergeItemData.rowArr.push(1); currentMergeItemData.rowArr.push(1)
currentMergeItemData.rowMergeNum = 0; currentMergeItemData.rowMergeNum = 0
} else { } else {
let currentRowData = data[index]; const currentRowData = data[index]
let preRowData = data[index - 1]; const preRowData = data[index - 1]
if ( if (
this.colMergeCheck( this.colMergeCheck(
@ -468,46 +460,45 @@ export default {
) { ) {
currentMergeItemData.rowArr[ currentMergeItemData.rowArr[
currentMergeItemData.rowMergeNum currentMergeItemData.rowMergeNum
] += 1; ] += 1
currentMergeItemData.rowArr.push(0); currentMergeItemData.rowArr.push(0)
} else { } else {
currentMergeItemData.rowArr.push(1); currentMergeItemData.rowArr.push(1)
currentMergeItemData.rowMergeNum = index; currentMergeItemData.rowMergeNum = index
} }
} }
}); })
}); })
return needMerge; return needMerge
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.$confirm('是否确认导出所有数据项?', '警告', { this.$confirm('是否确认导出所有数据项?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: "warning", type: 'warning'
}).then((_) => { }).then((_) => {
this.download( this.download(
"activity/manage/draw-gift-config/export", 'activity/manage/draw-gift-config/export',
Object.assign({}, { actType: 12 }, this.queryParams, this.select), Object.assign({}, { actType: 12 }, this.queryParams, this.select),
`${'抽奖配置'}${new Date().getTime()}.xlsx` `${'抽奖配置'}${new Date().getTime()}.xlsx`
); )
}); })
}, },
colMergeCheck(currentRowData, preRowData, mergeCheckNames) { colMergeCheck(currentRowData, preRowData, mergeCheckNames) {
if (!Array.isArray(mergeCheckNames) && !mergeCheckNames.length) if (!Array.isArray(mergeCheckNames) && !mergeCheckNames.length) { return false }
return false; let result = true
let result = true;
for (let index = 0; index < mergeCheckNames.length; index++) { for (let index = 0; index < mergeCheckNames.length; index++) {
const mergeCheckName = mergeCheckNames[index]; const mergeCheckName = mergeCheckNames[index]
if (currentRowData[mergeCheckName] !== preRowData[mergeCheckName]) { if (currentRowData[mergeCheckName] !== preRowData[mergeCheckName]) {
result = false; result = false
break; break
} }
} }
return result; return result
}, }
}, }
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -1,496 +0,0 @@
<!--
* @Descripttion:
* @version:
* @Author: 王三华
* @Date: 2023-05-09 10:57:15
-->
<template>
<div class="page">
<topBar
v-if="topList.length > 0"
:top-list="topList"
:moren="moren"
/>
<div class="main">
<div class="thetable">
<div class="fontTitle"> {{ '在线签呈' }}</div>
<div class="titleflex">
<div>{{ '编号' }} :</div>
<div>
<el-radio-group v-model="allData.signType">
<el-radio
v-for="ctem in checkList"
:key="ctem.value"
:label="ctem.value"
>{{ ctem.label }}</el-radio>
</el-radio-group>
</div>
</div>
<table id="tfhover" class="tftable" border="1">
<tr>
<td colspan="1" width="190px" align="center"> {{ '发起部门' }} :</td>
<td v-if="allData.signData" colspan="1" width="435px">
{{ allData.signData.deptName }}
</td>
<td colspan="1" width="140px" align="center"> {{ '发起人' }} :</td>
<td v-if="allData.signData" colspan="1">
{{ allData.signData.userName }}
</td>
</tr>
<tr>
<td colspan="1" align="center"> {{ '主旨' }} :</td>
<td v-if="allData.signData" colspan="1">
{{ allData.signData.approvalBusinessVal }}
</td>
<td colspan="1" align="center"> {{ '日期' }} :</td>
<td v-if="allData.signData" colspan="1">
{{ allData.signData.creationTime }}
</td>
</tr>
<!-- // -->
<tr>
<td colspan="1" align="center"> {{ '审批流程' }}</td>
<td colspan="3">
<div class="disflex">
<span
v-for="(ctem, cndex) in allData.signData.detailList"
:key="cndex"
style="margin: 0 5px 5px 0"
>
<el-select
v-model="ctem.pkApprover"
filterable
size="mini"
:placeholder="'请选择'"
@change="getApprover"
>
<el-option
v-for="item in approbalList"
:key="item.userId"
:label="item.nickName + '(' + item.deptName + ')'"
:value="item.userId"
/>
</el-select>
</span>
<span style="margin: 0 5px 5px 0">
<i
v-show="allData.signData.detailList.length > 0"
class="el-icon-remove-outline"
style="font-size: 18px; margin-right: 5px"
@click.stop="delData"
/>
<i
class="el-icon-circle-plus-outline"
style="font-size: 18px"
@click.stop="addData"
/>
</span>
</div>
</td>
</tr>
<tr>
<td colspan="1" align="center">{{ '抄送人' }}</td>
<td colspan="3">
<div class="disflex">
<span
v-for="(ctem, cndex) in allData.signData.sendList"
:key="cndex"
style="margin: 0 5px 5px 0"
>
<el-select
v-model="ctem.pkSend"
filterable
size="mini"
:placeholder="'请选择'"
@change="getApprover"
>
<el-option
v-for="item in userAllList"
:key="item.userId"
:label="item.nickName + '(' + item.deptName + ')'"
:value="item.userId"
/>
</el-select>
</span>
<span style="margin: 0 5px 5px 0">
<i
v-show="allData.signData.sendList.length > 0"
class="el-icon-remove-outline"
style="font-size: 18px; margin-right: 5px"
@click.stop="delData1"
/>
<i
class="el-icon-circle-plus-outline"
style="font-size: 18px"
@click.stop="addData1"
/>
</span>
</div>
</td>
</tr>
<tr>
<td style="height: 190px" align="center">{{ '情况说明' }}</td>
<td colspan="3" style="padding: 0">
<div>
<el-input
v-model="allData.remark"
type="textarea"
:rows="6"
:placeholder="'请输入'"
/>
</div>
</td>
</tr>
<tr>
<td style="height: 193px" align="center"> {{ '业务诉求' }}</td>
<td colspan="3" style="padding: 0;vertical-align: top;">
<div>
<el-table
:data="allData.updateParentParamList"
style="width: 100%"
:header-cell-style="{ background: '#EEEEEE' }"
>
<el-table-column
v-for="ctem in allData.tableTit"
:key="ctem.value"
align="center"
:prop="ctem.value"
:label="ctem.label"
>
<template slot-scope="scope">
<div v-show="ctem.value == 'actExplain'">
<div
style="
color: #48b2fd;
text-decoration: underline;
cursor: pointer;
"
@click="details(scope.row)"
>
{{ '查看详情' }}
</div>
</div>
<div v-show="ctem.value != 'actExplain'">
<div>
{{ scope.row[ctem.value] }}
</div>
</div>
</template>
</el-table-column>
</el-table>
</div>
</td>
</tr>
<tr>
<td style="height: 190px" align="center">{{ '附件' }}</td>
<td colspan="3" style="padding: 0">
<div style="height: 100%; padding: 10px 20px">
<el-upload
class="upload-demo"
:action="uploadImgUrl"
:on-success="handleUploadSuccess"
:on-remove="removeFile"
multiple
:headers="headers"
:file-list="fileList"
>
<el-button size="small" type="primary">{{ '点击上传' }}</el-button>
</el-upload>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="footer">
<div style="margin: 0 auto">
<el-button class="thebtn" @click="cancelCz"> {{ '取消' }}</el-button>
<el-button
type="primary"
class="thebtn"
@click="saveDate"
> {{ '确认' }}</el-button>
</div>
</div>
</div>
</template>
<script>
import topBar from '@/components/topBar'
import * as man from '@/api/manage'
import * as gif from '@/api/newgift.js'
import onlineSign from '../../dashboard/onlineSign.json'
import { getToken } from '@/utils/auth'
export default {
name: 'Zxqc',
components: {
topBar
},
data() {
return {
uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload', //
headers: {
Authorization: getToken()
},
onlineSign,
moren: 'specialZxqc',
topList: [
{
name: '在线签呈',
path: 'specialZxqc'
}
],
checkList: [],
allData: {
remark: '',
signType: 1,
fileList: [],
signData: {
detailList: [],
sendList: []
},
approvalBusiness: ''
},
signDataList: [],
fileList: [],
approbalList: [],
//
userAllList: [],
allObj: {}
}
},
mounted() {
//
this.allObj = JSON.parse(this.$route.query.data)
this.allData.updateParentParamList = [this.allObj.activityParam]
console.log(
'%c [ obj ]-241',
'font-size:13px; background:#085065; color:#4c94a9;',
this.allObj
)
if (this.allObj.controlType == 1) {
this.allData.approvalBusiness = 717
} else if (this.allObj.controlType == 2) {
this.allData.approvalBusiness = 718
} else if (this.allObj.controlType == 3) {
this.allData.approvalBusiness = 719
}
//
// this.allData.approvalBusiness = this.$route.query.approvalBusiness
this.getSignData([this.allData.approvalBusiness])
const lastTwo = this.allObj.activityParam.actStartDate.slice(-2)
if (lastTwo != '00') {
this.allObj.activityParam.actStartDate = this.allObj.activityParam.actStartDate + ' ' + '00:00:00'
this.allObj.activityParam.actEndDate = this.allObj.activityParam.actEndDate + ' ' + '00:00:00'
}
},
methods: {
details(data) {
this.$router.push({
path: 'lotteryInfo',
query: {
data: JSON.stringify(this.allObj),
controlType: 4
}
})
},
getSignData(arr) {
man.signData(arr).then((res) => {
this.allData.signData = res.data[0]
//
this.$set(this.allData, 'signType', 1)
this.$set(this.allData, 'remark', '')
this.$set(this.allData, 'fileList', [])
// table
this.onlineSign.forEach((ctem) => {
if (this.allData.approvalBusiness == ctem.id) {
this.allData.tableTit = ctem.textList
}
})
this.$forceUpdate()
this.getApprove()
this.getSignType()
})
},
getApprove() {
//
man.approvalUser().then((res) => {
this.approbalList = res.data
})
man.userAll().then((res) => {
this.userAllList = res.data
})
},
getSignType() {
man.signType().then((res) => {
this.checkList = res.data
})
},
saveDate() {
//
this.allData.userIdList = this.allData.signData.detailList.map((item) => {
return item.pkApprover
})
this.allData.userIdList = this.allData.userIdList.filter((item) => item)
//
this.allData.sendIdList = this.allData.signData.sendList.map((item) => {
return item.pkSend
})
this.allData.sendIdList = this.allData.sendIdList.filter((item) => item)
this.allData.fileList = this.fileList.map((item) => {
return item.url
})
const obj = {
activityParam: this.allObj.activityParam,
controlType: this.allObj.controlType,
signType: this.allData.signType, //
remark: this.allData.remark, //
fileList: this.allData.fileList, // []
userIdList: this.allData.userIdList, // []
sendIdList: this.allData.sendIdList // []
}
gif.drawGiftConfigPetition(obj).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: 'success'
})
this.cancelCz()
}
})
},
cancelCz() {
this.$router.go(-2)
},
//
getApprover() {
this.$nextTick(() => {
this.$forceUpdate()
})
},
//
addData() {
const arr = JSON.parse(JSON.stringify(this.allData.signData.detailList))
arr.push({
pkApprover: ''
})
this.$set(this.allData.signData, 'detailList', arr)
this.$forceUpdate()
},
//
addData1() {
const arr = JSON.parse(JSON.stringify(this.allData.signData.sendList))
arr.push({
pkSend: ''
})
this.$set(this.allData.signData, 'sendList', arr)
this.$forceUpdate()
},
//
delData1() {
this.allData.signData.sendList.pop()
this.$forceUpdate()
},
//
delData() {
this.allData.signData.detailList.pop()
this.$forceUpdate()
},
handleUploadSuccess(res) {
if (res.code == 200) {
this.fileList.push(res.data)
} else {
this.$message({
type: 'error',
message: '上传失败'
})
}
},
removeFile(file, fileList) {
this.fileList.forEach((item, index) => {
if (file.uid == item.uid) {
this.fileList.splice(index, 1)
}
})
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-table thead {
color: #000000;
}
.page {
padding: 20px;
background: #f9f9f9;
font-size: 14px;
.main {
// margin-top: 20px;
background: #ffffff;
border-radius: 8px;
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
display: flex;
margin: 0 auto;
width: 100%;
padding: 20px;
flex-direction: column;
}
.thetable {
margin: 0 auto;
margin-bottom: 20px;
.fontTitle {
font-weight: bold;
font-size: 24px;
text-align: center;
}
.titleflex {
display: flex;
margin-top: 10px;
margin-bottom: 10px;
justify-content: space-between;
}
}
.tftable {
font-size: 14px;
border-collapse: collapse;
border-radius: 10px;
width: 1060px;
border: 1px solid #cccccc;
.spbox {
display: flex;
align-items: center;
justify-content: flex-end;
}
th {
font-size: 14px;
// padding: 20px;
}
tr td {
font-size: 14px;
padding: 10px 20px;
height: 60px;
}
}
.footer {
display: flex;
justify-content: center;
align-items: center;
padding: 15px 0;
.thebtn {
width: 120px;
height: 38px;
}
}
}
//
.disflex {
display: flex;
align-items: center;
flex-wrap: wrap;
}
</style>

View File

@ -171,7 +171,7 @@
/> />
</div> </div>
<div class="footer"> <div class="footer">
<el-button size="small" class="cancelBtn"> {{ '取消' }}</el-button> <el-button size="small" class="cancelBtn" @click="$router.back()"> {{ '取消' }}</el-button>
<el-button <el-button
size="small" size="small"
class="sureBtn" class="sureBtn"
@ -519,13 +519,22 @@ export default {
activityParam: actdata activityParam: actdata
} }
) )
this.$router.push({ api.lotteryRuleConfigSubmit(obj).then((res) => {
path: 'lotteryGiftZxqc', if (res.code === 200) {
query: { this.$message({
data: JSON.stringify(obj), message: res.msg || '操作成功',
approvalBusiness: 717 type: 'success'
})
this.$router.back()
} }
}) })
// this.$router.push({
// path: 'lotteryGiftZxqc',
// query: {
// data: JSON.stringify(obj),
// approvalBusiness: 717
// }
// })
} }
}) })
} }

View File

@ -10,11 +10,13 @@
:topList="topList" :topList="topList"
:moren="moren"></topBar> --> :moren="moren"></topBar> -->
<div class="topbox"> <div class="topbox">
<div class="levelList_i" <div
:class="tabActive == item.id ? 'act' : ''" v-for="(item, index) in topList"
v-for="(item, index) in topList" :key="index"
:key="index" class="levelList_i"
@click.prevent="handleLink(item.id)"> :class="tabActive == item.id ? 'act' : ''"
@click.prevent="handleLink(item.id)"
>
{{ item.name }} {{ item.name }}
</div> </div>
</div> </div>
@ -22,53 +24,67 @@
<!-- <div class="main_a"> --> <!-- <div class="main_a"> -->
<div class="main"> <div class="main">
<div v-show="tabActive==0"> <div v-show="tabActive==0">
<div class="tit">{{'基本信息'}}</div> <div class="tit">{{ '基本信息' }}</div>
<div class="xian"></div> <div class="xian" />
<el-form :model="ruleForm" <el-form
:rules="rules" ref="ruleForm"
ref="ruleForm" :model="ruleForm"
label-width="auto" :rules="rules"
class="demo-ruleForm"> label-width="auto"
class="demo-ruleForm"
>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="'活动名称'" <el-form-item
:label="'活动名称'"
prop="actName"> prop="actName"
<el-input clearable >
v-model="ruleForm.actName" <el-input
:disabled="lookOver"></el-input> v-model="ruleForm.actName"
clearable
:disabled="lookOver"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="16"> <el-col :span="16">
<el-form-item :label="'活动说明'" <el-form-item
:label="'活动说明'"
prop="actExplain"> prop="actExplain"
>
<!-- <el-input clearable <!-- <el-input clearable
type="textarea" type="textarea"
v-model="ruleForm.actExplain" v-model="ruleForm.actExplain"
:disabled="lookOver"></el-input> --> :disabled="lookOver"></el-input> -->
<editor ref="sptwEditor" <editor
:readOnly="lookOver" ref="sptwEditor"
v-model="ruleForm.actExplain" v-model="ruleForm.actExplain"
:min-height="196" :read-only="lookOver"
:uploadUrl="uploadImgUrl" /> :min-height="196"
:upload-url="uploadImgUrl"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="'活动封面'" <el-form-item
prop="actCover"> :label="'活动封面'"
prop="actCover"
>
<imageUpload v-model="ruleForm.actCover" /> <imageUpload v-model="ruleForm.actCover" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="'目标用户群体'" <el-form-item
required> :label="'目标用户群体'"
required
>
<!-- <div class="flexed"> <!-- <div class="flexed">
<el-checkbox class="flexed_l" <el-checkbox class="flexed_l"
:disabled="lookOver" :disabled="lookOver"
@ -83,16 +99,22 @@
</el-checkbox-group> </el-checkbox-group>
</div> --> </div> -->
<div class="flexed"> <div class="flexed">
<el-checkbox class="flexed_l" <el-checkbox
:disabled="lookOver" v-model="ruleForm.checked2"
@change="getCheckTit($event,2)" class="flexed_l"
v-model="ruleForm.checked2">{{'真实奖衔'}}</el-checkbox> :disabled="lookOver"
<el-checkbox-group v-model="ruleForm.realList" @change="getCheckTit($event,2)"
:disabled="lookOver" >{{ '真实奖衔' }}</el-checkbox>
@change="getCheck"> <el-checkbox-group
<el-checkbox v-for="item in awardsList" v-model="ruleForm.realList"
:key="item.pkId" :disabled="lookOver"
:label="item.pkId">{{ item.awardsName }}</el-checkbox> @change="getCheck"
>
<el-checkbox
v-for="item in awardsList"
:key="item.pkId"
:label="item.pkId"
>{{ item.awardsName }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<!-- <div class="flexed"> <!-- <div class="flexed">
@ -113,33 +135,39 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="'活动时间'" <el-form-item
prop="ruleFormTime"> :label="'活动时间'"
<el-date-picker :disabled="lookOver" prop="ruleFormTime"
v-model="ruleForm.ruleFormTime" >
@change="changeTime" <el-date-picker
value-format="yyyy-MM-dd HH:mm:ss" v-model="ruleForm.ruleFormTime"
type="datetimerange" :disabled="lookOver"
:range-separator="'至'" value-format="yyyy-MM-dd HH:mm:ss"
:start-placeholder="'开始日期'" type="datetimerange"
:end-placeholder="'结束日期'"> :range-separator="'至'"
</el-date-picker> :start-placeholder="'开始日期'"
:end-placeholder="'结束日期'"
@change="changeTime"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item :label="'展示时间'" <el-form-item
prop="ruleFormTime1"> :label="'展示时间'"
<el-date-picker :disabled="lookOver" prop="ruleFormTime1"
v-model="ruleForm.ruleFormTime1" >
@change="changeTime1" <el-date-picker
value-format="yyyy-MM-dd HH:mm:ss" v-model="ruleForm.ruleFormTime1"
type="datetimerange" :disabled="lookOver"
:range-separator="'至'" value-format="yyyy-MM-dd HH:mm:ss"
:start-placeholder="'开始日期'" type="datetimerange"
:end-placeholder="'结束日期'"> :range-separator="'至'"
</el-date-picker> :start-placeholder="'开始日期'"
:end-placeholder="'结束日期'"
@change="changeTime1"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -149,13 +177,20 @@
<!-- <directUpdata v-show="tabActive==2" <!-- <directUpdata v-show="tabActive==2"
ref="directUpdata"></directUpdata> --> ref="directUpdata"></directUpdata> -->
</div> </div>
<div class="footer" <div
v-show="controlType!=4"> v-show="controlType!=4"
<el-button size="small" class="footer"
class="cancelBtn"> {{ '取消' }}</el-button> >
<el-button size="small" <el-button
@click="submit('ruleForm')" size="small"
class="sureBtn"> {{ '确认' }}</el-button> class="cancelBtn"
@click="$router.back()"
> {{ '取消' }}</el-button>
<el-button
size="small"
class="sureBtn"
@click="submit('ruleForm')"
> {{ '确认' }}</el-button>
</div> </div>
<!-- </div> --> <!-- </div> -->
@ -183,8 +218,8 @@ export default {
topList: [ topList: [
{ {
name: '基本信息', name: '基本信息',
id: 0, id: 0
}, }
], ],
uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload', uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload',
ruleForm: { ruleForm: {
@ -195,28 +230,28 @@ export default {
realList: [], realList: [],
centerList: [], centerList: [],
goalMemberConfigList: [], goalMemberConfigList: [],
ruleFormTime:[], ruleFormTime: [],
ruleFormTime1:[], ruleFormTime1: []
}, },
rules: { rules: {
actName: [ actName: [
{ required: true, message: '请输入活动名称', trigger: 'blur' }, { required: true, message: '请输入活动名称', trigger: 'blur' }
], ],
actExplain: [ actExplain: [
{ required: true, message: '请输入活动说明', trigger: 'blur' }, { required: true, message: '请输入活动说明', trigger: 'blur' }
], ],
actCover: [ actCover: [
{ required: true, message: '请上传活动封面', trigger: 'change' }, { required: true, message: '请上传活动封面', trigger: 'change' }
], ],
goalMemberConfigList: [ goalMemberConfigList: [
{ required: true, message: '请选择目标用户群体', trigger: 'change' }, { required: true, message: '请选择目标用户群体', trigger: 'change' }
], ],
ruleFormTime: [ ruleFormTime: [
{ required: true, message: '请选择活动时间', trigger: 'change' }, { required: true, message: '请选择活动时间', trigger: 'change' }
], ],
ruleFormTime1: [ ruleFormTime1: [
{ required: true, message: '请选择展示时间', trigger: 'change' }, { required: true, message: '请选择展示时间', trigger: 'change' }
], ]
}, },
lookOver: false, lookOver: false,
gradeList: [], gradeList: [],
@ -225,13 +260,13 @@ export default {
pkId: '', pkId: '',
repurchaseCouponsShowList: [], repurchaseCouponsShowList: [],
controlType: '', controlType: '',
addData: {}, addData: {}
} }
}, },
mounted() { mounted() {
this.getData() this.getData()
// 1=,2=,3=4 // 1=,2=,3=4
if (this.$route.query.controlType == 4||this.$route.query.controlType == 3) { if (this.$route.query.controlType == 4 || this.$route.query.controlType == 3) {
this.lookOver = true this.lookOver = true
} else { } else {
this.lookOver = false this.lookOver = false
@ -251,7 +286,7 @@ export default {
getDetails() { getDetails() {
api api
.tourismDetails({ .tourismDetails({
pkId: this.pkId, pkId: this.pkId
}) })
.then((res) => { .then((res) => {
this.addData = res.data this.addData = res.data
@ -269,15 +304,15 @@ export default {
this.ruleForm.disEndDate = res.data.disEndDate this.ruleForm.disEndDate = res.data.disEndDate
this.$set(this.ruleForm, 'ruleFormTime', [ this.$set(this.ruleForm, 'ruleFormTime', [
res.data.actStartDate, res.data.actStartDate,
res.data.actEndDate, res.data.actEndDate
]) ])
this.$set(this.ruleForm, 'ruleFormTime1', [ this.$set(this.ruleForm, 'ruleFormTime1', [
res.data.disStartDate, res.data.disStartDate,
res.data.disEndDate, res.data.disEndDate
]) ])
let arr1 = [], const arr1 = []
arr2 = [], const arr2 = []
arr3 = [] const arr3 = []
res.data.goalMemberConfigList.forEach((item) => { res.data.goalMemberConfigList.forEach((item) => {
if (item.memberType == 1) { if (item.memberType == 1) {
arr1.push(item.pkLevel) arr1.push(item.pkLevel)
@ -293,14 +328,13 @@ export default {
// this.$refs.directUpdata.getPage( // this.$refs.directUpdata.getPage(
// this.addData.recommendUpgradeList || '' // this.addData.recommendUpgradeList || ''
// ) // )
let that = this const that = this
setTimeout(() => { setTimeout(() => {
that.getCheck() that.getCheck()
}, 50) }, 50)
}) })
}, },
getDetails1() { getDetails1() {
this.$set(this.ruleForm, 'actName', this.addData.actName) this.$set(this.ruleForm, 'actName', this.addData.actName)
this.$set( this.$set(
this.ruleForm, this.ruleForm,
@ -310,15 +344,15 @@ export default {
this.$set(this.ruleForm, 'actCover', this.addData.actCover) this.$set(this.ruleForm, 'actCover', this.addData.actCover)
this.$set(this.ruleForm, 'ruleFormTime', [ this.$set(this.ruleForm, 'ruleFormTime', [
this.addData.actStartDate, this.addData.actStartDate,
this.addData.actEndDate, this.addData.actEndDate
]) ])
this.$set(this.ruleForm, 'ruleFormTime1', [ this.$set(this.ruleForm, 'ruleFormTime1', [
this.addData.disStartDate, this.addData.disStartDate,
this.addData.disEndDate, this.addData.disEndDate
]) ])
let arr1 = [], const arr1 = []
arr2 = [], const arr2 = []
arr3 = [] const arr3 = []
this.addData.goalMemberConfigList.forEach((item) => { this.addData.goalMemberConfigList.forEach((item) => {
if (item.memberType == 1) { if (item.memberType == 1) {
arr1.push(item.pkLevel) arr1.push(item.pkLevel)
@ -334,7 +368,7 @@ export default {
// this.$refs.directUpdata.getPage(this.addData.recommendUpgradeList || '') // this.$refs.directUpdata.getPage(this.addData.recommendUpgradeList || '')
let that = this const that = this
setTimeout(() => { setTimeout(() => {
that.getCheck() that.getCheck()
}, 500) }, 500)
@ -345,28 +379,28 @@ export default {
}, },
// //
getCheck() { getCheck() {
let arr1 = [] const arr1 = []
let arr2 = [] const arr2 = []
let arr3 = [] const arr3 = []
// //
this.ruleForm.levelList.forEach((item) => { this.ruleForm.levelList.forEach((item) => {
arr1.push({ arr1.push({
memberType: 1, memberType: 1,
pkLevel: item, pkLevel: item
}) })
}) })
// //
this.ruleForm.realList.forEach((item) => { this.ruleForm.realList.forEach((item) => {
arr2.push({ arr2.push({
memberType: 2, memberType: 2,
pkLevel: item, pkLevel: item
}) })
}) })
// //
this.ruleForm.centerList.forEach((item) => { this.ruleForm.centerList.forEach((item) => {
arr3.push({ arr3.push({
memberType: 3, memberType: 3,
pkLevel: item, pkLevel: item
}) })
}) })
this.ruleForm.goalMemberConfigList = [...arr1, ...arr2, ...arr3] this.ruleForm.goalMemberConfigList = [...arr1, ...arr2, ...arr3]
@ -437,20 +471,21 @@ export default {
submit() { submit() {
this.$refs['ruleForm'].validate((valid) => { this.$refs['ruleForm'].validate((valid) => {
if (valid) { if (valid) {
let obj = Object.assign( const obj = Object.assign(
{}, {},
{ {
controlType: this.controlType, controlType: this.controlType,
activityParam: this.ruleForm, activityParam: this.ruleForm
} }
) )
this.$router.push({ api.tourismRuleConfigSubmit(obj).then((res) => {
path: 'tourismActZxqc', if (res.code === 200) {
query: { this.$message({
data: JSON.stringify(obj), message: res.msg || '操作成功',
approvalBusiness: 735, type: 'success'
controlType:this.controlType })
}, this.$router.back()
}
}) })
// let url = '' // let url = ''
// if (this.pkId) { // if (this.pkId) {
@ -471,8 +506,8 @@ export default {
// }) // })
} }
}) })
}, }
}, }
} }
</script> </script>

View File

@ -44,11 +44,11 @@ module.exports = {
}, },
proxy: { proxy: {
'/prod-api': { '/prod-api': {
target: 'https://t-mana.beida666.com/', target: 'http://127.0.0.1:8080',
changeOrigin: true changeOrigin: true,
// pathRewrite: { pathRewrite: {
// '^/prod-api': '' '^/prod-api': ''
// } }
} }
} }
// proxy: { // proxy: {