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