Compare commits
5 Commits
9cdf561fb3
...
f977dfd86d
Author | SHA1 | Date |
---|---|---|
|
f977dfd86d | |
|
74835fa668 | |
|
d3cd5a2855 | |
|
7700825478 | |
|
938e262743 |
|
@ -0,0 +1,83 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 活动列表 actType区分
|
||||
export function getActivityList(params) {
|
||||
return request({
|
||||
url: '/activity/manage/activity/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 加购升级获取详情
|
||||
export function getShoppingUpgradeDetail(params) {
|
||||
return request({
|
||||
url: '/activity/manage/addUpgradeConfig/get-detail',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 加购升级-活动创建/修改/删除
|
||||
export function updateShoppingUpgradeList(data) {
|
||||
return request({
|
||||
url: '/activity/manage/addUpgradeConfig/submit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 加购升级记录列表
|
||||
export function upgradeRecordList(params) {
|
||||
return request({
|
||||
url: '/activity/manage/addUpgradeRecord/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 报单赠送获取详情
|
||||
export function getDeclarationActivityDetail(params) {
|
||||
return request({
|
||||
url: '/activity/manage/acDeclarationConfig/get-detail',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 报单赠送-活动创建
|
||||
export function addDeclarationActivityList(data) {
|
||||
return request({
|
||||
url: '/activity/manage/acDeclarationConfig/save',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 报单赠送-活动更新
|
||||
export function updateDeclarationActivityList(data) {
|
||||
return request({
|
||||
url: '/activity/manage/acDeclarationConfig/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 报单赠送-活动删除
|
||||
export function delDeclarationActivityList(data) {
|
||||
return request({
|
||||
url: '/activity/manage/acDeclarationConfig/delete',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 报单赠送记录列表
|
||||
export function declarationActivityRecordList(params) {
|
||||
return request({
|
||||
url: '/activity/manage/acDeclarationRecord/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
|
@ -1,9 +1,3 @@
|
|||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: kBank
|
||||
* @Date: 2023-04-21 14:28:38
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 会员消费赠送-查看
|
||||
|
|
|
@ -2059,6 +2059,60 @@ export const constantRoutes = [
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'shoppingUpgrade',
|
||||
name: 'ShoppingUpgrade',
|
||||
component: ParentView,
|
||||
meta: { title: '加购升级' },
|
||||
children: [
|
||||
{
|
||||
path: 'shoppingUpgradeList',
|
||||
name: 'ShoppingUpgradeList',
|
||||
component: () => import('@/views/marketing/shoppingUpgrade/index'),
|
||||
meta: { title: '加购升级' }
|
||||
},
|
||||
{
|
||||
path: 'updateInfo',
|
||||
name: 'updateInfo',
|
||||
component: () => import('@/views/marketing/shoppingUpgrade/updateInfo'),
|
||||
meta: { title: '基本信息' },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'shoppingUpgradeRecordList',
|
||||
name: 'ShoppingUpgradeRecordList',
|
||||
component: () => import('@/views/marketing/shoppingUpgrade/record'),
|
||||
meta: { title: '加购升级记录' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'declarationActivity',
|
||||
name: 'DeclarationActivity',
|
||||
component: ParentView,
|
||||
meta: { title: '报单赠送' },
|
||||
children: [
|
||||
{
|
||||
path: 'declarationActivityList',
|
||||
name: 'DeclarationActivityList',
|
||||
component: () => import('@/views/marketing/declarationActivity/index'),
|
||||
meta: { title: '报单赠送' }
|
||||
},
|
||||
{
|
||||
path: 'updateInfo',
|
||||
name: 'updateInfo',
|
||||
component: () => import('@/views/marketing/declarationActivity/updateInfo'),
|
||||
meta: { title: '基本信息' },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'declarationActivityRecordList',
|
||||
name: 'DeclarationActivityRecordList',
|
||||
component: () => import('@/views/marketing/declarationActivity/record'),
|
||||
meta: { title: '报单赠送记录' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: 'benefitsGift',
|
||||
// name: 'BenefitsGift',
|
||||
|
|
|
@ -426,6 +426,12 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="deliveryQuantity"
|
||||
width="120"
|
||||
:label="'提货基数'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="typeShippingMerge"
|
||||
|
|
|
@ -337,6 +337,11 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col class="el-col-20">
|
||||
<el-form-item :label="'提货基数'" prop="deliveryQuantity">
|
||||
<el-input-number v-model="form.deliveryQuantity" clearable :min="0" :max="999999999" :controls="false" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col class="el-col-20">
|
||||
<el-form-item :label="'运输方式'" prop="ysList">
|
||||
<el-checkbox-group v-model="form.ysList" @change="changeYsfs">
|
||||
|
@ -506,6 +511,9 @@ export default {
|
|||
],
|
||||
wmsCode: [
|
||||
{ required: true, message: '请输入仓储编号', trigger: 'blur' }
|
||||
],
|
||||
deliveryQuantity: [
|
||||
{ required: true, message: '请输入提货基数', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
ggList: [],
|
||||
|
@ -530,7 +538,8 @@ export default {
|
|||
weight: '',
|
||||
shelfLife: '',
|
||||
retailPrice: '',
|
||||
wmsCode: ''
|
||||
wmsCode: '',
|
||||
deliveryQuantity: 1
|
||||
},
|
||||
tabActive: 0,
|
||||
agreeList: [
|
||||
|
|
|
@ -483,6 +483,11 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col class="el-col-20">
|
||||
<el-form-item :label="'提货基数'" prop="deliveryQuantity">
|
||||
<el-input-number v-model="form.deliveryQuantity" clearable :min="0" :max="999999999" :controls="false" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col class="el-col-20">
|
||||
<el-form-item
|
||||
:label="'运输方式'"
|
||||
|
@ -669,6 +674,9 @@ export default {
|
|||
],
|
||||
wmsCode: [
|
||||
{ required: true, message: '请输入仓储编号', trigger: 'blur' }
|
||||
],
|
||||
deliveryQuantity: [
|
||||
{ required: true, message: '请输入提货基数', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
ggList: [],
|
||||
|
@ -731,7 +739,8 @@ export default {
|
|||
repurchaseTypeList: [],
|
||||
productList: [],
|
||||
isType: 0,
|
||||
supplierList: []
|
||||
supplierList: [],
|
||||
deliveryQuantity: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
@ -1,39 +1,33 @@
|
|||
<!--
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: 王三华
|
||||
* @Date: 2024-02-22 10:55:31
|
||||
-->
|
||||
<!--
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: 王三华
|
||||
* @Date: 2023-05-04 20:20:52
|
||||
-->
|
||||
<template>
|
||||
<div class="">
|
||||
|
||||
<div class="tit">权益赠送</div>
|
||||
<div class="xian"></div>
|
||||
<div class="xian" />
|
||||
<div class="table">
|
||||
<!-- 批量操作 -->
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="1"
|
||||
class="tableLeft">
|
||||
<el-button type="primary"
|
||||
@click="addNewGoods"
|
||||
size="mini">{{'添加'}}
|
||||
<th
|
||||
colspan="1"
|
||||
class="tableLeft"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="addNewGoods"
|
||||
>{{ '添加' }}
|
||||
</el-button>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table_b">
|
||||
<tr style="border-top:0">
|
||||
<td style="border:0"></td>
|
||||
<td style="border:0" />
|
||||
<!-- <td colspan="2">{{ '结算等级' }}</td> -->
|
||||
<td colspan="6"
|
||||
style="padding-bottom:0">
|
||||
<td
|
||||
colspan="6"
|
||||
style="padding-bottom:0"
|
||||
>
|
||||
<div class="tableFlex">
|
||||
<!-- <div class="tableFlex_i">结算等级</div> -->
|
||||
<div class="tableFlex_i">会员点位</div>
|
||||
|
@ -42,9 +36,11 @@
|
|||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="item,index in agbrList"
|
||||
:key="index">
|
||||
<td style="border:0"></td>
|
||||
<tr
|
||||
v-for="item,index in agbrList"
|
||||
:key="index"
|
||||
>
|
||||
<td style="border:0" />
|
||||
<!-- <td colspan="2"
|
||||
style="padding-bottom:0">
|
||||
<div class="tableFlex">
|
||||
|
@ -61,8 +57,10 @@
|
|||
</div>
|
||||
</div>
|
||||
</td> -->
|
||||
<td colspan="6"
|
||||
style="padding-bottom:0">
|
||||
<td
|
||||
colspan="6"
|
||||
style="padding-bottom:0"
|
||||
>
|
||||
<div class="tableFlex">
|
||||
|
||||
<!-- <div class="tableFlex_i">
|
||||
|
@ -86,34 +84,42 @@
|
|||
:value="item.pkId">
|
||||
</el-option>
|
||||
</el-select> -->
|
||||
<el-input placeholder="会员点位"
|
||||
size="medium"
|
||||
v-model="item.memberPoint"></el-input>
|
||||
<el-input
|
||||
v-model="item.memberPoint"
|
||||
placeholder="会员点位"
|
||||
size="medium"
|
||||
/>
|
||||
</div>
|
||||
<div class="tableFlex_i">
|
||||
<el-select v-model="item.grade"
|
||||
size="medium">
|
||||
<el-option v-for="item in gradeList"
|
||||
:key="item.pkId"
|
||||
:label="item.gradeName"
|
||||
:value="item.pkId">
|
||||
</el-option>
|
||||
<el-select
|
||||
v-model="item.grade"
|
||||
size="medium"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in gradeList"
|
||||
:key="item.pkId"
|
||||
:label="item.gradeName"
|
||||
:value="item.pkId"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="tableFlex_i">
|
||||
<el-select v-model="item.legalRight"
|
||||
size="medium"
|
||||
placeholder="赠送权益">
|
||||
<el-option v-for="item in registerist"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
<el-select
|
||||
v-model="item.legalRight"
|
||||
size="medium"
|
||||
placeholder="赠送权益"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in registerist"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -127,15 +133,15 @@ import ImageUpload from '@/components/ImageUpload'
|
|||
export default {
|
||||
components: {
|
||||
topBar,
|
||||
ImageUpload,
|
||||
ImageUpload
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
ggVisible: false,
|
||||
allData: [], //全部数据
|
||||
registerist:[],
|
||||
gradeList:[],
|
||||
agbrList:[]
|
||||
allData: [], // 全部数据
|
||||
registerist: [],
|
||||
gradeList: [],
|
||||
agbrList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -144,9 +150,9 @@ export default {
|
|||
methods: {
|
||||
getPage(allData) {
|
||||
if (allData != '') {
|
||||
allData.forEach(item=>{
|
||||
if(!item.giftConfigList){
|
||||
item.giftConfigList=[]
|
||||
allData.forEach(item => {
|
||||
if (!item.giftConfigList) {
|
||||
item.giftConfigList = []
|
||||
}
|
||||
})
|
||||
this.agbrList = allData
|
||||
|
@ -165,7 +171,7 @@ export default {
|
|||
pkGrade: '',
|
||||
grade: '',
|
||||
memberPoint: '',
|
||||
legalRight: '',
|
||||
legalRight: ''
|
||||
})
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
|
@ -175,8 +181,8 @@ export default {
|
|||
return 'success-row'
|
||||
}
|
||||
return ''
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -0,0 +1,406 @@
|
|||
<template>
|
||||
<div class="page">
|
||||
<topBar
|
||||
v-if="topList.length > 0"
|
||||
:top-list="topList"
|
||||
:moren="moren"
|
||||
/>
|
||||
<div class="main">
|
||||
<div class="form_all">
|
||||
<el-form
|
||||
ref="select"
|
||||
:model="select"
|
||||
label-width="auto"
|
||||
>
|
||||
<el-row :gutter="40">
|
||||
<!-- 一层 -->
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'活动名称'">
|
||||
<el-input
|
||||
v-model="select.actName"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'活动状态'">
|
||||
<el-select
|
||||
v-model="select.activityStatus"
|
||||
clearable
|
||||
:placeholder="'请选择'"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in actStatus"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'开始日期'">
|
||||
<el-date-picker
|
||||
v-model="creationTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'结束日期'">
|
||||
<el-date-picker
|
||||
v-model="creationTime1"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item :label="'创建日期'">
|
||||
<el-date-picker
|
||||
v-model="creationTime2"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime2"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="4">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="getDataList"
|
||||
> {{ '搜索' }}</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
class="resetBtn"
|
||||
@click="reset"
|
||||
> {{ '重置' }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="main_a">
|
||||
<div class="mainbtn">
|
||||
<el-button
|
||||
v-hasButtons="['declarationActivityAdd']"
|
||||
size="small"
|
||||
class="addBtn"
|
||||
@click="addHandle"
|
||||
>{{ '添加' }}</el-button>
|
||||
<el-button
|
||||
v-hasButtons="['declarationActivityExport']"
|
||||
size="small"
|
||||
class="exportBtn"
|
||||
@click="handleExport"
|
||||
> {{ '导出' }}</el-button>
|
||||
</div>
|
||||
<div class="maintable">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
height="710px"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
:row-class-name="tableRowClassName"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actName"
|
||||
:label="'活动名称'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actStartDate"
|
||||
:label="'开始日期'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actEndDate"
|
||||
:label="'结束日期'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="status"
|
||||
:label="'活动状态'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="creationTime"
|
||||
:label="'创建日期'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="time"
|
||||
:label="'操作'"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-button
|
||||
v-hasButtons="['declarationActivityDetail']"
|
||||
type="text"
|
||||
style="color: #48B2FD;"
|
||||
size="small"
|
||||
@click="redirectDetail(scope.row.pkId, 4)"
|
||||
>
|
||||
{{ '查看' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-hasButtons="['declarationActivityUpdate']"
|
||||
type="text"
|
||||
style="color: #F3A900;"
|
||||
size="small"
|
||||
@click="redirectDetail(scope.row.pkId, 2)"
|
||||
>
|
||||
{{ '修改' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-hasButtons="['declarationActivityDelete']"
|
||||
type="text"
|
||||
size="small"
|
||||
style="color: #C8161D"
|
||||
@click="handleDelete(scope.row.pkId)"
|
||||
>
|
||||
{{ '删除' }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import topBar from '@/components/topBar'
|
||||
import * as api from '@/api/activity.js'
|
||||
import { activityStatus } from '@/api/giftGoods.js'
|
||||
export default {
|
||||
name: 'Bzpz',
|
||||
components: {
|
||||
topBar
|
||||
},
|
||||
filters: {
|
||||
isAgree(val) {
|
||||
if (!val) {
|
||||
return '允许'
|
||||
} else {
|
||||
return '禁止'
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
creationTime: [],
|
||||
creationTime1: [],
|
||||
creationTime2: [],
|
||||
select: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50
|
||||
},
|
||||
addOrEdit: '',
|
||||
total: 0,
|
||||
dialogVisible: false,
|
||||
tableData: [],
|
||||
loading: false,
|
||||
moren: 'declarationActivityList',
|
||||
topList: [
|
||||
{
|
||||
name: '报单赠送',
|
||||
path: 'declarationActivityList'
|
||||
}
|
||||
],
|
||||
form: {
|
||||
name: ''
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: '请输入规格类型', trigger: 'blur' }]
|
||||
},
|
||||
actStatus: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 获取下拉
|
||||
this.getData()
|
||||
// 获取列表
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// 重置
|
||||
reset() {
|
||||
this.select = {}
|
||||
this.creationTime = []
|
||||
this.creationTime1 = []
|
||||
this.creationTime2 = []
|
||||
this.getDataList()
|
||||
},
|
||||
getData() {
|
||||
activityStatus().then((res) => {
|
||||
this.actStatus = res.data
|
||||
})
|
||||
},
|
||||
changeTime(val) {
|
||||
this.select.startActStartDate = val ? val[0] : ''
|
||||
this.select.endActStartDate = val ? val[1] : ''
|
||||
},
|
||||
changeTime1(val) {
|
||||
this.select.startActEndDate = val ? val[0] : ''
|
||||
this.select.endActEndDate = val ? val[1] : ''
|
||||
},
|
||||
changeTime2(val) {
|
||||
this.select.startCreationTime = val ? val[0] : ''
|
||||
this.select.endCreationTime = val ? val[1] : ''
|
||||
},
|
||||
// 点击修改
|
||||
redirectDetail(id, index) {
|
||||
this.$router.push({
|
||||
path: 'updateInfo',
|
||||
query: {
|
||||
pkId: id,
|
||||
controlType: index
|
||||
}
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
handleDelete(id) {
|
||||
this.$confirm('确认删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
api.delDeclarationActivityList({
|
||||
pkId: id
|
||||
}).then((res) => {
|
||||
this.getDataList()
|
||||
})
|
||||
})
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
this.$refs['form'].clearValidate()
|
||||
this.$refs['form'].resetFields()
|
||||
},
|
||||
addHandle() {
|
||||
this.$router.push({
|
||||
path: 'updateInfo',
|
||||
query: {
|
||||
controlType: 1
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取列表
|
||||
getDataList() {
|
||||
this.loading = true
|
||||
api
|
||||
.getActivityList(
|
||||
Object.assign({}, this.queryParams, this.select, { actType: 32 })
|
||||
)
|
||||
.then((res) => {
|
||||
this.tableData = res.rows
|
||||
this.total = res.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then((_) => {
|
||||
this.download(
|
||||
'activity/manage/acDeclarationConfig/export',
|
||||
Object.assign({}, { actType: 31 }, this.queryParams, this.select),
|
||||
`${'加购升级'}${new Date().getTime()}.xlsx`
|
||||
)
|
||||
})
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 == 1) {
|
||||
return 'warning-row'
|
||||
} else if (rowIndex % 2 == 0) {
|
||||
return 'success-row'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
::v-deep .el-table .warning-row {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
::v-deep .el-table .success-row {
|
||||
background: #ffffff;
|
||||
}
|
||||
::v-deep .el-table thead {
|
||||
color: #000000;
|
||||
}
|
||||
::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
.page {
|
||||
padding: 20px;
|
||||
background: #f9f9f9;
|
||||
font-size: 14px;
|
||||
.main {
|
||||
// background: #ffffff;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.main_a {
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
}
|
||||
.mainbtn {
|
||||
padding: 0;
|
||||
}
|
||||
.maintable {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .el-date-editor.el-input,
|
||||
.el-date-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
.form_all {
|
||||
padding: 0 20px;
|
||||
margin-bottom: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,377 @@
|
|||
<template>
|
||||
<div class="page">
|
||||
<topBar
|
||||
v-if="topList.length > 0"
|
||||
:top-list="topList"
|
||||
:moren="moren"
|
||||
/>
|
||||
<div class="main">
|
||||
<div class="form_all">
|
||||
<el-form
|
||||
ref="select"
|
||||
:model="select"
|
||||
label-width="auto"
|
||||
>
|
||||
<el-row :gutter="40">
|
||||
<!-- 一层 -->
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'活动名称'">
|
||||
<el-input
|
||||
v-model="select.actName"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'活动状态'">
|
||||
<el-select
|
||||
v-model="select.activityStatus"
|
||||
clearable
|
||||
:placeholder="'请选择'"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in actStatus"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'开始日期'">
|
||||
<el-date-picker
|
||||
v-model="creationTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'结束日期'">
|
||||
<el-date-picker
|
||||
v-model="creationTime1"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item :label="'创建日期'">
|
||||
<el-date-picker
|
||||
v-model="creationTime2"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime2"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="4">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="getDataList"
|
||||
> {{ '搜索' }}</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
class="resetBtn"
|
||||
@click="reset"
|
||||
> {{ '重置' }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="main_a">
|
||||
<div class="mainbtn">
|
||||
|
||||
<el-button
|
||||
v-hasButtons="['declarationActivityRecordExport']"
|
||||
size="small"
|
||||
class="exportBtn"
|
||||
@click="handleExport"
|
||||
> {{ '导出' }}</el-button>
|
||||
</div>
|
||||
<div class="maintable">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
height="710px"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
:row-class-name="tableRowClassName"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actName"
|
||||
:label="'活动名称'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="referenceCode"
|
||||
label="报单中心会员编号"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="referenceName"
|
||||
label="报单中心会员姓名"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="registerAuthorityVal"
|
||||
label="报单权限"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="memberCode"
|
||||
label="新会员编号"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="memberName"
|
||||
label="芯会员名称"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="orderCode"
|
||||
label="订单编号"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="payTime"
|
||||
label="支付时间"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="specifyLevelVal"
|
||||
label="指定等级"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="acDeclarationProductParamList"
|
||||
label="产品信息"
|
||||
min-width="400"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.acDeclarationProductParamList && scope.row.acDeclarationProductParamList.length > 0">
|
||||
<div v-for="item in scope.row.acDeclarationProductParamList" :key="item.pkId">
|
||||
{{ item.productName }}({{ item.specsName }}) x{{ item.quantity }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
-
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import topBar from '@/components/topBar'
|
||||
import * as api from '@/api/activity.js'
|
||||
import { activityStatus } from '@/api/giftGoods.js'
|
||||
export default {
|
||||
name: 'Bzpz',
|
||||
components: {
|
||||
topBar
|
||||
},
|
||||
filters: {
|
||||
isAgree(val) {
|
||||
if (!val) {
|
||||
return '允许'
|
||||
} else {
|
||||
return '禁止'
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
creationTime: [],
|
||||
creationTime1: [],
|
||||
creationTime2: [],
|
||||
select: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50
|
||||
},
|
||||
addOrEdit: '',
|
||||
total: 0,
|
||||
dialogVisible: false,
|
||||
tableData: [],
|
||||
loading: false,
|
||||
moren: 'declarationActivityRecordList',
|
||||
topList: [
|
||||
{
|
||||
name: '报单赠送记录',
|
||||
path: 'declarationActivityRecordList'
|
||||
}
|
||||
],
|
||||
form: {
|
||||
name: ''
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: '请输入规格类型', trigger: 'blur' }]
|
||||
},
|
||||
actStatus: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 获取下拉
|
||||
this.getData()
|
||||
// 获取列表
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// 重置
|
||||
reset() {
|
||||
this.select = {}
|
||||
this.creationTime = []
|
||||
this.creationTime1 = []
|
||||
this.creationTime2 = []
|
||||
this.getDataList()
|
||||
},
|
||||
getData() {
|
||||
activityStatus().then((res) => {
|
||||
this.actStatus = res.data
|
||||
})
|
||||
},
|
||||
|
||||
changeTime(val) {
|
||||
this.select.startActStartDate = val ? val[0] : ''
|
||||
this.select.endActStartDate = val ? val[1] : ''
|
||||
},
|
||||
changeTime1(val) {
|
||||
this.select.startActEndDate = val ? val[0] : ''
|
||||
this.select.endActEndDate = val ? val[1] : ''
|
||||
},
|
||||
changeTime2(val) {
|
||||
this.select.startCreationTime = val ? val[0] : ''
|
||||
this.select.endCreationTime = val ? val[1] : ''
|
||||
},
|
||||
// 点击修改
|
||||
redirectDetail(id, index) {
|
||||
this.$router.push({
|
||||
path: 'updateInfo',
|
||||
query: {
|
||||
pkId: id,
|
||||
controlType: index
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取列表
|
||||
getDataList() {
|
||||
this.loading = true
|
||||
api
|
||||
.declarationActivityRecordList(
|
||||
Object.assign({}, this.queryParams, this.select, { actType: 31 })
|
||||
)
|
||||
.then((res) => {
|
||||
this.tableData = res.rows
|
||||
this.total = res.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then((_) => {
|
||||
this.download(
|
||||
'activity/manage/acDeclarationRecord/listExport',
|
||||
Object.assign({}, { actType: 31 }, this.queryParams, this.select),
|
||||
`${'报单赠送记录'}${new Date().getTime()}.xlsx`
|
||||
)
|
||||
})
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 == 1) {
|
||||
return 'warning-row'
|
||||
} else if (rowIndex % 2 == 0) {
|
||||
return 'success-row'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
::v-deep .el-table .warning-row {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
::v-deep .el-table .success-row {
|
||||
background: #ffffff;
|
||||
}
|
||||
::v-deep .el-table thead {
|
||||
color: #000000;
|
||||
}
|
||||
::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
.page {
|
||||
padding: 20px;
|
||||
background: #f9f9f9;
|
||||
font-size: 14px;
|
||||
.main {
|
||||
// background: #ffffff;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.main_a {
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
}
|
||||
.mainbtn {
|
||||
padding: 0;
|
||||
}
|
||||
.maintable {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .el-date-editor.el-input,
|
||||
.el-date-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
.form_all {
|
||||
padding: 0 20px;
|
||||
margin-bottom: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,727 @@
|
|||
<template>
|
||||
<div class="">
|
||||
<div class="tit">报单赠送</div>
|
||||
<div class="xian" />
|
||||
<div class="table">
|
||||
<table>
|
||||
<tr>
|
||||
<th
|
||||
colspan="5"
|
||||
class="tableLeft"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="addNewGoods"
|
||||
>{{ '添加' }}
|
||||
</el-button>
|
||||
</th>
|
||||
<th
|
||||
colspan="7"
|
||||
style="padding-bottom:0"
|
||||
>
|
||||
<div class="tableFlex">
|
||||
<div class="tableFlex_i" />
|
||||
<div class="tableFlex_i" />
|
||||
<div class="tableFlex_i"> <el-input
|
||||
v-model="batchReset.quantity"
|
||||
:placeholder="'赠送数量'"
|
||||
/></div>
|
||||
<div class="tableAdd" />
|
||||
</div>
|
||||
</th>
|
||||
<th
|
||||
colspan="2"
|
||||
style="padding-bottom:0"
|
||||
>
|
||||
<div class="tableFlex">
|
||||
<div class="tableFlex_i"><el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="batchHandle"
|
||||
>{{ '批量操作' }}</el-button></div>
|
||||
<div class="tableFlex_i"><el-button
|
||||
size="mini"
|
||||
@click="reset"
|
||||
> {{ '重置' }}</el-button></div>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table
|
||||
v-for="(item, idx) in allData"
|
||||
:key="idx"
|
||||
class="table_b"
|
||||
>
|
||||
<tr style="border-top:0">
|
||||
<td style="border:0" />
|
||||
<td colspan="2">报单权限</td>
|
||||
<td colspan="2">指定等级</td>
|
||||
<td
|
||||
colspan="7"
|
||||
style="padding-bottom:0"
|
||||
>
|
||||
<div class="tableFlex">
|
||||
<div class="tableFlex_i">{{ '赠送产品' }}</div>
|
||||
<div class="tableFlex_i">{{ '产品规格' }}</div>
|
||||
<div class="tableFlex_i">{{ '赠送数量' }}</div>
|
||||
<div class="tableAdd" />
|
||||
</div>
|
||||
</td>
|
||||
<td
|
||||
colspan="2"
|
||||
style="border:0"
|
||||
/>
|
||||
</tr>
|
||||
<tr
|
||||
v-for="ctem,cndex in item.acDeclarationConfigParam"
|
||||
:key="cndex"
|
||||
>
|
||||
<td style="border:0" />
|
||||
<td colspan="2">
|
||||
<el-select v-model="ctem.registerAuthority">
|
||||
<el-option v-for="item in registerList" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<el-select v-model="ctem.specifyLevel">
|
||||
<el-option v-for="item in gradeRangList" :key="item.pkId" :label="item.gradeName" :value="item.pkId"></el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
<td
|
||||
colspan="7"
|
||||
style="padding-bottom:0"
|
||||
>
|
||||
<div
|
||||
v-for="stem,sndex in ctem.acDeclarationProductParamList"
|
||||
v-show="ctem.acDeclarationProductParamList.length>0"
|
||||
:key="sndex"
|
||||
class="tableFlex"
|
||||
>
|
||||
<div class="tableFlex_i">
|
||||
<el-input
|
||||
v-model="stem.productName"
|
||||
:placeholder="'请选择赠送产品'"
|
||||
@focus="getProduct(cndex,sndex)"
|
||||
/>
|
||||
</div>
|
||||
<div class="tableFlex_i">
|
||||
<el-input
|
||||
v-model="stem.specsName"
|
||||
disabled
|
||||
/>
|
||||
|
||||
</div>
|
||||
<div class="tableFlex_i">
|
||||
<el-input v-model="stem.quantity" />
|
||||
</div>
|
||||
<div class="tableAdd">
|
||||
|
||||
<img
|
||||
src="@/assets/images/iconpop.png"
|
||||
alt=""
|
||||
@click="reduceProduct(cndex,sndex)"
|
||||
>
|
||||
<img
|
||||
src="@/assets/images/iconadd.png"
|
||||
alt=""
|
||||
@click="addProduct(cndex)"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-show="ctem.acDeclarationProductParamList.length==0"
|
||||
class="tableAddPro"
|
||||
>
|
||||
{{ '添加产品' }}
|
||||
<img
|
||||
src="@/assets/images/iconadd.png"
|
||||
alt=""
|
||||
@click="addProduct(cndex)"
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
<td
|
||||
colspan="2"
|
||||
style="border:0"
|
||||
>
|
||||
<div class="tableAdd">
|
||||
<img src="@/assets/images/iconpop.png" alt="" @click="reduceRow(cndex)">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<el-dialog
|
||||
:title="'添加'"
|
||||
:visible.sync="dialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="40%"
|
||||
center
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<div class="cpHeight">
|
||||
<el-row>
|
||||
<el-col :span="22"> <el-input
|
||||
v-model="select.queryInfo"
|
||||
clearable
|
||||
:placeholder="'请输入'"
|
||||
prefix-icon="el-icon-search"
|
||||
@keyup.enter.native="getDataList"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="getDataList"
|
||||
> {{ '搜索' }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="height:10px" />
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="dialogList"
|
||||
style="width: 100%"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
:row-class-name="tableRowClassName"
|
||||
@select-all="onSelectAll"
|
||||
@select="selected"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="productName"
|
||||
:label="'产品名称'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="productCode"
|
||||
:label="'产品编号'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="productName"
|
||||
:label="'规格'"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-show="scope.row.selSkuNameList==''||scope.row.selSkuNameList==undefined"
|
||||
class="blueCor"
|
||||
@click="selSku(scope.row.pkId,scope.$index)"
|
||||
>{{ '选择规格' }}</div>
|
||||
<div
|
||||
v-show="scope.row.selSkuNameList!=''&&scope.row.selSkuNameList!=undefined"
|
||||
class="blueCor"
|
||||
@click="selSku(scope.row.pkId,scope.$index)"
|
||||
>{{ scope.row.selSkuNameList }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="productName"
|
||||
:label="'商品数量'"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.quantity"
|
||||
size="mini"
|
||||
:min="1"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
<span
|
||||
slot="footer"
|
||||
class="dialog-footer"
|
||||
>
|
||||
<el-button @click="handleClose">{{ '取消' }}</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="sureProduct"
|
||||
>{{ '确认' }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:title="'规格'"
|
||||
:visible.sync="ggVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="40%"
|
||||
center
|
||||
:before-close="handleCloseGg"
|
||||
>
|
||||
<div>
|
||||
<el-form>
|
||||
<el-form-item
|
||||
v-for="item,index in skuList"
|
||||
:key="index"
|
||||
:label="item.typeName"
|
||||
>
|
||||
<el-radio-group v-model="item.pkProductSku">
|
||||
<el-radio
|
||||
v-for="ctem,cndex in item.specsList"
|
||||
:key="ctem.pkId"
|
||||
:label="ctem.pkId"
|
||||
@change="getCheckBox(item.pkId,item.specsName)"
|
||||
>{{ ctem.specsName }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span
|
||||
slot="footer"
|
||||
class="dialog-footer"
|
||||
>
|
||||
<el-button @click="handleCloseGg">{{ '取消' }}</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="sureSku"
|
||||
>{{ '确认' }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as api from '@/api/giftGoods.js'
|
||||
import topBar from '@/components/topBar'
|
||||
import ImageUpload from '@/components/ImageUpload'
|
||||
import { isLocals } from '../../../utils/numberToCurrency'
|
||||
import {
|
||||
getgradeRanglist,
|
||||
getRegistration
|
||||
} from '@/api/level'
|
||||
export default {
|
||||
components: {
|
||||
topBar,
|
||||
ImageUpload
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
ggVisible: false,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50
|
||||
},
|
||||
total: 0,
|
||||
moren: 'setGiftGoodsInfo',
|
||||
topList: [
|
||||
{
|
||||
name: '基本信息',
|
||||
path: 'addGiftGoodsInfo'
|
||||
},
|
||||
{
|
||||
name: '规则设置',
|
||||
path: 'setGiftGoodsInfo'
|
||||
}
|
||||
],
|
||||
allData: [], // 全部数据
|
||||
allGoods: [], // 全部商品
|
||||
isArea: '',
|
||||
batchReset: {},
|
||||
select: {}, // 产品筛选
|
||||
dialogList: [], // 产品数组
|
||||
selectData: [], // 选中
|
||||
skuList: [], // 规格数组
|
||||
selSkuList: '',
|
||||
selSkuNameList: '',
|
||||
selIndex: '',
|
||||
showCndex: '',
|
||||
showIndex: '',
|
||||
pageData: {},
|
||||
queryData: [],
|
||||
registerList: [],
|
||||
gradeRangList: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getgradeRanglist()
|
||||
this.getMemberAuthEnum()
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
isLocals,
|
||||
initData(allData) {
|
||||
this.allData.push({
|
||||
acDeclarationConfigParam: []
|
||||
})
|
||||
},
|
||||
setAllData(allData) {
|
||||
this.$set(this.allData[0], 'acDeclarationConfigParam', JSON.parse(JSON.stringify(allData || [])))
|
||||
},
|
||||
getgradeRanglist() {
|
||||
getgradeRanglist().then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.gradeRangList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getMemberAuthEnum() {
|
||||
getRegistration().then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.registerList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
sureSku() {
|
||||
this.$set(this.dialogList[this.selIndex], 'selSkuList', this.selSkuList)
|
||||
this.$set(
|
||||
this.dialogList[this.selIndex],
|
||||
'selSkuNameList',
|
||||
this.selSkuNameList
|
||||
)
|
||||
this.ggVisible = false
|
||||
},
|
||||
sureProduct() {
|
||||
if (this.selectData.length === 0) {
|
||||
this.$message({
|
||||
message: '请选择产品',
|
||||
type: 'warning'
|
||||
})
|
||||
return false
|
||||
} else {
|
||||
this.allData.forEach((item) => {
|
||||
item.acDeclarationConfigParam[this.showCndex].acDeclarationProductParamList[
|
||||
this.showIndex
|
||||
].pkProduct = this.selectData.pkId
|
||||
|
||||
item.acDeclarationConfigParam[this.showCndex].acDeclarationProductParamList[
|
||||
this.showIndex
|
||||
].productName = this.selectData.productName
|
||||
|
||||
item.acDeclarationConfigParam[this.showCndex].acDeclarationProductParamList[
|
||||
this.showIndex
|
||||
].specsName = this.selectData.selSkuNameList
|
||||
|
||||
item.acDeclarationConfigParam[this.showCndex].acDeclarationProductParamList[
|
||||
this.showIndex
|
||||
].specsNameId = this.selectData.selSkuList
|
||||
|
||||
item.acDeclarationConfigParam[this.showCndex].acDeclarationProductParamList[
|
||||
this.showIndex
|
||||
].quantity = this.selectData.quantity
|
||||
|
||||
})
|
||||
|
||||
// this.dialogVisible = false
|
||||
this.handleClose()
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
batchHandle() {
|
||||
this.allData.forEach((item) => {
|
||||
item.acDeclarationConfigParam.forEach((ctem) => {
|
||||
ctem.acDeclarationProductParamList.forEach((stem) => {
|
||||
stem.quantity = this.batchReset.quantity
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
getAllData() {
|
||||
return this.allData[0].acDeclarationConfigParam
|
||||
},
|
||||
reset() {
|
||||
this.batchReset = {}
|
||||
},
|
||||
getCheckBox() {
|
||||
const arr1 = []
|
||||
const arr2 = []
|
||||
this.skuList.forEach((item) => {
|
||||
item.specsList.forEach((ctem) => {
|
||||
if (ctem.pkId == item.pkProductSku) {
|
||||
arr1.push(ctem.pkId)
|
||||
arr2.push(ctem.specsName)
|
||||
}
|
||||
})
|
||||
})
|
||||
this.selSkuList = arr1.join(',')
|
||||
this.selSkuNameList = arr2.join(',')
|
||||
},
|
||||
handleClose() {
|
||||
this.selectData = []
|
||||
this.dialogVisible = false
|
||||
},
|
||||
handleCloseGg() {
|
||||
this.ggVisible = false
|
||||
},
|
||||
getProduct(cndex, index) {
|
||||
this.showCndex = cndex
|
||||
this.showIndex = index
|
||||
this.getDataList()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
addProduct(cndex, sndex) {
|
||||
this.allData.forEach((item) => {
|
||||
item.acDeclarationConfigParam[cndex].acDeclarationProductParamList.push({
|
||||
pkProduct: '',
|
||||
productName: '',
|
||||
specsName: '',
|
||||
specsNameId: '',
|
||||
quantity: ''
|
||||
})
|
||||
})
|
||||
},
|
||||
reduceProduct(cndex, sndex) {
|
||||
this.allData.forEach((item) => {
|
||||
if (this.isArea == item.orderType) {
|
||||
item.acDeclarationConfigParam[cndex].acDeclarationProductParamList.splice(sndex, 1)
|
||||
}
|
||||
})
|
||||
},
|
||||
addNewGoods() {
|
||||
this.allData.forEach((item) => {
|
||||
item.acDeclarationConfigParam.push({
|
||||
registerAuthority: '',
|
||||
specifyLevel: '',
|
||||
acDeclarationProductParamList: [
|
||||
{
|
||||
pkProduct: '',
|
||||
productName: '',
|
||||
specsName: '',
|
||||
specsNameId: '',
|
||||
quantity: ''
|
||||
}
|
||||
]
|
||||
})
|
||||
})
|
||||
},
|
||||
reduceRow(index) {
|
||||
this.allData.forEach((item) => {
|
||||
item.acDeclarationConfigParam.splice(index, 1)
|
||||
})
|
||||
},
|
||||
selSku(pkId, index) {
|
||||
this.selIndex = index
|
||||
api
|
||||
.getProductSpecs({
|
||||
pkProduct: pkId
|
||||
})
|
||||
.then((res) => {
|
||||
const arr1 = []
|
||||
const arr2 = []
|
||||
res.data.forEach((item) => {
|
||||
item.pkProductSku = item.specsList[0].pkId
|
||||
arr1.push(item.specsList[0].pkId)
|
||||
arr2.push(item.specsList[0].specsName)
|
||||
})
|
||||
this.selSkuList = arr1.join(',')
|
||||
this.selSkuNameList = arr2.join(',')
|
||||
|
||||
this.skuList = res.data
|
||||
this.ggVisible = true
|
||||
})
|
||||
},
|
||||
getDataList() {
|
||||
api
|
||||
.getProductAll(Object.assign({ isPutOn: 0 }, this.queryParams, this.select, { isExistSpecs: 1 }))
|
||||
.then((res) => {
|
||||
res.rows.forEach((item) => {
|
||||
item.quantity = 1
|
||||
})
|
||||
this.dialogList = res.rows
|
||||
this.total = res.total
|
||||
})
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
},
|
||||
selected(selection, row) {
|
||||
// 清除 所有勾选项
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
// 当表格数据都没有被勾选的时候 就返回
|
||||
// 主要用于将当前勾选的表格状态清除
|
||||
console.log(selection, row)
|
||||
if (selection.length == 0) return
|
||||
this.$refs.multipleTable.toggleRowSelection(row, true)
|
||||
this.selectData = row
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 == 1) {
|
||||
return 'warning-row'
|
||||
} else if (rowIndex % 2 == 0) {
|
||||
return 'success-row'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// .page {
|
||||
// padding: 20px;
|
||||
// background: #f9f9f9;
|
||||
// font-size: 14px;
|
||||
.main_a {
|
||||
// height: calc(100vh - 124px);
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
// height: calc(100vh - 164px);
|
||||
// height: 100%;
|
||||
}
|
||||
.main {
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
height: calc(100vh - 164px);
|
||||
padding-bottom: 20px;
|
||||
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
}
|
||||
::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
// }
|
||||
.footer {
|
||||
height: 68px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px -3px 20px 0px rgba(204, 204, 204, 0.5);
|
||||
// margin: 0 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.thebtn1 {
|
||||
background: #3181e5;
|
||||
color: #ffffff;
|
||||
padding: 9px 45px;
|
||||
}
|
||||
.thebtn2 {
|
||||
background: #cccccc;
|
||||
color: #ffffff;
|
||||
padding: 9px 45px;
|
||||
}
|
||||
}
|
||||
.tit {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
padding: 0 20px;
|
||||
border-left: 5px solid #c8161d;
|
||||
margin: 20px 0 10px 0;
|
||||
}
|
||||
.xian {
|
||||
height: 1px;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.demo-ruleForm {
|
||||
padding: 20px 0;
|
||||
}
|
||||
::v-deep .el-date-editor--datetimerange {
|
||||
width: auto !important;
|
||||
}
|
||||
.flexed {
|
||||
display: flex;
|
||||
}
|
||||
.flexed_l {
|
||||
margin-right: 20px;
|
||||
}
|
||||
.table {
|
||||
padding: 0 20px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #cccccc;
|
||||
border-spacing: 0;
|
||||
table-layout: fixed;
|
||||
border-collapse: collapse;
|
||||
// 合并内外边距
|
||||
// (去除表格单元格默认的2个像素内外边距*/
|
||||
}
|
||||
.table_b {
|
||||
border-top: 0;
|
||||
}
|
||||
th {
|
||||
padding: 10px 10px;
|
||||
text-align: center;
|
||||
border: 1px solid #cccccc;
|
||||
overflow: hidden;
|
||||
border-top: 0;
|
||||
}
|
||||
td {
|
||||
padding: 10px 10px;
|
||||
text-align: center;
|
||||
border: 1px solid #cccccc;
|
||||
border-top: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tableFlex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
.tableFlex_i {
|
||||
flex: 1;
|
||||
::v-deep .el-input__inner {
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.tableAdd {
|
||||
width: 50px;
|
||||
img {
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
}
|
||||
}
|
||||
.tableAddPro {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
img {
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
.tableLeft {
|
||||
text-align: left;
|
||||
}
|
||||
.tabList {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20px 0px 0 20px;
|
||||
.tabList_i {
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tabAct {
|
||||
background: #108ee9;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.clearBtm {
|
||||
border-bottom: 0;
|
||||
}
|
||||
.cpHeight {
|
||||
height: 50vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.blueCor {
|
||||
color: #589ff8;
|
||||
cursor: pointer;
|
||||
}
|
||||
::v-deep .el-input__icon{
|
||||
line-height: 33px;
|
||||
}
|
||||
::v-deep .el-button{
|
||||
margin-top: 0;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,383 @@
|
|||
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="topbox">
|
||||
<div
|
||||
v-for="(item, index) in topList"
|
||||
:key="index"
|
||||
class="levelList_i"
|
||||
:class="tabActive == item.id ? 'act' : ''"
|
||||
@click.prevent="handleLink(item.id)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main">
|
||||
<div v-show="tabActive == 0">
|
||||
<div class="tit">基本信息</div>
|
||||
<div class="xian" />
|
||||
<el-form
|
||||
ref="ruleForm"
|
||||
:model="ruleForm"
|
||||
:rules="rules"
|
||||
label-width="auto"
|
||||
class="demo-ruleForm"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'活动名称'" prop="actName">
|
||||
<el-input
|
||||
v-model="ruleForm.actName"
|
||||
clearable
|
||||
:disabled="lookOver"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="16">
|
||||
<el-form-item :label="'活动说明'" prop="actExplain">
|
||||
<editor
|
||||
ref="sptwEditor"
|
||||
v-model="ruleForm.actExplain"
|
||||
:read-only="lookOver"
|
||||
:min-height="196"
|
||||
:upload-url="uploadImgUrl"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'活动封面'" prop="actCover">
|
||||
<imageUpload v-model="ruleForm.actCover" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'活动时间'" prop="ruleFormTime">
|
||||
<el-date-picker
|
||||
v-model="ruleForm.ruleFormTime"
|
||||
:disabled="lookOver"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'展示时间'" prop="ruleFormTime1">
|
||||
<el-date-picker
|
||||
v-model="ruleForm.ruleFormTime1"
|
||||
:disabled="lookOver"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<UpdateInfo v-show="tabActive == 2" ref="updateInfo" />
|
||||
|
||||
</div>
|
||||
<div v-show="controlType != 4" class="footer">
|
||||
<el-button size="small" class="cancelBtn" @click="$router.back()">
|
||||
{{ '取消' }}</el-button>
|
||||
<el-button size="small" class="sureBtn" :loading="loading" @click="submit('ruleForm')">
|
||||
{{ '确认' }}</el-button>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Editor from '@/components/Editor'
|
||||
|
||||
import * as api from '@/api/giftGoods.js'
|
||||
import ImageUpload from '@/components/ImageUpload'
|
||||
import UpdateInfo from '@/views/marketing/declarationActivity/update'
|
||||
import { updateDeclarationActivityList, addDeclarationActivityList, getDeclarationActivityDetail } from '@/api/activity.js'
|
||||
export default {
|
||||
name: 'AddDirectPushUpgrade',
|
||||
components: {
|
||||
ImageUpload,
|
||||
UpdateInfo,
|
||||
Editor
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabActive: 0,
|
||||
topList: [
|
||||
{
|
||||
name: '基本信息',
|
||||
id: 0
|
||||
},
|
||||
{
|
||||
name: '报单赠送',
|
||||
id: 2
|
||||
}
|
||||
],
|
||||
uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload',
|
||||
ruleForm: {
|
||||
ruleFormTime: [],
|
||||
ruleFormTime1: [],
|
||||
actName: '',
|
||||
actExplain: '',
|
||||
actCover: ''
|
||||
|
||||
},
|
||||
rules: {
|
||||
actName: [
|
||||
{ required: true, message: '请输入活动名称', trigger: 'blur' }
|
||||
],
|
||||
actExplain: [
|
||||
{ required: true, message: '请输入活动说明', trigger: 'blur' }
|
||||
],
|
||||
actCover: [
|
||||
{ required: true, message: '请上传活动封面', trigger: 'change' }
|
||||
],
|
||||
ruleFormTime: [
|
||||
{ required: true, message: '请选择活动时间', trigger: 'change' }
|
||||
],
|
||||
ruleFormTime1: [
|
||||
{ required: true, message: '请选择展示时间', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
lookOver: false,
|
||||
gradeList: [],
|
||||
awardsList: [],
|
||||
registList: [],
|
||||
pkId: '',
|
||||
repurchaseCouponsShowList: [],
|
||||
controlType: '',
|
||||
addData: {},
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getData()
|
||||
// (1=新增,2=修改,3=删除)4查看
|
||||
if (
|
||||
this.$route.query.controlType == 4 ||
|
||||
this.$route.query.controlType == 3
|
||||
) {
|
||||
this.lookOver = true
|
||||
} else {
|
||||
this.lookOver = false
|
||||
}
|
||||
this.controlType = this.$route.query.controlType
|
||||
this.pkId = this.$route.query.pkId || ''
|
||||
if (this.pkId) {
|
||||
this.getDetails()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
splitDate(date) {
|
||||
return date.split(' ')[0]
|
||||
},
|
||||
getDetails() {
|
||||
getDeclarationActivityDetail({
|
||||
pkId: this.pkId
|
||||
})
|
||||
.then((res) => {
|
||||
this.addData = res.data
|
||||
this.$set(this.ruleForm, 'actName', res.data.actName)
|
||||
this.$set(
|
||||
this.ruleForm,
|
||||
'actExplain',
|
||||
res.data.actExplain
|
||||
)
|
||||
this.$set(this.ruleForm, 'actCover', res.data.actCover)
|
||||
this.ruleForm.pkId = res.data.pkId
|
||||
this.ruleForm.actStartDate = res.data.actStartDate
|
||||
this.ruleForm.actEndDate = res.data.actEndDate
|
||||
this.ruleForm.disStartDate = res.data.disStartDate
|
||||
this.ruleForm.disEndDate = res.data.disEndDate
|
||||
const actStartDate = this.splitDate(res.data.actStartDate)
|
||||
const actEndDate = this.splitDate(res.data.actEndDate)
|
||||
const disStartDate = this.splitDate(res.data.disStartDate)
|
||||
const disEndDate = this.splitDate(res.data.disEndDate)
|
||||
this.$set(this.ruleForm, 'ruleFormTime', [
|
||||
actStartDate,
|
||||
actEndDate
|
||||
])
|
||||
this.$set(this.ruleForm, 'ruleFormTime1', [
|
||||
disStartDate,
|
||||
disEndDate
|
||||
])
|
||||
|
||||
this.$refs.updateInfo.setAllData(
|
||||
this.addData.acDeclarationConfigParams || null
|
||||
)
|
||||
})
|
||||
},
|
||||
// 切换tab
|
||||
handleLink(id) {
|
||||
this.tabActive = id
|
||||
console.log(this.$refs.updateInfo.allData, '....this.$refs.updateInfo')
|
||||
},
|
||||
// 单选
|
||||
|
||||
changeTime(val) {
|
||||
this.ruleForm.actStartDate = val[0]
|
||||
this.ruleForm.actEndDate = val[1]
|
||||
},
|
||||
changeTime1(val) {
|
||||
this.ruleForm.disStartDate = val[0]
|
||||
this.ruleForm.disEndDate = val[1]
|
||||
},
|
||||
getData() {
|
||||
api.awardsList().then((res) => {
|
||||
this.awardsList = res.rows
|
||||
})
|
||||
api.gradeList().then((res) => {
|
||||
this.gradeList = res.rows
|
||||
})
|
||||
api.registerPowerState().then((res) => {
|
||||
this.registList = res.data
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
this.$refs['ruleForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
const obj = Object.assign(
|
||||
{},
|
||||
{
|
||||
controlType: this.controlType,
|
||||
activityParam: {
|
||||
...this.ruleForm,
|
||||
actStartDate: this.ruleForm.actStartDate + ' 00:00:00',
|
||||
actEndDate: this.ruleForm.actEndDate + ' 23:59:59',
|
||||
disStartDate: this.ruleForm.disStartDate + ' 00:00:00',
|
||||
disEndDate: this.ruleForm.disEndDate + ' 23:59:59'
|
||||
},
|
||||
acDeclarationConfigParams:
|
||||
this.$refs.updateInfo.getAllData()
|
||||
// authorityList: this.$refs.updateInfo.form.waresAuthorityList
|
||||
}
|
||||
)
|
||||
|
||||
const api = Number(this.controlType) === 1 ? addDeclarationActivityList : updateDeclarationActivityList
|
||||
api(obj).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message({
|
||||
message: res.msg || '操作成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.$router.back()
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
padding: 20px;
|
||||
background: #f9f9f9;
|
||||
font-size: 14px;
|
||||
.main_a {
|
||||
height: calc(100vh - 144px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.main {
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
// height: calc(100vh - 124px);
|
||||
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
}
|
||||
::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.footer {
|
||||
height: 68px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px -3px 20px 0px rgba(204, 204, 204, 0.5);
|
||||
// margin: 0 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.thebtn1 {
|
||||
background: #3181e5;
|
||||
color: #ffffff;
|
||||
padding: 9px 45px;
|
||||
}
|
||||
.thebtn2 {
|
||||
background: #cccccc;
|
||||
color: #ffffff;
|
||||
padding: 9px 45px;
|
||||
}
|
||||
}
|
||||
.tit {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
padding: 0 20px;
|
||||
border-left: 5px solid #c8161d;
|
||||
margin: 20px 0 10px 0;
|
||||
}
|
||||
.xian {
|
||||
height: 1px;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.demo-ruleForm {
|
||||
padding: 20px 0;
|
||||
}
|
||||
::v-deep .el-date-editor--datetimerange {
|
||||
width: auto !important;
|
||||
}
|
||||
.flexed {
|
||||
display: flex;
|
||||
}
|
||||
.flexed_l {
|
||||
margin-right: 20px;
|
||||
}
|
||||
.topbox {
|
||||
align-items: center;
|
||||
padding: 0px 0 15px 0;
|
||||
display: flex;
|
||||
// background: skyblue;
|
||||
.levelList_i {
|
||||
margin-left: 20px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
padding: 0 5px;
|
||||
width: 88px;
|
||||
height: 34px;
|
||||
border-radius: 17px;
|
||||
border: 1px solid #cccccc;
|
||||
font-size: 14px;
|
||||
font-family: MicrosoftYaHei;
|
||||
text-align: center;
|
||||
line-height: 32px;
|
||||
}
|
||||
.act {
|
||||
color: #ffffff;
|
||||
background: #c8161d;
|
||||
}
|
||||
}
|
||||
::v-deep .el-form-item {
|
||||
margin-bottom: 20px !important;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,409 @@
|
|||
<template>
|
||||
<div class="page">
|
||||
<topBar
|
||||
v-if="topList.length > 0"
|
||||
:top-list="topList"
|
||||
:moren="moren"
|
||||
/>
|
||||
<div class="main">
|
||||
<div class="form_all">
|
||||
<el-form
|
||||
ref="select"
|
||||
:model="select"
|
||||
label-width="auto"
|
||||
>
|
||||
<el-row :gutter="40">
|
||||
<!-- 一层 -->
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'活动名称'">
|
||||
<el-input
|
||||
v-model="select.actName"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'活动状态'">
|
||||
<el-select
|
||||
v-model="select.activityStatus"
|
||||
clearable
|
||||
:placeholder="'请选择'"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in actStatus"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'开始日期'">
|
||||
<el-date-picker
|
||||
v-model="creationTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'结束日期'">
|
||||
<el-date-picker
|
||||
v-model="creationTime1"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item :label="'创建日期'">
|
||||
<el-date-picker
|
||||
v-model="creationTime2"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime2"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="4">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="getDataList"
|
||||
> {{ '搜索' }}</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
class="resetBtn"
|
||||
@click="reset"
|
||||
> {{ '重置' }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="main_a">
|
||||
<div class="mainbtn">
|
||||
<el-button
|
||||
v-hasButtons="['shoppingUpgradeAdd']"
|
||||
size="small"
|
||||
class="addBtn"
|
||||
@click="addHandle"
|
||||
>{{ '添加' }}</el-button>
|
||||
<el-button
|
||||
v-hasButtons="['shoppingUpgradeExport']"
|
||||
size="small"
|
||||
class="exportBtn"
|
||||
@click="handleExport"
|
||||
> {{ '导出' }}</el-button>
|
||||
</div>
|
||||
<div class="maintable">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
height="710px"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
:row-class-name="tableRowClassName"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actName"
|
||||
:label="'活动名称'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actStartDate"
|
||||
:label="'开始日期'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actEndDate"
|
||||
:label="'结束日期'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="status"
|
||||
:label="'活动状态'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="creationTime"
|
||||
:label="'创建日期'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="time"
|
||||
:label="'操作'"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-button
|
||||
v-hasButtons="['shoppingUpgradeDetail']"
|
||||
type="text"
|
||||
style="color: #48B2FD;"
|
||||
size="small"
|
||||
@click="redirectDetail(scope.row.pkId, 4)"
|
||||
>
|
||||
{{ '查看' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-hasButtons="['shoppingUpgradeUpdate']"
|
||||
type="text"
|
||||
style="color: #F3A900;"
|
||||
size="small"
|
||||
@click="redirectDetail(scope.row.pkId, 2)"
|
||||
>
|
||||
{{ '修改' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-hasButtons="['shoppingUpgradeDelete']"
|
||||
type="text"
|
||||
size="small"
|
||||
style="color: #C8161D"
|
||||
@click="handleDelete(scope.row.pkId)"
|
||||
>
|
||||
{{ '删除' }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import topBar from '@/components/topBar'
|
||||
import * as api from '@/api/activity.js'
|
||||
import { activityStatus } from '@/api/giftGoods.js'
|
||||
export default {
|
||||
name: 'Bzpz',
|
||||
components: {
|
||||
topBar
|
||||
},
|
||||
filters: {
|
||||
isAgree(val) {
|
||||
if (!val) {
|
||||
return '允许'
|
||||
} else {
|
||||
return '禁止'
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
creationTime: [],
|
||||
creationTime1: [],
|
||||
creationTime2: [],
|
||||
select: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50
|
||||
},
|
||||
addOrEdit: '',
|
||||
total: 0,
|
||||
dialogVisible: false,
|
||||
tableData: [],
|
||||
loading: false,
|
||||
moren: 'shoppingUpgradeList',
|
||||
topList: [
|
||||
{
|
||||
name: '加购升级',
|
||||
path: 'shoppingUpgradeList'
|
||||
}
|
||||
],
|
||||
form: {
|
||||
name: ''
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: '请输入规格类型', trigger: 'blur' }]
|
||||
},
|
||||
actStatus: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 获取下拉
|
||||
this.getData()
|
||||
// 获取列表
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// 重置
|
||||
reset() {
|
||||
this.select = {}
|
||||
this.creationTime = []
|
||||
this.creationTime1 = []
|
||||
this.creationTime2 = []
|
||||
this.getDataList()
|
||||
},
|
||||
getData() {
|
||||
activityStatus().then((res) => {
|
||||
this.actStatus = res.data
|
||||
})
|
||||
},
|
||||
changeTime(val) {
|
||||
this.select.startActStartDate = val ? val[0] : ''
|
||||
this.select.endActStartDate = val ? val[1] : ''
|
||||
},
|
||||
changeTime1(val) {
|
||||
this.select.startActEndDate = val ? val[0] : ''
|
||||
this.select.endActEndDate = val ? val[1] : ''
|
||||
},
|
||||
changeTime2(val) {
|
||||
this.select.startCreationTime = val ? val[0] : ''
|
||||
this.select.endCreationTime = val ? val[1] : ''
|
||||
},
|
||||
// 点击修改
|
||||
redirectDetail(id, index) {
|
||||
this.$router.push({
|
||||
path: 'updateInfo',
|
||||
query: {
|
||||
pkId: id,
|
||||
controlType: index
|
||||
}
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
handleDelete(id) {
|
||||
this.$confirm('确认删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
api.updateShoppingUpgradeList({
|
||||
activityParam: {
|
||||
pkId: id
|
||||
},
|
||||
controlType: 3
|
||||
}).then((res) => {
|
||||
this.getDataList()
|
||||
})
|
||||
})
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
this.$refs['form'].clearValidate()
|
||||
this.$refs['form'].resetFields()
|
||||
},
|
||||
addHandle() {
|
||||
this.$router.push({
|
||||
path: 'updateInfo',
|
||||
query: {
|
||||
controlType: 1
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取列表
|
||||
getDataList() {
|
||||
this.loading = true
|
||||
api
|
||||
.getActivityList(
|
||||
Object.assign({}, this.queryParams, this.select, { actType: 31 })
|
||||
)
|
||||
.then((res) => {
|
||||
this.tableData = res.rows
|
||||
this.total = res.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then((_) => {
|
||||
this.download(
|
||||
'activity/manage/addUpgradeConfig/export',
|
||||
Object.assign({}, { actType: 31 }, this.queryParams, this.select),
|
||||
`${'加购升级'}${new Date().getTime()}.xlsx`
|
||||
)
|
||||
})
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 == 1) {
|
||||
return 'warning-row'
|
||||
} else if (rowIndex % 2 == 0) {
|
||||
return 'success-row'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
::v-deep .el-table .warning-row {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
::v-deep .el-table .success-row {
|
||||
background: #ffffff;
|
||||
}
|
||||
::v-deep .el-table thead {
|
||||
color: #000000;
|
||||
}
|
||||
::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
.page {
|
||||
padding: 20px;
|
||||
background: #f9f9f9;
|
||||
font-size: 14px;
|
||||
.main {
|
||||
// background: #ffffff;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.main_a {
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
}
|
||||
.mainbtn {
|
||||
padding: 0;
|
||||
}
|
||||
.maintable {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .el-date-editor.el-input,
|
||||
.el-date-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
.form_all {
|
||||
padding: 0 20px;
|
||||
margin-bottom: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,358 @@
|
|||
<template>
|
||||
<div class="page">
|
||||
<topBar
|
||||
v-if="topList.length > 0"
|
||||
:top-list="topList"
|
||||
:moren="moren"
|
||||
/>
|
||||
<div class="main">
|
||||
<div class="form_all">
|
||||
<el-form
|
||||
ref="select"
|
||||
:model="select"
|
||||
label-width="auto"
|
||||
>
|
||||
<el-row :gutter="40">
|
||||
<!-- 一层 -->
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'活动名称'">
|
||||
<el-input
|
||||
v-model="select.actName"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'活动状态'">
|
||||
<el-select
|
||||
v-model="select.activityStatus"
|
||||
clearable
|
||||
:placeholder="'请选择'"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in actStatus"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'开始日期'">
|
||||
<el-date-picker
|
||||
v-model="creationTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'结束日期'">
|
||||
<el-date-picker
|
||||
v-model="creationTime1"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item :label="'创建日期'">
|
||||
<el-date-picker
|
||||
v-model="creationTime2"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime2"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="4">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="getDataList"
|
||||
> {{ '搜索' }}</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
class="resetBtn"
|
||||
@click="reset"
|
||||
> {{ '重置' }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="main_a">
|
||||
<div class="mainbtn">
|
||||
|
||||
<el-button
|
||||
v-hasButtons="['shoppingUpgradeRecordExport']"
|
||||
size="small"
|
||||
class="exportBtn"
|
||||
@click="handleExport"
|
||||
> {{ '导出' }}</el-button>
|
||||
</div>
|
||||
<div class="maintable">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
height="710px"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
:row-class-name="tableRowClassName"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="memberCode"
|
||||
label="会员编号"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="memberName"
|
||||
label="会员姓名"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actName"
|
||||
:label="'活动名称'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="originalLevelVal"
|
||||
label="原等级"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="upgradeLevelVal"
|
||||
label="新等级"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
align="center"
|
||||
prop="actStartDate"
|
||||
:label="'开始日期'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actEndDate"
|
||||
:label="'结束日期'"
|
||||
/> -->
|
||||
<!-- <el-table-column
|
||||
align="center"
|
||||
prop="status"
|
||||
:label="'活动状态'"
|
||||
/> -->
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="creationTime"
|
||||
:label="'创建日期'"
|
||||
/>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import topBar from '@/components/topBar'
|
||||
import * as api from '@/api/activity.js'
|
||||
import { activityStatus } from '@/api/giftGoods.js'
|
||||
export default {
|
||||
name: 'Bzpz',
|
||||
components: {
|
||||
topBar
|
||||
},
|
||||
filters: {
|
||||
isAgree(val) {
|
||||
if (!val) {
|
||||
return '允许'
|
||||
} else {
|
||||
return '禁止'
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
creationTime: [],
|
||||
creationTime1: [],
|
||||
creationTime2: [],
|
||||
select: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50
|
||||
},
|
||||
addOrEdit: '',
|
||||
total: 0,
|
||||
dialogVisible: false,
|
||||
tableData: [],
|
||||
loading: false,
|
||||
moren: 'shoppingUpgradeRecordList',
|
||||
topList: [
|
||||
{
|
||||
name: '加购升级记录',
|
||||
path: 'shoppingUpgradeRecordList'
|
||||
}
|
||||
],
|
||||
form: {
|
||||
name: ''
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: '请输入规格类型', trigger: 'blur' }]
|
||||
},
|
||||
actStatus: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 获取下拉
|
||||
this.getData()
|
||||
// 获取列表
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// 重置
|
||||
reset() {
|
||||
this.select = {}
|
||||
this.creationTime = []
|
||||
this.creationTime1 = []
|
||||
this.creationTime2 = []
|
||||
this.getDataList()
|
||||
},
|
||||
getData() {
|
||||
activityStatus().then((res) => {
|
||||
this.actStatus = res.data
|
||||
})
|
||||
},
|
||||
changeTime(val) {
|
||||
this.select.startActStartDate = val ? val[0] : ''
|
||||
this.select.endActStartDate = val ? val[1] : ''
|
||||
},
|
||||
changeTime1(val) {
|
||||
this.select.startActEndDate = val ? val[0] : ''
|
||||
this.select.endActEndDate = val ? val[1] : ''
|
||||
},
|
||||
changeTime2(val) {
|
||||
this.select.startCreationTime = val ? val[0] : ''
|
||||
this.select.endCreationTime = val ? val[1] : ''
|
||||
},
|
||||
// 点击修改
|
||||
redirectDetail(id, index) {
|
||||
this.$router.push({
|
||||
path: 'updateInfo',
|
||||
query: {
|
||||
pkId: id,
|
||||
controlType: index
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取列表
|
||||
getDataList() {
|
||||
this.loading = true
|
||||
api
|
||||
.upgradeRecordList(
|
||||
Object.assign({}, this.queryParams, this.select, { actType: 31 })
|
||||
)
|
||||
.then((res) => {
|
||||
this.tableData = res.rows
|
||||
this.total = res.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then((_) => {
|
||||
this.download(
|
||||
'activity/manage/addUpgradeRecord/listExport',
|
||||
Object.assign({}, { actType: 31 }, this.queryParams, this.select),
|
||||
`${'加购升级记录'}${new Date().getTime()}.xlsx`
|
||||
)
|
||||
})
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 == 1) {
|
||||
return 'warning-row'
|
||||
} else if (rowIndex % 2 == 0) {
|
||||
return 'success-row'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
::v-deep .el-table .warning-row {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
::v-deep .el-table .success-row {
|
||||
background: #ffffff;
|
||||
}
|
||||
::v-deep .el-table thead {
|
||||
color: #000000;
|
||||
}
|
||||
::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
.page {
|
||||
padding: 20px;
|
||||
background: #f9f9f9;
|
||||
font-size: 14px;
|
||||
.main {
|
||||
// background: #ffffff;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.main_a {
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
}
|
||||
.mainbtn {
|
||||
padding: 0;
|
||||
}
|
||||
.maintable {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .el-date-editor.el-input,
|
||||
.el-date-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
.form_all {
|
||||
padding: 0 20px;
|
||||
margin-bottom: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,405 @@
|
|||
<template>
|
||||
<div class="">
|
||||
<div class="tit">加购升级</div>
|
||||
<div class="xian" />
|
||||
<div class="tabList">
|
||||
<div
|
||||
v-for="item in areaList"
|
||||
:key="item.value"
|
||||
:class="['tabList_i', isArea == item.value ? 'tabAct' : '']"
|
||||
@click="setArea(item.value)"
|
||||
>
|
||||
{{ item.label }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<!-- 批量操作 -->
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="5" class="tableLeft">
|
||||
<el-button type="primary" size="mini" @click="addNewGoods">{{ '添加' }}
|
||||
</el-button>
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<table v-for="item in allData" v-show="item.orderType == isArea" :key="item.orderType" class="table_b">
|
||||
<tr style="border-top: 0">
|
||||
<td style="border: 0" />
|
||||
<td colspan="2">原等级</td>
|
||||
<td colspan="2">{{ '商品名称' }}</td>
|
||||
<td colspan="2">{{ '商品数量' }}</td>
|
||||
<td colspan="2">升级等级</td>
|
||||
|
||||
<td colspan="2" style="border: 0" />
|
||||
</tr>
|
||||
<tr v-for="(ctem, cndex) in item.acAddUpgradeRuleConfigParams" :key="cndex">
|
||||
<td style="border: 0" />
|
||||
<td colspan="2">
|
||||
<el-select
|
||||
v-model="ctem.originalLevel"
|
||||
clearable
|
||||
:placeholder="'请选择'"
|
||||
>
|
||||
<el-option
|
||||
v-for="grade in gradeRangList"
|
||||
:key="grade.pkId"
|
||||
:label="grade.gradeName"
|
||||
:value="grade.pkId"
|
||||
/>
|
||||
</el-select>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<el-select v-model="ctem.pkWares" size="medium" filterable :placeholder="'请选择'">
|
||||
<el-option v-for="item in allGoods" :key="item.pkId" :label="item.waresName" :value="item.pkId">
|
||||
<span style="float: left">{{ item.waresName }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{
|
||||
item.waresCode
|
||||
}}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<el-input-number v-model="ctem.quantity" :min="1" :controls="false" />
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<el-select
|
||||
v-model="ctem.upgradeLevel"
|
||||
clearable
|
||||
:placeholder="'请选择'"
|
||||
>
|
||||
<el-option v-for="grade in gradeRangList" :key="grade.pkId" :label="grade.gradeName" :value="grade.pkId" />
|
||||
</el-select>
|
||||
</td>
|
||||
<td colspan="2" style="border: 0">
|
||||
<div class="tableAdd">
|
||||
<img src="@/assets/images/iconpop.png" alt="" @click="reduceRow(cndex)">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as api from '@/api/giftGoods.js'
|
||||
|
||||
import { getgradeRanglist } from '@/api/level'
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
ggVisible: false,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50
|
||||
},
|
||||
total: 0,
|
||||
|
||||
allData: [], // 全部数据
|
||||
areaList: [
|
||||
{
|
||||
'value': 1,
|
||||
'label': '注册专区'
|
||||
},
|
||||
{
|
||||
'value': 2,
|
||||
'label': '升级专区'
|
||||
}
|
||||
], // 全部专区
|
||||
allGoods: [], // 全部商品
|
||||
isArea: '',
|
||||
plcz: {},
|
||||
select: {}, // 产品筛选
|
||||
dialogList: [], // 产品数组
|
||||
selectData: [], // 选中
|
||||
skuList: [], // 规格数组
|
||||
selSkuList: '',
|
||||
selSkuNameList: '',
|
||||
selIndex: '',
|
||||
showCndex: '',
|
||||
showIndex: '',
|
||||
pageData: {},
|
||||
queryData: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getgradeRanglist()
|
||||
this.initData()
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
getgradeRanglist() {
|
||||
getgradeRanglist().then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.gradeRangList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
initData(data) {
|
||||
if (data && data.length > 0) {
|
||||
this.allData = JSON.parse(JSON.stringify(data))
|
||||
} else {
|
||||
this.allData = []
|
||||
this.areaList.forEach((item) => {
|
||||
this.allData.push({
|
||||
orderType: item.value,
|
||||
acAddUpgradeRuleConfigParams: []
|
||||
})
|
||||
})
|
||||
}
|
||||
this.isArea = this.areaList[0].value
|
||||
},
|
||||
|
||||
getData() {
|
||||
api
|
||||
.waresList({
|
||||
specialArea: this.isArea
|
||||
})
|
||||
.then((res) => {
|
||||
this.allGoods = res.data
|
||||
})
|
||||
},
|
||||
|
||||
setArea(val) {
|
||||
this.isArea = val
|
||||
api
|
||||
.waresList({
|
||||
specialArea: this.isArea
|
||||
})
|
||||
.then((res) => {
|
||||
this.allGoods = res.data
|
||||
})
|
||||
},
|
||||
|
||||
reduceRow(index) {
|
||||
this.allData.forEach((item) => {
|
||||
if (this.isArea == item.orderType) {
|
||||
item.acAddUpgradeRuleConfigParams.splice(index, 1)
|
||||
}
|
||||
})
|
||||
},
|
||||
addNewGoods() {
|
||||
this.allData.forEach((item) => {
|
||||
if (this.isArea === item.orderType) {
|
||||
item.acAddUpgradeRuleConfigParams.push({
|
||||
pkWares: '',
|
||||
pkWaresName: '',
|
||||
quantity: '',
|
||||
originalLevel: '',
|
||||
upgradeLevel: ''
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 == 1) {
|
||||
return 'warning-row'
|
||||
} else if (rowIndex % 2 == 0) {
|
||||
return 'success-row'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// .page {
|
||||
// padding: 20px;
|
||||
// background: #f9f9f9;
|
||||
// font-size: 14px;
|
||||
.main_a {
|
||||
// height: calc(100vh - 124px);
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
// height: calc(100vh - 164px);
|
||||
// height: 100%;
|
||||
}
|
||||
|
||||
.main {
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
height: calc(100vh - 164px);
|
||||
padding-bottom: 20px;
|
||||
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
}
|
||||
|
||||
::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// }
|
||||
.footer {
|
||||
height: 68px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px -3px 20px 0px rgba(204, 204, 204, 0.5);
|
||||
// margin: 0 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.thebtn1 {
|
||||
background: #3181e5;
|
||||
color: #ffffff;
|
||||
padding: 9px 45px;
|
||||
}
|
||||
|
||||
.thebtn2 {
|
||||
background: #cccccc;
|
||||
color: #ffffff;
|
||||
padding: 9px 45px;
|
||||
}
|
||||
}
|
||||
|
||||
.tit {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
padding: 0 20px;
|
||||
border-left: 5px solid #c8161d;
|
||||
margin: 20px 0 10px 0;
|
||||
}
|
||||
|
||||
.xian {
|
||||
height: 1px;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.demo-ruleForm {
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
::v-deep .el-date-editor--datetimerange {
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
.flexed {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.flexed_l {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.table {
|
||||
padding: 0 20px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #cccccc;
|
||||
border-spacing: 0;
|
||||
table-layout: fixed;
|
||||
border-collapse: collapse;
|
||||
// 合并内外边距
|
||||
// (去除表格单元格默认的2个像素内外边距*/
|
||||
}
|
||||
|
||||
.table_b {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
th {
|
||||
padding: 10px 10px;
|
||||
text-align: center;
|
||||
border: 1px solid #cccccc;
|
||||
overflow: hidden;
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 10px 10px;
|
||||
text-align: center;
|
||||
border: 1px solid #cccccc;
|
||||
border-top: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tableFlex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.tableFlex_i {
|
||||
flex: 1;
|
||||
|
||||
::v-deep .el-input__inner {
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tableAdd {
|
||||
width: 50px;
|
||||
|
||||
img {
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
}
|
||||
}
|
||||
|
||||
.tableAddPro {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
img {
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.tableLeft {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.tabList {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20px 0px 0 20px;
|
||||
|
||||
.tabList_i {
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tabAct {
|
||||
background: #108ee9;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.clearBtm {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.cpHeight {
|
||||
height: 50vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.blueCor {
|
||||
color: #589ff8;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::v-deep .el-input__icon {
|
||||
line-height: 33px;
|
||||
}
|
||||
|
||||
::v-deep .el-button {
|
||||
margin-top: 0;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,376 @@
|
|||
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="topbox">
|
||||
<div
|
||||
v-for="(item, index) in topList"
|
||||
:key="index"
|
||||
class="levelList_i"
|
||||
:class="tabActive == item.id ? 'act' : ''"
|
||||
@click.prevent="handleLink(item.id)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main">
|
||||
<div v-show="tabActive == 0">
|
||||
<div class="tit">基本信息</div>
|
||||
<div class="xian" />
|
||||
<el-form
|
||||
ref="ruleForm"
|
||||
:model="ruleForm"
|
||||
:rules="rules"
|
||||
label-width="auto"
|
||||
class="demo-ruleForm"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'活动名称'" prop="actName">
|
||||
<el-input
|
||||
v-model="ruleForm.actName"
|
||||
clearable
|
||||
:disabled="lookOver"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="16">
|
||||
<el-form-item :label="'活动说明'" prop="actExplain">
|
||||
<editor
|
||||
ref="sptwEditor"
|
||||
v-model="ruleForm.actExplain"
|
||||
:read-only="lookOver"
|
||||
:min-height="196"
|
||||
:upload-url="uploadImgUrl"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'活动封面'" prop="actCover">
|
||||
<imageUpload v-model="ruleForm.actCover" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'活动时间'" prop="ruleFormTime">
|
||||
<el-date-picker
|
||||
v-model="ruleForm.ruleFormTime"
|
||||
:disabled="lookOver"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'展示时间'" prop="ruleFormTime1">
|
||||
<el-date-picker
|
||||
v-model="ruleForm.ruleFormTime1"
|
||||
:disabled="lookOver"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<UpdateInfo v-show="tabActive == 2" ref="updateInfo" />
|
||||
|
||||
</div>
|
||||
<div v-show="controlType != 4" class="footer">
|
||||
<el-button size="small" class="cancelBtn" @click="$router.back()">
|
||||
{{ '取消' }}</el-button>
|
||||
<el-button size="small" class="sureBtn" @click="submit('ruleForm')">
|
||||
{{ '确认' }}</el-button>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Editor from '@/components/Editor'
|
||||
|
||||
import * as api from '@/api/giftGoods.js'
|
||||
import ImageUpload from '@/components/ImageUpload'
|
||||
import UpdateInfo from '@/views/marketing/shoppingUpgrade/update'
|
||||
import { updateShoppingUpgradeList, getShoppingUpgradeDetail } from '@/api/activity.js'
|
||||
export default {
|
||||
name: 'AddDirectPushUpgrade',
|
||||
components: {
|
||||
ImageUpload,
|
||||
UpdateInfo,
|
||||
Editor
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabActive: 0,
|
||||
topList: [
|
||||
{
|
||||
name: '基本信息',
|
||||
id: 0
|
||||
},
|
||||
{
|
||||
name: '加购升级',
|
||||
id: 2
|
||||
}
|
||||
],
|
||||
uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload',
|
||||
ruleForm: {
|
||||
ruleFormTime: [],
|
||||
ruleFormTime1: [],
|
||||
actName: '',
|
||||
actExplain: '',
|
||||
actCover: ''
|
||||
|
||||
},
|
||||
rules: {
|
||||
actName: [
|
||||
{ required: true, message: '请输入活动名称', trigger: 'blur' }
|
||||
],
|
||||
actExplain: [
|
||||
{ required: true, message: '请输入活动说明', trigger: 'blur' }
|
||||
],
|
||||
actCover: [
|
||||
{ required: true, message: '请上传活动封面', trigger: 'change' }
|
||||
],
|
||||
ruleFormTime: [
|
||||
{ required: true, message: '请选择活动时间', trigger: 'change' }
|
||||
],
|
||||
ruleFormTime1: [
|
||||
{ required: true, message: '请选择展示时间', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
lookOver: false,
|
||||
gradeList: [],
|
||||
awardsList: [],
|
||||
registList: [],
|
||||
pkId: '',
|
||||
repurchaseCouponsShowList: [],
|
||||
controlType: '',
|
||||
addData: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getData()
|
||||
// (1=新增,2=修改,3=删除)4查看
|
||||
if (
|
||||
this.$route.query.controlType == 4 ||
|
||||
this.$route.query.controlType == 3
|
||||
) {
|
||||
this.lookOver = true
|
||||
} else {
|
||||
this.lookOver = false
|
||||
}
|
||||
this.controlType = this.$route.query.controlType
|
||||
this.pkId = this.$route.query.pkId || ''
|
||||
if (this.pkId) {
|
||||
this.getDetails()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
splitDate(date) {
|
||||
return date.split(' ')[0]
|
||||
},
|
||||
getDetails() {
|
||||
getShoppingUpgradeDetail({
|
||||
pkId: this.pkId
|
||||
})
|
||||
.then((res) => {
|
||||
this.addData = res.data
|
||||
this.$set(this.ruleForm, 'actName', res.data.actName)
|
||||
this.$set(
|
||||
this.ruleForm,
|
||||
'actExplain',
|
||||
res.data.actExplain
|
||||
)
|
||||
this.$set(this.ruleForm, 'actCover', res.data.actCover)
|
||||
this.ruleForm.pkId = res.data.pkId
|
||||
this.ruleForm.actStartDate = res.data.actStartDate
|
||||
this.ruleForm.actEndDate = res.data.actEndDate
|
||||
this.ruleForm.disStartDate = res.data.disStartDate
|
||||
this.ruleForm.disEndDate = res.data.disEndDate
|
||||
const actStartDate = this.splitDate(res.data.actStartDate)
|
||||
const actEndDate = this.splitDate(res.data.actEndDate)
|
||||
const disStartDate = this.splitDate(res.data.disStartDate)
|
||||
const disEndDate = this.splitDate(res.data.disEndDate)
|
||||
this.$set(this.ruleForm, 'ruleFormTime', [
|
||||
actStartDate,
|
||||
actEndDate
|
||||
])
|
||||
this.$set(this.ruleForm, 'ruleFormTime1', [
|
||||
disStartDate,
|
||||
disEndDate
|
||||
])
|
||||
|
||||
this.$refs.updateInfo.initData(
|
||||
this.addData.acAddUpgradeConfigParams || []
|
||||
)
|
||||
})
|
||||
},
|
||||
// 切换tab
|
||||
handleLink(id) {
|
||||
this.tabActive = id
|
||||
},
|
||||
// 单选
|
||||
|
||||
changeTime(val) {
|
||||
this.ruleForm.actStartDate = val[0]
|
||||
this.ruleForm.actEndDate = val[1]
|
||||
},
|
||||
changeTime1(val) {
|
||||
this.ruleForm.disStartDate = val[0]
|
||||
this.ruleForm.disEndDate = val[1]
|
||||
},
|
||||
getData() {
|
||||
api.awardsList().then((res) => {
|
||||
this.awardsList = res.rows
|
||||
})
|
||||
api.gradeList().then((res) => {
|
||||
this.gradeList = res.rows
|
||||
})
|
||||
api.registerPowerState().then((res) => {
|
||||
this.registList = res.data
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
this.$refs['ruleForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
const obj = Object.assign(
|
||||
{},
|
||||
{
|
||||
controlType: this.controlType,
|
||||
activityParam: {
|
||||
...this.ruleForm,
|
||||
actStartDate: this.ruleForm.actStartDate + ' 00:00:00',
|
||||
actEndDate: this.ruleForm.actEndDate + ' 23:59:59',
|
||||
disStartDate: this.ruleForm.disStartDate + ' 00:00:00',
|
||||
disEndDate: this.ruleForm.disEndDate + ' 23:59:59'
|
||||
},
|
||||
acAddUpgradeConfigParam:
|
||||
this.$refs.updateInfo.allData
|
||||
// authorityList: this.$refs.updateInfo.form.waresAuthorityList
|
||||
}
|
||||
)
|
||||
updateShoppingUpgradeList(obj).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message({
|
||||
message: res.msg || '操作成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.$router.back()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
padding: 20px;
|
||||
background: #f9f9f9;
|
||||
font-size: 14px;
|
||||
.main_a {
|
||||
height: calc(100vh - 144px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.main {
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
// height: calc(100vh - 124px);
|
||||
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
}
|
||||
::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.footer {
|
||||
height: 68px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px -3px 20px 0px rgba(204, 204, 204, 0.5);
|
||||
// margin: 0 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.thebtn1 {
|
||||
background: #3181e5;
|
||||
color: #ffffff;
|
||||
padding: 9px 45px;
|
||||
}
|
||||
.thebtn2 {
|
||||
background: #cccccc;
|
||||
color: #ffffff;
|
||||
padding: 9px 45px;
|
||||
}
|
||||
}
|
||||
.tit {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
padding: 0 20px;
|
||||
border-left: 5px solid #c8161d;
|
||||
margin: 20px 0 10px 0;
|
||||
}
|
||||
.xian {
|
||||
height: 1px;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.demo-ruleForm {
|
||||
padding: 20px 0;
|
||||
}
|
||||
::v-deep .el-date-editor--datetimerange {
|
||||
width: auto !important;
|
||||
}
|
||||
.flexed {
|
||||
display: flex;
|
||||
}
|
||||
.flexed_l {
|
||||
margin-right: 20px;
|
||||
}
|
||||
.topbox {
|
||||
align-items: center;
|
||||
padding: 0px 0 15px 0;
|
||||
display: flex;
|
||||
// background: skyblue;
|
||||
.levelList_i {
|
||||
margin-left: 20px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
padding: 0 5px;
|
||||
width: 88px;
|
||||
height: 34px;
|
||||
border-radius: 17px;
|
||||
border: 1px solid #cccccc;
|
||||
font-size: 14px;
|
||||
font-family: MicrosoftYaHei;
|
||||
text-align: center;
|
||||
line-height: 32px;
|
||||
}
|
||||
.act {
|
||||
color: #ffffff;
|
||||
background: #c8161d;
|
||||
}
|
||||
}
|
||||
::v-deep .el-form-item {
|
||||
margin-bottom: 20px !important;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue