|
@@ -116,8 +116,8 @@ export default {
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
const searchData = Object.assign(parameter, this.queryParam)
|
|
const searchData = Object.assign(parameter, this.queryParam)
|
|
if (this.time && this.time.length) {
|
|
if (this.time && this.time.length) {
|
|
- searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
|
|
|
|
- searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD')
|
|
|
|
|
|
+ searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
|
|
|
|
+ searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
|
|
} else {
|
|
} else {
|
|
searchData.beginDate = ''
|
|
searchData.beginDate = ''
|
|
searchData.endDate = ''
|
|
searchData.endDate = ''
|
|
@@ -174,13 +174,14 @@ export default {
|
|
},
|
|
},
|
|
// 导出
|
|
// 导出
|
|
handleExport () {
|
|
handleExport () {
|
|
- const params = {
|
|
|
|
- beginDate: this.queryParam.beginDate == null ? getDate.getToday().starttime : this.queryParam.beginDate,
|
|
|
|
- endDate: this.queryParam.endDate == null ? getDate.getToday().endtime : this.queryParam.endDate,
|
|
|
|
- customerMobile: this.queryParam.customerMobile,
|
|
|
|
- orderSn: this.queryParam.orderSn,
|
|
|
|
- orderState: this.queryParam.orderState
|
|
|
|
- }
|
|
|
|
|
|
+ const params=this.queryParam
|
|
|
|
+ if (this.time && this.time.length) {
|
|
|
|
+ params.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
|
|
|
|
+ params.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
|
|
|
|
+ } else {
|
|
|
|
+ params.beginDate = ''
|
|
|
|
+ params.endDate = ''
|
|
|
|
+ }
|
|
if (!params.beginDate && !params.endDate) {
|
|
if (!params.beginDate && !params.endDate) {
|
|
this.$message.error('请先选择需要导出的下单时间区间再进行导出!')
|
|
this.$message.error('请先选择需要导出的下单时间区间再进行导出!')
|
|
return
|
|
return
|
|
@@ -199,13 +200,21 @@ export default {
|
|
},
|
|
},
|
|
// 导出订单明细
|
|
// 导出订单明细
|
|
handleOrderExport () {
|
|
handleOrderExport () {
|
|
- const params = { order: {
|
|
|
|
- beginDate: this.queryParam.beginDate == null ? getDate.getToday().starttime : this.queryParam.beginDate,
|
|
|
|
- endDate: this.queryParam.endDate == null ? getDate.getToday().endtime : this.queryParam.endDate,
|
|
|
|
- customerMobile: this.queryParam.customerMobile,
|
|
|
|
- orderSn: this.queryParam.orderSn,
|
|
|
|
- orderState: this.queryParam.orderState
|
|
|
|
- } }
|
|
|
|
|
|
+ const params={order:this.queryParam}
|
|
|
|
+ if (this.time && this.time.length) {
|
|
|
|
+ params.order.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
|
|
|
|
+ params.order.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
|
|
|
|
+ } else {
|
|
|
|
+ params.beginDate = ''
|
|
|
|
+ params.endDate = ''
|
|
|
|
+ }
|
|
|
|
+ // const params = { order: {
|
|
|
|
+ // beginDate: this.queryParam.beginDate == null ? getDate.getToday().starttime : this.queryParam.beginDate,
|
|
|
|
+ // endDate: this.queryParam.endDate == null ? getDate.getToday().endtime : this.queryParam.endDate,
|
|
|
|
+ // customerMobile: this.queryParam.customerMobile,
|
|
|
|
+ // orderSn: this.queryParam.orderSn,
|
|
|
|
+ // orderState: this.queryParam.orderState
|
|
|
|
+ // } }
|
|
if (!params.order.beginDate && !params.order.endDate) {
|
|
if (!params.order.beginDate && !params.order.endDate) {
|
|
this.$message.error('请先选择下单时间后查询并导出!')
|
|
this.$message.error('请先选择下单时间后查询并导出!')
|
|
return
|
|
return
|