1.优化首页 2.优化绑定耗材
This commit is contained in:
parent
2261b0520a
commit
f585e2f020
|
|
@ -220,13 +220,13 @@
|
|||
<div class="number">{{ productCount }}</div>
|
||||
<div class="product_chart_wrap" ref="productCountChart"></div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<!-- <div class="card">
|
||||
<div class="sale_data_header">
|
||||
<div class="card_title">销售金额</div>
|
||||
</div>
|
||||
<div class="number">¥{{ productSum }}</div>
|
||||
<div class="product_chart_wrap" ref="productSumChart"></div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="table">
|
||||
<el-table :data="saleTable" v-loading="saleTableLoading">
|
||||
|
|
@ -336,9 +336,9 @@ export default {
|
|||
if (this.productCountChart) {
|
||||
this.productCountChart.resize();
|
||||
}
|
||||
if (this.productSumChart) {
|
||||
this.productSumChart.resize();
|
||||
}
|
||||
// if (this.productSumChart) {
|
||||
// this.productSumChart.resize();
|
||||
// }
|
||||
}, 100);
|
||||
window.addEventListener("resize", this.__resizeHandler);
|
||||
// this.initCardUserChart();
|
||||
|
|
@ -679,7 +679,7 @@ export default {
|
|||
{
|
||||
name: '订单金额',
|
||||
type: "bar",
|
||||
barWidth: time.length <= 7 ? "30%" : "20%",
|
||||
barWidth: time.length <= 7 ? "50%" : "30%",
|
||||
data: data.map(item => item.orderAmount),
|
||||
},
|
||||
// {
|
||||
|
|
@ -688,12 +688,12 @@ export default {
|
|||
// barWidth: time.length <= 7 ? "30%" : "20%",
|
||||
// data: data.map(item => item.actualAmount),
|
||||
// },
|
||||
{
|
||||
name: '优惠金额',
|
||||
type: "bar",
|
||||
barWidth: time.length <= 7 ? "30%" : "20%",
|
||||
data: data.map(item => item.discountAmount),
|
||||
}
|
||||
// {
|
||||
// name: '优惠金额',
|
||||
// type: "bar",
|
||||
// barWidth: time.length <= 7 ? "30%" : "20%",
|
||||
// data: data.map(item => item.discountAmount),
|
||||
// }
|
||||
]
|
||||
});
|
||||
},
|
||||
|
|
@ -754,7 +754,7 @@ export default {
|
|||
return {
|
||||
orderAmount: item.orderAmount,
|
||||
// actualAmount: item.actualAmount,
|
||||
discountAmount: item.discountAmount
|
||||
// discountAmount: item.discountAmount
|
||||
}
|
||||
});
|
||||
const time = res.total.map(item => item.tradeDay);
|
||||
|
|
@ -840,7 +840,7 @@ export default {
|
|||
// 初始化销售图标
|
||||
initProduceChart(p1, p2) {
|
||||
this.productCountChart = echarts.init(this.$refs.productCountChart);
|
||||
this.productSumChart = echarts.init(this.$refs.productSumChart);
|
||||
// this.productSumChart = echarts.init(this.$refs.productSumChart);
|
||||
|
||||
this.productCountChart.setOption({
|
||||
tooltip: {
|
||||
|
|
@ -913,76 +913,76 @@ export default {
|
|||
]
|
||||
});
|
||||
|
||||
this.productSumChart.setOption({
|
||||
tooltip: {
|
||||
trigger: "axis"
|
||||
},
|
||||
grid: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 0
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
boundaryGap: false,
|
||||
type: "category",
|
||||
data: p2[0],
|
||||
show: false, // 不显示坐标轴线、坐标轴刻度线和坐标轴上的文字
|
||||
axisTick: {
|
||||
show: false // 不显示坐标轴刻度线
|
||||
},
|
||||
axisLine: {
|
||||
show: false // 不显示坐标轴线
|
||||
},
|
||||
axisLabel: {
|
||||
show: false // 不显示坐标轴上的文字
|
||||
},
|
||||
splitLine: {
|
||||
show: false // 不显示网格线
|
||||
}
|
||||
}
|
||||
],
|
||||
color: "#409eff",
|
||||
yAxis: [
|
||||
{
|
||||
type: "value",
|
||||
show: false, // 不显示坐标轴线、坐标轴刻度线和坐标轴上的文字
|
||||
axisTick: {
|
||||
show: false // 不显示坐标轴刻度线
|
||||
},
|
||||
axisLine: {
|
||||
show: false // 不显示坐标轴线
|
||||
},
|
||||
axisLabel: {
|
||||
show: false // 不显示坐标轴上的文字
|
||||
},
|
||||
splitLine: {
|
||||
show: false // 不显示网格线
|
||||
}
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
data: p2[1],
|
||||
type: "line",
|
||||
symbol: "none",
|
||||
smooth: true,
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
color: "#409eff" // 渐变颜色
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#409eff" // 渐变颜色
|
||||
}
|
||||
])
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
// this.productSumChart.setOption({
|
||||
// tooltip: {
|
||||
// trigger: "axis"
|
||||
// },
|
||||
// grid: {
|
||||
// x: 0,
|
||||
// y: 0,
|
||||
// x2: 0,
|
||||
// y2: 0
|
||||
// },
|
||||
// xAxis: [
|
||||
// {
|
||||
// boundaryGap: false,
|
||||
// type: "category",
|
||||
// data: p2[0],
|
||||
// show: false, // 不显示坐标轴线、坐标轴刻度线和坐标轴上的文字
|
||||
// axisTick: {
|
||||
// show: false // 不显示坐标轴刻度线
|
||||
// },
|
||||
// axisLine: {
|
||||
// show: false // 不显示坐标轴线
|
||||
// },
|
||||
// axisLabel: {
|
||||
// show: false // 不显示坐标轴上的文字
|
||||
// },
|
||||
// splitLine: {
|
||||
// show: false // 不显示网格线
|
||||
// }
|
||||
// }
|
||||
// ],
|
||||
// color: "#409eff",
|
||||
// yAxis: [
|
||||
// {
|
||||
// type: "value",
|
||||
// show: false, // 不显示坐标轴线、坐标轴刻度线和坐标轴上的文字
|
||||
// axisTick: {
|
||||
// show: false // 不显示坐标轴刻度线
|
||||
// },
|
||||
// axisLine: {
|
||||
// show: false // 不显示坐标轴线
|
||||
// },
|
||||
// axisLabel: {
|
||||
// show: false // 不显示坐标轴上的文字
|
||||
// },
|
||||
// splitLine: {
|
||||
// show: false // 不显示网格线
|
||||
// }
|
||||
// }
|
||||
// ],
|
||||
// series: [
|
||||
// {
|
||||
// data: p2[1],
|
||||
// type: "line",
|
||||
// symbol: "none",
|
||||
// smooth: true,
|
||||
// areaStyle: {
|
||||
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
// {
|
||||
// offset: 0,
|
||||
// color: "#409eff" // 渐变颜色
|
||||
// },
|
||||
// {
|
||||
// offset: 1,
|
||||
// color: "#409eff" // 渐变颜色
|
||||
// }
|
||||
// ])
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// });
|
||||
},
|
||||
// 日期汇总数据
|
||||
async summaryDateGet(res) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<el-dialog width="80%" :visible.sync="dialogVisible" :show-close="false" @close="reset">
|
||||
<el-dialog top="10vh" :visible.sync="dialogVisible" :show-close="false" @close="reset">
|
||||
<div class="header_wrap">
|
||||
<div class="title">耗材信息</div>
|
||||
<div class="btn_wrap">
|
||||
|
|
@ -23,8 +23,7 @@
|
|||
<template v-slot="scope">
|
||||
<el-select v-model="scope.row.conInfoId" filterable remote reserve-keyword placeholder="请输入关键词"
|
||||
:remote-method="remoteMethod" :loading="loading" @change="selectionChange($event, scope.row)">
|
||||
<el-option v-for="item in options" :key="item.id" :label="item.conName"
|
||||
:value="item.id">
|
||||
<el-option v-for="item in options" :key="item.id" :label="item.conName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<div class="tips" v-if="scope.row.stockNumber">库存:{{ scope.row.stockNumber }}</div>
|
||||
|
|
@ -41,13 +40,15 @@
|
|||
<el-input-number v-model="scope.row.surplusStock" :min="0" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<el-table-column label="操作" width="100">
|
||||
<template v-slot="scope">
|
||||
<div class="table_btn_wrap">
|
||||
<div class="btn sub" v-if="scope.$index > 0" @click="tableData.cons.splice(scope.$index, 1)">
|
||||
<div class="btn sub" v-if="tableData.cons.length > 1"
|
||||
@click="tableData.cons.splice(scope.$index, 1)">
|
||||
<i class="el-icon-remove-outline"></i>
|
||||
</div>
|
||||
<div class="btn add" @click="createItem(scope.row)">
|
||||
<div class="btn add" v-if="scope.$index == tableData.cons.length - 1"
|
||||
@click="createItem(scope.row)">
|
||||
<i class="el-icon-circle-plus-outline"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -55,7 +56,7 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 绑定到规格 -->
|
||||
<el-table :data="tableData.cons" border v-show="type == 2">
|
||||
<el-table :data="tableData.cons" border v-show="type == 2" height="500px">
|
||||
<el-table-column label="序号" type="index" width="100"></el-table-column>
|
||||
<el-table-column label="规格名称" prop="specSnap"></el-table-column>
|
||||
<el-table-column label="耗材" width="600">
|
||||
|
|
@ -86,18 +87,20 @@
|
|||
<el-table-column label="消耗量">
|
||||
<template v-slot="scope">
|
||||
<div class="sku_table_item" v-for="(item, index) in scope.row.consList" :key="index">
|
||||
<el-input-number v-model="item.surplusStock" :min="0" />
|
||||
<el-input-number v-model="item.surplusStock" :min="1" />
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<el-table-column label="操作" width="100">
|
||||
<template v-slot="scope">
|
||||
<div class="sku_table_item" v-for="(item, index) in scope.row.consList" :key="index">
|
||||
<div class="table_btn_wrap t">
|
||||
<div class="btn sub" v-if="index > 0" @click="scope.row.consList.splice(index, 1)">
|
||||
<div class="btn sub" v-if="scope.row.consList.length > 1"
|
||||
@click="scope.row.consList.splice(index, 1)">
|
||||
<i class="el-icon-remove-outline"></i>
|
||||
</div>
|
||||
<div class="btn add" @click="skuCreateItem(scope.$index)">
|
||||
<div class="btn add" v-if="index == scope.row.consList.length - 1"
|
||||
@click="skuCreateItem(scope.$index)">
|
||||
<i class="el-icon-circle-plus-outline"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -247,7 +250,7 @@ export default {
|
|||
item.conInfoId = ''
|
||||
item.name = ''
|
||||
item.conUnit = ''
|
||||
item.surplusStock = 0
|
||||
item.surplusStock = 1
|
||||
item.status = 1
|
||||
this.tableData.cons.push(item)
|
||||
} else {
|
||||
|
|
@ -278,7 +281,7 @@ export default {
|
|||
item.conInfoId = ''
|
||||
item.name = ''
|
||||
item.conUnit = ''
|
||||
item.surplusStock = 0
|
||||
item.surplusStock = 1
|
||||
item.status = 1
|
||||
this.tableData.cons.push(item)
|
||||
}
|
||||
|
|
@ -295,7 +298,7 @@ export default {
|
|||
item.conInfoId = ''
|
||||
item.name = ''
|
||||
item.conUnit = ''
|
||||
item.surplusStock = 0
|
||||
item.surplusStock = 1
|
||||
item.status = 1
|
||||
item.specSnap = val.name
|
||||
|
||||
|
|
@ -315,13 +318,24 @@ export default {
|
|||
this.tableData.cons.map(val => {
|
||||
this.goodsDetail.conInfos.map(item => {
|
||||
if (item.productSkuId == val.productSkuId) {
|
||||
val.consList.unshift({
|
||||
id: item.id,
|
||||
surplusStock: item.surplusStock,
|
||||
conInfoId: item.conInfoId,
|
||||
name: item.conName,
|
||||
conUnit: item.conUnit
|
||||
})
|
||||
if (val.consList.length == 1 && val.consList[0].conInfoId == '') {
|
||||
val.consList = []
|
||||
val.consList.push({
|
||||
id: item.id,
|
||||
surplusStock: item.surplusStock,
|
||||
conInfoId: item.conInfoId,
|
||||
name: item.conName,
|
||||
conUnit: item.conUnit
|
||||
})
|
||||
} else {
|
||||
val.consList.push({
|
||||
id: item.id,
|
||||
surplusStock: item.surplusStock,
|
||||
conInfoId: item.conInfoId,
|
||||
name: item.conName,
|
||||
conUnit: item.conUnit
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
@ -339,7 +353,7 @@ export default {
|
|||
item.conInfoId = ''
|
||||
item.name = ''
|
||||
item.conUnit = ''
|
||||
item.surplusStock = 0
|
||||
item.surplusStock = 1
|
||||
item.status = 1
|
||||
|
||||
this.tableData.cons.push(item)
|
||||
|
|
|
|||
Loading…
Reference in New Issue