Sfoglia il codice sorgente

修改导出传参

zhangdan 4 anni fa
parent
commit
cd1afded87
1 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 5 5
      src/views/shop/shopOrder.vue

+ 5 - 5
src/views/shop/shopOrder.vue

@@ -50,7 +50,7 @@
             <a-button
               class="export-btn"
               id="shopOrder-btn-exportDetail"
-			  v-if="$hasPermissions('B_orderManage_exportOrder')"
+              v-if="$hasPermissions('B_orderManage_exportOrder')"
               :loading="loadingDetail"
               @click="handleOrderExport">导出订单明细</a-button>
           </a-col>
@@ -199,19 +199,19 @@ export default {
     },
     // 导出订单明细
     handleOrderExport () {
-      const params = {
+      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.beginDate && !params.endDate) {
+      } }
+      if (!params.order.beginDate && !params.order.endDate) {
         this.$message.error('请先选择下单时间后查询并导出!')
         return
       }
       // 判断两个时间段是否相差m个月  第二个参数指相差单位,第三个参数指是否返回浮点形式(小数)
-      if (moment(params.endDate).diff(moment(params.beginDate), 'months', true) > 3) {
+      if (moment(params.order.endDate).diff(moment(params.order.beginDate), 'months', true) > 3) {
         this.$message.error('仅支持导出最多3个月数据,请先修改下单时间再进行导出!')
         return
       }