|
@@ -4,7 +4,7 @@
|
|
v-loading="loading"
|
|
v-loading="loading"
|
|
:table="table"
|
|
:table="table"
|
|
:data="tableData"
|
|
:data="tableData"
|
|
- :columns="table5"
|
|
|
|
|
|
+ :columns="columns"
|
|
:page="pageInfo"
|
|
:page="pageInfo"
|
|
:size="size"
|
|
:size="size"
|
|
@page-curr-change="handlePageChange"
|
|
@page-curr-change="handlePageChange"
|
|
@@ -35,11 +35,20 @@
|
|
@timeReturned="time"
|
|
@timeReturned="time"
|
|
/>
|
|
/>
|
|
</el-col>
|
|
</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="6" style="width: 163px;">
|
|
|
|
+ <el-input
|
|
|
|
+ :size="searchSize"
|
|
|
|
+ v-model="parmValue.creater"
|
|
|
|
+ :maxlength="40"
|
|
|
|
+ @blur="
|
|
|
|
+ pageInfo.curr = 1;
|
|
|
|
+ parmValue.page = 1;
|
|
|
|
+ searchList();
|
|
|
|
+ "
|
|
|
|
+ placeholder="创建人"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-col>
|
|
|
|
+
|
|
<el-col :span="3" style="width: 66px; float: right">
|
|
<el-col :span="3" style="width: 66px; float: right">
|
|
<el-button
|
|
<el-button
|
|
:size="searchSize"
|
|
:size="searchSize"
|
|
@@ -73,7 +82,7 @@
|
|
>
|
|
>
|
|
<i
|
|
<i
|
|
class="el-icon-view tb-icon"
|
|
class="el-icon-view tb-icon"
|
|
- @click="getRouter('goodsOfflineDetail', scope.row.orderCode)"
|
|
|
|
|
|
+ @click="getRouter('goodsOfflineDetail', scope.row.id)"
|
|
></i>
|
|
></i>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
|
|
|
@@ -88,13 +97,13 @@
|
|
import mixinPage from "@/mixins/elPaginationHandle";
|
|
import mixinPage from "@/mixins/elPaginationHandle";
|
|
import resToken from "@/mixins/resToken";
|
|
import resToken from "@/mixins/resToken";
|
|
import urlConfig from "@/apis/url-config";
|
|
import urlConfig from "@/apis/url-config";
|
|
-import asyncRequest from "@/apis/service/reportQuery/saleReport";
|
|
|
|
|
|
+import asyncRequest from "@/apis/service/goodStore/goodsOffline";
|
|
import periodDatePickerActive from "./period-date-picker/main.vue";
|
|
import periodDatePickerActive from "./period-date-picker/main.vue";
|
|
-import { table5} from "./columns";
|
|
|
|
|
|
+import { columns} from "./columns";
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- name: "saleReport",
|
|
|
|
|
|
+ name: "goodsOffline",
|
|
mixins: [mixinPage, resToken],
|
|
mixins: [mixinPage, resToken],
|
|
components: {
|
|
components: {
|
|
periodDatePickerActive
|
|
periodDatePickerActive
|
|
@@ -127,7 +136,7 @@ export default {
|
|
start_date: "", //起始时间
|
|
start_date: "", //起始时间
|
|
end_date: "", // 结束时间
|
|
end_date: "", // 结束时间
|
|
// is_export:0,//是否导出0/1
|
|
// is_export:0,//是否导出0/1
|
|
-
|
|
|
|
|
|
+ creater:"",//创建人
|
|
page: 1, // 页码
|
|
page: 1, // 页码
|
|
size: 15, // 每页显示条数
|
|
size: 15, // 每页显示条数
|
|
|
|
|
|
@@ -147,11 +156,31 @@ export default {
|
|
total: 0,
|
|
total: 0,
|
|
},
|
|
},
|
|
// 表格表头 - 列参数
|
|
// 表格表头 - 列参数
|
|
- table5: table5,
|
|
|
|
|
|
+ columns: columns,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- alert("此页面暂时只用做开发人员测试、数据不真实")
|
|
|
|
|
|
+ // alert("此页面暂时只用做开发人员测试、数据不真实")
|
|
|
|
+ const { back } = this.$route.query;
|
|
|
|
+
|
|
|
|
+ if (back) {
|
|
|
|
+ this.parmValue = JSON.parse(back);
|
|
|
|
+ console.log(this.parmValue);
|
|
|
|
+ const { page, size } = this.parmValue;
|
|
|
|
+
|
|
|
|
+ this.pageInfo = {
|
|
|
|
+ size: size,
|
|
|
|
+ curr: page,
|
|
|
|
+ total: 0,
|
|
|
|
+ };
|
|
|
|
+ //多选条件
|
|
|
|
+ // this.select = this.parmValue.select;
|
|
|
|
+ // this.sselect = this.parmValue.sselect;
|
|
|
|
+ // this.sinput = this.parmValue.sinput;
|
|
|
|
+ } else {
|
|
|
|
+ // this.select = "1";
|
|
|
|
+ // this.sselect = "创建时间"
|
|
|
|
+ }
|
|
this.searchList();
|
|
this.searchList();
|
|
},
|
|
},
|
|
|
|
|
|
@@ -190,10 +219,11 @@ export default {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
this.loading = true;
|
|
this.loading = true;
|
|
-
|
|
|
|
- const res = await asyncRequest.saleexportnotsigned(this.parmValue);
|
|
|
|
|
|
+ console.log(this.parmValue)
|
|
|
|
+ const res = await asyncRequest.goodofflist(this.parmValue);
|
|
if (res && res.code === 0 && res.data) {
|
|
if (res && res.code === 0 && res.data) {
|
|
this.tableData = res.data.list;
|
|
this.tableData = res.data.list;
|
|
|
|
+
|
|
this.pageInfo.total = Number(res.data.count);
|
|
this.pageInfo.total = Number(res.data.count);
|
|
} else if (res && res.code >= 100 && res.code <= 104) {
|
|
} else if (res && res.code >= 100 && res.code <= 104) {
|
|
await this.logout();
|
|
await this.logout();
|
|
@@ -210,6 +240,7 @@ export default {
|
|
this.parmValue = {
|
|
this.parmValue = {
|
|
start_date: "", //新建起始时间
|
|
start_date: "", //新建起始时间
|
|
end_date: "", // 新建结束时间
|
|
end_date: "", // 新建结束时间
|
|
|
|
+ creater:"",//创建人
|
|
// is_export:0,//是否导出0/1
|
|
// is_export:0,//是否导出0/1
|
|
page: 1, // 页码
|
|
page: 1, // 页码
|
|
size: 15, // 每页显示条数
|
|
size: 15, // 每页显示条数
|
|
@@ -245,77 +276,7 @@ export default {
|
|
//选中的数组集合
|
|
//选中的数组集合
|
|
this.changeList = list.length > 0 ? JSON.parse(JSON.stringify(list)) : [];
|
|
this.changeList = list.length > 0 ? JSON.parse(JSON.stringify(list)) : [];
|
|
},
|
|
},
|
|
- //导出文件
|
|
|
|
- async download() {
|
|
|
|
- // if(this.changeList.length<=0){
|
|
|
|
- // this.$message.warning("请选择有效数据")
|
|
|
|
- // return;
|
|
|
|
- // }
|
|
|
|
- let model = JSON.parse(JSON.stringify(this.parmValue))
|
|
|
|
- // model.is_export = 1;
|
|
|
|
- let start_date = new Date(this.parmValue.start_date).valueOf();
|
|
|
|
- let end_date = new Date(this.parmValue.end_date).valueOf();
|
|
|
|
- let flag = end_date - start_date > 30 * 24 * 60 * 60 * 1000;
|
|
|
|
- if(this.parmValue.start_date != "" && this.parmValue.end_date != ""){
|
|
|
|
- if(flag){
|
|
|
|
- this.$message.warning("导出文件的时间区间不能超过30天")
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- this.$message.warning("请选择导出文件的时间区间")
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if (!this.loading) {
|
|
|
|
- this.loading = true;
|
|
|
|
- let httpType = `aplication/zip`;
|
|
|
|
- axios({
|
|
|
|
- method: "post",
|
|
|
|
- url: this.fileUrl + "admin/saleexportnotsignedexport",
|
|
|
|
- responseType: "blob",
|
|
|
|
- data: model,
|
|
|
|
- headers: {
|
|
|
|
- // 'Content-Type': 'multipart/form-data',
|
|
|
|
- // Accept: "application/vnd.ms-excel"
|
|
|
|
- Accept: httpType,
|
|
|
|
- },
|
|
|
|
- })
|
|
|
|
- .then((res) => {
|
|
|
|
- // console.log(res)
|
|
|
|
- // console.log(this.fileUrl)
|
|
|
|
- // return;
|
|
|
|
- if (res && res.status == 200 && res.data) {
|
|
|
|
- let url = window.URL.createObjectURL(
|
|
|
|
- new Blob([res.data], {
|
|
|
|
- // type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8",
|
|
|
|
- type: httpType
|
|
|
|
- })
|
|
|
|
- );
|
|
|
|
- let link = document.createElement("a");
|
|
|
|
- link.style.display = "none";
|
|
|
|
- link.href = url;
|
|
|
|
- let excelName = "未签收报表.zip";
|
|
|
|
- link.setAttribute("download", excelName);
|
|
|
|
- document.body.appendChild(link);
|
|
|
|
- link.click();
|
|
|
|
- link.remove();
|
|
|
|
- window.URL.revokeObjectURL(url); //释放掉blob对象
|
|
|
|
- this.$message.success(`导出成功!`);
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.loading = false;
|
|
|
|
- }, 500);
|
|
|
|
- } else {
|
|
|
|
- this.$message.error(res.data.message);
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.loading = false;
|
|
|
|
- }, 500);
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- .catch((error) => {
|
|
|
|
- console.log(error);
|
|
|
|
- this.loading = false;
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|