|
@@ -1,16 +1,19 @@
|
|
|
<template>
|
|
|
<el-card class="box-card">
|
|
|
<el-tabs v-model="activeName" type="card" @tab-change="getList">
|
|
|
- <el-tab-pane label="瑜伽垫" :name="'1'"> </el-tab-pane>
|
|
|
- <el-tab-pane label="瑜伽砖" :name="'2'"> </el-tab-pane>
|
|
|
+ <el-tab-pane label="瑜伽垫裸垫" :name="'1'"> </el-tab-pane>
|
|
|
+ <el-tab-pane label="瑜伽垫裸砖" :name="'2'"> </el-tab-pane>
|
|
|
+ <el-tab-pane label="跳绳垫裸垫" :name="'3'"> </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<byTable
|
|
|
ref="data"
|
|
|
:hidePagination="true"
|
|
|
:borderStatus="true"
|
|
|
:source="sourceList.data"
|
|
|
+ :pagination="sourceList.pagination"
|
|
|
:config="config"
|
|
|
:loading="sourceList.loading"
|
|
|
+ :searchConfig="searchConfig"
|
|
|
:defaultSort="{ prop: 'turnoverRate', order: 'turnoverRateNinetyDays' }"
|
|
|
highlight-current-row
|
|
|
:action-list="[
|
|
@@ -23,7 +26,8 @@
|
|
|
action: () => deriveExcel(),
|
|
|
},
|
|
|
]"
|
|
|
- @get-list="getList">
|
|
|
+ @get-list="getList"
|
|
|
+ @clickReset="clickReset">
|
|
|
<template #bomSpecName="{ item }">
|
|
|
<div>
|
|
|
<el-tooltip class="box-item" effect="dark" placement="bottom">
|
|
@@ -50,6 +54,31 @@ const activeName = ref("1");
|
|
|
const sourceList = ref({
|
|
|
loading: false,
|
|
|
data: [],
|
|
|
+ pagination: {
|
|
|
+ width: "",
|
|
|
+ height: "",
|
|
|
+ chromatophore: "",
|
|
|
+ },
|
|
|
+});
|
|
|
+const searchConfig = computed(() => {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "width",
|
|
|
+ label: "宽",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "height",
|
|
|
+ label: "高",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ prop: "chromatophore",
|
|
|
+ dictKey: "bom_chromatophore",
|
|
|
+ label: "色层",
|
|
|
+ },
|
|
|
+ ];
|
|
|
});
|
|
|
const config = computed(() => {
|
|
|
return [
|
|
@@ -64,6 +93,28 @@ const config = computed(() => {
|
|
|
attrs: {
|
|
|
label: "品名",
|
|
|
slot: "bomSpecName",
|
|
|
+ "min-width": 220,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "宽",
|
|
|
+ prop: "width",
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "高",
|
|
|
+ prop: "height",
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "色层",
|
|
|
+ prop: "chromatophore",
|
|
|
+ width: 120,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -78,7 +129,7 @@ const config = computed(() => {
|
|
|
attrs: {
|
|
|
label: "30天销售量",
|
|
|
prop: "salesQuantityThirtyDays",
|
|
|
- width: 120,
|
|
|
+ width: 100,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -93,7 +144,7 @@ const config = computed(() => {
|
|
|
attrs: {
|
|
|
label: "60天销售量",
|
|
|
prop: "salesQuantitySixtyDays",
|
|
|
- width: 120,
|
|
|
+ width: 100,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -108,7 +159,7 @@ const config = computed(() => {
|
|
|
attrs: {
|
|
|
label: "90天销售量",
|
|
|
prop: "salesQuantityNinetyDays",
|
|
|
- width: 120,
|
|
|
+ width: 100,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -120,9 +171,14 @@ const config = computed(() => {
|
|
|
},
|
|
|
];
|
|
|
});
|
|
|
-const getList = () => {
|
|
|
+const getList = (req, status) => {
|
|
|
+ if (status) {
|
|
|
+ sourceList.value.pagination = {};
|
|
|
+ } else {
|
|
|
+ sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
+ }
|
|
|
sourceList.value.loading = true;
|
|
|
- proxy.post("/turnoverRateBoard/getTurnoverRateStatisticsList", { bomClassify: activeName.value }).then(async (res) => {
|
|
|
+ proxy.post("/turnoverRateBoard/getTurnoverRateStatisticsList", { bomClassify: activeName.value, ...sourceList.value.pagination }).then(async (res) => {
|
|
|
sourceList.value.data = res;
|
|
|
setTimeout(() => {
|
|
|
sourceList.value.loading = false;
|
|
@@ -132,6 +188,9 @@ const getList = () => {
|
|
|
});
|
|
|
};
|
|
|
getList();
|
|
|
+const clickReset = () => {
|
|
|
+ getList("", true);
|
|
|
+};
|
|
|
const deriveExcel = () => {
|
|
|
ElMessageBox.confirm("你是否确认此操作", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
@@ -139,7 +198,7 @@ const deriveExcel = () => {
|
|
|
type: "warning",
|
|
|
})
|
|
|
.then(() => {
|
|
|
- proxy.postFile("/turnoverRateBoard/exportExcel", { bomClassify: activeName.value }).then((res) => {
|
|
|
+ proxy.postFile("/turnoverRateBoard/exportExcel", { bomClassify: activeName.value, ...sourceList.value.pagination }).then((res) => {
|
|
|
if (activeName.value == "1") {
|
|
|
proxy.downloadFile(res, "周转率-裸垫.xlsx");
|
|
|
} else {
|