|
|
@@ -27,6 +27,8 @@
|
|
|
</el-date-picker>
|
|
|
<el-button type="primary" @click="getRows">搜索</el-button>
|
|
|
<el-button type="warning" @click="refreshTable">清空</el-button>
|
|
|
+ <el-button type="warning" @click="excelReport">导出</el-button>
|
|
|
+
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-table :data="tableData" ref="table" :height="autoHeight" border stripe v-loading="loading"
|
|
|
@@ -155,9 +157,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {utils} from "../utils/config";
|
|
|
import * as Api from "../utils/server"
|
|
|
- import {Message} from "element-ui"
|
|
|
|
|
|
export default {
|
|
|
name: "",
|
|
|
@@ -177,8 +177,8 @@
|
|
|
downPaymentRate: '' // 比例
|
|
|
},
|
|
|
queryData: {
|
|
|
- skuName:'',
|
|
|
- searchDate:'',
|
|
|
+ skuName: '',
|
|
|
+ searchDate: '',
|
|
|
status: '',//订单状态
|
|
|
orderCode: '', //订单号
|
|
|
customerMobile: '', //注册手机号
|
|
|
@@ -334,11 +334,25 @@
|
|
|
sessionStorage.removeItem('imgUrls');
|
|
|
},
|
|
|
methods: {
|
|
|
+ excelReport() {
|
|
|
+ let baseUrlStr = Api.api;
|
|
|
+ if (typeof (this.queryData.searchDate) != "undefined") {
|
|
|
+ window.location.href = baseUrlStr + "/" + "business/Order/excel?" +
|
|
|
+ "skuName=" + this.queryData.skuName + "&startTime=" + this.queryData.searchDate[0] + "&endTime=" + this.queryData.searchDate[1] +
|
|
|
+ "&orderCode=" + this.queryData.orderCode + "&receiptMobile=" + this.queryData.receiptMobile + "&receiptName=" + this.queryData.receiptName + "&status=" + this.queryData.status;
|
|
|
+
|
|
|
+ } else {
|
|
|
+ window.location.href = baseUrlStr + "/" + "business/Order/excel?" +
|
|
|
+ "skuName=" + this.queryData.skuName +
|
|
|
+ "&orderCode=" + this.queryData.orderCode + "&receiptMobile=" + this.queryData.receiptMobile + "&receiptName=" + this.queryData.receiptName + "&status=" + this.queryData.status;
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
getRows() {
|
|
|
let data;
|
|
|
- if (typeof(this.queryData.searchDate) != "undefined"){
|
|
|
- data = {
|
|
|
- skuName:this.queryData.skuName,
|
|
|
+ if (typeof (this.queryData.searchDate) != "undefined") {
|
|
|
+ data = {
|
|
|
+ skuName: this.queryData.skuName,
|
|
|
startTime: this.queryData.searchDate[0],
|
|
|
endTime: this.queryData.searchDate[1],
|
|
|
orderCode: this.queryData.orderCode,
|
|
|
@@ -349,10 +363,9 @@
|
|
|
currentPage: this.currentPage,
|
|
|
pageNumber: this.pageSize
|
|
|
};
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
data = {
|
|
|
- skuName:this.queryData.skuName,
|
|
|
-
|
|
|
+ skuName: this.queryData.skuName,
|
|
|
orderCode: this.queryData.orderCode,
|
|
|
customerName: this.queryData.customerName,
|
|
|
receiptMobile: this.queryData.receiptMobile,
|
|
|
@@ -374,9 +387,6 @@
|
|
|
this.$message.error("服务器连接异常");
|
|
|
}
|
|
|
},
|
|
|
- response => {
|
|
|
- this.$message.error("服务器连接异常");
|
|
|
- }
|
|
|
);
|
|
|
},
|
|
|
checkWriteOffVirtual() {
|
|
|
@@ -413,7 +423,14 @@
|
|
|
this.$router.push({path: '/home/orderDetails', query: {id: id}})
|
|
|
},
|
|
|
refreshTable() {
|
|
|
- this.queryData = {};
|
|
|
+ this.queryData = {
|
|
|
+ skuName:'',
|
|
|
+ orderCode:'',
|
|
|
+ customerName:'',
|
|
|
+ receiptMobile:'',
|
|
|
+ receiptName:'',
|
|
|
+ status:''
|
|
|
+ };
|
|
|
this.getRows();
|
|
|
},
|
|
|
pageChange: function (page) {
|