优化数据分店查询
This commit is contained in:
@@ -688,6 +688,7 @@ export default {
|
|||||||
async geiShopList() {
|
async geiShopList() {
|
||||||
let res = await ShopApi.getBranchList()
|
let res = await ShopApi.getBranchList()
|
||||||
this.branchList = res;
|
this.branchList = res;
|
||||||
|
this.shopId = res[0].shopId
|
||||||
},
|
},
|
||||||
shopChange() {
|
shopChange() {
|
||||||
this.summarytrade();
|
this.summarytrade();
|
||||||
@@ -714,7 +715,7 @@ export default {
|
|||||||
beginDate: this.query.createdAt[0],
|
beginDate: this.query.createdAt[0],
|
||||||
endDate: this.query.createdAt[1],
|
endDate: this.query.createdAt[1],
|
||||||
rangeType: this.timeValue,
|
rangeType: this.timeValue,
|
||||||
shopId: this.shopInfo.id
|
shopId: this.shopId
|
||||||
});
|
});
|
||||||
this.trade = res;
|
this.trade = res;
|
||||||
this.tradeSale = res.sale;
|
this.tradeSale = res.sale;
|
||||||
@@ -1277,7 +1278,7 @@ export default {
|
|||||||
this.saleTableLoading = true;
|
this.saleTableLoading = true;
|
||||||
const res = await dataSummaryApi.productSaleDate({
|
const res = await dataSummaryApi.productSaleDate({
|
||||||
day: this.saleTableActive,
|
day: this.saleTableActive,
|
||||||
shopId: this.shopInfo.id,
|
shopId: this.shopId,
|
||||||
});
|
});
|
||||||
this.saleTable = res;
|
this.saleTable = res;
|
||||||
this.saleTableTotal = res.length;
|
this.saleTableTotal = res.length;
|
||||||
@@ -1293,7 +1294,7 @@ export default {
|
|||||||
async datePayType() {
|
async datePayType() {
|
||||||
try {
|
try {
|
||||||
this.payChartLoading = true;
|
this.payChartLoading = true;
|
||||||
const res = await dataSummaryApi.datePayType({ day: this.saleActive, shopId: this.shopInfo.id });
|
const res = await dataSummaryApi.datePayType({ day: this.saleActive, shopId: this.shopId });
|
||||||
const data = res.map((item) => {
|
const data = res.map((item) => {
|
||||||
return {
|
return {
|
||||||
value: item.count,
|
value: item.count,
|
||||||
|
|||||||
@@ -16,11 +16,11 @@
|
|||||||
<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>
|
||||||
<!-- <el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="query.prodCategoryId" placeholder="商品分类" style="width: 140px">
|
<el-select v-model="query.prodCategoryId" placeholder="商品分类" style="width: 140px">
|
||||||
<el-option :label="item.name" :value="item.id" v-for="item in categorys" :key="item.id"></el-option>
|
<el-option :label="item.name" :value="item.id" v-for="item in categorys" :key="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio-group v-model="timeValue" @change="timeChange">
|
<el-radio-group v-model="timeValue" @change="timeChange">
|
||||||
@@ -250,6 +250,7 @@ export default {
|
|||||||
async geiShopList() {
|
async geiShopList() {
|
||||||
let res = await ShopApi.getBranchList()
|
let res = await ShopApi.getBranchList()
|
||||||
this.branchList = res;
|
this.branchList = res;
|
||||||
|
this.shopId = res[0].shopId
|
||||||
},
|
},
|
||||||
totalfilter(item, d) {
|
totalfilter(item, d) {
|
||||||
let num = item + d;
|
let num = item + d;
|
||||||
@@ -280,9 +281,9 @@ export default {
|
|||||||
beginDate: this.query.createdAt[0],
|
beginDate: this.query.createdAt[0],
|
||||||
endDate: this.query.createdAt[1],
|
endDate: this.query.createdAt[1],
|
||||||
rangeType: this.timeValue,
|
rangeType: this.timeValue,
|
||||||
prodCategoryId: this.query.prodCategoryId,
|
categoryId: this.query.prodCategoryId,
|
||||||
productName: this.query.productName,
|
productName: this.query.productName,
|
||||||
shopId: this.shopInfo.id,
|
shopId: this.shopId,
|
||||||
type: this.orderType,
|
type: this.orderType,
|
||||||
});
|
});
|
||||||
this.payCount = res;
|
this.payCount = res;
|
||||||
@@ -300,7 +301,7 @@ export default {
|
|||||||
const file = await saleSummaryApi.export({
|
const file = await saleSummaryApi.export({
|
||||||
beginDate: this.query.createdAt[0],
|
beginDate: this.query.createdAt[0],
|
||||||
endDate: this.query.createdAt[1],
|
endDate: this.query.createdAt[1],
|
||||||
prodCategoryId: this.query.prodCategoryId,
|
categoryId: this.query.prodCategoryId,
|
||||||
productName: this.query.productName,
|
productName: this.query.productName,
|
||||||
shopId: this.shopId
|
shopId: this.shopId
|
||||||
});
|
});
|
||||||
@@ -343,8 +344,8 @@ export default {
|
|||||||
endDate: this.query.createdAt[1],
|
endDate: this.query.createdAt[1],
|
||||||
rangeType: this.timeValue,
|
rangeType: this.timeValue,
|
||||||
productName: this.query.productName,
|
productName: this.query.productName,
|
||||||
prodCategoryId: this.query.prodCategoryId,
|
categoryId: this.query.prodCategoryId,
|
||||||
shopId: this.shopInfo.id,
|
shopId: this.shopId,
|
||||||
});
|
});
|
||||||
this.tableData.totalList = _.chunk(res, this.tableData.size);
|
this.tableData.totalList = _.chunk(res, this.tableData.size);
|
||||||
this.tableData.data = this.tableData.totalList[this.tableData.page - 1] || [];
|
this.tableData.data = this.tableData.totalList[this.tableData.page - 1] || [];
|
||||||
|
|||||||
@@ -153,6 +153,7 @@ export default {
|
|||||||
async geiShopList() {
|
async geiShopList() {
|
||||||
let res = await ShopApi.getBranchList()
|
let res = await ShopApi.getBranchList()
|
||||||
this.branchList = res;
|
this.branchList = res;
|
||||||
|
this.shopId = res[0].shopId
|
||||||
},
|
},
|
||||||
//携带table id跳转到订单列表页面
|
//携带table id跳转到订单列表页面
|
||||||
toTableOrderList(data) {
|
toTableOrderList(data) {
|
||||||
@@ -214,7 +215,7 @@ export default {
|
|||||||
rangeType: this.timeValue,
|
rangeType: this.timeValue,
|
||||||
beginDate: this.query.createdAt[0],
|
beginDate: this.query.createdAt[0],
|
||||||
endDate: this.query.createdAt[1],
|
endDate: this.query.createdAt[1],
|
||||||
shopId: this.shopInfo.id
|
shopId: this.shopId
|
||||||
});
|
});
|
||||||
this.tableData.loading = false;
|
this.tableData.loading = false;
|
||||||
this.tableData.totalList = _.chunk(res, this.tableData.size);
|
this.tableData.totalList = _.chunk(res, this.tableData.size);
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
<div class="preview_wrap">
|
<div class="preview_wrap">
|
||||||
<div class="phone_wrap">
|
<div class="phone_wrap">
|
||||||
<div class="index_bg" v-if="tableActive == 'index_bg'">
|
<div class="index_bg" v-if="tableActive == 'index_bg'">
|
||||||
<el-carousel height="500px">
|
<img class="bg" v-if="!isJsonArrayString(selectItem.value)" :src="selectItem.value" alt="">
|
||||||
|
<el-carousel height="500px" v-else>
|
||||||
<el-carousel-item v-for="item in JSON.parse(selectItem.value)">
|
<el-carousel-item v-for="item in JSON.parse(selectItem.value)">
|
||||||
<img class="bg" :src="item" />
|
<img class="bg" :src="item" />
|
||||||
</el-carousel-item>
|
</el-carousel-item>
|
||||||
@@ -155,7 +156,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="shopinfo_bg" v-if="tableActive == 'shopinfo_bg'">
|
<div class="shopinfo_bg" v-if="tableActive == 'shopinfo_bg'">
|
||||||
<el-carousel height="120px">
|
<img class="bg" :src="selectItem.value" v-if="!isJsonArrayString(selectItem.value)" />
|
||||||
|
<el-carousel height="120px" v-else>
|
||||||
<el-carousel-item v-for="item in JSON.parse(selectItem.value)">
|
<el-carousel-item v-for="item in JSON.parse(selectItem.value)">
|
||||||
<img class="bg" :src="item" />
|
<img class="bg" :src="item" />
|
||||||
</el-carousel-item>
|
</el-carousel-item>
|
||||||
@@ -192,7 +194,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form_item">
|
<div class="form_item">
|
||||||
<div class="upload_wrap" style="display: flex;flex-direction: column;gap: 28px;"
|
<div class="upload_wrap" style="display: flex;flex-direction: column;gap: 28px;"
|
||||||
v-if="isJsonArrayString(selectItem.value)">
|
v-if="selectItem.autoKey == 'index_bg' || selectItem.autoKey == 'shopinfo_bg'">
|
||||||
<MultiImageUpload v-model="imgList" @upDataEvent="MultiOnSuccess" />
|
<MultiImageUpload v-model="imgList" @upDataEvent="MultiOnSuccess" />
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" size="large" @click="doSubmit">确认修改</el-button>
|
<el-button type="primary" size="large" @click="doSubmit">确认修改</el-button>
|
||||||
|
|||||||
Reference in New Issue
Block a user