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