Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui
commit
5f5e24638b
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 4.4 KiB |
|
@ -13,11 +13,12 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 侧边导航 -->
|
||||
<!-- 全部商品分类 -->
|
||||
<div class="cate-list" v-show="showAlways || showFirstList" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false">
|
||||
<div class="nav-side">
|
||||
<!-- 第一级分类 -->
|
||||
<div class="nav-side" @mouseleave="panel = false">
|
||||
<ul>
|
||||
<li v-for="(item, index) in cateList" :key="index" @mouseenter="showDetail(index)" @mouseleave="panel = false">
|
||||
<li v-for="(item, index) in cateList" :key="index" @mouseenter="showDetail(index)" >
|
||||
<span class="nav-side-item" @click="goGoodsList(item.id)">{{item.name}}</span>
|
||||
<span v-for="(second, secIndex) in item.children" :key="secIndex">
|
||||
<span v-if="secIndex < 2" > / </span>
|
||||
|
@ -26,13 +27,11 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<transition name="fade">
|
||||
<!-- 展开分类 -->
|
||||
<div
|
||||
class="detail-item-panel"
|
||||
:duration="{ enter: 100, leave: 100 }"
|
||||
v-show="panel"
|
||||
@mouseenter="panel = true"
|
||||
ref="itemPanel1"
|
||||
@mouseleave="panel = false"
|
||||
>
|
||||
<div class="nav-detail-item">
|
||||
|
@ -57,7 +56,6 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -86,12 +84,12 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
navList () {
|
||||
navList () { // 导航列表
|
||||
return JSON.parse(storage.getItem('navList')) || []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCate () {
|
||||
getCate () { // 获取分类数据
|
||||
getCategory(0).then(res => {
|
||||
if (res.success) {
|
||||
this.cateList = res.result;
|
||||
|
@ -99,7 +97,7 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
showDetail (index) {
|
||||
showDetail (index) { // 展示全部分类
|
||||
this.panel = true
|
||||
this.panelData = this.cateList[index].children
|
||||
},
|
||||
|
@ -245,9 +243,6 @@ export default {
|
|||
.nav-detail-item span:hover {
|
||||
background-color: $theme_color;
|
||||
}
|
||||
.detail-item-panel ul {
|
||||
list-style: none;
|
||||
}
|
||||
.detail-item-panel li {
|
||||
line-height: 30px;
|
||||
// margin-left: 40px;
|
||||
|
|
|
@ -119,8 +119,10 @@
|
|||
<p>使用范围:{{useScope(item.scopeType)}}</p>
|
||||
<p>有效期:{{item.endTime}}</p>
|
||||
</div>
|
||||
<img class="used" v-if="usedCouponId.includes(item.id)" src="../../assets/images/geted.png" alt="">
|
||||
<b></b>
|
||||
<a class="c-right" @click="useCoupon(item.id)">立即使用</a>
|
||||
<a class="c-right" @click="useCoupon(item.id, true)">立即使用</a>
|
||||
<a class="c-right" v-if="usedCouponId.includes(item.id)" @click="useCoupon(item.id, false)">放弃优惠</a>
|
||||
<i class="circle-top"></i>
|
||||
<i class="circle-bottom"></i>
|
||||
</li>
|
||||
|
@ -207,7 +209,9 @@ export default {
|
|||
moreAddr: false, // 更多地址
|
||||
canUseCouponNum: 0, // 可用优惠券数量
|
||||
couponList: [], // 可用优惠券列表
|
||||
logoImg: '' // 平台logo
|
||||
logoImg: '', // 平台logo
|
||||
usedCouponId: [], // 已使用优惠券id
|
||||
selectedCoupon: {} // 已选优惠券对象
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
|
@ -250,7 +254,10 @@ export default {
|
|||
this.goodsList = res.result.cartList;
|
||||
this.priceDetailDTO = res.result.priceDetailDTO;
|
||||
this.skuList = res.result.skuList;
|
||||
let notSupArea = res.result.notSupportFreight
|
||||
let notSupArea = res.result.notSupportFreight;
|
||||
this.selectedCoupon = {}
|
||||
if (res.result.platformCoupon) this.selectedCoupon.platformCoupon = res.result.platformCoupon
|
||||
Object.assign(this.selectedCoupon, res.result.storeCoupons)
|
||||
if (notSupArea) {
|
||||
let content = [];
|
||||
let title = ''
|
||||
|
@ -295,8 +302,22 @@ export default {
|
|||
storeId: storeArr.toString(),
|
||||
totalPrice: this.priceDetailDTO.goodsPrice
|
||||
}
|
||||
canUseCouponList(params).then(res => {
|
||||
canUseCouponList(params).then(res => { // 可用优惠券列表
|
||||
if (res.success) this.couponList = res.result.records
|
||||
const couponKeys = Object.keys(this.selectedCoupon)
|
||||
this.usedCouponId = []
|
||||
if (couponKeys.length) {
|
||||
this.couponList.forEach(e => {
|
||||
if (e.id === this.selectedCoupon[couponKeys].memberCoupon.id) {
|
||||
this.usedCouponId.push(e.id)
|
||||
}
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
this.$forceUpdate()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -361,16 +382,14 @@ export default {
|
|||
|
||||
});
|
||||
},
|
||||
useCoupon (id) { // 使用优惠券
|
||||
useCoupon (id, used) { // 使用优惠券
|
||||
let params = {
|
||||
way: this.$route.query.way,
|
||||
memberCouponId: id,
|
||||
used: true
|
||||
used: used // true 为使用, false为弃用
|
||||
}
|
||||
selectCoupon(params).then(res => {
|
||||
if (res.success) {
|
||||
this.init()
|
||||
}
|
||||
if (res.success) this.init()
|
||||
})
|
||||
},
|
||||
editInvoice () { // 编辑发票信息
|
||||
|
@ -774,5 +793,16 @@ export default {
|
|||
.circle-top,.circle-bottom{
|
||||
right: 22px;
|
||||
}
|
||||
.used {
|
||||
position: absolute;
|
||||
top: 60px;
|
||||
right: 40px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
.coupon-list {
|
||||
max-height: 260px;
|
||||
overflow: scroll;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -2,7 +2,7 @@ export default {
|
|||
/**
|
||||
* @description 配置显示在浏览器标签的title
|
||||
*/
|
||||
title: 'Lili电商',
|
||||
title: "Lili电商",
|
||||
/**
|
||||
* @description token在Cookie中存储的天数,默认1天
|
||||
*/
|
||||
|
@ -17,29 +17,28 @@ export default {
|
|||
* @description api请求基础路径
|
||||
*/
|
||||
api_dev: {
|
||||
common: 'https://common-api.pickmall.cn',
|
||||
buyer: 'https://buyer-api.pickmall.cn',
|
||||
seller: 'https://store-api.pickmall.cn',
|
||||
manager: 'https://admin-api.pickmall.cn'
|
||||
common: "https://common-api.pickmall.cn",
|
||||
buyer: "https://buyer-api.pickmall.cn",
|
||||
seller: "https://store-api.pickmall.cn",
|
||||
manager: "https://admin-api.pickmall.cn"
|
||||
},
|
||||
api_prod: {
|
||||
common: 'https://common-api.pickmall.cn',
|
||||
buyer: 'https://buyer-api.pickmall.cn',
|
||||
seller: 'https://store-api.pickmall.cn',
|
||||
manager: 'https://admin-api.pickmall.cn'
|
||||
common: "https://common-api.pickmall.cn",
|
||||
buyer: "https://buyer-api.pickmall.cn",
|
||||
seller: "https://store-api.pickmall.cn",
|
||||
manager: "https://admin-api.pickmall.cn"
|
||||
},
|
||||
/**
|
||||
* @description api请求基础路径前缀
|
||||
*/
|
||||
baseUrlPrefix: '/manager',
|
||||
baseUrlPrefix: "/manager",
|
||||
/**
|
||||
* @description 需要加载的插件
|
||||
*/
|
||||
plugin: {
|
||||
'error-store': {
|
||||
"error-store": {
|
||||
showInHeader: true, // 设为false后不会在顶部显示错误日志徽标
|
||||
developmentOff: true // 设为true后在开发环境不会收集错误信息,方便开发中排查错误
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<shrinkable-menu></shrinkable-menu>
|
||||
</div>
|
||||
<!-- 顶部标题栏主体 -->
|
||||
<div class="main-header-con" style="padding-left:240px">
|
||||
<div class="main-header-con">
|
||||
<div class="main-header">
|
||||
<div :class="{'header-avator-con':navType!=4, 'header-avator-con nav4':navType == 4}">
|
||||
<!-- 通知消息 -->
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<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="memberName">
|
||||
<Input
|
||||
type="text"
|
||||
|
@ -15,44 +19,73 @@
|
|||
/>
|
||||
</Form-item>
|
||||
<Form-item label="状态">
|
||||
<Select v-model="searchForm.distributionStatus" style="width:200px">
|
||||
<Option v-for="item in distributionStatusList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
||||
<Select
|
||||
v-model="searchForm.distributionStatus"
|
||||
style="width: 200px"
|
||||
>
|
||||
<Option
|
||||
v-for="item in distributionStatusList"
|
||||
:value="item.value"
|
||||
:key="item.value"
|
||||
>{{ item.label }}</Option
|
||||
>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
<Button
|
||||
@click="handleSearch"
|
||||
type="primary"
|
||||
icon="ios-search"
|
||||
class="search-btn"
|
||||
>搜索</Button
|
||||
>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</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="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>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
import {
|
||||
getDistributionListData,
|
||||
retreatDistribution,
|
||||
resumeDistribution,
|
||||
auditDistribution,
|
||||
} from "@/api/distribution";
|
||||
import {distributionStatusList} from './dataJson.js';
|
||||
export default {
|
||||
} from "@/api/distribution";
|
||||
import { distributionStatusList } from "./dataJson.js";
|
||||
export default {
|
||||
name: "distribution",
|
||||
components: {
|
||||
},
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
distributionStatusList, // 分销状态
|
||||
openSearch: true, // 显示搜索
|
||||
loading: true, // 表单加载状态
|
||||
searchForm: { // 搜索框初始化对象
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
},
|
||||
|
@ -63,7 +96,7 @@
|
|||
title: "会员名称",
|
||||
key: "memberName",
|
||||
minWidth: 120,
|
||||
tooltip: true
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
title: "推广单数",
|
||||
|
@ -77,8 +110,11 @@
|
|||
width: 150,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
return h('div', this.$options.filters.unitPrice(params.row.rebateTotal, '¥'))
|
||||
}
|
||||
return h(
|
||||
"div",
|
||||
this.$options.filters.unitPrice(params.row.rebateTotal, "¥")
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "可用金额",
|
||||
|
@ -86,8 +122,11 @@
|
|||
width: 150,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
return h('div', this.$options.filters.unitPrice(params.row.rebateTotal, '¥'))
|
||||
}
|
||||
return h(
|
||||
"div",
|
||||
this.$options.filters.unitPrice(params.row.rebateTotal, "¥")
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "冻结金额",
|
||||
|
@ -95,8 +134,11 @@
|
|||
width: 150,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
return h('div', this.$options.filters.unitPrice(params.row.rebateTotal, '¥'))
|
||||
}
|
||||
return h(
|
||||
"div",
|
||||
this.$options.filters.unitPrice(params.row.rebateTotal, "¥")
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
|
@ -105,16 +147,24 @@
|
|||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if (params.row.distributionStatus == "PASS") {
|
||||
return h( "Badge", {props: { status: "success",text: "审核通过" } })
|
||||
return h("Badge", {
|
||||
props: { status: "success", text: "审核通过" },
|
||||
});
|
||||
} else if (params.row.distributionStatus == "APPLY") {
|
||||
return h( "Badge", {props: { status: "processing",text: "申请中" } })
|
||||
return h("Badge", {
|
||||
props: { status: "processing", text: "申请中" },
|
||||
});
|
||||
} else if (params.row.distributionStatus == "RETREAT") {
|
||||
return h( "Badge", {props: { status: "warning",text: "已清退" } })
|
||||
return h("Badge", {
|
||||
props: { status: "warning", text: "已清退" },
|
||||
});
|
||||
} else if (params.row.distributionStatus == "REFUSE") {
|
||||
return h( "Badge", {props: { status: "error",text: "审核拒绝" } })
|
||||
}
|
||||
return h("Badge", {
|
||||
props: { status: "error", text: "审核拒绝" },
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
|
@ -122,11 +172,13 @@
|
|||
fixed: "right",
|
||||
width: 140,
|
||||
render: (h, params) => {
|
||||
return h("div",{
|
||||
style:{
|
||||
display:'flex',
|
||||
justifyContent:'center'
|
||||
}
|
||||
return h(
|
||||
"div",
|
||||
{
|
||||
style: {
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
},
|
||||
},
|
||||
[
|
||||
h(
|
||||
|
@ -134,14 +186,20 @@
|
|||
{
|
||||
props: {
|
||||
type: "error",
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
display:
|
||||
params.row.distributionStatus != "RETREAT"
|
||||
? "block"
|
||||
: "none",
|
||||
},
|
||||
style:{marginRight:'5px', display:params.row.distributionStatus!='RETREAT'?'block':'none'},
|
||||
on: {
|
||||
click: () => {
|
||||
this.retreat(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"清退"
|
||||
),
|
||||
|
@ -150,23 +208,30 @@
|
|||
{
|
||||
props: {
|
||||
type: "success",
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
display:
|
||||
params.row.distributionStatus == "RETREAT"
|
||||
? "block"
|
||||
: "none",
|
||||
},
|
||||
style:{marginRight:'5px', display:params.row.distributionStatus=='RETREAT'?'block':'none'},
|
||||
on: {
|
||||
click: () => {
|
||||
this.resume(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"恢复"
|
||||
)
|
||||
]);
|
||||
}
|
||||
}
|
||||
),
|
||||
]
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0 // 表单数据总数
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -176,7 +241,7 @@
|
|||
see(v) {
|
||||
this.$router.push({
|
||||
name: "distributionOrder",
|
||||
query: { id:v.memberId }
|
||||
query: { id: v.memberId },
|
||||
});
|
||||
},
|
||||
changePage(v) {
|
||||
|
@ -194,7 +259,8 @@
|
|||
this.getDataList();
|
||||
},
|
||||
|
||||
clearSelectAll() { // 清空
|
||||
clearSelectAll() {
|
||||
// 清空
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
changeSelect(e) {
|
||||
|
@ -206,7 +272,7 @@
|
|||
this.loading = true;
|
||||
this.searchForm.status = "PASS";
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getDistributionListData(this.searchForm).then(res => {
|
||||
getDistributionListData(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
|
@ -223,41 +289,41 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
retreatDistribution(v.id).then(res => {
|
||||
retreatDistribution(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
// 恢复分销商
|
||||
resume(v){
|
||||
resume(v) {
|
||||
this.$Modal.confirm({
|
||||
title: '提示',
|
||||
title: "提示",
|
||||
// 记得确认修改此处
|
||||
content: "您确认要恢复 " + v.memberName + " ?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
resumeDistribution(v.id).then(res => {
|
||||
resumeDistribution(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import "@/styles/table-common.scss";
|
||||
@import "@/styles/table-common.scss";
|
||||
</style>
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<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="memberName">
|
||||
<Input
|
||||
type="text"
|
||||
|
@ -14,45 +18,64 @@
|
|||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
<Button
|
||||
@click="handleSearch"
|
||||
type="primary"
|
||||
icon="ios-search"
|
||||
class="search-btn"
|
||||
>搜索</Button
|
||||
>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row style="margin-top: 10px">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
|
||||
@on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</Row>
|
||||
<Table
|
||||
class="mt_10"
|
||||
: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>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getDistributionListData,
|
||||
auditDistribution
|
||||
} from "@/api/distribution";
|
||||
import { getDistributionListData, auditDistribution } from "@/api/distribution";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: "distributionApply",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
searchForm: { // 搜索框初始化对象
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
startDate: "", // 起始时间
|
||||
endDate: "" // 终止时间
|
||||
endDate: "", // 终止时间
|
||||
},
|
||||
form: { // 添加或编辑表单对象初始化数据
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
memberName: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
|
@ -92,13 +115,13 @@
|
|||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.audit(params.row, "PASS");
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"通过"
|
||||
),
|
||||
|
@ -112,17 +135,17 @@
|
|||
on: {
|
||||
click: () => {
|
||||
this.audit(params.row, "REFUSE");
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"拒绝"
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0 // 表单数据总数
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -168,7 +191,7 @@
|
|||
this.loading = true;
|
||||
this.searchForm.distributionStatus = "APPLY";
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getDistributionListData(this.searchForm).then(res => {
|
||||
getDistributionListData(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
|
@ -183,35 +206,35 @@
|
|||
},
|
||||
//审核
|
||||
audit(v, status) {
|
||||
let test = "拒绝"
|
||||
let test = "拒绝";
|
||||
if (status == "PASS") {
|
||||
test = "通过"
|
||||
test = "通过";
|
||||
}
|
||||
let params = {
|
||||
status : status
|
||||
}
|
||||
status: status,
|
||||
};
|
||||
this.$Modal.confirm({
|
||||
title: "确认" + test,
|
||||
// 记得确认修改此处
|
||||
content: "您确认要" + test + " " + v.memberName + " ?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
auditDistribution(v.id, params).then(res => {
|
||||
auditDistribution(v.id, params).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import "@/styles/table-common.scss";
|
||||
@import "@/styles/table-common.scss";
|
||||
</style>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch" >
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -21,15 +19,11 @@
|
|||
</Form-item>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page padding-row">
|
||||
<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>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable='false' :width="500">
|
||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate" >
|
||||
<FormItem label="编号">
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -20,7 +18,6 @@
|
|||
<Row class="operation" style="margin-top: 10px">
|
||||
<Button @click="delAll">批量删除</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||
<template slot="goodsName" slot-scope="{row}">
|
||||
<div>
|
||||
|
@ -36,13 +33,10 @@
|
|||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<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>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row v-show="openSearch" @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -36,19 +34,13 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
|
||||
<Row class="padding-row">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"></Table>
|
||||
</Row>
|
||||
<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>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch"> </Row>
|
||||
<Row class="operation">
|
||||
|
@ -9,7 +7,6 @@
|
|||
|
||||
<Button @click="delAll">批量删除</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -20,7 +17,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -36,8 +32,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
<Tabs v-model="orderStatus" @on-click="handleClickType">
|
||||
<TabPane label="行业订单数量" name="NUM">
|
||||
<Table :columns="columns" :data="data"></Table>
|
||||
|
||||
</TabPane>
|
||||
<TabPane label="行业订单金额" name="PRICE">
|
||||
<Table :columns="columns" :data="data"></Table>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
|
@ -43,7 +41,6 @@
|
|||
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search" >搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -77,7 +74,6 @@
|
|||
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -93,8 +89,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
|
@ -105,7 +99,6 @@
|
|||
ref="underForm"
|
||||
:model="underForm"
|
||||
:label-width="100"
|
||||
:rules="formValidate"
|
||||
>
|
||||
<FormItem label="下架原因" prop="reason">
|
||||
<Input v-model="underForm.reason" clearable style="width: 100%" />
|
||||
|
@ -133,9 +126,6 @@ export default {
|
|||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
drop: false, // 展开搜索框
|
||||
dropDownContent: "展开", // 展开标签文字
|
||||
dropDownIcon: "ios-arrow-down", // 展开图标
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
|
@ -146,17 +136,6 @@ export default {
|
|||
underForm: { // 下架原因
|
||||
reason: "",
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
goodsName: "",
|
||||
sn: "",
|
||||
marketEnable: "",
|
||||
price: "",
|
||||
sellerName: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
@ -379,16 +358,6 @@ export default {
|
|||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
dropDown() {
|
||||
if (this.drop) {
|
||||
this.dropDownContent = "展开";
|
||||
this.dropDownIcon = "ios-arrow-down";
|
||||
} else {
|
||||
this.dropDownContent = "收起";
|
||||
this.dropDownIcon = "ios-arrow-up";
|
||||
}
|
||||
this.drop = !this.drop;
|
||||
},
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
|
@ -32,7 +30,6 @@
|
|||
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search" >搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -60,7 +57,6 @@
|
|||
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -76,8 +72,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -105,16 +99,6 @@
|
|||
goodsAuditForm: { // 商品编辑表单
|
||||
is_auth: 1,
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
goodsName: "",
|
||||
sn: "",
|
||||
marketEnable: "",
|
||||
price: "",
|
||||
sellerName: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
</style>
|
||||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
|
@ -30,7 +28,6 @@
|
|||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -41,7 +38,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -57,8 +53,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
|
@ -28,7 +26,6 @@
|
|||
<Button @click="add" type="primary" >添加</Button>
|
||||
<Button @click="delAll" >批量删除</Button>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -39,9 +36,7 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
>
|
||||
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -57,8 +52,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
|
|
|
@ -1,249 +0,0 @@
|
|||
<template>
|
||||
<Card>
|
||||
<Form
|
||||
label-position="left"
|
||||
ref="searchForm"
|
||||
:model="params"
|
||||
inline
|
||||
:label-width="100"
|
||||
class="search-form"
|
||||
>
|
||||
<Form-item label="选择店铺" prop="sn">
|
||||
<span class="tips" v-if="storeName"
|
||||
>{{ storeName }}
|
||||
<Button
|
||||
@click="
|
||||
() => {
|
||||
storeName = '';
|
||||
params.shopId = '';
|
||||
}
|
||||
"
|
||||
type="text"
|
||||
>清空</Button
|
||||
>
|
||||
</span>
|
||||
<Button size="small" @click="handleClickShop" type="primary"
|
||||
>选择店铺</Button
|
||||
>
|
||||
</Form-item>
|
||||
|
||||
<Form-item label="选择时间类型">
|
||||
<Select v-model="params.timeType" style="width: 200px">
|
||||
<Option
|
||||
v-for="item in typeList"
|
||||
:value="item.value"
|
||||
:key="item.value"
|
||||
>{{ item.label }}</Option
|
||||
>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="按年查询">
|
||||
<DatePicker
|
||||
type="year"
|
||||
placeholder="Select year"
|
||||
style="width: 200px"
|
||||
v-model="year"
|
||||
></DatePicker>
|
||||
</Form-item>
|
||||
<Form-item label="按月查询" v-if="params.timeType == 'MONTH'">
|
||||
<InputNumber :max="12" :min="1" v-model="params.month"></InputNumber>
|
||||
</Form-item>
|
||||
</Form>
|
||||
|
||||
<div class="order-list">
|
||||
<div class="order-col">
|
||||
<div>金额</div>
|
||||
<div>{{ priceData | unitPrice }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<Tabs v-model="orderStatus" @on-click="handleClickType">
|
||||
<TabPane label="订单列表" name="PRICE">
|
||||
<Table :columns="columns" :data="data"></Table>
|
||||
<div class="page-col">
|
||||
<Page @on-change="changePage" :total="total" show-total />
|
||||
</div>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
|
||||
<Modal v-model="modalFlag" width="1200" :title="selectName">
|
||||
<!-- 店铺 -->
|
||||
<shopLayout v-if="shopFlag" @callback="callbackShop" ref="shops" />
|
||||
<!-- 会员 -->
|
||||
<memberLayout v-else @callback="callbackMember" ref="members" />
|
||||
</Modal>
|
||||
</Card>
|
||||
</template>
|
||||
<script>
|
||||
import shopLayout from "@/views/seller/shop/shopList";
|
||||
import memberLayout from "@/views/member/list/index";
|
||||
import * as API_Goods from "@/api/goods";
|
||||
export default {
|
||||
components: {
|
||||
shopLayout,
|
||||
memberLayout,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
storeName: "", // 店铺名称
|
||||
memberName: "", // 会员名称
|
||||
shopFlag: false, // 是否展示
|
||||
selectName: "选择", // modal名称
|
||||
modalFlag: false, // modal显隐
|
||||
priceData: "", // 价格
|
||||
orderStatus: "PRICE", // tab展示
|
||||
shopList: {}, // 店铺列表
|
||||
memberList: {}, // 会员列表
|
||||
typeList: [
|
||||
{
|
||||
value: "YEAR",
|
||||
label: "年",
|
||||
},
|
||||
{
|
||||
value: "MONTH",
|
||||
label: "月",
|
||||
},
|
||||
],
|
||||
total: 0, // 列表总数
|
||||
year: "", // 当前年份
|
||||
params: { // 请求参数
|
||||
type: "PRICE",
|
||||
timeType: "YEAR",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
year: "",
|
||||
shopId: "",
|
||||
memberId: "",
|
||||
},
|
||||
columns: [ // 表格表头
|
||||
{
|
||||
title: "售后号",
|
||||
key: "refundSn",
|
||||
},
|
||||
{
|
||||
title: "卖家名称",
|
||||
key: "sellerName",
|
||||
},
|
||||
{
|
||||
title: "商品名称",
|
||||
key: "name",
|
||||
},
|
||||
{
|
||||
title: "规格名称",
|
||||
key: "specs",
|
||||
},
|
||||
{
|
||||
title: "会员名称",
|
||||
key: "memberName",
|
||||
},
|
||||
|
||||
{
|
||||
title: "实际退款金额",
|
||||
key: "finalPrice",
|
||||
align: "center",
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"div",
|
||||
this.$options.filters.unitPrice(params.row.finalPrice)
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [] // 列表数据
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
params: {
|
||||
handler(val) {
|
||||
this.init();
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
|
||||
year(val) {
|
||||
this.params.year = new Date(val).getFullYear();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 选择店铺
|
||||
handleClickShop() {
|
||||
this.modalFlag = true;
|
||||
this.selectName += "店铺";
|
||||
this.shopFlag = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.shops.selectedShop = true;
|
||||
});
|
||||
},
|
||||
// 选择会员
|
||||
handleClickMember() {
|
||||
this.modalFlag = true;
|
||||
this.selectName += "会员";
|
||||
this.$nextTick(() => {
|
||||
this.$refs.members.selectedMember = true;
|
||||
});
|
||||
},
|
||||
|
||||
callbackMember(val) {
|
||||
this.memberName = val.username;
|
||||
this.params.memberId = val.id;
|
||||
this.modalFlag = false;
|
||||
},
|
||||
|
||||
callbackShop(val) {
|
||||
this.storeName = val.storeName;
|
||||
this.params.shopId = val.id;
|
||||
this.modalFlag = false;
|
||||
},
|
||||
|
||||
// 点击分页
|
||||
changePage(index) {
|
||||
this.params.pageNumber = index;
|
||||
},
|
||||
|
||||
handleClickType(name) {
|
||||
this.params.type = name;
|
||||
},
|
||||
init(name) {
|
||||
Promise.all([
|
||||
API_Goods.refundStatistics(this.params),
|
||||
!this.priceData ? API_Goods.refundPriceStatistics(this.params) : "",
|
||||
]).then((res) => {
|
||||
if (res[0].result) {
|
||||
this.data = res[0].result.records;
|
||||
this.total = res[0].result.total;
|
||||
}
|
||||
if (res[1].result) {
|
||||
this.priceData = res[1].result;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
let data = new Date();
|
||||
|
||||
this.year = data;
|
||||
this.year && this.params.month
|
||||
? this.timeType == "MONTH"
|
||||
: this.timeType == "YEAR";
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.page-col {
|
||||
text-align: right;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.order-col {
|
||||
display: flex;
|
||||
> div {
|
||||
margin-right: 8px;
|
||||
padding: 16px;
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
.order-list {
|
||||
display: flex;
|
||||
}
|
||||
.tips {
|
||||
margin: 0 8px;
|
||||
}
|
||||
</style>
|
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -10,7 +9,6 @@
|
|||
<Button @click="handleSearch" type="primary" class="search-btn" icon="ios-search">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
|
||||
@on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||
<!-- 页面展示 -->
|
||||
|
@ -24,15 +22,12 @@
|
|||
</i-switch>
|
||||
</template>
|
||||
</Table>
|
||||
|
||||
</Row>
|
||||
<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>
|
||||
</Row>
|
||||
</Card>
|
||||
</Row>
|
||||
|
||||
<Modal v-model="infoFlag" width="800" :title="infoTitle">
|
||||
|
||||
|
@ -68,7 +63,7 @@
|
|||
<div style="margin-left: 40px">
|
||||
<img style="width: 100px;height: 110px;margin-left: 2px"
|
||||
v-for="(img,index) in infoData.image.split(',')" v-if="infoData.image.length !=0" :src="img"
|
||||
alt="" />
|
||||
alt="" :key="index"/>
|
||||
</div>
|
||||
</div>
|
||||
</List>
|
||||
|
@ -81,7 +76,7 @@
|
|||
</div>
|
||||
<div v-if="infoData.haveReplyImage == 1">
|
||||
<div style="margin-left: 60px">
|
||||
<img style="width: 100px;height: 110px" v-for="(img,index) in infoData.replyImage.split(',')"
|
||||
<img style="width: 100px;height: 110px" v-for="(img,index) in infoData.replyImage.split(',')" :key="index"
|
||||
v-if="infoData.replyImage.length !=0" :src="img" alt=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -114,16 +109,6 @@ export default {
|
|||
startDate: "", // 起始时间
|
||||
endDate: "", // 终止时间
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
memberName: "",
|
||||
storeName: "",
|
||||
shopDisable: "",
|
||||
id: "",
|
||||
createTime: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
|
|
@ -45,8 +45,6 @@ export default {
|
|||
type: "multiple", //单选或者多选 single multiple
|
||||
|
||||
skuList: [], // 商品sku列表
|
||||
|
||||
selectedWay: [], //选中商品集合
|
||||
total: "", // 商品总数
|
||||
goodsParams: { // 商品请求参数
|
||||
pageNumber: 1,
|
||||
|
@ -64,7 +62,12 @@ export default {
|
|||
loading: false, // 加载状态
|
||||
};
|
||||
},
|
||||
props: ["clearFlag"],
|
||||
props: {
|
||||
selectedWay: {
|
||||
type: Array,
|
||||
default: new Array()
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
category(val) {
|
||||
this.goodsParams.categoryPath = val[0];
|
||||
|
@ -74,6 +77,7 @@ export default {
|
|||
this.$emit("selected", this.selectedWay);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
},
|
||||
|
||||
"goodsParams.categoryPath": {
|
||||
|
@ -110,6 +114,12 @@ export default {
|
|||
res.result.records.forEach((item) => {
|
||||
item.selected = false;
|
||||
item.___type = "goods"; //设置为goods让pc wap知道标识
|
||||
|
||||
this.selectedWay.forEach(e => {
|
||||
if (e.id === item.id) {
|
||||
item.selected = true
|
||||
}
|
||||
})
|
||||
});
|
||||
/**
|
||||
* 解决数据请求中,滚动栏会一直上下跳动
|
||||
|
@ -117,7 +127,6 @@ export default {
|
|||
this.total = res.result.total;
|
||||
this.goodsData.push(...res.result.records);
|
||||
|
||||
// console.log(this.goodsData);
|
||||
} else {
|
||||
this.empty = true;
|
||||
}
|
||||
|
@ -193,9 +202,13 @@ export default {
|
|||
this.selectedWay.push(val);
|
||||
} else {
|
||||
val.selected = false;
|
||||
this.selectedWay.splice(index, 1);
|
||||
for (let i = 0; i<this.selectedWay.length; i++ ) {
|
||||
if (this.selectedWay[i].id===val.id) {
|
||||
this.selectedWay.splice(i,1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// console.log(this.selectedWay);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
<template>
|
||||
<Modal :styles="{ top: '120px' }" width="1160" @on-cancel="clickClose" @on-ok="clickOK" v-model="flag" :mask-closable="false" scrollable>
|
||||
<goodsDialog @selected="
|
||||
(val) => {
|
||||
goodsData = val;
|
||||
}
|
||||
" v-if="goodsFlag" ref="goodsDialog" />
|
||||
<template v-if="flag">
|
||||
<goodsDialog @selected="(val) => {goodsData = val;}"
|
||||
v-if="goodsFlag" ref="goodsDialog" :selectedWay='goodsData'/>
|
||||
<linkDialog @selectedLink="
|
||||
(val) => {
|
||||
linkData = val;
|
||||
}
|
||||
" v-else class="linkDialog" />
|
||||
</template>
|
||||
</Modal>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -23,14 +22,11 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
goodsFlag: false, // 是否商品选择器
|
||||
goodsData: "", //选择的商品
|
||||
goodsData: [], //选择的商品
|
||||
linkData: "", //选择的链接
|
||||
flag: false, // modal显隐
|
||||
};
|
||||
},
|
||||
props: ["types"],
|
||||
watch: {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
// 关闭弹窗
|
||||
clickClose() {
|
||||
|
@ -54,13 +50,17 @@ export default {
|
|||
}
|
||||
this.clickClose();
|
||||
},
|
||||
open(type) {
|
||||
open(type, mutiple) {
|
||||
this.flag = true;
|
||||
if (type == "goods") {
|
||||
this.goodsFlag = true;
|
||||
if (mutiple) {
|
||||
this.singleGoods()
|
||||
}
|
||||
} else {
|
||||
this.goodsFlag = false;
|
||||
}
|
||||
|
||||
},
|
||||
close() {
|
||||
this.flag = false;
|
||||
|
|
|
@ -40,7 +40,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs["lili-component"][0].type = "single"; //如果商品页面设置成为单选
|
||||
this.$refs["lili-component"][0].type = "single"; //商品页面设置成为单选
|
||||
});
|
||||
|
||||
this.wap.forEach((item) => {
|
||||
|
|
|
@ -65,7 +65,7 @@ export default {
|
|||
},
|
||||
{
|
||||
title: "店铺名称",
|
||||
key: "sellerName",
|
||||
key: "storeName",
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
|
@ -113,7 +113,7 @@ export default {
|
|||
},
|
||||
{
|
||||
title: "店铺名称",
|
||||
key: "sellerName",
|
||||
key: "storeName",
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -176,12 +176,16 @@ export default {
|
|||
handleSelectGoods(item) { // 调起选择商品
|
||||
console.warn(item);
|
||||
if (item) this.selected = item;
|
||||
this.$refs.liliDialog.open('goods')
|
||||
this.$refs.liliDialog.open('goods', 'single')
|
||||
setTimeout(() => {
|
||||
this.$refs.liliDialog.goodsData = [this.selected]
|
||||
}, 500);
|
||||
},
|
||||
selectedLink (val) {
|
||||
this.selected.url = this.$options.filters.formatLinkType(val);
|
||||
},
|
||||
selectedGoodsData (val) {
|
||||
console.log(val);
|
||||
let goods = val[0]
|
||||
console.log(this.selected);
|
||||
this.selected.img = goods.thumbnail
|
||||
|
|
|
@ -108,7 +108,10 @@ export default {
|
|||
},
|
||||
handleSelectGoods(item) { // 调起选择链接弹窗
|
||||
if(item) this.selected = item;
|
||||
this.$refs.liliDialog.open('goods')
|
||||
this.$refs.liliDialog.open('goods', 'single')
|
||||
setTimeout(() => {
|
||||
this.$refs.liliDialog.goodsData = [this.selected]
|
||||
}, 500);
|
||||
},
|
||||
selectedLink(val) {
|
||||
this.selected.url = this.$options.filters.formatLinkType(val);
|
||||
|
|
|
@ -241,7 +241,7 @@ export default {
|
|||
},
|
||||
handleSelectGoods(item) {
|
||||
// 调起选择商品
|
||||
this.$refs.liliDialog.open("goods");
|
||||
this.$refs.liliDialog.open('goods', 'single')
|
||||
},
|
||||
selectedLink(val) {
|
||||
this.selected.url = this.$options.filters.formatLinkType(val);
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch"></Row>
|
||||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -26,7 +23,6 @@
|
|||
</i-switch>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -42,8 +38,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<template>
|
||||
<div class="ivu-shrinkable-menu">
|
||||
<!-- 一级菜单 -->
|
||||
<Menu ref="sideMenu" width="110px" theme="dark" :active-name="currNav" @on-select="selectNav">
|
||||
<Menu ref="sideMenu" width="80px" theme="dark" :active-name="currNav" @on-select="selectNav">
|
||||
<MenuItem v-for="(item, i) in navList" :key="i" :name="item.name">
|
||||
{{item.title}}
|
||||
</MenuItem>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<Menu
|
||||
ref="childrenMenu"
|
||||
:active-name="$route.name"
|
||||
width="130px"
|
||||
width="100px"
|
||||
@on-select="changeMenu"
|
||||
>
|
||||
<template v-for="item in menuList">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.ivu-shrinkable-menu{
|
||||
height: calc(100% - 60px);
|
||||
width: 240px;
|
||||
width: 180px;
|
||||
display: flex;
|
||||
}
|
||||
.ivu-menu-vertical .ivu-menu-item-group-title {
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
box-sizing: border-box;
|
||||
position: fixed;
|
||||
display: block;
|
||||
padding-left: 200px;
|
||||
padding-left: 180px;
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
z-index: 20;
|
||||
|
@ -256,12 +256,12 @@
|
|||
.single-page-con {
|
||||
min-width: 740px;
|
||||
position: relative;
|
||||
left: 240px;
|
||||
left: 180px;
|
||||
top: 100px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: calc(100% - 110px);
|
||||
width: calc(100% - 240px);
|
||||
width: calc(100% - 180px);
|
||||
overflow: auto;
|
||||
background-color: #f0f0f0;
|
||||
z-index: 1;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
|
@ -43,7 +41,6 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -54,7 +51,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -70,8 +66,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
|
||||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -15,16 +13,12 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</Row>
|
||||
<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>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
|
@ -50,7 +48,6 @@
|
|||
</Form-item>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -61,7 +58,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -77,8 +73,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="roleModalVisible"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -22,17 +21,13 @@
|
|||
<Button @click="addMember" type="primary">添加会员</Button>
|
||||
</Row>
|
||||
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||
</Table>
|
||||
|
||||
</Row>
|
||||
<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>
|
||||
</Row>
|
||||
</Card>
|
||||
</Row>
|
||||
|
||||
<!-- 添加用户模态框 -->
|
||||
<Modal v-model="addFlag" title="添加用户">
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="point-data" style="margin-top: -5px">
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -89,7 +88,6 @@
|
|||
@on-sort-change="pointChangeSort"
|
||||
>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page" style="margin-top: 10px">
|
||||
<Page
|
||||
|
@ -168,7 +166,6 @@
|
|||
</Form>
|
||||
</Row>
|
||||
<div style="min-height: 180px">
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -179,7 +176,6 @@
|
|||
@on-sort-change="orderChangeSort"
|
||||
>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page" style="margin-top: 10px">
|
||||
<Page
|
||||
|
@ -201,7 +197,6 @@
|
|||
<Row class="operation padding-row">
|
||||
<Button @click="addMemberAddress" type="primary">新增</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -212,7 +207,6 @@
|
|||
@on-sort-change="addressChangeSort"
|
||||
>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page" style="margin-top: 10px">
|
||||
<Page
|
||||
|
@ -249,7 +243,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -260,7 +253,6 @@
|
|||
@on-sort-change="walletChangeSort"
|
||||
>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page" style="margin-top: 10px">
|
||||
<Page
|
||||
|
@ -292,7 +284,6 @@
|
|||
<Button @click="getReceiptRecordData" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -308,7 +299,6 @@
|
|||
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page" style="margin-top: 10px">
|
||||
<Page
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search">搜索</Button >
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -44,8 +43,6 @@
|
|||
@on-selection-change="changeSelect"
|
||||
>
|
||||
</Table>
|
||||
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
|
|
@ -101,7 +101,6 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -112,7 +111,6 @@
|
|||
@on-selection-change="showSelect"
|
||||
ref="memberTable"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -145,7 +143,6 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -156,7 +153,6 @@
|
|||
@on-selection-change="showSelect"
|
||||
ref="shopTable"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -191,7 +187,6 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -202,7 +197,6 @@
|
|||
@on-selection-change="showSelect"
|
||||
ref="weChatTable"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="weChatSearchForm.pageNumber"
|
||||
|
@ -236,7 +230,6 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -247,7 +240,6 @@
|
|||
@on-selection-change="showSelect"
|
||||
ref="otherTable"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
|
|
@ -75,7 +75,6 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -86,7 +85,6 @@
|
|||
@on-selection-change="showSelect"
|
||||
ref="table"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -52,7 +51,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="pageNumber"
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
<Row class="operation">
|
||||
<Button @click="weChatSync" type="primary">同步微信消息</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -54,7 +53,6 @@
|
|||
:data="weChatData"
|
||||
ref="weChatTable"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="weChatSearchForm.pageNumber"
|
||||
|
@ -77,7 +75,6 @@
|
|||
<Row class="operation">
|
||||
<Button @click="weChatSync('mp')" type="primary">同步微信小程序订阅消息</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -86,7 +83,6 @@
|
|||
sortable="custom"
|
||||
ref="weChatMPTable"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="weChatMPSearchForm.pageNumber"
|
||||
|
|
|
@ -1,32 +1,61 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<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="title">
|
||||
<Input type="text" v-model="searchForm.title" placeholder="请输入标题" clearable style="width: 200px"/>
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.title"
|
||||
placeholder="请输入标题"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="消息内容" prop="content">
|
||||
<Input type="text" v-model="searchForm.content" placeholder="请输入消息内容" clearable style="width: 200px"/>
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.content"
|
||||
placeholder="请输入消息内容"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<span v-if="drop">
|
||||
<Form-item label="发送类型" prop="sendType">
|
||||
<Select v-model="searchForm.sendType" placeholder="请选择" clearable style="width: 200px">
|
||||
<Select
|
||||
v-model="searchForm.sendType"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<Option value="ALL">全站会员</Option>
|
||||
<Option value="SELECT">指定会员</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="创建人" prop="createBy">
|
||||
<Input type="text" v-model="searchForm.createBy" placeholder="请输入创建人" clearable style="width: 200px"/>
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.createBy"
|
||||
placeholder="请输入创建人"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
</span>
|
||||
<Form-item style="margin-left:-35px;" class="br">
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button>
|
||||
<Form-item style="margin-left: -35px" class="br">
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search"
|
||||
>搜索</Button
|
||||
>
|
||||
<Button @click="handleReset">重置</Button>
|
||||
<a class="drop-down" @click="dropDown">
|
||||
{{dropDownContent}}
|
||||
{{ dropDownContent }}
|
||||
<Icon :type="dropDownIcon"></Icon>
|
||||
</a>
|
||||
</Form-item>
|
||||
|
@ -39,27 +68,42 @@
|
|||
</Row>
|
||||
<Row v-show="openTip">
|
||||
<Alert show-icon>
|
||||
已选择 <span class="select-count">{{selectCount}}</span> 项
|
||||
已选择 <span class="select-count">{{ selectCount }}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</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="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>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
export default {
|
||||
name: "member-notice-sender",
|
||||
components: {
|
||||
},
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
openSearch: true, // 显示搜索
|
||||
|
@ -71,7 +115,8 @@
|
|||
drop: false, // 更多搜索项
|
||||
dropDownContent: "展开", // drop中文提示
|
||||
dropDownIcon: "ios-arrow-down", // drop图标
|
||||
searchForm: { // 搜索框初始化对象
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
|
@ -85,12 +130,12 @@
|
|||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
align: "center"
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
type: "index",
|
||||
width: 60,
|
||||
align: "center"
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "标题",
|
||||
|
@ -110,22 +155,21 @@
|
|||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "全部会员"
|
||||
}
|
||||
})
|
||||
text: "全部会员",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
}else{
|
||||
} else {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "指定会员"
|
||||
}
|
||||
})
|
||||
text: "指定会员",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
|
@ -152,22 +196,22 @@
|
|||
props: {
|
||||
type: "error",
|
||||
size: "small",
|
||||
icon: "md-trash"
|
||||
icon: "md-trash",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.remove(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"删除"
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0 // 表单数据总数
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -223,13 +267,15 @@
|
|||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
this.getRequest("/memberNoticeSenter/getByPage", this.searchForm).then(res => {
|
||||
this.getRequest("/memberNoticeSenter/getByPage", this.searchForm).then(
|
||||
(res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
// 以下为模拟数据
|
||||
//this.data = [
|
||||
//];
|
||||
|
@ -240,7 +286,7 @@
|
|||
let query = { type: 0, backRoute: this.$route.name };
|
||||
this.$router.push({
|
||||
name: "add_message",
|
||||
query: query
|
||||
query: query,
|
||||
});
|
||||
},
|
||||
edit(v) {
|
||||
|
@ -266,18 +312,20 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
this.deleteRequest("/memberNoticeSenter/delByIds/" + v.id).then(res => {
|
||||
this.deleteRequest("/memberNoticeSenter/delByIds/" + v.id).then(
|
||||
(res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
// 模拟请求成功
|
||||
//this.$Message.success("操作成功");
|
||||
//this.$Modal.remove();
|
||||
//this.getDataList();
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
delAll() {
|
||||
|
@ -291,37 +339,39 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
let ids = "";
|
||||
this.selectList.forEach(function(e) {
|
||||
this.selectList.forEach(function (e) {
|
||||
ids += e.id + ",";
|
||||
});
|
||||
ids = ids.substring(0, ids.length - 1);
|
||||
// 批量删除
|
||||
this.deleteRequest("/memberNoticeSenter/delByIds/" + ids).then(res => {
|
||||
this.deleteRequest("/memberNoticeSenter/delByIds/" + ids).then(
|
||||
(res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.clearSelectAll();
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
// 模拟请求成功
|
||||
//this.$Message.success("操作成功");
|
||||
//this.$Modal.remove();
|
||||
//this.clearSelectAll();
|
||||
//this.getDataList();
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
.operation {
|
||||
margin-bottom: 2vh;
|
||||
}
|
||||
|
@ -338,5 +388,5 @@
|
|||
.drop-down {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search">搜索</Button >
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -34,8 +33,6 @@
|
|||
@on-selection-change="changeSelect"
|
||||
>
|
||||
</Table>
|
||||
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<Row class="operation" style="margin-bottom: 10px">
|
||||
<Button @click="add" type="primary" >添加</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -21,7 +20,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -45,7 +43,6 @@
|
|||
<Row class="operation" style="margin-bottom: 10px">
|
||||
<Button @click="add" type="primary" icon="md-add">添加</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -56,7 +53,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -80,7 +76,6 @@
|
|||
<Row class="operation" style="margin-bottom: 10px">
|
||||
<Button @click="add" type="primary" icon="md-add">添加</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -91,7 +86,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -116,7 +110,6 @@
|
|||
<Button @click="add" type="primary" icon="md-add">添加</Button>
|
||||
<Button @click="getDataList" icon="md-refresh">刷新</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -127,7 +120,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
|
|
@ -73,7 +73,6 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -106,7 +105,6 @@
|
|||
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -36,8 +34,6 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -58,7 +54,6 @@
|
|||
</Poptip>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -74,8 +69,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -29,16 +27,12 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</Row>
|
||||
<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>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -21,18 +19,14 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
|
||||
@on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</Row>
|
||||
<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>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -57,14 +51,6 @@ export default {
|
|||
isRefund: "",
|
||||
},
|
||||
selectDate: null,
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: "售后单号",
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -62,7 +61,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -106,16 +104,6 @@
|
|||
orderStatus: ""
|
||||
},
|
||||
selectDate: null, // 下单时间
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
|
|
@ -212,7 +212,7 @@
|
|||
<li>
|
||||
<span class="label">应付金额:</span>
|
||||
<span class="txt flowPrice"
|
||||
>¥{{ orderInfo.order.priceDetailDTO.flowPrice }}</span
|
||||
>¥{{ orderInfo.order.priceDetailDTO.flowPrice | unitPrice }}</span
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -28,16 +26,12 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</Row>
|
||||
<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>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -64,16 +58,6 @@ export default {
|
|||
orderStatus: "",
|
||||
},
|
||||
selectDate: null,
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
|
|
@ -58,7 +58,6 @@
|
|||
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -75,7 +74,6 @@
|
|||
@click="$router.push({name: 'order-detail',query: {sn: scope.row.orderSn}})">{{scope.row.orderSn}}</a>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -114,20 +112,10 @@
|
|||
receiptStatus: "", // 起始时间
|
||||
},
|
||||
shopsData: [], // 店铺数据
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
params: {
|
||||
pageNumber: 1,
|
||||
pageSize: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary" style="">添加</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||
<!-- 页面展示 -->
|
||||
<template slot="openStatusSlot" slot-scope="scope">
|
||||
|
@ -33,14 +32,13 @@
|
|||
</i-switch>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<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>
|
||||
|
||||
</Page>
|
||||
</Row>
|
||||
|
||||
<template v-if="!selected">
|
||||
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="1100">
|
||||
<Form ref="form" :model="form" :label-width="100">
|
||||
<FormItem label="文章标题" prop="title">
|
||||
|
@ -73,6 +71,8 @@
|
|||
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</template>
|
||||
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -15,7 +14,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="pageNumber"
|
||||
|
|
|
@ -1,38 +1,68 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<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>
|
||||
<Button type="dashed" @click="openTip = !openTip">{{
|
||||
openTip ? "关闭提示" : "开启提示"
|
||||
}}</Button>
|
||||
</Row>
|
||||
<Row v-show="openTip">
|
||||
<Alert show-icon>
|
||||
已选择 <span class="select-count">{{selectCount}}</span> 项
|
||||
已选择 <span class="select-count">{{ selectCount }}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</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="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>
|
||||
</Col>
|
||||
</Row>
|
||||
<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%"/>
|
||||
<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>
|
||||
<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">
|
||||
<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>
|
||||
|
@ -41,35 +71,37 @@
|
|||
<Option value="CATEGORY">商品分类</Option>
|
||||
</Select>
|
||||
</FormItem>
|
||||
<FormItem label="链接值" prop="sort" >
|
||||
<Input v-model="form.operationUrl" clearable style="width:100%"/>
|
||||
<FormItem label="链接值" prop="sort">
|
||||
<Input v-model="form.operationUrl" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="排序" prop="sort" >
|
||||
<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>
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
|
||||
>提交</Button
|
||||
>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
import {
|
||||
getFocusData,
|
||||
saveFocusData,
|
||||
disableFocus,
|
||||
enableFocus,
|
||||
delFocus
|
||||
} from "@/api/pages";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
delFocus,
|
||||
} from "@/api/pages";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: "mobileFocus",
|
||||
components: {
|
||||
uploadPicInput
|
||||
uploadPicInput,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -78,14 +110,16 @@
|
|||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: { // 搜索框初始化对象
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
clientType: "MOBILE", //客户端类型
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
form: { // 添加或编辑表单对象初始化数据
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
name: "",
|
||||
operationType: "",
|
||||
operationUrl: "",
|
||||
|
@ -104,7 +138,7 @@
|
|||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
align: "center"
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "名称",
|
||||
|
@ -118,26 +152,26 @@
|
|||
minWidth: 100,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if (params.row.status == 'CLOSE') {
|
||||
if (params.row.status == "CLOSE") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "禁用"
|
||||
}
|
||||
})
|
||||
text: "禁用",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
} else if (params.row.status == 'OPEN') {
|
||||
} else if (params.row.status == "OPEN") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "启用"
|
||||
}
|
||||
})
|
||||
text: "启用",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "图片",
|
||||
|
@ -148,17 +182,17 @@
|
|||
return h("img", {
|
||||
attrs: {
|
||||
src: params.row.url,
|
||||
alt: "加载图片失败"
|
||||
alt: "加载图片失败",
|
||||
},
|
||||
style: {
|
||||
cursor: "pointer",
|
||||
width: "80px",
|
||||
height: "60px",
|
||||
margin: "10px 0",
|
||||
"object-fit": "contain"
|
||||
}
|
||||
"object-fit": "contain",
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "排序",
|
||||
|
@ -179,16 +213,16 @@
|
|||
{
|
||||
props: {
|
||||
type: "success",
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.enable(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"启用"
|
||||
);
|
||||
|
@ -197,16 +231,16 @@
|
|||
"Button",
|
||||
{
|
||||
props: {
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.disable(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"禁用"
|
||||
);
|
||||
|
@ -217,16 +251,16 @@
|
|||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.edit(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"编辑"
|
||||
),
|
||||
|
@ -238,23 +272,23 @@
|
|||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.remove(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"删除"
|
||||
),
|
||||
enableOrDisable,
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0 // 表单数据总数
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -300,7 +334,7 @@
|
|||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getFocusData(this.searchForm).then(res => {
|
||||
getFocusData(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
|
@ -313,7 +347,7 @@
|
|||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
enable(v){
|
||||
enable(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认启用",
|
||||
// 记得确认修改此处
|
||||
|
@ -321,14 +355,14 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
enableFocus(v.id).then(res => {
|
||||
enableFocus(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
disable(v) {
|
||||
|
@ -339,26 +373,26 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
disableFocus(v.id).then(res => {
|
||||
disableFocus(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate(valid => {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.ClientType = "MOBILE"
|
||||
this.form.ClientType = "MOBILE";
|
||||
this.submitLoading = true;
|
||||
if (this.modalType === 0) {
|
||||
this.form.status = "OPEN"
|
||||
this.form.status = "OPEN";
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
saveFocusData(this.form).then(res => {
|
||||
saveFocusData(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
|
@ -368,7 +402,7 @@
|
|||
});
|
||||
} else {
|
||||
// 编辑
|
||||
saveFocusData(this.form).then(res => {
|
||||
saveFocusData(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
|
@ -410,14 +444,14 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
delFocus(v.id).then(res => {
|
||||
delFocus(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
disableAll() {
|
||||
|
@ -431,12 +465,12 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
let ids = "";
|
||||
this.selectList.forEach(function(e) {
|
||||
this.selectList.forEach(function (e) {
|
||||
ids += e.id + ",";
|
||||
});
|
||||
ids = ids.substring(0, ids.length - 1);
|
||||
// 批量删除
|
||||
disableFocus(ids).then(res => {
|
||||
disableFocus(ids).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("禁用成功");
|
||||
|
@ -444,19 +478,19 @@
|
|||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
.operation {
|
||||
margin-bottom: 2vh;
|
||||
}
|
||||
|
@ -473,5 +507,5 @@
|
|||
.drop-down {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,38 +1,68 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<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>
|
||||
<Button type="dashed" @click="openTip = !openTip">{{
|
||||
openTip ? "关闭提示" : "开启提示"
|
||||
}}</Button>
|
||||
</Row>
|
||||
<Row v-show="openTip">
|
||||
<Alert show-icon>
|
||||
已选择 <span class="select-count">{{selectCount}}</span> 项
|
||||
已选择 <span class="select-count">{{ selectCount }}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</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="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>
|
||||
</Col>
|
||||
</Row>
|
||||
<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%"/>
|
||||
<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>
|
||||
<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">
|
||||
<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>
|
||||
|
@ -41,35 +71,37 @@
|
|||
<Option value="CATEGORY">商品分类</Option>
|
||||
</Select>
|
||||
</FormItem>
|
||||
<FormItem label="链接值" prop="sort" >
|
||||
<Input v-model="form.operationUrl" clearable style="width:100%"/>
|
||||
<FormItem label="链接值" prop="sort">
|
||||
<Input v-model="form.operationUrl" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="排序" prop="sort" >
|
||||
<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>
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
|
||||
>提交</Button
|
||||
>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
import {
|
||||
getFocusData,
|
||||
saveFocusData,
|
||||
disableFocus,
|
||||
enableFocus,
|
||||
delFocus
|
||||
} from "@/api/pages";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
delFocus,
|
||||
} from "@/api/pages";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: "pcFocus",
|
||||
components: {
|
||||
uploadPicInput
|
||||
uploadPicInput,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -78,14 +110,16 @@
|
|||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: { // 搜索框初始化对象
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
clientType: "PC", //客户端类型
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
form: { // 添加或编辑表单对象初始化数据
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
name: "",
|
||||
operationType: "",
|
||||
operationUrl: "",
|
||||
|
@ -104,7 +138,7 @@
|
|||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
align: "center"
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "名称",
|
||||
|
@ -118,26 +152,26 @@
|
|||
minWidth: 100,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if (params.row.status == 'CLOSE') {
|
||||
if (params.row.status == "CLOSE") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "禁用"
|
||||
}
|
||||
})
|
||||
text: "禁用",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
} else if (params.row.status == 'OPEN') {
|
||||
} else if (params.row.status == "OPEN") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "启用"
|
||||
}
|
||||
})
|
||||
text: "启用",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "图片",
|
||||
|
@ -148,17 +182,17 @@
|
|||
return h("img", {
|
||||
attrs: {
|
||||
src: params.row.url,
|
||||
alt: "加载图片失败"
|
||||
alt: "加载图片失败",
|
||||
},
|
||||
style: {
|
||||
cursor: "pointer",
|
||||
width: "80px",
|
||||
height: "60px",
|
||||
margin: "10px 0",
|
||||
"object-fit": "contain"
|
||||
}
|
||||
"object-fit": "contain",
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "排序",
|
||||
|
@ -179,16 +213,16 @@
|
|||
{
|
||||
props: {
|
||||
type: "success",
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.enable(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"启用"
|
||||
);
|
||||
|
@ -197,16 +231,16 @@
|
|||
"Button",
|
||||
{
|
||||
props: {
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.disable(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"禁用"
|
||||
);
|
||||
|
@ -217,16 +251,16 @@
|
|||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.edit(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"编辑"
|
||||
),
|
||||
|
@ -238,23 +272,23 @@
|
|||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.remove(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"删除"
|
||||
),
|
||||
enableOrDisable,
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0 // 表单数据总数
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -300,7 +334,7 @@
|
|||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getFocusData(this.searchForm).then(res => {
|
||||
getFocusData(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
|
@ -313,7 +347,7 @@
|
|||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
enable(v){
|
||||
enable(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认启用",
|
||||
// 记得确认修改此处
|
||||
|
@ -321,14 +355,14 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
enableFocus(v.id).then(res => {
|
||||
enableFocus(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
disable(v) {
|
||||
|
@ -339,26 +373,26 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
disableFocus(v.id).then(res => {
|
||||
disableFocus(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate(valid => {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.ClientType = "PC"
|
||||
this.form.ClientType = "PC";
|
||||
this.submitLoading = true;
|
||||
if (this.modalType === 0) {
|
||||
this.form.status = "OPEN"
|
||||
this.form.status = "OPEN";
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
saveFocusData(this.form).then(res => {
|
||||
saveFocusData(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
|
@ -368,7 +402,7 @@
|
|||
});
|
||||
} else {
|
||||
// 编辑
|
||||
saveFocusData(this.form).then(res => {
|
||||
saveFocusData(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
|
@ -410,14 +444,14 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
delFocus(v.id).then(res => {
|
||||
delFocus(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
disableAll() {
|
||||
|
@ -431,12 +465,12 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
let ids = "";
|
||||
this.selectList.forEach(function(e) {
|
||||
this.selectList.forEach(function (e) {
|
||||
ids += e.id + ",";
|
||||
});
|
||||
ids = ids.substring(0, ids.length - 1);
|
||||
// 批量删除
|
||||
disableFocus(ids).then(res => {
|
||||
disableFocus(ids).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("禁用成功");
|
||||
|
@ -444,19 +478,19 @@
|
|||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
.operation {
|
||||
margin-bottom: 2vh;
|
||||
}
|
||||
|
@ -473,5 +507,5 @@
|
|||
.drop-down {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,67 +1,90 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<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>
|
||||
<Button type="dashed" @click="openTip = !openTip">{{
|
||||
openTip ? "关闭提示" : "开启提示"
|
||||
}}</Button>
|
||||
</Row>
|
||||
<Row v-show="openTip">
|
||||
<Alert show-icon>
|
||||
已选择 <span class="select-count">{{selectCount}}</span> 项
|
||||
已选择 <span class="select-count">{{ selectCount }}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
|
||||
@on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</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="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>
|
||||
</Col>
|
||||
</Row>
|
||||
<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="navigationName">
|
||||
<Input v-model="form.navigationName" clearable style="width:100%"/>
|
||||
<Input v-model="form.navigationName" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="导航栏链接" prop="url">
|
||||
<Input v-model="form.url" clearable style="width:100%"/>
|
||||
<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>
|
||||
<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>
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
|
||||
>提交</Button
|
||||
>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
import {
|
||||
save,
|
||||
getNavigationData,
|
||||
disableNavigation,
|
||||
enableNavigation,
|
||||
delNavigation,
|
||||
update
|
||||
} from "@/api/pages";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
update,
|
||||
} from "@/api/pages";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: "mobileNavigation",
|
||||
components: {
|
||||
uploadPicInput
|
||||
uploadPicInput,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -71,21 +94,27 @@
|
|||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: { // 搜索框初始化对象
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
form: { // 添加或编辑表单对象初始化数据
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
navigationName: "",
|
||||
image: "",
|
||||
url: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {
|
||||
url: [{required: true, message: "导航栏url不能为空", trigger: "blur"}],
|
||||
navigationName: [{required: true, message: "导航栏不能为空", trigger: "blur"}],
|
||||
url: [
|
||||
{ required: true, message: "导航栏url不能为空", trigger: "blur" },
|
||||
],
|
||||
navigationName: [
|
||||
{ required: true, message: "导航栏不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
|
@ -95,7 +124,7 @@
|
|||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
align: "center"
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "导航名称",
|
||||
|
@ -109,26 +138,26 @@
|
|||
minWidth: 100,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if (params.row.status == 'CLOSE') {
|
||||
if (params.row.status == "CLOSE") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "禁用"
|
||||
}
|
||||
})
|
||||
text: "禁用",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
} else if (params.row.status == 'OPEN') {
|
||||
} else if (params.row.status == "OPEN") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "启用"
|
||||
}
|
||||
})
|
||||
text: "启用",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "图片",
|
||||
|
@ -139,17 +168,17 @@
|
|||
return h("img", {
|
||||
attrs: {
|
||||
src: params.row.image,
|
||||
alt: "加载图片失败"
|
||||
alt: "加载图片失败",
|
||||
},
|
||||
style: {
|
||||
cursor: "pointer",
|
||||
width: "80px",
|
||||
height: "60px",
|
||||
margin: "10px 0",
|
||||
"object-fit": "contain"
|
||||
}
|
||||
"object-fit": "contain",
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "排序",
|
||||
|
@ -163,7 +192,7 @@
|
|||
align: "center",
|
||||
width: 250,
|
||||
render: (h, params) => {
|
||||
console.warn(params.status)
|
||||
console.warn(params.status);
|
||||
let enableOrDisable = "";
|
||||
if (params.row.status == "CLOSE") {
|
||||
enableOrDisable = h(
|
||||
|
@ -171,16 +200,16 @@
|
|||
{
|
||||
props: {
|
||||
type: "success",
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.enable(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"启用"
|
||||
);
|
||||
|
@ -189,16 +218,16 @@
|
|||
"Button",
|
||||
{
|
||||
props: {
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.disable(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"禁用"
|
||||
);
|
||||
|
@ -209,16 +238,16 @@
|
|||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small"
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.edit(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"编辑"
|
||||
),
|
||||
|
@ -230,23 +259,23 @@
|
|||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.del(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"删除"
|
||||
),
|
||||
enableOrDisable,
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0 // 表单数据总数
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -290,10 +319,10 @@
|
|||
this.selectCount = e.length;
|
||||
},
|
||||
getDataList() {
|
||||
this.searchForm.clientType = this.type
|
||||
this.searchForm.clientType = this.type;
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getNavigationData(this.searchForm).then(res => {
|
||||
getNavigationData(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
|
@ -304,14 +333,14 @@
|
|||
this.loading = false;
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate(valid => {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
this.form.clientType = this.type
|
||||
this.form.clientType = this.type;
|
||||
if (this.modalType === 0) {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
save(this.form).then(res => {
|
||||
save(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
|
@ -321,7 +350,7 @@
|
|||
});
|
||||
} else {
|
||||
// 编辑
|
||||
update(this.form).then(res => {
|
||||
update(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
|
@ -355,7 +384,7 @@
|
|||
this.form = data;
|
||||
this.modalVisible = true;
|
||||
},
|
||||
enable(v){
|
||||
enable(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认启用",
|
||||
// 记得确认修改此处
|
||||
|
@ -363,14 +392,14 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
enableNavigation(v.id).then(res => {
|
||||
enableNavigation(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
disable(v) {
|
||||
|
@ -381,14 +410,14 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
disableNavigation(v.id).then(res => {
|
||||
disableNavigation(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
disableAll() {
|
||||
|
@ -407,7 +436,7 @@
|
|||
});
|
||||
ids = ids.substring(0, ids.length - 1);
|
||||
// 批量禁用
|
||||
disableNavigation(ids).then(res => {
|
||||
disableNavigation(ids).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
|
@ -415,7 +444,7 @@
|
|||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
del(v) {
|
||||
|
@ -426,27 +455,27 @@
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
delNavigation(v.id).then(res => {
|
||||
delNavigation(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
.operation {
|
||||
margin-bottom: 2vh;
|
||||
}
|
||||
|
@ -463,5 +492,5 @@
|
|||
.drop-down {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row class="operation">
|
||||
<Button @click="add" type="primary" icon="md-add">添加</Button>
|
||||
|
@ -15,18 +13,14 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
|
||||
@on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</Row>
|
||||
<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>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<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">
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
<Button @click="delAll">批量下架</Button>
|
||||
<!-- <Button @click="upAll" >批量上架</Button> -->
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -54,13 +53,6 @@
|
|||
@on-selection-change="changeSelect"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<!-- <Button
|
||||
type="info"
|
||||
size="small"
|
||||
style="margin-right: 10px"
|
||||
@click="receiveInfo(row)"
|
||||
>查看</Button
|
||||
> -->
|
||||
<Button
|
||||
v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'"
|
||||
type="primary"
|
||||
|
@ -81,7 +73,6 @@
|
|||
>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
|
|
|
@ -72,9 +72,7 @@
|
|||
</div>
|
||||
<h4>适用品类范围</h4>
|
||||
<div>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns1" :data="data1" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</Row>
|
||||
<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>
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
<FormItem style="width: 100%" v-if="form.scopeType == 'PORTION_GOODS'">
|
||||
<div style="display: flex; margin-bottom: 10px">
|
||||
<Button type="primary" @click="$refs.skuSelect.open('goods')">选择商品</Button>
|
||||
<Button type="primary" @click="openSkuList">选择商品</Button>
|
||||
<Button type="error" ghost style="margin-left: 10px" @click="delSelectGoods">批量删除</Button>
|
||||
</div>
|
||||
<Table border :columns="columns" :data="form.promotionGoodsList" @on-selection-change="changeSelect">
|
||||
|
@ -392,6 +392,14 @@ export default {
|
|||
);
|
||||
this.$router.go(-1);
|
||||
},
|
||||
openSkuList() { // 显示商品选择器
|
||||
this.$refs.skuSelect.open("goods");
|
||||
let data = JSON.parse(JSON.stringify(this.form.promotionGoodsList))
|
||||
data.forEach(e => {
|
||||
e.id = e.skuId
|
||||
})
|
||||
this.$refs.skuSelect.goodsData = data;
|
||||
},
|
||||
changeSelect(e) {
|
||||
// 已选商品批量选择
|
||||
this.selectedGoods = e;
|
||||
|
@ -424,25 +432,19 @@ export default {
|
|||
},
|
||||
selectedGoodsData(item) {
|
||||
// 回显已选商品
|
||||
let ids = [];
|
||||
let list = [];
|
||||
this.form.promotionGoodsList.forEach((e) => {
|
||||
ids.push(e.skuId);
|
||||
});
|
||||
item.forEach((e) => {
|
||||
if (!ids.includes(e.id)) {
|
||||
list.push({
|
||||
goodsName: e.goodsName,
|
||||
price: e.price,
|
||||
originalPrice: e.price,
|
||||
quantity: e.quantity,
|
||||
storeId: e.storeId,
|
||||
sellerName: e.sellerName,
|
||||
storeName: e.storeName,
|
||||
skuId: e.id,
|
||||
});
|
||||
}
|
||||
});
|
||||
this.form.promotionGoodsList.push(...list);
|
||||
this.form.promotionGoodsList = list;
|
||||
},
|
||||
getGoodsCategory(e) {
|
||||
// 获取级联选择器商品分类id
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -28,7 +25,6 @@
|
|||
>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -44,8 +40,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
<Button @click="handleSearch" type="primary" class="search-btn" icon="ios-search">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -71,7 +70,6 @@
|
|||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page operation">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -72,7 +71,6 @@
|
|||
</Button>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
></Table>
|
||||
|
||||
<h4>商品信息</h4>
|
||||
<Row class="operation">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
class="operation"
|
||||
:columns="goodsColumns"
|
||||
:data="goodsData"
|
||||
ref="table"
|
||||
|
@ -34,7 +34,6 @@
|
|||
</template>
|
||||
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page operation">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
|
|
|
@ -7,9 +7,7 @@
|
|||
<div class="form-item-view">
|
||||
<FormItem astyle="width: 100%">
|
||||
<div style="display: flex; margin-bottom: 10px">
|
||||
<Button type="primary" @click="$refs.skuSelect.open('goods')"
|
||||
>选择商品</Button
|
||||
>
|
||||
<Button type="primary" @click="openSkuList">选择商品</Button>
|
||||
<Button
|
||||
type="error"
|
||||
ghost
|
||||
|
@ -20,22 +18,19 @@
|
|||
</div>
|
||||
<Table
|
||||
border
|
||||
v-if="showTable"
|
||||
:columns="columns"
|
||||
:data="form.promotionGoodsList"
|
||||
:data="promotionGoodsList"
|
||||
@on-selection-change="changeSelect"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="skuId">
|
||||
<div>{{ row.skuId }}</div>
|
||||
</template>
|
||||
|
||||
<template slot-scope="{ row, index }" slot="settlementPrice">
|
||||
<template slot-scope="{ index }" slot="settlementPrice">
|
||||
<Input
|
||||
type="number"
|
||||
v-model="row.settlementPrice"
|
||||
@input="
|
||||
pointsGoodsList[index].settlementPrice =
|
||||
row.settlementPrice
|
||||
"
|
||||
v-model="promotionGoodsList[index].settlementPrice"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
@ -44,7 +39,7 @@
|
|||
slot="pointsGoodsCategory"
|
||||
>
|
||||
<Select
|
||||
v-model="pointsGoodsList[index].pointsGoodsCategoryId"
|
||||
v-model="promotionGoodsList[index].pointsGoodsCategoryId"
|
||||
transfer="true"
|
||||
label-in-value="true"
|
||||
@on-change="
|
||||
|
@ -62,21 +57,17 @@
|
|||
</Select>
|
||||
</template>
|
||||
|
||||
<template slot-scope="{ row, index }" slot="activeStock">
|
||||
<template slot-scope="{ index }" slot="activeStock">
|
||||
<Input
|
||||
type="number"
|
||||
v-model="row.activeStock"
|
||||
@input="
|
||||
pointsGoodsList[index].activeStock = row.activeStock
|
||||
"
|
||||
v-model="promotionGoodsList[index].activeStock"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template slot-scope="{ row, index }" slot="points">
|
||||
<template slot-scope="{ index }" slot="points">
|
||||
<Input
|
||||
type="number"
|
||||
v-model="row.points"
|
||||
@input="pointsGoodsList[index].points = row.points"
|
||||
v-model="promotionGoodsList[index].points"
|
||||
/>
|
||||
</template>
|
||||
</Table>
|
||||
|
@ -151,22 +142,10 @@ export default {
|
|||
};
|
||||
return {
|
||||
form: {
|
||||
/** 店铺承担比例 */
|
||||
sellerCommission: 0,
|
||||
/** 发行数量 */
|
||||
publishNum: 1,
|
||||
/** 运费承担者 */
|
||||
scopeType: "ALL",
|
||||
/** 限领数量 */
|
||||
couponLimitNum: 1,
|
||||
/** 活动类型 */
|
||||
couponType: "PRICE",
|
||||
/** 优惠券名称 */
|
||||
couponName: "",
|
||||
getType: "FREE",
|
||||
promotionGoodsList: [],
|
||||
promotionGoodsList: [], // 活动商品列表
|
||||
},
|
||||
pointsGoodsList: [], // 积分商品列表
|
||||
showTable: true,
|
||||
promotionGoodsList: [], // 活动商品列表
|
||||
categoryList: [], // 分类列表
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectedGoods: [], // 已选商品列表,便于删除
|
||||
|
@ -226,6 +205,12 @@ export default {
|
|||
title: "商品名称",
|
||||
key: "goodsName",
|
||||
minWidth: 120,
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"div",
|
||||
params.row.goodsSku.goodsName
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "SKU编码",
|
||||
|
@ -236,6 +221,12 @@ export default {
|
|||
title: "店铺名称",
|
||||
key: "storeName",
|
||||
minWidth: 60,
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"div",
|
||||
params.row.goodsSku.storeName
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "商品价格",
|
||||
|
@ -244,7 +235,7 @@ export default {
|
|||
render: (h, params) => {
|
||||
return h(
|
||||
"div",
|
||||
this.$options.filters.unitPrice(params.row.price, "¥")
|
||||
this.$options.filters.unitPrice(params.row.goodsSku.price, "¥")
|
||||
);
|
||||
},
|
||||
},
|
||||
|
@ -252,6 +243,12 @@ export default {
|
|||
title: "库存",
|
||||
key: "quantity",
|
||||
minWidth: 20,
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"div",
|
||||
params.row.goodsSku.quantity
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "结算价格",
|
||||
|
@ -313,11 +310,11 @@ export default {
|
|||
let res = await getPointsGoodsCategoryList();
|
||||
this.categoryList = res.result.records;
|
||||
},
|
||||
/** 保存平台优惠券 */
|
||||
/** 保存积分商品 */
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
let params = this.pointsGoodsList;
|
||||
let params = this.promotionGoodsList;
|
||||
const start = this.$options.filters.unixToDate(
|
||||
this.form.startTime / 1000
|
||||
);
|
||||
|
@ -355,7 +352,8 @@ export default {
|
|||
this.$router.go(-1);
|
||||
},
|
||||
changeCategory(val, index) {
|
||||
this.pointsGoodsList[index].pointsGoodsCategoryName = val.label;
|
||||
this.promotionGoodsList[index].pointsGoodsCategoryName = val.label;
|
||||
console.log(this.promotionGoodsList);
|
||||
},
|
||||
changeSelect(e) {
|
||||
// 已选商品批量选择
|
||||
|
@ -363,7 +361,7 @@ export default {
|
|||
},
|
||||
delSelectGoods() {
|
||||
// 多选删除商品
|
||||
if (this.pointsGoodsList.length <= 0) {
|
||||
if (this.selectedGoods.length <= 0) {
|
||||
this.$Message.warning("您还未选择要删除的数据");
|
||||
return;
|
||||
}
|
||||
|
@ -375,55 +373,42 @@ export default {
|
|||
this.selectedGoods.forEach(function (e) {
|
||||
ids.push(e.id);
|
||||
});
|
||||
this.form.promotionGoodsList = this.form.promotionGoodsList.filter(
|
||||
this.promotionGoodsList = this.promotionGoodsList.filter(
|
||||
(item) => {
|
||||
return !ids.includes(item.id);
|
||||
}
|
||||
);
|
||||
this.pointsGoodsList = this.pointsGoodsList.filter((item) => {
|
||||
return !ids.includes(item.id);
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
delGoods(index) {
|
||||
// 删除商品
|
||||
this.form.promotionGoodsList.splice(index, 1);
|
||||
this.pointsGoodsList.splice(index, 1);
|
||||
this.promotionGoodsList.splice(index, 1);
|
||||
},
|
||||
openSkuList() { // 显示商品选择器
|
||||
this.$refs.skuSelect.open("goods");
|
||||
let data = JSON.parse(JSON.stringify(this.promotionGoodsList))
|
||||
data.forEach(e => {
|
||||
e.id = e.skuId
|
||||
})
|
||||
this.$refs.skuSelect.goodsData = data;
|
||||
},
|
||||
selectedGoodsData(item) {
|
||||
// 回显已选商品
|
||||
let ids = [];
|
||||
let list = [];
|
||||
this.form.promotionGoodsList.forEach((e) => {
|
||||
ids.push(e.skuId);
|
||||
});
|
||||
item.forEach((e) => {
|
||||
if (!ids.includes(e.id)) {
|
||||
list.push({
|
||||
goodsName: e.goodsName,
|
||||
price: e.price,
|
||||
originalPrice: e.price,
|
||||
quantity: e.quantity,
|
||||
storeId: e.storeId,
|
||||
storeName: e.storeName,
|
||||
const obj = {
|
||||
settlementPrice: e.settlementPrice || 0,
|
||||
pointsGoodsCategoryId: e.pointsGoodsCategoryId || 0,
|
||||
pointsGoodsCategoryName:e.pointsGoodsCategoryName || "",
|
||||
activeStock:e.activeStock || 0,
|
||||
points:e.points || 0,
|
||||
skuId: e.id,
|
||||
...e,
|
||||
});
|
||||
this.pointsGoodsList.push({
|
||||
settlementPrice: 0,
|
||||
pointsGoodsCategoryId: 0,
|
||||
pointsGoodsCategoryName: "",
|
||||
activeStock: 0,
|
||||
points: 0,
|
||||
goodsSku: {
|
||||
...e,
|
||||
},
|
||||
skuId: e.id,
|
||||
});
|
||||
goodsSku: e.goodsSku || e
|
||||
}
|
||||
list.push(obj);
|
||||
});
|
||||
this.form.promotionGoodsList.push(...list);
|
||||
this.promotionGoodsList = list;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
<div class="base-info-item">
|
||||
<h4>积分商品信息</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem label="商品名称" prop="goodsName">
|
||||
<FormItem label="商品名称">
|
||||
<div>{{ form.goodsSku.goodsName }}</div>
|
||||
</FormItem>
|
||||
<FormItem label="SKU编码" prop="skuId">
|
||||
<FormItem label="SKU编码">
|
||||
<div>{{ form.goodsSku.id }}</div>
|
||||
</FormItem>
|
||||
<FormItem label="店铺名称" prop="sellerName">
|
||||
<div>{{ form.goodsSku.sellerName }}</div>
|
||||
<FormItem label="店铺名称">
|
||||
<div>{{ form.goodsSku.storeName }}</div>
|
||||
</FormItem>
|
||||
<FormItem label="商品价格" prop="goodsPrice">
|
||||
<FormItem label="商品价格">
|
||||
<div>{{ form.goodsSku.price | unitPrice('¥') }}</div>
|
||||
</FormItem>
|
||||
<FormItem label="库存" prop="quantity">
|
||||
<FormItem label="库存">
|
||||
<div>{{ form.goodsSku.quantity }}</div>
|
||||
</FormItem>
|
||||
<FormItem label="结算价格" prop="settlementPrice">
|
||||
|
@ -90,9 +90,7 @@
|
|||
</FormItem>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<Button @click="closeCurrentPage" style="margin-right: 5px"
|
||||
>返回</Button
|
||||
>
|
||||
<Button @click="closeCurrentPage" style="margin-right: 5px">返回</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
:loading="submitLoading"
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
<Button @click="addPointsGoods" type="primary" >添加积分商品</Button>
|
||||
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -124,10 +123,9 @@
|
|||
>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
:page-size="searchForm.pageSize"
|
||||
@on-change="changePage"
|
||||
|
@ -157,7 +155,7 @@ export default {
|
|||
loading: true, // 表单加载状态
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 0, // 当前页数
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
|
@ -248,18 +246,17 @@ export default {
|
|||
this.$router.push({ name: "add-points-goods" });
|
||||
},
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v - 1;
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 0;
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
if (this.searchForm.pointsS !== "") {
|
||||
if (this.searchForm.pointsS) {
|
||||
this.searchForm.points =
|
||||
this.searchForm.pointsS +
|
||||
"_" +
|
||||
|
|
|
@ -148,11 +148,11 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
addPeriod() {
|
||||
addPeriod() { // 添加时间段显示input
|
||||
this.addPeriodTime();
|
||||
this.showAddPeriod = true;
|
||||
},
|
||||
addPeriodTime() {
|
||||
addPeriodTime() { // 添加秒杀时间段
|
||||
this.showAddPeriod = false;
|
||||
if (
|
||||
this.periodTime !== null &&
|
||||
|
@ -161,20 +161,10 @@ export default {
|
|||
this.form.seckillPeriod.push(this.periodTime);
|
||||
}
|
||||
},
|
||||
removePeriodTime(event, name) {
|
||||
removePeriodTime(event, name) { // 移除秒杀时间段
|
||||
this.form.seckillPeriod = this.form.seckillPeriod.filter((i) => i !== name);
|
||||
},
|
||||
handleSelectLink(item, index) {
|
||||
// 调起选择链接弹窗
|
||||
if (item) this.selectedNav = item;
|
||||
this.$refs.liliDialog.open('link')
|
||||
},
|
||||
changeScope(val) {
|
||||
if (val === "PORTION_GOODS") {
|
||||
this.handleSelectLink();
|
||||
}
|
||||
},
|
||||
/** 保存平台优惠券 */
|
||||
/** 添加秒杀活动 */
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
<Row class="operation padding-row">
|
||||
<Button type="primary" @click="add">添加活动</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -112,7 +111,6 @@
|
|||
>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
|
|
|
@ -29,10 +29,10 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row class="operation">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
class="operation"
|
||||
:columns="goodsColumns"
|
||||
:data="goodsList"
|
||||
ref="table"
|
||||
|
@ -106,7 +106,6 @@
|
|||
>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -16,43 +14,13 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||
</Table>
|
||||
</Row>
|
||||
<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>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
|
||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||
<FormItem label="账单号" prop="sn">
|
||||
<Input v-model="form.sn" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="店铺名称" prop="sellerName">
|
||||
<Input v-model="form.sellerName" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="结算开始时间" prop="startTime">
|
||||
<DatePicker v-model="form.startTime" valueType="yyyy-MM-dd HH:mm:ss" clearable style="width: 100%"></DatePicker>
|
||||
</FormItem>
|
||||
<FormItem label="结算结束时间" prop="endTime">
|
||||
<DatePicker type="date" v-model="form.endTime" clearable style="width: 100%"></DatePicker>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="最终结算金额" prop="billPrice">
|
||||
<Input v-model="form.billPrice" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
|
||||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交
|
||||
</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -65,9 +33,6 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
|
@ -78,17 +43,6 @@ export default {
|
|||
endDate: "", // 终止时间
|
||||
},
|
||||
selectDate: null, // 选择一个事件段
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
|
@ -227,8 +181,6 @@ export default {
|
|||
getDataList() {
|
||||
this.loading = true;
|
||||
|
||||
// this.searchForm
|
||||
|
||||
this.searchForm.startTime &&
|
||||
(this.searchForm.startTime = this.$options.filters.unixToDate(
|
||||
this.searchForm.startTime / 1000
|
||||
|
@ -248,35 +200,6 @@ export default {
|
|||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
if (this.modalType === 0) {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
this.postRequest("/bill/insertOrUpdate", this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 编辑
|
||||
this.postRequest("/bill/insertOrUpdate", this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
detail(v) {
|
||||
let id = v.id;
|
||||
this.$router.push({
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
<Tabs active-key="key1" @on-click="clickTabs">
|
||||
<Tab-pane label="入账流水" key="key1">
|
||||
<Card>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -56,7 +55,6 @@
|
|||
:data="order"
|
||||
ref="table"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="orderParam.pageNumber"
|
||||
|
@ -73,7 +71,6 @@
|
|||
</Tab-pane>
|
||||
<Tab-pane label="退款流水" key="key2">
|
||||
<Card>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -81,7 +78,6 @@
|
|||
:data="refund"
|
||||
ref="table"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="refundParam.pageNumber"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -24,46 +22,15 @@
|
|||
</Form>
|
||||
</Row>
|
||||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
<Button @click="delAll">批量删除</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-selection-change="changeSelect">
|
||||
</Table>
|
||||
</Row>
|
||||
<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>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
|
||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||
<FormItem label="账单号" prop="sn">
|
||||
<Input v-model="form.sn" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="店铺名称" prop="sellerName">
|
||||
<Input v-model="form.sellerName" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="结算开始时间" prop="startTime">
|
||||
<DatePicker v-model="form.startTime" valueType="yyyy-MM-dd HH:mm:ss" clearable style="width: 100%"></DatePicker>
|
||||
</FormItem>
|
||||
<FormItem label="结算结束时间" prop="endTime">
|
||||
<DatePicker type="date" v-model="form.endTime" clearable style="width: 100%"></DatePicker>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="最终结算金额" prop="billPrice">
|
||||
<Input v-model="form.billPrice" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
|
||||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交
|
||||
</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -76,9 +43,6 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
|
@ -90,17 +54,6 @@ export default {
|
|||
billStatus:"" //状态
|
||||
},
|
||||
selectDate: null, // 选择一个时间段
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
|
@ -201,28 +154,20 @@ export default {
|
|||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
changePage(v) {
|
||||
changePage(v) { // 改变页码
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
},
|
||||
changePageSize(v) {
|
||||
changePageSize(v) { // 改变页数
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
handleSearch() {
|
||||
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();
|
||||
},
|
||||
changeSelect(e) {
|
||||
changeSelect(e) { // 表格选中
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
|
@ -235,8 +180,6 @@ export default {
|
|||
getDataList() {
|
||||
this.loading = true;
|
||||
|
||||
// this.searchForm
|
||||
|
||||
this.searchForm.startTime &&
|
||||
(this.searchForm.startTime = this.$options.filters.unixToDate(
|
||||
this.searchForm.startTime / 1000
|
||||
|
@ -256,43 +199,7 @@ export default {
|
|||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
if (this.modalType === 0) {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
this.postRequest("/bill/insertOrUpdate", this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 编辑
|
||||
this.postRequest("/bill/insertOrUpdate", 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;
|
||||
},
|
||||
detail(v) {
|
||||
detail(v) { // 账单详情
|
||||
let id = v.id;
|
||||
this.$router.push({
|
||||
name: "bill-detail",
|
||||
|
@ -314,14 +221,10 @@ export default {
|
|||
this.getDataList();
|
||||
}
|
||||
});
|
||||
// 模拟请求成功
|
||||
//this.$Message.success("操作成功");
|
||||
//this.$Modal.remove();
|
||||
//this.getDataList();
|
||||
},
|
||||
});
|
||||
},
|
||||
delAll() {
|
||||
delAll() { // 多选删除数据
|
||||
if (this.selectCount <= 0) {
|
||||
this.$Message.warning("您还未选择要删除的数据");
|
||||
return;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -29,16 +27,12 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="padding-row">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</Row>
|
||||
<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>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -246,7 +246,6 @@
|
|||
</Form>
|
||||
</Row>
|
||||
<div style="min-height: 180px">
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -261,7 +260,6 @@
|
|||
<a @click="$router.push({name: 'order-detail',query: {sn: scope.row.sn}})">{{scope.row.sn}}</a>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page" style="margin-top: 10px">
|
||||
<Page
|
||||
|
@ -349,7 +347,6 @@
|
|||
</Form>
|
||||
</Row>
|
||||
<div style="min-height: 180px">
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -386,7 +383,6 @@
|
|||
<a @click="$router.push({name: 'after-order-detail',query: {sn: scope.row.sn}})">{{scope.row.sn}}</a>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page" style="margin-top: 10px">
|
||||
<Page
|
||||
|
@ -474,7 +470,6 @@
|
|||
</Form>
|
||||
</Row>
|
||||
<div style="min-height: 180px">
|
||||
<Row class="padding-row">
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -511,7 +506,6 @@
|
|||
<a @click="$router.push({name: 'after-order-detail',query: {sn: scope.row.sn}})">{{scope.row.sn}}</a>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page" style="margin-top: 10px">
|
||||
<Page
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -41,16 +39,12 @@
|
|||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
</Row>
|
||||
<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>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -65,9 +65,17 @@
|
|||
<FormItem label="详细地址" prop="salesConsigneeDetail">
|
||||
<Input v-model="shopForm.salesConsigneeDetail" clearable style="width: 350px" />
|
||||
</FormItem>
|
||||
<!-- <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> -->
|
||||
<Spin fix v-if="loading"></Spin>
|
||||
</div>
|
||||
</TabPane>
|
||||
<!-- 入驻信息 -->
|
||||
<TabPane label="入驻信息" class="tab" name="sms">
|
||||
<!-- 遮罩层 -->
|
||||
<div v-if="isRead" class="mask">只读不可修改</div>
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row class="operation">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
<Button @click="delAll">批量删除</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -18,7 +15,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -34,8 +30,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
|
|
|
@ -305,7 +305,7 @@ export default {
|
|||
},
|
||||
{
|
||||
title: "商家名称",
|
||||
key: "sellerName",
|
||||
key: "storeName",
|
||||
},
|
||||
{
|
||||
title: "售后单类型",
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
</div>
|
||||
<div class="label-item">
|
||||
<span>店铺名称</span>
|
||||
<span>{{res.sellerName}}</span>
|
||||
<span>{{res.storeName}}</span>
|
||||
</div>
|
||||
<div class="label-item">
|
||||
<span>创建时间</span>
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
</i-switch>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
|
||||
<Table
|
||||
v-if="showDev"
|
||||
|
@ -78,8 +77,6 @@
|
|||
>
|
||||
</Table>
|
||||
|
||||
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
<Row class="operation" style="margin-top: 20px">
|
||||
<Button @click="sendMessage" type="primary">发送消息</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -46,7 +45,6 @@
|
|||
@on-sort-change="messageChangeSort"
|
||||
@on-selection-change="messageChangeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchMessageForm.pageNumber"
|
||||
|
@ -64,7 +62,6 @@
|
|||
</TabPane>
|
||||
|
||||
<TabPane label="通知类站内信" name="SETTING">
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -75,7 +72,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -206,7 +202,6 @@
|
|||
</RadioGroup>
|
||||
</FormItem>
|
||||
<FormItem label="指定商家">
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -217,7 +212,6 @@
|
|||
@on-sort-change="messageChangeSort"
|
||||
@on-selection-change="messageChangeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchShopMessageForm.pageNumber"
|
||||
|
|
|
@ -1,17 +1,13 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Tabs value="LIST" @on-click="paneChange">
|
||||
<TabPane label="发送任务列表" name="LIST">
|
||||
<Row class="operation" style="margin-bottom: 10px">
|
||||
<Button @click="sendBatchSmsModal" type="primary">发送短信</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="smsColumns" :data="smsData" ref="table" sortable="custom" @on-sort-change="templateChangeSort">
|
||||
</Table>
|
||||
</Row>
|
||||
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page :current="smsSearchForm.pageNumber" :total="smsTotal" :page-size="smsSearchForm.pageSize" @on-change="smsChangePage" @on-page-size-change="smsChangePageSize"
|
||||
|
@ -23,10 +19,8 @@
|
|||
<Button @click="addTemplate" type="primary">添加短信模板</Button>
|
||||
<Button @click="syncTemplate" type="info">同步</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="templateColumns" :data="templateData" ref="table" sortable="custom" @on-sort-change="smsChangeSort">
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page :current="templateSearchForm.pageNumber" :total="templateTotal" :page-size="templateSearchForm.pageSize" @on-change="templateChangePage"
|
||||
@on-page-size-change="templateChangePageSize" :page-size-opts="[10, 20, 50]" size="small" show-total show-elevator show-sizer></Page>
|
||||
|
@ -37,7 +31,6 @@
|
|||
<Button @click="addSign" type="primary">添加短信签名</Button>
|
||||
<Button @click="syncSign" type="info">同步</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="signColumns" :data="signData" ref="table" sortable="custom" @on-sort-change="signChangeSort">
|
||||
<template slot="signStatus" slot-scope="scope">
|
||||
<div v-if="scope.row.signStatus ==2 ">
|
||||
|
@ -55,18 +48,13 @@
|
|||
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page :current="signSearchForm.pageNumber" :total="signTotal" :page-size="signSearchForm.pageSize" @on-change="signChangePage" @on-page-size-change="signChangePageSize"
|
||||
:page-size-opts="[10, 20, 50]" size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal :title="templateModalTitle" v-model="templateModalVisible" :mask-closable="false" :width="500">
|
||||
<Form ref="templateForm" :model="templateForm" :label-width="100" :rules="templateFormValidate">
|
||||
<FormItem label="模板名称" prop="templateName">
|
||||
|
|
|
@ -103,7 +103,6 @@
|
|||
>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -114,7 +113,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
</div>
|
||||
<div v-show="showType == 'thumb'">
|
||||
<div class="oss-wrapper">
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
<Button @click="addRole" type="primary">添加角色</Button>
|
||||
<Button @click="delAll">批量删除</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -20,7 +19,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="pageNumber"
|
||||
|
|
|
@ -1,16 +1,11 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Tabs value="RESOURCE" @on-click="handleClickType">
|
||||
<TabPane label="图片源" name="RESOURCE">
|
||||
<Row>
|
||||
<Col>
|
||||
<Row class="operation" style="margin-bottom: 10px">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -21,16 +16,16 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
>
|
||||
|
||||
<!-- 商品栏目格式化 -->
|
||||
<template slot="imageSlot" slot-scope="scope">
|
||||
<div style="">
|
||||
<img :src="scope.row.resource" style="height: 60px;margin-top: 1px;width: 90px">
|
||||
<img
|
||||
:src="scope.row.resource"
|
||||
style="height: 60px; margin-top: 1px; width: 90px"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -46,16 +41,11 @@
|
|||
>
|
||||
</Page>
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
</TabPane>
|
||||
<TabPane label="滑块源" name="SLIDER">
|
||||
<Row>
|
||||
<Col>
|
||||
<Row class="operation" style="margin-bottom: 10px">
|
||||
<Button @click="add" type="primary" icon="md-add">添加</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -69,11 +59,13 @@
|
|||
<!-- 商品栏目格式化 -->
|
||||
<template slot="imageSlot" slot-scope="scope">
|
||||
<div style="">
|
||||
<img :src="scope.row.resource" style="height: 60px;margin-top: 1px;width: 60px">
|
||||
<img
|
||||
:src="scope.row.resource"
|
||||
style="height: 60px; margin-top: 1px; width: 60px"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -88,13 +80,9 @@
|
|||
show-sizer
|
||||
></Page>
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
|
@ -103,10 +91,15 @@
|
|||
>
|
||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||
<FormItem label="名称" prop="name">
|
||||
<Input v-model="form.name" maxlength="20" clearable style="width: 100%"/>
|
||||
<Input
|
||||
v-model="form.name"
|
||||
maxlength="20"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label="图片" prop="resource">
|
||||
<Input v-model="form.resource" clearable style="width: 100%"/>
|
||||
<Input v-model="form.resource" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="类型" prop="type">
|
||||
<radio-group v-model="form.type" type="button">
|
||||
|
@ -119,8 +112,7 @@
|
|||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
|
||||
>提交
|
||||
</Button
|
||||
>
|
||||
</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
|
@ -131,7 +123,7 @@ import * as API_Setting from "@/api/setting";
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
modalVisible: false,//添加验证码源弹出框
|
||||
modalVisible: false, //添加验证码源弹出框
|
||||
modalTitle: "", //添加验证码源弹出框标题
|
||||
loading: true, // 表单加载状态
|
||||
selectList: [], // 多选数据
|
||||
|
@ -142,7 +134,7 @@ export default {
|
|||
name: "",
|
||||
resource: "",
|
||||
type: "RESOURCE",
|
||||
},//添加编辑表单
|
||||
}, //添加编辑表单
|
||||
formValidate: {
|
||||
name: [
|
||||
{
|
||||
|
@ -165,18 +157,19 @@ export default {
|
|||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
type: "RESOURCE"
|
||||
type: "RESOURCE",
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: "名称",
|
||||
key: "name",
|
||||
minWidth: 80,
|
||||
},{
|
||||
},
|
||||
{
|
||||
title: "图片",
|
||||
key: "resource",
|
||||
width: 150,
|
||||
slot: "imageSlot"
|
||||
slot: "imageSlot",
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
|
@ -213,13 +206,13 @@ export default {
|
|||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.edit(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"编辑"
|
||||
),
|
||||
|
@ -233,17 +226,17 @@ export default {
|
|||
on: {
|
||||
click: () => {
|
||||
this.remove(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"删除"
|
||||
)
|
||||
),
|
||||
]);
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0,//条数
|
||||
total: 0, //条数
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -264,15 +257,15 @@ export default {
|
|||
},
|
||||
//切换tab
|
||||
handleClickType(v) {
|
||||
this.searchForm.pageNumber = 1 // 当前页数
|
||||
this.searchForm.pageSize = 10 // 页面大小
|
||||
this.searchForm.pageNumber = 1; // 当前页数
|
||||
this.searchForm.pageSize = 10; // 页面大小
|
||||
//图片源
|
||||
if (v == "RESOURCE") {
|
||||
this.searchForm.type = "RESOURCE"
|
||||
this.searchForm.type = "RESOURCE";
|
||||
}
|
||||
//滑块源
|
||||
if (v == "SLIDER") {
|
||||
this.searchForm.type = "SLIDER"
|
||||
this.searchForm.type = "SLIDER";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
|
@ -283,7 +276,7 @@ export default {
|
|||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
this.loading = false;
|
||||
|
@ -294,25 +287,25 @@ export default {
|
|||
},
|
||||
//添加验证码源
|
||||
add() {
|
||||
this.form.type = this.searchForm.type
|
||||
this.modalVisible = true
|
||||
this.modalType = 0
|
||||
this.modalTitle = "添加验证码源"
|
||||
this.form.type = this.searchForm.type;
|
||||
this.modalVisible = true;
|
||||
this.modalType = 0;
|
||||
this.modalTitle = "添加验证码源";
|
||||
},
|
||||
//修改验证码源
|
||||
edit(v) {
|
||||
this.form.name = v.name
|
||||
this.form.id = v.id
|
||||
this.form.resource = v.resource
|
||||
this.form.type = v.type
|
||||
this.form.name = v.name;
|
||||
this.form.id = v.id;
|
||||
this.form.resource = v.resource;
|
||||
this.form.type = v.type;
|
||||
|
||||
this.modalType = 1
|
||||
this.modalVisible = true
|
||||
this.modalTitle = "修改验证码源"
|
||||
this.modalType = 1;
|
||||
this.modalVisible = true;
|
||||
this.modalTitle = "修改验证码源";
|
||||
},
|
||||
//提交表单
|
||||
handleSubmit() {
|
||||
this.form.type = this.searchForm.type
|
||||
this.form.type = this.searchForm.type;
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
|
@ -329,14 +322,16 @@ export default {
|
|||
});
|
||||
} else {
|
||||
// 编辑
|
||||
API_Setting.editVerification(this.form.id, this.form).then((res) => {
|
||||
API_Setting.editVerification(this.form.id, this.form).then(
|
||||
(res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("修改成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -359,8 +354,7 @@ export default {
|
|||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getDataList();
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
<Button @click="delAll">批量删除</Button>
|
||||
<Button @click="resetPass">重置密码</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -54,7 +53,6 @@
|
|||
@on-selection-change="showSelect"
|
||||
ref="table"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
|
|
@ -1,5 +1,23 @@
|
|||
// 统一请求路径前缀在libs/axios.js中修改
|
||||
import { getRequest, postRequest, putRequest, deleteRequest, importRequest, uploadFileRequest } from '@/libs/axios';
|
||||
import { getRequest, postRequest, postRequestWithNoForm, putRequest, deleteRequest, importRequest, uploadFileRequest } from '@/libs/axios';
|
||||
|
||||
|
||||
// 获取店铺直播间列表
|
||||
export const getLivesList = (params) => {
|
||||
return getRequest('/broadcast/studio', params)
|
||||
}
|
||||
|
||||
// 获取店铺直播商品
|
||||
export const getLiveGoods = (params) => {
|
||||
return getRequest('/broadcast/commodity', params)
|
||||
}
|
||||
|
||||
// 添加店铺直播商品
|
||||
export const addLiveGoods = (params) => {
|
||||
return postRequestWithNoForm('/broadcast/commodity', params)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 获取拼团列表
|
||||
export const getPintuanList = (params) => {
|
||||
|
|
|
@ -216,19 +216,20 @@ export const postRequestWithNoForm = (url, params) => {
|
|||
});
|
||||
};
|
||||
|
||||
// export const postRequestWithHeaders = (url, params) => {
|
||||
// let accessToken = getStore("accessToken");
|
||||
// return axios({
|
||||
// method: "post",
|
||||
// url: `${url}`,
|
||||
// data: params,
|
||||
export const postRequestWithHeaders = (url, params) => {
|
||||
let accessToken = getStore("accessToken");
|
||||
return axios({
|
||||
method: "post",
|
||||
url: `${url}`,
|
||||
data: params,
|
||||
|
||||
headers: {
|
||||
accessToken: accessToken,
|
||||
"Content-Type": "application/x-www-form-urlencoded"
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// headers: {
|
||||
// accessToken: accessToken,
|
||||
// "Content-Type": "application/x-www-form-urlencoded"
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
|
||||
export const putRequest = (url, params,headers) => {
|
||||
let accessToken = getStore("accessToken");
|
||||
|
|
|
@ -425,6 +425,34 @@ export const result = [
|
|||
url: "",
|
||||
permTypes: [],
|
||||
children: null
|
||||
},
|
||||
{
|
||||
name: "live",
|
||||
showAlways: true,
|
||||
level: 2,
|
||||
type: 0,
|
||||
title: "直播管理",
|
||||
path: "live",
|
||||
component: "promotion/live/live",
|
||||
icon: "md-person",
|
||||
isMenu: true,
|
||||
url: "",
|
||||
permTypes: [],
|
||||
children: null
|
||||
},
|
||||
{
|
||||
name: "liveGoods",
|
||||
showAlways: true,
|
||||
level: 2,
|
||||
type: 0,
|
||||
title: "直播商品",
|
||||
path: "liveGoods",
|
||||
component: "promotion/live/liveGoods",
|
||||
icon: "md-person",
|
||||
isMenu: true,
|
||||
url: "",
|
||||
permTypes: [],
|
||||
children: null
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -656,7 +684,7 @@ export const result = [
|
|||
showAlways: true,
|
||||
level: 2,
|
||||
type: 0,
|
||||
title: "自提点管理",
|
||||
title: "自提管理",
|
||||
path: "shopAddress",
|
||||
component: "shop/shopAddress",
|
||||
icon: "md-log-in",
|
||||
|
|
|
@ -71,6 +71,12 @@ export const otherRouter = {
|
|||
name: "add-coupon",
|
||||
component: () => import("@/views/promotion/coupon/couponPublish.vue")
|
||||
},
|
||||
{
|
||||
path: "add-live",
|
||||
title: "创建直播",
|
||||
name: "add-live",
|
||||
component: () => import("@/views/promotion/live/addLive.vue")
|
||||
},
|
||||
{
|
||||
path: "bill-detail",
|
||||
title: "结算单详情",
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<shrinkable-menu></shrinkable-menu>
|
||||
</div>
|
||||
<!-- 顶部标题栏主体 -->
|
||||
<div class="main-header-con" style="padding-left:240px">
|
||||
<div class="main-header-con">
|
||||
<div class="main-header">
|
||||
<div :class="{'header-avator-con':navType!=4, 'header-avator-con nav4':navType == 4}">
|
||||
<!-- 用户头像 -->
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -20,7 +18,6 @@
|
|||
<Button @click="add" type="primary">添加</Button>
|
||||
<!-- <Button @click="add" type="default">批量删除</Button>-->
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||
<!-- 商品栏目格式化 -->
|
||||
<template slot="goodsSlot" slot-scope="{row}">
|
||||
|
@ -44,13 +41,10 @@
|
|||
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<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>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<liliDialog
|
||||
ref="liliDialog"
|
||||
@selectedGoodsData="selectedGoodsData"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row v-show="openSearch" @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -15,16 +13,12 @@
|
|||
</Form>
|
||||
</Row>
|
||||
|
||||
<Row class="padding-row">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"></Table>
|
||||
</Row>
|
||||
<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>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -222,14 +222,13 @@ div.base-info-item {
|
|||
|
||||
/** 底部步骤 */
|
||||
.footer {
|
||||
width: 88.7%;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
background-color: #ffc;
|
||||
position: fixed;
|
||||
position: sticky;
|
||||
bottom: 0px;
|
||||
left: 10%;
|
||||
text-align: center;
|
||||
z-index: 9999;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
/*图片上传组件第一张图设置封面*/
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Row>
|
||||
<Col>
|
||||
<Card>
|
||||
<Row v-show="openSearch" @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
|
@ -54,7 +52,6 @@
|
|||
</Form-item>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -65,7 +62,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
@ -81,8 +77,6 @@
|
|||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
|
@ -31,7 +30,7 @@
|
|||
<DropdownItem name="uppers">批量上架</DropdownItem>
|
||||
<DropdownItem name="lowers">批量下架</DropdownItem>
|
||||
<DropdownItem name="deleteAll">批量删除</DropdownItem>
|
||||
<DropdownItem name="batchShipTemplate">批量设置运费模板</DropdownItem>
|
||||
<!-- <DropdownItem name="batchShipTemplate">批量设置运费模板</DropdownItem> -->
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
</Row>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="goods-operation">
|
||||
<div style="height: 45px">
|
||||
<steps
|
||||
:current="activestep"
|
||||
|
@ -522,7 +522,7 @@
|
|||
<span slot="append">kg</span>
|
||||
</Input>
|
||||
</FormItem>
|
||||
<FormItem class="form-item-view-el" label="运费" prop="skuList">
|
||||
<!-- <FormItem class="form-item-view-el" label="运费" prop="skuList">
|
||||
<RadioGroup type="button" button-style="solid"
|
||||
@on-change="logisticsTemplateChange"
|
||||
v-model="baseInfoForm.freightPayer"
|
||||
|
@ -534,7 +534,7 @@
|
|||
<span>使用物流规则</span>
|
||||
</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
</FormItem> -->
|
||||
<FormItem
|
||||
class="form-item-view-el"
|
||||
label="物流模板"
|
||||
|
@ -699,7 +699,7 @@ export default {
|
|||
this.baseInfoForm = {
|
||||
salesModel: "RETAIL",
|
||||
goodsParamsList: [],
|
||||
freightPayer: "STORE",
|
||||
// freightPayer: "STORE",
|
||||
weight: "",
|
||||
goodsGalleryFiles: [],
|
||||
release: "true",
|
||||
|
@ -844,7 +844,7 @@ export default {
|
|||
/** 商品参数列表 */
|
||||
goodsParamsList: [],
|
||||
/** 运费承担者 */
|
||||
freightPayer: "STORE",
|
||||
// freightPayer: "STORE",
|
||||
/** 商品重量 */
|
||||
weight: "",
|
||||
/** 商品相册列表 */
|
||||
|
@ -1007,7 +1007,7 @@ export default {
|
|||
this.baseInfoForm = {
|
||||
salesModel: "RETAIL",
|
||||
goodsParamsList: [],
|
||||
freightPayer: "STORE",
|
||||
// freightPayer: "STORE",
|
||||
weight: "",
|
||||
goodsGalleryFiles: [],
|
||||
release: "true",
|
||||
|
@ -1235,14 +1235,14 @@ export default {
|
|||
...response.result,
|
||||
};
|
||||
console.warn(this.baseInfoForm);
|
||||
if (this.baseInfoForm.freightPayer === "BUYER") {
|
||||
API_Shop.getShipTemplate().then((res) => {
|
||||
if (res.success) {
|
||||
this.logisticsTemplate = res.result;
|
||||
}
|
||||
});
|
||||
this.logisticsTemplateShow = true;
|
||||
}
|
||||
// if (this.baseInfoForm.freightPayer === "BUYER") {
|
||||
// API_Shop.getShipTemplate().then((res) => {
|
||||
// if (res.success) {
|
||||
// this.logisticsTemplate = res.result;
|
||||
// }
|
||||
// });
|
||||
// this.logisticsTemplateShow = true;
|
||||
// }
|
||||
this.baseInfoForm.release = "true";
|
||||
this.baseInfoForm.recommend = this.baseInfoForm.recommend
|
||||
? "true"
|
||||
|
@ -1840,9 +1840,9 @@ export default {
|
|||
return;
|
||||
}
|
||||
//如果选择的是卖家承担运费 则运费模板重置为0
|
||||
if (this.baseInfoForm.freightPayer !== "BUYER") {
|
||||
this.baseInfoForm.templateId = 0;
|
||||
}
|
||||
// if (this.baseInfoForm.freightPayer !== "BUYER") {
|
||||
// this.baseInfoForm.templateId = 0;
|
||||
// }
|
||||
|
||||
this.baseInfoForm.skuList = this.skuTableData.map((sku) => {
|
||||
delete sku._index;
|
||||
|
|
|
@ -68,7 +68,6 @@
|
|||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
|
@ -79,7 +78,6 @@
|
|||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
|
|
|
@ -41,12 +41,17 @@
|
|||
<script>
|
||||
import * as API_Goods from "@/api/goods";
|
||||
export default {
|
||||
data() {
|
||||
props: {
|
||||
selectedWay: {
|
||||
type: Array,
|
||||
default: new Array()
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
type: "multiple", //单选或者多选 single multiple
|
||||
|
||||
cateList: [], // 商品分类列表
|
||||
selectedWay: [], //选中商品集合
|
||||
total: "", // 商品总数
|
||||
goodsParams: { // 请求商品列表参数
|
||||
pageNumber: 1,
|
||||
|
@ -64,18 +69,17 @@ export default {
|
|||
loading: false, // 商品加载loading
|
||||
};
|
||||
},
|
||||
props: ["clearFlag"],
|
||||
watch: {
|
||||
category(val) {
|
||||
this.goodsParams.categoryPath = val[2];
|
||||
},
|
||||
selectedWay: {
|
||||
handler() {
|
||||
handler(val) {
|
||||
this.$emit("selected", this.selectedWay);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
},
|
||||
|
||||
"goodsParams.categoryPath": {
|
||||
handler: function () {
|
||||
this.goodsData = [];
|
||||
|
@ -88,7 +92,7 @@ export default {
|
|||
this.init();
|
||||
},
|
||||
methods: {
|
||||
handleReachBottom() {
|
||||
handleReachBottom() { // 页面触底触发加载
|
||||
setTimeout(() => {
|
||||
if (
|
||||
this.goodsParams.pageNumber * this.goodsParams.pageSize <=
|
||||
|
@ -99,17 +103,24 @@ export default {
|
|||
}
|
||||
}, 1500);
|
||||
},
|
||||
getQueryGoodsList() {
|
||||
getQueryGoodsList() { // 根据商品分类筛选商品
|
||||
API_Goods.getGoodsSkuData(this.goodsParams).then((res) => {
|
||||
this.initGoods(res);
|
||||
});
|
||||
},
|
||||
|
||||
initGoods(res) {
|
||||
initGoods(res) { // 获取商品列表
|
||||
if (res.result.records.length !=0) {
|
||||
res.result.records.forEach((item) => {
|
||||
let data = res.result.records;
|
||||
data.forEach((item) => {
|
||||
item.selected = false;
|
||||
item.___type = "goods"; //设置为goods让pc wap知道标识
|
||||
|
||||
this.selectedWay.forEach(e => {
|
||||
if (e.id === item.id) {
|
||||
item.selected = true
|
||||
}
|
||||
})
|
||||
});
|
||||
/**
|
||||
* 解决数据请求中,滚动栏会一直上下跳动
|
||||
|
@ -141,7 +152,6 @@ export default {
|
|||
deepGroup(val) {
|
||||
val.forEach((item) => {
|
||||
let childWay = []; //第二级
|
||||
let grandWay = []; //第三级
|
||||
// 第二层
|
||||
if (item.children) {
|
||||
item.children.forEach((child) => {
|
||||
|
@ -196,7 +206,12 @@ export default {
|
|||
this.selectedWay.push(val);
|
||||
} else {
|
||||
val.selected = false;
|
||||
this.selectedWay.splice(index, 1);
|
||||
for (let i = 0; i<this.selectedWay.length; i++ ) {
|
||||
if (this.selectedWay[i].id===val.id) {
|
||||
this.selectedWay.splice(i,1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
@ -10,20 +10,13 @@
|
|||
scrollable
|
||||
>
|
||||
<goodsDialog
|
||||
@selected="
|
||||
(val) => {
|
||||
goodsData = val;
|
||||
}
|
||||
"
|
||||
@selected="(val) => {goodsData = val;}"
|
||||
:selectedWay='goodsData'
|
||||
ref="goodsDialog"
|
||||
v-if="goodsFlag"
|
||||
/>
|
||||
<linkDialog
|
||||
@selectedLink="
|
||||
(val) => {
|
||||
linkData = val;
|
||||
}
|
||||
"
|
||||
@selectedLink="(val) => {linkData = val;}"
|
||||
v-else
|
||||
class="linkDialog"
|
||||
/>
|
||||
|
@ -41,14 +34,11 @@ export default {
|
|||
return {
|
||||
title: "选择", // 模态框标题
|
||||
goodsFlag: false, // 是否商品选择器
|
||||
goodsData: "", //选择的商品
|
||||
goodsData: [], //选择的商品
|
||||
linkData: "", //选择的链接
|
||||
flag: false, // 控制模态框显隐
|
||||
};
|
||||
},
|
||||
props: ["types"],
|
||||
watch: {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
// 关闭弹窗
|
||||
clickClose() {
|
||||
|
@ -58,7 +48,6 @@ export default {
|
|||
|
||||
// 单选商品
|
||||
singleGoods(){
|
||||
|
||||
var timer = setInterval(() => {
|
||||
if (this.$refs.goodsDialog) {
|
||||
|
||||
|
@ -66,19 +55,16 @@ export default {
|
|||
clearInterval(timer);
|
||||
}
|
||||
}, 100);
|
||||
|
||||
|
||||
},
|
||||
clickOK() {
|
||||
clickOK() { // 确定按钮回调,
|
||||
if (this.goodsFlag) {
|
||||
this.$emit("selectedGoodsData", this.goodsData);
|
||||
} else {
|
||||
this.$emit("selectedLink", this.linkData);
|
||||
}
|
||||
this.clickClose();
|
||||
// this.clearFlag = false
|
||||
},
|
||||
open(type){
|
||||
open (type) { // 父组件通过ref调用,打开商品选择器
|
||||
this.flag = true;
|
||||
if(type == 'goods'){
|
||||
this.goodsFlag = true;
|
||||
|
@ -87,7 +73,7 @@ export default {
|
|||
}
|
||||
|
||||
},
|
||||
close(){
|
||||
close(){ // 关闭组件
|
||||
this.flag = false;
|
||||
}
|
||||
},
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue