|
@@ -21,17 +21,15 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
- <el-col :span="6" style="width: 150px">
|
|
|
- <el-date-picker
|
|
|
+ <el-col :span="6" style="width: 292px">
|
|
|
+ <period-date-picker
|
|
|
+ :start="parmValue.start"
|
|
|
+ :end="parmValue.end"
|
|
|
+ :type="2"
|
|
|
+ :width="'135px'"
|
|
|
:size="searchSize"
|
|
|
- style="width: 100%"
|
|
|
- value-format="yyyy-MM"
|
|
|
- :clearable="true"
|
|
|
- v-model="parmValue.month"
|
|
|
- type="month"
|
|
|
- placeholder="选择月"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
+ @timeReturned="timeReturned($event)"
|
|
|
+ />
|
|
|
</el-col>
|
|
|
<el-col
|
|
|
:span="4"
|
|
@@ -72,14 +70,14 @@
|
|
|
<script>
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
import urlConfig from "@/apis/url-config";
|
|
|
+import PeriodDatePicker from "@/components/PeriodDatePicker";
|
|
|
import { mapGetters } from "vuex";
|
|
|
-// import PeriodDatePicker from "@/components/PeriodDatePicker";
|
|
|
export default {
|
|
|
name: "standBook",
|
|
|
mixins: [resToken],
|
|
|
- // components: {
|
|
|
- // PeriodDatePicker,
|
|
|
- // },
|
|
|
+ components: {
|
|
|
+ PeriodDatePicker,
|
|
|
+ },
|
|
|
computed: {
|
|
|
//组件SIZE设置
|
|
|
...mapGetters(["tablebtnSize", "searchSize", "size"]),
|
|
@@ -127,7 +125,8 @@ export default {
|
|
|
|
|
|
fileUrl: urlConfig.baseURL + "Admin/",
|
|
|
parmValue: {
|
|
|
- month: "",
|
|
|
+ start:"",
|
|
|
+ end:"",
|
|
|
},
|
|
|
// 表格 - 数据
|
|
|
tableData: [],
|
|
@@ -136,7 +135,7 @@ export default {
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
restSearch() {
|
|
|
- console.log("123456789");
|
|
|
+ // console.log("123456789");
|
|
|
this.value = "1";
|
|
|
this.parmValue = {
|
|
|
starttime: "",
|
|
@@ -144,14 +143,27 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
|
|
|
+ async timeReturned(e) {
|
|
|
+ if (e.startTime !== "") {
|
|
|
+ this.parmValue.start = e.startTime;
|
|
|
+ } else {
|
|
|
+ this.parmValue.start = "";
|
|
|
+ }
|
|
|
+ if (e.endTime !== "") {
|
|
|
+ this.parmValue.end = e.endTime;
|
|
|
+ } else {
|
|
|
+ this.parmValue.end = "";
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
/**
|
|
|
* 批量导出开票信息
|
|
|
* * @param {Array} selection //选中的对账编码
|
|
|
*/
|
|
|
async batchExport() {
|
|
|
if (!this.loading) {
|
|
|
- if (this.parmValue.month === "") {
|
|
|
- this.$message.warning("请选择月份!");
|
|
|
+ if (this.parmValue.start === "" || this.parmValue.end === "") {
|
|
|
+ this.$message.warning("请选择时间区间!");
|
|
|
return;
|
|
|
}
|
|
|
this.loading = true;
|
|
@@ -193,7 +205,7 @@ export default {
|
|
|
aLink.href = url;
|
|
|
aLink.setAttribute(
|
|
|
"download",
|
|
|
- `${this.parmValue.month}月${title}.zip`
|
|
|
+ `${this.parmValue.start}至${this.parmValue.end}${title}.zip`
|
|
|
);
|
|
|
document.body.appendChild(aLink);
|
|
|
aLink.click();
|