Compare commits
13 Commits
b2da908d9f
...
chenlianji
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b2e320e6d | ||
|
|
c314eae594 | ||
|
|
ac333c68d7 | ||
| fc60f7cbdf | |||
|
|
bb1b3123d5 | ||
|
|
a1bd58544b | ||
| 542e85cc74 | |||
|
|
038e6f8669 | ||
| 0693c18d9b | |||
|
|
59460e9ffd | ||
| 093d954dc6 | |||
|
|
2cb5bc4342 | ||
|
|
924a4b57eb |
@@ -76,6 +76,29 @@ export default {
|
|||||||
data: orderInfo
|
data: orderInfo
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getMainDataOne() {
|
||||||
|
// 首页订单数据
|
||||||
|
return request({
|
||||||
|
url: `/${service_name}/${group_name}/getMainData1`,
|
||||||
|
method: 'post'
|
||||||
|
// data: orderInfo
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getMainDataTwo(time) {
|
||||||
|
// 首页订单统计
|
||||||
|
return request({
|
||||||
|
url: `/${service_name}/${group_name}/getMainData2`,
|
||||||
|
method: 'post',
|
||||||
|
data: time
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getProductOverview() {
|
||||||
|
// 获取商品统计信息
|
||||||
|
return request({
|
||||||
|
url: `/${service_name}/mallProductInfo/getProductOverview`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
},
|
||||||
exportExcel(page) {
|
exportExcel(page) {
|
||||||
// 导出
|
// 导出
|
||||||
return request({
|
return request({
|
||||||
@@ -85,6 +108,15 @@ export default {
|
|||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
RefundexportExcel(page) {
|
||||||
|
// 导出
|
||||||
|
return request({
|
||||||
|
url: `/${service_name}/${group_name}/getRefundOrderExport`,
|
||||||
|
method: 'post',
|
||||||
|
data: page,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
},
|
||||||
deleteById(id) {
|
deleteById(id) {
|
||||||
// 根据id删除
|
// 根据id删除
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -75,6 +75,18 @@ export default {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getChannels() {
|
||||||
|
return request({
|
||||||
|
url: `/${service_name}/mallProductSiteRelation/getAllChannels`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getCheckedSites(productId) {
|
||||||
|
return request({
|
||||||
|
url: `/${service_name}/mallProductSiteRelation/getCheckedSites/${productId}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
},
|
||||||
brandGetAll(data) {
|
brandGetAll(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/mallProductBrands/getAll`,
|
url: `/${service_name}/mallProductBrands/getAll`,
|
||||||
|
|||||||
@@ -89,10 +89,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeAvatarUpload(file) {
|
beforeAvatarUpload(file) {
|
||||||
const isLt2M = file.size / 1024 < 50
|
const isLt2M = file.size / 1024 < 500
|
||||||
|
|
||||||
if (!isLt2M) {
|
if (!isLt2M) {
|
||||||
this.$message.error('图片大小不能超过50KB! 请重新上传!')
|
this.$message.error('图片大小不能超过500KB! 请重新上传!')
|
||||||
}
|
}
|
||||||
return isLt2M
|
return isLt2M
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Cookies from 'js-cookie'
|
import Cookies from 'js-cookie'
|
||||||
|
|
||||||
const TokenKey = 'Authorization'
|
const TokenKey = 'mall_Authorization'
|
||||||
const NetWorkId = 'networkId'
|
const NetWorkId = 'networkId'
|
||||||
const UserName = 'username'
|
const UserName = 'username'
|
||||||
const PassWord = 'password'
|
const PassWord = 'password'
|
||||||
|
|||||||
@@ -1,93 +1,100 @@
|
|||||||
.flex {
|
.flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.column {
|
.column {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ac {
|
.ac {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
}
|
||||||
|
.ae {
|
||||||
|
align-items: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.jc {
|
.jc {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.oneflex {
|
.oneflex {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.jw {
|
.jw {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.js {
|
.js {
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
}
|
}
|
||||||
|
|
||||||
.number {
|
.number {
|
||||||
color: red;
|
color: red;
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-card {
|
.product-card {
|
||||||
.product-card-item {}
|
height: 100px;
|
||||||
|
text-align: center;
|
||||||
|
.product-card-item {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.orderData {
|
.orderData {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.orderData-right {
|
.orderData-right {
|
||||||
margin-left: 50px;
|
margin-left: 50px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
height: 100px;
|
||||||
.orderData-right-item {
|
.orderData-right-item {
|
||||||
width: calc(50% - 20px);
|
width: calc(50% - 20px);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
border-bottom: #ececec solid 1px;
|
border-bottom: #ececec solid 1px;
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.orderData-left {
|
.orderData-left {
|
||||||
padding: 10px 20px;
|
padding: 20px 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: solid 1px #bbbbbb;
|
border: solid 1px #ececec;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.orderStatistics-card {
|
.orderStatistics-card {
|
||||||
.orderStatistics-card-right{
|
.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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.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{
|
.box-card {
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
.card-title{
|
.card-title {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: 600;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.mt{
|
.fs {
|
||||||
margin-top: 30px;
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.mt {
|
||||||
|
margin-top: 30px;
|
||||||
}
|
}
|
||||||
// .page{
|
// .page{
|
||||||
// height:calc(100vh - 144px);
|
// height:calc(100vh - 144px);
|
||||||
// box-sizing: border-box;
|
// box-sizing: border-box;
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -8,91 +8,74 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="orderData flex ac">
|
<div class="orderData flex ac">
|
||||||
<div class="orderData-left flex ac">
|
<div class="orderData-left flex ac fs">
|
||||||
<i style="font-size: 40px;" class="el-icon-tickets"></i>
|
<i style="font-size: 40px; color:#1ABC9C" class="el-icon-tickets"></i>
|
||||||
<div>
|
<div>
|
||||||
<div>今日订单总数</div>
|
<div>今日订单总数</div>
|
||||||
<div>200</div>
|
<div>{{ orderData.total }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="orderData-right oneflex flex jw">
|
<div class="orderData-right oneflex flex jw ae">
|
||||||
<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">
|
<div class="orderData-right-item">
|
||||||
<span>待退款订单</span>
|
<span>待退款订单</span>
|
||||||
<span>(10)</span>
|
<span>({{ orderData.daiTuiKuan }})</span>
|
||||||
|
</div>
|
||||||
|
<div class="orderData-right-item">
|
||||||
|
<span>待核销订单</span>
|
||||||
|
<span>({{ orderData.daiHeXiao }})</span>
|
||||||
|
</div>
|
||||||
|
<div class="orderData-right-item mt">
|
||||||
|
<span>已核销订单</span>
|
||||||
|
<span>({{ orderData.yiHeXiao }})</span>
|
||||||
|
</div>
|
||||||
|
<div class="orderData-right-item mt">
|
||||||
|
<span>已退款订单</span>
|
||||||
|
<span>({{ orderData.yiTuiKuan }})</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card></el-col>
|
</el-card></el-col
|
||||||
|
>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row :gutter="20">
|
||||||
<el-col :span="11">
|
<el-col :span="12">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<span class="card-title">商品总览</span>
|
<span class="card-title">商品总览</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="product-card flex js">
|
<div class="product-card flex js ac">
|
||||||
<div class="product-card-item">
|
<div class="product-card-item" v-for="(item, index) in productList" :key="index">
|
||||||
<div class="number">100</div>
|
<div class="number">{{ item.currentNum }}</div>
|
||||||
<div>已下架</div>
|
<div>{{ item.productStatus }}</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>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2"></el-col>
|
<el-col :span="12">
|
||||||
<el-col :span="11">
|
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<span class="card-title">商品总览</span>
|
<span class="card-title">用户总览</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="product-card flex js">
|
<div class="product-card flex js ac">
|
||||||
<div class="product-card-item">
|
<div class="product-card-item">
|
||||||
<div class="number">100</div>
|
<div class="number">100</div>
|
||||||
<div>已下架</div>
|
<div>今日新增</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="product-card-item">
|
<div class="product-card-item">
|
||||||
<div class="number">100</div>
|
<div class="number">100</div>
|
||||||
<div>已下架</div>
|
<div>昨日新增</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="product-card-item">
|
<div class="product-card-item">
|
||||||
<div class="number">100</div>
|
<div class="number">100</div>
|
||||||
<div>已下架</div>
|
<div>本月新增</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="product-card-item">
|
<div class="product-card-item">
|
||||||
<div class="number">100</div>
|
<div class="number">100</div>
|
||||||
<div>已下架</div>
|
<div>会员总数</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -107,17 +90,33 @@
|
|||||||
<div class="orderStatistics-card-left flex column jc">
|
<div class="orderStatistics-card-left flex column jc">
|
||||||
<div class="orderStatistics-card-left-item">
|
<div class="orderStatistics-card-left-item">
|
||||||
<div class="orderStatistics-card-left-item-title">本月订单总数</div>
|
<div class="orderStatistics-card-left-item-title">本月订单总数</div>
|
||||||
<div class="orderStatistics-card-left-item-number">10000</div>
|
<div class="orderStatistics-card-left-item-number">{{ month }}</div>
|
||||||
<div class="orderStatistics-card-left-item-title">10% 同比上周</div>
|
<!-- <div class="orderStatistics-card-left-item-title">10% 同比上周</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="orderStatistics-card-left-item mt">
|
<div class="orderStatistics-card-left-item mt">
|
||||||
<div class="orderStatistics-card-left-item-title">本周订单数量</div>
|
<div class="orderStatistics-card-left-item-title">本周订单数量</div>
|
||||||
<div class="orderStatistics-card-left-item-number">10000</div>
|
<div class="orderStatistics-card-left-item-number">{{ week }}</div>
|
||||||
<div class="orderStatistics-card-left-item-title">10% 同比上周</div>
|
<!-- <div class="orderStatistics-card-left-item-title">10% 同比上周</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="orderStatistics-card-right oneflex">
|
<div class="orderStatistics-card-right oneflex">
|
||||||
<div style="width: 100%;"> 近一周订单统计</div>
|
<div class="flex ac">
|
||||||
|
<div style="width: 100%;">近一周订单统计</div>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="createTime"
|
||||||
|
type="daterange"
|
||||||
|
align="right"
|
||||||
|
unlink-panels
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
range-separator="~"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
:picker-options="pickerOptions"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
<el-button type="primary" @click="userSearchs" style="margin-left:10px">查询</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="width: 100%; height:500px;margin-top:20px" id="chart"></div>
|
<div style="width: 100%; height:500px;margin-top:20px" id="chart"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -129,51 +128,205 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
|
import orderInfoApi from '@/api/order/orderInfo.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
filters: {},
|
filters: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
myChart: null
|
myChart: null,
|
||||||
}
|
createTime: '',
|
||||||
},
|
orderData: {},
|
||||||
created() {
|
startTime: null,
|
||||||
this.init()
|
endTime: null,
|
||||||
},
|
week: null,
|
||||||
mounted() {
|
month: null,
|
||||||
this.initChart('chart')
|
option: {
|
||||||
},
|
color: ['#DBEEFC'],
|
||||||
methods: {
|
|
||||||
initChart(id='chart') {
|
|
||||||
this.myChart = echarts.init(document.getElementById(id));
|
|
||||||
this.myChart.setOption({
|
|
||||||
color: ['#4370da'],
|
|
||||||
grid: {
|
grid: {
|
||||||
x: 50,
|
x: 50,
|
||||||
y: 25,
|
y: 25,
|
||||||
x2: 30,
|
x2: 30,
|
||||||
y2: 35
|
y2: 35
|
||||||
},
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item'
|
||||||
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
boundaryGap: false,
|
boundaryGap: false
|
||||||
data: ['07-01周六', '07-02周日', '07-03周一', '07-04周二', '07-05周三', '07-06周四', '07-07周五']
|
// data: ['07-01周六', '07-02周日', '07-03周一', '07-04周二', '07-05周三', '07-06周四', '07-07周五']
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'value'
|
type: 'value'
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
data: [820, 932, 901, 934, 1290, 1330, 1320],
|
// data: [820, 932, 901, 934, 1290, 1330, 1320],
|
||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
|
itemStyle: {
|
||||||
|
color: '#49A9EE',
|
||||||
|
normal: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: '#49A9EE' // 起始颜色
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: '#DBEEFC' // 结束颜色
|
||||||
|
}
|
||||||
|
]),
|
||||||
|
lineStyle: {
|
||||||
|
width: 2 // 线条宽度
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
areaStyle: {}
|
areaStyle: {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
},
|
||||||
},
|
pickerOptions: {
|
||||||
init() {
|
shortcuts: [
|
||||||
|
// {
|
||||||
|
// text: '今天',
|
||||||
|
// onClick(picker) {
|
||||||
|
// const end = new Date()
|
||||||
|
// const start = new Date()
|
||||||
|
// picker.$emit('pick', [start, end])
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
text: '最近一周',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date()
|
||||||
|
const start = new Date()
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
||||||
|
picker.$emit('pick', [start, end])
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '最近一个月',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date()
|
||||||
|
const start = new Date()
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
||||||
|
picker.$emit('pick', [start, end])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
productList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// this.init()
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.myChart = echarts.init(document.getElementById('chart'))
|
||||||
|
var DaysAgo = this.timeBefore()
|
||||||
|
var sevenDaysAgo = this.timeBefore7()
|
||||||
|
this.createTime = [new Date(sevenDaysAgo), new Date(DaysAgo)]
|
||||||
|
|
||||||
|
this.getMainDataOne()
|
||||||
|
this.getMainDataTwo(sevenDaysAgo, DaysAgo)
|
||||||
|
this.getProductOverview()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 表格搜索
|
||||||
|
userSearchs() {
|
||||||
|
if (this.createTime !== null && this.createTime.length !== 0) {
|
||||||
|
if (this.isDate(this.createTime[0])) {
|
||||||
|
this.startTime = this.createTime[0]
|
||||||
|
this.endTime = this.createTime[1]
|
||||||
|
} else {
|
||||||
|
var time1 = this.getSimpleDate(this.createTime[0])
|
||||||
|
var time2 = this.getSimpleDate(this.createTime[1])
|
||||||
|
this.startTime = time1
|
||||||
|
this.endTime = time2
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getMainDataTwo(this.startTime, this.endTime)
|
||||||
|
} else {
|
||||||
|
this.$message.error('请选择要查询的时间段!')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 首页订单数据
|
||||||
|
async getMainDataOne() {
|
||||||
|
await orderInfoApi.getMainDataOne().then(res => {
|
||||||
|
if ((res.code = 20000)) {
|
||||||
|
this.orderData = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async getMainDataTwo(startTime, endTime) {
|
||||||
|
await orderInfoApi.getMainDataTwo({ createTimeStart: startTime, createTimeEnd: endTime }).then(res => {
|
||||||
|
if ((res.code = 20000)) {
|
||||||
|
this.week = res.data.week
|
||||||
|
this.month = res.data.month
|
||||||
|
this.option.xAxis.data = res.data.date
|
||||||
|
this.option.series[0].data = res.data.value
|
||||||
|
|
||||||
|
this.myChart.setOption(this.option)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async getProductOverview() {
|
||||||
|
await orderInfoApi.getProductOverview().then(res => {
|
||||||
|
if ((res.code = 20000)) {
|
||||||
|
this.productList = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
timeBefore(date) {
|
||||||
|
if (!date) {
|
||||||
|
date = new Date()
|
||||||
|
}
|
||||||
|
var y = date.getFullYear()
|
||||||
|
var m = date.getMonth() + 1
|
||||||
|
var d = date.getDate()
|
||||||
|
if (d < 0) {
|
||||||
|
m = date.getMonth()
|
||||||
|
var d1 = new Date(y, m, 0)
|
||||||
|
var d2 = d1.getDate()
|
||||||
|
return y + '-' + (m < 10 ? '0' + m : m) + '-' + (d2 + d)
|
||||||
|
} else {
|
||||||
|
return y + '-' + (m < 10 ? '0' + m : m) + '-' + (d < 10 ? '0' + d : d)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
timeBefore7(date) {
|
||||||
|
if (!date) {
|
||||||
|
date = new Date()
|
||||||
|
}
|
||||||
|
var y = date.getFullYear()
|
||||||
|
var m = date.getMonth() + 1
|
||||||
|
var d = date.getDate() - 7
|
||||||
|
if (d < 0) {
|
||||||
|
m = date.getMonth()
|
||||||
|
var d1 = new Date(y, m, 0)
|
||||||
|
var d2 = d1.getDate()
|
||||||
|
return y + '-' + (m < 10 ? '0' + m : m) + '-' + (d2 + d)
|
||||||
|
} else {
|
||||||
|
return y + '-' + (m < 10 ? '0' + m : m) + '-' + (d < 10 ? '0' + d : d)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isDate(dateStr) {
|
||||||
|
var pattern = /^\d{4}-\d{2}-\d{2}$/
|
||||||
|
return pattern.test(dateStr)
|
||||||
|
},
|
||||||
|
getSimpleDate(date) {
|
||||||
|
var y = date.getFullYear()
|
||||||
|
var m = date.getMonth() + 1
|
||||||
|
m = m < 10 ? '0' + m : m
|
||||||
|
var d = date.getDate()
|
||||||
|
d = d < 10 ? '0' + d : d
|
||||||
|
// var h = date.getHours()
|
||||||
|
// var minute = date.getMinutes()
|
||||||
|
// minute = minute < 10 ? '0' + minute : minute
|
||||||
|
// var s = date.getSeconds()
|
||||||
|
// s = s < 10 ? '0' + s : s
|
||||||
|
return y + '-' + m + '-' + d
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
<el-col>
|
<el-col>
|
||||||
<el-form-item label="广告图片" prop="positionImage">
|
<el-form-item label="广告图片" prop="positionImage">
|
||||||
<div class="upLoadPicBox">
|
<div class="upLoadPicBox">
|
||||||
<upload :photo="advertisement.positionImage" @success="uploadSuccess" tip="只能上传jpg/png格式文件,文件不能超过50kb"></upload>
|
<upload :photo="advertisement.positionImage" @success="uploadSuccess" tip="只能上传jpg/png格式文件"></upload>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div style="background: #f3f3f3;height:60px">
|
<div style="background: #f3f3f3;height:60px">
|
||||||
<span style="line-height:60px;margin:0px 30px;color:red; font-size:16px"> 当前订单状态:{{ detailData.orderStatus | orderStatus }}</span>
|
<span style="line-height:60px;margin:0px 30px;color:red; font-size:16px"> 当前订单状态:{{ detailData.orderStatus | orderStatus }}</span>
|
||||||
</div>
|
</div>
|
||||||
<el-descriptions title="基本信息" class="text" direction="vertical" :column="6" border>
|
<el-descriptions title="基本信息" class="orderText" direction="vertical" :column="6" border>
|
||||||
<el-descriptions-item label="订单编号">{{ detailData.orderCode }}</el-descriptions-item>
|
<el-descriptions-item label="订单编号">{{ detailData.orderCode }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="用户账号">{{ detailData.customerPhone }}</el-descriptions-item>
|
<el-descriptions-item label="用户账号">{{ detailData.customerPhone }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="支付积分">{{ detailData.integral }}</el-descriptions-item>
|
<el-descriptions-item label="支付积分">{{ detailData.integral }}</el-descriptions-item>
|
||||||
@@ -13,13 +13,13 @@
|
|||||||
<el-descriptions-item label="提货码">{{ detailData.takeCode }}</el-descriptions-item>
|
<el-descriptions-item label="提货码">{{ detailData.takeCode }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
<el-descriptions title="收货人信息" class="text" direction="vertical" :column="3" border>
|
<el-descriptions title="收货人信息" class="orderText" direction="vertical" :column="3" border>
|
||||||
<el-descriptions-item label="收货人">{{ detailData.customerName }}</el-descriptions-item>
|
<el-descriptions-item label="收货人">{{ detailData.customerName }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="手机号码">{{ detailData.customerPhone }}</el-descriptions-item>
|
<el-descriptions-item label="手机号码">{{ detailData.customerPhone }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="订单备注">{{ detailData.remark || '暂无' }}</el-descriptions-item>
|
<el-descriptions-item label="订单备注">{{ detailData.remark || '暂无' }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
<div class="text">商品信息</div>
|
<div class="orderText">商品信息</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="detailData.mallOrderInfoDetails"
|
:data="detailData.mallOrderInfoDetails"
|
||||||
class="ivu-mt mt14"
|
class="ivu-mt mt14"
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
<el-table-column label="小计" min-width="120" align="center" prop="allMarketPrice"> </el-table-column>
|
<el-table-column label="小计" min-width="120" align="center" prop="allMarketPrice"> </el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="text">操作信息</div>
|
<div class="orderText">操作信息</div>
|
||||||
<el-table :data="detailData.mallOrderInfoRecords" class="ivu-mt mt14" v-loading="loading" border highlight-current-row empty-text="暂无数据">
|
<el-table :data="detailData.mallOrderInfoRecords" class="ivu-mt mt14" v-loading="loading" border highlight-current-row empty-text="暂无数据">
|
||||||
<el-table-column label="操作者" min-width="120" align="center">
|
<el-table-column label="操作者" min-width="120" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -291,7 +291,7 @@ export default {
|
|||||||
.label_width {
|
.label_width {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
.text {
|
.orderText {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ export default {
|
|||||||
const searchParam = { ...this.page }
|
const searchParam = { ...this.page }
|
||||||
searchParam.pageSize = endIndex
|
searchParam.pageSize = endIndex
|
||||||
searchParam.currentPage = this.output.startPage
|
searchParam.currentPage = this.output.startPage
|
||||||
orderInfoApi.getRefundOrder(searchParam).then(res => {
|
orderInfoApi.RefundexportExcel(searchParam).then(res => {
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
// 创建Blob对象,设置文件类型
|
// 创建Blob对象,设置文件类型
|
||||||
const blob = new Blob([res], { type: 'application/vnd.ns-excel' }) // MIME类型
|
const blob = new Blob([res], { type: 'application/vnd.ns-excel' }) // MIME类型
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="article-manager">
|
<div class="article-manager">
|
||||||
<el-card :bordered="false" shadow="never" class="ivu-mt mt16 mb30" :body-style="{ padding: '0 20px 20px' }">
|
<el-card :bordered="false" shadow="never" class="ivu-mt mt16 mb30" :body-style="{ padding: '0 20px 20px' }">
|
||||||
<div class="text">退货商品</div>
|
<div class="orderText">退货商品</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="detailData.mallOrderInfoDetails"
|
:data="detailData.mallOrderInfoDetails"
|
||||||
class="ivu-mt mt14"
|
class="ivu-mt mt14"
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<el-table-column label="小计" min-width="120" align="center" prop="allMarketPrice"> </el-table-column>
|
<el-table-column label="小计" min-width="120" align="center" prop="allMarketPrice"> </el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<el-descriptions title="基本信息" class="text" :column="1" border>
|
<el-descriptions title="基本信息" class="orderText" :column="1" border>
|
||||||
<el-descriptions-item label="订单id">{{ detailData.id }}</el-descriptions-item>
|
<el-descriptions-item label="订单id">{{ detailData.id }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="申请状态">{{ detailData.refundStatus | refundStatus }}</el-descriptions-item>
|
<el-descriptions-item label="申请状态">{{ detailData.refundStatus | refundStatus }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="订单编号">{{ detailData.orderCode }} </el-descriptions-item>
|
<el-descriptions-item label="订单编号">{{ detailData.orderCode }} </el-descriptions-item>
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
<el-descriptions-item label="退款原因">{{ detailData.refundMark }}</el-descriptions-item>
|
<el-descriptions-item label="退款原因">{{ detailData.refundMark }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
<el-descriptions title="" class="text" :column="1" border>
|
<el-descriptions title="" class="orderText" :column="1" border>
|
||||||
<el-descriptions-item label="处理人员">{{ OrderInfoRecord.customerName }}</el-descriptions-item>
|
<el-descriptions-item label="处理人员">{{ OrderInfoRecord.customerName }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="处理时间">{{ OrderInfoRecord.createTime }}</el-descriptions-item>
|
<el-descriptions-item label="处理时间">{{ OrderInfoRecord.createTime }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="操作备注">{{ OrderInfoRecord.remark }} </el-descriptions-item>
|
<el-descriptions-item label="操作备注">{{ OrderInfoRecord.remark }} </el-descriptions-item>
|
||||||
@@ -275,7 +275,7 @@ export default {
|
|||||||
.label_width {
|
.label_width {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
.text {
|
.orderText {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|||||||
@@ -1,30 +1,94 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="station-select">
|
||||||
<el-form ref="artFrom" :model="page" label-width="80px" label-position="right" class="tabform"
|
<el-form ref="artFrom" :model="page" label-width="80px" label-position="right" class="tabform"
|
||||||
@submit.native.prevent inline>
|
@submit.native.prevent inline>
|
||||||
<el-form-item label="输入搜索">
|
<el-form-item label="输入搜索">
|
||||||
<el-input clearable v-model="page.params.siteName" placeholder="请输入油站名称"
|
<el-input clearable v-model="page.params.siteName" placeholder="请输入油站名称"
|
||||||
class="form_content_width"></el-input>
|
class="form_content_width"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="油站渠道">
|
||||||
|
<el-select v-model="page.params.channel" clearable style="width:100%">
|
||||||
|
<el-option
|
||||||
|
v-for="(item,index) in channelList"
|
||||||
|
:key="index"
|
||||||
|
:label="item"
|
||||||
|
:value="item"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="省市区">
|
||||||
|
<el-cascader
|
||||||
|
v-model="page.params.addrCodes"
|
||||||
|
placeholder="请选择省市区"
|
||||||
|
style="width: 100%"
|
||||||
|
:options="areaTree"
|
||||||
|
:props="{checkStrictly: true,value:'id', label:'areaName', children:'childList'}"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="油站品牌">
|
||||||
|
<el-select v-model="page.params.siteBrand" clearable style="width:100%">
|
||||||
|
<el-option label="中国石油" :value="1" />
|
||||||
|
<el-option label="中国石化" :value="2" />
|
||||||
|
<el-option label="壳牌" :value="3" />
|
||||||
|
<el-option label="民营" :value="4" />
|
||||||
|
<el-option label="中海油" :value="5" />
|
||||||
|
<el-option label="京博" :value="6" />
|
||||||
|
<el-option label="中化石油" :value="7" />
|
||||||
|
<el-option label="山东高速" :value="9" />
|
||||||
|
<el-option label="其他" :value="8" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="油站账户" prop="siteChannelAccountId">
|
||||||
|
<el-select v-model="page.params.siteChannelAccountId" remote filterable clearable placeholder="请选择油站账户" style="width: 100%">
|
||||||
|
<el-option v-for="item in restaurants" :key="item.id" :label="item.value + '-' + item.id" :value="item.id">
|
||||||
|
{{ item.value }}-<span style="color: #bbbbbb">{{ item.id }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="userSearchs">查询</el-button>
|
<el-button type="primary" @click="userSearchs">查询</el-button>
|
||||||
<el-button type="primary" @click="submit">确定选择</el-button>
|
|
||||||
</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-row :gutter="24" class="table-area">
|
||||||
:row-key="(row) => row.siteId" highlight-current-row empty-text="暂无数据" class="mt14">
|
<el-col :span="11">
|
||||||
<el-table-column type="selection" reserve-selection width="55">
|
<h3>待选择</h3>
|
||||||
</el-table-column>
|
<el-table :height="tableHeight" v-loading="loading" ref="table" :data="tableList"
|
||||||
<el-table-column label="油站名称" prop="siteName"></el-table-column>
|
:row-key="(row) => row.siteId" highlight-current-row empty-text="暂无数据" class="mt14">
|
||||||
<el-table-column label="渠道" prop="channel"></el-table-column>
|
<el-table-column type="selection" reserve-selection width="55">
|
||||||
</el-table>
|
</el-table-column>
|
||||||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
<el-table-column label="油站名称" prop="siteName" width="200"></el-table-column>
|
||||||
:current-page="page.currentPage" :page-sizes="[10, 15, 20, 30]" :page-size="page.pageSize"
|
<el-table-column align="center" label="渠道" prop="channel" width="120"></el-table-column>
|
||||||
layout="total, sizes, prev, pager, next, jumper" :total="page.totalCount" />
|
<el-table-column header-align="center" label="地址" prop="address"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||||
|
:current-page="page.currentPage" :page-sizes="[10, 15, 20, 30]" :page-size="page.pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper" :total="page.totalCount" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2" class="transfer-button">
|
||||||
|
<el-button type="primary" @click="delSite" class="el-icon-back"></el-button>
|
||||||
|
<el-button type="primary" @click="addSite" class="el-icon-right"></el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11">
|
||||||
|
<h3>已选择</h3>
|
||||||
|
<el-table :height="tableHeight" v-loading="checkedLoading" ref="checkedTable" :data="checkedSites"
|
||||||
|
:row-key="(row) => row.siteId" highlight-current-row empty-text="暂无数据" class="mt14">
|
||||||
|
<el-table-column type="selection" reserve-selection width="55">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="油站名称" prop="siteName" width="200"></el-table-column>
|
||||||
|
<el-table-column align="center" label="渠道" prop="channel" width="120"></el-table-column>
|
||||||
|
<el-table-column header-align="center" label="地址" prop="address"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-button type="primary" @click="submit" class="fr">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import productApi from '@/api/product/productAttr.js'
|
import productApi from '@/api/product/productAttr.js'
|
||||||
|
import dictAreaApi from '@/api/base/areaCode.js'
|
||||||
|
import financeApi from '@/api/user/oilTerminalMarket.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'OilStationSelection',
|
name: 'OilStationSelection',
|
||||||
@@ -36,50 +100,87 @@ export default {
|
|||||||
selectAttrId: {
|
selectAttrId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: () => ''
|
default: () => ''
|
||||||
}
|
},
|
||||||
|
productId: {
|
||||||
|
type: String,
|
||||||
|
default: () => null
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectionList: [],
|
tableHeight: document.documentElement.clientHeight - 550,
|
||||||
|
// selectionList: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
|
checkedLoading: false,
|
||||||
tableList: [],
|
tableList: [],
|
||||||
|
areaTree: [],
|
||||||
|
restaurants: [],
|
||||||
page: {
|
page: {
|
||||||
'currentPage': 1,
|
'currentPage': 1,
|
||||||
'pageSize': 10,
|
'pageSize': 10,
|
||||||
'totalCount': 0,
|
'totalCount': 0,
|
||||||
'params': {
|
'params': {
|
||||||
'siteName': ''
|
addrCodes:[]
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
OilStationSelectionList: {
|
|
||||||
handler(n, o) {
|
|
||||||
this.$refs.table.clearSelection()
|
|
||||||
n.forEach(element => {
|
|
||||||
this.$refs.table.toggleRowSelection(element)
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
deep: true
|
channelList:[],
|
||||||
|
checkedSites:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// watch: {
|
||||||
|
// OilStationSelectionList: {
|
||||||
|
// handler(n, o) {
|
||||||
|
// this.$refs.table.clearSelection()
|
||||||
|
// n.forEach(element => {
|
||||||
|
// this.$refs.table.toggleRowSelection(element)
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
// deep: true
|
||||||
|
// }
|
||||||
|
// },
|
||||||
created() {
|
created() {
|
||||||
this.init()
|
this.init()
|
||||||
|
this.getAreaData()
|
||||||
|
this.getChannlList()
|
||||||
|
this.getAccountNames()
|
||||||
|
this.getCheckedSites()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit() {
|
submit() {
|
||||||
this.$emit('submit', this.getSelectionList())
|
this.$emit('submit', this.getSelectionList())
|
||||||
},
|
},
|
||||||
getSelectionList() {
|
getSelectionList() {
|
||||||
return this.selectionList
|
return this.checkedSites
|
||||||
},
|
|
||||||
selectionChange(e) {
|
|
||||||
this.selectionList = e
|
|
||||||
},
|
},
|
||||||
userSearchs() {
|
userSearchs() {
|
||||||
this.getByPage()
|
this.getByPage()
|
||||||
},
|
},
|
||||||
|
addSite(){
|
||||||
|
console.log(this.$refs.table.selection)
|
||||||
|
let arr = [...this.$refs.table.selection]
|
||||||
|
let arrSiteName = []
|
||||||
|
arr.forEach(v=>{
|
||||||
|
if (this.checkedSites.some(f=>f.siteId===v.siteId)){
|
||||||
|
arrSiteName.unshift(v.siteName)
|
||||||
|
}else {
|
||||||
|
this.checkedSites.push(v)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (arrSiteName&&arrSiteName.length>0){
|
||||||
|
this.$message.warning('部分站点出现重复,已自动为您过滤:【'+arrSiteName.join('、')+'】')
|
||||||
|
}
|
||||||
|
this.$refs.table.clearSelection()
|
||||||
|
},
|
||||||
|
delSite(){
|
||||||
|
console.log(this.$refs.checkedTable.selection)
|
||||||
|
// 获取当前选中的行
|
||||||
|
const selectedRows = this.$refs.checkedTable.selection;
|
||||||
|
// 使用filter方法创建一个新数组,不包含已删除的元素
|
||||||
|
this.checkedSites = this.checkedSites.filter(site => {
|
||||||
|
return !selectedRows.some(row => row.siteId === site.siteId);
|
||||||
|
});
|
||||||
|
this.$refs.checkedTable.clearSelection()
|
||||||
|
},
|
||||||
isStrictPromise(value) {
|
isStrictPromise(value) {
|
||||||
return !!value
|
return !!value
|
||||||
&& typeof value === 'object'
|
&& typeof value === 'object'
|
||||||
@@ -95,7 +196,30 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
getAreaData(){
|
||||||
|
dictAreaApi.getTree().then(res => {
|
||||||
|
this.areaTree = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
getByPage() {
|
getByPage() {
|
||||||
|
if (this.page.params.addrCodes&&this.page.params.addrCodes.length>0){
|
||||||
|
this.page.params.provinceCode = this.page.params.addrCodes[0]
|
||||||
|
if (this.page.params.addrCodes.length>1){
|
||||||
|
this.page.params.areaCode = this.page.params.addrCodes[1]
|
||||||
|
if (this.page.params.addrCodes.length>2){
|
||||||
|
this.page.params.cityCode = this.page.params.addrCodes[2]
|
||||||
|
}else {
|
||||||
|
this.page.params.cityCode = null
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
this.page.params.areaCode = null
|
||||||
|
this.page.params.cityCode = null
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
this.page.params.provinceCode = null
|
||||||
|
this.page.params.areaCode = null
|
||||||
|
this.page.params.cityCode = null
|
||||||
|
}
|
||||||
this.loadingFn(productApi.getAllSites(this.page).then(res => {
|
this.loadingFn(productApi.getAllSites(this.page).then(res => {
|
||||||
if (res.code === 20000) {
|
if (res.code === 20000) {
|
||||||
this.tableList = res.data.list
|
this.tableList = res.data.list
|
||||||
@@ -115,6 +239,15 @@ export default {
|
|||||||
this.page.pageSize = val
|
this.page.pageSize = val
|
||||||
this.getByPage()
|
this.getByPage()
|
||||||
},
|
},
|
||||||
|
// 获取账户名称键值对
|
||||||
|
getAccountNames() {
|
||||||
|
financeApi.getChannelAccountMaps().then(res => {
|
||||||
|
if (res.code === 20000) {
|
||||||
|
const arr = [...res.data]
|
||||||
|
this.restaurants = arr.filter(f => f.accountState === '1')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
del(e) {
|
del(e) {
|
||||||
productApi.delete(e).then(res => {
|
productApi.delete(e).then(res => {
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
@@ -123,6 +256,27 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getChannlList(){
|
||||||
|
productApi.getChannels().then(res=>{
|
||||||
|
if (res.code === 20000) {
|
||||||
|
this.channelList = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getCheckedSites(){
|
||||||
|
if (this.productId){
|
||||||
|
this.checkedLoading = true
|
||||||
|
productApi.getCheckedSites(this.productId).then(res=>{
|
||||||
|
if (res.code === 20000) {
|
||||||
|
let checkedData = res.data
|
||||||
|
this.checkedSites = checkedData.filter(f => {
|
||||||
|
return this.OilStationSelectionList.find(i => i.siteId === f.siteId);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.checkedLoading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
edit(row) {
|
edit(row) {
|
||||||
let data = Object.assign({}, row, {
|
let data = Object.assign({}, row, {
|
||||||
name: this.selectAttrId.split('/')[1] || '',
|
name: this.selectAttrId.split('/')[1] || '',
|
||||||
@@ -148,4 +302,18 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style></style>
|
<style lang="less" scoped>
|
||||||
|
.station-select{
|
||||||
|
height: calc(100vh - 300px);
|
||||||
|
.table-area{
|
||||||
|
.transfer-button{
|
||||||
|
display: grid;
|
||||||
|
align-items: center;
|
||||||
|
grid-template-columns: auto auto;
|
||||||
|
button{
|
||||||
|
width: 50px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="商品分类:" prop="cate_id">
|
<el-form-item label="商品分类:" prop="cate_id">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
class="content_width"
|
class="content_width"
|
||||||
v-model="formValidate.cate_id"
|
v-model="formValidate.cate_id"
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
<el-form-item label="商品名称:" prop="store_name">
|
<el-form-item label="商品名称:" prop="store_name">
|
||||||
<el-input class="content_width" v-model.trim="formValidate.store_name" placeholder="请输入商品名称" />
|
<el-input class="content_width" v-model.trim="formValidate.store_name" placeholder="请输入商品名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="单位:" prop="unit_name">
|
<el-form-item label="单位:" prop="unit_name">
|
||||||
<el-input class="content_width" v-model="formValidate.unit_name" placeholder="请输入单位" />
|
<el-input class="content_width" v-model="formValidate.unit_name" placeholder="请输入单位" />
|
||||||
@@ -1166,7 +1166,7 @@
|
|||||||
<div
|
<div
|
||||||
class="color-item"
|
class="color-item"
|
||||||
:class="activity[color]"
|
:class="activity[color]"
|
||||||
v-for="color in formValidate.activity"
|
v-for="color in formValidate.activity"
|
||||||
:key="color"
|
:key="color"
|
||||||
>
|
>
|
||||||
{{ color }}
|
{{ color }}
|
||||||
@@ -3052,7 +3052,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.box-video-style {
|
.box-video-style {
|
||||||
width: 375px;
|
width: 375px;
|
||||||
height: 211px;
|
height: 211px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: #707070;
|
background-color: #707070;
|
||||||
@@ -3276,7 +3276,7 @@ export default {
|
|||||||
.ifam {
|
.ifam {
|
||||||
width: 344px;
|
width: 344px;
|
||||||
height: 644px;
|
height: 644px;
|
||||||
|
|
||||||
background-size: 344px 644px;
|
background-size: 344px 644px;
|
||||||
padding: 40px 20px;
|
padding: 40px 20px;
|
||||||
padding-top: 50px;
|
padding-top: 50px;
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col v-bind="grid2">
|
<el-col v-bind="grid2">
|
||||||
<el-form-item label="自提油站" prop="siteIds">
|
<el-form-item label="自提油站" prop="siteIds">
|
||||||
<el-tag
|
<el-tag
|
||||||
style="margin-left: 10px;"
|
style="margin-left: 10px;"
|
||||||
:key="tagIndex"
|
:key="tagIndex"
|
||||||
v-for="(tag, tagIndex) in OilStationSelectionList"
|
v-for="(tag, tagIndex) in OilStationSelectionList"
|
||||||
@@ -216,6 +216,7 @@
|
|||||||
:disabled="isDisabled"
|
:disabled="isDisabled"
|
||||||
maxlength="9"
|
maxlength="9"
|
||||||
min="0.01"
|
min="0.01"
|
||||||
|
required
|
||||||
v-model="scope.row[item.value]"
|
v-model="scope.row[item.value]"
|
||||||
class="priceBox"
|
class="priceBox"
|
||||||
@blur="keyupEvent(iii, scope.row[item.value], scope.$index, 3)"
|
@blur="keyupEvent(iii, scope.row[item.value], scope.$index, 3)"
|
||||||
@@ -326,8 +327,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<CreatTemplates ref="addTemplates" @getList="getShippingList" />
|
<CreatTemplates ref="addTemplates" @getList="getShippingList" />
|
||||||
<el-dialog title="选择油站" :visible.sync="isOilStationSelection">
|
<el-dialog width="80%" title="选择油站" :visible.sync="isOilStationSelection">
|
||||||
<OilStationSelection :OilStationSelectionList="OilStationSelectionList" @submit="oilStationSelectionSubmit"> </OilStationSelection>
|
<OilStationSelection :product-id="this.$route.query.id" ref="selectSites" :OilStationSelectionList="OilStationSelectionList" @submit="oilStationSelectionSubmit"> </OilStationSelection>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -575,7 +576,7 @@ export default {
|
|||||||
this.$destroy();
|
this.$destroy();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async chenkId() {
|
async chenkId() {
|
||||||
if (this.$route.query && this.$route.query.id) {
|
if (this.$route.query && this.$route.query.id) {
|
||||||
await this.getproductInfo(this.$route.query.id)
|
await this.getproductInfo(this.$route.query.id)
|
||||||
}
|
}
|
||||||
@@ -619,17 +620,17 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
}).filter(item => item);
|
}).filter(item => item);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.ManyAttrValue.forEach((item, index) => {
|
this.ManyAttrValue.forEach((item, index) => {
|
||||||
let data = this.formValidate.stockList.find(i => i.attributeJson == JSON.stringify(item.data));
|
let data = this.formValidate.stockList.find(i => i.attributeJson == JSON.stringify(item.data));
|
||||||
if (data) {
|
if (data) {
|
||||||
Object.assign(item, data,{delect:false})
|
Object.assign(item, data,{delect:false})
|
||||||
}else{
|
}else{
|
||||||
Object.assign(item, data,{delect:true})
|
Object.assign(item, data,{delect:true})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.ManyAttrValue = this.ManyAttrValue.filter(item=>!item.delect)
|
this.ManyAttrValue = this.ManyAttrValue.filter(item=>!item.delect)
|
||||||
}, 1000)
|
}, 1000)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -645,6 +646,9 @@ export default {
|
|||||||
},
|
},
|
||||||
delectOilStationSelectionList(e, index) {
|
delectOilStationSelectionList(e, index) {
|
||||||
this.OilStationSelectionList.splice(index, 1)
|
this.OilStationSelectionList.splice(index, 1)
|
||||||
|
if (this.$refs.selectSites&&this.$refs.selectSites.checkedSites){
|
||||||
|
this.$refs.selectSites.checkedSites = this.$refs.selectSites.checkedSites.filter(site => e.siteId !== site.siteId);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
oilStationSelectionSubmit(e) {
|
oilStationSelectionSubmit(e) {
|
||||||
this.OilStationSelectionList = e
|
this.OilStationSelectionList = e
|
||||||
@@ -1181,6 +1185,10 @@ export default {
|
|||||||
},
|
},
|
||||||
handleSubmitNest(name) {
|
handleSubmitNest(name) {
|
||||||
console.log(this.formValidate,"handleSubmitNest")
|
console.log(this.formValidate,"handleSubmitNest")
|
||||||
|
if (this.formValidate.attr<1){
|
||||||
|
this.$message.error('规格属性不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$refs[name].validate(valid => {
|
this.$refs[name].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.currentTab++ > 2) this.currentTab = 0
|
if (this.currentTab++ > 2) this.currentTab = 0
|
||||||
@@ -1235,7 +1243,7 @@ export default {
|
|||||||
skuNum,
|
skuNum,
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.formValidate[isRecommendOrNewMark] = '1'
|
this.formValidate[isRecommendOrNewMark] = '1'
|
||||||
loadingFn.call(
|
loadingFn.call(
|
||||||
this,
|
this,
|
||||||
@@ -1253,7 +1261,7 @@ export default {
|
|||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
this.$message.success('操作成功')
|
this.$message.success('操作成功')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$router.push({ path: 'productList' })
|
this.$router.push({ path: 'productList', query: { refresh: true }})
|
||||||
// this.$destroy()
|
// this.$destroy()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ module.exports = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
// target: `cls`,
|
// target: `cls`,
|
||||||
// target: `http://192.168.0.6:38080`,
|
target: `http://192.168.0.254:38080`,
|
||||||
target: `http://192.168.0.24:38080`,
|
// target: `http://192.168.0.24:38080`,
|
||||||
// target: `http://192.168.1.83:38080`,
|
// target: `http://192.168.1.83:38080`,
|
||||||
// target: 'http://222.132.26.119:8081',
|
// target: 'http://222.132.26.119:8081',
|
||||||
// target: `https://www.xingoil.com/adminapi`,
|
// target: `https://www.xingoil.com/adminapi`,
|
||||||
|
|||||||
Reference in New Issue
Block a user