|
@@ -1,144 +1,167 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <ex-table
|
|
|
- v-loading="loading"
|
|
|
- :table="table"
|
|
|
- :data="tableData"
|
|
|
- :columns="table16"
|
|
|
- :page="pageInfo"
|
|
|
- :size="size"
|
|
|
- @page-curr-change="handlePageChange"
|
|
|
- @page-size-change="handleSizeChange"
|
|
|
- @screen-reset="
|
|
|
- pageInfo.curr = 1;
|
|
|
- parmValue.page = 1;
|
|
|
- searchList();
|
|
|
- "
|
|
|
- @screen-submit="
|
|
|
- pageInfo.curr = 1;
|
|
|
- parmValue.page = 1;
|
|
|
- searchList();
|
|
|
- "
|
|
|
- @selection="selection_change"
|
|
|
- >
|
|
|
- <template #table-header="{}">
|
|
|
- <div style="width: 100%">
|
|
|
- <el-row style="padding: 0 0 0 80px">
|
|
|
-
|
|
|
- <el-col :span="6" style="width: 363px;">
|
|
|
- <periodDatePickerActive
|
|
|
- :start="parmValue.start_date"
|
|
|
- :end="parmValue.end_date"
|
|
|
- :placeholder="'下单'"
|
|
|
- :width="'165px'"
|
|
|
- :size="searchSize"
|
|
|
- @timeReturned="time"
|
|
|
- />
|
|
|
- </el-col>
|
|
|
- <el-col :span="6" style="width: 200px">
|
|
|
-
|
|
|
+ <div>
|
|
|
+ <ex-table
|
|
|
+ v-loading="loading"
|
|
|
+ :table="table"
|
|
|
+ :data="tableData"
|
|
|
+ :columns="table16"
|
|
|
+ :page="pageInfo"
|
|
|
+ :size="size"
|
|
|
+ @page-curr-change="handlePageChange"
|
|
|
+ @page-size-change="handleSizeChange"
|
|
|
+ @screen-reset="
|
|
|
+ pageInfo.curr = 1;
|
|
|
+ parmValue.page = 1;
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ @screen-submit="
|
|
|
+ pageInfo.curr = 1;
|
|
|
+ parmValue.page = 1;
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ @selection="selection_change"
|
|
|
+ >
|
|
|
+ <template #table-header="{}">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-row style="padding: 0 0 0 80px">
|
|
|
+ <el-col :span="6" style="width: 363px">
|
|
|
+ <periodDatePickerActive
|
|
|
+ :start="parmValue.start_date"
|
|
|
+ :end="parmValue.end_date"
|
|
|
+ :placeholder="'下单'"
|
|
|
+ :width="'165px'"
|
|
|
+ :size="searchSize"
|
|
|
+ @timeReturned="time"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" style="width: 200px">
|
|
|
+ <el-select
|
|
|
+ :size="searchSize"
|
|
|
+ v-model="parmValue.status"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ placeholder="发货申请单状态"
|
|
|
+ style="width: 100%"
|
|
|
+ @change="
|
|
|
+ pageInfo.curr = 1;
|
|
|
+ parmValue.page = 1;
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-option label="待发货" value="0"></el-option>
|
|
|
+ <el-option label="待库管发货" value="1"></el-option>
|
|
|
+ <el-option label="已发货待收货" value="2"></el-option>
|
|
|
+ <el-option label="已收货" value="3"></el-option>
|
|
|
+ <el-option label="已全部退货" value="4"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" style="width: 200px; padding: 0 0 0 10px">
|
|
|
+ <el-select
|
|
|
+ :size="searchSize"
|
|
|
+ v-model="parmValue.order_type"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ placeholder="商品类型"
|
|
|
+ style="width: 100%"
|
|
|
+ @change="
|
|
|
+ pageInfo.curr = 1;
|
|
|
+ parmValue.page = 1;
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in xs_order_type_options"
|
|
|
+ :key="item.id + index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4" style="width: 66px; float: right">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ style="margin-left: 30px"
|
|
|
+ @click="download"
|
|
|
+ :size="searchSize"
|
|
|
+ class="fr"
|
|
|
+ >
|
|
|
+ 导出
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" style="width: 66px; float: right">
|
|
|
+ <el-button
|
|
|
+ :size="searchSize"
|
|
|
+ type="primary"
|
|
|
+ style="float: right; margin-left: 5px"
|
|
|
+ @click="searchList"
|
|
|
+ >
|
|
|
+ 刷新
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="padding: 10px 0 0 0">
|
|
|
+ <el-col :span="6" style="width: 353px">
|
|
|
+ <periodDatePickerActive
|
|
|
+ :start="parmValue.start_date22"
|
|
|
+ :end="parmValue.end_date22"
|
|
|
+ :placeholder="'发货'"
|
|
|
+ :width="'165px'"
|
|
|
+ :size="searchSize"
|
|
|
+ @timeReturned="time2"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4" style="width: 170px; padding: 0 0 0 10px">
|
|
|
+ <el-input
|
|
|
+ placeholder="申请人部门"
|
|
|
+ v-model="parmValue.apply_company"
|
|
|
+ :size="searchSize"
|
|
|
+ maxlength="100"
|
|
|
+ @blur="
|
|
|
+ pageInfo.curr = 1;
|
|
|
+ parmValue.page = 1;
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-col>
|
|
|
|
|
|
- <el-select
|
|
|
- :size="searchSize"
|
|
|
- v-model="parmValue.status"
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- placeholder="发货申请单状态"
|
|
|
- style="width: 100%"
|
|
|
- @change="
|
|
|
- pageInfo.curr = 1;
|
|
|
- parmValue.page = 1;
|
|
|
- searchList();
|
|
|
- "
|
|
|
- >
|
|
|
- <el-option label="待发货" value="0"></el-option>
|
|
|
- <el-option label="待库管发货" value="1"></el-option>
|
|
|
- <el-option label="已发货待收货" value="2"></el-option>
|
|
|
- <el-option label="已收货" value="3"></el-option>
|
|
|
- <el-option label="已全部退货" value="4"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-col>
|
|
|
- <el-col :span="4" style="width: 66px; float: right">
|
|
|
- <el-button type="primary" style="margin-left:30px;" @click="download" :size="searchSize" class="fr">
|
|
|
- 导出
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="3" style="width: 66px; float: right">
|
|
|
- <el-button
|
|
|
- :size="searchSize"
|
|
|
- type="primary"
|
|
|
- style="float: right; margin-left: 5px"
|
|
|
- @click="searchList"
|
|
|
- >
|
|
|
- 刷新
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- </el-row>
|
|
|
- <el-row style="padding: 10px 0 0 0">
|
|
|
- <el-col :span="6" style="width: 353px;">
|
|
|
- <periodDatePickerActive
|
|
|
- :start="parmValue.start_date22"
|
|
|
- :end="parmValue.end_date22"
|
|
|
- :placeholder="'发货'"
|
|
|
- :width="'165px'"
|
|
|
- :size="searchSize"
|
|
|
- @timeReturned="time2"
|
|
|
- />
|
|
|
- </el-col>
|
|
|
- <el-col :span="4" style="width: 170px; padding: 0 0 0 10px">
|
|
|
- <el-input
|
|
|
- placeholder="申请人部门"
|
|
|
- v-model="parmValue.apply_company"
|
|
|
- :size="searchSize"
|
|
|
- maxlength="100"
|
|
|
- @blur="
|
|
|
- pageInfo.curr = 1;
|
|
|
- parmValue.page = 1;
|
|
|
- searchList();
|
|
|
- "
|
|
|
- >
|
|
|
- </el-input>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :span="4" style="width: 66px; float: right">
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- class="fr"
|
|
|
- :size="searchSize"
|
|
|
- @click="restSearch"
|
|
|
- >
|
|
|
- 重置
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
-
|
|
|
-
|
|
|
- </ex-table>
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
+ <el-col :span="4" style="width: 66px; float: right">
|
|
|
+ <el-button type="warning" class="fr" :size="searchSize" @click="restSearch">
|
|
|
+ 重置
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #order_type="{ scope }">
|
|
|
+ <el-tag
|
|
|
+ :size="tablebtnSize"
|
|
|
+ v-text="
|
|
|
+ (xs_order_type_options.find((item) => item.id == scope.row.order_type) || {})
|
|
|
+ .label || '--'
|
|
|
+ "
|
|
|
+ ></el-tag>
|
|
|
+ </template>
|
|
|
+ </ex-table>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
- <script>
|
|
|
+<script>
|
|
|
import mixinPage from "@/mixins/elPaginationHandle";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
import urlConfig from "@/apis/url-config";
|
|
|
import asyncRequest from "@/apis/service/reportQuery/saleReport";
|
|
|
import periodDatePickerActive from "../period-date-picker/main.vue";
|
|
|
-import { table16} from "./columns";
|
|
|
+import { table16 } from "./columns";
|
|
|
import { mapGetters } from "vuex";
|
|
|
-
|
|
|
+import { xs_order_type_options } from "@/assets/js/statusList";
|
|
|
export default {
|
|
|
name: "saleReport",
|
|
|
mixins: [mixinPage, resToken],
|
|
|
components: {
|
|
|
- periodDatePickerActive
|
|
|
+ periodDatePickerActive,
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(["tablebtnSize", "searchSize", "size"]),
|
|
|
-
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -148,17 +171,18 @@ export default {
|
|
|
fileUrl: urlConfig.baseURL,
|
|
|
//loading
|
|
|
loading: false,
|
|
|
+ xs_order_type_options,
|
|
|
//请求参数集合
|
|
|
parmValue: {
|
|
|
- start_date: "", //起始时间
|
|
|
- end_date: "", // 结束时间
|
|
|
+ start_date: "", //起始时间
|
|
|
+ end_date: "", // 结束时间
|
|
|
start_sendtime: "", //起始时间22
|
|
|
end_sendtime: "", // 结束时间22
|
|
|
- status:"", //状态
|
|
|
- apply_company:"",//部门
|
|
|
+ status: "", //状态
|
|
|
+ apply_company: "", //部门
|
|
|
page: 1, // 页码
|
|
|
size: 15, // 每页显示条数
|
|
|
-
|
|
|
+ order_type: "",
|
|
|
},
|
|
|
// 表格 - 数据集合
|
|
|
tableData: [],
|
|
@@ -179,7 +203,6 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
-
|
|
|
this.searchList();
|
|
|
},
|
|
|
|
|
@@ -203,7 +226,7 @@ export default {
|
|
|
}
|
|
|
// return;
|
|
|
this.loading = true;
|
|
|
-
|
|
|
+
|
|
|
const res = await asyncRequest.seooa(this.parmValue);
|
|
|
if (res && res.code === 0 && res.data) {
|
|
|
this.tableData = res.data.list;
|
|
@@ -216,16 +239,17 @@ export default {
|
|
|
}
|
|
|
this.loading = false;
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
//重置
|
|
|
restSearch() {
|
|
|
this.parmValue = {
|
|
|
start_date: "", //起始时间
|
|
|
- end_date: "", // 结束时间
|
|
|
+ end_date: "", // 结束时间
|
|
|
start_sendtime: "", //起始时间22
|
|
|
end_sendtime: "", // 结束时间22
|
|
|
- status:"", //状态
|
|
|
- apply_company:"",//部门
|
|
|
+ status: "", //状态
|
|
|
+ apply_company: "", //部门
|
|
|
+ order_type: "",
|
|
|
page: 1, // 页码
|
|
|
size: 15, // 每页显示条数
|
|
|
};
|
|
@@ -237,7 +261,7 @@ export default {
|
|
|
};
|
|
|
this.searchList();
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 时间函数
|
|
|
async time(e) {
|
|
|
this.parmValue.start_date = e.startTime || "";
|
|
@@ -268,13 +292,13 @@ export default {
|
|
|
this.parmValue.page = 1;
|
|
|
await this.searchList();
|
|
|
},
|
|
|
- //选中触发函数
|
|
|
+ //选中触发函数
|
|
|
selection_change(e) {
|
|
|
const { list } = e;
|
|
|
//选中的数组集合
|
|
|
this.changeList = list.length > 0 ? JSON.parse(JSON.stringify(list)) : [];
|
|
|
},
|
|
|
- //导出文件
|
|
|
+ //导出文件
|
|
|
async download() {
|
|
|
// if(this.changeList.length<=0){
|
|
|
// this.$message.warning("请选择有效数据")
|
|
@@ -295,22 +319,31 @@ export default {
|
|
|
this.$message.warning("时间区间不完整!");
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
- if((this.parmValue.start_date != "" && this.parmValue.end_date != "") || (this.parmValue.start_sendtime != "" && this.parmValue.end_sendtime != "")){
|
|
|
- let start_date = new Date(this.parmValue.start_date).valueOf() || new Date(this.parmValue.start_sendtime).valueOf() ;
|
|
|
- let end_date = new Date(this.parmValue.end_date).valueOf() || new Date(this.parmValue.end_sendtime).valueOf() ;
|
|
|
- let start_date2 = new Date(this.parmValue.start_sendtime).valueOf() ;
|
|
|
- let end_date2 = new Date(this.parmValue.end_sendtime).valueOf() ;
|
|
|
- let flag = (end_date - start_date > 30 * 24 * 60 * 60 * 1000) || (end_date2 - start_date2 > 30 * 24 * 60 * 60 * 1000) ;
|
|
|
- if(flag){
|
|
|
- this.$message.warning("导出文件的时间区间不能超过30天")
|
|
|
+
|
|
|
+ if (
|
|
|
+ (this.parmValue.start_date != "" && this.parmValue.end_date != "") ||
|
|
|
+ (this.parmValue.start_sendtime != "" && this.parmValue.end_sendtime != "")
|
|
|
+ ) {
|
|
|
+ let start_date =
|
|
|
+ new Date(this.parmValue.start_date).valueOf() ||
|
|
|
+ new Date(this.parmValue.start_sendtime).valueOf();
|
|
|
+ let end_date =
|
|
|
+ new Date(this.parmValue.end_date).valueOf() ||
|
|
|
+ new Date(this.parmValue.end_sendtime).valueOf();
|
|
|
+ let start_date2 = new Date(this.parmValue.start_sendtime).valueOf();
|
|
|
+ let end_date2 = new Date(this.parmValue.end_sendtime).valueOf();
|
|
|
+ let flag =
|
|
|
+ end_date - start_date > 30 * 24 * 60 * 60 * 1000 ||
|
|
|
+ end_date2 - start_date2 > 30 * 24 * 60 * 60 * 1000;
|
|
|
+ if (flag) {
|
|
|
+ this.$message.warning("导出文件的时间区间不能超过30天");
|
|
|
return;
|
|
|
}
|
|
|
- }else{
|
|
|
- this.$message.warning("请选择至少一种导出文件的时间区间")
|
|
|
+ } else {
|
|
|
+ this.$message.warning("请选择至少一种导出文件的时间区间");
|
|
|
return;
|
|
|
}
|
|
|
- let model = JSON.parse(JSON.stringify(this.parmValue))
|
|
|
+ let model = JSON.parse(JSON.stringify(this.parmValue));
|
|
|
// model.is_export = 1;
|
|
|
if (!this.loading) {
|
|
|
this.loading = true;
|
|
@@ -334,13 +367,13 @@ export default {
|
|
|
let url = window.URL.createObjectURL(
|
|
|
new Blob([res.data], {
|
|
|
// type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8",
|
|
|
- type: httpType
|
|
|
+ type: httpType,
|
|
|
})
|
|
|
);
|
|
|
let link = document.createElement("a");
|
|
|
link.style.display = "none";
|
|
|
link.href = url;
|
|
|
- let excelName = "有地址待发货订单.zip";
|
|
|
+ let excelName = "直接发货申请单.zip";
|
|
|
link.setAttribute("download", excelName);
|
|
|
document.body.appendChild(link);
|
|
|
link.click();
|
|
@@ -366,9 +399,8 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
- <style lang="scss" scoped>
|
|
|
+<style lang="scss" scoped>
|
|
|
.purchaseOrder {
|
|
|
// text-align: right;
|
|
|
}
|
|
|
</style>
|
|
|
-
|