|
@@ -101,6 +101,17 @@
|
|
|
v-hasPermi="['system:post:add']"
|
|
|
>添加经销商</el-button>
|
|
|
</el-col> -->
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="infor"
|
|
|
+ plain
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ @click="handleOrderExport"
|
|
|
+ v-hasPermi="['business:salesite:export']"
|
|
|
+ >导出订单</el-button
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
@@ -205,7 +216,7 @@
|
|
|
<script>
|
|
|
import { listAllChannel} from "@/api/admin/channel";
|
|
|
import { listAreaByPid} from "@/api/admin/area";
|
|
|
-import { listSaleSite, updateSaleSiteStatus} from "@/api/admin/salesite";
|
|
|
+import { listSaleSite, updateSaleSiteStatus,salesiteOrderExport } from "@/api/admin/salesite";
|
|
|
import SiteCreate from './components/Create'
|
|
|
import SiteDetail from './components/Detail'
|
|
|
export default {
|
|
@@ -319,11 +330,34 @@ export default {
|
|
|
this.queryParams.cityId = ""
|
|
|
this.queryParams.areaId = ""
|
|
|
listAreaByPid(0).then(response => {
|
|
|
- // console.log("getProvinceList"+JSON.stringify(response))
|
|
|
this.provinceList = response || [];
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ // 导出订单
|
|
|
+ handleOrderExport() {
|
|
|
+ this.$confirm("是否确认导出订单?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.vloading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "正在导出订单.....",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
+ });
|
|
|
+ return salesiteOrderExport(this.queryParams);
|
|
|
+ })
|
|
|
+ .then((response) => {
|
|
|
+ this.vloading.close();
|
|
|
+ this.download(response.msg);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.vloading.close();
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
getCityList(){
|
|
|
this.cityList = []
|
|
|
this.areaList = []
|
|
@@ -331,7 +365,6 @@ export default {
|
|
|
this.queryParams.areaId = ""
|
|
|
var provinceId = this.queryParams.provinceId
|
|
|
listAreaByPid(provinceId).then(response => {
|
|
|
- // console.log("getCityList"+JSON.stringify(response))
|
|
|
this.cityList = response || [];
|
|
|
});
|
|
|
},
|
|
@@ -339,7 +372,6 @@ export default {
|
|
|
getAreaList(){
|
|
|
var cityId = this.queryParams.cityId
|
|
|
listAreaByPid(cityId).then(response => {
|
|
|
- // console.log("getAreaList"+JSON.stringify(response))
|
|
|
this.areaList = response || [];
|
|
|
});
|
|
|
},
|
|
@@ -356,8 +388,6 @@ export default {
|
|
|
} else { //val为空时,还原数组
|
|
|
this.channelList = this.channelCopyList;
|
|
|
}
|
|
|
- console.log("this.channelList == "+JSON.stringify(this.channelList))
|
|
|
- console.log("this.channelCopyList == "+JSON.stringify(this.channelCopyList))
|
|
|
},
|
|
|
|
|
|
|