Compare commits

3 Commits

Author SHA1 Message Date
xk_chenlianjie
8caf900372 Merge branch 'master' of http://121.196.213.68:3000/caoliancun/PointsMall_Admin into chenlianjie 2024-01-24 08:41:09 +08:00
xk_chenlianjie
44ca930c3a 统计 2024-01-24 08:40:55 +08:00
dt_2916866708
3f76c2bf9a 123 2024-01-22 10:37:46 +08:00
3 changed files with 67 additions and 70 deletions

View File

@@ -527,8 +527,7 @@ export default {
console.log(res, "productAddGetSites")
})
},
inverseAnalysis(data) {
console.log(data,"data")
async inverseAnalysis(data) {
let { categoryOneId, categoryTwoId } = data;
let categorys = [categoryOneId, categoryTwoId];
this.OilStationSelectionList = data.siteInfos;
@@ -538,13 +537,10 @@ export default {
});
this.$refs.CustomUpload.fileList = [...this.formValidate.images.filter(item=>item.mainMark=="1")];
this.$refs.CustomLBUpload.fileList = [...this.formValidate.images.filter(item=>item.mainMark!="1")] ;
this.confirm();
this.$nextTick(()=>{
setTimeout(() => {
console.log(this.formValidate,"this.formValidate.arr")
}, 1000);
await this.confirm();
this.$nextTick(()=>{
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){
return {
...item,
@@ -556,13 +552,12 @@ export default {
}else{
return null
}
}).filter(item=>item);
}).filter(item=>item);
setTimeout(() => {
this.ManyAttrValue.forEach((item,index)=>{
let data = this.formValidate.stockList.find(i=>i.attributeJson==JSON.stringify(item.data))
if(data){
Object.assign(item,data);
console.log(data,item,"datadatadatadata")
Object.assign(item,data);
}
})
}, 1000);
@@ -776,13 +771,15 @@ export default {
if (num) this.productGetRule()
},
// 选择属性确认
async confirm() {
async confirm(is=true) {
this.isAttr = true
if (!this.formValidate.attributesTypeId) {
if(is){
if (!this.formValidate.attributesTypeId) {
return this.$message.warning('请选择属性')
}
await this.productGetRule();
this.formValidate.attr = JSON.parse(JSON.stringify(this.ruleList.find(item => item.id == this.formValidate.attributesTypeId).attributesList));
}
},
// 商品分类;
getCategorySelect() {

View File

@@ -21,6 +21,7 @@
</el-form-item>
</el-form>
</div>
<div style="width: 100%; height:500px;margin-top:20px" id="chart"></div>
<el-table
:data="productList"
@@ -146,6 +147,7 @@
<script>
import marketingApi from '@/api/finance/marketing.js'
import echarts from 'echarts'
export default {
name: 'product_productList',
@@ -212,10 +214,42 @@ export default {
goodsId: '',
isProductBox: false,
multipleSelection: [],
detailData: {} //详情对象
detailData: {}, //详情对象
myChart: '',
option: {
title: {
text: '一级分类商品',
// subtext: 'Fake Data',
left: 'center'
},
tooltip: {
trigger: 'item'
},
legend: {
// orient: 'vertical',
bottom: '20'
},
series: [
{
type: 'pie',
radius: '50%',
center: ['30%', '50%'],
data: []
},
{
type: 'pie',
radius: '50%',
center: ['75%', '50%'],
data: []
}
]
}
}
},
created() {
created() {},
mounted() {
this.myChart = echarts.init(document.getElementById('chart'))
var DaysAgo = this.timeBefore()
var sevenDaysAgo = this.timeBefore7()
console.log('sevenDaysAgo', sevenDaysAgo, DaysAgo)
@@ -231,8 +265,8 @@ export default {
this.getChartList()
},
activated() {},
methods: {
closeLabel(label) {
let index = this.dataLabel.indexOf(this.dataLabel.filter(d => d.id == label.id)[0])
this.dataLabel.splice(index, 1)
@@ -328,8 +362,26 @@ export default {
await marketingApi.commodityChart(this.createTime).then(res => {
if ((res.code = 20000)) {
this.productList = res.data
for (var i = 0; i < this.productList.length; i++) {
var obj = new Object()
var obj2 = new Object()
obj.name = this.productList[i].categoryName
obj.value = this.productList[i].sellNum
obj2.name = this.productList[i].categoryName
obj2.value = this.productList[i].sellMoney
this.option.series[0].data[i] = obj
this.option.series[1].data[i] = obj2
}
console.log('op', this.option)
console.log('series', this.option.series)
this.myChart.setOption(this.option)
}
})
window.onresize = function() {
this.myChart.resize()
}
},
// 商品销售列表
async getList() {

View File

@@ -1,6 +1,5 @@
<template>
<div class="article-manager">
<div style="width: 100%; height:500px" id="chart"></div>
<el-card :bordered="false" shadow="never" class="ivu-mt mt16" :body-style="{ padding: '0 20px 20px' }">
<!-- <div >
<el-form :model="page" label-width="80px" label-position="right" inline @submit.native.prevent class="mt16">
@@ -79,7 +78,6 @@
<script>
import marketingApi from '@/api/finance/marketing.js'
import echarts from "echarts";
export default {
name: 'product_productList',
@@ -117,60 +115,10 @@ export default {
this.getList()
},
mounted() {
this.echartsInit()
},
activated() { },
methods: {
echartsInit() {
var myChart = echarts.init(document.getElementById('chart'));
let option = {
title: {
text: '一级分类商品',
// subtext: 'Fake Data',
left: 'center'
},
tooltip: {
trigger: 'item'
},
legend: {
// orient: 'vertical',
bottom: "20"
},
series: [
{
type: 'pie',
radius: '50%',
center: ['25%', '50%'],
data: [
{ value: 335, name: '彩妆' },
{ value: 310, name: '留学' },
{ value: 310, name: '派遣玉缘轩' },
{ value: 310, name: '法律服务' },
{ value: 310, name: '食品' }
]
},
{
type: 'pie',
radius: '50%',
center: ['75%', '50%'],
data: [
{ value: 310, name: '餐饮' },
{ value: 310, name: '酒水汽车' },
{ value: 310, name: '厨具家电男装' },
{ value: 310, name: '口腔护理洗护' },
{ value: 310, name: '学习' }
]
}
]
};
myChart.setOption(option);
//动态修改图大小
window.onresize = function () {
myChart.resize();
};
},
closeLabel(label) {
let index = this.dataLabel.indexOf(this.dataLabel.filter(d => d.id == label.id)[0])
this.dataLabel.splice(index, 1)