mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 14:40:44 +00:00
feat: #10000 团购管理暂存
This commit is contained in:
parent
16f8e5e5ec
commit
7c3ee44bd1
@ -1,24 +1,29 @@
|
|||||||
# hello-world
|
# hello-world
|
||||||
|
|
||||||
## Project setup
|
## Project setup
|
||||||
```
|
|
||||||
|
```nodejs
|
||||||
npm install
|
npm install
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compiles and hot-reloads for development
|
### Compiles and hot-reloads for development
|
||||||
```
|
|
||||||
|
```nodejs
|
||||||
npm run serve
|
npm run serve
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compiles and minifies for production
|
### Compiles and minifies for production
|
||||||
```
|
|
||||||
|
```nodejs
|
||||||
npm run build
|
npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
### Lints and fixes files
|
### Lints and fixes files
|
||||||
```
|
|
||||||
|
```nodejs
|
||||||
npm run lint
|
npm run lint
|
||||||
```
|
```
|
||||||
|
|
||||||
### Customize configuration
|
### Customize configuration
|
||||||
|
|
||||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||||
|
|||||||
16783
resources/frontend/package-lock.json
generated
16783
resources/frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -10,9 +10,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.21.1",
|
"axios": "^0.21.1",
|
||||||
"core-js": "^3.6.5",
|
"core-js": "^3.6.5",
|
||||||
"echarts": "^5.3.2",
|
|
||||||
"element-ui": "^2.15.6",
|
"element-ui": "^2.15.6",
|
||||||
"js-cookie": "^3.0.1",
|
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"vue": "^2.6.11",
|
"vue": "^2.6.11",
|
||||||
"vue-router": "^3.2.0",
|
"vue-router": "^3.2.0",
|
||||||
|
|||||||
1
resources/frontend/src/api/menu.js
vendored
1
resources/frontend/src/api/menu.js
vendored
@ -1,6 +1,5 @@
|
|||||||
import http from '@/util/http.js'
|
import http from '@/util/http.js'
|
||||||
|
|
||||||
// 商品管理列表
|
|
||||||
export function getMenu () {
|
export function getMenu () {
|
||||||
return http({
|
return http({
|
||||||
url: '/api/menus',
|
url: '/api/menus',
|
||||||
|
|||||||
4
resources/frontend/src/api/plat.js
vendored
4
resources/frontend/src/api/plat.js
vendored
@ -1,8 +1,6 @@
|
|||||||
import http from "@/util/http.js";
|
import http from "@/util/http.js";
|
||||||
|
|
||||||
// 平台页面请求
|
// 平台货品列表
|
||||||
|
|
||||||
// 平台商品列表
|
|
||||||
export function platGoodsList(params) {
|
export function platGoodsList(params) {
|
||||||
return http({
|
return http({
|
||||||
url: "/api/plat_goods",
|
url: "/api/plat_goods",
|
||||||
|
|||||||
21
resources/frontend/src/api/rankingData.js
vendored
21
resources/frontend/src/api/rankingData.js
vendored
@ -1,26 +1,9 @@
|
|||||||
/*
|
|
||||||
* @Description: 排名
|
|
||||||
* @Author: chenzhiwei (725551805@qq.com)
|
|
||||||
* @Date: 2021-08-02 16:09:41
|
|
||||||
* @LastEditors: czw (725551805@qq.com)
|
|
||||||
* @LastEditTime: 2022-03-03 22:17:09
|
|
||||||
* @FilePath: /glxt/src/api/rankingData.js
|
|
||||||
*/
|
|
||||||
|
|
||||||
import http from "@/util/http.js";
|
import http from "@/util/http.js";
|
||||||
// export function rankingData(data) {
|
|
||||||
// // 传递参数
|
|
||||||
// return http({
|
|
||||||
// url: "newh5app/api/mobile/v1/music/rank/16/",
|
|
||||||
// method: "get",
|
|
||||||
// params: data // 传递参数
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
export function postadd(params) {
|
export function postadd(params) {
|
||||||
// 传递id
|
// 传递id
|
||||||
return http({
|
return http({
|
||||||
url: "/api/admin/auth/login", // 传递id
|
url: "/api/admin/auth/login",
|
||||||
method: "post",
|
method: "post",
|
||||||
params: params,
|
params: params,
|
||||||
});
|
});
|
||||||
@ -42,7 +25,7 @@ export function storeDetail(params) {
|
|||||||
params: params,
|
params: params,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 鲜花项目接口从这里开始
|
|
||||||
// 商品种类列表
|
// 商品种类列表
|
||||||
export function goods_types(params) {
|
export function goods_types(params) {
|
||||||
return http({
|
return http({
|
||||||
|
|||||||
2
resources/frontend/src/main.js
vendored
2
resources/frontend/src/main.js
vendored
@ -5,7 +5,7 @@ import store from "./store";
|
|||||||
import ElementUI from "element-ui";
|
import ElementUI from "element-ui";
|
||||||
import "element-ui/lib/theme-chalk/index.css";
|
import "element-ui/lib/theme-chalk/index.css";
|
||||||
import "@/css/style.css";
|
import "@/css/style.css";
|
||||||
import "./router/index2";
|
import "./router/main";
|
||||||
|
|
||||||
Vue.use(ElementUI);
|
Vue.use(ElementUI);
|
||||||
Vue.config.productionTip = false;
|
Vue.config.productionTip = false;
|
||||||
|
|||||||
2
resources/frontend/src/router/index.js
vendored
2
resources/frontend/src/router/index.js
vendored
@ -1,6 +1,5 @@
|
|||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
import VueRouter from "vue-router";
|
import VueRouter from "vue-router";
|
||||||
// import axios from "axios";
|
|
||||||
|
|
||||||
Vue.use(VueRouter);
|
Vue.use(VueRouter);
|
||||||
|
|
||||||
@ -12,7 +11,6 @@ const createRouter = () =>
|
|||||||
const router = createRouter();
|
const router = createRouter();
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
// console.log(to,next);
|
|
||||||
const token = localStorage.getItem("token");
|
const token = localStorage.getItem("token");
|
||||||
// 目标路由不是登录页,并且还需要token验证,还没有token,那就直接给返回到登录页
|
// 目标路由不是登录页,并且还需要token验证,还没有token,那就直接给返回到登录页
|
||||||
if (to.name !== "Login" && !token) {
|
if (to.name !== "Login" && !token) {
|
||||||
|
|||||||
15
resources/frontend/src/router/index2.js
vendored
15
resources/frontend/src/router/index2.js
vendored
@ -1,15 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Description:
|
|
||||||
* @Author: czw (725551805@qq.com)
|
|
||||||
* @Date: 2022-02-25 10:40:25
|
|
||||||
* @LastEditors: czw (725551805@qq.com)
|
|
||||||
* @LastEditTime: 2022-02-25 12:18:31
|
|
||||||
* @FilePath: /glxt/src/router/index2.js
|
|
||||||
*/
|
|
||||||
|
|
||||||
import router from './index'
|
|
||||||
import Home from './index1'
|
|
||||||
|
|
||||||
Home.forEach(element => {
|
|
||||||
router.addRoute(element) // 动态添加更多的路由规则
|
|
||||||
})
|
|
||||||
@ -65,6 +65,16 @@ const list = [
|
|||||||
name: "货品列表",
|
name: "货品列表",
|
||||||
component: () => import("../views/plat/goodsList.vue"),
|
component: () => import("../views/plat/goodsList.vue"),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "GROUP_MANAGEMENT",
|
||||||
|
name: "团购管理",
|
||||||
|
component: () => import("../views/group/group.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "GROUP_ADD",
|
||||||
|
name: "新增团购",
|
||||||
|
component: () => import("../views/group/addGroup.vue"),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
6
resources/frontend/src/router/main.js
vendored
Normal file
6
resources/frontend/src/router/main.js
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import router from './index'
|
||||||
|
import List from './list'
|
||||||
|
|
||||||
|
List.forEach(element => {
|
||||||
|
router.addRoute(element) // 动态添加更多的路由规则
|
||||||
|
})
|
||||||
168
resources/frontend/src/views/group/addGroup.vue
Normal file
168
resources/frontend/src/views/group/addGroup.vue
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card style="margin-top: 10px" class="box-card">
|
||||||
|
<el-form ref="formInline" :model="formInline" label-width="80px">
|
||||||
|
<el-form-item label="店铺">
|
||||||
|
<el-select v-model="formInline.region" placeholder="店铺">
|
||||||
|
<el-option label="花里有品" value="1"></el-option>
|
||||||
|
<el-option label="花富贵儿" value="2"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="活动标题">
|
||||||
|
<el-input type="textarea" v-model="formInline.title"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="团购商品">
|
||||||
|
<el-button @click="centerDialogVisible = true">从商品列表导入</el-button>
|
||||||
|
<el-input placeholder="搜索商品名称、编码" v-model="input2" style="margin-left: 20px; width: 400px;">
|
||||||
|
<template slot="append">查询</template>
|
||||||
|
</el-input>
|
||||||
|
<div>
|
||||||
|
<span style="margin-right: 20px;">商品状态</span>
|
||||||
|
<el-button type="text">全部(100)</el-button>
|
||||||
|
<el-button type="text">在售中(80)</el-button>
|
||||||
|
<el-button type="text">已售罄(20)</el-button>
|
||||||
|
</div>
|
||||||
|
<el-table v-loading="loading" :data="tableData" border style="width: 100%" height="800">
|
||||||
|
<el-table-column prop="sort" label="序号">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="name" label="商品名称">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="sku_name" label="规格">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="category" label="分类">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="stock" label="库存">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="limit_buy" label="限购数量">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="market_price" label="划线价">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="编码" label="编码">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="价格" label="价格">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="库存类型" label="库存类型">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="options" label="操作">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" size="small">编辑</el-button>
|
||||||
|
<el-button @click="handleClick(scope.row)" type="text" size="small">置顶</el-button>
|
||||||
|
<el-button type="text" size="small">设置限购</el-button>
|
||||||
|
<el-button type="text" size="small">设置秒杀</el-button>
|
||||||
|
<el-button type="text" size="small">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div style="float: right;">
|
||||||
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||||
|
:current-page.sync="currentPage2" :page-sizes="[20, 30, 50, 100]" :page-size="20"
|
||||||
|
layout="sizes, prev, pager, next" :total="1000">
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="团购时间">
|
||||||
|
<el-date-picker v-model="value1" type="datetimerange" range-separator="至" start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item style="float: right;">
|
||||||
|
<el-button>保存预览</el-button>
|
||||||
|
<el-button type="primary" @click="onSubmit">发布</el-button>
|
||||||
|
<el-button type="primary" @click="onSubmit">修改团购</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog title="您的商品库中已有16件商品" :visible.sync="centerDialogVisible">
|
||||||
|
<el-form ref="formInline" :model="formInline" label-width="80px">
|
||||||
|
<el-form-item label="商品分类">
|
||||||
|
<el-button type="text">全部(100)</el-button>
|
||||||
|
<el-button type="text">在售中(80)</el-button>
|
||||||
|
<el-button type="text">已售罄(20)</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商品品牌">
|
||||||
|
<el-button type="text">全部(100)</el-button>
|
||||||
|
<el-button type="text">在售中(80)</el-button>
|
||||||
|
<el-button type="text">已售罄(20)</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="搜索">
|
||||||
|
<el-input placeholder="搜索商品名称、编码" v-model="input2" style="width: 400px;">
|
||||||
|
</el-input>
|
||||||
|
<el-button type="text">查询</el-button>
|
||||||
|
<el-button type="text">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-table v-loading="loading" :data="tableData" border style="width: 100%" height="800">
|
||||||
|
<el-table-column type="selection" width="55">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="name" label="商品信息">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="desc" label="描述">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="code" label="编码">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="brand" label="品牌">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="category" label="分类">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="market_price" label="划线价">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="价格" label="价格">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="库存" label="库存">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div style="float: right;">
|
||||||
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||||
|
:current-page.sync="currentPage2" :page-sizes="[20, 30, 50, 100]" :page-size="20"
|
||||||
|
layout="sizes, prev, pager, next" :total="1000">
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<div style="float: left;">
|
||||||
|
<el-button @click="centerDialogVisible = false">全选</el-button>
|
||||||
|
<el-button @click="centerDialogVisible = false">取消全选</el-button>
|
||||||
|
</div>
|
||||||
|
<span>已选0件</span>
|
||||||
|
<el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
|
||||||
|
<el-button @click="centerDialogVisible = false">取 消</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formInline: {
|
||||||
|
region: '',
|
||||||
|
status: '',
|
||||||
|
title: '',
|
||||||
|
resource: ''
|
||||||
|
},
|
||||||
|
loading: false,
|
||||||
|
input2: '',
|
||||||
|
activeName: '',
|
||||||
|
tableData: [],
|
||||||
|
value1: '',
|
||||||
|
centerDialogVisible: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onSubmit() {
|
||||||
|
console.log('submit!');
|
||||||
|
},
|
||||||
|
handleClick() {
|
||||||
|
|
||||||
|
},
|
||||||
|
handleSizeChange() {
|
||||||
|
|
||||||
|
},
|
||||||
|
handleCurrentChange() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
71
resources/frontend/src/views/group/group.vue
Normal file
71
resources/frontend/src/views/group/group.vue
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="box-card" :body-style="{ padding: '20px 20px 0 20px' }">
|
||||||
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||||
|
<el-form-item label="店铺">
|
||||||
|
<el-select v-model="formInline.region" placeholder="店铺">
|
||||||
|
<el-option label="花里有品" value="1"></el-option>
|
||||||
|
<el-option label="花富贵儿" value="2"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="团购状态">
|
||||||
|
<el-select v-model="formInline.status" placeholder="团购状态">
|
||||||
|
<el-option label="跟团中" value="1"></el-option>
|
||||||
|
<el-option label="预览中" value="2"></el-option>
|
||||||
|
<el-option label="未开始" value="3"></el-option>
|
||||||
|
<el-option label="已结束" value="4"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="活动标题">
|
||||||
|
<el-input v-model="formInline.title" placeholder="活动标题"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit">查询</el-button>
|
||||||
|
<el-button type="primary" @click="onSubmit">新增团购</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card style="margin-top: 10px" class="box-card">
|
||||||
|
<el-table v-loading="loading" :data="tableData" border style="width: 100%">
|
||||||
|
<el-table-column prop="store" label="店铺">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="title" label="活动标题">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="status" label="团购状态">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="dateTime" label="开团时间">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="ercode" label="手机查看">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="options" label="操作">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
|
||||||
|
<el-button type="text" size="small">编辑</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formInline: {
|
||||||
|
region: '',
|
||||||
|
status: '',
|
||||||
|
title: '',
|
||||||
|
},
|
||||||
|
loading: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onSubmit() {
|
||||||
|
console.log('submit!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
5
resources/frontend/vue.config.js
vendored
5
resources/frontend/vue.config.js
vendored
@ -11,9 +11,8 @@ module.exports = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
// 配置代理
|
// 配置代理
|
||||||
"/api": {
|
"/api": {
|
||||||
// target: 'http://doc.ii090.com/mock/267/',
|
target: "http://172.17.161.186:81",
|
||||||
// target: "http://erp.staging.miaoxuan66.cn",
|
// target: "http://erp.chutang66.com",
|
||||||
target: "http://erp.chutang66.com",
|
|
||||||
changeOrigin: true, // 开启代理
|
changeOrigin: true, // 开启代理
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
// 重命名
|
// 重命名
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user