zhangdan 4 лет назад
Родитель
Сommit
2c340a0e00

+ 9 - 1
src/views/equipmentManage/network/network.vue

@@ -171,7 +171,15 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        return stationListData(Object.assign(parameter, this.queryParam)).then(res => {
+        const searchData = Object.assign(parameter, this.queryParam)
+        if (this.time && this.time.length) {
+          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 {
+          searchData.beginDate = null
+          searchData.endDate = null
+        }
+        return stationListData(searchData).then(res => {
           if (res.status == 200) {
             const no = (res.data.pageNo - 1) * res.data.pageSize
             this.orderTotal = res.data.count

+ 17 - 2
src/views/market/giftCard/giftCard.vue

@@ -119,7 +119,7 @@ import AddCardModal from './addCardModal.vue'
 import EditCardModal from './editCardModal.vue'
 import GetCodeModal from './getCodeModal.vue'
 import { giftCardQuery, giftCardDel } from '@/api/giftCard.js'
-
+import moment from 'moment'
 export default {
   components: { STable, VSelect, GetCodeModal, AddCardModal, EditCardModal },
   data () {
@@ -160,7 +160,22 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        return giftCardQuery(Object.assign(parameter, this.searchData)).then(res => {
+		  const queryParam = Object.assign(parameter, this.searchData)
+		  if (this.time && this.time.length) {
+		    queryParam.startTime = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
+		    queryParam.endTime = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
+		  } else {
+		    queryParam.startTime = ''
+		    queryParam.endTime = ''
+		  }
+      if (this.rechargeTime && this.rechargeTime.length) {
+        queryParam.useTimeStart = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
+        queryParam.useTimeEnd = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
+      } else {
+        queryParam.useTimeStart = ''
+        queryParam.useTimeEnd = ''
+      }
+        return giftCardQuery(queryParam).then(res => {
           const no = (res.data.pageNo - 1) * res.data.pageSize
           if (res.status == 200) {
             for (let i = 0; i < res.data.list.length; i++) {

+ 6 - 6
src/views/releaseRecord/releaseRecordList.vue

@@ -238,8 +238,8 @@ export default {
       loadData: parameter => {
         const searchData = Object.assign(parameter, this.queryParam)
         if (this.queryOrderDate && this.queryOrderDate.length) {
-          searchData.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
-          searchData.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
+          searchData.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD 00:00:00')
+          searchData.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD 23:59:59')
         } else {
           searchData.beginDate = ''
           searchData.endDate = ''
@@ -308,8 +308,8 @@ export default {
     handleExport () {
       const params = this.queryParam
       if (this.queryOrderDate && this.queryOrderDate.length) {
-        params.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
-        params.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
+        params.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD 00:00:00')
+        params.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD 23:59:59')
       } else {
         params.beginDate = ''
         params.endDate = ''
@@ -384,8 +384,8 @@ export default {
     getListTotal () {
 	  const params = this.queryParam
       if (this.queryOrderDate && this.queryOrderDate.length) {
-        params.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
-        params.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
+        params.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD 00:00:00')
+        params.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD 23:59:59')
       } else {
         params.beginDate = ''
         params.endDate = ''

+ 25 - 16
src/views/shop/shopOrder.vue

@@ -116,8 +116,8 @@ export default {
       loadData: parameter => {
         const searchData = Object.assign(parameter, this.queryParam)
         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 {
           searchData.beginDate = ''
           searchData.endDate = ''
@@ -174,13 +174,14 @@ export default {
     },
     // 导出
     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) {
         this.$message.error('请先选择需要导出的下单时间区间再进行导出!')
         return
@@ -199,13 +200,21 @@ export default {
     },
     // 导出订单明细
     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) {
         this.$message.error('请先选择下单时间后查询并导出!')
         return

+ 4 - 4
src/views/userInfo/allLdDetail.vue

@@ -109,8 +109,8 @@ export default {
       loadData: parameter => {
         const searchData = Object.assign(parameter, this.queryParam)
         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 {
           searchData.beginDate = null
           searchData.endDate = null
@@ -169,8 +169,8 @@ export default {
     getTotal () {
       const params = this.queryParam
       if (this.time && this.time.length) {
-        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
-        params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+        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 = null
         params.endDate = null