fix:分店筛选增加
This commit is contained in:
@@ -52,7 +52,7 @@
|
|||||||
<span>营业</span>
|
<span>营业</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="u-flex" style="flex-wrap: wrap">
|
<div class="u-flex" style="flex-wrap: wrap">
|
||||||
<el-select v-model="storeId" placeholder="选择分店" style="width: 200px; margin-right: 10px;">
|
<el-select v-model="shopId" placeholder="选择分店" style="width: 200px; margin-right: 10px;" @change="shopChange">
|
||||||
<el-option v-for="item in branchList" :key="item.shopId" :label="item.shopName" :value="item.shopId" />
|
<el-option v-for="item in branchList" :key="item.shopId" :label="item.shopName" :value="item.shopId" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<div class="time_wrap u-flex" style="flex-shrink: 0">
|
<div class="time_wrap u-flex" style="flex-shrink: 0">
|
||||||
@@ -391,7 +391,7 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
branchList: [],
|
branchList: [],
|
||||||
storeId: null,
|
shopId: null,
|
||||||
trade: {},
|
trade: {},
|
||||||
formatDecimal,
|
formatDecimal,
|
||||||
topData: "",
|
topData: "",
|
||||||
@@ -486,10 +486,18 @@ export default {
|
|||||||
// this.initCardUserChart();
|
// this.initCardUserChart();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 获取分店列表
|
||||||
|
*/
|
||||||
async geiShopList() {
|
async geiShopList() {
|
||||||
let res = await ShopApi.getBranchList()
|
let res = await ShopApi.getBranchList()
|
||||||
this.branchList = res;
|
this.branchList = res;
|
||||||
},
|
},
|
||||||
|
shopChange(){
|
||||||
|
this.summarytrade();
|
||||||
|
this.lineChartTypeChange(this.lineChartType)
|
||||||
|
this.dateProduct()
|
||||||
|
},
|
||||||
// 切换时间
|
// 切换时间
|
||||||
timeChange(e) {
|
timeChange(e) {
|
||||||
const format = ["YYYY-MM-DD 00:00:00", "YYYY-MM-DD 23:59:59"];
|
const format = ["YYYY-MM-DD 00:00:00", "YYYY-MM-DD 23:59:59"];
|
||||||
@@ -555,6 +563,7 @@ export default {
|
|||||||
const res = await dataSummaryApi.trade({
|
const res = await dataSummaryApi.trade({
|
||||||
beginDate: this.query.createdAt[0],
|
beginDate: this.query.createdAt[0],
|
||||||
endDate: this.query.createdAt[1],
|
endDate: this.query.createdAt[1],
|
||||||
|
shopId: this.shopId
|
||||||
});
|
});
|
||||||
this.trade = res;
|
this.trade = res;
|
||||||
this.tradeLoading = false;
|
this.tradeLoading = false;
|
||||||
@@ -878,7 +887,7 @@ export default {
|
|||||||
async dateAmount() {
|
async dateAmount() {
|
||||||
try {
|
try {
|
||||||
this.saleLoading = true;
|
this.saleLoading = true;
|
||||||
const res = await dataSummaryApi.dateAmount({ day: this.saleActive });
|
const res = await dataSummaryApi.dateAmount({ day: this.saleActive,shopId: this.shopId });
|
||||||
const data = res.total.map((item) => {
|
const data = res.total.map((item) => {
|
||||||
return {
|
return {
|
||||||
orderAmount: item.orderAmount,
|
orderAmount: item.orderAmount,
|
||||||
@@ -907,6 +916,7 @@ export default {
|
|||||||
day: this.saleTableActive,
|
day: this.saleTableActive,
|
||||||
page: this.saleTablePage,
|
page: this.saleTablePage,
|
||||||
size: this.saleTableSize,
|
size: this.saleTableSize,
|
||||||
|
shopId: this.shopId
|
||||||
});
|
});
|
||||||
this.saleTable = res.records;
|
this.saleTable = res.records;
|
||||||
this.saleTableTotal = res.totalRow * 1;
|
this.saleTableTotal = res.totalRow * 1;
|
||||||
@@ -922,7 +932,7 @@ export default {
|
|||||||
async datePayType() {
|
async datePayType() {
|
||||||
try {
|
try {
|
||||||
this.payChartLoading = true;
|
this.payChartLoading = true;
|
||||||
const res = await dataSummaryApi.datePayType({ day: this.saleActive });
|
const res = await dataSummaryApi.datePayType({ day: this.saleActive,shopId: this.shopId });
|
||||||
const data = res.countPayType.map((item) => {
|
const data = res.countPayType.map((item) => {
|
||||||
return {
|
return {
|
||||||
value: item.count,
|
value: item.count,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="storeId" placeholder="选择分店" style="width: 200px; margin-right: 10px">
|
<el-select v-model="shopId" placeholder="选择分店" style="width: 200px; margin-right: 10px">
|
||||||
<el-option v-for="item in branchList" :key="item.shopId" :label="item.shopName" :value="item.shopId" />
|
<el-option v-for="item in branchList" :key="item.shopId" :label="item.shopName" :value="item.shopId" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -157,6 +157,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import saleSummaryApi from "@/api/order/sale-summary";
|
import saleSummaryApi from "@/api/order/sale-summary";
|
||||||
import categoryApi from "@/api/product/productclassification";
|
import categoryApi from "@/api/product/productclassification";
|
||||||
|
import ShopApi from "@/api/account/shop";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { downloadFile } from "@/utils/index";
|
import { downloadFile } from "@/utils/index";
|
||||||
|
|
||||||
@@ -183,7 +184,7 @@ export default {
|
|||||||
payCount: "",
|
payCount: "",
|
||||||
payCountTotal: 0,
|
payCountTotal: 0,
|
||||||
branchList: [],
|
branchList: [],
|
||||||
storeId: null,
|
shopId: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
@@ -216,6 +217,7 @@ export default {
|
|||||||
page: 1,
|
page: 1,
|
||||||
size: 200,
|
size: 200,
|
||||||
orderBy: "name asc",
|
orderBy: "name asc",
|
||||||
|
shopId: this.shopId
|
||||||
});
|
});
|
||||||
this.categorys = res;
|
this.categorys = res;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -230,7 +232,7 @@ export default {
|
|||||||
endDate: this.query.createdAt[1],
|
endDate: this.query.createdAt[1],
|
||||||
prodCategoryId: this.query.prodCategoryId,
|
prodCategoryId: this.query.prodCategoryId,
|
||||||
productName: this.query.productName,
|
productName: this.query.productName,
|
||||||
|
shopId: this.shopId,
|
||||||
type: this.orderType,
|
type: this.orderType,
|
||||||
});
|
});
|
||||||
this.payCount = res;
|
this.payCount = res;
|
||||||
@@ -247,6 +249,7 @@ export default {
|
|||||||
endDate: this.query.createdAt[1],
|
endDate: this.query.createdAt[1],
|
||||||
prodCategoryId: this.query.prodCategoryId,
|
prodCategoryId: this.query.prodCategoryId,
|
||||||
productName: this.query.productName,
|
productName: this.query.productName,
|
||||||
|
shopId: this.shopId
|
||||||
});
|
});
|
||||||
downloadFile(file, "数据", "xlsx");
|
downloadFile(file, "数据", "xlsx");
|
||||||
this.downloadLoading = false;
|
this.downloadLoading = false;
|
||||||
@@ -284,6 +287,7 @@ export default {
|
|||||||
endDate: this.query.createdAt[1],
|
endDate: this.query.createdAt[1],
|
||||||
productName: this.query.productName,
|
productName: this.query.productName,
|
||||||
prodCategoryId: this.query.prodCategoryId,
|
prodCategoryId: this.query.prodCategoryId,
|
||||||
|
shopId: this.shopId
|
||||||
});
|
});
|
||||||
this.tableData.loading = false;
|
this.tableData.loading = false;
|
||||||
this.tableData.data = res.records;
|
this.tableData.data = res.records;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ const searchConfig: ISearchConfig = {
|
|||||||
{
|
{
|
||||||
type: "select",
|
type: "select",
|
||||||
label: "分店选择",
|
label: "分店选择",
|
||||||
prop: "storeId",
|
prop: "shopId",
|
||||||
attrs: {
|
attrs: {
|
||||||
placeholder: "请选择分店",
|
placeholder: "请选择分店",
|
||||||
clearable: true,
|
clearable: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user