|
@@ -21,7 +21,7 @@
|
|
|
searchList();
|
|
|
"
|
|
|
>
|
|
|
- <template #table-header="{}">
|
|
|
+ <template #table-header="{ selection }">
|
|
|
<div style="width: 100%">
|
|
|
<el-row style="padding: 0 0 10px 80px">
|
|
|
<el-col :span="24">
|
|
@@ -76,6 +76,22 @@
|
|
|
重置
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
+
|
|
|
+ <el-col
|
|
|
+ :span="4"
|
|
|
+ style="width: 166px; float: right"
|
|
|
+ v-if="powers.some((item) => item == '052')"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ class="fr"
|
|
|
+ :size="searchSize"
|
|
|
+ :disabled="loading"
|
|
|
+ @click="batchExport(selection)"
|
|
|
+ >
|
|
|
+ 导出物流信息
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
@@ -351,6 +367,7 @@ import mixinPage from "@/mixins/elPaginationHandle";
|
|
|
import { mapGetters } from "vuex";
|
|
|
import PeriodDatePicker from "@/components/PeriodDatePicker";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
+import { formatJson } from "@/utils/publicMethods";
|
|
|
export default {
|
|
|
name: "invoiceApply",
|
|
|
mixins: [mixinPage, resToken],
|
|
@@ -447,6 +464,7 @@ export default {
|
|
|
},
|
|
|
// 表格 - 列参数
|
|
|
columns: [
|
|
|
+ { type: "selection", fixed: "left", _noset_: true },
|
|
|
{
|
|
|
prop: "invNo",
|
|
|
label: "发票编号",
|
|
@@ -493,7 +511,16 @@ export default {
|
|
|
{
|
|
|
prop: "addtime",
|
|
|
label: "申请时间",
|
|
|
- sortable: true,
|
|
|
+ width: "145px",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "post_company",
|
|
|
+ label: "物流公司",
|
|
|
+ width: "100px",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "post_code",
|
|
|
+ label: "物流编号",
|
|
|
width: "150px",
|
|
|
},
|
|
|
{
|
|
@@ -517,6 +544,71 @@ export default {
|
|
|
this.parmValue.page = 1;
|
|
|
await this.searchList();
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 批量导出
|
|
|
+ * @param {Array} selection 当前选择项
|
|
|
+ */
|
|
|
+ batchExport(selection) {
|
|
|
+ if (!this.loading) {
|
|
|
+ if (selection.length == 0) {
|
|
|
+ this.$message.warning("请至少选择一条数据!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.loading = true;
|
|
|
+ let data = [].concat(...selection);
|
|
|
+ let list = [];
|
|
|
+ data.forEach((item) => {
|
|
|
+ let model = Object.assign({}, item);
|
|
|
+ model.type_check =
|
|
|
+ (this.billType.find((v) => v.code == item.type_check) || {}).name ||
|
|
|
+ "--";
|
|
|
+ model.status =
|
|
|
+ (this.statusOptions.find((v) => v.id == item.status) || {}).label ||
|
|
|
+ "--";
|
|
|
+ list.push(model);
|
|
|
+ });
|
|
|
+ const xlsName = `物流信息批量导出`;
|
|
|
+ import("@/vendor/Export2Excel").then((excel) => {
|
|
|
+ const tHeader = [
|
|
|
+ "发票编号",
|
|
|
+ "客户企业编码",
|
|
|
+ "客户企业名称",
|
|
|
+ "销售方开票公司名称",
|
|
|
+ "发票额度",
|
|
|
+ "开票类型",
|
|
|
+ "申请人",
|
|
|
+ "状态",
|
|
|
+ "申请时间",
|
|
|
+ "物流公司",
|
|
|
+ "物流编号",
|
|
|
+ ];
|
|
|
+ const filterVal = [
|
|
|
+ "invNo",
|
|
|
+ "inv_in",
|
|
|
+ "company",
|
|
|
+ "kp_company",
|
|
|
+ "inv_value",
|
|
|
+ "type_check",
|
|
|
+ "apply_name",
|
|
|
+ "status",
|
|
|
+ "addtime",
|
|
|
+ "post_company",
|
|
|
+ "post_code",
|
|
|
+ ];
|
|
|
+ const data = formatJson(filterVal, list);
|
|
|
+ excel.export_json_to_excel({
|
|
|
+ header: tHeader,
|
|
|
+ data,
|
|
|
+ filename: `${xlsName}`,
|
|
|
+ });
|
|
|
+ this.$message.success("简历批量导出成功!");
|
|
|
+ setTimeout(() => {
|
|
|
+ this.loading = false;
|
|
|
+ }, 500);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
restSearch() {
|
|
|
// 表格 - 分页
|
|
|
this.pageInfo = {
|