Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui into fengtianyangyang
commit
9765310136
|
@ -157,6 +157,6 @@ export default {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 0px;
|
height: 0px;
|
||||||
top: -38px;
|
top: -38px;
|
||||||
left: 339px;
|
left: 352px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
<div class="mb_10">
|
<div class="mb_10">
|
||||||
<Button @click="addParent" icon="md-add">添加一级分类</Button>
|
<Button @click="addParent" icon="md-add">添加一级分类</Button>
|
||||||
</div>
|
</div>
|
||||||
<Table class="table" :load-data="handleLoadData" row-key="id" :loading="loading" :data="tableData"
|
<Table
|
||||||
:columns="columns">
|
class="table"
|
||||||
|
:load-data="handleLoadData"
|
||||||
|
row-key="id"
|
||||||
|
:loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
:columns="columns"
|
||||||
|
>
|
||||||
<template slot="action" slot-scope="scope">
|
<template slot="action" slot-scope="scope">
|
||||||
<Dropdown v-show="scope.row.level == 2" trigger="click">
|
<Dropdown v-show="scope.row.level == 2" trigger="click">
|
||||||
<Button size="small">
|
<Button size="small">
|
||||||
|
@ -13,9 +19,15 @@
|
||||||
<Icon type="ios-arrow-down"></Icon>
|
<Icon type="ios-arrow-down"></Icon>
|
||||||
</Button>
|
</Button>
|
||||||
<DropdownMenu slot="list">
|
<DropdownMenu slot="list">
|
||||||
<DropdownItem @click.native="brandOperation(scope.row)">编辑绑定品牌</DropdownItem>
|
<DropdownItem @click.native="brandOperation(scope.row)"
|
||||||
<DropdownItem @click.native="specOperation(scope.row)">编辑绑定规格</DropdownItem>
|
>编辑绑定品牌</DropdownItem
|
||||||
<DropdownItem @click.native="parameterOperation(scope.row)">编辑绑定参数</DropdownItem>
|
>
|
||||||
|
<DropdownItem @click.native="specOperation(scope.row)"
|
||||||
|
>编辑绑定规格</DropdownItem
|
||||||
|
>
|
||||||
|
<DropdownItem @click.native="parameterOperation(scope.row)"
|
||||||
|
>编辑绑定参数</DropdownItem
|
||||||
|
>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|
||||||
|
@ -27,14 +39,28 @@
|
||||||
</Button>
|
</Button>
|
||||||
<DropdownMenu slot="list">
|
<DropdownMenu slot="list">
|
||||||
<DropdownItem @click.native="edit(scope.row)">编辑</DropdownItem>
|
<DropdownItem @click.native="edit(scope.row)">编辑</DropdownItem>
|
||||||
<DropdownItem v-if="scope.row.deleteFlag == 1" @click.native="enable(scope.row)">启用</DropdownItem>
|
<DropdownItem
|
||||||
<DropdownItem v-if="scope.row.deleteFlag == 0" @click.native="disable(scope.row)">禁用</DropdownItem>
|
v-if="scope.row.deleteFlag == 1"
|
||||||
|
@click.native="enable(scope.row)"
|
||||||
|
>启用</DropdownItem
|
||||||
|
>
|
||||||
|
<DropdownItem
|
||||||
|
v-if="scope.row.deleteFlag == 0"
|
||||||
|
@click.native="disable(scope.row)"
|
||||||
|
>禁用</DropdownItem
|
||||||
|
>
|
||||||
<DropdownItem @click.native="remove(scope.row)">删除</DropdownItem>
|
<DropdownItem @click.native="remove(scope.row)">删除</DropdownItem>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|
||||||
<Button v-show="scope.row.level != 2" type="primary" @click="addChildren(scope.row)" size="small"
|
<Button
|
||||||
icon="md-add" style="margin-right: 5px">添加子分类
|
v-show="scope.row.level != 2"
|
||||||
|
type="primary"
|
||||||
|
@click="addChildren(scope.row)"
|
||||||
|
size="small"
|
||||||
|
icon="md-add"
|
||||||
|
style="margin-right: 5px"
|
||||||
|
>添加子分类
|
||||||
</Button>
|
</Button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -42,18 +68,31 @@
|
||||||
{{ scope.row.commissionRate }}%
|
{{ scope.row.commissionRate }}%
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot="deleteFlag" slot-scope="{row}">
|
<template slot="deleteFlag" slot-scope="{ row }">
|
||||||
<Tag :class="{'ml_10': row.deleteFlag}" :color="row.deleteFlag == false ? 'success' : 'error'">
|
<Tag
|
||||||
{{row.deleteFlag == false ? '正常启用' : '禁用'}}</Tag>
|
:class="{ ml_10: row.deleteFlag }"
|
||||||
|
:color="row.deleteFlag == false ? 'success' : 'error'"
|
||||||
|
>
|
||||||
|
{{ row.deleteFlag == false ? "正常启用" : "禁用" }}</Tag
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
|
|
||||||
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
|
<Modal
|
||||||
|
:title="modalTitle"
|
||||||
|
v-model="modalVisible"
|
||||||
|
:mask-closable="false"
|
||||||
|
:width="500"
|
||||||
|
>
|
||||||
<Form ref="form" :model="formAdd" :label-width="100" :rules="formValidate">
|
<Form ref="form" :model="formAdd" :label-width="100" :rules="formValidate">
|
||||||
<div v-if="showParent">
|
<div v-if="showParent">
|
||||||
<FormItem label="上级分类" prop="parentId">
|
<FormItem label="上级分类" prop="parentId">
|
||||||
{{ parentTitle }}
|
{{ parentTitle }}
|
||||||
<Input v-model="formAdd.parentId" clearable style="width: 100%; display: none" />
|
<Input
|
||||||
|
v-model="formAdd.parentId"
|
||||||
|
clearable
|
||||||
|
style="width: 100%; display: none"
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
<FormItem label="层级" prop="level" style="display: none">
|
<FormItem label="层级" prop="level" style="display: none">
|
||||||
|
@ -63,7 +102,10 @@
|
||||||
<Input v-model="formAdd.name" clearable style="width: 100%" />
|
<Input v-model="formAdd.name" clearable style="width: 100%" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="分类图标" prop="image" v-if="formAdd.level !== 1">
|
<FormItem label="分类图标" prop="image" v-if="formAdd.level !== 1">
|
||||||
<upload-pic-input v-model="formAdd.image" style="width: 100%"></upload-pic-input>
|
<upload-pic-input
|
||||||
|
v-model="formAdd.image"
|
||||||
|
style="width: 100%"
|
||||||
|
></upload-pic-input>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="排序值" prop="sortOrder" style="width: 345px">
|
<FormItem label="排序值" prop="sortOrder" style="width: 345px">
|
||||||
<InputNumber v-model="formAdd.sortOrder"></InputNumber>
|
<InputNumber v-model="formAdd.sortOrder"></InputNumber>
|
||||||
|
@ -72,7 +114,12 @@
|
||||||
<InputNumber v-model="formAdd.commissionRate"></InputNumber>
|
<InputNumber v-model="formAdd.commissionRate"></InputNumber>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="是否启用" prop="deleteFlag">
|
<FormItem label="是否启用" prop="deleteFlag">
|
||||||
<i-switch size="large" v-model="formAdd.deleteFlag" :true-value="0" :false-value="1">
|
<i-switch
|
||||||
|
size="large"
|
||||||
|
v-model="formAdd.deleteFlag"
|
||||||
|
:true-value="0"
|
||||||
|
:false-value="1"
|
||||||
|
>
|
||||||
<span slot="open">启用</span>
|
<span slot="open">启用</span>
|
||||||
<span slot="close">禁用</span>
|
<span slot="close">禁用</span>
|
||||||
</i-switch>
|
</i-switch>
|
||||||
|
@ -84,33 +131,52 @@
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
<Modal :title="modalBrandTitle" v-model="modalBrandVisible" :mask-closable="false" :width="500">
|
<Modal
|
||||||
|
:title="modalBrandTitle"
|
||||||
|
v-model="modalBrandVisible"
|
||||||
|
:mask-closable="false"
|
||||||
|
:width="500"
|
||||||
|
>
|
||||||
<Form ref="brandForm" :model="brandForm" :label-width="100">
|
<Form ref="brandForm" :model="brandForm" :label-width="100">
|
||||||
<Select v-model="brandForm.categoryBrands" filterable multiple>
|
<Select v-model="brandForm.categoryBrands" filterable multiple>
|
||||||
<Option v-for="item in brandWay" :value="item.id" :key="item.id">{{ item.name }}</Option>
|
<Option v-for="item in brandWay" :value="item.id" :key="item.id">{{
|
||||||
|
item.name
|
||||||
|
}}</Option>
|
||||||
</Select>
|
</Select>
|
||||||
</Form>
|
</Form>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<Button type="text" @click="modalBrandVisible = false">取消</Button>
|
<Button type="text" @click="modalBrandVisible = false">取消</Button>
|
||||||
<Button type="primary" :loading="submitLoading" @click="saveCategoryBrand">提交</Button>
|
<Button type="primary" :loading="submitLoading" @click="saveCategoryBrand"
|
||||||
|
>提交</Button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
<Modal :title="modalSpecTitle" v-model="modalSpecVisible" :mask-closable="false" :width="500">
|
<Modal
|
||||||
|
:title="modalSpecTitle"
|
||||||
|
v-model="modalSpecVisible"
|
||||||
|
:mask-closable="false"
|
||||||
|
:width="500"
|
||||||
|
>
|
||||||
<Form ref="specForm" :model="specForm" :label-width="100">
|
<Form ref="specForm" :model="specForm" :label-width="100">
|
||||||
<Select v-model="specForm.categorySpecs" multiple>
|
<Select v-model="specForm.categorySpecs" multiple>
|
||||||
<Option v-for="item in specifications" :value="item.id" :key="item.id" :label="item.specName">
|
<Option
|
||||||
|
v-for="item in specifications"
|
||||||
|
:value="item.id"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.specName"
|
||||||
|
>
|
||||||
</Option>
|
</Option>
|
||||||
</Select>
|
</Select>
|
||||||
</Form>
|
</Form>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<Button type="text" @click="modalSpecVisible = false">取消</Button>
|
<Button type="text" @click="modalSpecVisible = false">取消</Button>
|
||||||
<Button type="primary" :loading="submitLoading" @click="saveCategorySpec">提交</Button>
|
<Button type="primary" :loading="submitLoading" @click="saveCategorySpec"
|
||||||
|
>提交</Button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -170,18 +236,9 @@ export default {
|
||||||
specForm: {}, // 规格数据
|
specForm: {}, // 规格数据
|
||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
formValidate: {
|
formValidate: {
|
||||||
commissionRate: [
|
commissionRate: [regular.REQUIRED, regular.INTEGER],
|
||||||
regular.REQUIRED,
|
name: [regular.REQUIRED, regular.VARCHAR20],
|
||||||
regular.INTEGER
|
sortOrder: [regular.REQUIRED, regular.INTEGER],
|
||||||
],
|
|
||||||
name:[
|
|
||||||
regular.REQUIRED,
|
|
||||||
regular.VARCHAR20,
|
|
||||||
],
|
|
||||||
sortOrder:[
|
|
||||||
regular.REQUIRED,
|
|
||||||
regular.INTEGER
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
|
@ -235,7 +292,6 @@ export default {
|
||||||
//弹出品牌关联框
|
//弹出品牌关联框
|
||||||
brandOperation(v) {
|
brandOperation(v) {
|
||||||
getCategoryBrandListData(v.id).then((res) => {
|
getCategoryBrandListData(v.id).then((res) => {
|
||||||
console.warn(res);
|
|
||||||
this.categoryId = v.id;
|
this.categoryId = v.id;
|
||||||
this.modalBrandTitle = "品牌关联";
|
this.modalBrandTitle = "品牌关联";
|
||||||
this.brandForm.categoryBrands = res.result.map((item) => item.id);
|
this.brandForm.categoryBrands = res.result.map((item) => item.id);
|
||||||
|
@ -277,7 +333,6 @@ export default {
|
||||||
},
|
},
|
||||||
// 添加子分类
|
// 添加子分类
|
||||||
addChildren(v) {
|
addChildren(v) {
|
||||||
console.log(v);
|
|
||||||
this.modalType = 0;
|
this.modalType = 0;
|
||||||
this.modalTitle = "添加子分类";
|
this.modalTitle = "添加子分类";
|
||||||
this.parentTitle = v.name;
|
this.parentTitle = v.name;
|
||||||
|
@ -367,7 +422,6 @@ export default {
|
||||||
|
|
||||||
// 异步手动加载分类名称
|
// 异步手动加载分类名称
|
||||||
handleLoadData(item, callback) {
|
handleLoadData(item, callback) {
|
||||||
console.warn(item);
|
|
||||||
if (item.level == 0) {
|
if (item.level == 0) {
|
||||||
let categoryList = JSON.parse(JSON.stringify(this.categoryList));
|
let categoryList = JSON.parse(JSON.stringify(this.categoryList));
|
||||||
categoryList.forEach((val) => {
|
categoryList.forEach((val) => {
|
||||||
|
@ -384,7 +438,6 @@ export default {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.deepCategoryChildren(item.id, this.categoryList);
|
this.deepCategoryChildren(item.id, this.categoryList);
|
||||||
console.log(this.checkedCategoryChildren);
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
callback(this.checkedCategoryChildren);
|
callback(this.checkedCategoryChildren);
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
@ -420,8 +473,6 @@ export default {
|
||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(this.tableData);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -304,6 +304,7 @@ export default {
|
||||||
loading: true,
|
loading: true,
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
API_Member.delMemberReview(v.id).then((res) => {
|
API_Member.delMemberReview(v.id).then((res) => {
|
||||||
|
this.$Modal.remove();
|
||||||
this.$Message.success("修改成功");
|
this.$Message.success("修改成功");
|
||||||
this.init();
|
this.init();
|
||||||
});
|
});
|
||||||
|
|
|
@ -42,12 +42,7 @@
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="{ row, index }" slot="action">
|
<template slot-scope="{ row, index }" slot="action">
|
||||||
<Button
|
<Button type="error" size="small" @click="delGoods(index, row)">删除 </Button>
|
||||||
type="error"
|
|
||||||
size="small"
|
|
||||||
@click="delGoods(index,row)"
|
|
||||||
>删除
|
|
||||||
</Button>
|
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
<Row type="flex" justify="end" class="mt_10">
|
<Row type="flex" justify="end" class="mt_10">
|
||||||
|
@ -68,244 +63,247 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
seckillGoodsList,
|
seckillGoodsList,
|
||||||
seckillDetail,
|
seckillDetail,
|
||||||
auditApplySeckill,
|
auditApplySeckill,
|
||||||
delSeckillGoods
|
delSeckillGoods,
|
||||||
} from "@/api/promotion.js";
|
} from "@/api/promotion.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
promotionStatus: "", // 活动状态
|
promotionStatus: "", // 活动状态
|
||||||
showModal: false, // modal显隐
|
showModal: false, // modal显隐
|
||||||
openTip: true, // 显示提示
|
openTip: true, // 显示提示
|
||||||
loading: false, // 表单加载状态
|
loading: false, // 表单加载状态
|
||||||
submitLoading: false, // 加载状态
|
submitLoading: false, // 加载状态
|
||||||
searchForm: {
|
searchForm: {
|
||||||
// 搜索框初始化对象
|
// 搜索框初始化对象
|
||||||
pageNumber: 0, // 当前页数
|
pageNumber: 0, // 当前页数
|
||||||
pageSize: 100, // 页面大小
|
pageSize: 10, // 页面大小
|
||||||
|
},
|
||||||
|
total: 0, // 总数
|
||||||
|
selectList: [], // 多选数据
|
||||||
|
selectCount: 0, // 多选计数
|
||||||
|
data: [], // 表单数据
|
||||||
|
columns: [
|
||||||
|
// 表头
|
||||||
|
{
|
||||||
|
title: "活动名称",
|
||||||
|
key: "promotionName",
|
||||||
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
total: 0, // 总数
|
{
|
||||||
selectList: [], // 多选数据
|
title: "活动开始时间",
|
||||||
selectCount: 0, // 多选计数
|
key: "startTime",
|
||||||
data: [], // 表单数据
|
|
||||||
columns: [ // 表头
|
|
||||||
{
|
|
||||||
title: "活动名称",
|
|
||||||
key: "promotionName",
|
|
||||||
minWidth: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "活动开始时间",
|
|
||||||
key: "startTime",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "报名截止时间",
|
|
||||||
slot: "applyEndTime",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "时间场次",
|
|
||||||
slot: "hours",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "活动状态",
|
|
||||||
key: "promotionStatus",
|
|
||||||
minWidth: 80,
|
|
||||||
sortable: false,
|
|
||||||
render: (h, params) => {
|
|
||||||
if (params.row.promotionStatus == "NEW") {
|
|
||||||
return h("div", [
|
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "新建",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.promotionStatus == "START") {
|
|
||||||
return h("div", [
|
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "success",
|
|
||||||
text: "开始",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.promotionStatus == "END") {
|
|
||||||
return h("div", [
|
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "结束",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
} else if (params.row.promotionStatus == "CLOSE") {
|
|
||||||
return h("div", [
|
|
||||||
h("Badge", {
|
|
||||||
props: {
|
|
||||||
status: "error",
|
|
||||||
text: "废弃",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
goodsColumns: [ // 商品表单
|
|
||||||
{
|
|
||||||
title: "商品名称",
|
|
||||||
key: "goodsName",
|
|
||||||
minWidth: 120,
|
|
||||||
tooltip: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "商品价格",
|
|
||||||
slot: "originalPrice",
|
|
||||||
width: 110,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "库存",
|
|
||||||
slot: "quantity",
|
|
||||||
minWidth: 30,
|
|
||||||
width: 90
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "活动价格",
|
|
||||||
slot: "price",
|
|
||||||
width: 100,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "商家名称",
|
|
||||||
key: "storeName",
|
|
||||||
minWidth: 100,
|
|
||||||
tooltip: true
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "活动场次",
|
|
||||||
width: 100,
|
|
||||||
slot: "time",
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: "状态",
|
|
||||||
// slot: "promotionApplyStatus",
|
|
||||||
// width: 90,
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
title: "操作",
|
|
||||||
slot: "action",
|
|
||||||
width: 150,
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
goodsList: [], // 商品列表
|
|
||||||
params: { // 请求参数
|
|
||||||
seckillId: this.$route.query.id,
|
|
||||||
applyStatus: "PASS",
|
|
||||||
failReason: "",
|
|
||||||
ids: "",
|
|
||||||
},
|
},
|
||||||
rules: { // 验证规则
|
{
|
||||||
failReason: [{required: true, message: "请输入拒绝原因"}],
|
title: "报名截止时间",
|
||||||
|
slot: "applyEndTime",
|
||||||
},
|
},
|
||||||
};
|
{
|
||||||
},
|
title: "时间场次",
|
||||||
methods: {
|
slot: "hours",
|
||||||
// 初始化数据
|
},
|
||||||
init() {
|
{
|
||||||
this.getSeckillMsg();
|
title: "活动状态",
|
||||||
},
|
key: "promotionStatus",
|
||||||
// 分页 改变页码
|
minWidth: 80,
|
||||||
changePage(v) {
|
sortable: false,
|
||||||
this.searchForm.pageNumber = v;
|
render: (h, params) => {
|
||||||
this.getDataList();
|
if (params.row.promotionStatus == "NEW") {
|
||||||
this.clearSelectAll();
|
return h("div", [
|
||||||
},
|
h("Badge", {
|
||||||
// 分页 改变页数
|
props: {
|
||||||
changePageSize(v) {
|
status: "error",
|
||||||
this.searchForm.pageNumber = 1;
|
text: "新建",
|
||||||
this.searchForm.pageSize = v;
|
},
|
||||||
this.getDataList();
|
}),
|
||||||
},
|
]);
|
||||||
// 清除选中状态
|
} else if (params.row.promotionStatus == "START") {
|
||||||
clearSelectAll() {
|
return h("div", [
|
||||||
this.$refs.table.selectAll(false);
|
h("Badge", {
|
||||||
},
|
props: {
|
||||||
|
status: "success",
|
||||||
getDataList() {
|
text: "开始",
|
||||||
// 获取商品详情
|
},
|
||||||
this.loading = true;
|
}),
|
||||||
this.searchForm.seckillId = this.$route.query.id;
|
]);
|
||||||
seckillGoodsList(this.searchForm).then((res) => {
|
} else if (params.row.promotionStatus == "END") {
|
||||||
this.loading = false;
|
return h("div", [
|
||||||
if (res.success && res.result) {
|
h("Badge", {
|
||||||
this.goodsList = res.result.records;
|
props: {
|
||||||
this.total = res.result.total;
|
status: "error",
|
||||||
}
|
text: "结束",
|
||||||
});
|
},
|
||||||
},
|
}),
|
||||||
|
]);
|
||||||
getSeckillMsg() {
|
} else if (params.row.promotionStatus == "CLOSE") {
|
||||||
// 获取活动详情
|
return h("div", [
|
||||||
seckillDetail(this.$route.query.id).then((res) => {
|
h("Badge", {
|
||||||
if (res.success && res.result) {
|
props: {
|
||||||
this.data = [];
|
status: "error",
|
||||||
this.data.push(res.result);
|
text: "废弃",
|
||||||
this.promotionStatus = res.result.promotionStatus;
|
},
|
||||||
this.getDataList();
|
}),
|
||||||
}
|
]);
|
||||||
});
|
|
||||||
},
|
|
||||||
delGoods(index, row) {
|
|
||||||
// 删除商品
|
|
||||||
this.$Modal.confirm({
|
|
||||||
title: "确认删除",
|
|
||||||
content: "您确认要删除该商品吗?删除后不可恢复",
|
|
||||||
onOk: () => {
|
|
||||||
const params = {
|
|
||||||
seckillId: row.seckillId,
|
|
||||||
id: row.id
|
|
||||||
}
|
}
|
||||||
delSeckillGoods(params).then(res => {
|
|
||||||
if (res.success) {
|
|
||||||
this.goodsList.splice(index, 1);
|
|
||||||
this.$Message.success("删除成功!");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
});
|
},
|
||||||
|
],
|
||||||
|
goodsColumns: [
|
||||||
|
// 商品表单
|
||||||
|
{
|
||||||
|
title: "商品名称",
|
||||||
|
key: "goodsName",
|
||||||
|
minWidth: 120,
|
||||||
|
tooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "商品价格",
|
||||||
|
slot: "originalPrice",
|
||||||
|
width: 110,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "库存",
|
||||||
|
slot: "quantity",
|
||||||
|
minWidth: 30,
|
||||||
|
width: 90,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "活动价格",
|
||||||
|
slot: "price",
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "商家名称",
|
||||||
|
key: "storeName",
|
||||||
|
minWidth: 100,
|
||||||
|
tooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "活动场次",
|
||||||
|
width: 100,
|
||||||
|
slot: "time",
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// title: "状态",
|
||||||
|
// slot: "promotionApplyStatus",
|
||||||
|
// width: 90,
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
title: "操作",
|
||||||
|
slot: "action",
|
||||||
|
width: 150,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
goodsList: [], // 商品列表
|
||||||
|
params: {
|
||||||
|
// 请求参数
|
||||||
|
seckillId: this.$route.query.id,
|
||||||
|
applyStatus: "PASS",
|
||||||
|
failReason: "",
|
||||||
|
ids: "",
|
||||||
},
|
},
|
||||||
unixDate(time) {
|
rules: {
|
||||||
// 处理报名截止时间
|
// 验证规则
|
||||||
return this.$options.filters.unixToDate(new Date(time) / 1000);
|
failReason: [{ required: true, message: "请输入拒绝原因" }],
|
||||||
},
|
},
|
||||||
unixHours(item) {
|
};
|
||||||
// 处理小时场次
|
},
|
||||||
let hourArr = item.split(",");
|
methods: {
|
||||||
for (let i = 0; i < hourArr.length; i++) {
|
// 初始化数据
|
||||||
hourArr[i] += ":00";
|
init() {
|
||||||
|
this.getSeckillMsg();
|
||||||
|
},
|
||||||
|
// 分页 改变页码
|
||||||
|
changePage(v) {
|
||||||
|
this.searchForm.pageNumber = v;
|
||||||
|
this.getDataList();
|
||||||
|
this.clearSelectAll();
|
||||||
|
},
|
||||||
|
// 分页 改变页数
|
||||||
|
changePageSize(v) {
|
||||||
|
this.searchForm.pageNumber = 1;
|
||||||
|
this.searchForm.pageSize = v;
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
// 清除选中状态
|
||||||
|
clearSelectAll() {
|
||||||
|
this.$refs.table.selectAll(false);
|
||||||
|
},
|
||||||
|
|
||||||
|
getDataList() {
|
||||||
|
// 获取商品详情
|
||||||
|
this.loading = true;
|
||||||
|
this.searchForm.seckillId = this.$route.query.id;
|
||||||
|
seckillGoodsList(this.searchForm).then((res) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (res.success && res.result) {
|
||||||
|
this.goodsList = res.result.records;
|
||||||
|
this.total = res.result.total;
|
||||||
}
|
}
|
||||||
return hourArr;
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
getSeckillMsg() {
|
||||||
|
// 获取活动详情
|
||||||
|
seckillDetail(this.$route.query.id).then((res) => {
|
||||||
|
if (res.success && res.result) {
|
||||||
|
this.data = [];
|
||||||
|
this.data.push(res.result);
|
||||||
|
this.promotionStatus = res.result.promotionStatus;
|
||||||
|
this.getDataList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
delGoods(index, row) {
|
||||||
|
// 删除商品
|
||||||
|
this.$Modal.confirm({
|
||||||
|
title: "确认删除",
|
||||||
|
content: "您确认要删除该商品吗?删除后不可恢复",
|
||||||
|
onOk: () => {
|
||||||
|
const params = {
|
||||||
|
seckillId: row.seckillId,
|
||||||
|
id: row.id,
|
||||||
|
};
|
||||||
|
delSeckillGoods(params).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.goodsList.splice(index, 1);
|
||||||
|
this.$Message.success("删除成功!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
unixDate(time) {
|
||||||
|
// 处理报名截止时间
|
||||||
|
return this.$options.filters.unixToDate(new Date(time) / 1000);
|
||||||
|
},
|
||||||
|
unixHours(item) {
|
||||||
|
// 处理小时场次
|
||||||
|
let hourArr = item.split(",");
|
||||||
|
for (let i = 0; i < hourArr.length; i++) {
|
||||||
|
hourArr[i] += ":00";
|
||||||
}
|
}
|
||||||
|
return hourArr;
|
||||||
},
|
},
|
||||||
mounted() {
|
},
|
||||||
this.init();
|
mounted() {
|
||||||
},
|
this.init();
|
||||||
};
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.operation {
|
.operation {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.reason {
|
.reason {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #2d8cf0;
|
color: #2d8cf0;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,54 +1,58 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
|
<Form
|
||||||
|
ref="formValidate"
|
||||||
|
:label-width="150"
|
||||||
|
label-position="right"
|
||||||
|
:model="formValidate"
|
||||||
|
:rules="ruleValidate"
|
||||||
|
>
|
||||||
<FormItem label="appId" prop="appId">
|
<FormItem label="appId" prop="appId">
|
||||||
<Input class="w200" v-model="formValidate.appId"/>
|
<Input class="w200" v-model="formValidate.appId" />
|
||||||
<p style="color: red">*APP应用 AppID 非必填</p>
|
<p style="color: red">*APP应用 AppID 非必填</p>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="mpAppId" prop="mpAppId">
|
<FormItem label="mpAppId" prop="mpAppId">
|
||||||
<Input class="w200" v-model="formValidate.mpAppId"/>
|
<Input class="w200" v-model="formValidate.mpAppId" />
|
||||||
<p style="color: red">*小程序 AppID 非必填</p>
|
<p style="color: red">*小程序 AppID 非必填</p>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="serviceAppId" prop="serviceAppId">
|
<FormItem label="serviceAppId" prop="serviceAppId">
|
||||||
<Input class="w200" v-model="formValidate.serviceAppId"/>
|
<Input class="w200" v-model="formValidate.serviceAppId" />
|
||||||
<p style="color: red">*服务号 AppID 非必填</p>
|
<p style="color: red">*服务号 AppID 非必填</p>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="mchId" prop="mchId">
|
<FormItem label="mchId" prop="mchId">
|
||||||
<Input class="w200" v-model="formValidate.mchId"/>
|
<Input class="w200" v-model="formValidate.mchId" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="apiKey3" prop="apiKey3">
|
<FormItem label="apiKey3" prop="apiKey3">
|
||||||
<Input v-model="formValidate.apiKey3"/>
|
<Input v-model="formValidate.apiKey3" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="apiclient_cert_p12" class="label-item" prop="apiclient_cert_p12">
|
<FormItem label="apiclient_cert_p12" class="label-item" prop="apiclient_cert_p12">
|
||||||
<Input v-model="formValidate.apiclient_cert_p12"/>
|
<Input v-model="formValidate.apiclient_cert_p12" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="apiclient_cert_pem" prop="apiclient_cert_pem">
|
<FormItem label="apiclient_cert_pem" prop="apiclient_cert_pem">
|
||||||
<Input v-model="formValidate.apiclient_cert_pem"/>
|
<Input v-model="formValidate.apiclient_cert_pem" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="apiclient_key" prop="apiclient_key">
|
<FormItem label="apiclient_key" prop="apiclient_key">
|
||||||
<Input v-model="formValidate.apiclient_key"/>
|
<Input v-model="formValidate.apiclient_key" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem label="serialNumber" prop="serialNumber">
|
<FormItem label="serialNumber" prop="serialNumber">
|
||||||
<Input v-model="formValidate.serialNumber"/>
|
<Input v-model="formValidate.serialNumber" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<div class="label-btns">
|
<div class="label-btns">
|
||||||
<Button type="primary" @click="submit('formValidate')">保存</Button>
|
<Button type="primary" @click="submit('formValidate')">保存</Button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {setSetting} from "@/api/index";
|
import { setSetting } from "@/api/index";
|
||||||
import {handleSubmit} from "../setting/validate";
|
import { handleSubmit } from "../setting/validate";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ruleValidate: {}, // 验证规则
|
ruleValidate: {}, // 验证规则
|
||||||
formValidate: {},// 表单数据
|
formValidate: {}, // 表单数据
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: ["res", "type"],
|
props: ["res", "type"],
|
||||||
|
@ -76,10 +80,9 @@ export default {
|
||||||
init() {
|
init() {
|
||||||
this.res = JSON.parse(this.res);
|
this.res = JSON.parse(this.res);
|
||||||
|
|
||||||
this.$set(this, "formValidate", {...this.res});
|
this.$set(this, "formValidate", { ...this.res });
|
||||||
Object.keys(this.formValidate).forEach((item) => {
|
Object.keys(this.formValidate).forEach((item) => {
|
||||||
if (item.indexOf("pId") < 0) {
|
if (item.indexOf("pId") < 0) {
|
||||||
|
|
||||||
this.ruleValidate[item] = [
|
this.ruleValidate[item] = [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -87,7 +90,6 @@ export default {
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,17 +1,24 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
|
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
|
||||||
<FormItem label="积分比率" prop="money">
|
<FormItem label="消费1元赠送积分" prop="money">
|
||||||
<Input type="number" v-model="formValidate.money">
|
<Input type="number" v-model="formValidate.money">
|
||||||
<span slot="prepend">1积分=</span>
|
<span slot="append">积分</span>
|
||||||
<span slot="append">人民币</span>
|
<!-- <span slot="append">人民币</span>-->
|
||||||
|
</Input>
|
||||||
|
|
||||||
|
</FormItem>
|
||||||
|
<FormItem label="积分抵扣付款" prop="money">
|
||||||
|
<Input type="number" v-model="formValidate.money">
|
||||||
|
<span slot="prepend">积分</span>
|
||||||
|
<span slot="append"> = 1 人民币</span>
|
||||||
</Input>
|
</Input>
|
||||||
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem label="注册账号" prop="register">
|
<FormItem label="注册账号" prop="register">
|
||||||
<Input type="number" v-model="formValidate.register">
|
<Input type="number" v-model="formValidate.register">
|
||||||
<span slot="append">积分</span>
|
<span slot="append">积分</span>
|
||||||
</Input>
|
</Input>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<!-- <FormItem label="登录" class="label-item" prop="login">
|
<!-- <FormItem label="登录" class="label-item" prop="login">
|
||||||
|
@ -24,26 +31,28 @@
|
||||||
|
|
||||||
<FormItem label="每日签到积分" prop="signIn">
|
<FormItem label="每日签到积分" prop="signIn">
|
||||||
<Input type="number" v-model="formValidate.signIn">
|
<Input type="number" v-model="formValidate.signIn">
|
||||||
<span slot="append">积分</span>
|
<span slot="append">积分</span>
|
||||||
</Input>
|
</Input>
|
||||||
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="订单评价赠送积分" prop="comment">
|
<FormItem label="订单评价赠送积分" prop="comment">
|
||||||
<Input type="number" v-model="formValidate.comment">
|
<Input type="number" v-model="formValidate.comment">
|
||||||
<span slot="append">积分</span>
|
<span slot="append">积分</span>
|
||||||
</Input>
|
</Input>
|
||||||
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem class="label-item" v-for="(point,index) in formValidate.pointSettingItems" :key="index" :label="'签到设置'+(index+1)">
|
<FormItem class="label-item" v-for="(point,index) in formValidate.pointSettingItems" :key="index"
|
||||||
|
:label="'签到设置'+(index+1)">
|
||||||
<div class="label-item">
|
<div class="label-item">
|
||||||
|
|
||||||
<InputNumber :min="1" v-model="point.day"></InputNumber>
|
<InputNumber :min="1" v-model="point.day"></InputNumber>
|
||||||
|
|
||||||
<InputNumber :min="0" v-model="point.point"></InputNumber>
|
<InputNumber :min="0" v-model="point.point"></InputNumber>
|
||||||
|
|
||||||
<Button ghost type="error" @click="delSign(point,index)">删除</Button>
|
<Button ghost type="error" @click="delSign(point,index)">删除</Button>
|
||||||
<span class="ml_10">签到<span class="theme_color">{{point.day}}</span>天,赠送<span class="theme_color">{{point.point}}</span>积分</span>
|
<span class="ml_10">签到<span class="theme_color">{{ point.day }}</span>天,赠送<span
|
||||||
|
class="theme_color">{{ point.point }}</span>积分</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
@ -58,8 +67,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { setSetting } from "@/api/index";
|
import {setSetting} from "@/api/index";
|
||||||
import { handleSubmit } from "./validate";
|
import {handleSubmit} from "./validate";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -101,7 +111,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.formValidate.pointSettingItems.push({
|
this.formValidate.pointSettingItems.push({
|
||||||
point: "0",
|
point: "0",
|
||||||
day: this.formValidate.pointSettingItems.length ,
|
day: this.formValidate.pointSettingItems.length,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 实例化数据
|
// 实例化数据
|
||||||
|
@ -114,7 +124,7 @@ export default {
|
||||||
this.res[item] += "";
|
this.res[item] += "";
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$set(this, "formValidate", { ...this.res });
|
this.$set(this, "formValidate", {...this.res});
|
||||||
|
|
||||||
Object.keys(this.formValidate).forEach((item) => {
|
Object.keys(this.formValidate).forEach((item) => {
|
||||||
this.ruleValidate[item] = [
|
this.ruleValidate[item] = [
|
||||||
|
@ -150,22 +160,27 @@ export default {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .ivu-input-number:nth-last-of-type(1) {
|
> .ivu-input-number:nth-last-of-type(1) {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .ivu-input {
|
> .ivu-input {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .ivu-input {
|
/deep/ .ivu-input {
|
||||||
width: 70px !important;
|
width: 70px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ivu-input-wrapper {
|
.ivu-input-wrapper {
|
||||||
width: 70px;
|
width: 70px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-btns {
|
.label-btns {
|
||||||
/deep/ .ivu-btn {
|
/deep/ .ivu-btn {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
|
Loading…
Reference in New Issue