chenlianjie #16
@@ -61,6 +61,13 @@ export default {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
batchShelves(data) {
|
||||||
|
return request({
|
||||||
|
url: `/${service_name}/mallProductInfo/upOrDownShelves`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
},
|
||||||
getAllSites(data) {
|
getAllSites(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/mallProductSiteRelation/getAllSites`,
|
url: `/${service_name}/mallProductSiteRelation/getAllSites`,
|
||||||
|
|||||||
90
src/views/dashboard/admin/index.scss
Normal file
90
src/views/dashboard/admin/index.scss
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
.flex {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.column {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ac {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jc {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.oneflex {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jw {
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.js {
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
|
||||||
|
.number {
|
||||||
|
color: red;
|
||||||
|
font-size: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-card {
|
||||||
|
.product-card-item {}
|
||||||
|
}
|
||||||
|
|
||||||
|
.orderData {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.orderData-right {
|
||||||
|
margin-left: 50px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.orderData-right-item {
|
||||||
|
width: calc(50% - 20px);
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-align: center;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-bottom: #ececec solid 1px;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.orderData-left {
|
||||||
|
padding: 10px 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: solid 1px #bbbbbb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.orderStatistics-card {
|
||||||
|
.orderStatistics-card-right{
|
||||||
|
}
|
||||||
|
.orderStatistics-card-left {
|
||||||
|
flex-shrink: 0;
|
||||||
|
padding: 10px 50px;
|
||||||
|
border-right: solid 1px #ececec;
|
||||||
|
.orderStatistics-card-left-item{
|
||||||
|
.orderStatistics-card-left-item-title{
|
||||||
|
color: #bbbbbb;
|
||||||
|
}
|
||||||
|
.orderStatistics-card-left-item-number{
|
||||||
|
font-size: 25px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.box-card{
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
.card-title{
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.page{
|
||||||
|
height:calc(100vh - 144px);
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
@@ -1,20 +1,184 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-card class="box-card">
|
||||||
|
<div slot="header">
|
||||||
|
<span class="card-title">订单数据</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex">
|
||||||
|
<div class="orderData flex ac">
|
||||||
|
<div class="orderData-left flex ac">
|
||||||
|
<i style="font-size: 40px;" class="el-icon-tickets"></i>
|
||||||
|
<div>
|
||||||
|
<div>今日订单总数</div>
|
||||||
|
<div>200</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="orderData-right oneflex flex jw">
|
||||||
|
<div class="orderData-right-item">
|
||||||
|
<span>待核销订单</span>
|
||||||
|
<span>(10)</span>
|
||||||
|
</div>
|
||||||
|
<div class="orderData-right-item">
|
||||||
|
<span>已核销订单</span>
|
||||||
|
<span>(10)</span>
|
||||||
|
</div>
|
||||||
|
<div class="orderData-right-item">
|
||||||
|
<span>已完成订单</span>
|
||||||
|
<span>(10)</span>
|
||||||
|
</div>
|
||||||
|
<div class="orderData-right-item">
|
||||||
|
<span>待退款订单</span>
|
||||||
|
<span>(10)</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card></el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-card class="box-card">
|
||||||
|
<div slot="header">
|
||||||
|
<span class="card-title">商品总览</span>
|
||||||
|
</div>
|
||||||
|
<div class="product-card flex js">
|
||||||
|
<div class="product-card-item">
|
||||||
|
<div class="number">100</div>
|
||||||
|
<div>已下架</div>
|
||||||
|
</div>
|
||||||
|
<div class="product-card-item">
|
||||||
|
<div class="number">100</div>
|
||||||
|
<div>已下架</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="product-card-item">
|
||||||
|
<div class="number">100</div>
|
||||||
|
<div>已下架</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="product-card-item">
|
||||||
|
<div class="number">100</div>
|
||||||
|
<div>已下架</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2"></el-col>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-card class="box-card">
|
||||||
|
<div slot="header">
|
||||||
|
<span class="card-title">商品总览</span>
|
||||||
|
</div>
|
||||||
|
<div class="product-card flex js">
|
||||||
|
<div class="product-card-item">
|
||||||
|
<div class="number">100</div>
|
||||||
|
<div>已下架</div>
|
||||||
|
</div>
|
||||||
|
<div class="product-card-item">
|
||||||
|
<div class="number">100</div>
|
||||||
|
<div>已下架</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="product-card-item">
|
||||||
|
<div class="number">100</div>
|
||||||
|
<div>已下架</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="product-card-item">
|
||||||
|
<div class="number">100</div>
|
||||||
|
<div>已下架</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-card class="box-card">
|
||||||
|
<div slot="header">
|
||||||
|
<span class="card-title">订单统计</span>
|
||||||
|
</div>
|
||||||
|
<div class="orderStatistics-card flex">
|
||||||
|
<div class="orderStatistics-card-left flex column js">
|
||||||
|
<div class="orderStatistics-card-left-item">
|
||||||
|
<div class="orderStatistics-card-left-item-title">本月订单总数</div>
|
||||||
|
<div class="orderStatistics-card-left-item-number">10000</div>
|
||||||
|
<div class="orderStatistics-card-left-item-title">10% 同比上周</div>
|
||||||
|
</div>
|
||||||
|
<div class="orderStatistics-card-left-item">
|
||||||
|
<div class="orderStatistics-card-left-item-title">本月订单总数</div>
|
||||||
|
<div class="orderStatistics-card-left-item-number">10000</div>
|
||||||
|
<div class="orderStatistics-card-left-item-title">10% 同比上周</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="orderStatistics-card-right oneflex">
|
||||||
|
<div style="width: 100%;"> 近一周订单统计</div>
|
||||||
|
<div style="width: 100%; height:500px;margin-top:20px" id="chart"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import echarts from 'echarts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
filters: {},
|
filters: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
myChart: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.init()
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.initChart('chart')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
initChart(id='chart') {
|
||||||
|
this.myChart = echarts.init(document.getElementById(id));
|
||||||
|
this.myChart.setOption({
|
||||||
|
color: ['#4370da'],
|
||||||
|
grid: {
|
||||||
|
x: 50,
|
||||||
|
y: 25,
|
||||||
|
x2: 30,
|
||||||
|
y2: 35
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
boundaryGap: false,
|
||||||
|
data: ['07-01周六', '07-02周日', '07-03周一', '07-04周二', '07-05周三', '07-06周四', '07-07周五']
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
data: [820, 932, 901, 934, 1290, 1330, 1320],
|
||||||
|
type: 'line',
|
||||||
|
smooth: true,
|
||||||
|
areaStyle: {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
},
|
||||||
|
init() {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped lang="scss">
|
||||||
|
@import './index.scss';
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -12,11 +12,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table max-height="500" @selection-change="selectionChange" v-loading="loading" ref="table" :data="tableList"
|
<el-table max-height="500" @selection-change="selectionChange" v-loading="loading" ref="table" :data="tableList"
|
||||||
highlight-current-row empty-text="暂无数据" class="mt14">
|
:row-key="(row) => row.siteId" highlight-current-row empty-text="暂无数据" class="mt14">
|
||||||
<el-table-column type="selection" width="55">
|
<el-table-column type="selection" reserve-selection width="55">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="油站名称" prop="siteName"> </el-table-column>
|
<el-table-column label="油站名称" prop="siteName"></el-table-column>
|
||||||
<el-table-column label="渠道" prop="channel"> </el-table-column>
|
<el-table-column label="渠道" prop="channel"></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||||
:current-page="page.currentPage" :page-sizes="[10, 15, 20, 30]" :page-size="page.pageSize"
|
:current-page="page.currentPage" :page-sizes="[10, 15, 20, 30]" :page-size="page.pageSize"
|
||||||
@@ -24,9 +24,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import productApi from '@/api/product/productAttr.js';
|
import productApi from '@/api/product/productAttr.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "OilStationSelection",
|
name: 'OilStationSelection',
|
||||||
props: {
|
props: {
|
||||||
OilStationSelectionList: {
|
OilStationSelectionList: {
|
||||||
type: Array,
|
type: Array,
|
||||||
@@ -34,7 +35,7 @@ export default {
|
|||||||
},
|
},
|
||||||
selectAttrId: {
|
selectAttrId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: () => ""
|
default: () => ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -43,24 +44,24 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
tableList: [],
|
tableList: [],
|
||||||
page: {
|
page: {
|
||||||
"currentPage": 1,
|
'currentPage': 1,
|
||||||
"pageSize": 10,
|
'pageSize': 10,
|
||||||
"totalCount": 0,
|
'totalCount': 0,
|
||||||
"params": {
|
'params': {
|
||||||
"siteName": ""
|
'siteName': ''
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
OilStationSelectionList:{
|
OilStationSelectionList: {
|
||||||
handler(n,o){
|
handler(n, o) {
|
||||||
this.$refs.table.clearSelection();
|
this.$refs.table.clearSelection()
|
||||||
n.forEach(element => {
|
n.forEach(element => {
|
||||||
this.$refs.table.toggleRowSelection(element);
|
this.$refs.table.toggleRowSelection(element)
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
deep:true
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -83,27 +84,28 @@ export default {
|
|||||||
return !!value
|
return !!value
|
||||||
&& typeof value === 'object'
|
&& typeof value === 'object'
|
||||||
&& typeof value.then === 'function'
|
&& typeof value.then === 'function'
|
||||||
&& typeof value.finally === 'function';
|
&& typeof value.finally === 'function'
|
||||||
},
|
},
|
||||||
loadingFn(callback) {
|
loadingFn(callback) {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
if (this.isStrictPromise(callback)) {
|
if (this.isStrictPromise(callback)) {
|
||||||
callback.finally(() => {
|
callback.finally(() => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
})
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
getByPage() {
|
getByPage() {
|
||||||
this.loadingFn(productApi.getAllSites(this.page).then(res => {
|
this.loadingFn(productApi.getAllSites(this.page).then(res => {
|
||||||
// ({
|
if (res.code === 20000) {
|
||||||
// data: this.tableList = [],
|
this.tableList = res.data.list
|
||||||
// currentPage: this.page.currentPage,
|
this.page.totalCount = parseInt(res.data.totalCount)
|
||||||
// pageSize: this.page.pageSize,
|
|
||||||
// totalCount: this.page.totalCount
|
} else {
|
||||||
// } = res.data);
|
this.tableList = []
|
||||||
this.tableList = res.data
|
this.page.totalCount = 0
|
||||||
console.log(res)
|
}
|
||||||
}));
|
}))
|
||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
this.page.currentPage = val
|
this.page.currentPage = val
|
||||||
@@ -117,20 +119,20 @@ export default {
|
|||||||
productApi.delete(e).then(res => {
|
productApi.delete(e).then(res => {
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
this.$message.success('操作成功')
|
this.$message.success('操作成功')
|
||||||
this.handleCurrentChange();
|
this.handleCurrentChange()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
edit(row) {
|
edit(row) {
|
||||||
let data = Object.assign({}, row, {
|
let data = Object.assign({}, row, {
|
||||||
name: this.selectAttrId.split("/")[1] || "",
|
name: this.selectAttrId.split('/')[1] || '',
|
||||||
spec: [{
|
spec: [{
|
||||||
value: row.attributeName,
|
value: row.attributeName,
|
||||||
detail: row.attributeContent.split(",")
|
detail: row.attributeContent.split(',')
|
||||||
}],
|
}]
|
||||||
})
|
})
|
||||||
this.$parent.$parent.selection = [data];
|
this.$parent.$parent.selection = [data]
|
||||||
this.$parent.$parent.addAttr('typeUpdate');
|
this.$parent.$parent.addAttr('typeUpdate')
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
// this.getByPage();
|
// this.getByPage();
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="Button">
|
<div class="Button">
|
||||||
<el-button type="primary" class="mr14">添加商品</el-button>
|
<!-- <el-button type="primary" class="mr14">添加商品</el-button>-->
|
||||||
<el-button type="success" class="mr14" @click="onCopy">商品采集</el-button>
|
<!-- <el-button type="success" class="mr14" @click="onCopy">商品采集</el-button>-->
|
||||||
<!-- <el-dropdown class="bnt mr14" @command="batchSelect">
|
<!-- <el-dropdown class="bnt mr14" @command="batchSelect">
|
||||||
<el-button>批量修改<i class="el-icon-arrow-down el-icon--right"></i></el-button>
|
<el-button>批量修改<i class="el-icon-arrow-down el-icon--right"></i></el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
@@ -54,9 +54,11 @@
|
|||||||
<el-dropdown-item :command="6">活动推荐</el-dropdown-item>
|
<el-dropdown-item :command="6">活动推荐</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown> -->
|
</el-dropdown> -->
|
||||||
<el-button @click="onDismount" v-show="artFrom.type === '1'">批量下架</el-button>
|
<!-- <el-button @click="onDismount" v-show="artFrom.type === '1'">批量下架</el-button>-->
|
||||||
<el-button @click="onShelves" v-show="artFrom.type === '2'">批量上架</el-button>
|
<!-- <el-button @click="onShelves" v-show="artFrom.type === '2'">批量上架</el-button>-->
|
||||||
<el-button class="export" @click="exports">导出</el-button>
|
<!-- <el-button class="export" @click="exports">导出</el-button>-->
|
||||||
|
<el-button @click="batchShelves('1')">批量上架</el-button>
|
||||||
|
<el-button @click="batchShelves('2')">批量下架</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
ref="table"
|
ref="table"
|
||||||
@@ -526,8 +528,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getList() {},
|
|
||||||
|
|
||||||
batchSub() {},
|
batchSub() {},
|
||||||
clearBatchData(status) {},
|
clearBatchData(status) {},
|
||||||
// 批量设置商品
|
// 批量设置商品
|
||||||
@@ -588,10 +588,24 @@ export default {
|
|||||||
},
|
},
|
||||||
getExcelData(excelData) {},
|
getExcelData(excelData) {},
|
||||||
freight() {},
|
freight() {},
|
||||||
// 批量上架
|
// 批量上下架
|
||||||
onShelves() {},
|
batchShelves(productStatus) {
|
||||||
// 批量下架
|
let selected = this.$refs.table.selection
|
||||||
onDismount() {},
|
if (selected&&selected.length>0){
|
||||||
|
let selectedIds = selected.map(item=>item.id)
|
||||||
|
productApi.batchShelves({
|
||||||
|
list:selectedIds,
|
||||||
|
productStatus:productStatus
|
||||||
|
}).then(res=>{
|
||||||
|
if (res.code===20000){
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.getDataList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
this.$message.error('请选择需要操作的数据')
|
||||||
|
}
|
||||||
|
},
|
||||||
getRowKey(row) {
|
getRowKey(row) {
|
||||||
return row.id
|
return row.id
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user