Commit 4a8b4680 authored by 姬鋆屾's avatar 姬鋆屾

fix:调整自助存取件报表的展示字段及导出字段

parent d796697a
...@@ -45,24 +45,30 @@ import { export2Excel } from "@/utils/js/exportExcel"; ...@@ -45,24 +45,30 @@ import { export2Excel } from "@/utils/js/exportExcel";
import { getStorageList } from "@/api/dataAdmin"; import { getStorageList } from "@/api/dataAdmin";
import { version } from "less"; import { version } from "less";
const tHeader = [ const tHeader = [
"邮递员", "取件人姓名",
"联系电话", "联系电话",
"存件时间", "身份证号",
"存件方式",
"取件柜名称", "取件柜名称",
"取件柜编号",
"箱号", "箱号",
"取件人联系电话", "存件时间",
"取件码", "存放时长",
"状态", "状态",
"取件时间",
]; // 导出的表头名信息 ]; // 导出的表头名信息
const filterVal = [ const filterVal = [
"courier", "name",
"usersign", "phone",
"create_time", "idcard",
"enter_id",
"qjg_name", "qjg_name",
"number",
"boxNo", "boxNo",
"phone", "create_time",
"code", "timehour",
"status", "status",
"update_time",
]; // 导出的表头字段名,需要导出表格字段名 ]; // 导出的表头字段名,需要导出表格字段名
export default { export default {
components: {}, components: {},
...@@ -77,36 +83,85 @@ export default { ...@@ -77,36 +83,85 @@ export default {
}, },
}, },
{ {
title: "存件人", title: "取件人姓名",
width: 100,
customRender: (text, record) =>
record.record ? record.record.name : record.name ? record.name : "--",
},
{
title: "联系电话",
width: 150, width: 150,
dataIndex: "usersign", dataIndex: "phone",
customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "存件时间", title: "身份证号",
dataIndex: "idcard",
width: 160,
customRender: (text, record) => (text ? text : "--"),
},
{
title: "存件方式",
width: 100,
dataIndex: "enter_id",
customRender: (text, record) =>
text == 0 ? (
<a-tag color="orange">自由存取件</a-tag>
) : text != 0 ? (
<a-tag color="blue">业务存件</a-tag>
) : (
"--"
),
},
{
title: "事项名称",
width: 150, width: 150,
dataIndex: "create_time", customRender: (text, record) =>
record.record ? record.record.matter_name : "--",
},
{
title: "材料名称",
width: 150,
customRender: (text, record) =>
record.record ? record.record.datum_name : "--",
},
{
title: "申请办理时间",
width: 150,
customRender: (text, record) =>
record.record ? record.record.apply_time : "--",
},
{
title: "取件柜名称",
width: 150,
dataIndex: "qjg_name",
customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "取件柜编号", title: "取件柜编号",
align: "center",
dataIndex: "number", dataIndex: "number",
width: 150, width: 150,
customRender: (text) => text || "--", customRender: (text) => text || "--",
}, },
{ {
title: "箱号", title: "箱体编号",
dataIndex: "boxNo",
width: 150, width: 150,
dataIndex: "boxNo",
customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "取件人联系电话", title: "存件时间",
dataIndex: "phone",
width: 150, width: 150,
customRender: (text) => text || "--", dataIndex: "create_time",
customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "取件码", title: "存放时长",
dataIndex: "code",
width: 150, width: 150,
dataIndex: "timehour",
customRender: (text, record) => (text ? text : "--"),
}, },
{ {
...@@ -120,6 +175,7 @@ export default { ...@@ -120,6 +175,7 @@ export default {
{ {
title: "取件时间", title: "取件时间",
dataIndex: "update_time", dataIndex: "update_time",
fixed: "right",
width: 150, width: 150,
customRender: (text, record) => { customRender: (text, record) => {
return record.status == 1 ? "--" : text ? text : "--"; return record.status == 1 ? "--" : text ? text : "--";
...@@ -237,6 +293,11 @@ export default { ...@@ -237,6 +293,11 @@ export default {
// 深度克隆避免影响页面表格展示 // 深度克隆避免影响页面表格展示
let data = this.$_.cloneDeep(this.excelData); let data = this.$_.cloneDeep(this.excelData);
for (let item of data) { for (let item of data) {
item.enter_id == 0
? (item.enter_id = "自由存取件")
: item.enter_id != 0
? (item.enter_id = "业务存取件")
: (item.enter_id = "--");
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
if (item.status == key) { if (item.status == key) {
item.status = obj[key]; item.status = obj[key];
...@@ -256,6 +317,11 @@ export default { ...@@ -256,6 +317,11 @@ export default {
return; return;
} }
for (let item of data) { for (let item of data) {
item.enter_id == 0
? (item.enter_id = "自由存取件")
: item.enter_id != 0
? (item.enter_id = "业务存取件")
: (item.enter_id = "--");
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
if (item.status == key) { if (item.status == key) {
item.status = obj[key]; item.status = obj[key];
......
...@@ -44,24 +44,30 @@ import storage from "@/utils/js/Storage"; ...@@ -44,24 +44,30 @@ import storage from "@/utils/js/Storage";
import { export2Excel } from "@/utils/js/exportExcel"; import { export2Excel } from "@/utils/js/exportExcel";
import { getStorageList } from "@/api/dataAdmin"; import { getStorageList } from "@/api/dataAdmin";
const tHeader = [ const tHeader = [
"邮递员", "取件人姓名",
"联系电话", "联系电话",
"存件时间", "身份证号",
"存件方式",
"取件柜名称", "取件柜名称",
"取件柜编号",
"箱号", "箱号",
"取件人联系电话", "存件时间",
"取件码", "存放时长",
"状态", "状态",
"取件时间",
]; // 导出的表头名信息 ]; // 导出的表头名信息
const filterVal = [ const filterVal = [
"courier", "name",
"usersign", "phone",
"create_time", "idcard",
"enter_id",
"qjg_name", "qjg_name",
"number",
"boxNo", "boxNo",
"phone", "create_time",
"code", "timehour",
"status", "status",
"update_time",
]; // 导出的表头字段名,需要导出表格字段名 ]; // 导出的表头字段名,需要导出表格字段名
export default { export default {
components: {}, components: {},
...@@ -76,36 +82,85 @@ export default { ...@@ -76,36 +82,85 @@ export default {
}, },
}, },
{ {
title: "存件人", title: "取件人姓名",
width: 100,
customRender: (text, record) =>
record.record ? record.record.name : record.name ? record.name : "--",
},
{
title: "联系电话",
width: 150, width: 150,
dataIndex: "usersign", dataIndex: "phone",
customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "存件时间", title: "身份证号",
dataIndex: "idcard",
width: 160,
customRender: (text, record) => (text ? text : "--"),
},
{
title: "存件方式",
width: 100,
dataIndex: "enter_id",
customRender: (text, record) =>
text == 0 ? (
<a-tag color="orange">自由存取件</a-tag>
) : text != 0 ? (
<a-tag color="blue">业务存件</a-tag>
) : (
"--"
),
},
{
title: "事项名称",
width: 150, width: 150,
dataIndex: "create_time", customRender: (text, record) =>
record.record ? record.record.matter_name : "--",
},
{
title: "材料名称",
width: 150,
customRender: (text, record) =>
record.record ? record.record.datum_name : "--",
},
{
title: "申请办理时间",
width: 150,
customRender: (text, record) =>
record.record ? record.record.apply_time : "--",
},
{
title: "取件柜名称",
width: 150,
dataIndex: "qjg_name",
customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "取件柜编号", title: "取件柜编号",
align: "center",
dataIndex: "number", dataIndex: "number",
width: 150, width: 150,
customRender: (text) => text || "--", customRender: (text) => text || "--",
}, },
{ {
title: "箱号", title: "箱体编号",
dataIndex: "boxNo",
width: 150, width: 150,
dataIndex: "boxNo",
customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "取件人联系电话", title: "存件时间",
dataIndex: "phone",
width: 150, width: 150,
customRender: (text) => text || "--", dataIndex: "create_time",
customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "取件码", title: "存放时长",
dataIndex: "code",
width: 150, width: 150,
dataIndex: "timehour",
customRender: (text, record) => (text ? text : "--"),
}, },
{ {
...@@ -119,6 +174,7 @@ export default { ...@@ -119,6 +174,7 @@ export default {
{ {
title: "取件时间", title: "取件时间",
dataIndex: "update_time", dataIndex: "update_time",
fixed: "right",
width: 150, width: 150,
customRender: (text, record) => { customRender: (text, record) => {
return record.status == 1 ? "--" : text ? text : "--"; return record.status == 1 ? "--" : text ? text : "--";
...@@ -236,6 +292,11 @@ export default { ...@@ -236,6 +292,11 @@ export default {
// 深度克隆避免影响页面表格展示 // 深度克隆避免影响页面表格展示
let data = this.$_.cloneDeep(this.excelData); let data = this.$_.cloneDeep(this.excelData);
for (let item of data) { for (let item of data) {
item.enter_id == 0
? (item.enter_id = "自由存取件")
: item.enter_id != 0
? (item.enter_id = "业务存取件")
: (item.enter_id = "--");
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
if (item.status == key) { if (item.status == key) {
item.status = obj[key]; item.status = obj[key];
...@@ -255,6 +316,11 @@ export default { ...@@ -255,6 +316,11 @@ export default {
return; return;
} }
for (let item of data) { for (let item of data) {
item.enter_id == 0
? (item.enter_id = "自由存取件")
: item.enter_id != 0
? (item.enter_id = "业务存取件")
: (item.enter_id = "--");
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
if (item.status == key) { if (item.status == key) {
item.status = obj[key]; item.status = obj[key];
......
...@@ -35,24 +35,32 @@ import { getPickupList } from "@/api/dataAdmin"; ...@@ -35,24 +35,32 @@ import { getPickupList } from "@/api/dataAdmin";
const tHeader = [ const tHeader = [
"取件码", "取件码",
"取件人", "取件人",
"联系电话",
"身份证号",
"存件方式",
"取件方式", "取件方式",
"取件柜名称", "取件柜名称",
"取件柜编号",
"箱号", "箱号",
"联系电话",
"取件时间", "取件时间",
"操作人身份", "操作人身份",
"存件时间", "存件时间",
"存放时长",
]; // 导出的表头名信息 ]; // 导出的表头名信息
const filterVal = [ const filterVal = [
"code", "code",
"name", "name",
"phone",
"idcard",
"enter_id",
"type", "type",
"qjg_name", "qjg_name",
"number",
"boxNo", "boxNo",
"phone",
"update_time", "update_time",
"userType", "userType",
"create_time", "create_time",
"timehour",
]; // 导出的表头字段名,需要导出表格字段名 ]; // 导出的表头字段名,需要导出表格字段名
let userType = { let userType = {
1: "用户", 1: "用户",
...@@ -84,16 +92,36 @@ export default { ...@@ -84,16 +92,36 @@ export default {
width: 100, width: 100,
}, },
{ {
title: "取件人", title: "取件人姓名",
dataIndex: "name",
width: 100, width: 100,
customRender: (text) => text || "--", customRender: (text, record) =>
record.record ? record.record.name : "--",
}, },
{ {
title: "联系电话", title: "联系电话",
width: 150,
dataIndex: "phone", dataIndex: "phone",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "身份证号",
dataIndex: "idcard",
width: 160,
customRender: (text, record) => (text ? text : "--"),
},
{
title: "存件方式",
width: 150, width: 150,
customRender: (text) => text || "--", dataIndex: "enter_id",
customRender: (text, record) =>
text == 0 ? (
<a-tag color="orange">自由存取件</a-tag>
) : text != 0 ? (
<a-tag color="blue">业务存件</a-tag>
) : (
"--"
),
}, },
{ {
title: "取件方式", title: "取件方式",
...@@ -103,11 +131,30 @@ export default { ...@@ -103,11 +131,30 @@ export default {
return text == 1 ? "取件码取件" : "身份证取件"; return text == 1 ? "取件码取件" : "身份证取件";
}, },
}, },
{
title: "事项名称",
width: 150,
customRender: (text, record) =>
record.record ? record.record.matter_name : "--",
},
{
title: "材料名称",
width: 150,
customRender: (text, record) =>
record.record ? record.record.datum_name : "--",
},
{
title: "申请办理时间",
width: 150,
customRender: (text, record) =>
record.record ? record.record.apply_time : "--",
},
{ {
title: "取件柜名称", title: "取件柜名称",
dataIndex: "qjg_name",
width: 150, width: 150,
customRender: (text) => text || "--", dataIndex: "qjg_name",
customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "取件柜编号", title: "取件柜编号",
...@@ -117,26 +164,31 @@ export default { ...@@ -117,26 +164,31 @@ export default {
customRender: (text) => text || "--", customRender: (text) => text || "--",
}, },
{ {
title: "箱号", title: "箱体编号",
align: "center",
width: 150, width: 150,
dataIndex: "boxNo", dataIndex: "boxNo",
customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "取件时间", title: "操作人身份",
dataIndex: "update_time", dataIndex: "userType",
width: 150, width: 150,
customRender: (text) => { customRender: (text) => {
return text || "--"; return this.userType[text];
}, },
}, },
{ {
title: "操作人身份", title: "取件时间",
dataIndex: "userType",
width: 150, width: 150,
customRender: (text) => { dataIndex: "update_time",
return this.userType[text]; customRender: (text, record) => (text ? text : "--"),
}, },
{
title: "存放时长",
width: "170px",
dataIndex: "timehour",
customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "存件时间", title: "存件时间",
...@@ -254,12 +306,18 @@ export default { ...@@ -254,12 +306,18 @@ export default {
1: "取件码取件", 1: "取件码取件",
2: "身份证取件", 2: "身份证取件",
}; };
if (this.selectedRowKeys.length && this.excelData.length) { if (this.selectedRowKeys.length && this.excelData.length) {
// 深度克隆避免影响页面表格展示 // 深度克隆避免影响页面表格展示
let data = this.$_.cloneDeep(this.excelData); let data = this.$_.cloneDeep(this.excelData);
for (let item of data) { for (let item of data) {
item.type = obj[item.type]; item.type = obj[item.type];
item.userType = this.userType[item.userType]; item.userType = this.userType[item.userType];
item.enter_id == 0
? (item.enter_id = "自由存取件")
: item.enter_id != 0
? (item.enter_id = "业务存取件")
: (item.enter_id = "--");
} }
export2Excel( export2Excel(
this.tHeader, this.tHeader,
...@@ -276,6 +334,11 @@ export default { ...@@ -276,6 +334,11 @@ export default {
for (let item of data) { for (let item of data) {
item.type = obj[item.type]; item.type = obj[item.type];
item.userType = this.userType[item.userType]; item.userType = this.userType[item.userType];
item.enter_id == 0
? (item.enter_id = "自由存取件")
: item.enter_id != 0
? (item.enter_id = "业务存取件")
: (item.enter_id = "--");
} }
export2Excel( export2Excel(
this.tHeader, this.tHeader,
......
...@@ -35,24 +35,32 @@ import { getPickupList } from "@/api/dataAdmin"; ...@@ -35,24 +35,32 @@ import { getPickupList } from "@/api/dataAdmin";
const tHeader = [ const tHeader = [
"取件码", "取件码",
"取件人", "取件人",
"联系电话",
"身份证号",
"存件方式",
"取件方式", "取件方式",
"取件柜名称", "取件柜名称",
"取件柜编号",
"箱号", "箱号",
"联系电话",
"取件时间", "取件时间",
"操作人身份", "操作人身份",
"存件时间", "存件时间",
"存放时长",
]; // 导出的表头名信息 ]; // 导出的表头名信息
const filterVal = [ const filterVal = [
"code", "code",
"name", "name",
"phone",
"idcard",
"enter_id",
"type", "type",
"qjg_name", "qjg_name",
"number",
"boxNo", "boxNo",
"phone",
"update_time", "update_time",
"userType", "userType",
"create_time", "create_time",
"timehour",
]; // 导出的表头字段名,需要导出表格字段名 ]; // 导出的表头字段名,需要导出表格字段名
let userType = { let userType = {
1: "用户", 1: "用户",
...@@ -84,16 +92,36 @@ export default { ...@@ -84,16 +92,36 @@ export default {
width: 100, width: 100,
}, },
{ {
title: "取件人", title: "取件人姓名",
dataIndex: "name",
width: 100, width: 100,
customRender: (text) => text || "--", customRender: (text, record) =>
record.record ? record.record.name : "--",
}, },
{ {
title: "联系电话", title: "联系电话",
width: 150,
dataIndex: "phone", dataIndex: "phone",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "身份证号",
dataIndex: "idcard",
width: 160,
customRender: (text, record) => (text ? text : "--"),
},
{
title: "存件方式",
width: 150, width: 150,
customRender: (text) => text || "--", dataIndex: "enter_id",
customRender: (text, record) =>
text == 0 ? (
<a-tag color="orange">自由存取件</a-tag>
) : text != 0 ? (
<a-tag color="blue">业务存件</a-tag>
) : (
"--"
),
}, },
{ {
title: "取件方式", title: "取件方式",
...@@ -103,11 +131,30 @@ export default { ...@@ -103,11 +131,30 @@ export default {
return text == 1 ? "取件码取件" : "身份证取件"; return text == 1 ? "取件码取件" : "身份证取件";
}, },
}, },
{
title: "事项名称",
width: 150,
customRender: (text, record) =>
record.record ? record.record.matter_name : "--",
},
{
title: "材料名称",
width: 150,
customRender: (text, record) =>
record.record ? record.record.datum_name : "--",
},
{
title: "申请办理时间",
width: 150,
customRender: (text, record) =>
record.record ? record.record.apply_time : "--",
},
{ {
title: "取件柜名称", title: "取件柜名称",
dataIndex: "qjg_name",
width: 150, width: 150,
customRender: (text) => text || "--", dataIndex: "qjg_name",
customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "取件柜编号", title: "取件柜编号",
...@@ -117,26 +164,31 @@ export default { ...@@ -117,26 +164,31 @@ export default {
customRender: (text) => text || "--", customRender: (text) => text || "--",
}, },
{ {
title: "箱号", title: "箱体编号",
align: "center",
width: 150, width: 150,
dataIndex: "boxNo", dataIndex: "boxNo",
customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "取件时间", title: "操作人身份",
dataIndex: "update_time", dataIndex: "userType",
width: 150, width: 150,
customRender: (text) => { customRender: (text) => {
return text || "--"; return this.userType[text];
}, },
}, },
{ {
title: "操作人身份", title: "取件时间",
dataIndex: "userType",
width: 150, width: 150,
customRender: (text) => { dataIndex: "update_time",
return this.userType[text]; customRender: (text, record) => (text ? text : "--"),
}, },
{
title: "存放时长",
width: "170px",
dataIndex: "timehour",
customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "存件时间", title: "存件时间",
...@@ -260,6 +312,11 @@ export default { ...@@ -260,6 +312,11 @@ export default {
for (let item of data) { for (let item of data) {
item.type = obj[item.type]; item.type = obj[item.type];
item.userType = this.userType[item.userType]; item.userType = this.userType[item.userType];
item.enter_id == 0
? (item.enter_id = "自由存取件")
: item.enter_id != 0
? (item.enter_id = "业务存取件")
: (item.enter_id = "--");
} }
export2Excel( export2Excel(
this.tHeader, this.tHeader,
...@@ -276,7 +333,14 @@ export default { ...@@ -276,7 +333,14 @@ export default {
for (let item of data) { for (let item of data) {
item.type = obj[item.type]; item.type = obj[item.type];
item.userType = this.userType[item.userType]; item.userType = this.userType[item.userType];
item.enter_id == 0
? (item.enter_id = "自由存取件")
: item.enter_id != 0
? (item.enter_id = "业务存取件")
: (item.enter_id = "--");
} }
console.log(this.tHeader, this.filterVal, data);
export2Excel( export2Excel(
this.tHeader, this.tHeader,
this.filterVal, this.filterVal,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment