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

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

parent d796697a
......@@ -45,24 +45,30 @@ import { export2Excel } from "@/utils/js/exportExcel";
import { getStorageList } from "@/api/dataAdmin";
import { version } from "less";
const tHeader = [
"邮递员",
"取件人姓名",
"联系电话",
"存件时间",
"身份证号",
"存件方式",
"取件柜名称",
"取件柜编号",
"箱号",
"取件人联系电话",
"取件码",
"存件时间",
"存放时长",
"状态",
"取件时间",
]; // 导出的表头名信息
const filterVal = [
"courier",
"usersign",
"create_time",
"name",
"phone",
"idcard",
"enter_id",
"qjg_name",
"number",
"boxNo",
"phone",
"code",
"create_time",
"timehour",
"status",
"update_time",
]; // 导出的表头字段名,需要导出表格字段名
export default {
components: {},
......@@ -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,
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,
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: "取件柜编号",
align: "center",
dataIndex: "number",
width: 150,
customRender: (text) => text || "--",
},
{
title: "箱号",
dataIndex: "boxNo",
title: "箱体编号",
width: 150,
dataIndex: "boxNo",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "取件人联系电话",
dataIndex: "phone",
title: "存件时间",
width: 150,
customRender: (text) => text || "--",
dataIndex: "create_time",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "取件码",
dataIndex: "code",
title: "存放时长",
width: 150,
dataIndex: "timehour",
customRender: (text, record) => (text ? text : "--"),
},
{
......@@ -120,6 +175,7 @@ export default {
{
title: "取件时间",
dataIndex: "update_time",
fixed: "right",
width: 150,
customRender: (text, record) => {
return record.status == 1 ? "--" : text ? text : "--";
......@@ -237,6 +293,11 @@ export default {
// 深度克隆避免影响页面表格展示
let data = this.$_.cloneDeep(this.excelData);
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) => {
if (item.status == key) {
item.status = obj[key];
......@@ -256,6 +317,11 @@ export default {
return;
}
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) => {
if (item.status == key) {
item.status = obj[key];
......
......@@ -44,24 +44,30 @@ import storage from "@/utils/js/Storage";
import { export2Excel } from "@/utils/js/exportExcel";
import { getStorageList } from "@/api/dataAdmin";
const tHeader = [
"邮递员",
"取件人姓名",
"联系电话",
"存件时间",
"身份证号",
"存件方式",
"取件柜名称",
"取件柜编号",
"箱号",
"取件人联系电话",
"取件码",
"存件时间",
"存放时长",
"状态",
"取件时间",
]; // 导出的表头名信息
const filterVal = [
"courier",
"usersign",
"create_time",
"name",
"phone",
"idcard",
"enter_id",
"qjg_name",
"number",
"boxNo",
"phone",
"code",
"create_time",
"timehour",
"status",
"update_time",
]; // 导出的表头字段名,需要导出表格字段名
export default {
components: {},
......@@ -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,
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,
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: "取件柜编号",
align: "center",
dataIndex: "number",
width: 150,
customRender: (text) => text || "--",
},
{
title: "箱号",
dataIndex: "boxNo",
title: "箱体编号",
width: 150,
dataIndex: "boxNo",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "取件人联系电话",
dataIndex: "phone",
title: "存件时间",
width: 150,
customRender: (text) => text || "--",
dataIndex: "create_time",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "取件码",
dataIndex: "code",
title: "存放时长",
width: 150,
dataIndex: "timehour",
customRender: (text, record) => (text ? text : "--"),
},
{
......@@ -119,6 +174,7 @@ export default {
{
title: "取件时间",
dataIndex: "update_time",
fixed: "right",
width: 150,
customRender: (text, record) => {
return record.status == 1 ? "--" : text ? text : "--";
......@@ -236,6 +292,11 @@ export default {
// 深度克隆避免影响页面表格展示
let data = this.$_.cloneDeep(this.excelData);
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) => {
if (item.status == key) {
item.status = obj[key];
......@@ -255,6 +316,11 @@ export default {
return;
}
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) => {
if (item.status == key) {
item.status = obj[key];
......
......@@ -35,24 +35,32 @@ import { getPickupList } from "@/api/dataAdmin";
const tHeader = [
"取件码",
"取件人",
"联系电话",
"身份证号",
"存件方式",
"取件方式",
"取件柜名称",
"取件柜编号",
"箱号",
"联系电话",
"取件时间",
"操作人身份",
"存件时间",
"存放时长",
]; // 导出的表头名信息
const filterVal = [
"code",
"name",
"phone",
"idcard",
"enter_id",
"type",
"qjg_name",
"number",
"boxNo",
"phone",
"update_time",
"userType",
"create_time",
"timehour",
]; // 导出的表头字段名,需要导出表格字段名
let userType = {
1: "用户",
......@@ -84,16 +92,36 @@ export default {
width: 100,
},
{
title: "取件人",
dataIndex: "name",
title: "取件人姓名",
width: 100,
customRender: (text) => text || "--",
customRender: (text, record) =>
record.record ? record.record.name : "--",
},
{
title: "联系电话",
width: 150,
dataIndex: "phone",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "身份证号",
dataIndex: "idcard",
width: 160,
customRender: (text, record) => (text ? text : "--"),
},
{
title: "存件方式",
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: "取件方式",
......@@ -103,11 +131,30 @@ export default {
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: "取件柜名称",
dataIndex: "qjg_name",
width: 150,
customRender: (text) => text || "--",
dataIndex: "qjg_name",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "取件柜编号",
......@@ -117,19 +164,12 @@ export default {
customRender: (text) => text || "--",
},
{
title: "箱号",
align: "center",
title: "箱体编号",
width: 150,
dataIndex: "boxNo",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "取件时间",
dataIndex: "update_time",
width: 150,
customRender: (text) => {
return text || "--";
},
},
{
title: "操作人身份",
dataIndex: "userType",
......@@ -138,6 +178,18 @@ export default {
return this.userType[text];
},
},
{
title: "取件时间",
width: 150,
dataIndex: "update_time",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "存放时长",
width: "170px",
dataIndex: "timehour",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "存件时间",
fixed: "right",
......@@ -254,12 +306,18 @@ export default {
1: "取件码取件",
2: "身份证取件",
};
if (this.selectedRowKeys.length && this.excelData.length) {
// 深度克隆避免影响页面表格展示
let data = this.$_.cloneDeep(this.excelData);
for (let item of data) {
item.type = obj[item.type];
item.userType = this.userType[item.userType];
item.enter_id == 0
? (item.enter_id = "自由存取件")
: item.enter_id != 0
? (item.enter_id = "业务存取件")
: (item.enter_id = "--");
}
export2Excel(
this.tHeader,
......@@ -276,6 +334,11 @@ export default {
for (let item of data) {
item.type = obj[item.type];
item.userType = this.userType[item.userType];
item.enter_id == 0
? (item.enter_id = "自由存取件")
: item.enter_id != 0
? (item.enter_id = "业务存取件")
: (item.enter_id = "--");
}
export2Excel(
this.tHeader,
......
......@@ -35,24 +35,32 @@ import { getPickupList } from "@/api/dataAdmin";
const tHeader = [
"取件码",
"取件人",
"联系电话",
"身份证号",
"存件方式",
"取件方式",
"取件柜名称",
"取件柜编号",
"箱号",
"联系电话",
"取件时间",
"操作人身份",
"存件时间",
"存放时长",
]; // 导出的表头名信息
const filterVal = [
"code",
"name",
"phone",
"idcard",
"enter_id",
"type",
"qjg_name",
"number",
"boxNo",
"phone",
"update_time",
"userType",
"create_time",
"timehour",
]; // 导出的表头字段名,需要导出表格字段名
let userType = {
1: "用户",
......@@ -84,16 +92,36 @@ export default {
width: 100,
},
{
title: "取件人",
dataIndex: "name",
title: "取件人姓名",
width: 100,
customRender: (text) => text || "--",
customRender: (text, record) =>
record.record ? record.record.name : "--",
},
{
title: "联系电话",
width: 150,
dataIndex: "phone",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "身份证号",
dataIndex: "idcard",
width: 160,
customRender: (text, record) => (text ? text : "--"),
},
{
title: "存件方式",
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: "取件方式",
......@@ -103,11 +131,30 @@ export default {
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: "取件柜名称",
dataIndex: "qjg_name",
width: 150,
customRender: (text) => text || "--",
dataIndex: "qjg_name",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "取件柜编号",
......@@ -117,19 +164,12 @@ export default {
customRender: (text) => text || "--",
},
{
title: "箱号",
align: "center",
title: "箱体编号",
width: 150,
dataIndex: "boxNo",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "取件时间",
dataIndex: "update_time",
width: 150,
customRender: (text) => {
return text || "--";
},
},
{
title: "操作人身份",
dataIndex: "userType",
......@@ -138,6 +178,18 @@ export default {
return this.userType[text];
},
},
{
title: "取件时间",
width: 150,
dataIndex: "update_time",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "存放时长",
width: "170px",
dataIndex: "timehour",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "存件时间",
fixed: "right",
......@@ -260,6 +312,11 @@ export default {
for (let item of data) {
item.type = obj[item.type];
item.userType = this.userType[item.userType];
item.enter_id == 0
? (item.enter_id = "自由存取件")
: item.enter_id != 0
? (item.enter_id = "业务存取件")
: (item.enter_id = "--");
}
export2Excel(
this.tHeader,
......@@ -276,7 +333,14 @@ export default {
for (let item of data) {
item.type = obj[item.type];
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(
this.tHeader,
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