添加注释,删除无用代码,bug修改

master
mabo 2021-07-26 18:12:13 +08:00
parent df9ea021b3
commit 87980277bf
38 changed files with 418 additions and 3550 deletions

View File

@ -192,12 +192,6 @@ export const otherRouter = {
name: "edit-platform-coupon",
component: () => import("@/views/promotion/coupon/couponPublish.vue")
},
{
path: "promotion/platform-coupon-info",
title: "详情",
name: "platform-coupon-info",
component: () => import("@/views/promotion/coupon/couponInfo.vue")
},
{
path: "coupon-activity/add",
title: "添加优惠券活动",
@ -216,12 +210,6 @@ export const otherRouter = {
name: "coupon-activity-info",
component: () => import("@/views/promotion/couponActivity/couponInfo.vue")
},
{
path: "promotion/platform-coupon-info",
title: "详情",
name: "platform-coupon-activity",
component: () => import("@/views/promotion/coupon/couponInfo.vue")
},
{
path: "promotion/manager-pintuan",
title: "平台拼团",

View File

@ -17,12 +17,11 @@
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search">搜索</Button>
</Form>
</Row>
<Row class="operation padding-row">
<Row class="operation padding-row" v-if="!selectedMember">
<Button @click="addMember" type="primary">添加会员</Button>
</Row>
<Table :loading="loading" border :columns="columns" :data="data" ref="table">
</Table>
<Table :loading="loading" border :columns="columns" class="mt_10" :data="data" ref="table"></Table>
<Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
show-total show-elevator show-sizer></Page>
@ -43,29 +42,20 @@
<Input type="password" password v-model="addMemberForm.password" maxlength="20" placeholder="请输入会员密码" />
</FormItem>
</Form>
<div slot="footer">
<Button @click="addFlag = false">
取消
</Button>
<Button type="primary" :loading="handleAddLoading" @click="addMemberSubmit">
确定
</Button>
<Button @click="addFlag = false">取消</Button>
<Button type="primary" :loading="handleAddLoading" @click="addMemberSubmit"></Button>
</div>
</Modal>
<!-- 修改模态框 -->
<Modal v-model="descFlag" :title="descTitle" @on-ok="handleSubmitModal" width="500">
<Form ref="form" :model="form" :rules="ruleValidate" :label-width="80">
<FormItem label="头像">
<img :src="form.face" class="face" />
<Button type="text" class="upload" @click="
() => {
<Button type="text" class="upload" @click="() => {
this.picModelFlag = true;
this.$refs.ossManage.selectImage = true;
}
">修改
</Button>
}">修改</Button>
<input type="file" style="display: none" id="file" />
</FormItem>
<FormItem label="用户名" prop="name">
@ -93,12 +83,9 @@
<FormItem label="所在地" prop="mail">
<div class="form-item" v-if="!updateRegion">
<Input disabled style="width: 250px" :value="form.region" />
<Button type="text" @click="
() => {
<Button type="text" @click="() => {
this.updateRegion = !this.updateRegion;
}
">修改
</Button>
}">修改</Button>
</div>
<div class="form-item" v-else>
<region style="width: 250px" @selected="selectedRegion" />
@ -121,8 +108,7 @@ import * as RegExp from "@/libs/RegExp.js";
export default {
name: "member",
components: {
region,
ossManage
region, ossManage
},
data() {
return {
@ -372,9 +358,6 @@ export default {
//
changePage(v) {
this.searchForm.pageNumber = v;
//
//selectedMember
this.getData();
},
//

View File

@ -1,509 +0,0 @@
<template>
<div class="search">
<Card>
<Row class="operation">
<Button @click="add" type="primary" icon="md-add">添加</Button>
<Button @click="disableAll" icon="md-trash">批量禁用</Button>
<Button @click="getDataList" icon="md-refresh">刷新</Button>
<Button type="dashed" @click="openTip = !openTip">{{
openTip ? "关闭提示" : "开启提示"
}}</Button>
</Row>
<Row v-show="openTip">
<Alert show-icon>
已选择 <span class="select-count">{{ selectCount }}</span>
<a class="select-clear" @click="clearSelectAll"></a>
</Alert>
</Row>
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></Table>
<Row type="flex" justify="end" class="mt_10">
<Page
:current="searchForm.pageNumber"
:total="total"
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row>
</Card>
<Modal
:title="modalTitle"
v-model="modalVisible"
:mask-closable="false"
:width="500"
>
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
<FormItem label="名称" prop="name">
<Input v-model="form.name" clearable style="width: 100%" />
</FormItem>
<FormItem label="图片" prop="url">
<upload-pic-input
v-model="form.url"
style="width: 100%"
></upload-pic-input>
</FormItem>
<FormItem label="操作类型" prop="operationType">
<Select
v-model="form.operationType"
placeholder="请选择"
clearable
style="width: 200px"
>
<Option value="NONE">无操作</Option>
<Option value="URL">链接地址</Option>
<Option value="GOODS">商品序号</Option>
<Option value="SHOP">店铺编号</Option>
<Option value="KEYWORD">关键字</Option>
<Option value="CATEGORY">商品分类</Option>
</Select>
</FormItem>
<FormItem label="链接值" prop="sort">
<Input v-model="form.operationUrl" clearable style="width: 100%" />
</FormItem>
<FormItem label="排序" prop="sort">
<InputNumber :max="999" :min="0" v-model="form.sort"></InputNumber>
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
>提交</Button
>
</div>
</Modal>
</div>
</template>
<script>
import {
getFocusData,
saveFocusData,
disableFocus,
enableFocus,
delFocus,
} from "@/api/pages";
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
export default {
name: "mobileFocus",
components: {
uploadPicInput,
},
data() {
return {
openTip: true, //
loading: true, //
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
searchForm: {
//
clientType: "MOBILE", //
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
form: {
//
name: "",
operationType: "",
operationUrl: "",
url: "",
sort: 0,
},
//
formValidate: {
name: [{ required: true, message: "不能为空", trigger: "blur" }],
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
//
{
type: "selection",
width: 60,
align: "center",
},
{
title: "名称",
key: "name",
minWidth: 120,
sortable: false,
},
{
title: "状态",
key: "status",
minWidth: 100,
sortable: false,
render: (h, params) => {
if (params.row.status == "CLOSE") {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "禁用",
},
}),
]);
} else if (params.row.status == "OPEN") {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "启用",
},
}),
]);
}
},
},
{
title: "图片",
key: "url",
minWidth: 120,
sortable: false,
render: (h, params) => {
return h("img", {
attrs: {
src: params.row.url,
alt: "加载图片失败",
},
style: {
cursor: "pointer",
width: "80px",
height: "60px",
margin: "10px 0",
"object-fit": "contain",
},
});
},
},
{
title: "排序",
key: "sort",
minWidth: 120,
sortable: false,
},
{
title: "操作",
key: "action",
align: "center",
width: 200,
render: (h, params) => {
let enableOrDisable = "";
if (params.row.status == "CLOSE") {
enableOrDisable = h(
"Button",
{
props: {
type: "success",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.enable(params.row);
},
},
},
"启用"
);
} else {
enableOrDisable = h(
"Button",
{
props: {
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.disable(params.row);
},
},
},
"禁用"
);
}
return h("div", [
h(
"Button",
{
props: {
type: "primary",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.edit(params.row);
},
},
},
"编辑"
),
h(
"Button",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.remove(params.row);
},
},
},
"删除"
),
enableOrDisable,
]);
},
},
],
data: [], //
total: 0, //
};
},
methods: {
init() {
this.getDataList();
},
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
this.clearSelectAll();
},
changePageSize(v) {
this.searchForm.pageSize = v;
this.getDataList();
},
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
handleReset() {
this.$refs.searchForm.resetFields();
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
//
this.getDataList();
},
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
clearSelectAll() {
this.$refs.table.selectAll(false);
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
getDataList() {
this.loading = true;
//
getFocusData(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
//
//this.data = [
//];
this.total = this.data.length;
this.loading = false;
},
enable(v) {
this.$Modal.confirm({
title: "确认启用",
//
content: "您确认要确认启用 " + v.name + " ?",
loading: true,
onOk: () => {
//
enableFocus(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
disable(v) {
this.$Modal.confirm({
title: "确认禁用",
//
content: "您确认要禁用 " + v.name + " ?",
loading: true,
onOk: () => {
//
disableFocus(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
handleSubmit() {
this.$refs.form.validate((valid) => {
if (valid) {
this.form.ClientType = "MOBILE";
this.submitLoading = true;
if (this.modalType === 0) {
this.form.status = "OPEN";
// id
delete this.form.id;
saveFocusData(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
} else {
//
saveFocusData(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
}
}
});
},
add() {
this.modalType = 0;
this.modalTitle = "添加";
this.$refs.form.resetFields();
delete this.form.id;
this.modalVisible = true;
},
edit(v) {
this.modalType = 1;
this.modalTitle = "编辑";
this.$refs.form.resetFields();
// null""
for (let attr in v) {
if (v[attr] === null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
this.form = data;
this.modalVisible = true;
},
remove(v) {
this.$Modal.confirm({
title: "确认删除",
//
content: "您确认要删除么?",
loading: true,
onOk: () => {
//
delFocus(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
disableAll() {
if (this.selectCount <= 0) {
this.$Message.warning("您还未选择要禁用的数据");
return;
}
this.$Modal.confirm({
title: "确认禁用",
content: "您确认要禁用所选的 " + this.selectCount + " 条数据?",
loading: true,
onOk: () => {
let ids = "";
this.selectList.forEach(function (e) {
ids += e.id + ",";
});
ids = ids.substring(0, ids.length - 1);
//
disableFocus(ids).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("禁用成功");
this.clearSelectAll();
this.getDataList();
}
});
},
});
},
},
mounted() {
this.init();
},
};
</script>
<style lang="scss">
.search {
.operation {
margin-bottom: 2vh;
}
.select-count {
font-weight: 600;
color: #40a9ff;
}
.select-clear {
margin-left: 10px;
}
.page {
margin-top: 2vh;
}
.drop-down {
margin-left: 5px;
}
}
</style>

View File

@ -1,509 +0,0 @@
<template>
<div class="search">
<Card>
<Row class="operation">
<Button @click="add" type="primary" icon="md-add">添加</Button>
<Button @click="disableAll" icon="md-trash">批量禁用</Button>
<Button @click="getDataList" icon="md-refresh">刷新</Button>
<Button type="dashed" @click="openTip = !openTip">{{
openTip ? "关闭提示" : "开启提示"
}}</Button>
</Row>
<Row v-show="openTip">
<Alert show-icon>
已选择 <span class="select-count">{{ selectCount }}</span>
<a class="select-clear" @click="clearSelectAll"></a>
</Alert>
</Row>
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></Table>
<Row type="flex" justify="end" class="mt_10">
<Page
:current="searchForm.pageNumber"
:total="total"
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row>
</Card>
<Modal
:title="modalTitle"
v-model="modalVisible"
:mask-closable="false"
:width="500"
>
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
<FormItem label="名称" prop="name">
<Input v-model="form.name" clearable style="width: 100%" />
</FormItem>
<FormItem label="图片" prop="url">
<upload-pic-input
v-model="form.url"
style="width: 100%"
></upload-pic-input>
</FormItem>
<FormItem label="操作类型" prop="operationType">
<Select
v-model="form.operationType"
placeholder="请选择"
clearable
style="width: 200px"
>
<Option value="NONE">无操作</Option>
<Option value="URL">链接地址</Option>
<Option value="GOODS">商品序号</Option>
<Option value="SHOP">店铺编号</Option>
<Option value="KEYWORD">关键字</Option>
<Option value="CATEGORY">商品分类</Option>
</Select>
</FormItem>
<FormItem label="链接值" prop="sort">
<Input v-model="form.operationUrl" clearable style="width: 100%" />
</FormItem>
<FormItem label="排序" prop="sort">
<InputNumber :max="999" :min="0" v-model="form.sort"></InputNumber>
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
>提交</Button
>
</div>
</Modal>
</div>
</template>
<script>
import {
getFocusData,
saveFocusData,
disableFocus,
enableFocus,
delFocus,
} from "@/api/pages";
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
export default {
name: "pcFocus",
components: {
uploadPicInput,
},
data() {
return {
openTip: true, //
loading: true, //
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
searchForm: {
//
clientType: "PC", //
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
form: {
//
name: "",
operationType: "",
operationUrl: "",
url: "",
sort: 0,
},
//
formValidate: {
name: [{ required: true, message: "不能为空", trigger: "blur" }],
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
//
{
type: "selection",
width: 60,
align: "center",
},
{
title: "名称",
key: "name",
minWidth: 120,
sortable: false,
},
{
title: "状态",
key: "status",
minWidth: 100,
sortable: false,
render: (h, params) => {
if (params.row.status == "CLOSE") {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "禁用",
},
}),
]);
} else if (params.row.status == "OPEN") {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "启用",
},
}),
]);
}
},
},
{
title: "图片",
key: "url",
minWidth: 120,
sortable: false,
render: (h, params) => {
return h("img", {
attrs: {
src: params.row.url,
alt: "加载图片失败",
},
style: {
cursor: "pointer",
width: "80px",
height: "60px",
margin: "10px 0",
"object-fit": "contain",
},
});
},
},
{
title: "排序",
key: "sort",
minWidth: 120,
sortable: false,
},
{
title: "操作",
key: "action",
align: "center",
width: 200,
render: (h, params) => {
let enableOrDisable = "";
if (params.row.status == "CLOSE") {
enableOrDisable = h(
"Button",
{
props: {
type: "success",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.enable(params.row);
},
},
},
"启用"
);
} else {
enableOrDisable = h(
"Button",
{
props: {
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.disable(params.row);
},
},
},
"禁用"
);
}
return h("div", [
h(
"Button",
{
props: {
type: "primary",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.edit(params.row);
},
},
},
"编辑"
),
h(
"Button",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.remove(params.row);
},
},
},
"删除"
),
enableOrDisable,
]);
},
},
],
data: [], //
total: 0, //
};
},
methods: {
init() {
this.getDataList();
},
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
this.clearSelectAll();
},
changePageSize(v) {
this.searchForm.pageSize = v;
this.getDataList();
},
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
handleReset() {
this.$refs.searchForm.resetFields();
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
//
this.getDataList();
},
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
clearSelectAll() {
this.$refs.table.selectAll(false);
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
getDataList() {
this.loading = true;
//
getFocusData(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
//
//this.data = [
//];
this.total = this.data.length;
this.loading = false;
},
enable(v) {
this.$Modal.confirm({
title: "确认启用",
//
content: "您确认要确认启用 " + v.name + " ?",
loading: true,
onOk: () => {
//
enableFocus(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
disable(v) {
this.$Modal.confirm({
title: "确认禁用",
//
content: "您确认要禁用 " + v.name + " ?",
loading: true,
onOk: () => {
//
disableFocus(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
handleSubmit() {
this.$refs.form.validate((valid) => {
if (valid) {
this.form.ClientType = "PC";
this.submitLoading = true;
if (this.modalType === 0) {
this.form.status = "OPEN";
// id
delete this.form.id;
saveFocusData(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
} else {
//
saveFocusData(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
}
}
});
},
add() {
this.modalType = 0;
this.modalTitle = "添加";
this.$refs.form.resetFields();
delete this.form.id;
this.modalVisible = true;
},
edit(v) {
this.modalType = 1;
this.modalTitle = "编辑";
this.$refs.form.resetFields();
// null""
for (let attr in v) {
if (v[attr] === null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
this.form = data;
this.modalVisible = true;
},
remove(v) {
this.$Modal.confirm({
title: "确认删除",
//
content: "您确认要删除么?",
loading: true,
onOk: () => {
//
delFocus(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
disableAll() {
if (this.selectCount <= 0) {
this.$Message.warning("您还未选择要禁用的数据");
return;
}
this.$Modal.confirm({
title: "确认禁用",
content: "您确认要禁用所选的 " + this.selectCount + " 条数据?",
loading: true,
onOk: () => {
let ids = "";
this.selectList.forEach(function (e) {
ids += e.id + ",";
});
ids = ids.substring(0, ids.length - 1);
//
disableFocus(ids).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("禁用成功");
this.clearSelectAll();
this.getDataList();
}
});
},
});
},
},
mounted() {
this.init();
},
};
</script>
<style lang="scss">
.search {
.operation {
margin-bottom: 2vh;
}
.select-count {
font-weight: 600;
color: #40a9ff;
}
.select-clear {
margin-left: 10px;
}
.page {
margin-top: 2vh;
}
.drop-down {
margin-left: 5px;
}
}
</style>

View File

@ -1,474 +0,0 @@
<template>
<div class="search">
<Card>
<Row class="operation">
<Button @click="add" type="primary" icon="md-add">添加</Button>
<Button @click="disableAll" icon="md-trash">批量禁用</Button>
<Button @click="getDataList" icon="md-refresh">刷新</Button>
<Button type="dashed" @click="openTip = !openTip">{{
openTip ? "关闭提示" : "开启提示"
}}</Button>
</Row>
<Row v-show="openTip">
<Alert show-icon>
已选择 <span class="select-count">{{ selectCount }}</span>
<a class="select-clear" @click="clearSelectAll"></a>
</Alert>
</Row>
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></Table>
<Row type="flex" justify="end" class="mt_10">
<Page
:current="searchForm.pageNumber"
:total="total"
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row>
</Card>
<Modal
:title="modalTitle"
v-model="modalVisible"
:mask-closable="false"
:width="500"
>
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
<FormItem label="导航栏名称" prop="navigationName">
<Input v-model="form.navigationName" clearable style="width: 100%" />
</FormItem>
<FormItem label="导航栏链接" prop="url">
<Input v-model="form.url" clearable style="width: 100%" />
</FormItem>
<FormItem label="品牌图标" prop="image">
<upload-pic-input
v-model="form.image"
style="width: 100%"
></upload-pic-input>
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
>提交</Button
>
</div>
</Modal>
</div>
</template>
<script>
import {
save,
getNavigationData,
disableNavigation,
enableNavigation,
delNavigation,
update,
} from "@/api/pages";
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
export default {
name: "mobileNavigation",
components: {
uploadPicInput,
},
data() {
return {
openTip: true, //
loading: true, //
type: "MOBILE", // pc
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
searchForm: {
//
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
form: {
//
navigationName: "",
image: "",
url: "",
},
//
formValidate: {
url: [
{ required: true, message: "导航栏url不能为空", trigger: "blur" },
],
navigationName: [
{ required: true, message: "导航栏不能为空", trigger: "blur" },
],
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
//
{
type: "selection",
width: 60,
align: "center",
},
{
title: "导航名称",
key: "navigationName",
minWidth: 120,
sortable: false,
},
{
title: "状态",
key: "status",
minWidth: 100,
sortable: false,
render: (h, params) => {
if (params.row.status == "CLOSE") {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "禁用",
},
}),
]);
} else if (params.row.status == "OPEN") {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "启用",
},
}),
]);
}
},
},
{
title: "图片",
key: "image",
minWidth: 120,
sortable: false,
render: (h, params) => {
return h("img", {
attrs: {
src: params.row.image,
alt: "加载图片失败",
},
style: {
cursor: "pointer",
width: "80px",
height: "60px",
margin: "10px 0",
"object-fit": "contain",
},
});
},
},
{
title: "排序",
key: "sort",
minWidth: 120,
sortable: false,
},
{
title: "操作",
key: "action",
align: "center",
width: 250,
render: (h, params) => {
console.warn(params.status);
let enableOrDisable = "";
if (params.row.status == "CLOSE") {
enableOrDisable = h(
"Button",
{
props: {
type: "success",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.enable(params.row);
},
},
},
"启用"
);
} else {
enableOrDisable = h(
"Button",
{
props: {
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.disable(params.row);
},
},
},
"禁用"
);
}
return h("div", [
h(
"Button",
{
props: {
type: "primary",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.edit(params.row);
},
},
},
"编辑"
),
h(
"Button",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.del(params.row);
},
},
},
"删除"
),
enableOrDisable,
]);
},
},
],
data: [], //
total: 0, //
};
},
methods: {
init() {
this.getDataList();
},
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
this.clearSelectAll();
},
changePageSize(v) {
this.searchForm.pageSize = v;
this.getDataList();
},
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
handleReset() {
this.$refs.searchForm.resetFields();
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
//
this.getDataList();
},
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
clearSelectAll() {
this.$refs.table.selectAll(false);
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
getDataList() {
this.searchForm.clientType = this.type;
this.loading = true;
//
getNavigationData(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
this.total = this.data.length;
this.loading = false;
},
handleSubmit() {
this.$refs.form.validate((valid) => {
if (valid) {
this.submitLoading = true;
this.form.clientType = this.type;
if (this.modalType === 0) {
// id
delete this.form.id;
save(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
} else {
//
update(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
}
}
});
},
add() {
this.modalType = 0;
this.modalTitle = "添加";
this.$refs.form.resetFields();
delete this.form.id;
this.modalVisible = true;
},
edit(v) {
this.modalType = 1;
this.modalTitle = "编辑";
this.$refs.form.resetFields();
// null""
for (let attr in v) {
if (v[attr] === null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
this.form = data;
this.modalVisible = true;
},
enable(v) {
this.$Modal.confirm({
title: "确认启用",
//
content: "您确认要确认启用 " + v.navigationName + " ?",
loading: true,
onOk: () => {
//
enableNavigation(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
disable(v) {
this.$Modal.confirm({
title: "确认禁用",
//
content: "您确认要禁用 " + v.navigationName + " ?",
loading: true,
onOk: () => {
//
disableNavigation(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
disableAll() {
if (this.selectCount <= 0) {
this.$Message.warning("您还未选择要禁用的数据");
return;
}
this.$Modal.confirm({
title: "确认禁用",
content: "您确认要禁用所选的 " + this.selectCount + " 条数据?",
loading: true,
onOk: () => {
let ids = "";
this.selectList.forEach(function (e) {
ids += e.id + ",";
});
ids = ids.substring(0, ids.length - 1);
//
disableNavigation(ids).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.clearSelectAll();
this.getDataList();
}
});
},
});
},
del(v) {
this.$Modal.confirm({
title: "确认删除",
//
content: "您确认要永久性删除 " + v.navigationName + " ?",
loading: true,
onOk: () => {
//
delNavigation(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
},
mounted() {
this.init();
},
};
</script>

View File

@ -1,439 +0,0 @@
<template>
<div class="search">
<Card>
<Row class="operation">
<Button @click="add" type="primary" icon="md-add">添加</Button>
<Button @click="disableAll" icon="md-trash">批量禁用</Button>
<Button @click="getDataList" icon="md-refresh">刷新</Button>
<Button type="dashed" @click="openTip=!openTip">{{openTip ? "" : ""}}</Button>
</Row>
<Row v-show="openTip">
<Alert show-icon>
已选择 <span class="select-count">{{selectCount}}</span>
<a class="select-clear" @click="clearSelectAll"></a>
</Alert>
</Row>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
@on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
<Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]"
size="small" show-total show-elevator show-sizer></Page>
</Row>
</Card>
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable='false' :width="500">
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
<FormItem label="导航栏名称" prop="navigationName">
<Input v-model="form.navigationName" clearable style="width:100%"/>
</FormItem>
<FormItem label="导航栏链接" prop="url">
<Input v-model="form.url" clearable style="width:100%"/>
</FormItem>
<FormItem label="品牌图标" prop="image">
<upload-pic-input v-model="form.image" style="width:100%"></upload-pic-input>
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible=false"></Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"></Button>
</div>
</Modal>
</div>
</template>
<script>
import {
save,
getNavigationData,
disableNavigation,
enableNavigation,
delNavigation,
update
} from "@/api/pages";
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
export default {
name: "pcNavigation",
components: {
uploadPicInput
},
data() {
return {
openTip: true, //
loading: true, //
type: "PC", // pc
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
searchForm: { //
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
form: { //
navigationName: "",
image: "",
url: "",
},
//
formValidate: {
url: [{required: true, message: "导航栏url不能为空", trigger: "blur"}],
navigationName: [{required: true, message: "导航栏不能为空", trigger: "blur"}],
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
//
{
type: "selection",
width: 60,
align: "center"
},
{
title: "导航名称",
key: "navigationName",
minWidth: 120,
sortable: false,
},
{
title: "状态",
key: "status",
minWidth: 100,
sortable: false,
render: (h, params) => {
if (params.row.status == 'CLOSE') {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "禁用"
}
})
]);
} else if (params.row.status == 'OPEN') {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "启用"
}
})
]);
}
}
},
{
title: "图片",
key: "image",
minWidth: 120,
sortable: false,
render: (h, params) => {
return h("img", {
attrs: {
src: params.row.image,
alt: "加载图片失败"
},
style: {
cursor: "pointer",
width: "80px",
height: "60px",
margin: "10px 0",
"object-fit": "contain"
}
});
}
},
{
title: "排序",
key: "sort",
minWidth: 120,
sortable: false,
},
{
title: "操作",
key: "action",
align: "center",
width: 250,
render: (h, params) => {
console.warn(params.status)
let enableOrDisable = "";
if (params.row.status == "CLOSE") {
enableOrDisable = h(
"Button",
{
props: {
type: "success",
size: "small"
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.enable(params.row);
}
}
},
"启用"
);
} else {
enableOrDisable = h(
"Button",
{
props: {
size: "small"
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.disable(params.row);
}
}
},
"禁用"
);
}
return h("div", [
h(
"Button",
{
props: {
type: "primary",
size: "small"
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.edit(params.row);
}
}
},
"编辑"
),
h(
"Button",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.del(params.row);
}
}
},
"删除"
),
enableOrDisable,
]);
}
}
],
data: [], //
total: 0 //
};
},
methods: {
init() {
this.getDataList();
},
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
this.clearSelectAll();
},
changePageSize(v) {
this.searchForm.pageSize = v;
this.getDataList();
},
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
handleReset() {
this.$refs.searchForm.resetFields();
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
//
this.getDataList();
},
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
clearSelectAll() {
this.$refs.table.selectAll(false);
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
getDataList() {
this.searchForm.clientType = this.type
this.loading = true;
//
getNavigationData(this.searchForm).then(res => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
});
this.total = this.data.length;
this.loading = false;
},
handleSubmit() {
this.$refs.form.validate(valid => {
if (valid) {
this.submitLoading = true;
this.form.clientType = this.type
if (this.modalType === 0) {
// id
delete this.form.id;
save(this.form).then(res => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
} else {
//
update(this.form).then(res => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
}
}
});
},
add() {
this.modalType = 0;
this.modalTitle = "添加";
this.$refs.form.resetFields();
delete this.form.id;
this.modalVisible = true;
},
edit(v) {
this.modalType = 1;
this.modalTitle = "编辑";
this.$refs.form.resetFields();
// null""
for (let attr in v) {
if (v[attr] === null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
this.form = data;
this.modalVisible = true;
},
enable(v){
this.$Modal.confirm({
title: "确认启用",
//
content: "您确认要确认启用 " + v.navigationName + " ?",
loading: true,
onOk: () => {
//
enableNavigation(v.id).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
}
});
},
disable(v) {
this.$Modal.confirm({
title: "确认禁用",
//
content: "您确认要禁用 " + v.navigationName + " ?",
loading: true,
onOk: () => {
//
disableNavigation(v.id).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
}
});
},
disableAll() {
if (this.selectCount <= 0) {
this.$Message.warning("您还未选择要禁用的数据");
return;
}
this.$Modal.confirm({
title: "确认禁用",
content: "您确认要禁用所选的 " + this.selectCount + " 条数据?",
loading: true,
onOk: () => {
let ids = "";
this.selectList.forEach(function (e) {
ids += e.id + ",";
});
ids = ids.substring(0, ids.length - 1);
//
disableNavigation(ids).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.clearSelectAll();
this.getDataList();
}
});
}
});
},
del(v) {
this.$Modal.confirm({
title: "确认删除",
//
content: "您确认要永久性删除 " + v.navigationName + " ?",
loading: true,
onOk: () => {
//
delNavigation(v.id).then(res => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
}
});
}
},
mounted() {
this.init();
}
};
</script>

View File

@ -1,65 +0,0 @@
.own-space {
.own-space-new {
.ivu-card-body {
padding: 16px 16px 16px 0px;
}
}
.own-wrap {
display: flex;
.title {
font-size: 20px;
color: rgba(0, 0, 0, .85);
line-height: 28px;
font-weight: 500;
margin-bottom: 12px;
}
.safe {
width: 100%;
.item {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding-top: 14px;
padding-bottom: 14px;
border-bottom: 1px solid #e8e8e8;
.title {
color: rgba(0, 0, 0, .65);
margin-bottom: 4px;
font-size: 14px;
line-height: 22px;
}
.desc {
color: rgba(0, 0, 0, .45);
font-size: 14px;
line-height: 22px;
.red {
color: #ed3f14;
}
.middle {
color: #faad14;
}
.green {
color: #52c41a;
}
}
}
}
}
}
/deep/ .upload-list {
img {
width: 100%;
height: 100%;
}
}

View File

@ -1,7 +1,3 @@
<style lang="scss" scoped>
@import "./personal-center.scss";
</style>
<template>
<div class="own-space">
<Card class="own-space-new">
@ -85,6 +81,7 @@ export default {
};
},
methods: {
//
init() {
let v = JSON.parse(Cookies.get("userInfo"));
// null""
@ -97,15 +94,18 @@ export default {
this.userForm = userInfo;
console.log(userInfo)
},
//
changePassword() {
util.openNewPage(this, "change-password");
this.$router.push({
name: "change_password"
});
},
//
changeMenu(v) {
this.currMenu = v;
},
//
saveEdit() {
this.saveLoading = true;
let params = this.userForm;
@ -117,7 +117,6 @@ export default {
Cookies.set("userInfo", this.userForm);
//
this.$store.commit("setAvatarPath", this.userForm.avatar);
setTimeout(()=>{
this.$router.go(0)
},500)
@ -125,31 +124,77 @@ export default {
}
});
},
updateUserInfo() {
//
userInfo().then(res => {
if (res.success) {
//
delete res.result.permissions;
if (this.getStore("saveLogin")) {
// 7
Cookies.set("userInfo", JSON.stringify(res.result), {
expires: 7
});
} else {
Cookies.set("userInfo", JSON.stringify(res.result));
}
this.setStore("userInfo", res.result);
}
});
},
changeMessage(v) {
this.setStore("messageOpen", v);
}
},
mounted() {
let type = this.$route.query.type;
this.init();
}
};
</script>
<style lang="scss" scoped>
.own-space {
.own-space-new {
.ivu-card-body {
padding: 16px 16px 16px 0px;
}
}
.own-wrap {
display: flex;
.title {
font-size: 20px;
color: rgba(0, 0, 0, .85);
line-height: 28px;
font-weight: 500;
margin-bottom: 12px;
}
.safe {
width: 100%;
.item {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding-top: 14px;
padding-bottom: 14px;
border-bottom: 1px solid #e8e8e8;
.title {
color: rgba(0, 0, 0, .65);
margin-bottom: 4px;
font-size: 14px;
line-height: 22px;
}
.desc {
color: rgba(0, 0, 0, .45);
font-size: 14px;
line-height: 22px;
.red {
color: #ed3f14;
}
.middle {
color: #faad14;
}
.green {
color: #52c41a;
}
}
}
}
}
}
/deep/ .upload-list {
img {
width: 100%;
height: 100%;
}
}
</style>

View File

@ -22,7 +22,7 @@
<Button @click="add" type="primary">添加优惠券</Button>
<Button @click="delAll"></Button>
</Row>
<Table v-if="refreshTable" :loading="loading" border :columns="columns" :data="data" ref="table" @on-selection-change="changeSelect">
<Table v-if="refreshTable" :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10" @on-selection-change="changeSelect">
<template slot-scope="{ row }" slot="action">
<Button v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="success" :class="{'mr_10' : row.promotionStatus === 'START' || row.promotionStatus === 'NEW'}" size="small" @click="edit(row)">
</Button>
@ -37,7 +37,6 @@
</Card>
</div>
</template>
<script>
import {
getPlatformCouponList,
@ -46,14 +45,9 @@ import {
export default {
name: "coupon",
components: {},
data() {
return {
loading: true, //
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
searchForm: {
//
pageNumber: 1, //
@ -62,17 +56,6 @@ export default {
order: "desc", //
getType: "", //
},
form: {
//
promotionName: "",
},
//
formValidate: {
promotionName: [
{ required: true, message: "不能为空", trigger: "blur" },
],
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
@ -271,6 +254,7 @@ export default {
check() { //
this.$emit("selected", this.selectList);
},
//
init() {
this.getDataList();
},
@ -285,11 +269,12 @@ export default {
this.getDataList();
},
changePageSize(v) { //
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = v;
this.getDataList();
},
handleSearch() { //
this.searchForm.pageNumber = 0;
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
@ -313,7 +298,6 @@ export default {
this.searchForm.startTime = null;
this.searchForm.endTime = null;
}
//
getPlatformCouponList(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {

View File

@ -1,240 +0,0 @@
<template>
<div>
<div class="content-goods-publish">
<Form ref="form" :model="form" :label-width="130">
<div class="base-info-item">
<h4>平台券活动详情</h4>
<div class="form-item-view">
<FormItem label="活动名称">
<span class="goods-category-name">{{ form.promotionName }}</span>
</FormItem>
<FormItem label="活动类型">
<span class="goods-category-name">{{
getCouponType(form.couponType)
}}</span>
</FormItem>
<FormItem label="面额">
<span class="goods-category-name"> {{ form.price | unitPrice }}</span>
</FormItem>
<FormItem label="活动说明">
<span class="goods-category-name">{{ form.description }}</span>
</FormItem>
<FormItem label="发放总数">
<span class="goods-category-name">{{ form.publishNum }}</span>
</FormItem>
<FormItem label="领取限制">
<span class="goods-category-name">{{ form.limitNum }}</span>
</FormItem>
<FormItem label="活动开始时间">
<span class="goods-category-name">{{ form.startTime }}</span>
</FormItem>
<FormItem label="消费限额">
<span class="goods-category-name">{{
form.consumptionLimit
}}</span>
</FormItem>
<FormItem label="使用有效期">
<span class="goods-category-name">{{ form.startTime }} {{ form.endTime }}</span>
</FormItem>
<FormItem label="适用品类范围">
<span class="goods-category-name">{{
getScopeType(form.scopeType)
}}</span>
</FormItem>
<FormItem label="品类范围描述">
<span class="goods-category-name">{{ form.couponName }}</span>
</FormItem>
<FormItem label="状态">
<span class="goods-category-name">{{
getStatus(form.status)
}}</span>
</FormItem>
<FormItem label="优惠券类型">
<span class="goods-category-name">{{
getType(form.getType)
}}</span>
</FormItem>
<FormItem label="活动创建时间">
<span class="goods-category-name">{{ form.createTime }}</span>
</FormItem>
<FormItem label="活动最后更新时间">
<span class="goods-category-name">{{ form.updateTime }}</span>
</FormItem>
<FormItem label="更新管理员名称">
<span class="goods-category-name">{{ form.updateBy }}</span>
</FormItem>
<FormItem label="已发放数量">
<span class="goods-category-name">{{ form.receivedNum }}</span>
</FormItem>
<FormItem label="已使用数量">
<span class="goods-category-name">{{ form.usedNum }}</span>
</FormItem>
</div>
<h4>适用品类范围</h4>
<div>
<Table :loading="loading" border :columns="columns1" :data="data1" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
<Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page>
</Row>
</div>
</div>
</Form>
</div>
<div class="footer">
<Button type="primary" @click="back"></Button>
</div>
</div>
</template>
<script>
import { getPlatformCoupon } from "@/api/promotion";
import uploadPicThumb from "@/views/my-components/lili/upload-pic-thumb";
import editor from "@/views/my-components/lili/editor";
export default {
name: "addCoupon",
components: {
uploadPicThumb,
editor,
},
data() {
return {
modalType: 0, //
loading: false, //
searchForm: {
//
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
form: {
/** 店铺承担比例 */
sellerCommission: 0,
/** 发行数量 */
publishNum: 1,
/** 运费承担者 */
scopeType: "ALL",
/** 消费限额 */
consumptionLimit: "",
/** 限领数量 */
limitNum: 1,
/** 活动类型 */
couponType: "",
/** 优惠券名称 */
couponName: "",
/** 已被使用数量 */
usedNum: 0,
/** 已被领取的数量 */
receivedNum: 0,
},
id: this.$route.query.id,
columns1: [
{
title: "一级类目",
key: "name",
},
{
title: "二级类目",
key: "age",
},
{
title: "三级类目",
key: "address",
},
],
data1: [
{
name: "王小明",
age: 18,
address: "北京市朝阳区芍药居",
},
{
name: "张小刚",
age: 25,
address: "北京市海淀区西二旗",
},
{
name: "李小红",
age: 30,
address: "上海市浦东新区世纪大道",
},
{
name: "周小伟",
age: 26,
address: "深圳市南山区深南大道",
},
],
submitLoading: false, //
};
},
mounted() {
// id
if (this.id) {
this.getCoupon();
this.modalType = 1;
}
},
methods: {
getCouponType(value) {
switch (value) {
case "POINT":
return "打折";
case "PRICE":
return "减免现金";
}
},
/** 获取状态 */
getStatus(value) {
switch (value) {
case "NEW":
return "新建";
case "START":
return "开始";
case "LOWER":
return "结束";
case "CANCEL":
return "作废";
}
},
/** 关联范围类型 */
getScopeType(value) {
switch (value) {
case "PORTION_CATEGORY":
return "部分商品分类";
case "PORTION_GOODS":
return "指定商品";
case "ALL":
return "全品类";
}
},
/** 优惠券类型 */
getType(value) {
switch (value) {
case "FREE":
return "免费获取";
case "ACTIVITY":
return "活动获取";
}
},
getCoupon() {
getPlatformCoupon(this.id).then((res) => {
this.form = res.result;
});
},
back() {
this.$store.commit("removeTag", "platform-coupon-info");
this.$router.go(-1);
},
},
};
</script>
<style lang="scss" scoped>
@import "couponPublish.scss";
</style>

View File

@ -1,257 +0,0 @@
/*选择商品品类*/
.content-goods-publish {
padding: 15px;
margin: 0 auto;
text-align: center;
border: 1px solid #ddd;
background: none repeat 0 0 #fff;
height: 100%;
margin-bottom: 20px;
/*商品品类*/
.goods-category {
text-align: left;
padding: 10px;
background: #fafafa;
border: 1px solid #e6e6e6;
ul {
padding: 8px 4px 8px 8px;
list-style: none;
width: 300px;
background: none repeat 0 0 #fff;
border: 1px solid #e6e6e6;
display: inline-block;
letter-spacing: normal;
margin-right: 15px;
vertical-align: top;
word-spacing: normal;
li {
line-height: 20px;
padding: 5px;
cursor: pointer;
color: #333;
font-size: 12px;
display: flex;
flex-wrap: nowrap;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
}
}
/** 当前品类被选中的样式 */
.activeClass {
background-color: #d9edf7;
border: 1px solid #bce8f1;
color: #3a87ad;
}
/*!*当前选择的商品品类文字*!*/
.current-goods-category {
text-align: left;
padding: 10px;
width: 100%;
border: 1px solid #fbeed5;
color: #c09853;
background-color: #fcf8e3;
margin: 10px auto;
padding: 8px 35px 8px 14px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
font-size: 12px;
font-weight: bold;
}
}
/*编辑基本信息*/
.el-form {
padding-bottom: 80px;
.el-form-item {
width: 100%;
color: gray;
text-align: left;
}
}
div.base-info-item {
h4 {
margin-bottom: 10px;
padding: 0 10px;
border: 1px solid #ddd;
background-color: #f8f8f8;
font-weight: bold;
color: #333;
font-size: 14px;
line-height: 40px;
text-align: left;
}
.form-item-view {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-between;
padding-left: 80px;
.shop-category-text {
font-size: 12px;
}
}
.item-goods-properts-row {
display: flex;
flex-direction: row;
word-break: break-all;
white-space: normal;
width: 300px;
height: 100px;
}
.item-goods-properts {
display: flex;
flex-direction: row;
margin-bottom: 10px;
}
.form-item {
display: flex;
align-items: center;
}
/** 审核信息-拒绝原因 */
.auth-info {
color: red;
}
.el-form-item {
width: 30%;
min-width: 300px;
}
.goods-name-width {
width: 50%;
min-width: 300px;
}
.el-form-item__content {
margin-left: 120px;
text-align: left;
}
p.goods-group-manager {
padding-left: 7.5%;
text-align: left;
color: #999;
font-size: 13px;
}
/*teatarea*/
/deep/ .el-textarea {
width: 150%;
}
.seo-text {
width: 150%;
}
}
/*折叠面板*/
.el-collapse-item {
/deep/ .el-collapse-item__header {
text-align: left;
background-color: #f8f8f8;
padding: 0 10px;
font-weight: bold;
color: #333;
font-size: 14px;
}
.el-form-item {
margin-left: 5%;
width: 25%;
}
/deep/ .el-form-item__content {
margin-left: 120px;
text-align: left;
}
p.goods-group-manager {
padding-left: 12%;
text-align: left;
color: #999;
}
/deep/ .el-collapse-item__content {
padding: 10px 0;
text-align: left;
}
}
/*商品描述*/
.goods-intro {
line-height: 40;
}
/** 底部步骤 */
.footer {
width: 88.7%;
padding: 10px;
background-color: #ffc;
position: fixed;
bottom: 0px;
left: 10%;
text-align: center;
z-index: 9999;
}
/*图片上传组件第一张图设置封面*/
.goods-images {
/deep/ li.el-upload-list__item:first-child {
position: relative;
}
/deep/ li.el-upload-list__item:first-child:after {
content: "";
color: #fff;
font-weight: bold;
font-size: 12px;
position: absolute;
left: -15px;
top: -6px;
width: 40px;
height: 24px;
padding-top: 6px;
background: #13ce66;
text-align: center;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
}
}
.el-form-item__label {
word-break: break-all;
}
.step-view {
width: 33%;
height: 40px;
font-size: 19px;
text-align: center;
display: flex;
background-color: #fff;
justify-content: center;
align-items: center;
}
.page {
margin-top: 2vh;
margin-bottom: 5vh;
}

View File

@ -198,12 +198,6 @@ export default {
submitLoading: false, //
selectedGoods: [], // 便
goodsCategoryList: [], //
shopCategoryList: [], //
cascaderProps: {
multiple: true,
label: "name",
value: "id",
}, //
formRule: {
promotionName: [{required: true, message: "活动名称不能为空"}],
couponName: [{required: true, message: "优惠券名称不能为空"}],
@ -306,6 +300,7 @@ export default {
}
},
methods: {
//
getCoupon() {
getPlatformCoupon(this.id).then((res) => {
let data = res.result;
@ -495,17 +490,11 @@ export default {
});
this.form.promotionGoodsList = list;
},
getGoodsCategory(e) {
// id
// console.log(e);
},
async getCagetoryList() {
//
let data = await getCategoryTree();
this.goodsCategoryList = data.result;
//
this.goodsCategoryList = this.goodsCategoryList.map((item) => {
if (item.children) {
item.children = item.children.map((child) => {
@ -531,7 +520,6 @@ export default {
}
return {value: item.id, label: item.name, children: item.children};
});
console.log(this.goodsCategoryList);
},
filterCategoryId(list, idArr) {
// id

View File

@ -5,19 +5,17 @@
<Button @click="add" type="primary">添加活动</Button>
</Row>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom">
<template slot-scope="{ row,index }" slot="action">
<Button type="info"
size="small" style="margin-right: 10px" @click="info(row)">查看
<template slot-scope="{ row }" slot="action">
<Button type="info" size="small" style="margin-right: 10px" @click="info(row)">
查看
</Button>
<Button v-if="!checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error"
size="small" style="margin-right: 10px" @click="remove(row)">停止
</Button>
</template>
</Table>
<Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber + 1" :total="total" :page-size="searchForm.pageSize"
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page>
</Row>
@ -42,7 +40,7 @@ export default {
modalTitle: "", //
searchForm: {
//
pageNumber: 0, //
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
@ -170,19 +168,20 @@ export default {
info(v) {
this.$router.push({name: "coupon-activity-info", query: {id: v.id}});
},
//
//
changePage(v) {
this.searchForm.pageNumber = v - 1;
this.searchForm.pageNumber = v;
this.getDataList();
},
//
//
changePageSize(v) {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = v;
this.getDataList();
},
//
handleSearch() {
this.searchForm.pageNumber = 0;
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
@ -196,7 +195,6 @@ export default {
this.searchForm.startTime = null;
this.searchForm.endTime = null;
}
//
getCouponActivityList(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
@ -210,23 +208,21 @@ export default {
edit(v) {
this.$router.push({name: "edit-platform-coupon", query: {id: v.id}});
},
//
//
remove(v) {
this.$Modal.confirm({
title: "确认下架",
title: "确认停止",
//
content: "确认要下架此优惠券活动么?下架活动只能重新创建",
content: "确认要停止此优惠券活动么?停止活动只能重新创建",
loading: true,
onOk: () => {
//
closeActivity(v.id).then((res) => {
if (res.success) {
this.$Message.success("优惠券活动已作废");
this.$Message.success("优惠券活动已停止");
this.getDataList();
}
}).catch(() => {
this.$Modal;
});
}).catch(() => {});
},
});
},

View File

@ -1,7 +1,7 @@
<template>
<div>
<div class="content-goods-publish">
<Form ref="form" :model="form" :label-width="130">
<Form ref="form" :model="form" :label-width="70">
<div class="base-info-item">
<h4>优惠券活动详情</h4>
<div class="form-item-view">
@ -30,10 +30,10 @@
<h4>优惠券列表</h4>
<Table :columns="couponColumn" :data="couponData" ref="table">
</Table>
<h4 v-if="couponActivity.activityScopeInfo && memberData.length>0"></h4>
<Table :columns="memberColumn" :data="memberData">
</Table>
<template v-if="couponActivity.activityScopeInfo && memberData.length>0">
<h4 class="mt_10">会员列表列表</h4>
<Table :columns="memberColumn" :data="memberData"></Table>
</template>
</div>
</Form>
</div>
@ -52,7 +52,9 @@ export default {
data() {
return {
id: this.$route.query.id,//id
couponActivity: "",//
couponActivity: {
},//
couponColumn: [
{
title: "优惠券名称",
@ -124,6 +126,52 @@ export default {
</script>
<style lang="scss" scoped>
@import "couponPublish.scss";
/*选择商品品类*/
.content-goods-publish {
padding: 15px;
margin: 0 auto;
text-align: center;
border: 1px solid #ddd;
background: none repeat 0 0 #fff;
height: 100%;
margin-bottom: 20px;
}
div.base-info-item {
h4 {
margin-bottom: 10px;
padding: 0 10px;
border: 1px solid #ddd;
background-color: #f8f8f8;
font-weight: bold;
color: #333;
font-size: 14px;
line-height: 40px;
text-align: left;
}
.form-item-view {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-between;
padding-left: 40px;
.shop-category-text {
font-size: 12px;
}
}
}
/** 底部步骤 */
.footer {
width: 88.7%;
padding: 10px;
background-color: #ffc;
position: fixed;
bottom: 0px;
left: 10%;
text-align: center;
z-index: 9999;
}
</style>

View File

@ -1,253 +0,0 @@
/*选择商品品类*/
.content-goods-publish {
padding: 15px;
margin: 0 auto;
text-align: center;
border: 1px solid #ddd;
background: none repeat 0 0 #fff;
height: 100%;
margin-bottom: 20px;
/*商品品类*/
.goods-category {
text-align: left;
padding: 10px;
background: #fafafa;
border: 1px solid #e6e6e6;
ul {
padding: 8px 4px 8px 8px;
list-style: none;
width: 300px;
background: none repeat 0 0 #fff;
border: 1px solid #e6e6e6;
display: inline-block;
letter-spacing: normal;
margin-right: 15px;
vertical-align: top;
word-spacing: normal;
li {
line-height: 20px;
padding: 5px;
cursor: pointer;
color: #333;
font-size: 12px;
display: flex;
flex-wrap: nowrap;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
}
}
/** 当前品类被选中的样式 */
.activeClass {
background-color: #d9edf7;
border: 1px solid #bce8f1;
color: #3a87ad;
}
/*!*当前选择的商品品类文字*!*/
.current-goods-category {
text-align: left;
padding: 10px;
width: 100%;
border: 1px solid #fbeed5;
color: #c09853;
background-color: #fcf8e3;
margin: 10px auto;
padding: 8px 35px 8px 14px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
font-size: 12px;
font-weight: bold;
}
}
/*编辑基本信息*/
.el-form {
padding-bottom: 80px;
.el-form-item {
width: 100%;
color: gray;
text-align: left;
}
}
div.base-info-item {
h4 {
margin-bottom: 10px;
padding: 0 10px;
border: 1px solid #ddd;
background-color: #f8f8f8;
font-weight: bold;
color: #333;
font-size: 14px;
line-height: 40px;
text-align: left;
}
.form-item-view {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-between;
padding-left: 80px;
.shop-category-text {
font-size: 12px;
}
}
.item-goods-properts-row {
display: flex;
flex-direction: row;
word-break: break-all;
white-space: normal;
width: 300px;
height: 100px;
}
.item-goods-properts {
display: flex;
flex-direction: row;
margin-bottom: 10px;
}
.form-item {
display: flex;
align-items: center;
}
.el-form-item {
width: 30%;
min-width: 300px;
}
.goods-name-width {
width: 50%;
min-width: 300px;
}
.el-form-item__content {
margin-left: 120px;
text-align: left;
}
p.goods-group-manager {
padding-left: 7.5%;
text-align: left;
color: #999;
font-size: 13px;
}
/*teatarea*/
/deep/ .el-textarea {
width: 150%;
}
.seo-text {
width: 150%;
}
}
/*折叠面板*/
.el-collapse-item {
/deep/ .el-collapse-item__header {
text-align: left;
background-color: #f8f8f8;
padding: 0 10px;
font-weight: bold;
color: #333;
font-size: 14px;
}
.el-form-item {
margin-left: 5%;
width: 25%;
}
/deep/ .el-form-item__content {
margin-left: 120px;
text-align: left;
}
p.goods-group-manager {
padding-left: 12%;
text-align: left;
color: #999;
}
/deep/ .el-collapse-item__content {
padding: 10px 0;
text-align: left;
}
}
/*商品描述*/
.goods-intro {
line-height: 40;
}
/** 底部步骤 */
.footer {
width: 88.7%;
padding: 10px;
background-color: #ffc;
position: fixed;
bottom: 0px;
left: 10%;
text-align: center;
z-index: 9999;
}
/*图片上传组件第一张图设置封面*/
.goods-images {
/deep/ li.el-upload-list__item:first-child {
position: relative;
}
/deep/ li.el-upload-list__item:first-child:after {
content: "";
color: #fff;
font-weight: bold;
font-size: 12px;
position: absolute;
left: -15px;
top: -6px;
width: 40px;
height: 24px;
padding-top: 6px;
background: #13ce66;
text-align: center;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
}
}
.el-form-item__label {
word-break: break-all;
}
.step-view {
width: 33%;
height: 40px;
font-size: 19px;
text-align: center;
display: flex;
background-color: #fff;
justify-content: center;
align-items: center;
}
.page {
margin-top: 2vh;
margin-bottom: 5vh;
}

View File

@ -6,12 +6,11 @@
<h4>活动信息</h4>
<div class="form-item-view">
<FormItem label="活动名称" prop="promotionName">
<Input type="text" v-model="form.promotionName" placeholder="活动名称" clearable style="width: 260px"/>
<Input type="text" v-model="form.promotionName" placeholder="请填写活动名称" clearable style="width: 260px"/>
</FormItem>
<FormItem label="活动时间">
<DatePicker type="datetimerange" :options="options" v-model="rangeTime" format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择" style="width: 260px">
placeholder="请选择活动时间" style="width: 260px">
</DatePicker>
</FormItem>
@ -72,16 +71,14 @@
<script>
import couponTemplate from "@/views/promotion/coupon/coupon";
import userList from "@/views/member/list/index";
import {saveActivityCoupon, updateCouponActivity} from "@/api/promotion";
import {saveActivityCoupon} from "@/api/promotion";
export default {
name: "addCouponActivity",
components: {
couponTemplate,
userList,
userList
},
data () {
return {
@ -228,7 +225,6 @@ export default {
};
},
methods: {
//
callbackSelectUser(val) {
//
@ -283,7 +279,6 @@ export default {
}
});
},
//
addVip() {
this.checkUserList = true;

View File

@ -2,13 +2,7 @@
<div class="full-cut">
<Card>
<Row>
<Form
ref="searchForm"
:model="searchForm"
inline
:label-width="70"
class="search-form"
>
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form-item label="活动名称" prop="promotionName">
<Input
type="text"
@ -59,9 +53,7 @@
{{ row.isFullMinus ? "满减" : "满折" }}
</template>
<template slot-scope="{ row }" slot="hours">
<Tag v-for="item in unixHours(row.hours)" :key="item">{{
item
}}</Tag>
<Tag v-for="item in unixHours(row.hours)" :key="item">{{item}}</Tag>
</template>
<template slot-scope="{ row }" slot="action">
<div>
@ -83,7 +75,7 @@
</div>
</template>
</Table>
<Row type="flex" justify="end" class="page operation">
<Row type="flex" justify="end" class="mt_10">
<Page
:current="searchForm.pageNumber"
:total="total"
@ -183,6 +175,7 @@ export default {
};
},
methods: {
//
init() {
this.getDataList();
},
@ -218,6 +211,7 @@ export default {
},
changePageSize(v) {
//
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = v;
this.getDataList();
},
@ -227,6 +221,7 @@ export default {
this.searchForm.pageSize = 10;
this.getDataList();
},
//
getDataList() {
this.loading = true;
if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {

View File

@ -5,9 +5,7 @@
<Tabs v-model="searchForm.status">
<!-- 标签栏 -->
<TabPane v-for="(item,index) in tabs" :key="index" :name="item.status" :label="item.title">
</TabPane>
</Tabs>
<Table :columns="liveColumns" :data="liveData"></Table>
<Row type="flex" style="margin:20px;" justify="end" class="mt_10">
@ -167,6 +165,7 @@ export default {
};
},
watch: {
//
"searchForm.status": {
handler() {
this.liveData = [];

View File

@ -1,7 +1,6 @@
<template>
<div>
<Card>
<Form :model="liveForm" ref="liveForm" :rules="liveRulesForm" :label-width="120">
<FormItem label="直播标题" prop="name">
<Input disabled v-model="liveForm.name" style="width:460px"></Input>

View File

@ -1,7 +1,6 @@
<template>
<div class="search">
<Card>
<Row v-show="openSearch">
<Form
ref="searchForm"
:model="searchForm"
@ -44,13 +43,13 @@
>搜索</Button
>
</Form>
</Row>
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
class="mt_10"
>
<template slot-scope="{ row }" slot="action">
<Button
@ -73,7 +72,7 @@
</Table>
<Row type="flex" justify="end" class="mt_10">
<Page
:current="searchForm.pageNumber + 1"
:current="searchForm.pageNumber"
:total="total"
:page-size="searchForm.pageSize"
@on-change="changePage"
@ -94,14 +93,12 @@ import { getPintuanList, closePintuan } from "@/api/promotion";
export default {
name: "pintuan",
components: {},
data() {
return {
loading: true, //
openSearch: true, //
searchForm: {
//
pageNumber: 0, //
pageNumber: 1, //
pageSize: 10, //
sort: "startTime",
order: "desc", //
@ -175,23 +172,29 @@ export default {
};
},
methods: {
//
init() {
this.getDataList();
},
//
changePage(v) {
this.searchForm.pageNumber = v - 1;
this.searchForm.pageNumber = v;
this.getDataList();
this.clearSelectAll();
},
//
changePageSize(v) {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = v;
this.getDataList();
},
//
handleSearch() {
this.searchForm.pageNumber = 0;
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
//
getDataList() {
this.loading = true;
if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {
@ -209,9 +212,11 @@ export default {
}
});
},
//
view(v) {
this.$router.push({ name: "pintuan-goods", query: { id: v.id } });
},
//
close(v) {
this.$Modal.confirm({
title: "确认关闭",

View File

@ -2,9 +2,7 @@
<div class="pintuan-goods">
<Card>
<h4>活动详情</h4>
<Table
style="margin: 10px 0"
border
<Table style="margin: 10px 0" border
:columns="columns"
:data="data"
></Table>
@ -36,7 +34,7 @@
</Table>
<Row type="flex" justify="end" class="page operation">
<Page
:current="searchForm.pageNumber + 1"
:current="searchForm.pageNumber"
:total="total"
:page-size="searchForm.pageSize"
@on-change="changePage"
@ -49,41 +47,21 @@
></Page>
</Row>
</Card>
<Modal title="查看图片" v-model="visible">
<img
:src="showImg"
v-if="visible"
style="width: 200px; height: 200px; margin-left: 130px"
/>
</Modal>
</div>
</template>
<script>
import { getPintuanGoodsList, getPintuanDetail } from "@/api/promotion.js";
import config from "@/config";
const buyerUrl =
process.env.NODE_ENV === "development"
? config.api_dev.buyer
: config.api_prod.buyer;
export default {
data() {
return {
visible: false,//
showImg: "", // url
openSearch: true, //
openTip: true, //
loading: false, //
searchForm: {
//
pageNumber: 0, //
pageNumber: 1, //
pageSize: 10, //
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
data: [], //
total: 0, //
columns: [
@ -170,35 +148,27 @@ export default {
},
],
goodsData: [],
goodsData: [] //
};
},
methods: {
//
init() {
this.getDataList();
this.getPintuanMsg();
},
//
changePage(v) {
this.searchForm.pageNumber = v - 1;
this.searchForm.pageNumber = v;
this.getDataList();
this.clearSelectAll();
},
//
changePageSize(v) {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = v;
this.getDataList();
},
handleReset() {
//
this.searchForm.pageNumber = 0;
this.searchForm.promotionName = "";
this.selectDate = null;
//
this.getDataList();
},
//
getDataList() {
this.loading = true;
this.searchForm.pintuanId = this.$route.query.id;
@ -211,27 +181,12 @@ export default {
}
});
},
getPintuanMsg() {
//
getPintuanMsg() {
getPintuanDetail(this.$route.query.id).then((res) => {
if (res.success) this.data.push(res.result);
});
},
toBuyerGoods(row) {
window.open(
buyerUrl +
"/pages/product/product?id=" +
row.skuId +
"&goodsId=" +
row.goodsId
);
},
viewImg(img) {
this.showImg = img;
this.visible = true;
},
},
mounted() {
this.init();
@ -239,9 +194,6 @@ export default {
};
</script>
<style lang="scss" scoped>
.operation {
margin-bottom: 10px;
}
h4 {
margin: 20px 0;
padding: 0 10px;

View File

@ -56,19 +56,11 @@
>
</Select>
</template>
<template slot-scope="{ index }" slot="activeStock">
<Input
type="number"
v-model="promotionGoodsList[index].activeStock"
/>
<Input type="number" v-model="promotionGoodsList[index].activeStock" />
</template>
<template slot-scope="{ index }" slot="points">
<Input
type="number"
v-model="promotionGoodsList[index].points"
/>
<Input type="number" v-model="promotionGoodsList[index].points" />
</template>
</Table>
</FormItem>
@ -306,6 +298,7 @@ export default {
await this.getCategory();
},
methods: {
//
async getCategory() {
let res = await getPointsGoodsCategoryList();
this.categoryList = res.result.records;
@ -351,10 +344,12 @@ export default {
);
this.$router.go(-1);
},
//
changeCategory(val, index) {
this.promotionGoodsList[index].pointsGoodsCategoryName = val.label;
console.log(this.promotionGoodsList);
},
//
changeSelect(e) {
//
this.selectedGoods = e;

View File

@ -110,13 +110,11 @@ import {
getPointsGoodsById,
getPointsGoodsCategoryList,
} from "@/api/promotion";
import { format } from "date-fns";
export default {
name: "addCoupon",
name: "editPointsGoods",
data() {
return {
modalType: 0, //
form: {
/** 活动名称 */
promotionName: "",
@ -134,7 +132,6 @@ export default {
categoryList: [], //
id: this.$route.query.id, // id
submitLoading: false, //
formRule: {
settlementPrice: [{ required: true, message: "请填写结算价格" }],
pointsGoodsCategoryId: [
@ -150,7 +147,6 @@ export default {
// id
if (this.id) {
this.getData();
this.modalType = 1;
}
},
methods: {
@ -162,6 +158,7 @@ export default {
);
this.$router.go(-1);
},
//
getData() {
getPointsGoodsById(this.id).then((res) => {
if (res.success) {
@ -170,11 +167,12 @@ export default {
}
});
},
//
async getCategory() {
let res = await getPointsGoodsCategoryList();
this.categoryList = res.result.records;
},
/** 保存平台优惠券 */
/** 保存 */
handleSubmit() {
this.$refs.form.validate((valid) => {
if (valid) {

View File

@ -16,15 +16,14 @@
<Option v-for="item in statusList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Form-item label="SKU编码">
<Input type="text" v-model="searchForm.skuId" placeholder="请输入SKU编码" clearable style="width: 200px" />
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form>
</Row>
<Row class="operation padding-row">
<Button @click="addPointsGoods" type="primary">添加积分商品</Button>
</Row>
<Table :loading="loading" border :columns="columns" :data="data" ref="table">
<template slot-scope="{ row }" slot="goodsName">
@ -51,7 +50,6 @@
<div>{{ row.startTime }}</div>
<div>{{ row.endTime }}</div>
</template>
<template slot-scope="{ row }" slot="action">
<Button v-if="row.promotionStatus == 'NEW'" type="info" size="small" @click="edit(row.id)" style="margin-right: 5px"></Button>
<Button v-if="row.promotionStatus == 'START'" type="warning" size="small" @click="statusChanged(row.id, 'CLOSE')" style="margin-right: 5px"></Button>
@ -75,7 +73,6 @@ import {
} from "@/api/promotion";
export default {
name: "pointsGoods",
components: {},
data() {
return {
loading: true, //
@ -92,8 +89,7 @@ export default {
{ label: "已结束", value: "END" },
{ label: "已关闭", value: "CLOSE" },
],
columns: [
//
columns: [ //
{
title: "商品名称",
slot: "goodsName",
@ -111,7 +107,6 @@ export default {
slot: "settlementPrice",
width: 100,
},
{
title: "库存数量",
slot: "quantity",
@ -178,20 +173,26 @@ export default {
};
},
methods: {
//
init() {
this.getDataList();
},
//
addPointsGoods() {
this.$router.push({ name: "add-points-goods" });
},
//
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
},
//
changePageSize(v) {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = v;
this.getDataList();
},
//
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
@ -201,10 +202,9 @@ export default {
"_" +
(this.searchForm.pointsE ? this.searchForm.pointsE : "");
}
this.getDataList();
},
//
getDataList() {
this.loading = true;
getPointsGoodsList(this.searchForm).then((res) => {
@ -215,9 +215,11 @@ export default {
}
});
},
//
edit(id) {
this.$router.push({ name: "edit-points-goods", query: { id: id } });
},
//
statusChanged(id, status) {
let text = "";
if (status == "START") {
@ -242,6 +244,7 @@ export default {
},
});
},
//
close(id) {
this.$Modal.confirm({
title: "确认删除",
@ -258,7 +261,7 @@ export default {
});
},
});
},
}
},
mounted() {
this.init();

View File

@ -1,8 +1,9 @@
<template>
<div>
<div class="operation">
<Button @click="addParent" icon="md-add">添加积分商品分类</Button>
<Button icon="md-refresh" @click="refresh"></Button>
<Card>
<div class="operation mb_10">
<Button @click="addParent" type="primary" icon="md-add">添加积分商品分类</Button>
<Button icon="md-refresh" @click="init"></Button>
</div>
<tree-table
ref="treeTable"
@ -19,10 +20,9 @@
<template slot="action" slot-scope="scope">
<Button @click.native="edit(scope.row)" style="margin-right:10px;" size="small">编辑</Button>
<Button @click.native="remove(scope.row)" type="primary" size="small">删除</Button>
</template>
</tree-table>
</Card>
<Modal
:title="modalTitle"
v-model="modalVisible"
@ -59,13 +59,11 @@ import {
deletePointsGoodsCategoryById,
} from "@/api/promotion";
import TreeTable from "@/views/my-components/tree-table/Table/Table";
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
export default {
name: "pointsGoodsCategory",
components: {
TreeTable,
uploadPicInput,
TreeTable
},
data() {
return {
@ -102,20 +100,15 @@ export default {
template: "action",
},
],
tableData: [],
tableData: [], //
};
},
methods: {
//
init() {
this.getAllList();
},
refresh() {
this.loading = true;
let that = this;
setTimeout(function () {
that.loading = false;
}, 1000);
},
//
edit(v) {
this.modalType = 1;
this.modalTitle = "编辑";
@ -125,6 +118,7 @@ export default {
this.showParent = false;
this.modalVisible = true;
},
//
addParent() {
this.modalType = 0;
this.modalTitle = "添加积分商品分类";
@ -135,6 +129,7 @@ export default {
this.formAdd.parentId = 0;
this.modalVisible = true;
},
//
Submit() {
this.$refs.form.validate((valid) => {
console.log(valid);
@ -167,10 +162,10 @@ export default {
}
});
},
//
remove(v) {
this.$Modal.confirm({
title: "确认删除",
//
content: "您确认要删除 " + v.name + " ?",
loading: true,
onOk: () => {
@ -185,6 +180,7 @@ export default {
},
});
},
//
getAllList() {
this.loading = true;
getPointsGoodsCategoryList().then((res) => {

View File

@ -1,264 +0,0 @@
/*选择商品品类*/
.content-goods-publish {
padding: 15px;
margin: 0 auto;
text-align: center;
border: 1px solid #ddd;
background: none repeat 0 0 #fff;
height: 100%;
margin-bottom: 20px;
/*商品品类*/
.goods-category {
text-align: left;
padding: 10px;
background: #fafafa;
border: 1px solid #e6e6e6;
ul {
padding: 8px 4px 8px 8px;
list-style: none;
width: 300px;
background: none repeat 0 0 #fff;
border: 1px solid #e6e6e6;
display: inline-block;
letter-spacing: normal;
margin-right: 15px;
vertical-align: top;
word-spacing: normal;
li {
line-height: 20px;
padding: 5px;
cursor: pointer;
color: #333;
font-size: 12px;
display: flex;
flex-wrap: nowrap;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
}
}
/** 当前品类被选中的样式 */
.activeClass {
background-color: #d9edf7;
border: 1px solid #bce8f1;
color: #3a87ad;
}
/*!*当前选择的商品品类文字*!*/
.current-goods-category {
text-align: left;
padding: 10px;
width: 100%;
border: 1px solid #fbeed5;
color: #c09853;
background-color: #fcf8e3;
margin: 10px auto;
padding: 8px 35px 8px 14px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
font-size: 12px;
font-weight: bold;
}
}
/*编辑基本信息*/
.el-form {
padding-bottom: 80px;
.el-form-item {
width: 100%;
color: gray;
text-align: left;
}
}
getGoodsCategoryLevelList
/*平铺*/
div.base-info-item>div {
margin-left: 5%;
}
div.base-info-item {
h4 {
margin-bottom: 10px;
padding: 0 10px;
border: 1px solid #ddd;
background-color: #f8f8f8;
font-weight: bold;
color: #333;
font-size: 14px;
line-height: 40px;
text-align: left;
}
.form-item-view {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-between;
padding-left: 80px;
.shop-category-text {
font-size: 12px;
}
}
.item-goods-properts-row {
display: flex;
flex-direction: row;
word-break: break-all;
white-space: normal;
width: 300px;
height: 100px;
}
.item-goods-properts {
display: flex;
flex-direction: row;
margin-bottom: 10px;
}
.form-item {
display: flex;
align-items: center;
}
/** 审核信息-拒绝原因 */
.auth-info {
color: red;
}
.el-form-item {
width: 30%;
min-width: 300px;
}
.goods-name-width {
width: 50%;
min-width: 300px;
}
.el-form-item__content {
margin-left: 120px;
text-align: left;
}
p.goods-group-manager {
padding-left: 7.5%;
text-align: left;
color: #999;
font-size: 13px;
}
/*teatarea*/
/deep/ .el-textarea {
width: 150%;
}
.seo-text {
width: 150%;
}
}
/*折叠面板*/
.el-collapse-item {
/deep/ .el-collapse-item__header {
text-align: left;
background-color: #f8f8f8;
padding: 0 10px;
font-weight: bold;
color: #333;
font-size: 14px;
}
.el-form-item {
margin-left: 5%;
width: 25%;
}
/deep/ .el-form-item__content {
margin-left: 120px;
text-align: left;
}
p.goods-group-manager {
padding-left: 12%;
text-align: left;
color: #999;
}
/deep/ .el-collapse-item__content {
padding: 10px 0;
text-align: left;
}
}
/*商品描述*/
.goods-intro {
line-height: 40;
}
/** 底部步骤 */
.footer {
width: 88.7%;
padding: 10px;
background-color: #ffc;
position: fixed;
bottom: 0px;
left: 10%;
text-align: center;
z-index: 9999;
}
/*图片上传组件第一张图设置封面*/
.goods-images {
/deep/ li.el-upload-list__item:first-child {
position: relative;
}
/deep/ li.el-upload-list__item:first-child:after {
content: "";
color: #fff;
font-weight: bold;
font-size: 12px;
position: absolute;
left: -15px;
top: -6px;
width: 40px;
height: 24px;
padding-top: 6px;
background: #13ce66;
text-align: center;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
}
}
.el-form-item__label {
word-break: break-all;
}
.step-view {
width: 33%;
height: 40px;
font-size: 19px;
text-align: center;
display: flex;
background-color: #fff;
justify-content: center;
align-items: center;
}
.page {
margin-top: 2vh;
margin-bottom: 5vh;
}

View File

@ -118,9 +118,9 @@ export default {
formRule: {
promotionName: [{ required: true, message: "请填写活动名称" }],
applyEndTime: [{ required: true, message: "请填写报名截止时间" }],
applyEndTime: [{ required: true, message: "请选择报名截止时间" }],
seckillPeriod: [{ required: true, message: "请填写抢购时间段" }],
startTime: [{ required: true, message: "请填写活动开始时间" }],
startTime: [{ required: true, message: "请选择活动开始时间" }],
seckillRule: [{ required: true, message: "请输入申请规则" }],
},
};
@ -139,6 +139,7 @@ export default {
localStorage.pageOpenedList = JSON.stringify(this.$store.state.app.pageOpenedList);
this.$router.go(-1);
},
//
getData() {
seckillDetail(this.id).then((res) => {
if (res.success) {
@ -201,8 +202,18 @@ export default {
</script>
<style lang="scss" scoped>
@import "addSeckill.scss";
.ivu-form-item{
margin-bottom: 30px;
h4 {
margin-bottom: 10px;
padding: 0 10px;
border: 1px solid #ddd;
background-color: #f8f8f8;
font-weight: bold;
color: #333;
font-size: 14px;
line-height: 40px;
text-align: left;
}
// .ivu-form-item{
// margin-bottom: 30px;
// }
</style>

View File

@ -63,7 +63,7 @@ import setupSeckill from "@/views/promotion/seckill/setupSeckill";
export default {
name: "seckill",
components: {
setupSeckill,
setupSeckill
},
data() {
return {
@ -131,33 +131,32 @@ export default {
};
},
methods: {
// tab
clickTabPane(name) {
if (name == "setup") {
this.setupFlag = true;
} else {
this.setupFlag = false;
}
},
//
init() {
this.getDataList();
},
//
//
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
this.clearSelectAll();
},
//
//
changePageSize(v) {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = v;
this.getDataList();
},
//
handleSearch() {
this.searchForm.pageNumber = 0;
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},

View File

@ -308,25 +308,26 @@
};
},
methods: {
//
init() {
this.getSeckillMsg();
},
//
changePage(v) {
this.searchForm.pageNumber = v - 1;
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);
},
changeSelect(e) {
//
this.selectList = e;
@ -379,17 +380,15 @@
}
return hourArr;
},
//
promotionApplyStatus(key) {
switch (key) {
case "APPLY":
return "申请";
break;
case "PASS":
return "通过";
break;
case "REFUSE":
return "拒绝";
break;
}
},
pass(row) {
@ -421,6 +420,7 @@
}
this.showModal = true;
},
//
sureAudit() {
this.selectCount = this.selectList.length;
//
@ -453,6 +453,7 @@
}
});
},
//
showReason(reason) {
this.$Modal.info({
title: "拒绝原因",

View File

@ -18,7 +18,6 @@
</div>
</FormItem>
</Form>
<!-- 选择时间 -->
</div>
</template>
@ -27,9 +26,8 @@ import { getSetting, setSetting } from "@/api/index";
export default {
data() {
return {
templateShow:false,
templateShow:false, //
submitLoading: false,
selectedTime: [],
times: [], // 1-24
form: {
seckillRule: "",
@ -107,7 +105,6 @@ export default {
}
}
},
/**
* 选中时间
*/

View File

@ -1,12 +1,11 @@
<template>
<Card>
<Row class="operation">
<Button @click="asyncRegion" :loading="asyncLoading" type="primary" icon="md-add"
<Button @click="handleAsyncRegion" :loading="asyncLoading" type="primary" icon="md-add"
>同步数据</Button
>
</Row>
<div class="flex">
<Spin size="large" fix v-if="spinShow"></Spin>
<Tree
class="tree"
:data="data"
@ -99,7 +98,6 @@ export default {
asyncLoading:false, //
num: 10, //
modalFlag: false, //
spinShow: false, //
timerNum: 10, //
data: [], //
id: 0, // id
@ -122,7 +120,6 @@ export default {
trigger: "blur",
},
],
center: [
{
required: true,
@ -144,6 +141,7 @@ export default {
this.init();
},
methods: {
//
submit() {
delete this.addValidate.children;
addRegion(this.addValidate).then((res) => {
@ -190,7 +188,7 @@ export default {
this.addValidate.center = "";
this.modalFlag = true;
},
//
handleDel() {
this.$Modal.confirm({
title: "确定删除?",
@ -227,11 +225,11 @@ export default {
}
});
},
//
changeTree(array, val) {
this.formValidate = val;
},
//
loadData(item, callback) {
item.loading = true;
console.log(item);
@ -267,7 +265,7 @@ export default {
}
});
},
//
init() {
getChildRegion(this.id).then((res) => {
if (res.result) {
@ -294,8 +292,8 @@ export default {
}
});
},
asyncRegion() {
//
handleAsyncRegion() {
this.num = 10;
this.$Modal.confirm({
title: "确定更新?",

View File

@ -27,7 +27,7 @@
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form>
</Row>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10"></Table>
<Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page>
@ -51,8 +51,6 @@
},
data() {
return {
shopId: "", // id
modalFlag: false, //
loading: true, //
searchForm: {
//
@ -64,16 +62,6 @@
endDate: "", //
},
selectDate: null, //
form: {
//
memberName: "",
storeName: "",
shopDisable: "",
id: "",
createTime: "",
},
selectList: [], //
selectCount: 0, //
columns: [
//
{
@ -264,52 +252,38 @@
},
methods: {
callbackShop() {
this.init();
},
//
callback(val) {
this.$emit("callback", val);
},
//
init() {
this.getDataList();
},
//
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
this.clearSelectAll();
},
//
changePageSize(v) {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = v;
this.getDataList();
},
//
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
clearSelectAll() {
this.$refs.table.selectAll(false);
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
//
selectDateRange(v) {
if (v) {
this.searchForm.startDate = v[0];
this.searchForm.endDate = v[1];
}
},
//
getDataList() {
this.loading = true;
//
@ -324,16 +298,19 @@
this.total = this.data.length;
this.loading = false;
},
//
add() {
this.$router.push({ path: '/shop-operation'});
},
//
edit(v) {
this.$router.push({ path: '/shop-operation', query: { shopId: v.id } });
},
//
disable(v) {
this.$Modal.confirm({
title: "确认禁用",
content: "您确认要禁用店铺 " + v.storeName + " ?",
title: "确认关闭",
content: "您确认要关闭店铺 " + v.storeName + " ?",
loading: true,
onOk: () => {
disableShop(v.id).then((res) => {
@ -346,6 +323,7 @@
},
});
},
//
audit(v) {
this.$Modal.confirm({
title: "审核店铺",
@ -373,10 +351,11 @@
},
});
},
//
enable(v) {
this.$Modal.confirm({
title: "确认",
content: "您确认要店铺 " + v.storeName + " ?",
title: "确认启",
content: "您确认要启店铺 " + v.storeName + " ?",
loading: true,
onOk: () => {
enableBrand(v.id).then((res) => {

View File

@ -121,6 +121,3 @@
line-height: 16px;
}
}
.point-data{
}

View File

@ -252,8 +252,6 @@
:data="orderData"
ref="table"
class="mt_10"
sortable="custom"
@on-sort-change="orderChangeSort"
>
<!-- 订单详情格式化 -->
<template slot="orderSlot" slot-scope="scope">
@ -354,8 +352,6 @@
:data="refundGoodsOrderData"
ref="table"
class="mt_10"
sortable="custom"
@on-sort-change="refundGoodsOrderChangeSort"
>
<!-- 商品栏目格式化 -->
<template slot="goodsSlot" slot-scope="scope">
@ -478,8 +474,6 @@
:data="refundOrderData"
ref="table"
class="mt_10"
sortable="custom"
@on-sort-change="refundOrderChangeSort"
>
<!-- 商品栏目格式化 -->
<template slot="goodsSlot" slot-scope="scope">
@ -554,7 +548,6 @@
storeInfo: {},//
checkAllGroup: [], //
selectDate: null, //
submitLoading: false, //
orderColumns: [
{
@ -902,21 +895,6 @@
});
this.loading = false;
},
detail(v) {
let sn = v.sn;
this.$router.push({
name: "after-order-detail",
query: {sn: sn},
});
},
//
orderDetail(v) {
this.$router.push({
name: "order-detail",
query: {sn: v},
});
},
//
getCategories() {
getCategoryTree().then((res) => {
@ -925,8 +903,6 @@
}
});
},
//
refundGoodsOrderChangePage(v) {
this.refundGoodsOrderSearchForm.pageNumber = v;
@ -936,15 +912,9 @@
//
refundGoodsOrderChangePageSize(v) {
this.refundGoodsOrderSearchForm.pageSize = v;
this.refundGoodsOrderSearchForm.pageNumber = 1;
this.getRefundGoodsOrderData();
},
//
refundGoodsOrderChangeSort(e) {
this.refundGoodsOrderSearchForm.sort = e.key;
this.refundGoodsOrderSearchForm.order = e.order;
this.getRefundGoodsOrderData();
},
//退
refundOrderChangePage(v) {
this.refundOrderSearchForm.pageNumber = v;
@ -954,12 +924,7 @@
//
refundOrderChangePageSize(v) {
this.refundOrderSearchForm.pageSize = v;
this.getRefundOrder();
},
//
refundOrderChangeSort(e) {
this.refundOrderSearchForm.sort = e.key;
this.refundOrderSearchForm.order = e.order;
this.refundOrderSearchForm.pageNumber = 1;
this.getRefundOrder();
},
//
@ -971,25 +936,24 @@
//
orderChangePageSize(v) {
this.orderSearchForm.pageSize = v;
this.orderSearchForm.pageNumber = 1;
this.getOrderData();
},
orderChangeSort(e) {
this.orderSearchForm.sort = e.key;
this.orderSearchForm.order = e.order;
this.getOrderData();
},
//
selectDateRange(v) {
if (v) {
this.orderSearchForm.startDate = v[0];
this.orderSearchForm.endDate = v[1];
}
},
//
selectRefundGoodsDateRange(v) {
if (v) {
this.refundGoodsOrderSearchForm.startDate = v[0];
this.refundGoodsOrderSearchForm.endDate = v[1];
}
},
//
selectRefundDateRange(v) {
if (v) {
this.refundOrderSearchForm.startDate = v[0];
@ -997,12 +961,10 @@
}
},
},
mounted() {
this.id = this.$route.query.id;
this.init();
}
,
};
</script>
<style lang="scss" scoped>

View File

@ -30,16 +30,16 @@
<Option value="REFUSED">审核拒绝</Option>
</Select>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Form-item label="创建时间" prop="createTime">
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form>
</Row>
<Row class="operation padding-row">
<Button @click="add" type="primary">添加</Button>
</Row>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
<Table :loading="loading" border :columns="columns" :data="data" ref="table"></Table>
<Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page>
@ -55,16 +55,10 @@ import {
enableBrand,
shopAudit,
} from "@/api/shops";
import shopOperation from "./shopOperation";
export default {
name: "shop",
components: {
shopOperation,
},
data() {
return {
shopId: "", // id
modalFlag: false, //
loading: true, //
searchForm: {
//
@ -76,17 +70,6 @@ export default {
endDate: "", //
},
selectDate: null, //
form: {
//
memberName: "",
storeName: "",
shopDisable: "",
id: "",
createTime: "",
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
//
{
@ -314,52 +297,39 @@ export default {
},
methods: {
callbackShop() {
this.init();
},
//
callback(val) {
this.$emit("callback", val);
},
//
init() {
this.getDataList();
},
//
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
this.clearSelectAll();
},
//
changePageSize(v) {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = v;
this.getDataList();
},
//
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
clearSelectAll() {
this.$refs.table.selectAll(false);
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
//
selectDateRange(v) {
if (v) {
this.searchForm.startDate = v[0];
this.searchForm.endDate = v[1];
}
},
//
getDataList() {
this.loading = true;
//
@ -373,16 +343,19 @@ export default {
this.total = this.data.length;
this.loading = false;
},
//
add() {
this.$router.push({ path: '/shop-operation'});
},
//
edit(v) {
this.$router.push({ path: '/shop-operation', query: { shopId: v.id } });
},
//
disable(v) {
this.$Modal.confirm({
title: "确认禁用",
content: "您确认要禁用店铺 " + v.storeName + " ?",
title: "确认关闭",
content: "您确认要关闭店铺 " + v.storeName + " ?",
loading: true,
onOk: () => {
disableShop(v.id).then((res) => {
@ -399,6 +372,7 @@ export default {
detail(row){
this.$router.push({ name: "shop-detail", query: { id: row.id } });
},
//
audit(v) {
this.$Modal.confirm({
title: "审核店铺",
@ -426,10 +400,11 @@ export default {
},
});
},
//
enable(v) {
this.$Modal.confirm({
title: "确认",
content: "您确认要店铺 " + v.storeName + " ?",
title: "确认启",
content: "您确认要启店铺 " + v.storeName + " ?",
loading: true,
onOk: () => {
enableBrand(v.id).then((res) => {

View File

@ -388,7 +388,7 @@ export default {
},
categories: [], //
infoResult: "", //
infoResult: {}, //
};
},
methods: {
@ -452,30 +452,25 @@ export default {
this.shopForm.salesConsigneeAddressPath = val[1];
this.shopForm.salesConsigneeAddressId = val[0];
},
// modal
handleCLickImg(val) {
this.$refs.ossManage.selectImage = true;
this.picModalFlag = true;
this.selectedFormBtnName = val;
},
//
callbackSelected(val) {
this.picModalFlag = false;
this.shopForm[this.selectedFormBtnName] = val.url;
},
//
init() {
this.getCategories();
if (this.shopId) {
this.getShopDetail();
}
},
filterMethod(value, option) {
if (value && option) {
return option.toUpperCase().indexOf(value.toUpperCase()) !== -1;
}
},
//
getShopDetail() {
shopDetail(this.shopId).then((res) => {
if (res.result) {
@ -490,6 +485,7 @@ export default {
}
});
},
//
save() {
this.$refs.shopForm.validate((valid) => {
//
@ -542,6 +538,7 @@ export default {
this.$set(this.shopForm, "storeAddressPath", item.addr);
this.$set(this.shopForm, "storeAddressIdPath", item.addrId);
},
//
handleCheckAll() {
if (this.indeterminate) {
this.checkAll = false;
@ -558,6 +555,7 @@ export default {
this.checkAllGroup = [];
}
},
//
checkAllGroupChange(data) {
if (data.length === this.categories.length) {
this.indeterminate = false;
@ -570,6 +568,7 @@ export default {
this.checkAll = false;
}
},
//
getCategories() {
getCategoryTree().then((res) => {
if (res.success) {

View File

@ -11,8 +11,6 @@
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></Table>
<Row type="flex" justify="end" class="mt_10">
@ -59,8 +57,7 @@ import {
updateSensitiveWords
} from "@/api/index";
export default {
name: "bill",
components: {},
name: "sensitiveWords",
data() {
return {
loading: true, //
@ -172,36 +169,25 @@ export default {
};
},
methods: {
//
init() {
this.getDataList();
},
//
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
this.clearSelectAll();
},
//
changePageSize(v) {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = v;
this.getDataList();
},
//
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
handleReset() {
this.$refs.searchForm.resetFields();
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
//
this.getDataList();
},
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
clearSelectAll() {
@ -211,7 +197,7 @@ export default {
this.selectList = e;
this.selectCount = e.length;
},
//
getDataList() {
this.loading = true;
@ -225,6 +211,7 @@ export default {
this.total = this.data.length;
this.loading = false;
},
//
handleSubmit() {
this.$refs.form.validate((valid) => {
if (valid) {
@ -255,6 +242,7 @@ export default {
}
});
},
//
add() {
this.modalType = 0;
this.modalTitle = "添加";
@ -263,6 +251,7 @@ export default {
this.modalVisible = true;
},
//
detail(v) {
this.modalType = 1;
this.id = v.id;
@ -270,6 +259,7 @@ export default {
this.modalVisible = true;
this.form.sensitiveWord = v.sensitiveWord;
},
//
remove(v) {
this.$Modal.confirm({
title: "确认删除",
@ -288,6 +278,7 @@ export default {
},
});
},
//
delAll() {
if (this.selectCount <= 0) {
this.$Message.warning("您还未选择要删除的数据");