|
@@ -27,6 +27,28 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="经销商" >
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.channelId"
|
|
|
+ placeholder="请选择经销商"
|
|
|
+ style="width: 100%;"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ :filter-method="dataFilter"
|
|
|
+ @change="handleQuery"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in siteList"
|
|
|
+ :key="item.channelId"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.channelId">
|
|
|
+ <div>
|
|
|
+ <span style="float: left;">{{item.name}} </span>
|
|
|
+ <span style="float: right;">{{item.mobile}}</span>
|
|
|
+ </div>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<!-- <el-form-item label="经销商">
|
|
|
<el-select
|
|
|
v-model="queryParams.channelId"
|
|
@@ -71,7 +93,18 @@
|
|
|
>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-row :gutter="10">
|
|
|
+ <el-row :gutter="10" style="margin-bottom: 15px;">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="infor"
|
|
|
+ plain
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ @click="handleOrderExport"
|
|
|
+ v-hasPermi="['order:channel:export']"
|
|
|
+ >导出订单</el-button
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
<right-toolbar
|
|
|
:showSearch.sync="showSearch"
|
|
|
@queryTable="getList"
|
|
@@ -194,7 +227,8 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { getOrderList, companyList, channelList } from "@/api/business/order";
|
|
|
+import { getOrderList, companyList, boxList, channelOrderExport} from "@/api/business/order";
|
|
|
+import { listAllSaleSite} from "@/api/admin/salesite";
|
|
|
import { publicFileGetUrl } from "@/api/common";
|
|
|
import SendGoods from "./components/SendGoods";
|
|
|
export default {
|
|
@@ -235,8 +269,13 @@ export default {
|
|
|
goodsInfo: {},
|
|
|
// 盲票组下拉列表
|
|
|
boxData: [],
|
|
|
+ siteList:[],
|
|
|
+ siteCopyList:[],
|
|
|
};
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ this.getSaleSiteList()
|
|
|
+ },
|
|
|
created() {
|
|
|
this.getList();
|
|
|
},
|
|
@@ -273,12 +312,35 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 盲票组列表
|
|
|
- getChannelList(row) {
|
|
|
- channelList({ orderId: row.orderId }).then((res) => {
|
|
|
+ getBoxList(row) {
|
|
|
+ boxList({ orderId: row.orderId }).then((res) => {
|
|
|
this.boxData = res.data;
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ // 获取经销商下拉列表
|
|
|
+ getSaleSiteList(){
|
|
|
+ listAllSaleSite({}).then(response => {
|
|
|
+ this.siteList = response.data || [];
|
|
|
+ this.siteCopyList = response.data || [];
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ dataFilter(val) {
|
|
|
+ this.value = val;
|
|
|
+ if (val) { //val存在
|
|
|
+ this.siteList = this.siteCopyList.filter((item) => {
|
|
|
+ if (!!~item.mobile.indexOf(val) || !!~item.mobile.toUpperCase().indexOf(val.toUpperCase())
|
|
|
+ || !!~item.name.indexOf(val) || !!~item.name.indexOf(val)) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else { //val为空时,还原数组
|
|
|
+ this.siteList = this.siteCopyList;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
//搜索
|
|
|
handleQuery() {
|
|
|
this.getList();
|
|
@@ -327,7 +389,7 @@ export default {
|
|
|
toGoods(row) {
|
|
|
this.goodsShow = true;
|
|
|
this.goodsInfo = row;
|
|
|
- this.getChannelList(row);
|
|
|
+ this.getBoxList(row);
|
|
|
},
|
|
|
|
|
|
// 关闭发货弹框
|
|
@@ -335,6 +397,30 @@ export default {
|
|
|
this.goodsShow = false;
|
|
|
this.getList();
|
|
|
},
|
|
|
+
|
|
|
+ // 导出订单
|
|
|
+ handleOrderExport() {
|
|
|
+ this.$confirm("是否确认导出订单?", "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.vloading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "正在导出订单.....",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
+ });
|
|
|
+ return channelOrderExport(this.queryParams);
|
|
|
+ })
|
|
|
+ .then((response) => {
|
|
|
+ this.vloading.close();
|
|
|
+ this.download(response.msg);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.vloading.close();
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|