feat: 筛选时间条件增加时分秒
This commit is contained in:
parent
d4c4989b26
commit
dce9fa7cdb
|
|
@ -562,6 +562,9 @@ export default {
|
||||||
async summarytrade() {
|
async summarytrade() {
|
||||||
try {
|
try {
|
||||||
this.tradeLoading = true;
|
this.tradeLoading = true;
|
||||||
|
if( this.query.createdAt[1] ){
|
||||||
|
this.query.createdAt.splice(1,1,this.query.createdAt[1].replace("00:00:00","23:59:59"))
|
||||||
|
}
|
||||||
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],
|
||||||
|
|
|
||||||
|
|
@ -229,6 +229,9 @@ export default {
|
||||||
// 获取订单汇总
|
// 获取订单汇总
|
||||||
async daycount() {
|
async daycount() {
|
||||||
try {
|
try {
|
||||||
|
if (this.query.createdAt[1]) {
|
||||||
|
this.query.createdAt.splice(1, 1, this.query.createdAt[1].replace("00:00:00", "23:59:59"))
|
||||||
|
}
|
||||||
const res = await saleSummaryApi.count({
|
const res = await saleSummaryApi.count({
|
||||||
beginDate: this.query.createdAt[0],
|
beginDate: this.query.createdAt[0],
|
||||||
endDate: this.query.createdAt[1],
|
endDate: this.query.createdAt[1],
|
||||||
|
|
@ -246,6 +249,9 @@ export default {
|
||||||
async downloadHandle() {
|
async downloadHandle() {
|
||||||
try {
|
try {
|
||||||
this.downloadLoading = true;
|
this.downloadLoading = true;
|
||||||
|
if (this.query.createdAt[1]) {
|
||||||
|
this.query.createdAt.splice(1, 1, this.query.createdAt[1].replace("00:00:00", "23:59:59"))
|
||||||
|
}
|
||||||
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],
|
||||||
|
|
@ -281,6 +287,9 @@ export default {
|
||||||
this.tableData.loading = true;
|
this.tableData.loading = true;
|
||||||
try {
|
try {
|
||||||
this.daycount();
|
this.daycount();
|
||||||
|
if (this.query.createdAt[1]) {
|
||||||
|
this.query.createdAt.splice(1, 1, this.query.createdAt[1].replace("00:00:00", "23:59:59"))
|
||||||
|
}
|
||||||
const res = await saleSummaryApi.page({
|
const res = await saleSummaryApi.page({
|
||||||
page: this.tableData.page,
|
page: this.tableData.page,
|
||||||
size: this.tableData.size,
|
size: this.tableData.size,
|
||||||
|
|
|
||||||
|
|
@ -18,17 +18,12 @@
|
||||||
<el-radio-button value="custom">自定义</el-radio-button>
|
<el-radio-button value="custom">自定义</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<div>
|
<div>
|
||||||
<el-date-picker
|
<el-date-picker v-model="query.createdAt" type="daterange" range-separator="至" start-placeholder="开始日期"
|
||||||
v-model="query.createdAt"
|
end-placeholder="结束日期" value-format="YYYY-MM-DD HH:mm:ss"></el-date-picker>
|
||||||
type="daterange"
|
|
||||||
range-separator="至"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
></el-date-picker>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-select v-model="shopId" v-if="isHeadShop == 1" placeholder="选择分店" style="width: 200px; margin-right: 10px">
|
<el-select v-model="shopId" v-if="isHeadShop == 1" 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>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -147,10 +142,10 @@ export default {
|
||||||
this.geiShopList();
|
this.geiShopList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* 获取分店列表
|
* 获取分店列表
|
||||||
*/
|
*/
|
||||||
async geiShopList() {
|
async geiShopList() {
|
||||||
let res = await ShopApi.getBranchList()
|
let res = await ShopApi.getBranchList()
|
||||||
this.branchList = res;
|
this.branchList = res;
|
||||||
},
|
},
|
||||||
|
|
@ -169,6 +164,9 @@ export default {
|
||||||
async downloadHandle() {
|
async downloadHandle() {
|
||||||
try {
|
try {
|
||||||
this.downloadLoading = true;
|
this.downloadLoading = true;
|
||||||
|
if (this.query.createdAt[1]) {
|
||||||
|
this.query.createdAt.splice(1, 1, this.query.createdAt[1].replace("00:00:00", "23:59:59"))
|
||||||
|
}
|
||||||
const file = await tableSummaryApi.export({
|
const file = await tableSummaryApi.export({
|
||||||
beginDate: this.query.createdAt[0],
|
beginDate: this.query.createdAt[0],
|
||||||
endDate: this.query.createdAt[1],
|
endDate: this.query.createdAt[1],
|
||||||
|
|
@ -201,6 +199,9 @@ export default {
|
||||||
async getTableData() {
|
async getTableData() {
|
||||||
this.tableData.loading = true;
|
this.tableData.loading = true;
|
||||||
try {
|
try {
|
||||||
|
if (this.query.createdAt[1]) {
|
||||||
|
this.query.createdAt.splice(1, 1, this.query.createdAt[1].replace("00:00:00", "23:59:59"))
|
||||||
|
}
|
||||||
const res = await tableSummaryApi.list({
|
const res = await tableSummaryApi.list({
|
||||||
page: this.tableData.page,
|
page: this.tableData.page,
|
||||||
size: this.tableData.size,
|
size: this.tableData.size,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue