Merge branch 'bd-dev' of 47.94.45.65:angelo/web-base-admin into bd-test
This commit is contained in:
commit
69e6ea1c9d
|
@ -354,7 +354,7 @@ export function lotteryRuleConfigSubmit(data) {
|
|||
// 直推赠送
|
||||
export function directRuleConfigSubmit(data) {
|
||||
return request({
|
||||
url: '/sale/manage/recommend/submit',
|
||||
url: '/sale/manage/recommend/directPushUpgrade',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
|
|
@ -2004,15 +2004,15 @@ export const constantRoutes = [
|
|||
},
|
||||
|
||||
{
|
||||
path: 'directGifts',
|
||||
name: 'DirectGifts',
|
||||
path: 'directUpgrade',
|
||||
name: 'DirectUpgrade',
|
||||
component: ParentView,
|
||||
children: [
|
||||
{
|
||||
path: 'directGiftsList',
|
||||
name: 'DirectGiftsList',
|
||||
path: 'directUpgradeList',
|
||||
name: 'DirectUpgradeList',
|
||||
component: () => import('@/views/marketing/directGifts/index'),
|
||||
meta: { title: '直推赠送' }
|
||||
meta: { title: '直推升级' }
|
||||
},
|
||||
{
|
||||
path: 'addDirect',
|
||||
|
|
|
@ -68,69 +68,6 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="'目标用户群体'" required>
|
||||
<div class="flexed">
|
||||
<el-checkbox
|
||||
v-model="ruleForm.checked1"
|
||||
class="flexed_l"
|
||||
:disabled="lookOver"
|
||||
@change="getCheckTit($event, 1)"
|
||||
>{{ '注册等级' }}</el-checkbox>
|
||||
<el-checkbox-group
|
||||
v-model="ruleForm.levelList"
|
||||
:disabled="lookOver"
|
||||
@change="getCheck"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="item in gradeList"
|
||||
:key="item.pkId"
|
||||
:label="item.pkId"
|
||||
>{{ item.gradeName }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div class="flexed">
|
||||
<el-checkbox
|
||||
v-model="ruleForm.checked2"
|
||||
class="flexed_l"
|
||||
:disabled="lookOver"
|
||||
@change="getCheckTit($event, 2)"
|
||||
>{{ '真实奖衔' }}</el-checkbox>
|
||||
<el-checkbox-group
|
||||
v-model="ruleForm.realList"
|
||||
:disabled="lookOver"
|
||||
@change="getCheck"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="item in awardsList"
|
||||
:key="item.pkId"
|
||||
:label="item.pkId"
|
||||
>{{ item.awardsName }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div class="flexed">
|
||||
<el-checkbox
|
||||
v-model="ruleForm.checked3"
|
||||
class="flexed_l"
|
||||
:disabled="lookOver"
|
||||
@change="getCheckTit($event, 3)"
|
||||
>{{ '权限中心' }}</el-checkbox>
|
||||
<el-checkbox-group
|
||||
v-model="ruleForm.centerList"
|
||||
:disabled="lookOver"
|
||||
@change="getCheck"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="item in registList"
|
||||
:key="item.value"
|
||||
:label="item.value"
|
||||
>{{ item.label }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'活动时间'" prop="ruleFormTime">
|
||||
|
@ -166,12 +103,8 @@
|
|||
</el-form>
|
||||
</div>
|
||||
|
||||
<repurchQuan v-show="tabActive == 1" ref="repurchQuan" />
|
||||
<directUpdata v-show="tabActive == 2" ref="directUpdata" />
|
||||
<directAverage
|
||||
v-show="tabActive == 3"
|
||||
ref="directAverage"
|
||||
/>
|
||||
|
||||
</div>
|
||||
<div v-show="controlType != 4" class="footer">
|
||||
<el-button size="small" class="cancelBtn" @click="$router.back()">
|
||||
|
@ -189,17 +122,12 @@ import Editor from '@/components/Editor'
|
|||
import * as api from '@/api/giftGoods.js'
|
||||
import topBar from '@/components/topBar'
|
||||
import ImageUpload from '@/components/ImageUpload'
|
||||
import repurchQuan from '@/views/marketing/directGifts/repurchQuan'
|
||||
import directUpdata from '@/views/marketing/directGifts/directUpdata'
|
||||
import directAverage from '@/views/marketing/directGifts/directAverage'
|
||||
export default {
|
||||
name: 'GiftGoodsList',
|
||||
name: 'AddDirectPushUpgrade',
|
||||
components: {
|
||||
topBar,
|
||||
ImageUpload,
|
||||
repurchQuan,
|
||||
directUpdata,
|
||||
directAverage,
|
||||
Editor
|
||||
},
|
||||
data() {
|
||||
|
@ -210,17 +138,9 @@ export default {
|
|||
name: '基本信息',
|
||||
id: 0
|
||||
},
|
||||
{
|
||||
name: '复购券',
|
||||
id: 1
|
||||
},
|
||||
{
|
||||
name: '直推升级',
|
||||
id: 2
|
||||
},
|
||||
{
|
||||
name: '复购券均分',
|
||||
id: 3
|
||||
}
|
||||
],
|
||||
uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload',
|
||||
|
@ -245,9 +165,6 @@ export default {
|
|||
actCover: [
|
||||
{ required: true, message: '请上传活动封面', trigger: 'change' }
|
||||
],
|
||||
goalMemberConfigList: [
|
||||
{ required: true, message: '请选择目标用户群体', trigger: 'change' }
|
||||
],
|
||||
ruleFormTime: [
|
||||
{ required: true, message: '请选择活动时间', trigger: 'change' }
|
||||
],
|
||||
|
@ -330,16 +247,10 @@ export default {
|
|||
this.$set(this.ruleForm, 'realList', arr2)
|
||||
this.$set(this.ruleForm, 'centerList', arr3)
|
||||
|
||||
this.$refs.repurchQuan.getPage(
|
||||
this.addData.repurchaseCouponsShowList || ''
|
||||
)
|
||||
this.$refs.directUpdata.getPage(
|
||||
this.addData.recommendUpgradeList || ''
|
||||
)
|
||||
this.$refs.directUpdata.getPages(this.addData.authorityList || '')
|
||||
this.$refs.directAverage.getPage(
|
||||
this.addData.acRecommendSharVO || ''
|
||||
)
|
||||
|
||||
const that = this
|
||||
setTimeout(() => {
|
||||
|
@ -379,12 +290,8 @@ export default {
|
|||
this.$set(this.ruleForm, 'realList', arr2)
|
||||
this.$set(this.ruleForm, 'centerList', arr3)
|
||||
|
||||
this.$refs.repurchQuan.getPage(
|
||||
this.addData.repurchaseCouponsShowList || ''
|
||||
)
|
||||
this.$refs.directUpdata.getPage(this.addData.recommendUpgradeList || '')
|
||||
this.$refs.directUpdata.getPages(this.addData.authorityList || '')
|
||||
this.$refs.directAverage.getPage(this.addData.acRecommendSharVO || '')
|
||||
|
||||
const that = this
|
||||
setTimeout(() => {
|
||||
|
@ -494,11 +401,9 @@ export default {
|
|||
{
|
||||
controlType: this.controlType,
|
||||
activityParam: this.ruleForm,
|
||||
repurchaseCouponsShowList: this.$refs.repurchQuan.allData,
|
||||
recommendUpgradeList:
|
||||
this.$refs.directUpdata.recommendUpgradeList,
|
||||
authorityList: this.$refs.directUpdata.form.waresAuthorityList,
|
||||
acRecommendSharVO: this.$refs.directAverage.allData?.[0] || ''
|
||||
authorityList: this.$refs.directUpdata.form.waresAuthorityList
|
||||
}
|
||||
)
|
||||
api.directRuleConfigSubmit(obj).then((res) => {
|
||||
|
|
|
@ -7,19 +7,22 @@
|
|||
<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"
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="addNewGoods"
|
||||
>{{ '添加' }}
|
||||
</el-button>
|
||||
</th>
|
||||
<th colspan="2" style="padding-bottom: 0; border: 0">
|
||||
<div class="tableFlex">
|
||||
<div class="tableFlex_i"></div>
|
||||
<div class="tableFlex_i" />
|
||||
</div>
|
||||
</th>
|
||||
<th colspan="6" style="padding-bottom: 0; border: 0">
|
||||
|
@ -35,16 +38,15 @@
|
|||
:key="item.pkId"
|
||||
:label="item.gradeName"
|
||||
:value="item.pkId"
|
||||
>
|
||||
</el-option>
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="tableFlex_i">
|
||||
<el-input
|
||||
v-model="plcz.recommendNumber"
|
||||
:placeholder="'推荐数量'"
|
||||
size="medium"
|
||||
v-model="plcz.recommendNumber"
|
||||
></el-input>
|
||||
/>
|
||||
</div>
|
||||
<div class="tableFlex_i">
|
||||
<el-select
|
||||
|
@ -57,37 +59,35 @@
|
|||
:key="item.pkId"
|
||||
:label="item.gradeName"
|
||||
:value="item.pkId"
|
||||
>
|
||||
</el-option>
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
<th colspan="7" style="padding-bottom: 0; border-left: 0">
|
||||
<div class="tableFlex">
|
||||
<div class="tableFlex_i"></div>
|
||||
<div class="tableFlex_i"></div>
|
||||
<div class="tableFlex_i" />
|
||||
<div class="tableFlex_i" />
|
||||
<div class="tableFlex_i">
|
||||
<el-input
|
||||
v-model="plcz.quantity"
|
||||
:placeholder="'赠送数量'"
|
||||
size="medium"
|
||||
v-model="plcz.quantity"
|
||||
></el-input>
|
||||
/>
|
||||
</div>
|
||||
<div class="tableAdd"></div>
|
||||
<div class="tableAdd" />
|
||||
</div>
|
||||
</th>
|
||||
<th colspan="2" style="padding-bottom: 0">
|
||||
<div class="tableFlex">
|
||||
<div class="tableFlex_i">
|
||||
<el-button type="primary" @click="toPlcz" size="mini">{{
|
||||
<el-button type="primary" size="mini" @click="toPlcz">{{
|
||||
'批量操作'
|
||||
}}</el-button>
|
||||
</div>
|
||||
<div class="tableFlex_i">
|
||||
<el-button size="mini" @click="reset">
|
||||
{{ '重置' }}</el-button
|
||||
>
|
||||
{{ '重置' }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
|
@ -95,7 +95,7 @@
|
|||
</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">
|
||||
<div class="tableFlex">
|
||||
|
@ -105,18 +105,18 @@
|
|||
<div class="tableFlex_i">{{ '升级等级' }}</div>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="7" style="padding-bottom: 0">
|
||||
<!-- <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>
|
||||
<div class="tableAdd" />
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2" style="border: 0"></td>
|
||||
</td> -->
|
||||
<td colspan="2" style="border: 0" />
|
||||
</tr>
|
||||
<tr v-for="(item, index) in recommendUpgradeList" :key="index">
|
||||
<td style="border: 0"></td>
|
||||
<td style="border: 0" />
|
||||
<td colspan="2" style="padding-bottom: 0">
|
||||
<div class="tableFlex">
|
||||
<div class="tableFlex_i">
|
||||
|
@ -130,8 +130,7 @@
|
|||
:key="item.pkId"
|
||||
:label="item.gradeName"
|
||||
:value="item.pkId"
|
||||
>
|
||||
</el-option>
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -160,16 +159,15 @@
|
|||
:key="item.pkId"
|
||||
:label="item.gradeName"
|
||||
:value="item.pkId"
|
||||
>
|
||||
</el-option>
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="tableFlex_i">
|
||||
<el-input
|
||||
v-model="item.recommendNumber"
|
||||
:placeholder="'推荐数量'"
|
||||
size="medium"
|
||||
v-model="item.recommendNumber"
|
||||
></el-input>
|
||||
/>
|
||||
</div>
|
||||
<div class="tableFlex_i">
|
||||
<el-select
|
||||
|
@ -182,291 +180,29 @@
|
|||
:key="item.pkId"
|
||||
:label="item.gradeName"
|
||||
:value="item.pkId"
|
||||
>
|
||||
</el-option>
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="7" style="padding-bottom: 0">
|
||||
<div
|
||||
class="tableFlex"
|
||||
v-for="(ctem, cndex) in item.giftConfigList"
|
||||
:key="cndex"
|
||||
>
|
||||
<div class="tableFlex_i">
|
||||
<el-input
|
||||
:placeholder="'请选择赠送产品'"
|
||||
v-model="ctem.productName"
|
||||
@focus="getProduct(index, cndex)"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="tableFlex_i">
|
||||
<el-input
|
||||
disabled
|
||||
size="medium"
|
||||
v-model="ctem.specsName"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="tableFlex_i">
|
||||
<el-input size="medium" v-model="ctem.quantity"></el-input>
|
||||
</div>
|
||||
<div class="tableAdd">
|
||||
<img
|
||||
src="@/assets/images/iconpop.png"
|
||||
@click="reduceProduct(index, cndex)"
|
||||
alt=""
|
||||
/>
|
||||
<img
|
||||
v-if="cndex == item.giftConfigList.length - 1"
|
||||
src="@/assets/images/iconadd.png"
|
||||
@click="addProduct(index)"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tableAddPro" v-show="item.giftConfigList.length == 0">
|
||||
{{ '添加产品' }}
|
||||
<img
|
||||
src="@/assets/images/iconadd.png"
|
||||
@click="addProduct(index)"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2" style="border: 0"></td>
|
||||
|
||||
<td colspan="2" style="border: 0" />
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="teamPz">
|
||||
<div class="tit">{{ '团队配置' }}</div>
|
||||
<div class="xian"></div>
|
||||
<el-form
|
||||
ref="team"
|
||||
:model="form"
|
||||
style="width: 1200px; padding: 0 20px"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-row
|
||||
:gutter="20"
|
||||
v-for="(item, index) in form.waresAuthorityList"
|
||||
:key="index"
|
||||
>
|
||||
<el-col :span="10">
|
||||
<el-form-item :label="'可见类型'">
|
||||
<el-select
|
||||
clearable
|
||||
v-model="item.authorityType"
|
||||
@change="getTeamList(item.authorityType)"
|
||||
>
|
||||
<el-option
|
||||
v-for="cld in xyList"
|
||||
v-show="!(index > 0 && cld.value == 5)"
|
||||
:key="cld.value"
|
||||
:label="cld.label"
|
||||
:value="cld.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col
|
||||
:span="10"
|
||||
v-if="form.waresAuthorityList[index].authorityType != 5"
|
||||
>
|
||||
<el-form-item :label="'团队编号'">
|
||||
<el-input
|
||||
clearable
|
||||
v-model="item.memberCode"
|
||||
:placeholder="'请输入'"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col
|
||||
v-if="
|
||||
form.waresAuthorityList[index].authorityType != 5 &&
|
||||
index !== form.waresAuthorityList.length - 1
|
||||
"
|
||||
:span="4"
|
||||
>
|
||||
<i
|
||||
class="el-icon-remove-outline addIcon"
|
||||
@click="removeTeamPz(index)"
|
||||
></i>
|
||||
</el-col>
|
||||
<el-col
|
||||
v-if="
|
||||
form.waresAuthorityList[index].authorityType != 5 &&
|
||||
index == form.waresAuthorityList.length - 1
|
||||
"
|
||||
:span="4"
|
||||
>
|
||||
<i
|
||||
class="el-icon-circle-plus-outline addIcon"
|
||||
@click="addTeamPz"
|
||||
></i>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!-- <Ggmx ref="ggmxed"></Ggmx> -->
|
||||
</div>
|
||||
<!-- <div class="footer">
|
||||
<el-button size="small"
|
||||
class="thebtn2"> {{ '取消' }}</el-button>
|
||||
<el-button size="small"
|
||||
@click="submit"
|
||||
class="thebtn1"> {{ '确认' }}</el-button>
|
||||
</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="'请输入'"
|
||||
@keyup.enter.native="getDataList"
|
||||
prefix-icon="el-icon-search"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-button type="primary" size="small" @click="getDataList">
|
||||
{{ '搜索' }}</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="height: 10px"></div>
|
||||
<el-table
|
||||
:data="dialogList"
|
||||
ref="multipleTable"
|
||||
style="width: 100%"
|
||||
@select-all="onSelectAll"
|
||||
@select="selected"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
:row-class-name="tableRowClassName"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="productName"
|
||||
:label="'产品名称'"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="productCode"
|
||||
:label="'产品编号'"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="productName"
|
||||
:label="'规格'"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
class="blueCor"
|
||||
v-show="
|
||||
scope.row.selSkuNameList == '' ||
|
||||
scope.row.selSkuNameList == undefined
|
||||
"
|
||||
@click="selSku(scope.row.pkId, scope.$index)"
|
||||
>
|
||||
{{ '选择规格' }}
|
||||
</div>
|
||||
<div
|
||||
class="blueCor"
|
||||
v-show="
|
||||
scope.row.selSkuNameList != '' &&
|
||||
scope.row.selSkuNameList != undefined
|
||||
"
|
||||
@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
|
||||
size="mini"
|
||||
v-model="scope.row.quantity"
|
||||
:min="1"
|
||||
></el-input-number>
|
||||
</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
|
||||
:label="item.typeName"
|
||||
v-for="(item, index) in skuList"
|
||||
:key="index"
|
||||
>
|
||||
<el-radio-group v-model="item.pkProductSku">
|
||||
<el-radio
|
||||
v-for="(ctem, cndex) in item.specsList"
|
||||
@change="getCheckBox(item.pkId, item.specsName)"
|
||||
:key="ctem.pkId"
|
||||
:label="ctem.pkId"
|
||||
>{{ 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 * as pro from "@/api/product.js";
|
||||
import topBar from "@/components/topBar";
|
||||
import ImageUpload from "@/components/ImageUpload";
|
||||
import * as api from '@/api/giftGoods.js'
|
||||
import * as pro from '@/api/product.js'
|
||||
import topBar from '@/components/topBar'
|
||||
import ImageUpload from '@/components/ImageUpload'
|
||||
export default {
|
||||
components: {
|
||||
topBar,
|
||||
ImageUpload,
|
||||
ImageUpload
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -474,247 +210,247 @@ export default {
|
|||
ggVisible: false,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
pageSize: 50
|
||||
},
|
||||
form: {
|
||||
waresAuthorityList: [
|
||||
{
|
||||
authorityType: 5,
|
||||
memberCode: "",
|
||||
},
|
||||
],
|
||||
memberCode: ''
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
total: 0,
|
||||
moren: "setGiftGoodsInfo",
|
||||
allData: [], //全部数据
|
||||
areaList: [], //全部专区
|
||||
isArea: "",
|
||||
moren: 'setGiftGoodsInfo',
|
||||
allData: [], // 全部数据
|
||||
areaList: [], // 全部专区
|
||||
isArea: '',
|
||||
plcz: {},
|
||||
select: {}, //产品筛选
|
||||
dialogList: [], //产品数组
|
||||
selectData: [], //选中
|
||||
skuList: [], //规格数组
|
||||
gradeList: [], //规格数组
|
||||
selSkuList: "",
|
||||
selSkuNameList: "",
|
||||
selIndex: "",
|
||||
showCndex: "",
|
||||
showIndex: "",
|
||||
select: {}, // 产品筛选
|
||||
dialogList: [], // 产品数组
|
||||
selectData: [], // 选中
|
||||
skuList: [], // 规格数组
|
||||
gradeList: [], // 规格数组
|
||||
selSkuList: '',
|
||||
selSkuNameList: '',
|
||||
selIndex: '',
|
||||
showCndex: '',
|
||||
showIndex: '',
|
||||
pageData: {},
|
||||
recommendUpgradeList: [],
|
||||
xyList: [],
|
||||
};
|
||||
xyList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getData();
|
||||
this.getData()
|
||||
// 血缘关系
|
||||
this.getXYList();
|
||||
this.getXYList()
|
||||
},
|
||||
methods: {
|
||||
addTeamPz() {
|
||||
this.form.waresAuthorityList.push({
|
||||
kjlx: "",
|
||||
teamOrder: "",
|
||||
});
|
||||
kjlx: '',
|
||||
teamOrder: ''
|
||||
})
|
||||
},
|
||||
removeTeamPz(index) {
|
||||
this.form.waresAuthorityList.splice(index, 1);
|
||||
this.form.waresAuthorityList.splice(index, 1)
|
||||
},
|
||||
getXYList() {
|
||||
pro.getEWaresPermissionTypeList().then((res) => {
|
||||
console.log(
|
||||
"%c [ res ]-451",
|
||||
"font-size:13px; background:#73d160; color:#b7ffa4;",
|
||||
'%c [ res ]-451',
|
||||
'font-size:13px; background:#73d160; color:#b7ffa4;',
|
||||
res
|
||||
);
|
||||
this.xyList = res.data;
|
||||
});
|
||||
)
|
||||
this.xyList = res.data
|
||||
})
|
||||
},
|
||||
getTeamList(val) {
|
||||
if (val == 5) {
|
||||
this.form.waresAuthorityList = [
|
||||
{
|
||||
authorityType: 5,
|
||||
memberCode: "",
|
||||
},
|
||||
];
|
||||
memberCode: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
getPages(allData) {
|
||||
if (allData != "") {
|
||||
this.form.waresAuthorityList = allData;
|
||||
if (allData != '') {
|
||||
this.form.waresAuthorityList = allData
|
||||
}
|
||||
},
|
||||
getPage(allData) {
|
||||
if (allData != "") {
|
||||
if (allData != '') {
|
||||
allData.forEach((item) => {
|
||||
if (!item.giftConfigList) {
|
||||
item.giftConfigList = [];
|
||||
item.giftConfigList = []
|
||||
}
|
||||
});
|
||||
this.recommendUpgradeList = allData;
|
||||
})
|
||||
this.recommendUpgradeList = allData
|
||||
console.log(
|
||||
"%c [ this.recommendUpgradeList ]-382",
|
||||
"font-size:13px; background:#5c5250; color:#a09694;",
|
||||
'%c [ this.recommendUpgradeList ]-382',
|
||||
'font-size:13px; background:#5c5250; color:#a09694;',
|
||||
this.recommendUpgradeList
|
||||
);
|
||||
)
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
api.gradeList().then((res) => {
|
||||
this.gradeList = res.rows;
|
||||
});
|
||||
this.gradeList = res.rows
|
||||
})
|
||||
},
|
||||
sureSku() {
|
||||
this.$set(this.dialogList[this.selIndex], "selSkuList", this.selSkuList);
|
||||
this.$set(this.dialogList[this.selIndex], 'selSkuList', this.selSkuList)
|
||||
this.$set(
|
||||
this.dialogList[this.selIndex],
|
||||
"selSkuNameList",
|
||||
'selSkuNameList',
|
||||
this.selSkuNameList
|
||||
);
|
||||
this.ggVisible = false;
|
||||
)
|
||||
this.ggVisible = false
|
||||
},
|
||||
sureProduct() {
|
||||
if (this.selectData.length == 0) {
|
||||
this.$message({
|
||||
message: '请选择产品',
|
||||
type: "warning",
|
||||
});
|
||||
return false;
|
||||
type: 'warning'
|
||||
})
|
||||
return false
|
||||
} else {
|
||||
this.recommendUpgradeList[this.showIndex].giftConfigList[
|
||||
this.showCndex
|
||||
].pkProduct = this.selectData.pkId;
|
||||
].pkProduct = this.selectData.pkId
|
||||
|
||||
this.recommendUpgradeList[this.showIndex].giftConfigList[
|
||||
this.showCndex
|
||||
].productName = this.selectData.productName;
|
||||
].productName = this.selectData.productName
|
||||
|
||||
this.recommendUpgradeList[this.showIndex].giftConfigList[
|
||||
this.showCndex
|
||||
].specsName = this.selectData.selSkuNameList;
|
||||
].specsName = this.selectData.selSkuNameList
|
||||
|
||||
this.recommendUpgradeList[this.showIndex].giftConfigList[
|
||||
this.showCndex
|
||||
].specsNameId = this.selectData.selSkuList;
|
||||
].specsNameId = this.selectData.selSkuList
|
||||
|
||||
this.recommendUpgradeList[this.showIndex].giftConfigList[
|
||||
this.showCndex
|
||||
].quantity = this.selectData.quantity;
|
||||
this.handleClose();
|
||||
this.$forceUpdate();
|
||||
].quantity = this.selectData.quantity
|
||||
this.handleClose()
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
toPlcz() {
|
||||
this.recommendUpgradeList.forEach((stem) => {
|
||||
stem.giftConfigList.forEach((ctem) => {
|
||||
ctem.quantity = this.plcz.quantity;
|
||||
stem.pkRecommendGrade = this.plcz.pkRecommendGrade;
|
||||
stem.recommendNumber = this.plcz.recommendNumber;
|
||||
stem.pkUpgradeGrade = this.plcz.pkUpgradeGrade;
|
||||
});
|
||||
});
|
||||
ctem.quantity = this.plcz.quantity
|
||||
stem.pkRecommendGrade = this.plcz.pkRecommendGrade
|
||||
stem.recommendNumber = this.plcz.recommendNumber
|
||||
stem.pkUpgradeGrade = this.plcz.pkUpgradeGrade
|
||||
})
|
||||
})
|
||||
},
|
||||
reset() {
|
||||
this.plcz = {};
|
||||
this.plcz = {}
|
||||
},
|
||||
getCheckBox() {
|
||||
let arr1 = [],
|
||||
arr2 = [];
|
||||
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);
|
||||
arr1.push(ctem.pkId)
|
||||
arr2.push(ctem.specsName)
|
||||
}
|
||||
});
|
||||
});
|
||||
this.selSkuList = arr1.join(",");
|
||||
this.selSkuNameList = arr2.join(",");
|
||||
})
|
||||
})
|
||||
this.selSkuList = arr1.join(',')
|
||||
this.selSkuNameList = arr2.join(',')
|
||||
},
|
||||
setArea(val) {
|
||||
this.isArea = val;
|
||||
this.isArea = val
|
||||
},
|
||||
handleClose() {
|
||||
this.selectData = [];
|
||||
this.dialogVisible = false;
|
||||
this.selectData = []
|
||||
this.dialogVisible = false
|
||||
},
|
||||
handleCloseGg() {
|
||||
this.ggVisible = false;
|
||||
this.ggVisible = false
|
||||
},
|
||||
getProduct(index, cndex) {
|
||||
this.showIndex = index;
|
||||
this.showCndex = cndex;
|
||||
this.getDataList();
|
||||
this.dialogVisible = true;
|
||||
this.showIndex = index
|
||||
this.showCndex = cndex
|
||||
this.getDataList()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
addProduct(index, sndex) {
|
||||
this.recommendUpgradeList[index].giftConfigList.push({
|
||||
pkProduct: "",
|
||||
productName: "",
|
||||
specsName: "",
|
||||
specsNameId: "",
|
||||
quantity: "",
|
||||
});
|
||||
this.$forceUpdate();
|
||||
pkProduct: '',
|
||||
productName: '',
|
||||
specsName: '',
|
||||
specsNameId: '',
|
||||
quantity: ''
|
||||
})
|
||||
this.$forceUpdate()
|
||||
},
|
||||
reduceProduct(index, cndex) {
|
||||
this.recommendUpgradeList[index].giftConfigList.splice(cndex, 1);
|
||||
this.$forceUpdate();
|
||||
this.recommendUpgradeList[index].giftConfigList.splice(cndex, 1)
|
||||
this.$forceUpdate()
|
||||
},
|
||||
addNewGoods() {
|
||||
this.recommendUpgradeList.push({
|
||||
pkSettleGrade: "",
|
||||
pkRecommendGrade: "",
|
||||
recommendNumber: "",
|
||||
pkUpgradeGrade: "",
|
||||
pkSettleGrade: '',
|
||||
pkRecommendGrade: '',
|
||||
recommendNumber: '',
|
||||
pkUpgradeGrade: '',
|
||||
giftConfigList: [
|
||||
{
|
||||
pkProduct: "",
|
||||
productName: "",
|
||||
specsName: "",
|
||||
specsNameId: "",
|
||||
quantity: "",
|
||||
},
|
||||
],
|
||||
});
|
||||
pkProduct: '',
|
||||
productName: '',
|
||||
specsName: '',
|
||||
specsNameId: '',
|
||||
quantity: ''
|
||||
}
|
||||
]
|
||||
})
|
||||
},
|
||||
selSku(pkId, index) {
|
||||
this.selIndex = index;
|
||||
this.selIndex = index
|
||||
api
|
||||
.getProductSpecs({
|
||||
pkProduct: pkId,
|
||||
pkProduct: pkId
|
||||
})
|
||||
.then((res) => {
|
||||
let arr1 = [],
|
||||
arr2 = [];
|
||||
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(",");
|
||||
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;
|
||||
});
|
||||
this.skuList = res.data
|
||||
this.ggVisible = true
|
||||
})
|
||||
},
|
||||
getDataList() {
|
||||
api
|
||||
.getProductAll(
|
||||
Object.assign({ isPutOn: 0 }, this.queryParams, this.select, {
|
||||
isExistSpecs: 1,
|
||||
isExistSpecs: 1
|
||||
})
|
||||
)
|
||||
.then((res) => {
|
||||
res.rows.forEach((item) => {
|
||||
item.quantity = 1;
|
||||
});
|
||||
this.dialogList = res.rows;
|
||||
this.total = res.total;
|
||||
});
|
||||
item.quantity = 1
|
||||
})
|
||||
this.dialogList = res.rows
|
||||
this.total = res.total
|
||||
})
|
||||
},
|
||||
// submit() {
|
||||
// let obj = Object.assign({}, this.pageData, {
|
||||
|
@ -737,32 +473,32 @@ export default {
|
|||
// })
|
||||
// },
|
||||
onSelectAll() {
|
||||
this.$refs.multipleTable.clearSelection();
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
},
|
||||
selected(selection, row) {
|
||||
// 清除 所有勾选项
|
||||
this.$refs.multipleTable.clearSelection();
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
// 当表格数据都没有被勾选的时候 就返回
|
||||
// 主要用于将当前勾选的表格状态清除
|
||||
if (selection.length == 0) return;
|
||||
this.$refs.multipleTable.toggleRowSelection(row, true);
|
||||
this.selectData = row;
|
||||
if (selection.length == 0) return
|
||||
this.$refs.multipleTable.toggleRowSelection(row, true)
|
||||
this.selectData = row
|
||||
},
|
||||
// 表格的选中 可以获得当前选中的数据
|
||||
selectionChange(val) {
|
||||
// 将选中的数据存储起来
|
||||
this.selectData = val;
|
||||
this.selectData = val
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 == 1) {
|
||||
return "warning-row";
|
||||
return 'warning-row'
|
||||
} else if (rowIndex % 2 == 0) {
|
||||
return "success-row";
|
||||
return 'success-row'
|
||||
}
|
||||
return "";
|
||||
},
|
||||
},
|
||||
};
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -6,147 +6,185 @@
|
|||
-->
|
||||
<template>
|
||||
<div class="page">
|
||||
<topBar v-if="topList.length > 0"
|
||||
:topList="topList"
|
||||
:moren="moren"></topBar>
|
||||
<topBar
|
||||
v-if="topList.length > 0"
|
||||
:top-list="topList"
|
||||
:moren="moren"
|
||||
/>
|
||||
<div class="main">
|
||||
<div class="form_all">
|
||||
<el-form ref="select"
|
||||
<el-form
|
||||
ref="select"
|
||||
:model="select"
|
||||
label-width="auto">
|
||||
label-width="auto"
|
||||
>
|
||||
<el-row :gutter="40">
|
||||
<!-- 一层 -->
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'活动名称'">
|
||||
<el-input clearable
|
||||
v-model="select.actName"></el-input>
|
||||
<el-input
|
||||
v-model="select.actName"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'活动状态'">
|
||||
<el-select clearable
|
||||
<el-select
|
||||
v-model="select.activityStatus"
|
||||
clearable
|
||||
:placeholder="'请选择'"
|
||||
v-model="select.activityStatus">
|
||||
<el-option v-for="item in actStatus"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in actStatus"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'开始日期'">
|
||||
<el-date-picker v-model="creationTime"
|
||||
@change="changeTime"
|
||||
<el-date-picker
|
||||
v-model="creationTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'">
|
||||
</el-date-picker>
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'结束日期'">
|
||||
<el-date-picker v-model="creationTime1"
|
||||
@change="changeTime1"
|
||||
<el-date-picker
|
||||
v-model="creationTime1"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'">
|
||||
</el-date-picker>
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'创建日期'">
|
||||
<el-date-picker v-model="creationTime2"
|
||||
@change="changeTime2"
|
||||
<el-date-picker
|
||||
v-model="creationTime2"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'">
|
||||
</el-date-picker>
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime2"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary"
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="getDataList"
|
||||
> {{ '搜索' }}</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
@click="getDataList"> {{ '搜索' }}</el-button>
|
||||
<el-button size="small"
|
||||
class="resetBtn"
|
||||
@click="reset"> {{ '重置' }}</el-button>
|
||||
@click="reset"
|
||||
> {{ '重置' }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="main_a">
|
||||
<div class="mainbtn">
|
||||
<el-button size="small"
|
||||
@click="openDig"
|
||||
<el-button
|
||||
v-hasButtons="['directAdd']"
|
||||
class="addBtn">{{'添加'}}</el-button>
|
||||
<el-button size="small"
|
||||
@click="handleExport"
|
||||
size="small"
|
||||
class="addBtn"
|
||||
@click="openDig"
|
||||
>{{ '添加' }}</el-button>
|
||||
<el-button
|
||||
v-hasButtons="['directExport']"
|
||||
class="exportBtn"> {{ '导出' }}</el-button>
|
||||
size="small"
|
||||
class="exportBtn"
|
||||
@click="handleExport"
|
||||
> {{ '导出' }}</el-button>
|
||||
</div>
|
||||
<div class="maintable">
|
||||
<el-table :data="tableData"
|
||||
<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>
|
||||
<el-table-column align="center"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actName"
|
||||
:label="'活动名称'">
|
||||
</el-table-column>
|
||||
<el-table-column align="center"
|
||||
:label="'活动名称'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actStartDate"
|
||||
:label="'开始日期'">
|
||||
</el-table-column>
|
||||
<el-table-column align="center"
|
||||
:label="'开始日期'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="actEndDate"
|
||||
:label="'结束日期'">
|
||||
</el-table-column>
|
||||
<el-table-column align="center"
|
||||
:label="'结束日期'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="status"
|
||||
:label="'活动状态'">
|
||||
</el-table-column>
|
||||
<el-table-column align="center"
|
||||
:label="'活动状态'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="creationTime"
|
||||
:label="'创建日期'">
|
||||
</el-table-column>
|
||||
<el-table-column align="center"
|
||||
:label="'创建日期'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="time"
|
||||
:label="'操作'"
|
||||
fixed="right">
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-button @click="toFixed(scope.row.pkId, 4)"
|
||||
type="text"
|
||||
<el-button
|
||||
v-hasButtons="['directSee']"
|
||||
type="text"
|
||||
style="color: #48B2FD;"
|
||||
size="small">
|
||||
size="small"
|
||||
@click="toFixed(scope.row.pkId, 4)"
|
||||
>
|
||||
{{ '查看' }}
|
||||
</el-button>
|
||||
<el-button @click="toFixed(scope.row.pkId, 2)"
|
||||
type="text"
|
||||
<el-button
|
||||
v-hasButtons="['directUpdata']"
|
||||
type="text"
|
||||
style="color: #F3A900;"
|
||||
size="small">
|
||||
{{'修改'}}
|
||||
size="small"
|
||||
@click="toFixed(scope.row.pkId, 2)"
|
||||
>
|
||||
{{ '修改' }}
|
||||
</el-button>
|
||||
<el-button @click="toFixed(scope.row.pkId,3)"
|
||||
<el-button
|
||||
v-hasButtons="['directDel']"
|
||||
type="text"
|
||||
size="small"
|
||||
v-hasButtons="['directDel']"
|
||||
style="color: #C8161D">
|
||||
style="color: #C8161D"
|
||||
@click="toFixed(scope.row.pkId,3)"
|
||||
>
|
||||
{{ '删除' }}
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -155,11 +193,13 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<pagination v-show="total > 0"
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getDataList" />
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -169,16 +209,16 @@ import * as api from '@/api/giftGoods.js'
|
|||
export default {
|
||||
name: 'Bzpz',
|
||||
components: {
|
||||
topBar,
|
||||
topBar
|
||||
},
|
||||
filters: {
|
||||
isAgree(val) {
|
||||
if (!val) {
|
||||
return '允许';
|
||||
return '允许'
|
||||
} else {
|
||||
return '禁止';
|
||||
return '禁止'
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -189,27 +229,27 @@ export default {
|
|||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
pageSize: 50
|
||||
},
|
||||
addOrEdit: '',
|
||||
total: 0,
|
||||
dialogVisible: false,
|
||||
tableData: [],
|
||||
loading:false,
|
||||
loading: false,
|
||||
moren: 'directGiftsList',
|
||||
topList: [
|
||||
{
|
||||
name: '直推赠送',
|
||||
path: 'directGiftsList',
|
||||
},
|
||||
path: 'directGiftsList'
|
||||
}
|
||||
],
|
||||
form: {
|
||||
name: '',
|
||||
name: ''
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: '请输入规格类型', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '请输入规格类型', trigger: 'blur' }]
|
||||
},
|
||||
actStatus: [],
|
||||
actStatus: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -219,7 +259,7 @@ export default {
|
|||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
//重置
|
||||
// 重置
|
||||
reset() {
|
||||
this.select = {}
|
||||
this.creationTime = []
|
||||
|
@ -233,16 +273,16 @@ export default {
|
|||
})
|
||||
},
|
||||
changeTime(val) {
|
||||
this.select.startActStartDate = val ? val[0] : "";
|
||||
this.select.endActStartDate = val ? val[1] : "";
|
||||
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] : "";
|
||||
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] : "";
|
||||
this.select.startCreationTime = val ? val[0] : ''
|
||||
this.select.endCreationTime = val ? val[1] : ''
|
||||
},
|
||||
// 点击修改
|
||||
toFixed(id, index) {
|
||||
|
@ -252,9 +292,9 @@ export default {
|
|||
path: 'addDirect',
|
||||
query: {
|
||||
pkId: id,
|
||||
controlType: index,
|
||||
controlType: index
|
||||
// functionType:this.select.functionType
|
||||
},
|
||||
}
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
|
@ -262,7 +302,7 @@ export default {
|
|||
this.$confirm('确认删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
api.activityRemove(id).then((res) => {
|
||||
this.getDataList()
|
||||
|
@ -282,7 +322,7 @@ export default {
|
|||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
type: 'success'
|
||||
})
|
||||
this.dialogVisible = false
|
||||
// 充值数据
|
||||
|
@ -305,8 +345,8 @@ export default {
|
|||
this.$router.push({
|
||||
path: 'addDirect',
|
||||
query: {
|
||||
controlType: 1,
|
||||
},
|
||||
controlType: 1
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -315,7 +355,7 @@ export default {
|
|||
this.loading = true
|
||||
api
|
||||
.directList(
|
||||
Object.assign({}, this.queryParams, this.select, { actType: 13 })
|
||||
Object.assign({}, this.queryParams, this.select, { actType: 30 })
|
||||
)
|
||||
.then((res) => {
|
||||
this.tableData = res.rows
|
||||
|
@ -326,14 +366,14 @@ export default {
|
|||
handleSelectionChange(val) {},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.$confirm( '是否确认导出所有数据项?', '警告', {
|
||||
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
type: 'warning'
|
||||
}).then((_) => {
|
||||
this.download(
|
||||
'activity/manage/recommend/export',
|
||||
Object.assign({},{actType:12}, this.queryParams, this.select),
|
||||
Object.assign({}, { actType: 12 }, this.queryParams, this.select),
|
||||
`${'直推赠送'}${new Date().getTime()}.xlsx`
|
||||
)
|
||||
})
|
||||
|
@ -345,8 +385,8 @@ export default {
|
|||
return 'success-row'
|
||||
}
|
||||
return ''
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
Loading…
Reference in New Issue