1、商城相关菜单迁移
This commit is contained in:
parent
f36d4a8599
commit
45fedadd03
@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = RuoYi-Vue-Plus多租户管理系统
|
VITE_APP_TITLE = 无终街管理系统
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
VITE_APP_ENV = 'development'
|
VITE_APP_ENV = 'development'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = RuoYi-Vue-Plus多租户管理系统
|
VITE_APP_TITLE = 无终街管理系统
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
VITE_APP_ENV = 'production'
|
VITE_APP_ENV = 'production'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request';
|
||||||
|
|
||||||
// 查询订单售后列表
|
// 查询订单售后列表
|
||||||
export function listOmsAftersale(query, pageReq) {
|
export function listOmsAftersale(query, pageReq) {
|
||||||
@ -7,7 +7,7 @@ export function listOmsAftersale(query, pageReq) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data: query,
|
data: query,
|
||||||
params: pageReq
|
params: pageReq
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询订单售后详细
|
// 查询订单售后详细
|
||||||
@ -15,7 +15,7 @@ export function getOmsAftersale(id) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/oms/aftersale/' + id,
|
url: '/oms/aftersale/' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增订单售后
|
// 新增订单售后
|
||||||
@ -24,7 +24,7 @@ export function addOmsAftersale(data) {
|
|||||||
url: '/oms/aftersale',
|
url: '/oms/aftersale',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改订单售后
|
// 修改订单售后
|
||||||
@ -33,7 +33,7 @@ export function updateOmsAftersale(data) {
|
|||||||
url: '/oms/aftersale',
|
url: '/oms/aftersale',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除订单售后
|
// 删除订单售后
|
||||||
@ -41,7 +41,7 @@ export function delOmsAftersale(id) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/oms/aftersale/' + id,
|
url: '/oms/aftersale/' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出订单售后
|
// 导出订单售后
|
||||||
@ -50,21 +50,21 @@ export function exportOmsAftersale(query) {
|
|||||||
url: '/oms/aftersale/export',
|
url: '/oms/aftersale/export',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 售后订单操作
|
// 售后订单操作
|
||||||
export function dealWithAftersale(data){
|
export function dealWithAftersale(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/oms/aftersale/dealWith',
|
url: '/oms/aftersale/dealWith',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function viewLog(orderId){
|
export function viewLog(orderId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/oms/aftersale/log/` + orderId,
|
url: `/oms/aftersale/log/` + orderId,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,48 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 新迁移的菜单,开发阶段暂时放在固定菜单内,后续迁移到权限菜单里
|
// 新迁移的菜单,开发阶段暂时放在固定菜单内,后续迁移到权限菜单里
|
||||||
|
|
||||||
|
// 内容中心
|
||||||
|
{
|
||||||
|
path: '/content-center',
|
||||||
|
component: Layout,
|
||||||
|
// hidden: true,
|
||||||
|
// permissions: ['system:role:edit'],
|
||||||
|
children: [
|
||||||
|
// 视频管理
|
||||||
|
{
|
||||||
|
path: 'video-manage',
|
||||||
|
component: () => import('@/views/contentManage/video/index.vue'),
|
||||||
|
name: 'Video',
|
||||||
|
meta: { title: '视频管理', icon: '', noCache: true }
|
||||||
|
},
|
||||||
|
// 评论和点赞
|
||||||
|
{
|
||||||
|
path: 'comments',
|
||||||
|
component: () => import('@/views/contentManage/video/index.vue'),
|
||||||
|
name: 'Comments',
|
||||||
|
meta: { title: '评论与点赞', icon: '', noCache: true }
|
||||||
|
},
|
||||||
|
// 粉丝与关注
|
||||||
|
{
|
||||||
|
path: 'fans',
|
||||||
|
component: () => import('@/views/contentManage/video/index.vue'),
|
||||||
|
name: 'Fans',
|
||||||
|
meta: { title: '粉丝与关注', icon: '', noCache: true }
|
||||||
|
},
|
||||||
|
// 云点播
|
||||||
|
{
|
||||||
|
path: 'cloud',
|
||||||
|
component: () => import('@/views/contentManage/video/index.vue'),
|
||||||
|
name: 'Cloud',
|
||||||
|
meta: { title: '云点播', icon: '', noCache: true }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// 动态路由,基于用户权限动态去加载
|
||||||
|
export const dynamicRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: '/system/user-auth',
|
path: '/system/user-auth',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
@ -208,49 +250,9 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||||||
meta: { title: '售后订单详情' }
|
meta: { title: '售后订单详情' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
// 内容中心
|
|
||||||
{
|
|
||||||
path: '/content-center',
|
|
||||||
component: Layout,
|
|
||||||
// hidden: true,
|
|
||||||
// permissions: ['system:role:edit'],
|
|
||||||
children: [
|
|
||||||
// 视频管理
|
|
||||||
{
|
|
||||||
path: 'video-manage',
|
|
||||||
component: () => import('@/views/contentManage/video/index.vue'),
|
|
||||||
name: 'Video',
|
|
||||||
meta: { title: '视频管理', icon: '', noCache: true }
|
|
||||||
},
|
|
||||||
// 评论和点赞
|
|
||||||
{
|
|
||||||
path: 'comments',
|
|
||||||
component: () => import('@/views/contentManage/video/index.vue'),
|
|
||||||
name: 'Comments',
|
|
||||||
meta: { title: '评论与点赞', icon: '', noCache: true }
|
|
||||||
},
|
|
||||||
// 粉丝与关注
|
|
||||||
{
|
|
||||||
path: 'fans',
|
|
||||||
component: () => import('@/views/contentManage/video/index.vue'),
|
|
||||||
name: 'Fans',
|
|
||||||
meta: { title: '粉丝与关注', icon: '', noCache: true }
|
|
||||||
},
|
|
||||||
// 云点播
|
|
||||||
{
|
|
||||||
path: 'cloud',
|
|
||||||
component: () => import('@/views/contentManage/video/index.vue'),
|
|
||||||
name: 'Cloud',
|
|
||||||
meta: { title: '云点播', icon: '', noCache: true }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
// 动态路由,基于用户权限动态去加载
|
|
||||||
export const dynamicRoutes: RouteRecordRaw[] = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建路由
|
* 创建路由
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// 用于检测用户是否 star 了仓库,如果没有 star,将弹窗提示用户 star 。
|
// 用于检测用户是否 star 了仓库,如果没有 star,将弹窗提示用户 star 。
|
||||||
import { Message, MessageBox } from 'element-ui'
|
/*import { Message, MessageBox } from 'element-ui'*/
|
||||||
// 使用axios代替$.ajax
|
// 使用axios代替$.ajax
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
// 应用参数
|
// 应用参数
|
||||||
@ -19,7 +19,7 @@ const allowDisparity = 1000 * 60 * 60 * 24 * 7
|
|||||||
* @param productLink 开源链接
|
* @param productLink 开源链接
|
||||||
*/
|
*/
|
||||||
export function isStarRepo(owner, repo, userId, redirectUrl,productName,productLink) {
|
export function isStarRepo(owner, repo, userId, redirectUrl,productName,productLink) {
|
||||||
const judge = process.env.VUE_APP_JUDGE_STAR
|
const judge = 0
|
||||||
if (!judge || judge == 0) {
|
if (!judge || judge == 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -75,7 +75,7 @@ function confirmStar(redirectUrl,productName,productLink) {
|
|||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
// 弹窗提示
|
// 弹窗提示
|
||||||
MessageBox.alert(tipStr, '温馨提示', {
|
ElMessageBox.alert(tipStr, '温馨提示', {
|
||||||
// if you want to disable its autofocus
|
// if you want to disable its autofocus
|
||||||
// autofocus: false,
|
// autofocus: false,
|
||||||
confirmButtonText: '同意授权检测',
|
confirmButtonText: '同意授权检测',
|
||||||
@ -100,7 +100,7 @@ function toStar(redirectUrl,productName,productLink,accessToken,owner,repo,key,c
|
|||||||
<p><b>本页面将在 star 后正常开放展示</b></p>
|
<p><b>本页面将在 star 后正常开放展示</b></p>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
MessageBox.confirm(tipStr, '温馨提示', {
|
ElMessageBox.confirm(tipStr, '温馨提示', {
|
||||||
// if you want to disable its autofocus
|
// if you want to disable its autofocus
|
||||||
// autofocus: false,
|
// autofocus: false,
|
||||||
closeOnClickModal: false,
|
closeOnClickModal: false,
|
||||||
|
@ -3,30 +3,47 @@
|
|||||||
<div v-show="show">
|
<div v-show="show">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
|
||||||
<el-form-item label="申请状态" prop="status">
|
<el-form-item label="申请状态" prop="status">
|
||||||
<DictRadio v-model="queryParams.status" :radioData="dict?.type.oms_aftersale_status" size="small" :show-all="'all'" @change="handleQuery"></DictRadio>
|
<DictRadio
|
||||||
|
v-model="queryParams.status"
|
||||||
|
:radioData="dict?.type.oms_aftersale_status"
|
||||||
|
size="small"
|
||||||
|
:show-all="'all'"
|
||||||
|
@change="handleQuery"
|
||||||
|
></DictRadio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="售后类型" prop="type">
|
<el-form-item label="售后类型" prop="type">
|
||||||
<DictRadio v-model="queryParams.type" :radioData="dict?.type.oms_aftersale_type" size="small" :show-all="'all'" @change="handleQuery"></DictRadio>
|
<DictRadio
|
||||||
|
v-model="queryParams.type"
|
||||||
|
:radioData="dict?.type.oms_aftersale_type"
|
||||||
|
size="small"
|
||||||
|
:show-all="'all'"
|
||||||
|
@change="handleQuery"
|
||||||
|
></DictRadio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="订单号" prop="orderSn">
|
<el-form-item label="订单号" prop="orderSn">
|
||||||
<el-input v-model.trim="queryParams.orderSn" placeholder="请输入订单号" clearable size="small"
|
<el-input v-model.trim="queryParams.orderSn" placeholder="请输入订单号" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||||
@keyup.enter.native="handleQuery" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="售后单号" prop="id">
|
<el-form-item label="售后单号" prop="id">
|
||||||
<el-input v-model.trim="queryParams.id" placeholder="请输入售后单号" clearable size="small"
|
<el-input v-model.trim="queryParams.id" placeholder="请输入售后单号" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||||
@keyup.enter.native="handleQuery" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="会员手机号" prop="userPhone">
|
<el-form-item label="会员手机号" prop="userPhone">
|
||||||
<el-input v-model.trim="queryParams.userPhone" placeholder="请输入会员手机号" clearable size="small"
|
<el-input v-model.trim="queryParams.userPhone" placeholder="请输入会员手机号" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||||
@keyup.enter.native="handleQuery" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="创建时间" prop="Time">
|
<el-form-item label="创建时间" prop="Time">
|
||||||
<el-date-picker v-model="queryParams.Time" type="datetimerange" :picker-options="pickerOptions"
|
<el-date-picker
|
||||||
range-separator="至" size="small" format="yyyy-MM-dd HH:mm:ss"
|
v-model="queryParams.Time"
|
||||||
|
type="datetimerange"
|
||||||
|
:picker-options="pickerOptions"
|
||||||
|
range-separator="至"
|
||||||
|
size="small"
|
||||||
|
format="yyyy-MM-dd HH:mm:ss"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']"
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
:default-time="['00:00:00', '23:59:59']"
|
||||||
align="right"
|
align="right"
|
||||||
@change="handleChange">
|
@change="handleChange"
|
||||||
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="flex_one tr">
|
<el-form-item class="flex_one tr">
|
||||||
@ -36,13 +53,10 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<el-table v-loading="loading" :data="omsAftersaleList" @selection-change="handleSelectionChange" border>
|
<el-table v-loading="loading" :data="omsAftersaleList" @selection-change="handleSelectionChange" border>
|
||||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||||
<el-table-column label="售后单号" prop="id" width="160"/>
|
<el-table-column label="售后单号" prop="id" width="160" />
|
||||||
<el-table-column label="申请状态" prop="aftersaleStatus" width="80">
|
<el-table-column label="申请状态" prop="aftersaleStatus" width="80">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-tag effect="plain" size="medium" :type="getAftersaleStatusTag(scope.row)">{{
|
<el-tag effect="plain" size="medium" :type="getAftersaleStatusTag(scope.row)">{{ getAftersaleStatusText(scope.row) }} </el-tag>
|
||||||
getAftersaleStatusText(scope.row)
|
|
||||||
}}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="用户信息" prop="nickName" width="120">
|
<el-table-column label="用户信息" prop="nickName" width="120">
|
||||||
@ -52,86 +66,90 @@
|
|||||||
<div>{{ scope.row.mark }}</div>
|
<div>{{ scope.row.mark }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="退款金额" prop="applyReturnAmount" width="120"/>
|
<el-table-column label="退款金额" prop="applyReturnAmount" width="120" />
|
||||||
<el-table-column label="售后类型" prop="applyRefundType" width="80">
|
<el-table-column label="售后类型" prop="applyRefundType" width="80">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-tag effect="plain" size="medium" :type="getAftersaleTypeTag(scope.row)">{{
|
<el-tag effect="plain" size="medium" :type="getAftersaleTypeTag(scope.row)">{{ getAftersaleTypeText(scope.row) }} </el-tag>
|
||||||
getAftersaleTypeText(scope.row)
|
|
||||||
}}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="申请时间" prop="applyRefundTime" width="180">
|
<el-table-column label="申请时间" prop="applyRefundTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template v-slot="scope">
|
||||||
<span>{{ parseTime(scope.row.applyRefundTime, '') }}</span>
|
<span>{{ parseTime(scope.row.applyRefundTime, '') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="处理时间" prop="handleTime" width="180">
|
<el-table-column label="处理时间" prop="handleTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template v-slot="scope">
|
||||||
<span>{{ parseTime(scope.row.handleTime, '') }}</span>
|
<span>{{ parseTime(scope.row.handleTime, '') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="原因" prop="reason" width="220"/>
|
<el-table-column label="原因" prop="reason" width="220" />
|
||||||
<el-table-column label="处理备注" prop="note" width="150"/>
|
<el-table-column label="处理备注" prop="note" width="150" />
|
||||||
<el-table-column label="处理人员" prop="handleMan" width="100"/>
|
<el-table-column label="处理人员" prop="handleMan" width="100" />
|
||||||
<el-table-column label="订单编号/操作" class-name="small-padding fixed-width" width="220" fixed="right">
|
<el-table-column label="订单编号/操作" class-name="small-padding fixed-width" width="220" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template v-slot="scope">
|
||||||
<div>
|
<div>
|
||||||
{{ scope.row.orderSn }}
|
{{ scope.row.orderSn }}
|
||||||
<el-link @click="copy(scope.row.orderSn)" :underline="false"><i
|
<el-link @click="copy(scope.row.orderSn)" :underline="false"><i class="el-icon-document-copy el-icon--right"></i></el-link>
|
||||||
class="el-icon-document-copy el-icon--right"></i></el-link>
|
|
||||||
</div>
|
</div>
|
||||||
<el-button size="mini" type="text" @click="handleDetail(scope.row.orderId)"
|
<el-button size="mini" type="text" @click="handleDetail(scope.row.orderId)" v-hasPermi="['oms:aftersale:query']">详情 </el-button>
|
||||||
v-hasPermi="['oms:aftersale:query']">详情
|
<el-button size="mini" type="text" @click="showLog(scope.row.orderId)" v-hasPermi="['oms:aftersale:log']">日志 </el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="approve(scope.row, 1)"
|
||||||
|
v-if="scope.row.aftersaleStatus == 0"
|
||||||
|
v-hasPermi="['manager:oms:aftersale:update']"
|
||||||
|
>同意
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" type="text" @click="showLog(scope.row.orderId)"
|
<el-button
|
||||||
v-hasPermi="['oms:aftersale:log']">日志
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleOpen(scope.row, 2)"
|
||||||
|
class="red"
|
||||||
|
v-if="scope.row.aftersaleStatus == 0"
|
||||||
|
v-hasPermi="['manager:oms:aftersale:update']"
|
||||||
|
>拒绝
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" type="text" @click="approve(scope.row, 1)"
|
<el-button
|
||||||
v-if="scope.row.aftersaleStatus == 0" v-hasPermi="['manager:oms:aftersale:update']">同意
|
size="mini"
|
||||||
</el-button>
|
type="text"
|
||||||
<el-button size="mini" type="text" @click="handleOpen(scope.row, 2)" class="red"
|
@click="confirmReceive(scope.row, 3)"
|
||||||
v-if="scope.row.aftersaleStatus == 0" v-hasPermi="['manager:oms:aftersale:update']">拒绝
|
|
||||||
</el-button>
|
|
||||||
<el-button size="mini" type="text" @click="confirmReceive(scope.row, 3)"
|
|
||||||
v-if="scope.row.aftersaleStatus == 1 && scope.row.applyRefundType == 2"
|
v-if="scope.row.aftersaleStatus == 1 && scope.row.applyRefundType == 2"
|
||||||
v-hasPermi="['manager:oms:aftersale:update']">确认收货
|
v-hasPermi="['manager:oms:aftersale:update']"
|
||||||
|
>确认收货
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<InBody v-show="total>0">
|
<InBody v-show="total > 0">
|
||||||
<pagination
|
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
</InBody>
|
</InBody>
|
||||||
</div>
|
</div>
|
||||||
<!-- <SeeAdsComponent ref="seeAdsComponentRef" v-if="!show" @confirmOk="confirmOk"/>-->
|
<!-- <SeeAdsComponent ref="seeAdsComponentRef" v-if="!show" @confirmOk="confirmOk"/>-->
|
||||||
|
|
||||||
<!-- 拒绝对话框 -->
|
<!-- 拒绝对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" v-model:visible="open" width="500px" append-to-body>
|
||||||
<el-form ref="updateForm" :model="updateOrderForm" label-width="100px" :rules="rules">
|
<el-form ref="updateForm" :model="updateOrderForm" label-width="100px" :rules="rules">
|
||||||
<el-form-item label="拒绝理由" prop="remark">
|
<el-form-item label="拒绝理由" prop="remark">
|
||||||
<el-input v-model="updateOrderForm.remark" placeholder="请输入拒绝理由" controls-position="right" :min="0" />
|
<el-input v-model="updateOrderForm.remark" placeholder="请输入拒绝理由" controls-position="right" :min="0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<template v-slot:footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitUpdate('updateForm')">确定</el-button>
|
<el-button type="primary" @click="submitUpdate('updateForm')">确定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 日志 -->
|
<!-- 日志 -->
|
||||||
<el-dialog :title="logObj.title" :visible.sync="logObj.open" width="500px" append-to-body>
|
<el-dialog :title="logObj.title" v-model:visible="logObj.open" width="500px" append-to-body>
|
||||||
<el-timeline>
|
<el-timeline>
|
||||||
<el-timeline-item v-for="item in logObj.logList" placement="top" :timestamp="parseTime(item.createTime, '')">
|
<el-timeline-item v-for="item in logObj.logList" placement="top" :timestamp="parseTime(item.createTime, '')">
|
||||||
<el-card>
|
<el-card>
|
||||||
<h4>{{ getLogEvent(item.orderStatus) }}</h4>
|
<h4>{{ getLogEvent(item.orderStatus) }}</h4>
|
||||||
<br>
|
<br />
|
||||||
<h4>操作人:{{ item.operateMan }}</h4>
|
<h4>操作人:{{ item.operateMan }}</h4>
|
||||||
<br v-if="item.note">
|
<br v-if="item.note" />
|
||||||
<h4 v-if="item.note">备注:{{ item.note }}</h4>
|
<h4 v-if="item.note">备注:{{ item.note }}</h4>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-timeline-item>
|
</el-timeline-item>
|
||||||
@ -150,14 +168,14 @@ import {
|
|||||||
listOmsAftersale,
|
listOmsAftersale,
|
||||||
updateOmsAftersale,
|
updateOmsAftersale,
|
||||||
viewLog
|
viewLog
|
||||||
} from "@/api/oms/aftersale";
|
} from '@/api/oms/aftersale';
|
||||||
import dateUtil from '@/utils/DateUtil';
|
import dateUtil from '@/utils/DateUtil';
|
||||||
import SeeAdsComponent from "@/components/SeeAdsComponent.vue";
|
import SeeAdsComponent from '@/components/SeeAdsComponent.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "OmsAftersale",
|
name: 'OmsAftersale',
|
||||||
components: {SeeAdsComponent},
|
components: { SeeAdsComponent },
|
||||||
dicts: ["oms_aftersale_type", "oms_aftersale_status"],
|
dicts: ['oms_aftersale_type', 'oms_aftersale_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: true,
|
show: true,
|
||||||
@ -181,7 +199,7 @@ export default {
|
|||||||
// 订单售后表格数据
|
// 订单售后表格数据
|
||||||
omsAftersaleList: [],
|
omsAftersaleList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "拒绝售后",
|
title: '拒绝售后',
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
@ -203,12 +221,10 @@ export default {
|
|||||||
orderId: null,
|
orderId: null,
|
||||||
optType: null,
|
optType: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
id: null,
|
id: null
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
remark: [
|
remark: [{ required: true, message: '请输入拒绝理由', trigger: 'blur' }]
|
||||||
{required: true, message: '请输入拒绝理由', trigger: 'blur'}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
logObj: {
|
logObj: {
|
||||||
title: '日志',
|
title: '日志',
|
||||||
@ -219,42 +235,42 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
const { status } = this.$route.query
|
const { status } = this.$route.query;
|
||||||
if (status){
|
if (status) {
|
||||||
this.queryParams.status = status
|
this.queryParams.status = status;
|
||||||
}
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
confirmOk(success) {
|
confirmOk(success) {
|
||||||
if (success) {
|
if (success) {
|
||||||
this.show = true
|
this.show = true;
|
||||||
this.getList();
|
this.getList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
copy(data) {
|
copy(data) {
|
||||||
let url = data;
|
const url = data;
|
||||||
let oInput = document.createElement('input');
|
const oInput = document.createElement('input');
|
||||||
oInput.value = url;
|
oInput.value = url;
|
||||||
document.body.appendChild(oInput);
|
document.body.appendChild(oInput);
|
||||||
oInput.select(); // 选择对象;
|
oInput.select(); // 选择对象;
|
||||||
console.log(oInput.value)
|
console.log(oInput.value);
|
||||||
document.execCommand("Copy"); // 执行浏览器复制命令
|
document.execCommand('Copy'); // 执行浏览器复制命令
|
||||||
this.$modal.msgSuccess('复制成功');
|
this.$modal.msgSuccess('复制成功');
|
||||||
oInput.remove()
|
oInput.remove();
|
||||||
},
|
},
|
||||||
/** 查询订单售后列表 */
|
/** 查询订单售后列表 */
|
||||||
getList() {
|
getList() {
|
||||||
if (this.queryParams.Time) {
|
if (this.queryParams.Time) {
|
||||||
this.queryParams.startTime = this.queryParams.Time[0]
|
this.queryParams.startTime = this.queryParams.Time[0];
|
||||||
this.queryParams.endTime = this.queryParams.Time[1]
|
this.queryParams.endTime = this.queryParams.Time[1];
|
||||||
}
|
}
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const {pageNum, pageSize} = this.queryParams;
|
const { pageNum, pageSize } = this.queryParams;
|
||||||
const query = {...this.queryParams, pageNum: undefined, pageSize: undefined};
|
const query = { ...this.queryParams, pageNum: undefined, pageSize: undefined };
|
||||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
const pageReq = { page: pageNum - 1, size: pageSize };
|
||||||
listOmsAftersale(query, pageReq).then(response => {
|
listOmsAftersale(query, pageReq).then((response) => {
|
||||||
const { content, totalElements } = response
|
const { content, totalElements } = response;
|
||||||
this.omsAftersaleList = content;
|
this.omsAftersaleList = content;
|
||||||
this.total = totalElements;
|
this.total = totalElements;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -281,7 +297,7 @@ export default {
|
|||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null
|
updateTime: null
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
@ -290,44 +306,44 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm('queryForm');
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map((item) => item.id);
|
||||||
this.single = selection.length!==1
|
this.single = selection.length !== 1;
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加订单售后";
|
this.title = '添加订单售后';
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids;
|
||||||
getOmsAftersale(id).then(response => {
|
getOmsAftersale(id).then((response) => {
|
||||||
this.form = response;
|
this.form = response;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改订单售后";
|
this.title = '修改订单售后';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateOmsAftersale(this.form).then(response => {
|
updateOmsAftersale(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess('修改成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addOmsAftersale(this.form).then(response => {
|
addOmsAftersale(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -338,104 +354,109 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal.confirm('是否确认删除订单售后编号为"' + ids + '"的数据项?').then(function() {
|
this.$modal
|
||||||
|
.confirm('是否确认删除订单售后编号为"' + ids + '"的数据项?')
|
||||||
|
.then(function () {
|
||||||
return delOmsAftersale(ids);
|
return delOmsAftersale(ids);
|
||||||
}).then(() => {
|
})
|
||||||
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess('删除成功');
|
||||||
}).catch(() => {});
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$modal.confirm('是否确认导出所有订单售后数据项?').then(() => {
|
this.$modal
|
||||||
|
.confirm('是否确认导出所有订单售后数据项?')
|
||||||
|
.then(() => {
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportOmsAftersale(queryParams);
|
return exportOmsAftersale(queryParams);
|
||||||
}).then(response => {
|
})
|
||||||
|
.then((response) => {
|
||||||
this.$download.download(response);
|
this.$download.download(response);
|
||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
}).catch(() => {});
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 售后详情 */
|
/** 售后详情 */
|
||||||
handleDetail(orderId){
|
handleDetail(orderId) {
|
||||||
const id = orderId
|
const id = orderId;
|
||||||
this.$router.push({ path: '/aftersale/detail', query: { id } })
|
this.$router.push({ path: '/aftersale/detail', query: { id } });
|
||||||
},
|
},
|
||||||
/** 同意售后 */
|
/** 同意售后 */
|
||||||
approve(order, type) {
|
approve(order, type) {
|
||||||
this.$confirm(`您确定要同意售后单号为【${order.id}】的售后申请吗?`, '温馨提示', {type: 'warning'}).then(
|
this.$confirm(`您确定要同意售后单号为【${order.id}】的售后申请吗?`, '温馨提示', { type: 'warning' }).then(() => {
|
||||||
() => {
|
this.updateOrderForm.orderId = order.orderId;
|
||||||
this.updateOrderForm.orderId = order.orderId
|
this.updateOrderForm.optType = type;
|
||||||
this.updateOrderForm.optType = type
|
|
||||||
dealWithAftersale(this.updateOrderForm).then((response) => {
|
dealWithAftersale(this.updateOrderForm).then((response) => {
|
||||||
this.cancel()
|
this.cancel();
|
||||||
this.$message.success('操作成功')
|
this.$message.success('操作成功');
|
||||||
this.getList()
|
this.getList();
|
||||||
})
|
});
|
||||||
}
|
});
|
||||||
)
|
|
||||||
},
|
},
|
||||||
/** 拒绝 */
|
/** 拒绝 */
|
||||||
handleOpen(order, type) {
|
handleOpen(order, type) {
|
||||||
this.updateOrderForm.orderId = order.orderId
|
this.updateOrderForm.orderId = order.orderId;
|
||||||
this.updateOrderForm.optType = type
|
this.updateOrderForm.optType = type;
|
||||||
this.updateOrderForm.id = order.id
|
this.updateOrderForm.id = order.id;
|
||||||
this.open = true
|
this.open = true;
|
||||||
},
|
},
|
||||||
confirmReceive(orderId, type) {
|
confirmReceive(orderId, type) {
|
||||||
this.$confirm(`您确认收到售后单号为【${order.id}】的货物了吗?`, '温馨提示', {type: 'warning'}).then(
|
this.$confirm(`您确认收到售后单号为【${order.id}】的货物了吗?`, '温馨提示', { type: 'warning' }).then(() => {
|
||||||
() => {
|
this.updateOrderForm.orderId = orderId;
|
||||||
this.updateOrderForm.orderId = orderId
|
this.updateOrderForm.optType = type;
|
||||||
this.updateOrderForm.optType = type
|
|
||||||
dealWithAftersale(this.updateOrderForm).then((response) => {
|
dealWithAftersale(this.updateOrderForm).then((response) => {
|
||||||
this.cancel()
|
this.cancel();
|
||||||
this.$message.success('操作成功')
|
this.$message.success('操作成功');
|
||||||
this.getList()
|
this.getList();
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
getAftersaleStatusTag(row) {
|
getAftersaleStatusTag(row) {
|
||||||
switch (row.aftersaleStatus) {
|
switch (row.aftersaleStatus) {
|
||||||
case 0:
|
case 0:
|
||||||
return 'info'
|
return 'info';
|
||||||
case 1:
|
case 1:
|
||||||
return 'primary'
|
return 'primary';
|
||||||
case 2:
|
case 2:
|
||||||
return 'success'
|
return 'success';
|
||||||
case 3:
|
case 3:
|
||||||
return 'danger'
|
return 'danger';
|
||||||
case 4:
|
case 4:
|
||||||
return 'warning'
|
return 'warning';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getAftersaleStatusText(row) {
|
getAftersaleStatusText(row) {
|
||||||
switch (row.aftersaleStatus) {
|
switch (row.aftersaleStatus) {
|
||||||
case 0:
|
case 0:
|
||||||
return '待处理'
|
return '待处理';
|
||||||
case 1:
|
case 1:
|
||||||
return '退货中'
|
return '退货中';
|
||||||
case 2:
|
case 2:
|
||||||
return '已完成'
|
return '已完成';
|
||||||
case 3:
|
case 3:
|
||||||
return '已拒绝'
|
return '已拒绝';
|
||||||
case 4:
|
case 4:
|
||||||
return '已关闭'
|
return '已关闭';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getAftersaleTypeTag(row) {
|
getAftersaleTypeTag(row) {
|
||||||
switch (row.applyRefundType) {
|
switch (row.applyRefundType) {
|
||||||
case 1:
|
case 1:
|
||||||
return 'primary'
|
return 'primary';
|
||||||
case 2:
|
case 2:
|
||||||
return 'warning'
|
return 'warning';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getAftersaleTypeText(row) {
|
getAftersaleTypeText(row) {
|
||||||
switch (row.applyRefundType) {
|
switch (row.applyRefundType) {
|
||||||
case 1:
|
case 1:
|
||||||
return '退款'
|
return '退款';
|
||||||
case 2:
|
case 2:
|
||||||
return '退货退款'
|
return '退货退款';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
@ -444,22 +465,21 @@ export default {
|
|||||||
orderId: null,
|
orderId: null,
|
||||||
optType: null,
|
optType: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
id: null,
|
id: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
submitUpdate(formName){
|
submitUpdate(formName) {
|
||||||
this.$refs[formName].validate(valid => {
|
this.$refs[formName].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$confirm(`您确定要拒绝售后单号为【${this.updateOrderForm.id}】的售后申请了吗?`, '温馨提示', {type: 'warning'}).then(
|
this.$confirm(`您确定要拒绝售后单号为【${this.updateOrderForm.id}】的售后申请了吗?`, '温馨提示', { type: 'warning' }).then(() => {
|
||||||
() => {
|
|
||||||
dealWithAftersale(this.updateOrderForm).then((response) => {
|
dealWithAftersale(this.updateOrderForm).then((response) => {
|
||||||
this.cancel()
|
this.cancel();
|
||||||
this.$message.success('操作成功')
|
this.$message.success('操作成功');
|
||||||
this.getList()
|
this.getList();
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleChange(value) {
|
handleChange(value) {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
@ -467,16 +487,16 @@ export default {
|
|||||||
this.queryParams.endTime = null;
|
this.queryParams.endTime = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showLog(orderId){
|
showLog(orderId) {
|
||||||
this.logObj.loading = true
|
this.logObj.loading = true;
|
||||||
viewLog(orderId).then((response) => {
|
viewLog(orderId).then((response) => {
|
||||||
this.logObj.logList = response
|
this.logObj.logList = response;
|
||||||
this.logObj.open = true
|
this.logObj.open = true;
|
||||||
this.logObj.loading = false
|
this.logObj.loading = false;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
getLogEvent(status){
|
getLogEvent(status) {
|
||||||
switch (status){
|
switch (status) {
|
||||||
case 11:
|
case 11:
|
||||||
return '用户申请售后';
|
return '用户申请售后';
|
||||||
case 12:
|
case 12:
|
||||||
@ -486,7 +506,7 @@ export default {
|
|||||||
case 14:
|
case 14:
|
||||||
return '平台拒绝售后';
|
return '平台拒绝售后';
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -2,17 +2,10 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
|
||||||
<el-form-item label="状态" prop="showStatus">
|
<el-form-item label="状态" prop="showStatus">
|
||||||
<DictRadio v-model="queryParams.showStatus" @change="handleQuery" size="small"
|
<DictRadio v-model="queryParams.showStatus" @change="handleQuery" size="small" :radioData="dict?.type.sys_normal_disable" :showAll="'all'" />
|
||||||
:radioData="dict?.type.sys_normal_disable" :showAll="'all'"/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input
|
<el-input v-model="queryParams.nameLike" placeholder="名称" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||||
v-model="queryParams.nameLike"
|
|
||||||
placeholder="名称"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="flex_one tr">
|
<el-form-item class="flex_one tr">
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
@ -22,64 +15,41 @@
|
|||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="pmsBrandList" @selection-change="handleSelectionChange" border>
|
<el-table v-loading="loading" :data="pmsBrandList" @selection-change="handleSelectionChange" border>
|
||||||
<el-table-column type="selection" width="55" align="center"/>
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="品牌logo" prop="logo">
|
<el-table-column label="品牌logo" prop="logo">
|
||||||
<template slot-scope="{ row }">
|
<template v-slot="{ row }">
|
||||||
<el-image v-if="row.logo" :src="row.logo" :preview-src-list="[row.logo]" class="small-img circle-img"/>
|
<el-image v-if="row.logo" :src="row.logo" :preview-src-list="[row.logo]" class="small-img circle-img" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="名称" prop="name"/>
|
<el-table-column label="名称" prop="name" />
|
||||||
<el-table-column label="排序" prop="sort"/>
|
<el-table-column label="排序" prop="sort" />
|
||||||
<el-table-column label="状态" prop="showStatus">
|
<el-table-column label="状态" prop="showStatus">
|
||||||
<template slot-scope="{ row }">
|
<template v-slot="{ row }">
|
||||||
<dict-tag :value="row.showStatus" prop-name="sys_normal_disable"/>
|
<dict-tag :value="row.showStatus" prop-name="sys_normal_disable" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" class-name="small-padding fixed-width">
|
<el-table-column label="操作" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template v-slot="scope">
|
||||||
<el-button
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改 </el-button>
|
||||||
size="mini"
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
>修改
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
>删除</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<InBody v-show="total>0">
|
<InBody v-show="total > 0">
|
||||||
<pagination
|
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
</InBody>
|
</InBody>
|
||||||
|
|
||||||
<!-- 添加或修改品牌管理对话框 -->
|
<!-- 添加或修改品牌管理对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
|
<el-dialog :title="title" v-model:visible="open" width="50%" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-one">
|
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-one">
|
||||||
<el-form-item label="状态">
|
<el-form-item label="状态">
|
||||||
<DictRadio v-model="form.showStatus" size="small"
|
<DictRadio v-model="form.showStatus" size="small" :radioData="dict?.type.sys_normal_disable" />
|
||||||
:radioData="dict?.type.sys_normal_disable"/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="名称" />
|
<el-input v-model="form.name" placeholder="名称" />
|
||||||
@ -91,19 +61,21 @@
|
|||||||
<oss-image-upload v-model="form.logo" :limit="1" />
|
<oss-image-upload v-model="form.logo" :limit="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<template v-slot:footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {addPmsBrand, delPmsBrand, exportPmsBrand, getPmsBrand, listPmsBrand, updatePmsBrand} from "@/api/pms/brand";
|
import { addPmsBrand, delPmsBrand, exportPmsBrand, getPmsBrand, listPmsBrand, updatePmsBrand } from '@/api/pms/brand';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PmsBrand",
|
name: 'PmsBrand',
|
||||||
dicts: ['sys_normal_disable'],
|
dicts: ['sys_normal_disable'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -124,7 +96,7 @@ export default {
|
|||||||
// 品牌管理表格数据
|
// 品牌管理表格数据
|
||||||
pmsBrandList: [],
|
pmsBrandList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: '',
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
@ -133,13 +105,12 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
nameLike: null,
|
nameLike: null,
|
||||||
sort: null,
|
sort: null,
|
||||||
showStatus: null,
|
showStatus: null
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {}
|
||||||
},
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -149,11 +120,11 @@ export default {
|
|||||||
/** 查询品牌管理列表 */
|
/** 查询品牌管理列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const {pageNum, pageSize} = this.queryParams;
|
const { pageNum, pageSize } = this.queryParams;
|
||||||
const query = {...this.queryParams, pageNum: undefined, pageSize: undefined};
|
const query = { ...this.queryParams, pageNum: undefined, pageSize: undefined };
|
||||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
const pageReq = { page: pageNum - 1, size: pageSize };
|
||||||
listPmsBrand(query, pageReq).then(response => {
|
listPmsBrand(query, pageReq).then((response) => {
|
||||||
const { content, totalElements } = response
|
const { content, totalElements } = response;
|
||||||
this.pmsBrandList = content;
|
this.pmsBrandList = content;
|
||||||
this.total = totalElements;
|
this.total = totalElements;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -177,7 +148,7 @@ export default {
|
|||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null
|
updateTime: null
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
@ -186,44 +157,44 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm('queryForm');
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map((item) => item.id);
|
||||||
this.single = selection.length!==1
|
this.single = selection.length !== 1;
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加品牌管理";
|
this.title = '添加品牌管理';
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids;
|
||||||
getPmsBrand(id).then(response => {
|
getPmsBrand(id).then((response) => {
|
||||||
this.form = response;
|
this.form = response;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改品牌管理";
|
this.title = '修改品牌管理';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updatePmsBrand(this.form).then(response => {
|
updatePmsBrand(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess('修改成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addPmsBrand(this.form).then(response => {
|
addPmsBrand(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -234,23 +205,31 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal.confirm('是否确认删除品牌管理编号为"' + ids + '"的数据项?').then(function() {
|
this.$modal
|
||||||
|
.confirm('是否确认删除品牌管理编号为"' + ids + '"的数据项?')
|
||||||
|
.then(function () {
|
||||||
return delPmsBrand(ids);
|
return delPmsBrand(ids);
|
||||||
}).then(() => {
|
})
|
||||||
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess('删除成功');
|
||||||
}).catch(() => {});
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$modal.confirm('是否确认导出所有品牌管理数据项?').then(() => {
|
this.$modal
|
||||||
|
.confirm('是否确认导出所有品牌管理数据项?')
|
||||||
|
.then(() => {
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportPmsBrand(queryParams);
|
return exportPmsBrand(queryParams);
|
||||||
}).then(response => {
|
})
|
||||||
|
.then((response) => {
|
||||||
this.$download.download(response);
|
this.$download.download(response);
|
||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
}).catch(() => {});
|
})
|
||||||
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,13 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="chooseSkuObj.title" :visible.sync="chooseSkuObj.open" :width="chooseSkuObj.width" append-to-body>
|
<el-dialog :title="chooseSkuObj.title" v-model:visible="chooseSkuObj.open" :width="chooseSkuObj.width" append-to-body>
|
||||||
<el-form ref="auditForm" inline :model="chooseSkuObj.queryParams" label-width="80px">
|
<el-form ref="auditForm" inline :model="chooseSkuObj.queryParams" label-width="80px">
|
||||||
<el-form-item label="菜品名称" prop="nameLike">
|
<el-form-item label="菜品名称" prop="nameLike">
|
||||||
<el-input
|
<el-input size="small" placeholder="请输入菜品名称" v-model="chooseSkuObj.queryParams.nameLike" clearable />
|
||||||
size="small"
|
|
||||||
placeholder="请输入菜品名称"
|
|
||||||
v-model="chooseSkuObj.queryParams.nameLike"
|
|
||||||
clearable
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="菜品分类" prop="productCategoryName">
|
<el-form-item label="菜品分类" prop="productCategoryName">
|
||||||
<product-category-select v-model="chooseSkuObj.queryParams.categoryId"></product-category-select>
|
<product-category-select v-model="chooseSkuObj.queryParams.categoryId"></product-category-select>
|
||||||
@ -16,39 +11,49 @@
|
|||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="getSkuList">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="getSkuList">搜索</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table class="mt20" :data="chooseSkuObj.list" ref="table" v-loading="chooseSkuObj.loading" max-height="500" border
|
<el-table
|
||||||
row-key="id" @selection-change="handleSelectionChange">
|
class="mt20"
|
||||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"/>
|
:data="chooseSkuObj.list"
|
||||||
|
ref="table"
|
||||||
|
v-loading="chooseSkuObj.loading"
|
||||||
|
max-height="500"
|
||||||
|
border
|
||||||
|
row-key="id"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
|
||||||
<el-table-column label="菜品名称" prop="name">
|
<el-table-column label="菜品名称" prop="name">
|
||||||
<template v-slot="{row}">
|
<template v-slot="{ row }">
|
||||||
<div class="flex-center">
|
<div class="flex-center">
|
||||||
<el-image v-if="row.pic" :src="row.pic" :preview-src-list="[row.pic]" class="small-img circle-img"/>
|
<el-image v-if="row.pic" :src="row.pic" :preview-src-list="[row.pic]" class="small-img circle-img" />
|
||||||
<span class="ml5">{{ row.name }}</span>
|
<span class="ml5">{{ row.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="销量" prop="sales"/>
|
<el-table-column label="销量" prop="sales" />
|
||||||
<el-table-column label="创建时间" prop="createTime"/>
|
<el-table-column label="创建时间" prop="createTime" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="chooseSkuObj.total>0"
|
v-show="chooseSkuObj.total > 0"
|
||||||
:total="chooseSkuObj.total"
|
:total="chooseSkuObj.total"
|
||||||
:page.sync="chooseSkuObj.queryParams.pageNum"
|
v-model:page="chooseSkuObj.queryParams.pageNum"
|
||||||
:limit.sync="chooseSkuObj.queryParams.pageSize"
|
v-model:limit="chooseSkuObj.queryParams.pageSize"
|
||||||
@pagination="getSkuList"
|
@pagination="getSkuList"
|
||||||
/>
|
/>
|
||||||
<div slot="footer" class="dialog-footer">
|
<template v-slot:footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="chooseSkuObj.open=false">取 消</el-button>
|
<el-button @click="chooseSkuObj.open = false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {listPmsProduct} from "@/api/pms/product";
|
import { listPmsProduct } from '@/api/pms/product';
|
||||||
import ProductCategorySelect from "@/views/components/ProductCategorySelect.vue";
|
import ProductCategorySelect from '@/views/components/ProductCategorySelect.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {ProductCategorySelect},
|
components: { ProductCategorySelect },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectSkuIds: [],
|
selectSkuIds: [],
|
||||||
@ -56,7 +61,7 @@ export default {
|
|||||||
chooseSkuObj: {
|
chooseSkuObj: {
|
||||||
loading: false,
|
loading: false,
|
||||||
open: false,
|
open: false,
|
||||||
title: "选择菜品",
|
title: '选择菜品',
|
||||||
list: [],
|
list: [],
|
||||||
width: '60%',
|
width: '60%',
|
||||||
queryParams: {
|
queryParams: {
|
||||||
@ -69,53 +74,53 @@ export default {
|
|||||||
},
|
},
|
||||||
total: 0
|
total: 0
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$emit('onComplete', this.selectProducts)
|
this.$emit('onComplete', this.selectProducts);
|
||||||
this.chooseSkuObj.open = false
|
this.chooseSkuObj.open = false;
|
||||||
},
|
},
|
||||||
async init(chooseProductId) {
|
async init(chooseProductId) {
|
||||||
this.chooseSkuObj.queryParams.excludeProductIds = chooseProductId;
|
this.chooseSkuObj.queryParams.excludeProductIds = chooseProductId;
|
||||||
this.chooseSkuObj.queryParams.pageNum = 1;
|
this.chooseSkuObj.queryParams.pageNum = 1;
|
||||||
await this.getSkuList();
|
await this.getSkuList();
|
||||||
this.chooseSkuObj.open = true
|
this.chooseSkuObj.open = true;
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(() => {
|
||||||
this.$refs.table.clearSelection()
|
this.$refs.table.clearSelection();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
judge() {
|
judge() {
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(() => {
|
||||||
this.chooseSkuObj.list.forEach(ele => {
|
this.chooseSkuObj.list.forEach((ele) => {
|
||||||
if (this.selectProducts.some(item => item.id === ele.id)) {
|
if (this.selectProducts.some((item) => item.id === ele.id)) {
|
||||||
this.$refs.table.toggleRowSelection(ele, true)
|
this.$refs.table.toggleRowSelection(ele, true);
|
||||||
} else {
|
} else {
|
||||||
this.$refs.table.toggleRowSelection(ele, false)
|
this.$refs.table.toggleRowSelection(ele, false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.selectProducts = selection
|
this.selectProducts = selection;
|
||||||
},
|
},
|
||||||
async getSkuList() {
|
async getSkuList() {
|
||||||
this.chooseSkuObj.loading = true;
|
this.chooseSkuObj.loading = true;
|
||||||
const query = {...this.chooseSkuObj.queryParams, pageNum: undefined, pageSize: undefined};
|
const query = { ...this.chooseSkuObj.queryParams, pageNum: undefined, pageSize: undefined };
|
||||||
if (query.categoryId && Array.isArray(query.categoryId)) {
|
if (query.categoryId && Array.isArray(query.categoryId)) {
|
||||||
query.categoryId = query.categoryId.pop()
|
query.categoryId = query.categoryId.pop();
|
||||||
}
|
}
|
||||||
const {pageNum, pageSize} = this.chooseSkuObj.queryParams;
|
const { pageNum, pageSize } = this.chooseSkuObj.queryParams;
|
||||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
const pageReq = { page: pageNum - 1, size: pageSize };
|
||||||
await listPmsProduct(query, pageReq).then(response => {
|
await listPmsProduct(query, pageReq).then((response) => {
|
||||||
const {content, totalElements} = response
|
const { content, totalElements } = response;
|
||||||
this.chooseSkuObj.list = [...content];
|
this.chooseSkuObj.list = [...content];
|
||||||
this.chooseSkuObj.total = totalElements;
|
this.chooseSkuObj.total = totalElements;
|
||||||
this.chooseSkuObj.loading = false;
|
this.chooseSkuObj.loading = false;
|
||||||
});
|
});
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus">
|
<style lang="stylus">
|
||||||
|
@ -1,57 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
|
||||||
:model="queryParams"
|
|
||||||
ref="queryForm"
|
|
||||||
:inline="true"
|
|
||||||
v-show="showSearch"
|
|
||||||
label-width="100px"
|
|
||||||
size="medium"
|
|
||||||
class="ry_form"
|
|
||||||
>
|
|
||||||
<el-form-item label="状态" prop="showStatus">
|
<el-form-item label="状态" prop="showStatus">
|
||||||
<DictRadio
|
<DictRadio v-model="queryParams.showStatus" @change="handleQuery" size="small" :radioData="dict?.type.sys_show_status" :showAll="'all'" />
|
||||||
v-model="queryParams.showStatus"
|
|
||||||
@change="handleQuery"
|
|
||||||
size="small"
|
|
||||||
:radioData="dict?.type.sys_show_status"
|
|
||||||
:showAll="'all'"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input
|
<el-input v-model="queryParams.nameLike" placeholder="名称" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||||
v-model="queryParams.nameLike"
|
|
||||||
placeholder="名称"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item class="flex_one tr">
|
<el-form-item class="flex_one tr">
|
||||||
<el-button
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
type="primary"
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
icon="el-icon-search"
|
|
||||||
size="mini"
|
|
||||||
@click="handleQuery"
|
|
||||||
>搜索</el-button
|
|
||||||
>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
|
||||||
>重置</el-button
|
|
||||||
>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增 </el-button>
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
>新增
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@ -65,49 +30,26 @@
|
|||||||
>
|
>
|
||||||
<el-table-column label="名称" prop="name" />
|
<el-table-column label="名称" prop="name" />
|
||||||
<el-table-column label="图片" prop="icon">
|
<el-table-column label="图片" prop="icon">
|
||||||
<template slot-scope="{ row }">
|
<template v-slot="{ row }">
|
||||||
<el-image
|
<el-image v-if="row.icon" :src="row.icon" :preview-src-list="[row.icon]" class="small-img circle-img" />
|
||||||
v-if="row.icon"
|
|
||||||
:src="row.icon"
|
|
||||||
:preview-src-list="[row.icon]"
|
|
||||||
class="small-img circle-img"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="排序" prop="sort" />
|
<el-table-column label="排序" prop="sort" />
|
||||||
<el-table-column label="状态" prop="showStatus">
|
<el-table-column label="状态" prop="showStatus">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<dict-tag
|
<dict-tag :value="row.showStatus" prop-name="sys_show_status"></dict-tag>
|
||||||
:value="row.showStatus"
|
|
||||||
prop-name="sys_show_status"
|
|
||||||
></dict-tag>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="操作" class-name="small-padding fixed-width">
|
||||||
label="操作"
|
<template v-slot="scope">
|
||||||
class-name="small-padding fixed-width"
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改 </el-button>
|
||||||
>
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除 </el-button>
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
>修改
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
>删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<!-- 添加或修改商品分类对话框 -->
|
<!-- 添加或修改商品分类对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px">
|
<el-dialog :title="title" v-model:visible="open" width="500px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="108px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="108px">
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="名称" />
|
<el-input v-model="form.name" placeholder="名称" />
|
||||||
@ -116,11 +58,7 @@
|
|||||||
<oss-image-upload v-model="form.icon" :limit="1" />
|
<oss-image-upload v-model="form.icon" :limit="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态">
|
<el-form-item label="状态">
|
||||||
<DictRadio
|
<DictRadio v-model="form.showStatus" size="small" :radioData="dict?.type.sys_show_status" />
|
||||||
v-model="form.showStatus"
|
|
||||||
size="small"
|
|
||||||
:radioData="dict?.type.sys_show_status"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序" prop="sort">
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-input v-model="form.sort" placeholder="排序" />
|
<el-input v-model="form.sort" placeholder="排序" />
|
||||||
@ -132,10 +70,12 @@
|
|||||||
<product-category-select class="w200" v-model="form.parentId" :props="{ checkStrictly: true }"/>
|
<product-category-select class="w200" v-model="form.parentId" :props="{ checkStrictly: true }"/>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<template v-slot:footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -147,13 +87,13 @@ import {
|
|||||||
delPmsProductCategory,
|
delPmsProductCategory,
|
||||||
addPmsProductCategory,
|
addPmsProductCategory,
|
||||||
updatePmsProductCategory,
|
updatePmsProductCategory,
|
||||||
exportPmsProductCategory,
|
exportPmsProductCategory
|
||||||
} from "@/api/pms/productCategory";
|
} from '@/api/pms/productCategory';
|
||||||
import ProductCategorySelect from "@/views/components/ProductCategorySelect";
|
import ProductCategorySelect from '@/views/components/ProductCategorySelect';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PmsProductCategory",
|
name: 'PmsProductCategory',
|
||||||
dicts: ["sys_show_status"],
|
dicts: ['sys_show_status'],
|
||||||
components: { ProductCategorySelect },
|
components: { ProductCategorySelect },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -172,7 +112,7 @@ export default {
|
|||||||
// 商品分类表格数据
|
// 商品分类表格数据
|
||||||
pmsProductCategoryList: [],
|
pmsProductCategoryList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: '',
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
@ -181,12 +121,12 @@ export default {
|
|||||||
nameLike: null,
|
nameLike: null,
|
||||||
level: null,
|
level: null,
|
||||||
showStatus: null,
|
showStatus: null,
|
||||||
sort: null,
|
sort: null
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {},
|
rules: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -220,9 +160,9 @@ export default {
|
|||||||
createBy: null,
|
createBy: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null,
|
updateTime: null
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
@ -230,7 +170,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm('queryForm');
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
@ -243,7 +183,7 @@ export default {
|
|||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加商品分类";
|
this.title = '添加商品分类';
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
@ -252,12 +192,12 @@ export default {
|
|||||||
getPmsProductCategory(id).then((response) => {
|
getPmsProductCategory(id).then((response) => {
|
||||||
this.form = response;
|
this.form = response;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改商品分类";
|
this.title = '修改商品分类';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let p;
|
let p;
|
||||||
if (this.form.parentId) {
|
if (this.form.parentId) {
|
||||||
@ -265,19 +205,19 @@ export default {
|
|||||||
}
|
}
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
p = updatePmsProductCategory(this.form).then((response) => {
|
p = updatePmsProductCategory(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess('修改成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
p = addPmsProductCategory(this.form).then((response) => {
|
p = addPmsProductCategory(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
p.then(() => {
|
p.then(() => {
|
||||||
this.$store.dispatch("mall/loadProductCategories", true);
|
this.$store.dispatch('mall/loadProductCategories', true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -285,7 +225,7 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
if (row.children && row.children.length > 0) {
|
if (row.children && row.children.length > 0) {
|
||||||
this.$message.error("请先删除子目录");
|
this.$message.error('请先删除子目录');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const ids = row.id;
|
const ids = row.id;
|
||||||
@ -296,7 +236,7 @@ export default {
|
|||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess('删除成功');
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
@ -304,7 +244,7 @@ export default {
|
|||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("是否确认导出所有商品分类数据项?")
|
.confirm('是否确认导出所有商品分类数据项?')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportPmsProductCategory(queryParams);
|
return exportPmsProductCategory(queryParams);
|
||||||
@ -314,7 +254,7 @@ export default {
|
|||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -2,40 +2,16 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
|
||||||
<el-form-item label="PRODUCT_ID" prop="productId">
|
<el-form-item label="PRODUCT_ID" prop="productId">
|
||||||
<el-input
|
<el-input v-model="queryParams.productId" placeholder="请输入PRODUCT_ID" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||||
v-model="queryParams.productId"
|
|
||||||
placeholder="请输入PRODUCT_ID"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="sku编码" prop="outSkuId">
|
<el-form-item label="sku编码" prop="outSkuId">
|
||||||
<el-input
|
<el-input v-model="queryParams.outSkuId" placeholder="请输入sku编码" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||||
v-model="queryParams.outSkuId"
|
|
||||||
placeholder="请输入sku编码"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="PRICE" prop="price">
|
<el-form-item label="PRICE" prop="price">
|
||||||
<el-input
|
<el-input v-model="queryParams.price" placeholder="请输入PRICE" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||||
v-model="queryParams.price"
|
|
||||||
placeholder="请输入PRICE"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="展示图片" prop="pic">
|
<el-form-item label="展示图片" prop="pic">
|
||||||
<el-input
|
<el-input v-model="queryParams.pic" placeholder="请输入展示图片" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||||
v-model="queryParams.pic"
|
|
||||||
placeholder="请输入展示图片"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="flex_one tr">
|
<el-form-item class="flex_one tr">
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
@ -45,15 +21,7 @@
|
|||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['pms:sku:add']">新增</el-button>
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['pms:sku:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@ -65,35 +33,17 @@
|
|||||||
<el-table-column label="展示图片" align="center" prop="pic" />
|
<el-table-column label="展示图片" align="center" prop="pic" />
|
||||||
<el-table-column label="商品销售属性,json格式" align="center" prop="spData" />
|
<el-table-column label="商品销售属性,json格式" align="center" prop="spData" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template v-slot="scope">
|
||||||
<el-button
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['pms:sku:edit']">修改</el-button>
|
||||||
size="mini"
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['pms:sku:remove']">删除</el-button>
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
v-hasPermi="['pms:sku:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['pms:sku:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改sku信息对话框 -->
|
<!-- 添加或修改sku信息对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
|
<el-dialog :title="title" v-model:visible="open" width="50%" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two">
|
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two">
|
||||||
<el-form-item label="PRODUCT_ID" prop="productId">
|
<el-form-item label="PRODUCT_ID" prop="productId">
|
||||||
<el-input v-model="form.productId" placeholder="请输入PRODUCT_ID" />
|
<el-input v-model="form.productId" placeholder="请输入PRODUCT_ID" />
|
||||||
@ -111,19 +61,21 @@
|
|||||||
<el-input v-model="form.spData" type="textarea" placeholder="请输入内容" />
|
<el-input v-model="form.spData" type="textarea" placeholder="请输入内容" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<template v-slot:footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listPmsSku, getPmsSku, delPmsSku, addPmsSku, updatePmsSku, exportPmsSku } from "@/api/pms/sku";
|
import { listPmsSku, getPmsSku, delPmsSku, addPmsSku, updatePmsSku, exportPmsSku } from '@/api/pms/sku';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PmsSku",
|
name: 'PmsSku',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -143,7 +95,7 @@ export default {
|
|||||||
// sku信息表格数据
|
// sku信息表格数据
|
||||||
pmsSkuList: [],
|
pmsSkuList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: '',
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
@ -154,16 +106,14 @@ export default {
|
|||||||
outSkuId: null,
|
outSkuId: null,
|
||||||
price: null,
|
price: null,
|
||||||
pic: null,
|
pic: null,
|
||||||
spData: null,
|
spData: null
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
outSkuId: [
|
outSkuId: [{ required: true, message: 'sku编码不能为空', trigger: 'blur' }]
|
||||||
{ required: true, message: "sku编码不能为空", trigger: "blur" }
|
}
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -173,11 +123,11 @@ export default {
|
|||||||
/** 查询sku信息列表 */
|
/** 查询sku信息列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const {pageNum, pageSize} = this.queryParams;
|
const { pageNum, pageSize } = this.queryParams;
|
||||||
const query = {...this.queryParams, pageNum: undefined, pageSize: undefined};
|
const query = { ...this.queryParams, pageNum: undefined, pageSize: undefined };
|
||||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
const pageReq = { page: pageNum - 1, size: pageSize };
|
||||||
listPmsSku(query, pageReq).then(response => {
|
listPmsSku(query, pageReq).then((response) => {
|
||||||
const { content, totalElements } = response
|
const { content, totalElements } = response;
|
||||||
this.pmsSkuList = content;
|
this.pmsSkuList = content;
|
||||||
this.total = totalElements;
|
this.total = totalElements;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -202,7 +152,7 @@ export default {
|
|||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null
|
updateTime: null
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
@ -211,44 +161,44 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm('queryForm');
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map((item) => item.id);
|
||||||
this.single = selection.length!==1
|
this.single = selection.length !== 1;
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加sku信息";
|
this.title = '添加sku信息';
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids;
|
||||||
getPmsSku(id).then(response => {
|
getPmsSku(id).then((response) => {
|
||||||
this.form = response;
|
this.form = response;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改sku信息";
|
this.title = '修改sku信息';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updatePmsSku(this.form).then(response => {
|
updatePmsSku(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess('修改成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addPmsSku(this.form).then(response => {
|
addPmsSku(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -259,23 +209,31 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal.confirm('是否确认删除sku信息编号为"' + ids + '"的数据项?').then(function() {
|
this.$modal
|
||||||
|
.confirm('是否确认删除sku信息编号为"' + ids + '"的数据项?')
|
||||||
|
.then(function () {
|
||||||
return delPmsSku(ids);
|
return delPmsSku(ids);
|
||||||
}).then(() => {
|
})
|
||||||
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess('删除成功');
|
||||||
}).catch(() => {});
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
const queryParams = this.queryParams;
|
||||||
this.$modal.confirm('是否确认导出所有sku信息数据项?').then(() => {
|
this.$modal
|
||||||
|
.confirm('是否确认导出所有sku信息数据项?')
|
||||||
|
.then(() => {
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return exportPmsSku(queryParams);
|
return exportPmsSku(queryParams);
|
||||||
}).then(response => {
|
})
|
||||||
|
.then((response) => {
|
||||||
this.$download.download(response);
|
this.$download.download(response);
|
||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
}).catch(() => {});
|
})
|
||||||
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -25,7 +25,7 @@ export default defineConfig(({ mode, command }) => {
|
|||||||
proxy: {
|
proxy: {
|
||||||
[env.VITE_APP_BASE_API]: {
|
[env.VITE_APP_BASE_API]: {
|
||||||
// target: 'http://192.168.1.250:8080',
|
// target: 'http://192.168.1.250:8080',
|
||||||
target: 'http://192.168.1.13:8080',
|
target: 'http://111.62.22.190:8080',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
ws: true,
|
ws: true,
|
||||||
rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), ''),
|
rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), ''),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user