|
@@ -23,7 +23,7 @@
|
|
|
<div style="width: 100%">
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
- <el-col :span="4" style="width: 115px">
|
|
|
+ <el-col :span="4" style="width: 110px">
|
|
|
<el-select
|
|
|
:size="searchSize"
|
|
|
v-model="parmValue.status"
|
|
@@ -51,7 +51,7 @@
|
|
|
@timeReturned="timeReturned($event)"
|
|
|
/>
|
|
|
</el-col>
|
|
|
- <el-col :span="4" style="width: 318px; padding: 0 0 0 10px">
|
|
|
+ <el-col :span="4" style="width: 310px; padding: 0 0 0 10px">
|
|
|
<el-input
|
|
|
:size="searchSize"
|
|
|
v-model="input"
|
|
@@ -61,7 +61,7 @@
|
|
|
<el-select
|
|
|
v-model="select"
|
|
|
slot="prepend"
|
|
|
- style="width: 95px"
|
|
|
+ style="width: 88px"
|
|
|
placeholder="请选择"
|
|
|
>
|
|
|
<el-option
|
|
@@ -80,7 +80,7 @@
|
|
|
</el-input>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col
|
|
|
+ <!-- <el-col
|
|
|
:span="4"
|
|
|
style="width: 80px; padding: 0 0 0 10px"
|
|
|
v-if="powers.some((item) => item == '008')"
|
|
@@ -92,7 +92,8 @@
|
|
|
>
|
|
|
重置
|
|
|
</el-button>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
+
|
|
|
<el-col
|
|
|
:span="3"
|
|
|
v-if="powers.some((item) => item == '002')"
|
|
@@ -107,6 +108,21 @@
|
|
|
刷新
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col
|
|
|
+ :span="3"
|
|
|
+ v-if="powers.some((item) => item == '002')"
|
|
|
+ style="width: 80px; padding: 0 0 0 10px; float: right"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ :size="searchSize"
|
|
|
+ :disabled="loading"
|
|
|
+ type="primary"
|
|
|
+ style="float: right"
|
|
|
+ @click="batchExport"
|
|
|
+ >
|
|
|
+ 导出
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
@@ -170,6 +186,7 @@ import asyncRequest from "@/apis/service/mobile/order";
|
|
|
import mixinPage from "@/mixins/elPaginationHandle";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
import { mapGetters } from "vuex";
|
|
|
+import urlConfig from "@/apis/url-config";
|
|
|
import PeriodDatePicker from "@/components/PeriodDatePicker";
|
|
|
export default {
|
|
|
name: "order",
|
|
@@ -196,6 +213,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ fileUrl: urlConfig.baseURL,
|
|
|
selectList: [
|
|
|
{ code: "1", name: "账号" },
|
|
|
{ code: "2", name: "姓名" },
|
|
@@ -358,7 +376,7 @@ export default {
|
|
|
this.tableData.forEach((v1) => {
|
|
|
v1.order_goods_num =
|
|
|
v1.order_num + v1.unit + "/" + v1.unit_weight + "kg";
|
|
|
- v1.order_goods_num_t = (v1.order_num * 1 * (v1.unit_weight * 1))+ "kg";
|
|
|
+ v1.order_goods_num_t = v1.order_num * 1 * (v1.unit_weight * 1) + "kg";
|
|
|
});
|
|
|
console.log(this.tableData);
|
|
|
this.pageInfo.total = Number(res.data.count);
|
|
@@ -370,6 +388,57 @@ export default {
|
|
|
}
|
|
|
this.loading = false;
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 导出
|
|
|
+ */
|
|
|
+ async batchExport() {
|
|
|
+ if (!this.loading) {
|
|
|
+ this.loading = true;
|
|
|
+ let httpType = `application/vnd.ms-excel`;
|
|
|
+ axios({
|
|
|
+ method: "post",
|
|
|
+ url: this.fileUrl +'admin/orderupload',
|
|
|
+ responseType: "blob",
|
|
|
+ data: {},
|
|
|
+ headers: {
|
|
|
+ Accept: httpType,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res && res.status == 200 && res.data) {
|
|
|
+ let blob = new Blob([res.data], {
|
|
|
+ type: httpType,
|
|
|
+ });
|
|
|
+ let url = window.URL.createObjectURL(blob);
|
|
|
+ let aLink = document.createElement("a");
|
|
|
+ aLink.style.display = "none";
|
|
|
+ aLink.href = url;
|
|
|
+ aLink.setAttribute(
|
|
|
+ "download",
|
|
|
+ `未发货订单导出.xls`
|
|
|
+ );
|
|
|
+ document.body.appendChild(aLink);
|
|
|
+ aLink.click();
|
|
|
+ document.body.removeChild(aLink); //下载完成移除元素
|
|
|
+ window.URL.revokeObjectURL(url); //释放掉blob对象
|
|
|
+
|
|
|
+ this.$message.success(`未发货订单导出成功!`);
|
|
|
+ setTimeout(() => {
|
|
|
+ this.loading = false;
|
|
|
+ }, 500);
|
|
|
+ } else {
|
|
|
+ this.$message.error("系统错误,请稍后再试!");
|
|
|
+ setTimeout(() => {
|
|
|
+ this.loading = false;
|
|
|
+ }, 500);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ this.$message.error("系统错误,请稍后再试!");
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|