mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-18 00:45:54 +08:00
合并分支
This commit is contained in:
@@ -5,6 +5,13 @@ import { getRequest, postRequest, putRequest, deleteRequest} from '@/libs/axios'
|
||||
export const getManagerBrandPage = (params) => {
|
||||
return getRequest('/goods/brand/getByPage', params)
|
||||
}
|
||||
|
||||
// 批量删除
|
||||
export const delBrand = (ids) =>{
|
||||
return deleteRequest(`/goods/brand/delByIds/${ids}`)
|
||||
}
|
||||
|
||||
|
||||
// 添加
|
||||
export const addBrand = (params) => {
|
||||
return postRequest('/goods/brand', params)
|
||||
@@ -69,15 +76,15 @@ export const disableCategory = (id, type) => {
|
||||
|
||||
// 获取商品规格分页列表
|
||||
export const getSpecListData = (params) => {
|
||||
return getRequest('/goods/spec/page', params)
|
||||
return getRequest('/goods/spec', params)
|
||||
}
|
||||
// 添加或修改规格设置
|
||||
export const insertSpec = (params) => {
|
||||
return postRequest('/goods/spec', params)
|
||||
}
|
||||
// 添加或修改规格设置
|
||||
export const updateSpec = (params) => {
|
||||
return putRequest('/goods/spec', params)
|
||||
export const updateSpec = (id,params) => {
|
||||
return putRequest(`/goods/spec/${id}`, params)
|
||||
}
|
||||
//根据分类id获取关联规格
|
||||
export const getCategorySpecListData = (category_id, params) => {
|
||||
@@ -87,15 +94,6 @@ export const getCategorySpecListData = (category_id, params) => {
|
||||
export const delSpec = (id, params) => {
|
||||
return deleteRequest(`/goods/spec/${id}`, params)
|
||||
}
|
||||
// 获取商品规格值列表
|
||||
export const getSpecValuesListData = (id, params) => {
|
||||
return getRequest(`/goods/specValues/values/${id}`, params)
|
||||
}
|
||||
// 添加商品规格值
|
||||
export const saveSpecValues = (id, params) => {
|
||||
return postRequest(`/goods/specValues/save/${id}`, params)
|
||||
}
|
||||
|
||||
|
||||
// 查询某分类下的全部子分类列表
|
||||
export const getGoodsCategory = (parent_id) => {
|
||||
|
||||
@@ -30,7 +30,7 @@ export const getLiveList = params => {
|
||||
|
||||
// 获取直播间详情
|
||||
export const getLiveInfo = studioId => {
|
||||
return getRequest(`/broadcast/studio/studioInfo/${studioId}`);
|
||||
return getRequest(`/broadcast/studio/${studioId}`);
|
||||
};
|
||||
|
||||
// 获取当前进行中的促销活动商品
|
||||
|
||||
@@ -64,14 +64,6 @@ service.interceptors.response.use(
|
||||
}
|
||||
return data;
|
||||
break;
|
||||
case 403:
|
||||
// 权限不足
|
||||
if (data.message !== null) {
|
||||
Message.error(data.message);
|
||||
} else {
|
||||
Message.error("权限不足");
|
||||
}
|
||||
break;
|
||||
case 500:
|
||||
// 系统异常
|
||||
if (data.message !== null) {
|
||||
@@ -89,6 +81,8 @@ service.interceptors.response.use(
|
||||
if (error.response) {
|
||||
if (error.response.status === 401) {
|
||||
// 这种情况一般调到登录页
|
||||
} else if (error.response.status === 404) {
|
||||
// 避免刷新token报错
|
||||
} else if (error.response.status === 403) {
|
||||
isRefreshToken++;
|
||||
if(isRefreshToken === 1) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import ViewUI from 'view-design'
|
||||
import './styles/theme.less';
|
||||
|
||||
import "core-js/stable"
|
||||
import "regenerator-runtime/runtime"
|
||||
// import "regenerator-runtime/runtime"
|
||||
import App from './App'
|
||||
import { router } from './router/index'
|
||||
import store from './store'
|
||||
|
||||
@@ -16,6 +16,22 @@ export function unitPrice(val, unit, location) {
|
||||
return (unit || '') + price
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单来源
|
||||
*/
|
||||
export function clientTypeWay(val) {
|
||||
if (val == "H5") {
|
||||
return "移动端";
|
||||
} else if (val == "PC") {
|
||||
return "PC端";
|
||||
} else if (val == "WECHAT_MP") {
|
||||
return "小程序端";
|
||||
} else if (val == "APP") {
|
||||
return "移动应用端";
|
||||
} else {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -147,21 +147,13 @@ export default {
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if (params.row.distributionStatus == "PASS") {
|
||||
return h("Badge", {
|
||||
props: { status: "success", text: "审核通过" },
|
||||
});
|
||||
return h("Tag", {props: {color: "green",},},"通过");
|
||||
} else if (params.row.distributionStatus == "APPLY") {
|
||||
return h("Badge", {
|
||||
props: { status: "processing", text: "申请中" },
|
||||
});
|
||||
return h("Tag", {props: {color: "geekblue",},},"待审核");
|
||||
} else if (params.row.distributionStatus == "RETREAT") {
|
||||
return h("Badge", {
|
||||
props: { status: "warning", text: "已清退" },
|
||||
});
|
||||
return h("Tag", {props: {color: "volcano",},},"清退");
|
||||
} else if (params.row.distributionStatus == "REFUSE") {
|
||||
return h("Badge", {
|
||||
props: { status: "error", text: "审核拒绝" },
|
||||
});
|
||||
return h("Tag", {props: {color: "red",},},"拒绝");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -67,10 +67,12 @@ export default {
|
||||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
align: "center"
|
||||
align: "center",
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: "商品图片",
|
||||
fixed: "left",
|
||||
key: "thumbnail",
|
||||
width: 120,
|
||||
align: "center",
|
||||
|
||||
@@ -38,6 +38,12 @@
|
||||
<Option value="DOWN">下架</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="商品类型" prop="status">
|
||||
<Select v-model="searchForm.goodsType" placeholder="请选择" clearable style="width: 200px">
|
||||
<Option value="PHYSICAL_GOODS">实物商品</Option>
|
||||
<Option value="VIRTUAL_GOODS">虚拟商品</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search" >搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
@@ -174,29 +180,29 @@ export default {
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "商品类型",
|
||||
key: "goodsType",
|
||||
width: 130,
|
||||
render: (h, params) => {
|
||||
if (params.row.goodsType === 'PHYSICAL_GOODS') {
|
||||
return h("Tag", {props: {color: "green",},}, "实物商品");
|
||||
} else if (params.row.goodsType === 'VIRTUAL_GOODS') {
|
||||
return h("Tag", {props: {color: "volcano",},}, "虚拟商品");
|
||||
} else {
|
||||
return h("Tag", {props: {color: "geekblue",},}, "电子卡券");
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
key: "marketEnable",
|
||||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.marketEnable == "DOWN") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "下架",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "green"},},"上架");
|
||||
} else if (params.row.marketEnable == "UPPER") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "上架",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "volcano",},},"下架");
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -206,36 +212,14 @@ export default {
|
||||
width: 130,
|
||||
render: (h, params) => {
|
||||
if (params.row.isAuth == "TOBEAUDITED") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "待审核",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "volcano",},},"待审核");
|
||||
} else if (params.row.isAuth == "PASS") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "审核通过",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "green"},},"通过");
|
||||
} else if (params.row.isAuth == "REFUSE") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "审核拒绝",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "red",},},"拒绝");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: "店铺名称",
|
||||
key: "storeName",
|
||||
|
||||
@@ -1,25 +1,13 @@
|
||||
<style lang="scss">
|
||||
@import "@/styles/table-common.scss";
|
||||
@import "@/styles/table-common.scss";
|
||||
</style>
|
||||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<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="name">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.name"
|
||||
placeholder="请输入品牌名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
<Input type="text" v-model="searchForm.name" placeholder="请输入品牌名称" clearable style="width: 200px" />
|
||||
</Form-item>
|
||||
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
@@ -28,370 +16,361 @@
|
||||
<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" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<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>
|
||||
<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"
|
||||
>
|
||||
<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%"/>
|
||||
<Input v-model="form.name" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="品牌图标" prop="logo">
|
||||
<upload-pic-input
|
||||
v-model="form.logo"
|
||||
style="width: 100%"
|
||||
></upload-pic-input>
|
||||
<upload-pic-input v-model="form.logo" 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
|
||||
>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交
|
||||
</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getManagerBrandPage, addBrand,updateBrand, disableBrand} from "@/api/goods";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
import {
|
||||
getManagerBrandPage,
|
||||
addBrand,
|
||||
updateBrand,
|
||||
disableBrand,
|
||||
delBrand,
|
||||
} from "@/api/goods";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
|
||||
export default {
|
||||
name: "brand",
|
||||
components: {
|
||||
uploadPicInput,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "create_time", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
export default {
|
||||
name: "brand",
|
||||
components: {
|
||||
uploadPicInput,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "create_time", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
name: "",
|
||||
logo: "",
|
||||
deleteFlag: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
{
|
||||
title: "品牌名称",
|
||||
key: "name",
|
||||
width: 200,
|
||||
resizable: true,
|
||||
sortable: false,
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
name: "",
|
||||
logo: "",
|
||||
deleteFlag: "",
|
||||
{
|
||||
title: "品牌图标",
|
||||
key: "logo",
|
||||
align: "left",
|
||||
render: (h, params) => {
|
||||
return h("img", {
|
||||
attrs: {
|
||||
src: params.row.logo,
|
||||
alt: "加载图片失败",
|
||||
},
|
||||
style: {
|
||||
cursor: "pointer",
|
||||
width: "80px",
|
||||
height: "60px",
|
||||
margin: "10px 0",
|
||||
"object-fit": "contain",
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
{
|
||||
title: "品牌名称",
|
||||
key: "name",
|
||||
width: 200,
|
||||
resizable: true,
|
||||
sortable: false,
|
||||
},
|
||||
{
|
||||
title: "品牌图标",
|
||||
key: "logo",
|
||||
align: "left",
|
||||
render: (h, params) => {
|
||||
return h("img", {
|
||||
attrs: {
|
||||
src: params.row.logo,
|
||||
alt: "加载图片失败",
|
||||
},
|
||||
style: {
|
||||
cursor: "pointer",
|
||||
width: "80px",
|
||||
height: "60px",
|
||||
margin: "10px 0",
|
||||
"object-fit": "contain",
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
key: "deleteFlag",
|
||||
align: "left",
|
||||
render: (h, params) => {
|
||||
if (params.row.deleteFlag == 0) {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "启用",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
} else if (params.row.deleteFlag == 1) {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "禁用",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
}
|
||||
},
|
||||
filters: [
|
||||
{
|
||||
label: "启用",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: "禁用",
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
filterMultiple: false,
|
||||
filterMethod(value, row) {
|
||||
if (value == 0) {
|
||||
return row.deleteFlag == 0;
|
||||
} else if (value == 1) {
|
||||
return row.deleteFlag == 1;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
width: 180,
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
render: (h, params) => {
|
||||
let enableOrDisable = "";
|
||||
if (params.row.deleteFlag == 0) {
|
||||
enableOrDisable = h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
size: "small",
|
||||
type: "error",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.disable(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"禁用"
|
||||
);
|
||||
} else {
|
||||
enableOrDisable = h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "success",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.enable(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"启用"
|
||||
);
|
||||
}
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "info",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.edit(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();
|
||||
},
|
||||
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;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getManagerBrandPage(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
console.warn(12)
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
if (this.modalType === 0) {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
addBrand(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 编辑
|
||||
updateBrand(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
{
|
||||
title: "状态",
|
||||
key: "deleteFlag",
|
||||
align: "left",
|
||||
render: (h, params) => {
|
||||
if (params.row.deleteFlag == 0) {
|
||||
return h("Tag", {props: {color: "green",},},"启用");
|
||||
} else if (params.row.deleteFlag == 1) {
|
||||
return h("Tag", {props: {color: "volcano",},},"禁用");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
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] = "";
|
||||
},
|
||||
filters: [
|
||||
{
|
||||
label: "启用",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: "禁用",
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
filterMultiple: false,
|
||||
filterMethod(value, row) {
|
||||
if (value == 0) {
|
||||
return row.deleteFlag == 0;
|
||||
} else if (value == 1) {
|
||||
return row.deleteFlag == 1;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
width: 180,
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
render: (h, params) => {
|
||||
let enableOrDisable = "";
|
||||
if (params.row.deleteFlag == 0) {
|
||||
enableOrDisable = h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
size: "small",
|
||||
type: "error",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.disable(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"禁用"
|
||||
);
|
||||
} else {
|
||||
enableOrDisable = h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "success",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.enable(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"启用"
|
||||
);
|
||||
}
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "info",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.edit(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"编辑"
|
||||
),
|
||||
enableOrDisable,
|
||||
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.delBrand(params.row.id);
|
||||
},
|
||||
},
|
||||
},
|
||||
"删除"
|
||||
),
|
||||
]);
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 删除品牌
|
||||
async delBrand(id) {
|
||||
let res = await delBrand(id);
|
||||
|
||||
if (res.success) {
|
||||
this.$Message.success("品牌删除成功!");
|
||||
this.getDataList();
|
||||
}
|
||||
},
|
||||
|
||||
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();
|
||||
},
|
||||
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;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getManagerBrandPage(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
console.warn(12);
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
if (this.modalType === 0) {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
addBrand(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 编辑
|
||||
updateBrand(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
let str = JSON.stringify(v);
|
||||
let data = JSON.parse(str);
|
||||
this.form = data;
|
||||
this.modalVisible = true;
|
||||
},
|
||||
enable(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认启用",
|
||||
content: "您确认要启用品牌 " + v.name + " ?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
disableBrand(v.id, {disable: false}).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: () => {
|
||||
disableBrand(v.id, {disable: true}).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
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.name + " ?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
disableBrand(v.id, { disable: false }).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: () => {
|
||||
disableBrand(v.id, { disable: true }).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<tree-table ref="treeTable" size="default" :loading="loading" :data="tableData" :columns="columns" :border="true" :show-index="false" :is-fold="true" :expand-type="false" primary-key="id">
|
||||
|
||||
<template slot="action" slot-scope="scope">
|
||||
<Dropdown v-show="scope.row.level == 2" transfer="true" trigger="click">
|
||||
<Dropdown v-show="scope.row.level == 2" transfer="true" trigger="click">
|
||||
<Button size="small">
|
||||
绑定
|
||||
<Icon type="ios-arrow-down"></Icon>
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
<Modal :title="modalSpecTitle" v-model="modalSpecVisible" :mask-closable="false" :width="500">
|
||||
<Form ref="specForm" :model="specForm" :label-width="100">
|
||||
<Select v-model="specForm.category_specs" multiple>
|
||||
<Select v-model="specForm.categorySpecs" multiple>
|
||||
<Option v-for="item in specifications" :value="item.id" :key="item.id" :label="item.specName">
|
||||
</Option>
|
||||
</Select>
|
||||
@@ -134,7 +134,6 @@ import {
|
||||
} from "@/api/goods";
|
||||
import TreeTable from "@/views/my-components/tree-table/Table/Table";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
import * as filters from "@/utils/filters";
|
||||
|
||||
export default {
|
||||
name: "lili-components",
|
||||
@@ -153,7 +152,7 @@ export default {
|
||||
specifications: [], //规格集合
|
||||
categoryId: "", // 分类id
|
||||
category_brands: [], //已经选择的品牌
|
||||
category_specs: [], //已经选择的规格
|
||||
categorySpecs: [], //已经选择的规格
|
||||
expandLevel: 1, // 展开层级
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
@@ -212,13 +211,17 @@ export default {
|
||||
},
|
||||
],
|
||||
tableData: [],
|
||||
categoryIndex: 0,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
changeSortCate(val) {
|
||||
let way = this.categoryList.find((item) => {
|
||||
return item.name == val;
|
||||
let way = this.categoryList.find((item, index) => {
|
||||
if (item.name == val) {
|
||||
this.categoryIndex = index;
|
||||
console.log((this.categoryIndex = index));
|
||||
return item.name == val;
|
||||
}
|
||||
});
|
||||
this.tableData = [way];
|
||||
},
|
||||
@@ -236,7 +239,8 @@ export default {
|
||||
//获取所有规格
|
||||
getSpecList() {
|
||||
getSpecificationList().then((res) => {
|
||||
if (res.success) {
|
||||
if (res.length != 0) {
|
||||
|
||||
this.specifications = res;
|
||||
}
|
||||
});
|
||||
@@ -244,7 +248,7 @@ export default {
|
||||
//弹出品牌关联框
|
||||
brandOperation(v) {
|
||||
getCategoryBrandListData(v.id).then((res) => {
|
||||
console.warn(res)
|
||||
console.warn(res);
|
||||
this.categoryId = v.id;
|
||||
this.modalBrandTitle = "品牌关联";
|
||||
this.brandForm.categoryBrands = res.result.map((item) => item.id);
|
||||
@@ -257,7 +261,7 @@ export default {
|
||||
getCategorySpecListData(v.id).then((res) => {
|
||||
this.categoryId = v.id;
|
||||
this.modalSpecTitle = "规格关联";
|
||||
this.specForm.category_specs = res.map((item) => item.id);
|
||||
this.specForm.categorySpecs = res.map((item) => item.id);
|
||||
this.modalSpecVisible = true;
|
||||
});
|
||||
},
|
||||
@@ -337,7 +341,7 @@ export default {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("添加成功");
|
||||
this.getAllList(0);
|
||||
this.getAllList(this.categoryIndex);
|
||||
this.modalVisible = false;
|
||||
this.$refs.form.resetFields();
|
||||
}
|
||||
@@ -348,7 +352,7 @@ export default {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("修改成功");
|
||||
this.getAllList(0);
|
||||
this.getAllList(this.categoryIndex);
|
||||
this.modalVisible = false;
|
||||
this.$refs.form.resetFields();
|
||||
}
|
||||
@@ -376,13 +380,11 @@ export default {
|
||||
});
|
||||
},
|
||||
getAllList(parent_id) {
|
||||
this.sortCateList = []
|
||||
this.sortCateList = [];
|
||||
this.loading = true;
|
||||
getCategoryTree(parent_id).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
// 仅展开指定级数 默认后台已展开所有
|
||||
let expandLevel = this.expandLevel;
|
||||
localStorage.setItem("category", JSON.stringify(res.result));
|
||||
res.result.forEach((e, index, arr) => {
|
||||
this.sortCateList.push({
|
||||
@@ -390,65 +392,13 @@ export default {
|
||||
value: e.name,
|
||||
});
|
||||
this.sortCate = arr[0].name;
|
||||
if (expandLevel == 1) {
|
||||
if (e.level == 0) {
|
||||
e.expand = false;
|
||||
}
|
||||
if (e.children && e.children.length > 0) {
|
||||
e.children.forEach(function (c) {
|
||||
if (c.level == 1) {
|
||||
c.expand = false;
|
||||
}
|
||||
if (c.children && c.children.length > 0) {
|
||||
c.children.forEach(function (b) {
|
||||
if (b.level == 2) {
|
||||
b.expand = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (expandLevel == 2) {
|
||||
if (e.level == 0) {
|
||||
e.expand = true;
|
||||
}
|
||||
if (e.children && e.children.length > 0) {
|
||||
e.children.forEach(function (c) {
|
||||
if (c.level == 1) {
|
||||
c.expand = false;
|
||||
}
|
||||
if (c.children && c.children.length > 0) {
|
||||
c.children.forEach(function (b) {
|
||||
if (b.level == 2) {
|
||||
b.expand = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (expandLevel == 3) {
|
||||
if (e.level == 0) {
|
||||
e.expand = true;
|
||||
}
|
||||
if (e.children && e.children.length > 0) {
|
||||
e.children.forEach(function (c) {
|
||||
if (c.level == 1) {
|
||||
c.expand = true;
|
||||
}
|
||||
if (c.children && c.children.length > 0) {
|
||||
c.children.forEach(function (b) {
|
||||
if (b.level == 2) {
|
||||
b.expand = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.categoryList = res.result;
|
||||
this.tableData = [res.result[0]];
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$set(this, "tableData", [res.result[this.categoryIndex]]);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -508,22 +458,8 @@ export default {
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
}
|
||||
.article {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
margin: 12px 0;
|
||||
}
|
||||
|
||||
.href-text {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.operation {
|
||||
margin-bottom: 2vh;
|
||||
}
|
||||
|
||||
.select-count {
|
||||
font-weight: 600;
|
||||
color: #40a9ff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary" >添加</Button>
|
||||
<Button @click="delAll" >批量删除</Button>
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
<Button @click="delAll">批量删除</Button>
|
||||
</Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
@@ -60,53 +60,33 @@
|
||||
>
|
||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||
<FormItem label="规格名称" prop="specName">
|
||||
<Input v-model="form.specName" maxlength="30" clearable style="width: 100%" />
|
||||
<Input v-model="form.specName" maxlength="30" clearable style="width: 100%"/>
|
||||
</FormItem>
|
||||
<FormItem label="规格值" prop="specValue">
|
||||
<Select
|
||||
v-model="form.specValue"
|
||||
placeholder="输入后回车添加"
|
||||
multiple
|
||||
filterable
|
||||
allow-create
|
||||
:popper-append-to-body="false"
|
||||
popper-class="spec-values-popper"
|
||||
style="width: 100%; text-align: left; margin-right: 10px"
|
||||
>
|
||||
<Option
|
||||
v-for="item in specValue"
|
||||
:value="item"
|
||||
:label="item"
|
||||
>
|
||||
</Option>
|
||||
</Select>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="saveSpec"
|
||||
>提交</Button
|
||||
>
|
||||
</div>
|
||||
</Modal>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="dialogSpecValuesVisible"
|
||||
:mask-closable="false"
|
||||
:width="500"
|
||||
:styles="{ top: '30px' }"
|
||||
class="permModal"
|
||||
>
|
||||
<Form ref="specForm" :model="specForm" :label-width="100">
|
||||
<Select
|
||||
v-model="specForm.specValue"
|
||||
placeholder="输入后回车添加"
|
||||
multiple
|
||||
filterable
|
||||
allow-create
|
||||
:popper-append-to-body="false"
|
||||
popper-class="spec-values-popper"
|
||||
style="width: 100%; text-align: left; margin-right: 10px"
|
||||
>
|
||||
<Option
|
||||
v-for="item in specValues"
|
||||
:value="item.specValue"
|
||||
:key="item.id"
|
||||
:label="item.specValue"
|
||||
>
|
||||
</Option>
|
||||
</Select>
|
||||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="dialogSpecValuesVisible = false"
|
||||
>取消</Button
|
||||
>
|
||||
<Button
|
||||
type="primary"
|
||||
:loading="submitLoading"
|
||||
@click="submitSpecValuesForm"
|
||||
>提交</Button
|
||||
>提交
|
||||
</Button
|
||||
>
|
||||
</div>
|
||||
</Modal>
|
||||
@@ -118,10 +98,9 @@ import {
|
||||
getSpecListData,
|
||||
insertSpec,
|
||||
updateSpec,
|
||||
delSpec,
|
||||
getSpecValuesListData,
|
||||
saveSpecValues,
|
||||
delSpec
|
||||
} from "@/api/goods";
|
||||
|
||||
export default {
|
||||
name: "spec",
|
||||
components: {},
|
||||
@@ -131,7 +110,6 @@ export default {
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
dialogSpecValuesVisible: false, // 添加或编辑规格值
|
||||
specTitle: "", // 添加或编辑规格值
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
@@ -145,9 +123,8 @@ export default {
|
||||
specName: "",
|
||||
specValue: "",
|
||||
},
|
||||
specForm: {},
|
||||
/** 编辑规格值 */
|
||||
specValues: [],
|
||||
specValue: [],
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
@@ -179,24 +156,7 @@ export default {
|
||||
width: 250,
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.editSpec(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"编辑规格值"
|
||||
),
|
||||
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
@@ -239,23 +199,28 @@ export default {
|
||||
};
|
||||
},
|
||||
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;
|
||||
@@ -263,6 +228,7 @@ export default {
|
||||
// 重新加载数据
|
||||
this.getDataList();
|
||||
},
|
||||
//更改排序
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
@@ -271,36 +237,27 @@ export default {
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
//清除已选择
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
//修改已选择
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
//获取数据
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getSpecListData(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
this.data = res.records;
|
||||
this.total = res.total;
|
||||
});
|
||||
this.loading = false;
|
||||
},
|
||||
submitSpecValuesForm() {
|
||||
saveSpecValues(this.specForm.specId, this.specForm).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("规格值保存成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
this.dialogSpecValuesVisible = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
//新增规格
|
||||
saveSpec() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
@@ -318,7 +275,7 @@ export default {
|
||||
});
|
||||
} else {
|
||||
// 编辑
|
||||
updateSpec(this.form).then((res) => {
|
||||
updateSpec(this.form.id, this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
@@ -330,6 +287,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
//弹出添加框
|
||||
add() {
|
||||
this.modalType = 0;
|
||||
this.modalTitle = "添加";
|
||||
@@ -337,31 +295,31 @@ export default {
|
||||
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;
|
||||
let localVal = v.specValue;
|
||||
|
||||
this.form.specName = v.specName;
|
||||
this.form.id = v.id;
|
||||
this.form.specValue = v.specValue;
|
||||
|
||||
if (localVal && localVal.indexOf("," > 0)) {
|
||||
this.form.specValue = localVal.split(",")
|
||||
this.specValue = this.form.specValue
|
||||
this.$set(this, 'specValue', this.form.specValue)
|
||||
} else {
|
||||
this.specValue = [];
|
||||
}
|
||||
this.modalVisible = true;
|
||||
},
|
||||
editSpec(v) {
|
||||
getSpecValuesListData(v.id).then((res) => {
|
||||
this.modalType = 1;
|
||||
this.modalTitle = "编辑";
|
||||
this.specValues = res.result;
|
||||
this.specForm.specValue = res.result.map(item => item.specValue)
|
||||
this.specForm.specId = v.id;
|
||||
this.dialogSpecValuesVisible = true;
|
||||
});
|
||||
},
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
@@ -415,5 +373,5 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import "@/styles/table-common.scss";
|
||||
@import "@/styles/table-common.scss";
|
||||
</style>
|
||||
|
||||
@@ -135,35 +135,11 @@ export default {
|
||||
width: 90,
|
||||
render: (h, params) => {
|
||||
if (params.row.grade == "GOOD") {
|
||||
return h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "success",
|
||||
},
|
||||
},
|
||||
"好评"
|
||||
);
|
||||
return h("Tag", {props: {color: "green",},}, "好评");
|
||||
} else if (params.row.grade == "MODERATE") {
|
||||
return h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "warning",
|
||||
},
|
||||
},
|
||||
"中评"
|
||||
);
|
||||
return h("Tag", {props: {color: "orange",},}, "中评");
|
||||
} else {
|
||||
return h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "error",
|
||||
},
|
||||
},
|
||||
"差评"
|
||||
);
|
||||
return h("Tag", {props: {color: "red",},}, "差评");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<Input type="text" @keyup="handleLink(linkItem,linkList.length)" v-model="linkItem.url" placeholder="https://"></Input>
|
||||
</div>
|
||||
</Poptip>
|
||||
|
||||
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
@@ -74,7 +74,12 @@ export default {
|
||||
icon: "md-happy",
|
||||
___type: "sign",
|
||||
},
|
||||
|
||||
{
|
||||
title: "小程序直播",
|
||||
icon: "ios-videocam",
|
||||
___type: "live",
|
||||
},
|
||||
|
||||
],
|
||||
linkItem: {
|
||||
title: "外部链接",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<Row type="flex" justify="center" class="copyright">
|
||||
Copyright © 2020 - Present
|
||||
<a
|
||||
href="http://lili.cn"
|
||||
href="https://pickmall.cn/"
|
||||
target="_blank"
|
||||
style="margin:0 5px;"
|
||||
>lili-shop</a> {{ $t('rights') }}
|
||||
|
||||
@@ -131,23 +131,9 @@
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if (params.row.payStatus == "PAID") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "已付款",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
} else if (params.row.payStatus == "UNPAID") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "未付款",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "green",},}, "已付款");
|
||||
} else {
|
||||
return h("Tag", {props: {color: "red",},}, "未付款");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,47 +1,48 @@
|
||||
<template>
|
||||
<div>
|
||||
<vuedraggable
|
||||
:list="uploadList"
|
||||
:disabled="!draggable||!multiple"
|
||||
:animation="200"
|
||||
class="list-group"
|
||||
ghost-class="thumb-ghost"
|
||||
@end="onEnd"
|
||||
>
|
||||
<div class="upload-list" v-for="(item, index) in uploadList" :key="index">
|
||||
<div v-if="item.status == 'finished'" style="height:60px;">
|
||||
<img :src="item.url" />
|
||||
<div class="upload-list-cover">
|
||||
<Icon type="ios-eye-outline" @click="handleView(item.url)"></Icon>
|
||||
<Icon type="ios-trash-outline" @click="handleRemove(item)"></Icon>
|
||||
<div class="upload-pic-thumb">
|
||||
<vuedraggable
|
||||
:list="uploadList"
|
||||
:disabled="!draggable||!multiple"
|
||||
:animation="200"
|
||||
class="list-group"
|
||||
ghost-class="thumb-ghost"
|
||||
@end="onEnd"
|
||||
>
|
||||
<div class="upload-list" v-for="(item, index) in uploadList" :key="index">
|
||||
<div v-if="item.status == 'finished'" style="height:60px;">
|
||||
<img :src="item.url" />
|
||||
<div class="upload-list-cover">
|
||||
<Icon type="ios-eye-outline" @click="handleView(item.url)"></Icon>
|
||||
<Icon type="ios-trash-outline" @click="handleRemove(item)"></Icon>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<Progress v-if="item.showProgress" :percent="item.percentage" hide-info></Progress>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<Progress v-if="item.showProgress" :percent="item.percentage" hide-info></Progress>
|
||||
</vuedraggable>
|
||||
<Upload
|
||||
ref="upload"
|
||||
:multiple="multiple"
|
||||
:show-upload-list="false"
|
||||
:on-success="handleSuccess"
|
||||
:on-error="handleError"
|
||||
:format="['jpg','jpeg','png','gif']"
|
||||
:max-size="maxSize*1024"
|
||||
:on-format-error="handleFormatError"
|
||||
:on-exceeded-size="handleMaxSize"
|
||||
:before-upload="handleBeforeUpload"
|
||||
type="drag"
|
||||
:action="uploadFileUrl"
|
||||
:headers="accessToken"
|
||||
style="display: inline-block;width:58px;"
|
||||
>
|
||||
<div style="width: 58px;height:58px;line-height: 58px;">
|
||||
<Icon type="md-camera" size="20"></Icon>
|
||||
</div>
|
||||
</div>
|
||||
</vuedraggable>
|
||||
<Upload
|
||||
ref="upload"
|
||||
:multiple="multiple"
|
||||
:show-upload-list="false"
|
||||
:on-success="handleSuccess"
|
||||
:on-error="handleError"
|
||||
:format="['jpg','jpeg','png','gif']"
|
||||
:max-size="maxSize*1024"
|
||||
:on-format-error="handleFormatError"
|
||||
:on-exceeded-size="handleMaxSize"
|
||||
:before-upload="handleBeforeUpload"
|
||||
type="drag"
|
||||
:action="uploadFileUrl"
|
||||
:headers="accessToken"
|
||||
style="display: inline-block;width:58px;"
|
||||
>
|
||||
<div style="width: 58px;height:58px;line-height: 58px;">
|
||||
<Icon type="md-camera" size="20"></Icon>
|
||||
</div>
|
||||
</Upload>
|
||||
|
||||
</Upload>
|
||||
</div>
|
||||
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
|
||||
<img :src="imgUrl" alt="无效的图片链接" style="width: 100%;margin: 0 auto;display: block;" />
|
||||
<div slot="footer">
|
||||
@@ -242,6 +243,9 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.upload-pic-thumb{
|
||||
display: flex;
|
||||
}
|
||||
.upload-list {
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
@@ -255,6 +259,7 @@ export default {
|
||||
position: relative;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||
margin-right: 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.upload-list img {
|
||||
width: 100%;
|
||||
|
||||
@@ -98,14 +98,14 @@ export default {
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getImg();
|
||||
// this.getImg();
|
||||
},
|
||||
watch: {
|
||||
verifyType: {
|
||||
immediate: true,
|
||||
handler: function (v) {
|
||||
this.type = v;
|
||||
this.refresh();
|
||||
// this.refresh();
|
||||
}
|
||||
},
|
||||
show (v) {
|
||||
|
||||
@@ -216,11 +216,11 @@
|
||||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.serviceType == "RETURN_MONEY") {
|
||||
return h('div', [h('span', {}, '退款'),]);
|
||||
return h('div', [h('tag', {props: {color: "blue"}}, '退款'),]);
|
||||
} else if (params.row.serviceType == "RETURN_GOODS") {
|
||||
return h('div', [h('span', {}, '退货'),]);
|
||||
return h('div', [h('tag', {props: {color: "volcano"}}, '退货'),]);
|
||||
} else if (params.row.serviceType == "EXCHANGE_GOODS") {
|
||||
return h('div', [h('span', {}, '换货'),]);
|
||||
return h('div', [h('tag', {props: {color: "green"}}, '换货'),]);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -231,27 +231,23 @@
|
||||
width: 110,
|
||||
render: (h, params) => {
|
||||
if (params.row.serviceStatus == "APPLY") {
|
||||
return h('div', [h('span', {}, '申请中'),]);
|
||||
return h('div', [h('tag', {props: {color: "blue"}}, '申请中'),]);
|
||||
} else if (params.row.serviceStatus == "PASS") {
|
||||
return h('div', [h('span', {}, '通过售后'),]);
|
||||
return h('div', [h('tag', {props: {color: "cyan"}}, '通过售后'),]);
|
||||
} else if (params.row.serviceStatus == "REFUSE") {
|
||||
return h('div', [h('span', {}, '拒绝售后'),]);
|
||||
return h('div', [h('tag', {props: {color: "volcano"}}, '拒绝售后'),]);
|
||||
} else if (params.row.serviceStatus == "BUYER_RETURN") {
|
||||
return h('div', [h('span', {}, '买家退货,待卖家收货'),]);
|
||||
} else if (params.row.serviceStatus == "SELLER_RE_DELIVERY") {
|
||||
return h('div', [h('span', {}, '商家换货/补发'),]);
|
||||
return h('div', [h('tag', {props: {color: "orange"}}, '买家退货,待卖家收货'),]);
|
||||
} else if (params.row.serviceStatus == "SELLER_CONFIRM") {
|
||||
return h('div', [h('span', {}, '卖家确认收货'),]);
|
||||
return h('div', [h('tag', {props: {color: "gold"}}, '卖家确认收货'),]);
|
||||
} else if (params.row.serviceStatus == "SELLER_TERMINATION") {
|
||||
return h('div', [h('span', {}, '卖家终止售后'),]);
|
||||
} else if (params.row.serviceStatus == "BUYER_CONFIRM") {
|
||||
return h('div', [h('span', {}, '买家确认收货'),]);
|
||||
return h('div', [h('tag', {props: {color: "lime"}}, '卖家终止售后'),]);
|
||||
} else if (params.row.serviceStatus == "BUYER_CANCEL") {
|
||||
return h('div', [h('span', {}, '买家取消售后'),]);
|
||||
return h('div', [h('tag', {props: {color: "purple"}}, '买家取消售后'),]);
|
||||
} else if (params.row.serviceStatus == "COMPLETE") {
|
||||
return h('div', [h('span', {}, '完成售后'),]);
|
||||
return h('div', [h('tag', {props: {color: "green"}}, '完成售后'),]);
|
||||
}else if (params.row.serviceStatus == "WAIT_REFUND") {
|
||||
return h('div', [h('span', {}, '待平台退款'),]);
|
||||
return h('div', [h('tag', {props: {color: "geekblue"}}, '待平台退款'),]);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -191,17 +191,17 @@
|
||||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.complainStatus == "NEW") {
|
||||
return h('div', [h('span', { }, '新投诉'),]);
|
||||
return h('div', [h('tag',{props: {color: "purple"}}, '新投诉'),]);
|
||||
} else if (params.row.complainStatus == "CANCEL") {
|
||||
return h('div', [h('span', { }, '已撤销'),]);
|
||||
return h('div', [h('tag', {props: {color: "cyan"}}, '已撤销'),]);
|
||||
} else if (params.row.complainStatus == "WAIT_APPEAL") {
|
||||
return h('div', [h('span', { }, '待申诉'),]);
|
||||
return h('div', [h('tag', {props: {color: "volcano"}}, '待申诉'),]);
|
||||
} else if (params.row.complainStatus == "COMMUNICATION") {
|
||||
return h('div', [h('span', { }, '对话中'),]);
|
||||
return h('div', [h('tag', {props: {color: "orange"}}, '对话中'),]);
|
||||
}else if (params.row.complainStatus == "WAIT_ARBITRATION") {
|
||||
return h('div', [h('span', { }, '等待仲裁'),]);
|
||||
return h('div', [h('tag', {props: {color: "blue"}}, '等待仲裁'),]);
|
||||
}else if (params.row.complainStatus == "COMPLETE") {
|
||||
return h('div', [h('span', { }, '已完成'),]);
|
||||
return h('div', [h('tag', {props: {color: "green"}}, '已完成'),]);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -72,51 +72,13 @@ export default {
|
||||
align: "center",
|
||||
render: (h, params) => {
|
||||
if (params.row.paymentMethod === "WECHAT") {
|
||||
return h("div", [
|
||||
h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "green",
|
||||
},
|
||||
},
|
||||
"微信"
|
||||
),
|
||||
]);
|
||||
return h("div", [h("Tag", {props: {color: "green",},}, "微信"),]);
|
||||
} else if (params.row.paymentMethod === "ALIPAY") {
|
||||
return h("div", [
|
||||
h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "blue",
|
||||
},
|
||||
},
|
||||
"支付宝"
|
||||
),
|
||||
]);
|
||||
return h("div", [h("Tag", {props: {color: "blue",},}, "支付宝"),]);
|
||||
} else if (params.row.paymentMethod === "WALLET") {
|
||||
return h("div", [
|
||||
h(
|
||||
"Tag",
|
||||
{
|
||||
props: {},
|
||||
},
|
||||
"余额支付"
|
||||
),
|
||||
]);
|
||||
return h("div", [h("Tag", {props: {color: "geekblue",},}, "余额支付"),]);
|
||||
} else if (params.row.paymentMethod === "BANK_TRANSFER") {
|
||||
return h("div", [
|
||||
h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "orange",
|
||||
},
|
||||
},
|
||||
"银行转帐"
|
||||
),
|
||||
]);
|
||||
return h("div", [h("Tag", {props: {color: "orange",},}, "银行转帐"),]);
|
||||
} else {
|
||||
return h("div", [h("Tag", {}, "暂未付款")]);
|
||||
}
|
||||
|
||||
@@ -100,9 +100,9 @@ export default {
|
||||
width: 95,
|
||||
render: (h, params) => {
|
||||
if (params.row.isRefund == "1") {
|
||||
return h("div", [h("span", {}, "已退款")]);
|
||||
return h("div", [h("Tag", {props: {color: "green",},}, "已退款")]);
|
||||
} else {
|
||||
return h("div", [h("span", {}, "未退款")]);
|
||||
return h("div", [h("Tag", {props: {color: "orange",},}, "未退款")]);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -94,8 +94,8 @@
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
sort: "", // 默认排序字段
|
||||
order: "", // 默认排序方式
|
||||
startDate: "", // 起始时间
|
||||
endDate: "", // 终止时间
|
||||
orderType: "FICTITIOUS",
|
||||
@@ -118,8 +118,6 @@
|
||||
title: "下单时间",
|
||||
key: "createTime",
|
||||
width: 200,
|
||||
sortable: true,
|
||||
sortType: "desc",
|
||||
},
|
||||
{
|
||||
title: "订单来源",
|
||||
@@ -150,19 +148,15 @@
|
||||
width:95,
|
||||
render: (h, params) => {
|
||||
if (params.row.orderStatus == "UNPAID") {
|
||||
return h('div', [h('span', { }, '未付款'),]);
|
||||
return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
|
||||
} else if (params.row.orderStatus == "PAID") {
|
||||
return h('div', [h('span', { }, '已付款'),]);
|
||||
} else if (params.row.orderStatus == "UNDELIVERED") {
|
||||
return h('div', [h('span', { }, '待发货'),]);
|
||||
} else if (params.row.orderStatus == "DELIVERED") {
|
||||
return h('div', [h('span', { }, '已发货'),]);
|
||||
}else if (params.row.orderStatus == "COMPLETED") {
|
||||
return h('div', [h('span', { }, '已完成'),]);
|
||||
}else if (params.row.orderStatus == "TAKE") {
|
||||
return h('div', [h('span', { }, '待核验'),]);
|
||||
}else if (params.row.orderStatus == "CANCELLED") {
|
||||
return h('div', [h('span', { }, '已取消'),]);
|
||||
return h("div", [h("tag", {props: {color: "blue"}}, "已付款")]);
|
||||
} else if (params.row.orderStatus == "COMPLETED") {
|
||||
return h("div", [h("tag", {props: {color: "green"}}, "已完成")]);
|
||||
} else if (params.row.orderStatus == "TAKE") {
|
||||
return h("div", [h("tag", {props: {color: "volcano"}}, "待核验")]);
|
||||
} else if (params.row.orderStatus == "CANCELLED") {
|
||||
return h("div", [h("tag", {props: {color: "red"}}, "已取消")]);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">订单来源:</div>
|
||||
<div class="div-item-right">
|
||||
{{ orderInfo.order.clientType }}
|
||||
{{ orderInfo.order.clientType | clientTypeWay}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</Row>
|
||||
<div>
|
||||
<download-excel class="export-excel-wrapper" :data="data" :fields="fields" name="商品订单.xls">
|
||||
<Button type="primary" class="export">
|
||||
<Button type="info" class="export">
|
||||
导出Excel
|
||||
</Button>
|
||||
</download-excel>
|
||||
@@ -72,10 +72,6 @@ export default {
|
||||
订单编号: "sn",
|
||||
下单时间: "createTime",
|
||||
客户名称: "memberName",
|
||||
客户账号: "",
|
||||
收货人: "",
|
||||
收货人手机号: "",
|
||||
收货人地址: "",
|
||||
支付方式: {
|
||||
field: "clientType",
|
||||
callback: (value) => {
|
||||
@@ -92,15 +88,7 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
配送方式: "",
|
||||
配送费用: "",
|
||||
订单商品金额: "",
|
||||
订单优惠金额: "",
|
||||
订单应付金额: "",
|
||||
商品SKU编号: "",
|
||||
商品数量: "groupNum",
|
||||
买家备注: "",
|
||||
订单状态: "",
|
||||
付款状态: {
|
||||
field: "payStatus",
|
||||
callback: (value) => {
|
||||
@@ -111,9 +99,6 @@ export default {
|
||||
: "";
|
||||
},
|
||||
},
|
||||
发货状态: "",
|
||||
发票类型: "",
|
||||
发票抬头: "",
|
||||
店铺: "storeName",
|
||||
},
|
||||
loading: true, // 表单加载状态
|
||||
@@ -166,13 +151,13 @@ export default {
|
||||
width: 120,
|
||||
render: (h, params) => {
|
||||
if (params.row.orderType == "NORMAL") {
|
||||
return h("div", [h("span", {}, "普通订单")]);
|
||||
return h("div", [h("tag", {props: {color: "blue"}}, "普通订单")]);
|
||||
} else if (params.row.orderType == "PINTUAN") {
|
||||
return h("div", [h("span", {}, "拼团订单")]);
|
||||
return h("div", [h("tag", {props: {color: "volcano"}}, "拼团订单")]);
|
||||
} else if (params.row.orderType == "GIFT") {
|
||||
return h("div", [h("span", {}, "赠品订单")]);
|
||||
return h("div", [h("tag", {props: {color: "green"}}, "赠品订单")]);
|
||||
} else if (params.row.orderType == "VIRTUAL") {
|
||||
return h("div", [h("tag", {}, "核验订单")]);
|
||||
return h("div", [h("tag", {props: {color: "geekblue"}}, "核验订单")]);
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -202,19 +187,19 @@ export default {
|
||||
minWidth: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.orderStatus == "UNPAID") {
|
||||
return h("div", [h("span", {}, "未付款")]);
|
||||
return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]);
|
||||
} else if (params.row.orderStatus == "PAID") {
|
||||
return h("div", [h("span", {}, "已付款")]);
|
||||
return h("div", [h("tag", {props: {color: "blue"}}, "已付款")]);
|
||||
} else if (params.row.orderStatus == "UNDELIVERED") {
|
||||
return h("div", [h("span", {}, "待发货")]);
|
||||
return h("div", [h("tag", {props: {color: "geekblue"}}, "待发货")]);
|
||||
} else if (params.row.orderStatus == "DELIVERED") {
|
||||
return h("div", [h("span", {}, "已发货")]);
|
||||
return h("div", [h("tag", {props: {color: "cyan"}}, "已发货")]);
|
||||
} else if (params.row.orderStatus == "COMPLETED") {
|
||||
return h("div", [h("span", {}, "已完成")]);
|
||||
return h("div", [h("tag", {props: {color: "green"}}, "已完成")]);
|
||||
} else if (params.row.orderStatus == "TAKE") {
|
||||
return h("div", [h("span", {}, "待核验")]);
|
||||
return h("div", [h("tag", {props: {color: "volcano"}}, "待核验")]);
|
||||
} else if (params.row.orderStatus == "CANCELLED") {
|
||||
return h("div", [h("span", {}, "已取消")]);
|
||||
return h("div", [h("tag", {props: {color: "red"}}, "已取消")]);
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -222,56 +207,23 @@ export default {
|
||||
title: "下单时间",
|
||||
key: "createTime",
|
||||
width: 170,
|
||||
sortable: true,
|
||||
sortType: "desc",
|
||||
},
|
||||
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
align: "center",
|
||||
width: 100,
|
||||
width: 150,
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
|
||||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small",
|
||||
},
|
||||
attrs: {
|
||||
disabled: params.row.orderStatus == "UNPAID" ? false : true,
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.confirmPrice(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"收款"
|
||||
return h("div", [h("Button", {props: {type: "primary", size: "small",},
|
||||
attrs: {disabled: params.row.orderStatus == "UNPAID" ? false : true,},
|
||||
style: {marginRight: "5px",},
|
||||
on: {click: () => {this.confirmPrice(params.row);},},
|
||||
}, "收款"
|
||||
),
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "info",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.detail(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"查看"
|
||||
h("Button", {props: {type: "info", size: "small",},
|
||||
style: {marginRight: "5px",},
|
||||
on: {click: () => {this.detail(params.row);},},
|
||||
}, "查看"
|
||||
),
|
||||
]);
|
||||
},
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<Input type="number" v-model="form.sort" clearable style="width: 10%" />
|
||||
</FormItem>
|
||||
<FormItem class="form-item-view-el" label="文章内容" prop="content">
|
||||
<editor openXss v-model="form.content"></editor>
|
||||
<editor openXss v-model="form.content"></editor>
|
||||
</FormItem>
|
||||
<FormItem label="是否展示" prop="openStatus">
|
||||
<i-switch size="large" v-model="form.openStatus" :true-value="open" :false-value="close">
|
||||
@@ -435,28 +435,13 @@ export default {
|
||||
this.form.categoryId = res.result.categoryId;
|
||||
this.treeValue = data.articleCategoryName;
|
||||
this.form.id = data.id;
|
||||
this.form.content = htmlEscape(res.result.content);
|
||||
this.form.content =res.result.content;
|
||||
this.form.title = res.result.title;
|
||||
this.form.sort = res.result.sort;
|
||||
this.form.openStatus = res.result.openStatus;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
htmlEscape(text) {
|
||||
return text.replace(/[<>"&]/g, function (match, pos, originalText) {
|
||||
switch (match) {
|
||||
case "<":
|
||||
return "<";
|
||||
case ">":
|
||||
return ">";
|
||||
case "&":
|
||||
return "&";
|
||||
case '"':
|
||||
return """;
|
||||
}
|
||||
});
|
||||
},
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
|
||||
@@ -101,7 +101,7 @@ export default {
|
||||
{
|
||||
title: "面额/折扣",
|
||||
key: "price",
|
||||
width: 120,
|
||||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.price) {
|
||||
return h(
|
||||
@@ -117,27 +117,28 @@ export default {
|
||||
{
|
||||
title: "领取数量/总数量",
|
||||
key: "publishNum",
|
||||
width: 150,
|
||||
width: 130,
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"div",
|
||||
params.row.receivedNum + "/" + params.row.publishNum
|
||||
);
|
||||
},
|
||||
minWidth: 130,
|
||||
|
||||
},
|
||||
{
|
||||
title: "优惠券类型",
|
||||
key: "couponType",
|
||||
width: 120,
|
||||
render: (h, params) => {
|
||||
let text = "未知";
|
||||
let text = "";
|
||||
if (params.row.couponType === "DISCOUNT") {
|
||||
text = "打折";
|
||||
return h("Tag", {props: {color: "blue",},}, "打折");
|
||||
} else if (params.row.couponType === "PRICE") {
|
||||
text = "减免现金";
|
||||
return h("Tag", {props: {color: "geekblue",},}, "减免现金");
|
||||
}else {
|
||||
return h("Tag", {props: {color: "purple",},}, "未知");
|
||||
}
|
||||
return h("div", [text]);
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -160,7 +161,7 @@ export default {
|
||||
},
|
||||
{
|
||||
title: "活动时间",
|
||||
|
||||
width: 150,
|
||||
render: (h, params) => {
|
||||
if (params.row.getType === "ACTIVITY") {
|
||||
return h("div", "长期有效");
|
||||
@@ -184,7 +185,7 @@ export default {
|
||||
color = "red";
|
||||
if (params.row.promotionStatus == "NEW") {
|
||||
text = "未开始";
|
||||
color = "default";
|
||||
color = "geekblue";
|
||||
} else if (params.row.promotionStatus == "START") {
|
||||
text = "已开始";
|
||||
color = "green";
|
||||
|
||||
@@ -39,9 +39,11 @@
|
||||
</FormItem>
|
||||
<FormItem label="发放数量" prop="publishNum" v-if="form.getType==='FREE'">
|
||||
<Input v-model="form.publishNum" placeholder="发放数量" style="width: 260px"/>
|
||||
<div class="tips">如果发放数量为0时,则代表不限制发放数量</div>
|
||||
</FormItem>
|
||||
<FormItem label="领取数量限制" prop="couponLimitNum" v-if="form.getType==='FREE'">
|
||||
<Input v-model="form.couponLimitNum" placeholder="领取限制" clearable style="width: 260px"/>
|
||||
<div class="tips">如果领取数量为0时,则代表不限制领取数量</div>
|
||||
</FormItem>
|
||||
<FormItem label="范围描述" prop="description">
|
||||
<Input v-model="form.description" type="textarea" :rows="4" maxlength="50" show-word-limit clearable
|
||||
@@ -576,5 +578,9 @@ h4 {
|
||||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
.tips {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ export default {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 0, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "startTime", // 默认排序字段
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
form: {
|
||||
|
||||
@@ -132,19 +132,19 @@ export default {
|
||||
minWidth: 60,
|
||||
render: (h, params) => {
|
||||
let text = "未知",
|
||||
color = "default";
|
||||
color = "purple";
|
||||
if (params.row.promotionStatus == "NEW") {
|
||||
text = "未开始";
|
||||
color = "default";
|
||||
color = "geekblue";
|
||||
} else if (params.row.promotionStatus == "START") {
|
||||
text = "已开始";
|
||||
color = "green";
|
||||
color = "blue";
|
||||
} else if (params.row.promotionStatus == "END") {
|
||||
text = "已结束";
|
||||
color = "blue";
|
||||
color = "green";
|
||||
} else if (params.row.promotionStatus == "CLOSE") {
|
||||
text = "已关闭";
|
||||
color = "red";
|
||||
color = "volcano";
|
||||
}
|
||||
return h("div", [
|
||||
h(
|
||||
|
||||
@@ -119,14 +119,13 @@ export default {
|
||||
{
|
||||
title: "直播状态",
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"span",
|
||||
params.row.status == "NEW"
|
||||
? "未开始"
|
||||
: params.row.status == "START"
|
||||
? "直播中"
|
||||
: "已结束"
|
||||
);
|
||||
if(params.row.status == "NEW"){
|
||||
return h("div", [h("tag", {props: {color: "blue"}}, "未开始")]);
|
||||
}else if(params.row.status == "START"){
|
||||
return h("div", [h("tag", {props: {color: "green"}}, "直播中")]);
|
||||
}else{
|
||||
return h("div", [h("tag", {props: {color: "volcano"}}, "已结束")]);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -122,16 +122,16 @@ export default {
|
||||
color = "";
|
||||
if (params.row.promotionStatus == "NEW") {
|
||||
text = "未开始";
|
||||
color = "default";
|
||||
color = "geekblue";
|
||||
} else if (params.row.promotionStatus == "START") {
|
||||
text = "已开始";
|
||||
color = "green";
|
||||
color = "blue";
|
||||
} else if (params.row.promotionStatus == "END") {
|
||||
text = "已结束";
|
||||
color = "blue";
|
||||
color = "green";
|
||||
} else if (params.row.promotionStatus == "CLOSE") {
|
||||
text = "已关闭";
|
||||
color = "red";
|
||||
color = "volcano";
|
||||
}
|
||||
return h("div", [
|
||||
h(
|
||||
|
||||
@@ -2,78 +2,37 @@
|
||||
<div class="search">
|
||||
<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="商品名称">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
<Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px" />
|
||||
</Form-item>
|
||||
<Form-item label="积分区间">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.pointsS"
|
||||
placeholder="请输入开始区间"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
<Input type="text" v-model="searchForm.pointsS" placeholder="请输入开始区间" clearable style="width: 200px" />
|
||||
-
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.pointsE"
|
||||
placeholder="请输入结束区间"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
<Input type="text" v-model="searchForm.pointsE" placeholder="请输入结束区间" clearable style="width: 200px" />
|
||||
</Form-item>
|
||||
<Form-item label="状态">
|
||||
<Select v-model="searchForm.promotionStatus" style="width: 200px">
|
||||
<Option
|
||||
v-for="item in statusList"
|
||||
:value="item.value"
|
||||
:key="item.value"
|
||||
>{{ item.label }}</Option
|
||||
>
|
||||
<Option v-for="item in statusList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="SKU编码">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.skuId"
|
||||
placeholder="请输入SKU编码"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
<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>
|
||||
<Button @click="addPointsGoods" type="primary">添加积分商品</Button>
|
||||
|
||||
</Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table">
|
||||
<template slot-scope="{ row }" slot="goodsName">
|
||||
<div>
|
||||
<a class="mr_10" @click="linkTo(row.goodsSku.goodsId,row.goodsSku.skuId)">{{row.goodsSku.goodsName}}</a>
|
||||
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
||||
<div slot="content">
|
||||
<vue-qr :text="wapLinkTo(row.goodsSku.goodsId,row.goodsSku.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
|
||||
<vue-qr :text="wapLinkTo(row.goodsSku.goodsId,row.goodsSku.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
|
||||
</div>
|
||||
<img src="../../../assets/qrcode.svg" style="vertical-align:middle;" class="hover-pointer" width="20" height="20" alt="">
|
||||
</Poptip>
|
||||
@@ -92,50 +51,17 @@
|
||||
<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
|
||||
>
|
||||
<Button
|
||||
v-if="row.promotionStatus == 'CLOSE'"
|
||||
type="warning"
|
||||
size="small"
|
||||
@click="statusChanged(row.id, 'START')"
|
||||
style="margin-right: 5px"
|
||||
>启用</Button
|
||||
>
|
||||
<Button type="error" size="small" @click="close(row.id)"
|
||||
>删除</Button
|
||||
>
|
||||
<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>
|
||||
<Button v-if="row.promotionStatus == 'CLOSE'" type="warning" size="small" @click="statusChanged(row.id, 'START')" style="margin-right: 5px">启用</Button>
|
||||
<Button type="error" size="small" @click="close(row.id)">删除</Button>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
@@ -159,78 +85,91 @@ export default {
|
||||
pageSize: 10, // 页面大小
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
statusList: [ // 活动状态
|
||||
statusList: [
|
||||
// 活动状态
|
||||
{ label: "未开始", value: "NEW" },
|
||||
{ label: "已开始", value: "START" },
|
||||
{ label: "已结束", value: "END" },
|
||||
{ label: "已关闭", value: "CLOSE" },
|
||||
],
|
||||
columns: [ // 表头
|
||||
columns: [
|
||||
// 表头
|
||||
{
|
||||
title: "商品名称",
|
||||
slot: "goodsName",
|
||||
minWidth: 120,
|
||||
minWidth: 150,
|
||||
fixed: "left",
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
title: "市场价",
|
||||
slot: "price",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "结算价",
|
||||
slot: "settlementPrice",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "分类",
|
||||
key: "pointsGoodsCategoryName",
|
||||
},
|
||||
|
||||
{
|
||||
title: "库存数量",
|
||||
slot: "quantity",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "活动剩余库存",
|
||||
key: "activeStock",
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: "兑换积分",
|
||||
key: "points",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "所属店铺",
|
||||
key: "storeName",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "活动开始时间",
|
||||
slot: "startTime",
|
||||
minWidth:100
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
key: "promotionStatus",
|
||||
width: 100,
|
||||
render: (h, params) => {
|
||||
let text = "未知",
|
||||
color = "";
|
||||
if (params.row.promotionStatus == "NEW") {
|
||||
text = "未开始";
|
||||
color = "default";
|
||||
color = "geekblue";
|
||||
} else if (params.row.promotionStatus == "START") {
|
||||
text = "已开始";
|
||||
color = "green";
|
||||
color = "blue";
|
||||
} else if (params.row.promotionStatus == "END") {
|
||||
text = "已结束";
|
||||
color = "blue";
|
||||
color = "green";
|
||||
} else if (params.row.promotionStatus == "CLOSE") {
|
||||
text = "已关闭";
|
||||
color = "red";
|
||||
color = "volcano";
|
||||
}
|
||||
return h("div", [h("Tag", { props: { color: color } }, text)]);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "分类",
|
||||
key: "pointsGoodsCategoryName",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
slot: "action",
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
width: 150,
|
||||
},
|
||||
],
|
||||
@@ -327,5 +266,5 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import "@/styles/table-common.scss";
|
||||
@import "@/styles/table-common.scss";
|
||||
</style>
|
||||
|
||||
@@ -24,78 +24,35 @@
|
||||
<Row class="operation padding-row">
|
||||
<Button type="primary" @click="add">添加活动</Button>
|
||||
</Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
class="page"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button
|
||||
type="info"
|
||||
size="small"
|
||||
class="mr_5"
|
||||
v-if="row.promotionStatus == 'NEW'"
|
||||
@click="edit(row)"
|
||||
>编辑</Button
|
||||
>
|
||||
<Tabs value="list" @on-click="clickTabPane">
|
||||
<TabPane label="秒杀活动列表" name="list">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="page">
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button type="info" size="small" class="mr_5" v-if="row.promotionStatus == 'NEW'" @click="edit(row)">编辑</Button>
|
||||
|
||||
<Button
|
||||
type="info"
|
||||
size="small"
|
||||
class="mr_5"
|
||||
v-else
|
||||
@click="manage(row)"
|
||||
>查看</Button
|
||||
>
|
||||
<Button type="info" size="small" class="mr_5" v-else @click="manage(row)">查看</Button>
|
||||
|
||||
<Button
|
||||
type="primary"
|
||||
size="small"
|
||||
class="mr_5"
|
||||
v-if="row.promotionStatus == 'NEW'"
|
||||
@click="manage(row)"
|
||||
>管理</Button
|
||||
>
|
||||
<Button type="primary" size="small" class="mr_5" v-if="row.promotionStatus == 'NEW'" @click="manage(row)">管理</Button>
|
||||
|
||||
<!-- <Button type="success" size="small" class="mr_5" v-if="row.promotionStatus == 'NEW' || row.promotionStatus == 'END'" @click="upper(row)">上架</Button> -->
|
||||
<Button
|
||||
type="error"
|
||||
size="small"
|
||||
v-if="
|
||||
row.promotionStatus == 'START' || row.promotionStatus == 'NEW'
|
||||
"
|
||||
class="mr_5"
|
||||
@click="off(row)"
|
||||
>下架</Button
|
||||
>
|
||||
<Button type="error" size="small" v-if="
|
||||
row.promotionStatus == 'START' || row.promotionStatus == 'NEW'
|
||||
" class="mr_5" @click="off(row)">下架</Button>
|
||||
|
||||
<Button type="error" size="small" v-if="row.promotionStatus == 'CLOSE'" ghost @click="expire(row)">删除</Button>
|
||||
</template>
|
||||
</Table>
|
||||
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page style="margin: 20px 0;" :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>
|
||||
</TabPane>
|
||||
<TabPane label="秒杀活动设置" name="setup">
|
||||
|
||||
<setupSeckill v-if="setupFlag"></setupSeckill>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
|
||||
<Button
|
||||
type="error"
|
||||
size="small"
|
||||
v-if="row.promotionStatus == 'CLOSE'"
|
||||
ghost
|
||||
@click="expire(row)"
|
||||
>删除</Button
|
||||
>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
: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>
|
||||
</div>
|
||||
</template>
|
||||
@@ -145,41 +102,13 @@ export default {
|
||||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.promotionStatus == "NEW") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "新建",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "geekblue",},},"新建");
|
||||
} else if (params.row.promotionStatus == "START") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "开始",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "green",},},"开始");
|
||||
} else if (params.row.promotionStatus == "END") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "结束",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "volcano",},},"结束");
|
||||
} else if (params.row.promotionStatus == "CLOSE") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "废弃",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "red",},},"结束");
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -302,7 +231,7 @@ export default {
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import "@/styles/table-common.scss";
|
||||
.mr_5{
|
||||
margin: 0 4px;
|
||||
.mr_5 {
|
||||
margin: 0 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="templateShow">
|
||||
<Form :model="form" :label-width="120">
|
||||
<FormItem label="每日场次设置">
|
||||
<Row :gutter="16" class="row">
|
||||
@@ -27,6 +27,7 @@ import { getSetting, setSetting } from "@/api/index";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
templateShow:false,
|
||||
submitLoading: false,
|
||||
selectedTime: [],
|
||||
times: [], //时间集合 1-24点
|
||||
@@ -81,6 +82,7 @@ export default {
|
||||
async init() {
|
||||
let result = await getSetting("SECKILL_SETTING");
|
||||
if (result.success) {
|
||||
this.templateShow = true
|
||||
this.form.seckillRule = result.result.seckillRule;
|
||||
this.times=[]
|
||||
for (let i = 0; i < 24; i++) {
|
||||
|
||||
@@ -95,13 +95,13 @@ export default {
|
||||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.billStatus == "OUT") {
|
||||
return h("div", "已出账");
|
||||
return h("Tag", {props: {color: "blue",},},"已出账");
|
||||
} else if (params.row.billStatus == "CHECK") {
|
||||
return h("div", "已对账");
|
||||
return h("Tag", {props: {color: "geekblue",},},"已对账");
|
||||
} else if (params.row.billStatus == "EXAMINE") {
|
||||
return h("div", "已审核");
|
||||
return h("Tag", {props: {color: "purple",},},"已审核");
|
||||
} else {
|
||||
return h("div", "已付款");
|
||||
return h("Tag", {props: {color: "green",},},"已付款");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -106,13 +106,13 @@ export default {
|
||||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.billStatus == "OUT") {
|
||||
return h("div", "已出账");
|
||||
return h("Tag", {props: {color: "blue",},},"已出账");
|
||||
} else if (params.row.billStatus == "CHECK") {
|
||||
return h("div", "已对账");
|
||||
return h("Tag", {props: {color: "geekblue",},},"已对账");
|
||||
} else if (params.row.billStatus == "EXAMINE") {
|
||||
return h("div", "已审核");
|
||||
return h("Tag", {props: {color: "purple",},},"已审核");
|
||||
} else {
|
||||
return h("div", "已付款");
|
||||
return h("Tag", {props: {color: "green",},},"已付款");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -126,7 +126,7 @@ export default {
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: params.row.selfOperated ? "error" : "success",
|
||||
color: params.row.selfOperated ? "volcano" : "green",
|
||||
},
|
||||
},
|
||||
params.row.selfOperated ? "自营" : "非自营"
|
||||
@@ -141,50 +141,15 @@ export default {
|
||||
width: 130,
|
||||
render: (h, params) => {
|
||||
if (params.row.storeDisable == "OPEN") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "开启中",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "green",},},"开启中");
|
||||
} else if (params.row.storeDisable == "CLOSED") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "已关闭",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "volcano",},},"已关闭");
|
||||
} else if (params.row.storeDisable == "APPLY") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "申请中",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "geekblue",},},"申请中");
|
||||
} else if (params.row.storeDisable == "APPLYING") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "审核中",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "purple",},},"审核中");
|
||||
} else if (params.row.storeDisable == "REFUSED") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "审核拒绝",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
return h("Tag", {props: {color: "red",},},"审核拒绝");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -65,13 +65,13 @@
|
||||
<FormItem label="详细地址" prop="salesConsigneeDetail">
|
||||
<Input v-model="shopForm.salesConsigneeDetail" clearable style="width: 350px" />
|
||||
</FormItem>
|
||||
<!-- <Divider orientation="left">腾讯云智服</Divider>
|
||||
<Divider orientation="left">腾讯云智服</Divider>
|
||||
<FormItem label="唯一标识" prop="salesConsigneeDetail">
|
||||
<Input v-model="shopForm.yzfSign" clearable style="width: 350px" />
|
||||
</FormItem>
|
||||
<FormItem label="小程序唯一标识" prop="salesConsigneeDetail">
|
||||
<Input v-model="shopForm.yzfMpSign" clearable style="width: 350px" />
|
||||
</FormItem> -->
|
||||
</FormItem>
|
||||
<Spin fix v-if="loading"></Spin>
|
||||
</div>
|
||||
</TabPane>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="shop-item">
|
||||
<div class="label-item">
|
||||
<span>订单来源</span>
|
||||
<span>{{res.clientType}}</span>
|
||||
<span>{{res.clientType | clientTypeWay}}</span>
|
||||
</div>
|
||||
<div class="label-item">
|
||||
<span>订单状态</span>
|
||||
|
||||
Reference in New Issue
Block a user