Compare commits
12 Commits
hzl
...
908eb71b48
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
908eb71b48 | ||
|
|
9492db65e9 | ||
|
|
fb74b5bb1d | ||
| 338cbe6990 | |||
|
|
2b2e320e6d | ||
| 8e3d07d747 | |||
|
|
c314eae594 | ||
|
|
ac333c68d7 | ||
| fc60f7cbdf | |||
|
|
bb1b3123d5 | ||
|
|
a1bd58544b | ||
| 542e85cc74 |
@@ -13,7 +13,7 @@ VUE_APP_DOMAIN = uat.xingoil.com/ws
|
|||||||
# uat.xingoil.com/ws
|
# uat.xingoil.com/ws
|
||||||
|
|
||||||
# 开发环境,不会进行加密,会打印出数据1
|
# 开发环境,不会进行加密,会打印出数据1
|
||||||
VUE_APP_ENV = 'development'
|
VUE_APP_ENV = 'production'
|
||||||
#production
|
#production
|
||||||
|
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|||||||
@@ -12,3 +12,4 @@ VUE_APP_UPLOAD_PRIVATE_URL = '/adminapi/oil-dict/imageHandler/uploadProtectedImg
|
|||||||
VUE_APP_ENV = 'production'
|
VUE_APP_ENV = 'production'
|
||||||
|
|
||||||
VUE_APP_DOMAIN = www.xingoil.com/ws
|
VUE_APP_DOMAIN = www.xingoil.com/ws
|
||||||
|
|
||||||
@@ -12,7 +12,9 @@
|
|||||||
"test:ci": "npm run lint && npm run test:unit",
|
"test:ci": "npm run lint && npm run test:unit",
|
||||||
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
|
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
|
||||||
"analyzer": "cross-env use_analyzer=true npm run dev",
|
"analyzer": "cross-env use_analyzer=true npm run dev",
|
||||||
"new": "plop"
|
"new": "plop",
|
||||||
|
"dev2": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service serve",
|
||||||
|
"build:prod2": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service build"
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
|
|||||||
@@ -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({
|
||||||
|
|||||||
@@ -89,12 +89,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeAvatarUpload(file) {
|
beforeAvatarUpload(file) {
|
||||||
const isLt2M = file.size / 1024 < 50
|
console.log(file)
|
||||||
|
const isLt2M = file.size / 1024 > 5 * 1024
|
||||||
|
|
||||||
if (!isLt2M) {
|
if (isLt2M) {
|
||||||
this.$message.error('图片大小不能超过50KB! 请重新上传!')
|
this.$message.error('图片大小不能超过5M! 请重新上传!')
|
||||||
}
|
}
|
||||||
return isLt2M
|
return !isLt2M
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'babel-polyfill'
|
import 'babel-polyfill'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
@@ -30,17 +29,17 @@ import '@/styles/index.scss'
|
|||||||
import './icons' // icon
|
import './icons' // icon
|
||||||
import './permission' // permission control
|
import './permission' // permission control
|
||||||
import { getToken, setToken, removeToken } from '@/utils/auth.js'
|
import { getToken, setToken, removeToken } from '@/utils/auth.js'
|
||||||
import pagesHeader from '@/components/pagesHeader';
|
import pagesHeader from '@/components/pagesHeader'
|
||||||
|
|
||||||
import SlideVerify from 'vue-monoplasty-slide-verify'
|
import SlideVerify from 'vue-monoplasty-slide-verify'
|
||||||
import '@/theme/index.scss';
|
import '@/theme/index.scss'
|
||||||
|
|
||||||
Vue.use(SlideVerify)
|
Vue.use(SlideVerify)
|
||||||
Vue.use(permission)
|
Vue.use(permission)
|
||||||
Vue.use(dragDialog)
|
Vue.use(dragDialog)
|
||||||
Vue.use(dragDrawer)
|
Vue.use(dragDrawer)
|
||||||
Vue.use(GlobalComponents)
|
Vue.use(GlobalComponents)
|
||||||
Vue.component('pagesHeader', pagesHeader);
|
Vue.component('pagesHeader', pagesHeader)
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
if (process.env.NODE_ENV === 'production') {
|
||||||
// 切换环境时执行代码
|
// 切换环境时执行代码
|
||||||
@@ -57,6 +56,7 @@ Object.keys(filters).forEach(key => {
|
|||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
Vue.prototype.$utils = utils
|
Vue.prototype.$utils = utils
|
||||||
|
Vue.prototype.$bus = new Vue()
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
|
|||||||
@@ -212,7 +212,15 @@ export function param2Obj(url) {
|
|||||||
if (!search) {
|
if (!search) {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
return JSON.parse('{"' + decodeURIComponent(search).replace(/"/g, '\\"').replace(/&/g, '","').replace(/=/g, '":"').replace(/\+/g, ' ') + '"}')
|
return JSON.parse(
|
||||||
|
'{"' +
|
||||||
|
decodeURIComponent(search)
|
||||||
|
.replace(/"/g, '\\"')
|
||||||
|
.replace(/&/g, '","')
|
||||||
|
.replace(/=/g, '":"')
|
||||||
|
.replace(/\+/g, ' ') +
|
||||||
|
'"}'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -660,7 +668,7 @@ export const exportDefault = 'export default '
|
|||||||
// 类型判断
|
// 类型判断
|
||||||
export function typeJudgment(object) {
|
export function typeJudgment(object) {
|
||||||
try {
|
try {
|
||||||
let res = {}.__proto__.toString.call(object);
|
let res = {}.__proto__.toString.call(object)
|
||||||
// let type = /(?<= ).+(?=\])/.exec(res);
|
// let type = /(?<= ).+(?=\])/.exec(res);
|
||||||
let type = res.replace(/[\[\]]/g, '').split(' ')
|
let type = res.replace(/[\[\]]/g, '').split(' ')
|
||||||
return type.length ? type[1] : ''
|
return type.length ? type[1] : ''
|
||||||
@@ -668,3 +676,21 @@ export function typeJudgment(object) {
|
|||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// url取参
|
||||||
|
export function urlParamsHandle(url) {
|
||||||
|
const search = url.split('?')[1]
|
||||||
|
if (!search) {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
const result = {}
|
||||||
|
const searchArr = search.split('&')
|
||||||
|
searchArr.forEach(v => {
|
||||||
|
const index = v.indexOf('=')
|
||||||
|
if (index !== -1) {
|
||||||
|
const name = v.substring(0, index)
|
||||||
|
const val = v.substring(index + 1, v.length)
|
||||||
|
result[name] = val
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|||||||
@@ -12,25 +12,25 @@
|
|||||||
<i style="font-size: 40px; color:#1ABC9C" 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 ae">
|
<div class="orderData-right oneflex flex jw ae">
|
||||||
<div class="orderData-right-item">
|
<div class="orderData-right-item">
|
||||||
<span>待核销订单</span>
|
<span>待退款订单</span>
|
||||||
<span>(10)</span>
|
<span>({{ orderData.daiTuiKuan }})</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="orderData-right-item">
|
<div class="orderData-right-item">
|
||||||
|
<span>待核销订单</span>
|
||||||
|
<span>({{ orderData.daiHeXiao }})</span>
|
||||||
|
</div>
|
||||||
|
<div class="orderData-right-item mt">
|
||||||
<span>已核销订单</span>
|
<span>已核销订单</span>
|
||||||
<span>(10)</span>
|
<span>({{ orderData.yiHeXiao }})</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="orderData-right-item mt">
|
<div class="orderData-right-item mt">
|
||||||
<span>已完成订单</span>
|
<span>已退款订单</span>
|
||||||
<span>(10)</span>
|
<span>({{ orderData.yiTuiKuan }})</span>
|
||||||
</div>
|
|
||||||
<div class="orderData-right-item mt">
|
|
||||||
<span>待退款订单</span>
|
|
||||||
<span>(10)</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -45,23 +45,9 @@
|
|||||||
<span class="card-title">商品总览</span>
|
<span class="card-title">商品总览</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="product-card flex js ac">
|
<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 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>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -104,13 +90,13 @@
|
|||||||
<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">
|
||||||
@@ -142,6 +128,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
|
import orderInfoApi from '@/api/order/orderInfo.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
filters: {},
|
filters: {},
|
||||||
@@ -149,16 +136,67 @@ export default {
|
|||||||
return {
|
return {
|
||||||
myChart: null,
|
myChart: null,
|
||||||
createTime: '',
|
createTime: '',
|
||||||
pickerOptions: {
|
orderData: {},
|
||||||
shortcuts: [
|
startTime: null,
|
||||||
|
endTime: null,
|
||||||
|
week: null,
|
||||||
|
month: null,
|
||||||
|
option: {
|
||||||
|
color: ['#DBEEFC'],
|
||||||
|
grid: {
|
||||||
|
x: 50,
|
||||||
|
y: 25,
|
||||||
|
x2: 30,
|
||||||
|
y2: 35
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item'
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
boundaryGap: false
|
||||||
|
// data: ['07-01周六', '07-02周日', '07-03周一', '07-04周二', '07-05周三', '07-06周四', '07-07周五']
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
{
|
{
|
||||||
text: '今天',
|
// data: [820, 932, 901, 934, 1290, 1330, 1320],
|
||||||
onClick(picker) {
|
type: 'line',
|
||||||
const end = new Date()
|
smooth: true,
|
||||||
const start = new Date()
|
itemStyle: {
|
||||||
picker.$emit('pick', [start, end])
|
color: '#49A9EE',
|
||||||
|
normal: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: '#49A9EE' // 起始颜色
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: '#DBEEFC' // 结束颜色
|
||||||
|
}
|
||||||
|
]),
|
||||||
|
lineStyle: {
|
||||||
|
width: 2 // 线条宽度
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
areaStyle: {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
pickerOptions: {
|
||||||
|
shortcuts: [
|
||||||
|
// {
|
||||||
|
// text: '今天',
|
||||||
|
// onClick(picker) {
|
||||||
|
// const end = new Date()
|
||||||
|
// const start = new Date()
|
||||||
|
// picker.$emit('pick', [start, end])
|
||||||
|
// }
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
text: '最近一周',
|
text: '最近一周',
|
||||||
onClick(picker) {
|
onClick(picker) {
|
||||||
@@ -178,45 +216,118 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
productList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.init()
|
// this.init()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initChart('chart')
|
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: {
|
methods: {
|
||||||
initChart(id = 'chart') {
|
// 表格搜索
|
||||||
this.myChart = echarts.init(document.getElementById(id))
|
userSearchs() {
|
||||||
this.myChart.setOption({
|
if (this.createTime !== null && this.createTime.length !== 0) {
|
||||||
color: ['#4370da'],
|
if (this.isDate(this.createTime[0])) {
|
||||||
grid: {
|
this.startTime = this.createTime[0]
|
||||||
x: 50,
|
this.endTime = this.createTime[1]
|
||||||
y: 25,
|
} else {
|
||||||
x2: 30,
|
var time1 = this.getSimpleDate(this.createTime[0])
|
||||||
y2: 35
|
var time2 = this.getSimpleDate(this.createTime[1])
|
||||||
},
|
this.startTime = time1
|
||||||
xAxis: {
|
this.endTime = time2
|
||||||
type: 'category',
|
}
|
||||||
boundaryGap: false,
|
|
||||||
data: ['07-01周六', '07-02周日', '07-03周一', '07-04周二', '07-05周三', '07-06周四', '07-07周五']
|
this.getMainDataTwo(this.startTime, this.endTime)
|
||||||
},
|
} else {
|
||||||
yAxis: {
|
this.$message.error('请选择要查询的时间段!')
|
||||||
type: 'value'
|
}
|
||||||
},
|
},
|
||||||
series: [
|
// 首页订单数据
|
||||||
{
|
async getMainDataOne() {
|
||||||
data: [820, 932, 901, 934, 1290, 1330, 1320],
|
await orderInfoApi.getMainDataOne().then(res => {
|
||||||
type: 'line',
|
if ((res.code = 20000)) {
|
||||||
smooth: true,
|
this.orderData = res.data
|
||||||
areaStyle: {}
|
|
||||||
}
|
}
|
||||||
]
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
init() {}
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<el-row v-show="currentTab === 0" :gutter="24">
|
<el-row v-show="currentTab === 0" :gutter="24">
|
||||||
<!-- 商品信息-->
|
<!-- 商品信息-->
|
||||||
<el-col v-bind="grid2">
|
<el-col v-bind="grid2">
|
||||||
<el-form-item label="商品分类:" prop="categorys" :rules="[{ required: true, message: '请选择商品分类', trigger: ['blur'] }]">
|
<el-form-item label="商品分类:" prop="categorys" :rules="[{ required: true, message: '请选择商品分类', trigger: ['change'] }]">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
@change="cascaderChange"
|
@change="cascaderChange"
|
||||||
v-model="formValidate.categorys"
|
v-model="formValidate.categorys"
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-bind="grid2">
|
<el-col v-bind="grid2">
|
||||||
<el-form-item label="商品名称:" prop="productName" :rules="[{ required: true, message: '请输入商品名称', trigger: ['blur'] }]">
|
<el-form-item label="商品名称:" prop="productName" :rules="[{ required: true, message: '请输入商品名称', trigger: ['change'] }]">
|
||||||
<el-input v-model="formValidate.productName" maxlength="249" placeholder="请输入商品名称" :disabled="isDisabled" />
|
<el-input v-model="formValidate.productName" maxlength="249" placeholder="请输入商品名称" :disabled="isDisabled" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-bind="grid2">
|
<el-col v-bind="grid2">
|
||||||
<el-form-item label="商品品牌:" prop="brandId" :rules="[{ required: true, message: '请选择商品品牌', trigger: ['blur'] }]">
|
<el-form-item label="商品品牌:" prop="brandId" :rules="[{ required: true, message: '请选择商品品牌', trigger: ['change'] }]">
|
||||||
<el-select style="width: 100%;" v-model="formValidate.brandId" placeholder="请选择">
|
<el-select style="width: 100%;" v-model="formValidate.brandId" placeholder="请选择">
|
||||||
<el-option v-for="item in brandOptions" :key="item.id" :label="item.brandName" :value="item.id"> </el-option>
|
<el-option v-for="item in brandOptions" :key="item.id" :label="item.brandName" :value="item.id"> </el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -57,12 +57,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-bind="grid2">
|
<el-col v-bind="grid2">
|
||||||
<el-form-item label="商品售价" prop="price" :rules="[{ required: true, message: '请输入商品售价', trigger: ['blur'] }]">
|
<el-form-item label="商品售价" prop="price" :rules="[{ required: true, message: '请输入商品售价', trigger: ['change'] }]">
|
||||||
<el-input v-model="formValidate.price" maxlength="249" type="number" placeholder="请输入商品售价" :disabled="isDisabled" />
|
<el-input v-model="formValidate.price" maxlength="249" type="number" placeholder="请输入商品售价" :disabled="isDisabled" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-bind="grid2">
|
<el-col v-bind="grid2">
|
||||||
<el-form-item label="商品类型:" prop="productType" :rules="[{ required: true, message: '请选择商品类型', trigger: ['blur'] }]">
|
<el-form-item label="商品类型:" prop="productType" :rules="[{ required: true, message: '请选择商品类型', trigger: ['change'] }]">
|
||||||
<el-select style="width: 100%;" v-model="formValidate.productType" placeholder="请选择商品类型">
|
<el-select style="width: 100%;" v-model="formValidate.productType" placeholder="请选择商品类型">
|
||||||
<el-option label="店铺商品" value="2"> </el-option>
|
<el-option label="店铺商品" value="2"> </el-option>
|
||||||
<el-option label="平台商品" value="1"> </el-option>
|
<el-option label="平台商品" value="1"> </el-option>
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</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" :rules="[{ validator: validateSiteIds, trigger: ['change'] }]">
|
||||||
<el-tag
|
<el-tag
|
||||||
style="margin-left: 10px;"
|
style="margin-left: 10px;"
|
||||||
:key="tagIndex"
|
:key="tagIndex"
|
||||||
@@ -125,11 +125,7 @@
|
|||||||
</el-col> -->
|
</el-col> -->
|
||||||
<!-- 多规格添加-->
|
<!-- 多规格添加-->
|
||||||
<el-col v-if="!isDisabled" :span="24" class="noForm">
|
<el-col v-if="!isDisabled" :span="24" class="noForm">
|
||||||
<el-form-item
|
<el-form-item label="选择规格:" prop="attributesTypeId" :rules="[{ required: true, message: '请选择规格', trigger: ['blur'] }]">
|
||||||
label="选择规格:"
|
|
||||||
prop="attributesTypeId"
|
|
||||||
:rules="[{ required: true, message: '请选择规格', trigger: ['blur'] }]"
|
|
||||||
>
|
|
||||||
<div class="acea-row">
|
<div class="acea-row">
|
||||||
<el-select v-model="formValidate.attributesTypeId">
|
<el-select v-model="formValidate.attributesTypeId">
|
||||||
<el-option v-for="item in ruleList" :key="item.id" :label="item.name" :value="item.id" />
|
<el-option v-for="item in ruleList" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
@@ -201,7 +197,15 @@
|
|||||||
<el-button type="default" @click="showAllSku()" :disabled="isDisabled">展示</el-button>
|
<el-button type="default" @click="showAllSku()" :disabled="isDisabled">展示</el-button>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<!-- 多规格表格-->
|
<!-- 多规格表格-->
|
||||||
<el-form-item v-if="formValidate.attr.length > 0" label="商品属性:" class="labeltop" :class="isDisabled ? 'disLabel' : 'disLabelmoren'">
|
<el-form-item
|
||||||
|
v-if="formValidate.attr.length > 0"
|
||||||
|
label="商品属性:"
|
||||||
|
class="labeltop"
|
||||||
|
:class="isDisabled ? 'disLabel' : 'disLabelmoren'"
|
||||||
|
prop="attr"
|
||||||
|
:rules="[{ validator: validateAttr, trigger: ['change'] }]"
|
||||||
|
>
|
||||||
|
<!-- :rules="[{ validator: validateAttr, trigger: ['blur'] }]" -->
|
||||||
<el-table :data="ManyAttrValue" border class="tabNumWidth" size="mini">
|
<el-table :data="ManyAttrValue" border class="tabNumWidth" size="mini">
|
||||||
<template v-if="manyTabDate">
|
<template v-if="manyTabDate">
|
||||||
<el-table-column v-for="item in manyTabDate" :key="item" align="center" :label="item" min-width="80">
|
<el-table-column v-for="item in manyTabDate" :key="item" align="center" :label="item" min-width="80">
|
||||||
@@ -328,7 +332,13 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
<CreatTemplates ref="addTemplates" @getList="getShippingList" />
|
<CreatTemplates ref="addTemplates" @getList="getShippingList" />
|
||||||
<el-dialog width="80%" title="选择油站" :visible.sync="isOilStationSelection">
|
<el-dialog width="80%" title="选择油站" :visible.sync="isOilStationSelection">
|
||||||
<OilStationSelection :product-id="this.$route.query.id" ref="selectSites" :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>
|
||||||
@@ -407,7 +417,30 @@ export default {
|
|||||||
name: 'ProductProductAdd',
|
name: 'ProductProductAdd',
|
||||||
components: { Templates, CreatTemplates, Tinymce, CustomUpload, OilStationSelection },
|
components: { Templates, CreatTemplates, Tinymce, CustomUpload, OilStationSelection },
|
||||||
data() {
|
data() {
|
||||||
|
const validateSiteIds = (rule, value, callback) => {
|
||||||
|
let siteIds = this.OilStationSelectionList.map(item => item.siteId)
|
||||||
|
if (siteIds.length == 0) {
|
||||||
|
callback('请选择油站')
|
||||||
|
}
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
const validateAttr = (rule, value, callback) => {
|
||||||
|
// SKU编号,即"skuNum",不需要手填,提交后会自动生成,因此此处略过校验
|
||||||
|
let length = this.attrValue.length - 1
|
||||||
|
let isCan = this.ManyAttrValue.every(item => {
|
||||||
|
// 此处返回已填的值 通过长度来判断是否都填了
|
||||||
|
let _length = this.attrValue.filter(_item => {
|
||||||
|
let key = _item.value
|
||||||
|
if (key != 'skuNum' && item[key]) return _item
|
||||||
|
}).length
|
||||||
|
return length != _length
|
||||||
|
})
|
||||||
|
if (isCan) callback('商品属性不可存在空')
|
||||||
|
callback()
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
|
validateSiteIds,
|
||||||
|
validateAttr,
|
||||||
loading: false,
|
loading: false,
|
||||||
OilStationSelectionList: [],
|
OilStationSelectionList: [],
|
||||||
isOilStationSelection: false,
|
isOilStationSelection: false,
|
||||||
@@ -432,7 +465,7 @@ export default {
|
|||||||
shippingList: [], // 运费模板
|
shippingList: [], // 运费模板
|
||||||
formThead: Object.assign({}, objTitle),
|
formThead: Object.assign({}, objTitle),
|
||||||
formValidate: {
|
formValidate: {
|
||||||
recommendOrNewMark: '1',
|
recommendOrNewMark: '',
|
||||||
productStatus: '1',
|
productStatus: '1',
|
||||||
attr: [],
|
attr: [],
|
||||||
productDetail: ''
|
productDetail: ''
|
||||||
@@ -529,7 +562,6 @@ export default {
|
|||||||
{
|
{
|
||||||
label: 'SKU编号',
|
label: 'SKU编号',
|
||||||
name: 'SKU编号',
|
name: 'SKU编号',
|
||||||
|
|
||||||
value: 'skuNum'
|
value: 'skuNum'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -552,11 +584,11 @@ export default {
|
|||||||
if (from.path == '/productList' && to.params.id) {
|
if (from.path == '/productList' && to.params.id) {
|
||||||
this.chenkId()
|
this.chenkId()
|
||||||
}
|
}
|
||||||
console.log(from.path) //从哪来
|
// console.log(from.path) //从哪来
|
||||||
console.log(to.path, to.params) //到哪去
|
// console.log(to.path, to.params) //到哪去
|
||||||
},
|
},
|
||||||
'formValidate.content': function(n) { },
|
// 'formValidate.content': function(n) {},
|
||||||
ManyAttrValue(n) {},
|
// ManyAttrValue(n) {},
|
||||||
'formValidate.attr': {
|
'formValidate.attr': {
|
||||||
handler: function(val, o) {
|
handler: function(val, o) {
|
||||||
if (this.isAttr) this.watCh(val, o) //重要!!!
|
if (this.isAttr) this.watCh(val, o) //重要!!!
|
||||||
@@ -573,7 +605,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
deactivated() {
|
deactivated() {
|
||||||
this.$destroy();
|
this.$destroy()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async chenkId() {
|
async chenkId() {
|
||||||
@@ -587,13 +619,13 @@ export default {
|
|||||||
return productApi.productAddGetSites(id)
|
return productApi.productAddGetSites(id)
|
||||||
})
|
})
|
||||||
).then(res => {
|
).then(res => {
|
||||||
console.log(res, 'productAddGetSites')
|
// console.log(res, 'productAddGetSites')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async inverseAnalysis(data) {
|
async inverseAnalysis(data) {
|
||||||
let { categoryOneId, categoryTwoId } = data;
|
let { categoryOneId, categoryTwoId } = data
|
||||||
let categorys = [categoryOneId, categoryTwoId];
|
let categorys = [categoryOneId, categoryTwoId]
|
||||||
this.OilStationSelectionList = data.siteInfos;
|
this.OilStationSelectionList = data.siteInfos
|
||||||
this.formValidate = {
|
this.formValidate = {
|
||||||
...this.formValidate,
|
...this.formValidate,
|
||||||
categorys,
|
categorys,
|
||||||
@@ -607,7 +639,8 @@ export default {
|
|||||||
this.$refs.CustomLBUpload.fileList = [...this.formValidate.images.filter(item => item.mainMark != '1')]
|
this.$refs.CustomLBUpload.fileList = [...this.formValidate.images.filter(item => item.mainMark != '1')]
|
||||||
await this.confirm()
|
await this.confirm()
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.formValidate.attr = this.formValidate.attr.map(item => {
|
this.formValidate.attr = this.formValidate.attr
|
||||||
|
.map(item => {
|
||||||
let align = this.formValidate.checkedList.find(i => item.id == i.attributeId)
|
let align = this.formValidate.checkedList.find(i => item.id == i.attributeId)
|
||||||
if (align) {
|
if (align) {
|
||||||
return {
|
return {
|
||||||
@@ -620,10 +653,11 @@ 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 {
|
||||||
@@ -642,12 +676,12 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
setPreferred(setPreferred) {
|
setPreferred(setPreferred) {
|
||||||
console.log(setPreferred, 'setPreferred')
|
// console.log(setPreferred, 'setPreferred')
|
||||||
},
|
},
|
||||||
delectOilStationSelectionList(e, index) {
|
delectOilStationSelectionList(e, index) {
|
||||||
this.OilStationSelectionList.splice(index, 1)
|
this.OilStationSelectionList.splice(index, 1)
|
||||||
if (this.$refs.selectSites && this.$refs.selectSites.checkedSites) {
|
if (this.$refs.selectSites && this.$refs.selectSites.checkedSites) {
|
||||||
this.$refs.selectSites.checkedSites = this.$refs.selectSites.checkedSites.filter(site => e.siteId !== site.siteId);
|
this.$refs.selectSites.checkedSites = this.$refs.selectSites.checkedSites.filter(site => e.siteId !== site.siteId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
oilStationSelectionSubmit(e) {
|
oilStationSelectionSubmit(e) {
|
||||||
@@ -663,7 +697,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
cascaderChange(e) {
|
cascaderChange(e) {
|
||||||
console.log(e, 'cascaderChange')
|
// console.log(e, 'cascaderChange')
|
||||||
},
|
},
|
||||||
// 校验输入框不能输入0,保留2位小数,库存为正整数
|
// 校验输入框不能输入0,保留2位小数,库存为正整数
|
||||||
keyupEvent(key, val, index, num) {
|
keyupEvent(key, val, index, num) {
|
||||||
@@ -737,15 +771,17 @@ export default {
|
|||||||
arr.push(val[i].sku)
|
arr.push(val[i].sku)
|
||||||
this.manyTabDate.push(val[i].sku.name)
|
this.manyTabDate.push(val[i].sku.name)
|
||||||
}
|
}
|
||||||
|
console.log('this.manyTabDate', this.manyTabDate)
|
||||||
|
// console.log('arr', arr)
|
||||||
this.ManyAttrValue = arr.reduce(
|
this.ManyAttrValue = arr.reduce(
|
||||||
(a, b, c) => {
|
(prev, cur) => {
|
||||||
let res = []
|
let res = []
|
||||||
a.map(x => {
|
prev.map(item => {
|
||||||
b.value.map(y => {
|
cur.value.map(_item => {
|
||||||
res.push({
|
res.push({
|
||||||
...x,
|
...item,
|
||||||
[b.name]: y,
|
[cur.name]: _item,
|
||||||
data: Object.assign({}, x.data || {}, { [b.name]: y }),
|
data: Object.assign({}, item.data || {}, { [cur.name]: _item }),
|
||||||
...Object.fromEntries(
|
...Object.fromEntries(
|
||||||
this.attrValue.map(item => {
|
this.attrValue.map(item => {
|
||||||
return [item.value, '']
|
return [item.value, '']
|
||||||
@@ -757,8 +793,8 @@ export default {
|
|||||||
return res
|
return res
|
||||||
},
|
},
|
||||||
[{}]
|
[{}]
|
||||||
);
|
)
|
||||||
console.log(this.ManyAttrValue ,"this.ManyAttrValue ")
|
console.log(this.ManyAttrValue, 'this.ManyAttrValue ')
|
||||||
},
|
},
|
||||||
attrFormat(arr) {
|
attrFormat(arr) {
|
||||||
let data = []
|
let data = []
|
||||||
@@ -860,7 +896,9 @@ export default {
|
|||||||
}
|
}
|
||||||
await this.productGetRule()
|
await this.productGetRule()
|
||||||
this.formValidate.attr = JSON.parse(JSON.stringify(this.ruleList.find(item => item.id == this.formValidate.attributesTypeId).attributesList))
|
this.formValidate.attr = JSON.parse(JSON.stringify(this.ruleList.find(item => item.id == this.formValidate.attributesTypeId).attributesList))
|
||||||
|
// console.log('this.formValidate.attr ', this.formValidate.attr)
|
||||||
}
|
}
|
||||||
|
// console.log('this.attrValue', this.attrValue)
|
||||||
},
|
},
|
||||||
// 商品分类;
|
// 商品分类;
|
||||||
async getCategorySelect() {
|
async getCategorySelect() {
|
||||||
@@ -940,7 +978,7 @@ export default {
|
|||||||
batchAdd() {
|
batchAdd() {
|
||||||
// if (!this.oneFormBatch[0].pic || !this.oneFormBatch[0].price || !this.oneFormBatch[0].cost || !this.oneFormBatch[0].ot_price ||
|
// if (!this.oneFormBatch[0].pic || !this.oneFormBatch[0].price || !this.oneFormBatch[0].cost || !this.oneFormBatch[0].ot_price ||
|
||||||
// !this.oneFormBatch[0].stock || !this.oneFormBatch[0].bar_code) return this.$Message.warning('请填写完整的批量设置内容!');
|
// !this.oneFormBatch[0].stock || !this.oneFormBatch[0].bar_code) return this.$Message.warning('请填写完整的批量设置内容!');
|
||||||
console.log(this.ManyAttrValue, this.oneFormBatch, ' this.ManyAttrValue')
|
// console.log(this.ManyAttrValue, this.oneFormBatch, ' this.ManyAttrValue')
|
||||||
this.ManyAttrValue.forEach(item => {
|
this.ManyAttrValue.forEach(item => {
|
||||||
Object.assign(item, this.oneFormBatch[0])
|
Object.assign(item, this.oneFormBatch[0])
|
||||||
})
|
})
|
||||||
@@ -972,7 +1010,6 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
item.splice(index, 1)
|
item.splice(index, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// 添加规则名称
|
// 添加规则名称
|
||||||
createAttrName() {
|
createAttrName() {
|
||||||
@@ -1184,7 +1221,7 @@ export default {
|
|||||||
if (this.currentTab-- < 0) this.currentTab = 0
|
if (this.currentTab-- < 0) this.currentTab = 0
|
||||||
},
|
},
|
||||||
handleSubmitNest(name) {
|
handleSubmitNest(name) {
|
||||||
console.log(this.formValidate,"handleSubmitNest")
|
// console.log(this.formValidate, 'handleSubmitNest')
|
||||||
if (this.formValidate.attr < 1) {
|
if (this.formValidate.attr < 1) {
|
||||||
this.$message.error('规格属性不能为空')
|
this.$message.error('规格属性不能为空')
|
||||||
return
|
return
|
||||||
@@ -1193,17 +1230,17 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.currentTab++ > 2) this.currentTab = 0
|
if (this.currentTab++ > 2) this.currentTab = 0
|
||||||
} else {
|
} else {
|
||||||
if (
|
// if (
|
||||||
!this.formValidate.store_name ||
|
// !this.formValidate.store_name ||
|
||||||
!this.formValidate.cate_id ||
|
// !this.formValidate.cate_id ||
|
||||||
!this.formValidate.keyword ||
|
// !this.formValidate.keyword ||
|
||||||
!this.formValidate.unit_name ||
|
// !this.formValidate.unit_name ||
|
||||||
!this.formValidate.store_info ||
|
// !this.formValidate.store_info ||
|
||||||
!this.formValidate.image ||
|
// !this.formValidate.image ||
|
||||||
!this.formValidate.slider_image
|
// !this.formValidate.slider_image
|
||||||
) {
|
// ) {
|
||||||
this.$message.warning('请填写完整商品信息!')
|
// this.$message.warning('请填写完整商品信息!')
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -1215,10 +1252,10 @@ export default {
|
|||||||
let [categoryOneId, categoryTwoId] = this.formValidate.categorys
|
let [categoryOneId, categoryTwoId] = this.formValidate.categorys
|
||||||
let isRecommendOrNewMark = this.formValidate.recommendOrNewMark == '1' ? 'newMark' : 'recommend'
|
let isRecommendOrNewMark = this.formValidate.recommendOrNewMark == '1' ? 'newMark' : 'recommend'
|
||||||
let siteIds = this.OilStationSelectionList.map(item => item.siteId)
|
let siteIds = this.OilStationSelectionList.map(item => item.siteId)
|
||||||
if(siteIds.length==0){
|
// if (siteIds.length == 0) {
|
||||||
this.$message.error('请选择油站')
|
// this.$message.error('请选择油站')
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
let checkedList = this.formValidate.attr.map(item => {
|
let checkedList = this.formValidate.attr.map(item => {
|
||||||
let attributeId = item.id
|
let attributeId = item.id
|
||||||
let checked = item.sku.value.join(',')
|
let checked = item.sku.value.join(',')
|
||||||
@@ -1261,6 +1298,7 @@ export default {
|
|||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
this.$message.success('操作成功')
|
this.$message.success('操作成功')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
this.$bus.$emit('productRefresh')
|
||||||
this.$router.push({ path: 'productList', query: { refresh: true } })
|
this.$router.push({ path: 'productList', query: { refresh: true } })
|
||||||
// this.$destroy()
|
// this.$destroy()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|||||||
@@ -32,9 +32,9 @@
|
|||||||
<el-option label="平台商品" value="1"> </el-option>
|
<el-option label="平台商品" value="1"> </el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="油站名称:" label-for="siteName">
|
<!-- <el-form-item label="油站名称:" label-for="siteName">
|
||||||
<el-input clearable placeholder="请输入油站名称:" v-model="page.params.siteName" class="form_content_width" />
|
<el-input clearable placeholder="请输入油站名称:" v-model="page.params.siteName" class="form_content_width" />
|
||||||
</el-form-item>
|
</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-form-item>
|
</el-form-item>
|
||||||
@@ -125,13 +125,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="油站" min-width="150" align="center">
|
<!-- <el-table-column label="油站" min-width="150" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>
|
<span>
|
||||||
{{ scope.row.siteName || '暂无' }}
|
{{ scope.row.siteName || '暂无' }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column label="库存" min-width="80">
|
<el-table-column label="库存" min-width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- <span>{{ scope.row.stockList.length }}</span> <br /> -->
|
<!-- <span>{{ scope.row.stockList.length }}</span> <br /> -->
|
||||||
@@ -459,8 +459,17 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.init()
|
this.init()
|
||||||
|
this.$bus.$on('productRefresh', () => {
|
||||||
|
console.log('productRefresh')
|
||||||
|
this.init()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
// let { refresh } = this.$utils.urlParamsHandle(location.href)
|
||||||
|
// if (refresh) {
|
||||||
|
// this.init()
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
activated() {},
|
|
||||||
methods: {
|
methods: {
|
||||||
auditing(row, auditStatus) {
|
auditing(row, auditStatus) {
|
||||||
this.$prompt('审核', '提示', {
|
this.$prompt('审核', '提示', {
|
||||||
@@ -711,7 +720,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 编辑
|
// 编辑
|
||||||
edit(row) {
|
edit(row) {
|
||||||
console.log(row)
|
// console.log(row)
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/product/productAdd',
|
path: '/product/productAdd',
|
||||||
query: {
|
query: {
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ 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.110.230: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`,
|
||||||
// target: 'http://uat.xingoil.com/adminapi',
|
target: 'http://uat.xingoil.com/adminapi',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||||
|
|||||||
Reference in New Issue
Block a user