|
@@ -23,132 +23,127 @@
|
|
|
>
|
|
|
<template #table-header="{ selection }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-row style="padding: 0 0 0 80px">
|
|
|
+ <el-row style="padding: 0 0 10px 80px">
|
|
|
<el-col :span="24">
|
|
|
- <el-col :span="12" style="width: 436px">
|
|
|
- <el-select
|
|
|
- v-model="code"
|
|
|
- multiple
|
|
|
- filterable
|
|
|
- remote
|
|
|
- :multiple-limit="1"
|
|
|
- reserve-keyword
|
|
|
+ <el-col :span="6" style="width: 296px; padding: 0">
|
|
|
+ <period-date-picker
|
|
|
+ :start="parmValue.starttime"
|
|
|
+ :end="parmValue.endtime"
|
|
|
+ :type="1"
|
|
|
+ :width="'135px'"
|
|
|
:size="searchSize"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="公司名称"
|
|
|
- :remote-method="remoteMethod"
|
|
|
- :loading="selectLoading"
|
|
|
- @change="selectChange"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in activeOptions"
|
|
|
- :key="item.companyNo"
|
|
|
- :label="item.companyName"
|
|
|
- :value="item.companyNo"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
+ @timeReturned="timeReturned($event)"
|
|
|
+ ></period-date-picker>
|
|
|
</el-col>
|
|
|
- <el-col :span="4" style="width: 54px">
|
|
|
+
|
|
|
+ <el-col
|
|
|
+ :span="4"
|
|
|
+ style="width: 153px"
|
|
|
+ class="fr"
|
|
|
+ v-if="powers.some((item) => item == '046')"
|
|
|
+ >
|
|
|
<el-button
|
|
|
- :size="searchSize"
|
|
|
type="primary"
|
|
|
class="fr"
|
|
|
- icon="el-icon-search"
|
|
|
- @click="searchList" /></el-col
|
|
|
- ><el-col
|
|
|
- :span="4"
|
|
|
- style="width: 66px"
|
|
|
- v-if="powers.some((item) => item == '024')"
|
|
|
+ icon="el-icon-download"
|
|
|
+ :size="searchSize"
|
|
|
+ @click="batchExport(selection)"
|
|
|
+ >批量导出开票信息</el-button
|
|
|
+ ></el-col
|
|
|
>
|
|
|
+ <el-col :span="4" style="width: 153px" class="fr">
|
|
|
<el-button
|
|
|
- type="warning"
|
|
|
+ type="primary"
|
|
|
class="fr"
|
|
|
+ :disabled="downLoading"
|
|
|
+ @click="showModel = true"
|
|
|
+ icon="el-icon-upload2"
|
|
|
:size="searchSize"
|
|
|
- @click="restSearch"
|
|
|
+ >批量导入开票信息</el-button
|
|
|
>
|
|
|
- 重置
|
|
|
- </el-button>
|
|
|
</el-col>
|
|
|
<el-col
|
|
|
:span="4"
|
|
|
- style="width: 66px"
|
|
|
+ style="width: 140px"
|
|
|
class="fr"
|
|
|
- v-if="powers.some((item) => item == '002')"
|
|
|
+ v-if="powers.some((item) => item == '023')"
|
|
|
>
|
|
|
<el-button
|
|
|
- :size="searchSize"
|
|
|
type="primary"
|
|
|
- style="float: right"
|
|
|
- @click="searchList"
|
|
|
+ class="fr"
|
|
|
+ icon="el-icon-download"
|
|
|
+ :size="searchSize"
|
|
|
+ :disabled="downLoading"
|
|
|
+ @click="dlTemplate"
|
|
|
+ >下载导入模板</el-button
|
|
|
>
|
|
|
- 刷新
|
|
|
- </el-button>
|
|
|
</el-col>
|
|
|
- <el-col
|
|
|
- :span="4"
|
|
|
- style="width: 83px"
|
|
|
- class="fr"
|
|
|
- v-if="powers.some((item) => item == '046')"
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="padding: 0">
|
|
|
+ <el-col :span="12" style="width: 460px">
|
|
|
+ <el-select
|
|
|
+ v-model="code"
|
|
|
+ multiple
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ :multiple-limit="1"
|
|
|
+ reserve-keyword
|
|
|
+ :size="searchSize"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="公司名称"
|
|
|
+ :remote-method="remoteMethod"
|
|
|
+ :loading="selectLoading"
|
|
|
+ @change="selectChange"
|
|
|
>
|
|
|
- <el-tooltip
|
|
|
- class="item"
|
|
|
- effect="dark"
|
|
|
- content="批量导出开票信息"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- class="fr"
|
|
|
- icon="el-icon-download"
|
|
|
- :size="searchSize"
|
|
|
- @click="batchExport(selection)"
|
|
|
- >导出</el-button
|
|
|
- ></el-tooltip
|
|
|
- ></el-col
|
|
|
+ <el-option
|
|
|
+ v-for="item in activeOptions"
|
|
|
+ :key="item.companyNo"
|
|
|
+ :label="item.companyName"
|
|
|
+ :value="item.companyNo"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col
|
|
|
+ :span="4"
|
|
|
+ style="width: 66px"
|
|
|
+ class="fr"
|
|
|
+ v-if="powers.some((item) => item == '002')"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ :size="searchSize"
|
|
|
+ type="primary"
|
|
|
+ style="float: right"
|
|
|
+ @click="searchList"
|
|
|
>
|
|
|
- <el-col :span="4" style="width: 83px" class="fr">
|
|
|
- <el-tooltip
|
|
|
- v-if="powers.some((item) => item == '047')"
|
|
|
- class="item"
|
|
|
- effect="dark"
|
|
|
- content="批量导入开票信息"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- class="fr"
|
|
|
- :disabled="downLoading"
|
|
|
- @click="showModel = true"
|
|
|
- icon="el-icon-upload2"
|
|
|
- :size="searchSize"
|
|
|
- >导入</el-button
|
|
|
- ></el-tooltip
|
|
|
- >
|
|
|
- </el-col>
|
|
|
- <el-col
|
|
|
- :span="4"
|
|
|
- style="width: 83px"
|
|
|
+ 刷新
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col
|
|
|
+ :span="4"
|
|
|
+ class="fr"
|
|
|
+ style="width: 66px"
|
|
|
+ v-if="powers.some((item) => item == '024')"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
class="fr"
|
|
|
- v-if="powers.some((item) => item == '023')"
|
|
|
+ :size="searchSize"
|
|
|
+ @click="restSearch"
|
|
|
>
|
|
|
- <el-tooltip
|
|
|
- class="item"
|
|
|
- effect="dark"
|
|
|
- content="下载导入模板"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- class="fr"
|
|
|
- icon="el-icon-download"
|
|
|
- :size="searchSize"
|
|
|
- :disabled="downLoading"
|
|
|
- @click="dlTemplate"
|
|
|
- >模板</el-button
|
|
|
- >
|
|
|
- </el-tooltip>
|
|
|
- </el-col>
|
|
|
+ 重置
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
+
|
|
|
+ <el-col :span="4" class="fr" style="width: 54px">
|
|
|
+ <el-button
|
|
|
+ :size="searchSize"
|
|
|
+ type="primary"
|
|
|
+ class="fr"
|
|
|
+ icon="el-icon-search"
|
|
|
+ @click="searchList"
|
|
|
+ /></el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -194,6 +189,7 @@ import ExTable from "@/components/ExTableNew.vue";
|
|
|
import addEdit from "./addEdit";
|
|
|
import asyncRequest from "@/apis/service/InvoiceSales/orderBatchBilling";
|
|
|
import mixinPage from "@/mixins/elPaginationHandle";
|
|
|
+import PeriodDatePicker from "@/components/PeriodDatePicker";
|
|
|
import { mapGetters } from "vuex";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
import urlConfig from "@/apis/url-config";
|
|
@@ -204,6 +200,7 @@ export default {
|
|
|
components: {
|
|
|
ExTable,
|
|
|
addEdit,
|
|
|
+ PeriodDatePicker,
|
|
|
},
|
|
|
computed: {
|
|
|
//组件SIZE设置
|
|
@@ -271,6 +268,8 @@ export default {
|
|
|
companyNo: "",
|
|
|
status: "3",
|
|
|
type_check: "1",
|
|
|
+ starttime: "",
|
|
|
+ endtime: "",
|
|
|
page: 1, // 页码
|
|
|
size: 15, // 每页显示条数
|
|
|
},
|
|
@@ -364,43 +363,31 @@ export default {
|
|
|
companyNo: "",
|
|
|
status: "3",
|
|
|
type_check: "1",
|
|
|
+ starttime: "",
|
|
|
+ endtime: "",
|
|
|
page: 1, // 页码
|
|
|
size: 15, // 每页显示条数
|
|
|
};
|
|
|
this.searchList();
|
|
|
},
|
|
|
+ async timeReturned(e) {
|
|
|
+ if (e.startTime !== "") {
|
|
|
+ this.parmValue.starttime = e.startTime;
|
|
|
+ } else {
|
|
|
+ this.parmValue.starttime = "";
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 启用/禁用
|
|
|
- * @param {String} invNo invNo
|
|
|
- */
|
|
|
- async changeStatus(invNo) {
|
|
|
- await this.$confirm(`确定要取消申请?`, {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
- .then(async () => {
|
|
|
- const model = {
|
|
|
- invNo: invNo,
|
|
|
- };
|
|
|
- const res = await asyncRequest.delete(model);
|
|
|
- if (res && res.code === 0) {
|
|
|
- this.$notify.success({
|
|
|
- title: "申请取消成功",
|
|
|
- message: "",
|
|
|
- });
|
|
|
- this.searchList();
|
|
|
- } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
- await this.logout();
|
|
|
- } else {
|
|
|
- this.$message.warning(res.message);
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- console.log("取消");
|
|
|
- });
|
|
|
+ if (e.endTime !== "") {
|
|
|
+ this.parmValue.endtime = e.endTime;
|
|
|
+ } else {
|
|
|
+ this.parmValue.endtime = "";
|
|
|
+ }
|
|
|
+ if (this.parmValue.starttime !== "" && this.parmValue.endtime !== "") {
|
|
|
+ this.parmValue.page = 1;
|
|
|
+ await this.searchList();
|
|
|
+ }
|
|
|
},
|
|
|
+
|
|
|
/**
|
|
|
* 批量导出开票信息
|
|
|
* * @param {Array} selection //选中的对账编码
|
|
@@ -463,6 +450,14 @@ export default {
|
|
|
},
|
|
|
// 刷新表格
|
|
|
async searchList() {
|
|
|
+ if (this.parmValue.starttime !== "" && this.parmValue.endtime === "") {
|
|
|
+ this.$message.error("结束时间不能为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.parmValue.starttime === "" && this.parmValue.endtime !== "") {
|
|
|
+ this.$message.error("开始时间不能为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.loading = true;
|
|
|
const res = await asyncRequest.list(this.parmValue);
|
|
|
if (res && res.code === 0 && res.data) {
|