feat: v3版疗休养
@@ -0,0 +1,687 @@
|
||||
-- v4 职工福利 / 职工疗休养独立子模块初始化脚本(MySQL 8)。
|
||||
-- 在 v4 目标数据库中执行;表结构依据 therapyRecuperation 模块实体定义。
|
||||
-- v3 the_rapy_recuperation_* 对应本模块 staff_therapy_*,不覆盖 v4 其他疗休养表。
|
||||
-- 仅新增表、视图、默认配置、菜单及角色权限关联,不迁移 v3 历史业务数据。
|
||||
-- 已存在的表、视图、配置和菜单保留原值;脚本不修订已有表结构。
|
||||
-- 依赖 v4 已有 vw_user、sys_union、sys_unit、sys_config、sys_module、sys_menu、sys_role、sys_role_menu。
|
||||
-- DDL 存在 MySQL 隐式提交;后续初始化记录使用单独事务。
|
||||
SET NAMES utf8mb4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `staff_therapy_base_management` (
|
||||
`id` varchar(128) NOT NULL COMMENT 'id',
|
||||
`year` int NULL DEFAULT NULL COMMENT '年度',
|
||||
`sortNumber` varchar(50) NULL DEFAULT NULL COMMENT '排序编号',
|
||||
`baseName` varchar(50) NULL DEFAULT NULL COMMENT '基地名称',
|
||||
`travelAgencyId` varchar(32) NULL DEFAULT NULL COMMENT '旅行社Id',
|
||||
`regionalNature` varchar(10) NULL DEFAULT NULL COMMENT '区域',
|
||||
`lotId` varchar(32) NULL DEFAULT NULL COMMENT '标段Id',
|
||||
`content` text NULL COMMENT '疗休养详情',
|
||||
`isDisabled` tinyint(1) NULL DEFAULT NULL COMMENT '是否禁用',
|
||||
`createUnionId` varchar(32) NULL DEFAULT NULL COMMENT '哪个分工会创建的',
|
||||
`signUpStartTime` datetime NULL DEFAULT NULL COMMENT '报名开始时间',
|
||||
`signUpEndTime` datetime NULL DEFAULT NULL COMMENT '报名截至时间',
|
||||
`changeEndTime` datetime NULL DEFAULT NULL COMMENT '变更截至时间',
|
||||
`activityStartTime` datetime NULL DEFAULT NULL COMMENT '活动开始时间',
|
||||
`activityEndTime` datetime NULL DEFAULT NULL COMMENT '活动结束时间',
|
||||
`estimatedCost` varchar(50) NULL DEFAULT NULL COMMENT '预计费用',
|
||||
`files` json NULL COMMENT '缩略图',
|
||||
`createMode` int NULL DEFAULT NULL COMMENT '创建模式(1.校工会 2.分工会)',
|
||||
`baseContactPerson` varchar(50) NULL DEFAULT NULL COMMENT '基地联系人',
|
||||
`baseContactNumber` varchar(50) NULL DEFAULT NULL COMMENT '基地联系人电话',
|
||||
`opBy` varchar(50) NULL DEFAULT NULL COMMENT '操作人',
|
||||
`opAt` varchar(50) NULL DEFAULT NULL COMMENT '操作时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养目的地';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `staff_therapy_cluster` (
|
||||
`id` varchar(128) NOT NULL COMMENT 'id',
|
||||
`lineId` varchar(32) NULL DEFAULT NULL COMMENT '线路id',
|
||||
`clusterName` varchar(50) NULL DEFAULT NULL COMMENT '团名',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养组团';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `staff_therapy_cluster_member` (
|
||||
`id` varchar(128) NOT NULL COMMENT 'id',
|
||||
`lineId` varchar(32) NULL DEFAULT NULL COMMENT '线路id',
|
||||
`clusterId` varchar(32) NULL DEFAULT NULL COMMENT '团Id',
|
||||
`loginName` varchar(20) NULL DEFAULT NULL COMMENT '工号',
|
||||
`userName` varchar(20) NULL DEFAULT NULL COMMENT '姓名',
|
||||
`sex` char(1) NULL DEFAULT NULL COMMENT '性别',
|
||||
`unionName` varchar(50) NULL DEFAULT NULL COMMENT '工会',
|
||||
`isLeader` tinyint(1) NULL DEFAULT NULL COMMENT '是否领队',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养组团成员';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `staff_therapy_config` (
|
||||
`id` varchar(128) NOT NULL COMMENT 'id',
|
||||
`configName` varchar(30) NULL DEFAULT NULL COMMENT '配置名称',
|
||||
`activityGroupId` bigint NULL DEFAULT NULL COMMENT '参加人员范围',
|
||||
`signUpStartTime` datetime NULL DEFAULT NULL COMMENT '报名开始时间',
|
||||
`signUpEndTime` datetime NULL DEFAULT NULL COMMENT '报名结束时间',
|
||||
`lineSelectStartTime` datetime NULL DEFAULT NULL COMMENT '选择线路开始时间',
|
||||
`lineSelectEndTime` datetime NULL DEFAULT NULL COMMENT '选择线路结束时间',
|
||||
`outsideQuota` int NULL DEFAULT NULL COMMENT '省外名额分配',
|
||||
`outsideQuotaProportion` decimal(3,2) NULL DEFAULT NULL COMMENT '省外名额分配比例',
|
||||
`outsideNumber` int NULL DEFAULT NULL COMMENT '省外几年去一次',
|
||||
`travelFrequency` int NULL DEFAULT NULL COMMENT '每年旅行频率',
|
||||
`groupNumber` int NULL DEFAULT NULL COMMENT '组团人数',
|
||||
`modifyDays` int NULL DEFAULT NULL COMMENT '不可取消修改天数',
|
||||
`modifyNumber` int NULL DEFAULT NULL COMMENT '可以修改几次',
|
||||
`isSnLine` tinyint(1) NULL DEFAULT '0' COMMENT '省内线路是否审核',
|
||||
`isSwLine` tinyint(1) NULL DEFAULT '0' COMMENT '省外线路是否审核',
|
||||
`travelAudit` tinyint(1) NULL DEFAULT '0' COMMENT '旅行社是否审核',
|
||||
`modifyBd` json NULL COMMENT '标段',
|
||||
`unionLineNumberConfigs` json NULL COMMENT '分工会线路数量配置',
|
||||
`allLineSignUpNumber` int NULL DEFAULT NULL COMMENT '全批次最多教职工报名人数',
|
||||
`notice` longtext NULL COMMENT '疗休养服务须知',
|
||||
`provinceStartYear` int NULL DEFAULT NULL COMMENT '省内起始年份',
|
||||
`bedInfo` tinyint(1) NULL DEFAULT '0' COMMENT '床位信息',
|
||||
`familyInfo` int NULL DEFAULT '0' COMMENT '家属信息',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养配置';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `staff_therapy_enroll` (
|
||||
`id` varchar(128) NOT NULL COMMENT 'id',
|
||||
`loginName` varchar(32) NULL DEFAULT NULL COMMENT '工号',
|
||||
`userName` varchar(32) NULL DEFAULT NULL COMMENT '姓名',
|
||||
`sex` varchar(1) NULL DEFAULT NULL COMMENT '性别',
|
||||
`unitName` varchar(50) NULL DEFAULT NULL COMMENT '本人单位',
|
||||
`unionName` varchar(50) NULL DEFAULT NULL COMMENT '本人分工会',
|
||||
`selfUnitId` varchar(32) NULL DEFAULT NULL COMMENT '本人单位',
|
||||
`selfUnionId` varchar(32) NULL DEFAULT NULL COMMENT '本人分工会Id',
|
||||
`takePartInUnionId` varchar(32) NULL DEFAULT NULL COMMENT '参加的分工会',
|
||||
`takePartInLineId` varchar(32) NULL DEFAULT NULL COMMENT '参加线路',
|
||||
`takePartInTravelAgencyId` varchar(32) NULL DEFAULT NULL COMMENT '参加旅行社',
|
||||
`takePartInBaseManagementId` varchar(32) NULL DEFAULT NULL COMMENT '参加酒店',
|
||||
`signingUptime` datetime NULL DEFAULT NULL COMMENT '报名时间',
|
||||
`takePartInTime` date NULL DEFAULT NULL COMMENT '参加时间',
|
||||
`isTakePartIn` tinyint(1) NULL DEFAULT NULL COMMENT '是否参加',
|
||||
`stateId` int NULL DEFAULT NULL COMMENT '审核状态',
|
||||
`selfUnionAuditId` varchar(32) NULL DEFAULT NULL COMMENT '本人分工会审核Id',
|
||||
`bedInfoId` varchar(32) NULL DEFAULT NULL COMMENT '床位信息id',
|
||||
`joinLineUnionAuditId` varchar(32) NULL DEFAULT NULL COMMENT '参加的线路分工会审核Id',
|
||||
`idCard` varchar(18) NULL DEFAULT NULL COMMENT '身份证号',
|
||||
`mobile` varchar(20) NULL DEFAULT NULL COMMENT '手机号',
|
||||
`isNormal` tinyint(1) NULL DEFAULT NULL COMMENT '是否正常(true正常 false该报名记录已被管理员废弃)',
|
||||
`evaluationForTravelAgency` varchar(128) NULL DEFAULT NULL COMMENT '对旅行社的评价(几星)',
|
||||
`evaluationForLine` varchar(128) NULL DEFAULT NULL COMMENT '对线路的评价(几星)',
|
||||
`evaluationForJourney` varchar(128) NULL DEFAULT NULL COMMENT '对旅途的评价(几星)',
|
||||
`feedbackContent` varchar(100) NULL DEFAULT NULL COMMENT '反馈内容',
|
||||
`lotId` varchar(32) NULL DEFAULT NULL COMMENT '标段时间',
|
||||
`schoolUnionAuditId` varchar(32) NULL DEFAULT NULL COMMENT '校工会审核Id',
|
||||
`familyNumber` int NULL DEFAULT NULL COMMENT '家属数量',
|
||||
`isReimbursement` tinyint(1) NULL DEFAULT NULL COMMENT '是否报销',
|
||||
`createdBy` varchar(32) NULL DEFAULT NULL COMMENT '创建人',
|
||||
`createdAt` bigint NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`updatedBy` varchar(32) NULL DEFAULT NULL COMMENT '修改人',
|
||||
`updatedAt` bigint NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`delFlag` tinyint(1) NULL DEFAULT NULL COMMENT '删除标记',
|
||||
`opBy` varchar(32) NULL DEFAULT NULL,
|
||||
`opAt` varchar(32) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养报名登记表';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `staff_therapy_enroll_bed` (
|
||||
`id` varchar(128) NOT NULL COMMENT 'id',
|
||||
`bedType` varchar(10) NULL DEFAULT NULL COMMENT '床型',
|
||||
`bedNum` int NULL DEFAULT NULL COMMENT '床位数',
|
||||
`isSleepTogether` tinyint(1) NULL DEFAULT NULL COMMENT '一起睡吗 搞基',
|
||||
`otherSleepUser` varchar(128) NULL DEFAULT NULL COMMENT '意向拼房人',
|
||||
`createdBy` varchar(32) NULL DEFAULT NULL COMMENT '创建人',
|
||||
`createdAt` bigint NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`updatedBy` varchar(32) NULL DEFAULT NULL COMMENT '修改人',
|
||||
`updatedAt` bigint NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`delFlag` tinyint(1) NULL DEFAULT NULL COMMENT '删除标记',
|
||||
`opBy` varchar(32) NULL DEFAULT NULL,
|
||||
`opAt` varchar(32) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养报名床位';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `staff_therapy_enroll_change_record` (
|
||||
`id` varchar(128) NOT NULL COMMENT 'id',
|
||||
`enrollId` varchar(32) NULL DEFAULT NULL COMMENT '变更记录id',
|
||||
`changeTime` datetime NULL DEFAULT NULL COMMENT '变更时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养报名变更记录';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `staff_therapy_enroll_companion` (
|
||||
`id` varchar(128) NOT NULL COMMENT 'id',
|
||||
`trreId` varchar(32) NULL DEFAULT NULL COMMENT '报名记录表Id',
|
||||
`loginName` varchar(32) NULL DEFAULT NULL COMMENT '工号',
|
||||
`userName` varchar(32) NULL DEFAULT NULL COMMENT '姓名',
|
||||
`sex` char(1) NULL DEFAULT NULL COMMENT '性别',
|
||||
`age` int NULL DEFAULT NULL COMMENT '年龄',
|
||||
`relation` varchar(10) NULL DEFAULT NULL COMMENT '关系',
|
||||
`idCard` varchar(18) NULL DEFAULT NULL COMMENT '身份证号',
|
||||
`mobile` varchar(18) NULL DEFAULT NULL COMMENT '手机号',
|
||||
`bedInfoId` varchar(32) NULL DEFAULT NULL COMMENT '床位信息id',
|
||||
`createdBy` varchar(32) NULL DEFAULT NULL COMMENT '创建人',
|
||||
`createdAt` bigint NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`updatedBy` varchar(32) NULL DEFAULT NULL COMMENT '修改人',
|
||||
`updatedAt` bigint NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`delFlag` tinyint(1) NULL DEFAULT NULL COMMENT '删除标记',
|
||||
`opBy` varchar(32) NULL DEFAULT NULL,
|
||||
`opAt` varchar(32) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养随行人员';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `staff_therapy_line` (
|
||||
`id` varchar(128) NOT NULL COMMENT 'id',
|
||||
`serialNumber` int NULL DEFAULT NULL COMMENT '编号',
|
||||
`lineName` varchar(50) NULL DEFAULT NULL COMMENT '线路名称',
|
||||
`travelAgencyId` varchar(32) NULL DEFAULT NULL COMMENT '旅行社Id',
|
||||
`regionalNature` varchar(10) NULL DEFAULT NULL COMMENT '区域性质',
|
||||
`playNumberOfDays` int NULL DEFAULT NULL COMMENT '游玩天数',
|
||||
`content` text NULL COMMENT '疗休养内容',
|
||||
`minimumGroupSize` int NULL DEFAULT NULL COMMENT '最少参与教工',
|
||||
`year` int NULL DEFAULT NULL COMMENT '年度',
|
||||
`isDisabled` tinyint(1) NULL DEFAULT NULL COMMENT '是否禁用',
|
||||
`createUnionId` varchar(32) NULL DEFAULT NULL COMMENT '哪个分工会创建的',
|
||||
`signUpStartTime` datetime NULL DEFAULT NULL COMMENT '报名开始时间',
|
||||
`signUpEndTime` datetime NULL DEFAULT NULL COMMENT '报名截至时间',
|
||||
`changeEndTime` datetime NULL DEFAULT NULL COMMENT '变更截至时间',
|
||||
`playStartTime` datetime NULL DEFAULT NULL COMMENT '游玩开始时间',
|
||||
`playEndTime` datetime NULL DEFAULT NULL COMMENT '游玩结束时间',
|
||||
`trafficTools` varchar(50) NULL DEFAULT NULL COMMENT '交通工具',
|
||||
`estimatedCost` varchar(50) NULL DEFAULT NULL COMMENT '预计费用',
|
||||
`estimatedFamilyNumbers` int NULL DEFAULT NULL COMMENT '成团人数包括家属',
|
||||
`files` varchar(30) NULL DEFAULT NULL COMMENT '缩略图',
|
||||
`signUpMode` int NULL DEFAULT NULL COMMENT '报名模式(1.分工会 2.自由)',
|
||||
`createMode` int NULL DEFAULT NULL COMMENT '创建模式(1.分工会 2.校工会)',
|
||||
`lotId` varchar(128) NULL DEFAULT NULL COMMENT '标段',
|
||||
`lineContact` varchar(128) NULL DEFAULT NULL COMMENT '联系人',
|
||||
`lineContactPhone` varchar(128) NULL DEFAULT NULL COMMENT '联系电话',
|
||||
`isFamilySignUp` tinyint(1) NULL DEFAULT NULL COMMENT '是否家属报名',
|
||||
`createdBy` varchar(32) NULL DEFAULT NULL COMMENT '创建人',
|
||||
`createdAt` bigint NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`updatedBy` varchar(32) NULL DEFAULT NULL COMMENT '修改人',
|
||||
`updatedAt` bigint NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`delFlag` tinyint(1) NULL DEFAULT NULL COMMENT '删除标记',
|
||||
`opBy` varchar(32) NULL DEFAULT NULL,
|
||||
`opAt` varchar(32) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养线路';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `staff_therapy_line_union_select` (
|
||||
`id` varchar(128) NOT NULL COMMENT 'id',
|
||||
`unionId` varchar(32) NULL DEFAULT NULL COMMENT '分工会id',
|
||||
`lineId` varchar(32) NULL DEFAULT NULL COMMENT '线路id',
|
||||
`selectTime` datetime NULL DEFAULT NULL COMMENT '选择时间',
|
||||
`selectUserId` varchar(32) NULL DEFAULT NULL COMMENT '选择用户',
|
||||
`signUpStartTime` datetime NULL DEFAULT NULL COMMENT '报名开始时间',
|
||||
`signUpEndTime` datetime NULL DEFAULT NULL COMMENT '报名截至时间',
|
||||
`changeEndTime` datetime NULL DEFAULT NULL COMMENT '变更截至时间',
|
||||
`adjustSignUpEndTime` datetime NULL DEFAULT NULL COMMENT '调剂报名截止时间',
|
||||
`playStartTime` datetime NULL DEFAULT NULL COMMENT '游玩开始时间',
|
||||
`playEndTime` datetime NULL DEFAULT NULL COMMENT '游玩结束时间',
|
||||
`contact` varchar(128) NULL DEFAULT NULL COMMENT '联系人',
|
||||
`contactPhone` varchar(128) NULL DEFAULT NULL COMMENT '联系电话',
|
||||
`principal` varchar(128) NULL DEFAULT NULL COMMENT '负责人',
|
||||
`principalContact` varchar(128) NULL DEFAULT NULL COMMENT '联系方式',
|
||||
`isOpen` tinyint(1) NULL DEFAULT NULL COMMENT '是否公开',
|
||||
`minimumGroupSize` int NULL DEFAULT NULL COMMENT '最少参与教工',
|
||||
`trafficTools` varchar(50) NULL DEFAULT NULL COMMENT '交通工具',
|
||||
`estimatedCost` varchar(50) NULL DEFAULT NULL COMMENT '预计费用',
|
||||
`estimatedFamilyNumbers` int NULL DEFAULT NULL COMMENT '成团人数包括家属',
|
||||
`maxPeopleNumber` int NULL DEFAULT NULL COMMENT '最多人数',
|
||||
`signUpMode` int NULL DEFAULT NULL COMMENT '报名模式、组织形式(1.分工会 2.校工会)',
|
||||
`enable` tinyint(1) NULL DEFAULT NULL COMMENT '是否启用',
|
||||
`travelAgencyId` varchar(32) NULL DEFAULT NULL COMMENT '旅行社id',
|
||||
`createdBy` varchar(32) NULL DEFAULT NULL COMMENT '创建人',
|
||||
`createdAt` bigint NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`updatedBy` varchar(32) NULL DEFAULT NULL COMMENT '修改人',
|
||||
`updatedAt` bigint NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`delFlag` tinyint(1) NULL DEFAULT NULL COMMENT '删除标记',
|
||||
`opBy` varchar(32) NULL DEFAULT NULL,
|
||||
`opAt` varchar(32) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养工会选线';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `staff_therapy_lot` (
|
||||
`id` varchar(32) NOT NULL COMMENT 'id',
|
||||
`lotName` varchar(10) NULL DEFAULT NULL COMMENT '标段',
|
||||
`lotValue` varchar(10) NULL DEFAULT NULL COMMENT '标段值',
|
||||
`activityCost` varchar(10) NULL DEFAULT NULL COMMENT '费用',
|
||||
`configId` varchar(32) NULL DEFAULT NULL COMMENT '配置ID',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养标段';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `staff_therapy_travel_agency` (
|
||||
`id` varchar(128) NOT NULL COMMENT 'id',
|
||||
`serialNumber` varchar(50) NULL DEFAULT NULL COMMENT '旅行社编号',
|
||||
`travelAgencyName` varchar(50) NULL DEFAULT NULL COMMENT '旅行社名称',
|
||||
`contact` varchar(20) NULL DEFAULT NULL COMMENT '旅行社联系人',
|
||||
`contactMobileNumber` varchar(11) NULL DEFAULT NULL COMMENT '旅行社联系人手机',
|
||||
`email` varchar(50) NULL DEFAULT NULL COMMENT '旅行社邮箱',
|
||||
`maxUndertakeNumber` int NULL DEFAULT NULL COMMENT '最多承担人数',
|
||||
`officialWebsite` varchar(100) NULL DEFAULT NULL COMMENT '旅行社官网',
|
||||
`note` varchar(100) NULL DEFAULT NULL COMMENT '备注',
|
||||
`year` int NULL DEFAULT NULL COMMENT '年度',
|
||||
`isDisabled` tinyint(1) NULL DEFAULT NULL COMMENT '是否禁用',
|
||||
`files` varchar(100) NULL DEFAULT NULL COMMENT '缩略图',
|
||||
`signUpTravelAgency` tinyint(1) NULL DEFAULT NULL COMMENT '是否自由组团',
|
||||
`createdBy` varchar(32) NULL DEFAULT NULL COMMENT '创建人',
|
||||
`createdAt` bigint NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`updatedBy` varchar(32) NULL DEFAULT NULL COMMENT '修改人',
|
||||
`updatedAt` bigint NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`delFlag` tinyint(1) NULL DEFAULT NULL COMMENT '删除标记',
|
||||
`opBy` varchar(32) NULL DEFAULT NULL,
|
||||
`opAt` varchar(32) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养旅行社';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `staff_therapy_audit` (
|
||||
`id` varchar(128) NOT NULL,
|
||||
`auditor` varchar(128) NULL DEFAULT NULL,
|
||||
`auditPass` tinyint(1) NULL DEFAULT NULL,
|
||||
`auditTime` datetime NULL DEFAULT NULL,
|
||||
`auditOpinion` text NULL,
|
||||
`username` varchar(128) NULL DEFAULT NULL,
|
||||
`loginname` varchar(128) NULL DEFAULT NULL,
|
||||
`createdBy` varchar(32) NULL DEFAULT NULL COMMENT '创建人',
|
||||
`createdAt` bigint NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`updatedBy` varchar(32) NULL DEFAULT NULL COMMENT '修改人',
|
||||
`updatedAt` bigint NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`delFlag` tinyint(1) NULL DEFAULT NULL COMMENT '删除标记',
|
||||
`opBy` varchar(32) NULL DEFAULT NULL,
|
||||
`opAt` varchar(32) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养审核记录';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `staff_therapy_audit_state` (
|
||||
`stateId` int NOT NULL,
|
||||
`stateName` varchar(128) NULL DEFAULT NULL,
|
||||
`stateColor` varchar(128) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`stateId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养审核状态';
|
||||
|
||||
|
||||
SET @staff_therapy_ddl = IF(
|
||||
EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema=DATABASE() AND table_name='staff_therapy_user'),
|
||||
'DO 0', 'CREATE VIEW `staff_therapy_user` AS SELECT u.*, u.arrivalAtSchoolDate AS schoolTime FROM vw_user u'
|
||||
);
|
||||
PREPARE staff_therapy_statement FROM @staff_therapy_ddl;
|
||||
EXECUTE staff_therapy_statement;
|
||||
DEALLOCATE PREPARE staff_therapy_statement;
|
||||
|
||||
SET @staff_therapy_ddl = IF(
|
||||
EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema=DATABASE() AND table_name='staff_therapy_union'),
|
||||
'DO 0', 'CREATE VIEW `staff_therapy_union` AS SELECT u.*, u.name AS unionname FROM sys_union u'
|
||||
);
|
||||
PREPARE staff_therapy_statement FROM @staff_therapy_ddl;
|
||||
EXECUTE staff_therapy_statement;
|
||||
DEALLOCATE PREPARE staff_therapy_statement;
|
||||
|
||||
SET @staff_therapy_ddl = IF(
|
||||
EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema=DATABASE() AND table_name='staff_therapy_unit'),
|
||||
'DO 0', 'CREATE VIEW `staff_therapy_unit` AS SELECT u.* FROM sys_unit u'
|
||||
);
|
||||
PREPARE staff_therapy_statement FROM @staff_therapy_ddl;
|
||||
EXECUTE staff_therapy_statement;
|
||||
DEALLOCATE PREPARE staff_therapy_statement;
|
||||
|
||||
START TRANSACTION;
|
||||
SET @staff_therapy_now = CAST(UNIX_TIMESTAMP(CURRENT_TIMESTAMP(3)) * 1000 AS UNSIGNED);
|
||||
|
||||
|
||||
INSERT INTO `staff_therapy_audit_state` (`stateId`,`stateName`,`stateColor`)
|
||||
SELECT 2710,'待分工会审核','#e6a23c'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `staff_therapy_audit_state` WHERE `stateId`=2710);
|
||||
|
||||
INSERT INTO `staff_therapy_audit_state` (`stateId`,`stateName`,`stateColor`)
|
||||
SELECT 2715,'分工会审核不通过','#f56c6c'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `staff_therapy_audit_state` WHERE `stateId`=2715);
|
||||
|
||||
INSERT INTO `staff_therapy_audit_state` (`stateId`,`stateName`,`stateColor`)
|
||||
SELECT 2720,'待选择线路分工会审核','#e6a23c'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `staff_therapy_audit_state` WHERE `stateId`=2720);
|
||||
|
||||
INSERT INTO `staff_therapy_audit_state` (`stateId`,`stateName`,`stateColor`)
|
||||
SELECT 2725,'选择线路分工会不通过','#f56c6c'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `staff_therapy_audit_state` WHERE `stateId`=2725);
|
||||
|
||||
INSERT INTO `staff_therapy_audit_state` (`stateId`,`stateName`,`stateColor`)
|
||||
SELECT 2730,'待校工会审核','#e6a23c'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `staff_therapy_audit_state` WHERE `stateId`=2730);
|
||||
|
||||
INSERT INTO `staff_therapy_audit_state` (`stateId`,`stateName`,`stateColor`)
|
||||
SELECT 2735,'校工会审核不通过','#f56c6c'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `staff_therapy_audit_state` WHERE `stateId`=2735);
|
||||
|
||||
INSERT INTO `staff_therapy_audit_state` (`stateId`,`stateName`,`stateColor`)
|
||||
SELECT 2750,'审核通过','#67c23a'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `staff_therapy_audit_state` WHERE `stateId`=2750);
|
||||
|
||||
INSERT INTO `sys_config` (`configKey`,`configValue`,`note`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT 'staffTherapyRecuperationVersion','zjnu','职工疗休养独立子模块报名规则版本','',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `configKey`='staffTherapyRecuperationVersion');
|
||||
|
||||
INSERT INTO `staff_therapy_config`
|
||||
(`id`,`configName`,`isSnLine`,`isSwLine`,`travelAudit`,`bedInfo`,`familyInfo`,`outsideQuotaProportion`,`unionLineNumberConfigs`)
|
||||
SELECT REPLACE(UUID(),'-',''),'智慧工会疗休养配置',0,0,0,1,1,0,JSON_ARRAY()
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `staff_therapy_config`);
|
||||
|
||||
SET @staff_therapy_pc_module = COALESCE(
|
||||
(SELECT m.`moduleId` FROM `sys_menu` m INNER JOIN `sys_module` s ON s.`id`=m.`moduleId`
|
||||
WHERE m.`href` LIKE '/platform/recuperation%' AND m.`platform`='pc' ORDER BY m.`id` LIMIT 1),
|
||||
(SELECT `id` FROM `sys_module` WHERE `name`='职工福利' AND `platform`='pc' ORDER BY `id` LIMIT 1),
|
||||
REPLACE(UUID(),'-','')
|
||||
);
|
||||
INSERT INTO `sys_module` (`id`,`name`,`platform`,`sortNum`,`faIcon`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_pc_module,'职工福利','pc',50,'fa fa-heart','',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_module` WHERE `id`=@staff_therapy_pc_module);
|
||||
SET @staff_therapy_module_name = (SELECT `name` FROM `sys_module` WHERE `id`=@staff_therapy_pc_module);
|
||||
SET @staff_therapy_module_sort = (SELECT `sortNum` FROM `sys_module` WHERE `id`=@staff_therapy_pc_module);
|
||||
SET @staff_therapy_h5_module = COALESCE(
|
||||
(SELECT `id` FROM `sys_module` WHERE `name`=@staff_therapy_module_name AND `platform`='h5' ORDER BY `id` LIMIT 1),
|
||||
REPLACE(UUID(),'-','')
|
||||
);
|
||||
INSERT INTO `sys_module` (`id`,`name`,`platform`,`sortNum`,`faIcon`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_h5_module,@staff_therapy_module_name,'h5',@staff_therapy_module_sort,'fa fa-heart','',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_module` WHERE `id`=@staff_therapy_h5_module);
|
||||
|
||||
SET @staff_therapy_menu_root = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT('',LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=4
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_root,'',@staff_therapy_next_path,'职工疗休养','menu','/platform/staffTherapyRecuperation','_self','fa fa-heart',1,0,'staffTherapyRecuperation',
|
||||
@staff_therapy_next_location,1,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation');
|
||||
|
||||
SET @staff_therapy_root_path = (SELECT `path` FROM `sys_menu` WHERE `id`=@staff_therapy_menu_root);
|
||||
|
||||
-- 基础设置
|
||||
SET @staff_therapy_menu_config = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyConfig' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_config,@staff_therapy_menu_root,@staff_therapy_next_path,'基础设置','menu','/platform/staffTherapyRecuperation?screen=config','_self','fa fa-heart',1,0,'staffTherapyRecuperation.TheRapyConfig',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyConfig');
|
||||
|
||||
-- 旅行社管理
|
||||
SET @staff_therapy_menu_agency = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.travelAgency' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_agency,@staff_therapy_menu_root,@staff_therapy_next_path,'旅行社管理','menu','/platform/staffTherapyRecuperation?screen=agency','_self','fa fa-heart',1,0,'staffTherapyRecuperation.travelAgency',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.travelAgency');
|
||||
|
||||
-- 线路管理
|
||||
SET @staff_therapy_menu_line = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.line' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_line,@staff_therapy_menu_root,@staff_therapy_next_path,'线路管理','menu','/platform/staffTherapyRecuperation?screen=line','_self','fa fa-heart',1,0,'staffTherapyRecuperation.line',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.line');
|
||||
|
||||
-- 目的地管理
|
||||
SET @staff_therapy_menu_base = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheBaseManagement' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_base,@staff_therapy_menu_root,@staff_therapy_next_path,'目的地管理','menu','/platform/staffTherapyRecuperation?screen=base','_self','fa fa-heart',1,0,'staffTherapyRecuperation.TheBaseManagement',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheBaseManagement');
|
||||
|
||||
-- 分工会选择线路
|
||||
SET @staff_therapy_menu_branchSelect = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.lineFghSelect' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_branchSelect,@staff_therapy_menu_root,@staff_therapy_next_path,'分工会选择线路','menu','/platform/staffTherapyRecuperation?screen=branchSelect','_self','fa fa-heart',1,0,'staffTherapyRecuperation.lineFghSelect',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.lineFghSelect');
|
||||
|
||||
-- 校工会选择线路
|
||||
SET @staff_therapy_menu_schoolSelect = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.lineXghSelect' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_schoolSelect,@staff_therapy_menu_root,@staff_therapy_next_path,'校工会选择线路','menu','/platform/staffTherapyRecuperation?screen=schoolSelect','_self','fa fa-heart',1,0,'staffTherapyRecuperation.lineXghSelect',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.lineXghSelect');
|
||||
|
||||
-- 线路选择总览
|
||||
SET @staff_therapy_menu_overview = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.lineSelectionOverview' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_overview,@staff_therapy_menu_root,@staff_therapy_next_path,'线路选择总览','menu','/platform/staffTherapyRecuperation?screen=overview','_self','fa fa-heart',1,0,'staffTherapyRecuperation.lineSelectionOverview',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.lineSelectionOverview');
|
||||
|
||||
-- 线路组团
|
||||
SET @staff_therapy_menu_cluster = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.lineCluster' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_cluster,@staff_therapy_menu_root,@staff_therapy_next_path,'线路组团','menu','/platform/staffTherapyRecuperation?screen=cluster','_self','fa fa-heart',1,0,'staffTherapyRecuperation.lineCluster',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.lineCluster');
|
||||
|
||||
-- 线路调剂
|
||||
SET @staff_therapy_menu_adjustment = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.line.adjustment' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_adjustment,@staff_therapy_menu_root,@staff_therapy_next_path,'线路调剂','menu','/platform/staffTherapyRecuperation?screen=adjustment','_self','fa fa-heart',1,0,'staffTherapyRecuperation.line.adjustment',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.line.adjustment');
|
||||
|
||||
-- 参加人员导入
|
||||
SET @staff_therapy_menu_import = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.joinUser.import' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_import,@staff_therapy_menu_root,@staff_therapy_next_path,'参加人员导入','menu','/platform/staffTherapyRecuperation?screen=import','_self','fa fa-heart',1,0,'staffTherapyRecuperation.joinUser.import',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.joinUser.import');
|
||||
|
||||
-- 分工会审核
|
||||
SET @staff_therapy_menu_branchAudit = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyAudit' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_branchAudit,@staff_therapy_menu_root,@staff_therapy_next_path,'分工会审核','menu','/platform/staffTherapyRecuperation?screen=branchAudit','_self','fa fa-heart',1,0,'staffTherapyRecuperation.TheRapyAudit',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyAudit');
|
||||
|
||||
-- 自由组团审核
|
||||
SET @staff_therapy_menu_travelAudit = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyTravelAudit' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_travelAudit,@staff_therapy_menu_root,@staff_therapy_next_path,'自由组团审核','menu','/platform/staffTherapyRecuperation?screen=travelAudit','_self','fa fa-heart',1,0,'staffTherapyRecuperation.TheRapyTravelAudit',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyTravelAudit');
|
||||
|
||||
-- 校工会审核
|
||||
SET @staff_therapy_menu_schoolAudit = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyXghAudit' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_schoolAudit,@staff_therapy_menu_root,@staff_therapy_next_path,'校工会审核','menu','/platform/staffTherapyRecuperation?screen=schoolAudit','_self','fa fa-heart',1,0,'staffTherapyRecuperation.TheRapyXghAudit',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyXghAudit');
|
||||
|
||||
-- 分工会查询
|
||||
SET @staff_therapy_menu_branchQuery = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyQuery' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_branchQuery,@staff_therapy_menu_root,@staff_therapy_next_path,'分工会查询','menu','/platform/staffTherapyRecuperation?screen=branchQuery','_self','fa fa-heart',1,0,'staffTherapyRecuperation.TheRapyQuery',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyQuery');
|
||||
|
||||
-- 报名人员查询
|
||||
SET @staff_therapy_menu_userQuery = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyUserQuery' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_userQuery,@staff_therapy_menu_root,@staff_therapy_next_path,'报名人员查询','menu','/platform/staffTherapyRecuperation?screen=userQuery','_self','fa fa-heart',1,0,'staffTherapyRecuperation.TheRapyUserQuery',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyUserQuery');
|
||||
|
||||
-- 查询统计
|
||||
SET @staff_therapy_menu_queryStatistics = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.queryStatics' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_queryStatistics,@staff_therapy_menu_root,@staff_therapy_next_path,'查询统计','menu','/platform/staffTherapyRecuperation?screen=queryStatistics','_self','fa fa-heart',1,0,'staffTherapyRecuperation.queryStatics',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.queryStatics');
|
||||
|
||||
-- 线路统计
|
||||
SET @staff_therapy_menu_lineStatistics = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.statistics' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_lineStatistics,@staff_therapy_menu_root,@staff_therapy_next_path,'线路统计','menu','/platform/staffTherapyRecuperation?screen=lineStatistics','_self','fa fa-heart',1,0,'staffTherapyRecuperation.statistics',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.statistics');
|
||||
|
||||
-- 旅行社月度统计
|
||||
SET @staff_therapy_menu_agencyStatistics = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.travelAgencyMonthlyStatistics' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_agencyStatistics,@staff_therapy_menu_root,@staff_therapy_next_path,'旅行社月度统计','menu','/platform/staffTherapyRecuperation?screen=agencyStatistics','_self','fa fa-heart',1,0,'staffTherapyRecuperation.travelAgencyMonthlyStatistics',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.travelAgencyMonthlyStatistics');
|
||||
|
||||
-- 分工会线路数量统计
|
||||
SET @staff_therapy_menu_unionStatistics = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.unionLineNumberStatistics' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_unionStatistics,@staff_therapy_menu_root,@staff_therapy_next_path,'分工会线路数量统计','menu','/platform/staffTherapyRecuperation?screen=unionStatistics','_self','fa fa-heart',1,0,'staffTherapyRecuperation.unionLineNumberStatistics',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.unionLineNumberStatistics');
|
||||
|
||||
SET @staff_therapy_menu_signup = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.signup' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_signup,@staff_therapy_menu_root,@staff_therapy_next_path,'疗休养报名','menu','/platform/staffTherapyRecuperation?screen=signup','_self','fa fa-heart',1,0,'staffTherapyRecuperation.signup',
|
||||
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.signup');
|
||||
|
||||
SET @staff_therapy_menu_mobile = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.mobile' LIMIT 1),REPLACE(UUID(),'-',''));
|
||||
SET @staff_therapy_next_path = (
|
||||
SELECT CONCAT('',LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
|
||||
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=4
|
||||
);
|
||||
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
|
||||
INSERT INTO `sys_menu`
|
||||
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
|
||||
SELECT @staff_therapy_menu_mobile,'',@staff_therapy_next_path,'职工疗休养','menu','/platform/staffTherapyRecuperation/mobile/index','_self','fa fa-heart',1,0,'staffTherapyRecuperation.mobile',
|
||||
@staff_therapy_next_location,0,'h5',@staff_therapy_h5_module,'',@staff_therapy_now,'',@staff_therapy_now,0
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.mobile');
|
||||
|
||||
|
||||
INSERT INTO `sys_role_menu` (`roleId`,`menuId`)
|
||||
SELECT r.`id`,m.`id` FROM `sys_role` r CROSS JOIN `sys_menu` m
|
||||
WHERE r.`disabled`=0 AND r.`code` IN ('sysadmin','superadmin','A06','SchoolUnionMemberAdmin','SYSADMIN','SCHOOL_UNION_ADMIN','SCHOOL_UNION_WELFARE_ADMIN','SCHOOL_UNION_MEMBER_ADMIN')
|
||||
AND m.`permission` IN ('staffTherapyRecuperation','staffTherapyRecuperation.TheRapyConfig','staffTherapyRecuperation.travelAgency','staffTherapyRecuperation.line','staffTherapyRecuperation.TheBaseManagement','staffTherapyRecuperation.lineFghSelect','staffTherapyRecuperation.lineXghSelect','staffTherapyRecuperation.lineSelectionOverview','staffTherapyRecuperation.lineCluster','staffTherapyRecuperation.line.adjustment','staffTherapyRecuperation.joinUser.import','staffTherapyRecuperation.TheRapyAudit','staffTherapyRecuperation.TheRapyTravelAudit','staffTherapyRecuperation.TheRapyXghAudit','staffTherapyRecuperation.TheRapyQuery','staffTherapyRecuperation.TheRapyUserQuery','staffTherapyRecuperation.queryStatics','staffTherapyRecuperation.statistics','staffTherapyRecuperation.travelAgencyMonthlyStatistics','staffTherapyRecuperation.unionLineNumberStatistics')
|
||||
AND NOT EXISTS (SELECT 1 FROM `sys_role_menu` rel WHERE rel.`roleId`=r.`id` AND rel.`menuId`=m.`id`);
|
||||
|
||||
INSERT INTO `sys_role_menu` (`roleId`,`menuId`)
|
||||
SELECT r.`id`,m.`id` FROM `sys_role` r CROSS JOIN `sys_menu` m
|
||||
WHERE r.`disabled`=0 AND r.`code` IN ('H03','H04','H06','BRANCH_UNION_ADMIN','BRANCH_UNION_CHAIRMAN')
|
||||
AND m.`permission` IN ('staffTherapyRecuperation','staffTherapyRecuperation.line','staffTherapyRecuperation.TheBaseManagement','staffTherapyRecuperation.lineFghSelect','staffTherapyRecuperation.lineSelectionOverview','staffTherapyRecuperation.lineCluster','staffTherapyRecuperation.line.adjustment','staffTherapyRecuperation.TheRapyAudit','staffTherapyRecuperation.TheRapyTravelAudit','staffTherapyRecuperation.TheRapyQuery')
|
||||
AND NOT EXISTS (SELECT 1 FROM `sys_role_menu` rel WHERE rel.`roleId`=r.`id` AND rel.`menuId`=m.`id`);
|
||||
|
||||
INSERT INTO `sys_role_menu` (`roleId`,`menuId`)
|
||||
SELECT r.`id`,m.`id` FROM `sys_role` r CROSS JOIN `sys_menu` m
|
||||
WHERE r.`disabled`=0 AND r.`code` IN ('public','PUBLIC','MEMBER','sysadmin','superadmin','SYSADMIN')
|
||||
AND m.`permission` IN ('staffTherapyRecuperation','staffTherapyRecuperation.signup','staffTherapyRecuperation.mobile')
|
||||
AND NOT EXISTS (SELECT 1 FROM `sys_role_menu` rel WHERE rel.`roleId`=r.`id` AND rel.`menuId`=m.`id`);
|
||||
|
||||
COMMIT;
|
||||
@@ -0,0 +1,185 @@
|
||||
|
||||
/**
|
||||
* 民族
|
||||
* @type {string[]}
|
||||
*/
|
||||
const nation = [
|
||||
'汉族',
|
||||
'蒙古族',
|
||||
'回族',
|
||||
'藏族',
|
||||
'维吾尔族',
|
||||
'苗族',
|
||||
'彝族',
|
||||
'壮族',
|
||||
'布依族',
|
||||
'朝鲜族',
|
||||
'满族',
|
||||
'侗族',
|
||||
'瑶族',
|
||||
'白族',
|
||||
'土家族',
|
||||
'哈尼族',
|
||||
'哈萨克族',
|
||||
'傣族',
|
||||
'黎族',
|
||||
'傈僳族',
|
||||
'佤族',
|
||||
'畲族',
|
||||
'高山族',
|
||||
'拉祜族',
|
||||
'水族',
|
||||
'东乡族',
|
||||
'纳西族',
|
||||
'景颇族',
|
||||
'柯尔克孜族',
|
||||
'土族',
|
||||
'达翰尔族',
|
||||
'么佬族',
|
||||
'羌族',
|
||||
'布朗族',
|
||||
'撒拉族',
|
||||
'毛南族',
|
||||
'仡佬族',
|
||||
'锡伯族',
|
||||
'阿昌族',
|
||||
'普米族',
|
||||
'塔吉克族',
|
||||
'怒族',
|
||||
'乌孜别克族',
|
||||
'俄罗斯族',
|
||||
'鄂温克族',
|
||||
'德昂族',
|
||||
'保安族',
|
||||
'裕固族',
|
||||
'京族',
|
||||
'塔塔尔族',
|
||||
'独龙族',
|
||||
'鄂伦春族',
|
||||
'赫哲族',
|
||||
'门巴族',
|
||||
'珞巴族',
|
||||
'基诺族'
|
||||
];
|
||||
|
||||
const uploadFileType = ['jpg', 'png', 'doc', 'docx', 'xls', 'xlsx', 'pdf']
|
||||
const docType = ['doc', 'docx', 'xls', 'xlsx', 'pdf']
|
||||
|
||||
const FILE_UPLOAD_ADDRESS = '/platform/staffTherapyRecuperation/common/uploadFile'
|
||||
const FILE_DELETE_ADDRESS = '/platform/staffTherapyRecuperation/common/deleteFile'
|
||||
const FILE_STREAM_PREVIEW_ADDRESS = '/platform/staffTherapyRecuperation/common/preview'
|
||||
|
||||
Vue.component('m-page-loading', httpVueLoader('/components/staffbenefit/therapyRecuperation/mobile/MLoading.vue'))
|
||||
Vue.component('m-table-loading', httpVueLoader('/components/staffbenefit/therapyRecuperation/mobile/MTableLoading.vue'))
|
||||
Vue.component('m-card', httpVueLoader('/components/staffbenefit/therapyRecuperation/mobile/MCard.vue'))
|
||||
Vue.component('vant-file-upload', httpVueLoader('/components/staffbenefit/therapyRecuperation/mobile/VantFileUpload.vue'))
|
||||
|
||||
const GetQueryString = (name) => {
|
||||
const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
||||
const r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return unescape(r[2]);
|
||||
return "";
|
||||
}
|
||||
const removeHTMLTag = (str) => {
|
||||
str = str.replace(/<\/?[^>]*>/g, ''); //去除HTML tag
|
||||
str = str.replace(/[ | ]*\n/g, '\n'); //去除行尾空白
|
||||
str = str.replace(/\n[\s| | ]*\r/g, '\n'); //去除多余空行
|
||||
str = str.replace(/ /ig, '');//去掉
|
||||
return str;
|
||||
}
|
||||
|
||||
const CREATE_PREVIEW_URL = (val) => {
|
||||
return /^(https?:|data:|blob:|\/)/.test(val || "") ? val : FILE_STREAM_PREVIEW_ADDRESS + "?id=" + encodeURIComponent(val)
|
||||
}
|
||||
|
||||
const clone = (val) => {
|
||||
return JSON.parse(JSON.stringify(val))
|
||||
}
|
||||
|
||||
const toChinesNum = (num) => {
|
||||
let changeNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
|
||||
let unit = ["", "十", "百", "千", "万"];
|
||||
num = parseInt(num);
|
||||
let getWan = (temp) => {
|
||||
let strArr = temp.toString().split("").reverse();
|
||||
let newNum = "";
|
||||
for (let i = 0; i < strArr.length; i++) {
|
||||
newNum = (i == 0 && strArr[i] == 0 ? "" : (i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i]))) + newNum;
|
||||
}
|
||||
return newNum;
|
||||
}
|
||||
let overWan = Math.floor(num / 10000);
|
||||
let noWan = num % 10000;
|
||||
if (noWan.toString().length < 4) {
|
||||
noWan = "0" + noWan;
|
||||
}
|
||||
return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
|
||||
}
|
||||
|
||||
const loc = () => {
|
||||
return location.href.replace(location.search, "").replace(location.hash, "")
|
||||
}
|
||||
|
||||
const modal = {
|
||||
// 消息提示
|
||||
msg(content) {
|
||||
vant.Toast(content)
|
||||
},
|
||||
// 错误消息
|
||||
msgError(content) {
|
||||
vant.Toast.fail(content)
|
||||
},
|
||||
// 成功消息
|
||||
msgSuccess(content) {
|
||||
vant.Toast.success(content)
|
||||
},
|
||||
// 弹出提示
|
||||
alert(content) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: content
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
},
|
||||
// 确认窗体
|
||||
confirm(content) {
|
||||
return new Promise((resolve, reject) => {
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: content,
|
||||
}).then(() => {
|
||||
resolve()
|
||||
}).catch(() => {
|
||||
// reject()
|
||||
})
|
||||
})
|
||||
},
|
||||
// 提示信息
|
||||
showToast(option) {
|
||||
if (typeof option === "object") {
|
||||
vant.Toast(option)
|
||||
} else {
|
||||
vant.Toast.loading({
|
||||
message: option,
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
duration: 2500
|
||||
});
|
||||
}
|
||||
},
|
||||
// 打开遮罩层
|
||||
loading(content) {
|
||||
vant.Toast.loading({
|
||||
message: content,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
});
|
||||
},
|
||||
// 关闭遮罩层
|
||||
closeLoading() {
|
||||
vant.Toast.clear();
|
||||
}
|
||||
}
|
||||
Vue.prototype.$modal = modal
|
||||
@@ -0,0 +1,125 @@
|
||||
const uploadFileType = ['jpg', 'png', 'doc', 'docx', 'xls', 'xlsx', 'pdf']
|
||||
const docType = ['doc', 'docx', 'xls', 'xlsx', 'pdf']
|
||||
|
||||
const FILE_UPLOAD_ADDRESS = '/platform/staffTherapyRecuperation/common/uploadFile'
|
||||
const FILE_DELETE_ADDRESS = '/platform/staffTherapyRecuperation/common/deleteFile'
|
||||
const FILE_STREAM_PREVIEW_ADDRESS = '/platform/staffTherapyRecuperation/common/preview'
|
||||
const FILE_STREAM_DOWNLOAD_ADDRESS = '/platform/staffTherapyRecuperation/common/download'
|
||||
|
||||
const preview = async (filename, id) => {
|
||||
const suffix = filename.substring(filename.lastIndexOf('.') + 1)
|
||||
if (!docType.includes(suffix.toLowerCase())) {
|
||||
let image = new Image();
|
||||
image.src = FILE_STREAM_PREVIEW_ADDRESS + "?id=" + id
|
||||
let viewer = new Viewer(image);
|
||||
viewer.show();
|
||||
} else {
|
||||
let pdfStreamUrl = encodeURIComponent(FILE_STREAM_PREVIEW_ADDRESS + '?id=' + id) //将路径转码
|
||||
window.open('/assets/platform/plugins/pdfJs/web/viewer.html?file=' + pdfStreamUrl, filename)
|
||||
}
|
||||
}
|
||||
|
||||
const download = (id) => {
|
||||
window.open(FILE_STREAM_DOWNLOAD_ADDRESS + '?id=' + id)
|
||||
}
|
||||
|
||||
|
||||
const PREVIEW_IMAGE = (val) => {
|
||||
let image = new Image();
|
||||
image.src = FILE_STREAM_PREVIEW_ADDRESS + "?id=" + val
|
||||
let viewer = new Viewer(image);
|
||||
viewer.show();
|
||||
}
|
||||
|
||||
const CREATE_PREVIEW_URL = (val) => {
|
||||
return /^(https?:|data:|blob:|\/)/.test(val || "") ? val : FILE_STREAM_PREVIEW_ADDRESS + "?id=" + encodeURIComponent(val)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 遮盖层颜色
|
||||
* @type {string}
|
||||
*/
|
||||
const COVER_LAYER_COLOR = "rgba(0,0,0,.45)"
|
||||
|
||||
/**
|
||||
* 民族
|
||||
* @type {string[]}
|
||||
*/
|
||||
const nation = [
|
||||
'汉族',
|
||||
'蒙古族',
|
||||
'回族',
|
||||
'藏族',
|
||||
'维吾尔族',
|
||||
'苗族',
|
||||
'彝族',
|
||||
'壮族',
|
||||
'布依族',
|
||||
'朝鲜族',
|
||||
'满族',
|
||||
'侗族',
|
||||
'瑶族',
|
||||
'白族',
|
||||
'土家族',
|
||||
'哈尼族',
|
||||
'哈萨克族',
|
||||
'傣族',
|
||||
'黎族',
|
||||
'傈僳族',
|
||||
'佤族',
|
||||
'畲族',
|
||||
'高山族',
|
||||
'拉祜族',
|
||||
'水族',
|
||||
'东乡族',
|
||||
'纳西族',
|
||||
'景颇族',
|
||||
'柯尔克孜族',
|
||||
'土族',
|
||||
'达翰尔族',
|
||||
'么佬族',
|
||||
'羌族',
|
||||
'布朗族',
|
||||
'撒拉族',
|
||||
'毛南族',
|
||||
'仡佬族',
|
||||
'锡伯族',
|
||||
'阿昌族',
|
||||
'普米族',
|
||||
'塔吉克族',
|
||||
'怒族',
|
||||
'乌孜别克族',
|
||||
'俄罗斯族',
|
||||
'鄂温克族',
|
||||
'德昂族',
|
||||
'保安族',
|
||||
'裕固族',
|
||||
'京族',
|
||||
'塔塔尔族',
|
||||
'独龙族',
|
||||
'鄂伦春族',
|
||||
'赫哲族',
|
||||
'门巴族',
|
||||
'珞巴族',
|
||||
'基诺族'
|
||||
];
|
||||
|
||||
const loc = () => {
|
||||
return location.href.replace(location.search, "").replace(location.hash, "")
|
||||
}
|
||||
|
||||
const clone = (obj) => {
|
||||
return JSON.parse(JSON.stringify(obj))
|
||||
}
|
||||
|
||||
const calcTableHeight = (eleIds = []) => {
|
||||
if (eleIds) {
|
||||
eleIds.forEach(e_id => {
|
||||
const ele = document.querySelector('#' + e_id)
|
||||
if (ele) {
|
||||
ele.style.height = (innerHeight - ele.getBoundingClientRect().top - parseInt(ele.dataset.bottom)) + 'px'
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
const sublime = {
|
||||
showLoadingbar() {
|
||||
if (!document.getElementById('therapy-loading')) {
|
||||
const bar = document.createElement('div');
|
||||
bar.id = 'therapy-loading';
|
||||
document.body.appendChild(bar);
|
||||
}
|
||||
},
|
||||
closeLoadingbar() {
|
||||
const bar = document.getElementById('therapy-loading');
|
||||
if (bar) bar.remove();
|
||||
}
|
||||
};
|
||||
|
||||
$.ajaxSetup({
|
||||
traditional: true,
|
||||
error(xhr) {
|
||||
sublime.closeLoadingbar();
|
||||
const message = xhr.responseJSON && xhr.responseJSON.msg || '请求失败,请稍后重试';
|
||||
if (window.ELEMENT) ELEMENT.Message.error(message);
|
||||
else if (window.vant) vant.Toast.fail(message);
|
||||
}
|
||||
});
|
||||
|
||||
Vue.prototype.$downLoad = function(url, data = {}) {
|
||||
const query = $.param(data, true);
|
||||
window.open(url + (url.includes('?') ? '&' : '?') + query);
|
||||
};
|
||||
Vue.prototype.$download = Vue.prototype.$downLoad;
|
||||
Vue.prototype.$viewImage = function(url) {
|
||||
const address = CREATE_PREVIEW_URL(url);
|
||||
if (window.vant) vant.ImagePreview([address]);
|
||||
else window.open(address);
|
||||
};
|
||||
window.viewImage = Vue.prototype.$viewImage;
|
||||
|
||||
// v3 views use the same helper for stored file IDs and v4 download URLs.
|
||||
window.therapyPreview = function(value) {
|
||||
if (!value) return '';
|
||||
return /^(https?:|data:|blob:|\/)/.test(value) ? value :
|
||||
'/platform/staffTherapyRecuperation/common/preview?id=' + encodeURIComponent(value);
|
||||
};
|
||||
@@ -0,0 +1,129 @@
|
||||
Vue.component('vi-title', {
|
||||
props: ['title'],
|
||||
template: `
|
||||
<div style="display: flex;flex-direction:row;color: #1867b0;font-weight: bolder;margin-bottom: 20px">
|
||||
<div style="width: 5px;height: 24px;background-color: #1867b0;border-radius: 2px"></div>
|
||||
<div style="margin-left: 20px;line-height: 24px;font-size: 15px;letter-spacing: 1px">
|
||||
{{ title }}
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
||||
Vue.component('vi-title2', {
|
||||
props: ['title'],
|
||||
template: `
|
||||
<el-row type="flex" justify="space-between" align="middle" style="margin-bottom: 15px">
|
||||
<div style="display: flex;justify-content: center;align-items: center">
|
||||
<vi-title :title="title" style="margin-bottom: 0"></vi-title><slot name="label_end"></slot>
|
||||
</div>
|
||||
|
||||
<div style="display: flex;justify-content: right;align-items: center">
|
||||
<slot name="func"></slot>
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
`
|
||||
})
|
||||
|
||||
Vue.component('vi-table-state', {
|
||||
props: ['state'],
|
||||
template: `
|
||||
<span :style="'color:'+state.stateColor">{{ state.stateName }}</span>
|
||||
`
|
||||
})
|
||||
Vue.component('more', {
|
||||
props: {more: {type: Boolean, default: false}},
|
||||
template: `
|
||||
<el-link type="primary" :underline="false" style="margin-left: 15px"
|
||||
@click="more=!more;$emit('change', more)">
|
||||
{{ more ? '收起' : '展开' }}<i
|
||||
:class="more?'el-icon-arrow-up':'el-icon-arrow-down'"></i></el-link>
|
||||
`,
|
||||
model: {
|
||||
prop: 'more',
|
||||
event: 'change'
|
||||
}
|
||||
})
|
||||
|
||||
Vue.component('table-tool', {
|
||||
props: {
|
||||
label: {type: String},
|
||||
app: {}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
checkedFields: [],
|
||||
columns: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
tableSizeChange(command) {
|
||||
const {size} = command
|
||||
this.app.tableSizeChange(size)
|
||||
},
|
||||
columnChange() {
|
||||
this.app.columnChange(this.columns.filter(v => this.checkedFields.includes(v.prop)))
|
||||
},
|
||||
getColumns() {
|
||||
const {tableColumns} = this.app
|
||||
if (!tableColumns) {
|
||||
return
|
||||
}
|
||||
this.columns = tableColumns
|
||||
this.checkedFields = this.columns.filter(v => v.checked !== 0).map(v => v.prop)
|
||||
this.columnChange()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getColumns()
|
||||
},
|
||||
template: `
|
||||
<el-row type="flex" justify="space-between" align="middle" style="margin-bottom: 15px">
|
||||
|
||||
<div style="display: flex;justify-content: center;align-items: center">
|
||||
<vi-title :title="label" style="margin-bottom: 0"></vi-title><slot name="label_end"></slot>
|
||||
</div>
|
||||
|
||||
<div style="display: flex;justify-content: right;align-items: center">
|
||||
<slot name="func"></slot>
|
||||
|
||||
<div class="table-tool-group">
|
||||
<div class="table-tool-group-item" @click="app.doSearch()" style="width: 50px;padding-left: 10px;">
|
||||
<i class="el-icon-refresh"></i>
|
||||
</div>
|
||||
|
||||
<el-dropdown @command="tableSizeChange" class="table-tool-group-item">
|
||||
<div style="display: flex;width: 100%;height: 100%;justify-content: center;align-items: center"><i
|
||||
class="el-icon-c-scale-to-original"></i></div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{size:'mini'}">Mini</el-dropdown-item>
|
||||
<el-dropdown-item :command="{size:'small'}">Small</el-dropdown-item>
|
||||
<el-dropdown-item :command="{size:'medium'}">Medium</el-dropdown-item>
|
||||
<el-dropdown-item :command="{size:''}">Large</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
|
||||
<el-popover
|
||||
trigger="hover" placement="bottom-start">
|
||||
|
||||
<div>
|
||||
<el-checkbox-group v-model="checkedFields" @change="columnChange">
|
||||
<el-checkbox v-for="field in columns" :label="field.prop" style="display: block">{{
|
||||
field.label
|
||||
}}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
|
||||
<div slot="reference" style="width: 50px;padding-right: 10px;" class="table-tool-group-item">
|
||||
<i class="el-icon-s-operation"></i>
|
||||
</div>
|
||||
</el-popover>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
`,
|
||||
})
|
||||
@@ -0,0 +1,198 @@
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
|
||||
#app {
|
||||
background-color: rgb(240, 242, 245);
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.platform .guava-card .slot-class {
|
||||
height: calc(100vh - 180px);
|
||||
}
|
||||
|
||||
/**
|
||||
图片预览
|
||||
*/
|
||||
.viewer-container {
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
/**
|
||||
富文本层级调整
|
||||
*/
|
||||
.w-e-toolbar{
|
||||
z-index: 1001!important;
|
||||
}
|
||||
|
||||
.w-e-text-container{
|
||||
z-index: 1000!important;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
搜索栏样式
|
||||
*/
|
||||
.search {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: -15px;
|
||||
}
|
||||
|
||||
.search .search-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
box-sizing: border-box;
|
||||
width: calc((100% - 160px) / 3);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.search .search-query {
|
||||
width: 160px;
|
||||
margin-bottom: 15px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.search .search-item:not(:last-child) {
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
.search .search-item-label {
|
||||
color: rgb(100, 100, 100);
|
||||
margin-right: 10px;
|
||||
width: 80px;
|
||||
min-width: 80px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.search .search-item-option {
|
||||
min-width: calc(100% - 80px - 10px);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1200px) {
|
||||
.search .search-item {
|
||||
width: calc((100% - 160px) / 2);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 992px) {
|
||||
.search .search-item {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.search .search-item:not(:last-child) {
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.platform .vi-table table thead tr th {
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
|
||||
.table-tool-group {
|
||||
margin-left: 15px;
|
||||
overflow: hidden;
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.table-tool-group .table-tool-group-item {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
background-color: rgba(240, 240, 240, .7);
|
||||
font-weight: bolder;
|
||||
transition: all 250ms;
|
||||
}
|
||||
|
||||
.table-tool-group .table-tool-group-item:not(:last-child) {
|
||||
border-right: 1px solid white;
|
||||
}
|
||||
|
||||
.table-tool-group .table-tool-group-item:hover {
|
||||
color: white;
|
||||
background-color: rgb(64, 158, 255);
|
||||
}
|
||||
|
||||
.width-100 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ie-must-go-die {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.ie-must-go-die .ie-container {
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
left: 33%;
|
||||
text-align: center;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.ie-must-go-die .ie-container h1 {
|
||||
font-size: 28px;
|
||||
margin-bottom: 36px;
|
||||
}
|
||||
|
||||
.ie-must-go-die .ie-container p {
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.ie-must-go-die .ie-container a {
|
||||
display: block;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.ie-must-go-die .ie-container a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.ie-must-go-die .ie-container a:visited {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.el-loading-spinner i {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.el-loading-spinner i, .el-loading-spinner p {
|
||||
/*color: white !important;*/
|
||||
}
|
||||
|
||||
.w-e-toolbar {
|
||||
background-color: white !important;
|
||||
border-color: #DCDFE6 !important;
|
||||
}
|
||||
|
||||
.w-e-text-container {
|
||||
border-color: #DCDFE6 !important;
|
||||
}
|
||||
|
||||
.el-radio-group label {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
/* 滚动条整体部分 */
|
||||
.main-navigation::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-navigation {
|
||||
border-right: 3px solid rgb(240, 240, 240);
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
/*.el-dialog__header{*/
|
||||
/*border-bottom: 1px solid #e5e5e5;*/
|
||||
/*}*/
|
||||
|
||||
/*.el-dialog__footer{*/
|
||||
/*border-top: 1px solid #e5e5e5;*/
|
||||
/*}*/
|
||||
.el-table-container {
|
||||
padding-top: 54px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.el-pagination-container {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.el-pagination {
|
||||
height: 50px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.el-pagination button, .el-pagination span:not([class*=suffix]) {
|
||||
line-height: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
a .collapsed {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIW…aIJN0bgQRgIjnlmn1heSO5PE6Y2YXe+5Cr5+h++gs12AcAS6FS+7YOsj4AAAAASUVORK5CYII=);
|
||||
}
|
||||
|
||||
a .expanded {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIW…EYRYBPOB0gBShKwKGA////48VtbW3/8clTnBIH3gCKkzJgAGvBX0dDm0sCAAAAAElFTkSuQmCC);
|
||||
}
|
||||
|
||||
.ms-tree-space {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
display: inline-block;
|
||||
font-family: 'Glyphicons Halflings';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
width: 18px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.ms-tree-space::before {
|
||||
content: ""
|
||||
}
|
||||
|
||||
.el-table__expand-icon--expanded {
|
||||
-ms-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.el-table-expand {
|
||||
font-size: 0;
|
||||
}
|
||||
.el-table-expand label {
|
||||
width: 90px;
|
||||
color: #99a9bf;
|
||||
font-size: 12px;
|
||||
}
|
||||
.el-table-expand .el-form-item{
|
||||
margin-bottom: 2px;
|
||||
margin-right: 0;
|
||||
width: 50%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
.el-table-expand .el-form-item__content {
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
font-size: 12px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.el-table-expand-line {
|
||||
font-size: 0;
|
||||
}
|
||||
.el-table-expand-line label {
|
||||
width: 90px;
|
||||
color: #99a9bf;
|
||||
font-size: 12px;
|
||||
}
|
||||
.el-table-expand-line .el-form-item{
|
||||
margin-bottom: 2px;
|
||||
margin-right: 0;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
.el-table-expand-line .el-form-item__content {
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
font-size: 12px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.el-table__body-wrapper {
|
||||
scrollbar-width: auto; /* firefox */
|
||||
-ms-overflow-style: auto; /* IE 10+ */
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.el-table__body-wrapper::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
.el-table__body-wrapper::-webkit-scrollbar-thumb {
|
||||
border-radius: 4px;
|
||||
background-color: rgba(144, 147, 153, .35);
|
||||
}
|
||||
|
||||
.el-table__body-wrapper::-webkit-scrollbar-track {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
|
||||
|
||||
.el-upload__tip {
|
||||
margin-top: 0px;
|
||||
color: #c33714;
|
||||
}
|
||||
|
||||
.el-dialog {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.el-table__empty-block {
|
||||
width: 100% !important;
|
||||
min-height: 300px;
|
||||
background: url("/none.png") no-repeat center center;
|
||||
background-size: 360px 260px;
|
||||
}
|
||||
|
||||
.el-table__empty-text {
|
||||
display: block;
|
||||
position: absolute;
|
||||
bottom: 80px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
/*display: none !important;*/
|
||||
}
|
||||
@@ -0,0 +1,283 @@
|
||||
.options {
|
||||
-webkit-transform: scale(0.7);
|
||||
-moz-transform: scale(0.7);
|
||||
-ms-transform: scale(0.7);
|
||||
transform: scale(0.7);
|
||||
-webkit-backface-visibility: hidden;
|
||||
opacity: 0;
|
||||
-webkit-transition: all 300ms;
|
||||
-moz-transition: all 300ms;
|
||||
transition: all 300ms
|
||||
}
|
||||
|
||||
.playground.opened {
|
||||
visibility: visible
|
||||
}
|
||||
|
||||
.opened .options {
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
.pg-cal {
|
||||
text-align: center;
|
||||
display: block
|
||||
}
|
||||
|
||||
.pg-val {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 95px;
|
||||
margin-right: 13px;
|
||||
margin-bottom: 10px;
|
||||
padding: 5px;
|
||||
border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
text-transform: uppercase;
|
||||
white-space: nowrap;
|
||||
color: #5f5f5f;
|
||||
border: 1px solid transparent
|
||||
}
|
||||
|
||||
.pg-val:hover {
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.pg-val:hover,.pg-val.active {
|
||||
color: #000
|
||||
}
|
||||
|
||||
.pg-val i {
|
||||
display: block
|
||||
}
|
||||
|
||||
.playground {
|
||||
/* display: none;
|
||||
visibility: hidden; */
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 500px;
|
||||
height: auto;
|
||||
z-index: 9999;
|
||||
-webkit-transform: translateX(-50%) translateY(-50%);
|
||||
-moz-transform: translateX(-50%) translateY(-50%);
|
||||
-ms-transform: translateX(-50%) translateY(-50%);
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
visibility: hidden;
|
||||
-webkit-backface-visibility: hidden
|
||||
}
|
||||
|
||||
.playground>.options {
|
||||
position: relative;
|
||||
background: #fff;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 2px;
|
||||
overflow: hidden;
|
||||
padding: 15px 0
|
||||
}
|
||||
|
||||
.playground>.options:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 50%;
|
||||
background-color: #f5f5f5;
|
||||
z-index: -1
|
||||
}
|
||||
|
||||
.playground h6 {
|
||||
font-size: 11px;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif
|
||||
}
|
||||
|
||||
.pg-toggle {
|
||||
/* display: none;
|
||||
visibility: hidden;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
margin: 0;
|
||||
z-index: 9999;
|
||||
cursor: pointer;
|
||||
background: #fff;
|
||||
border: 1px solid #8d8d8d;
|
||||
border-right: 0;
|
||||
border-radius: 4px 0 0 4px;
|
||||
-moz-border-radius: 4px 0 0 4px;
|
||||
-webkit-border-radius: 4px 0 0 4px;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
-webkit-transform: translateX(0) translateY(-50%);
|
||||
-moz-transform: translateX(0) translateY(-50%);
|
||||
-ms-transform: translateX(0) translateY(-50%);
|
||||
transform: translateX(0) translateY(-50%)*/
|
||||
}
|
||||
|
||||
.playground .pg-close {
|
||||
position: absolute;
|
||||
padding: 15px;
|
||||
right: 0;
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.playground select {
|
||||
width: 100%;
|
||||
font-size: 10px;
|
||||
text-transform: uppercase;
|
||||
outline: none !important;
|
||||
letter-spacing: 1px
|
||||
}
|
||||
|
||||
.playground .options-container {
|
||||
width: 50%;
|
||||
float: left;
|
||||
padding: 3px 15px
|
||||
}
|
||||
|
||||
.playground small {
|
||||
font-size: 80%
|
||||
}
|
||||
|
||||
.playground .cs_color {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 95px;
|
||||
margin-right: 13px;
|
||||
margin-bottom: 5px;
|
||||
padding: 5px;
|
||||
border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border: 1px solid transparent
|
||||
}
|
||||
|
||||
.cs_color>div:first-child {
|
||||
width: 30%;
|
||||
height: 12px;
|
||||
float: left
|
||||
}
|
||||
|
||||
.cs_color>div:nth-child(2) {
|
||||
width: 70%;
|
||||
height: 12px;
|
||||
float: left
|
||||
}
|
||||
|
||||
.cs_color>div:nth-child(3) {
|
||||
width: 30%;
|
||||
height: 71px;
|
||||
float: left
|
||||
}
|
||||
|
||||
.cs_color>div:nth-child(4) {
|
||||
width: 70%;
|
||||
height: 71px;
|
||||
background-color: #f1f4f9;
|
||||
float: left
|
||||
}
|
||||
|
||||
.playground .cs_color.active,.playground .cs_color:hover,.pg-val:hover,.pg-val.active
|
||||
{
|
||||
border: 1px solid #a55ee7
|
||||
}
|
||||
|
||||
.playground .cs_1 div:first-child {
|
||||
background: #147bd0
|
||||
}
|
||||
|
||||
.playground .cs_1 div:nth-child(2) {
|
||||
background: #1582dc
|
||||
}
|
||||
|
||||
.playground .cs_1 div:nth-child(3) {
|
||||
background: #2e353d
|
||||
}
|
||||
|
||||
.playground .cs_2 div:first-child {
|
||||
background: #14a5d3
|
||||
}
|
||||
|
||||
.playground .cs_2 div:nth-child(2) {
|
||||
background: #15acdc
|
||||
}
|
||||
|
||||
.playground .cs_2 div:nth-child(3) {
|
||||
background: #4f576b
|
||||
}
|
||||
|
||||
.playground .cs_3 div:first-child {
|
||||
background: #353d46
|
||||
}
|
||||
|
||||
.playground .cs_3 div:nth-child(2) {
|
||||
background: #353d46
|
||||
}
|
||||
|
||||
.playground .cs_3 div:nth-child(3) {
|
||||
background: #353d46
|
||||
}
|
||||
|
||||
.playground .cs_4 div:first-child {
|
||||
background: #fff;
|
||||
height: 10px;
|
||||
border: 1px solid #eee;
|
||||
border-right: 0
|
||||
}
|
||||
|
||||
.playground .cs_4 div:nth-child(2) {
|
||||
background: #fff;
|
||||
height: 10px;
|
||||
border: 1px solid #eee;
|
||||
border-left: 0
|
||||
}
|
||||
|
||||
.playground .cs_4 div:nth-child(3) {
|
||||
background: #39424c
|
||||
}
|
||||
|
||||
.playground .cs_5 div:first-child {
|
||||
background: #2dbe60
|
||||
}
|
||||
|
||||
.playground .cs_5 div:nth-child(2) {
|
||||
background: #2dbe60
|
||||
}
|
||||
|
||||
.playground .cs_5 div:nth-child(3) {
|
||||
background: #f1f4f9
|
||||
}
|
||||
|
||||
.playground .cs_5 div:nth-child(4) {
|
||||
background: white
|
||||
}
|
||||
|
||||
.pg-footer {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
bottom: 5px;
|
||||
right: 5px
|
||||
}
|
||||
|
||||
.layout-toggleMenu__item{
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
padding: 5px;
|
||||
margin-left: 5px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.layout-toggleMenu__item.is-active{
|
||||
border-color: #a55ee7;
|
||||
}
|
||||
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 9.6 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,166 @@
|
||||
const initTableMixins = {
|
||||
data() {
|
||||
return {
|
||||
festival: ['元旦', '春节', '清明节', '劳动节', '端午节', '中秋节', '国庆节', '其它'],
|
||||
submitLoading: false,
|
||||
searchMore: false,
|
||||
tableSize: '',
|
||||
tableKey: '',
|
||||
formData: {},
|
||||
formRules: {},
|
||||
formLoading: false,
|
||||
tableLoading: false,
|
||||
tableData: [],
|
||||
tableColumns: [],
|
||||
pageForm: {
|
||||
searchName: "",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: ""
|
||||
},
|
||||
guavaIndex: 'index',
|
||||
unionGroups: [],
|
||||
threeUnits: []
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
date(value) {
|
||||
return value ? moment(value).format('YYYY-MM-DD') : ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand({action, value}) {
|
||||
if (action) action(value)
|
||||
},
|
||||
|
||||
fileHandleRemove(file, fileList) {
|
||||
return fileList;
|
||||
},
|
||||
fileHandleChange(file, fileList, {type, size}) {
|
||||
const removeFile = () => {
|
||||
fileList.splice(fileList.findIndex(v => v === file))
|
||||
}
|
||||
|
||||
if (!file.size) {
|
||||
this.notifyWarning('您选择的是空文件!')
|
||||
removeFile()
|
||||
}
|
||||
|
||||
if (type && type.length && !type.includes(file.name.split('.').pop().toLowerCase())) {
|
||||
this.notifyWarning(`文件只能是 ${type.map(v => v.toUpperCase()).join('/')} 格式!`)
|
||||
removeFile()
|
||||
}
|
||||
|
||||
if (size && !file.size < size) {
|
||||
this.notifyWarning(`文件大小不能超过 ${size / 1024 / 1024}MB!`)
|
||||
removeFile()
|
||||
}
|
||||
|
||||
return fileList;
|
||||
},
|
||||
|
||||
columnChange(val) {
|
||||
this.tableLoading = true
|
||||
this.tableColumns = val
|
||||
this.tableLoading = false
|
||||
},
|
||||
tableSizeChange(size) {
|
||||
this.tableSize = size
|
||||
},
|
||||
indexMethod(index) {
|
||||
return index + (this.pageForm.pageNumber - 1) * this.pageForm.pageSize + 1
|
||||
},
|
||||
doSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
pageOrder(column) {
|
||||
this.pageForm.pageOrderName = column.prop;
|
||||
this.pageForm.pageOrderBy = column.order;
|
||||
this.pageData();
|
||||
},
|
||||
pageNumberChange(val) {
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageSizeChange(val) {
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageData(url) {
|
||||
const address = url ? url : loc() + "/pageData"
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
$.post(address, this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code == 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
notifySuccess(msg) {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: msg,
|
||||
type: 'success'
|
||||
});
|
||||
},
|
||||
notifyWarning(msg) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: msg,
|
||||
type: 'warning'
|
||||
});
|
||||
},
|
||||
notifyError(msg) {
|
||||
this.$notify.error({
|
||||
title: '错误',
|
||||
message: msg
|
||||
});
|
||||
},
|
||||
async getThreeUnits() {
|
||||
this.$set(this.pageForm, 'threeUnitId', null)
|
||||
this.threeUnits = []
|
||||
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unitId, this.pageForm.unionGroupId)
|
||||
},
|
||||
launchFullscreen() {
|
||||
const element = document.documentElement
|
||||
if (element.requestFullscreen) {
|
||||
element.requestFullscreen();
|
||||
} else if (element.mozRequestFullScreen) {
|
||||
element.mozRequestFullScreen();
|
||||
} else if (element.webkitRequestFullscreen) {
|
||||
element.webkitRequestFullscreen();
|
||||
} else if (element.msRequestFullscreen) {
|
||||
element.msRequestFullscreen();
|
||||
}
|
||||
this.calcSignTableHeight()
|
||||
},
|
||||
exitFullscreen() {
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
} else if (document.mozCancelFullScreen) {
|
||||
document.mozCancelFullScreen();
|
||||
} else if (document.webkitExitFullscreen) {
|
||||
document.webkitExitFullscreen();
|
||||
}
|
||||
},
|
||||
toggleFullScreen() {
|
||||
if (!document.fullscreenElement) {
|
||||
document.documentElement.requestFullscreen();
|
||||
} else {
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
html {
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
min-height: 100vh;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
body {
|
||||
min-width: 320px;
|
||||
max-width: 640px;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
font-family: "微软雅黑", Helvetica, STHeiTi, sans-serif;
|
||||
color: #000000;
|
||||
-webkit-text-size-adjust: 100% !important;
|
||||
}
|
||||
|
||||
#app {
|
||||
min-height: 100vh;
|
||||
background-color: #f9f9f9;
|
||||
display: block;
|
||||
}
|
||||
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a, img {
|
||||
-webkit-touch-callout: none;
|
||||
text-decoration: none;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.m5 {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.m10 {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.mb5 {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.mb10 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.mt5 {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.mt10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.ml5 {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.ml15 {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
|
||||
.ml10 {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.mr5 {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.mr10 {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.mt20 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.p10 {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.mb20 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.flex-box {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.font-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text-overflow {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
.van-pagination__item--active {
|
||||
background-color: #1867b0;
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
|
||||
.van-pagination__item:active {
|
||||
background-color: #1867b0 !important;
|
||||
}
|
||||
|
||||
.van-pagination__item {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__bar {
|
||||
border-top: 1px solid #f8f8f8;
|
||||
border-bottom: 1px solid #f8f8f8;
|
||||
box-shadow: none;
|
||||
overflow-x: auto;
|
||||
|
||||
}
|
||||
|
||||
/*.van-dropdown-menu__bar > .van-dropdown-menu__item:not(:last-child) {*/
|
||||
/* border-right: 1px solid #f0f0f0;*/
|
||||
/*}*/
|
||||
|
||||
.van-dropdown-menu__title--active, .van-dropdown-item__option--active, .van-dropdown-item__option--active .van-dropdown-item__icon {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-tabs {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.van-tabs__line {
|
||||
background-color: #1867b0;
|
||||
}
|
||||
|
||||
.font-theme-color {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-nav-bar {
|
||||
/*background-color: #1867b0;*/
|
||||
background-color: #FFFFFF;
|
||||
z-index: 11;
|
||||
}
|
||||
|
||||
.van-nav-bar .van-nav-bar__left > .van-icon-arrow-left {
|
||||
/*color: #FFFFFF;*/
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.van-nav-bar .van-nav-bar__title {
|
||||
/*color: #FFFFFF;*/
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
.van-dropdown-menu__title {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.layui-table th, .layui-table td {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.layui-table-fixed {
|
||||
z-index: 9 !important;
|
||||
}
|
||||
|
||||
.search-fixed {
|
||||
position: fixed;
|
||||
top: 46px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
|
||||
}
|
||||
|
||||
.van-empty {
|
||||
background-color: #FFFFFF;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.van-dropdown-item__content {
|
||||
border-bottom-right-radius: 15px;
|
||||
border-bottom-left-radius: 15px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__bar {
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: unset;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__title {
|
||||
padding: 0 25px;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.list-card .van-cell {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
.list-card .van-cell__title {
|
||||
flex: 1;
|
||||
color: #969799;
|
||||
/*font-weight: 500;*/
|
||||
}
|
||||
|
||||
.list-card .van-cell__title:after {
|
||||
content: ':';
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
|
||||
.list-card .van-cell__value {
|
||||
text-align: left;
|
||||
flex: 2.5;
|
||||
color: #323233;
|
||||
/*font-weight: 500;*/
|
||||
}
|
||||
|
||||
.van-cell-group__title {
|
||||
padding: 5px 0 5px 16px;
|
||||
}
|
||||
|
||||
.van-calendar__confirm {
|
||||
height: 45px;
|
||||
}
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
top: -webkit-calc(20% + 20px);
|
||||
top: calc(20% + 20px);
|
||||
height: -webkit-calc(80% - 100px);
|
||||
height: calc(80% - 100px);
|
||||
-webkit-transform: unset;
|
||||
-ms-transform: unset;
|
||||
transform: unset;
|
||||
}
|
||||
|
||||
.van-index-bar__index {
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-flex: 1;
|
||||
-ms-flex: 1;
|
||||
flex: 1;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
margin: 0 !important;
|
||||
padding: 10px 12px !important;
|
||||
}
|
||||
|
||||
.van-sidebar-item--select::before {
|
||||
background-color: #373AA3;
|
||||
left: 5px;
|
||||
}
|
||||
|
||||
.van-sidebar-item--select {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
const mobileMixins = {
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
mLoading: false,
|
||||
finished: false,
|
||||
loading: false,
|
||||
refreshing: false,
|
||||
formData: {},
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
},
|
||||
themeColor: '#373AA3',
|
||||
pageDataUrl: null,
|
||||
yearList: []
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
date(value) {
|
||||
return value ? moment(value).format('YYYY-MM-DD') : ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
if (this.pageDataUrl == null) {
|
||||
this.pageDataUrl = loc() + '/pageData'
|
||||
}
|
||||
$.post(this.pageDataUrl, this.pageForm, (res) => {
|
||||
const {code, data} = res
|
||||
if (this.refreshing) {
|
||||
this.tableData = [];
|
||||
this.refreshing = false;
|
||||
}
|
||||
this.loading = false;
|
||||
|
||||
if (code === 0) {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
|
||||
if (this.tableData.length === 0) {
|
||||
this.finished = true;
|
||||
} else {
|
||||
this.none_data = false
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.finished = true;
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
this.mLoading = false
|
||||
},
|
||||
async onRefresh() {
|
||||
this.tableData = []
|
||||
this.refreshing = true;
|
||||
this.finished = false;
|
||||
this.pageForm.pageNumber = 0
|
||||
this.loading = true;
|
||||
await this.pageData();
|
||||
},
|
||||
GetQueryString(name) {
|
||||
const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
||||
const r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return unescape(r[2]);
|
||||
return "";
|
||||
},
|
||||
createYearList() {
|
||||
for (let i = new Date().getFullYear() - 50; i <= new Date().getFullYear(); i++) {
|
||||
this.yearList.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
},
|
||||
startLoading() {
|
||||
this.vLoading = vant.Toast.loading({
|
||||
message: '加载中...',
|
||||
forbidClick: true,
|
||||
duration: 0
|
||||
})
|
||||
},
|
||||
closeLoading() {
|
||||
setTimeout(() => {
|
||||
this.vLoading.close()
|
||||
}, 500)
|
||||
},
|
||||
doSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.createYearList()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1654505536065" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9027" width="48" height="48" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M752.736 431.063C757.159 140.575 520.41 8.97 504.518 0.41V0l-0.45 0.205-0.41-0.205v0.41c-15.934 8.56-252.723 140.165-248.259 430.653-48.21 31.457-98.713 87.368-90.685 184.074 8.028 96.666 101.007 160.768 136.601 157.287 35.595-3.482 25.232-30.31 25.232-30.31l12.206-50.095s52.47 80.569 69.304 80.528c15.114-1.23 87-0.123 95.6 0h0.82c8.602-0.123 80.486-1.23 95.6 0 16.794 0 69.305-80.528 69.305-80.528l12.165 50.094s-10.322 26.83 25.272 30.31c35.595 3.482 128.574-60.62 136.602-157.286 8.028-96.665-42.475-152.617-90.685-184.074z m-248.669-4.26c-6.758-0.123-94.781-3.359-102.891-107.192 2.95-98.714 95.97-107.438 102.891-107.93 6.964 0.492 99.943 9.216 102.892 107.93-8.11 103.833-96.174 107.07-102.892 107.192z m-52.019 500.531c0 11.838-9.42 21.382-21.012 21.382a21.217 21.217 0 0 1-21.054-21.34V821.74c0-11.797 9.421-21.382 21.054-21.382 11.591 0 21.012 9.585 21.012 21.382v105.635z m77.333 57.222a21.504 21.504 0 0 1-21.34 21.626 21.504 21.504 0 0 1-21.34-21.626V827.474c0-11.96 9.543-21.668 21.299-21.668 11.796 0 21.38 9.708 21.38 21.668v157.082z m71.147-82.043c0 11.796-9.42 21.34-21.053 21.34a21.217 21.217 0 0 1-21.013-21.34v-75.367c0-11.755 9.421-21.299 21.013-21.299 11.632 0 21.053 9.544 21.053 21.3v75.366z" fill="#1867b0" p-id="9028"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,426 @@
|
||||
/**
|
||||
* 根据enum获取选项
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getEnumOptions = async (enumName) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/enumOptions", {enumName})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code获取字典选项
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getDictOptions = async (code) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/dictOptions", {code})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code获取字典选项信息
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getDictState = async (code) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/dictState", {code})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取校区
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getCampus = async () => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getCampus")
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取代表团
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getDbt = async (jdhId) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getDbt", {jdhId})
|
||||
return data
|
||||
}
|
||||
|
||||
//查询当前用户管理的院级工会
|
||||
const getUnion = async () => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getUnion")
|
||||
return data
|
||||
}
|
||||
|
||||
//查询当前用户管理的院级工会下的单位
|
||||
const getUnit = async (unionid) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getUnit", {unionid: unionid})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取代表小组
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getGroup = async (jdhId) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getGroup", {jdhId})
|
||||
return data
|
||||
}
|
||||
|
||||
//获取所有开启的教代会
|
||||
const getOpenJdh = async () => {
|
||||
const {data} = await $.get("/platform/jdh/Common/getOpenJdhxx")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取院级工会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getUnions = async (delegationId = null, isPermission = false) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/unions", {delegationId, isPermission})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取活动院级工会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getActivityUnions = async () => {
|
||||
const {data} = await $.get("/platform/activity/basic/union/getActivityUnions",)
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getUnits = async (unionId = null) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/units", {unionId})
|
||||
return data
|
||||
}
|
||||
|
||||
const getClubUnits = async () => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getClubUnits", {})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getActivityUnits = async (unionId) => {
|
||||
const {data} = await $.get("/platform/activity/basic/union/getActivityUnits", {unionId})
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取本分工会的单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getUnionUnits = async () => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/unionUnits")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取福利单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getWelfareUnits = async () => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/welfareUnits")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取福利单位的二级单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getUnitsByWelfareUnit = async (welfareUnitId) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/unitsByWelfareUnit", {welfareUnitId})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取协会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getClubs = async () => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/clubs", {})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取届次
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getJc = async () => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getJcByDict")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前人所管理的协会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getClubsByRole = async () => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getClubsByRole", {})
|
||||
return data
|
||||
}
|
||||
/**
|
||||
* 获取当前人所在的协会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getClubsByUser = async () => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getClubsByUser", {})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件类型
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getFileType = async () => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getFileTypeByDict")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取基层干部的角色
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getJcgbJs = async () => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getJcgbJsByDict")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审批员的角色
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getSpyJs = async () => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getSpyJsByDict")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取协会类型
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getClubType = async () => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getClubTypeByDict")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取系统名称
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getSystemName = async () => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getSystemNameByDict")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工代会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getGdh = async (open = true) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getGdh", {open})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工代会代表团
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getGdhDbt = async (jdhId) => {
|
||||
const {data} = await $.get("/platform/gdh/common/getDbt", {jdhId})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查用户
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const queryUserByIds = async (ids) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/queryUserByIds", {ids: JSON.stringify(ids)})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查用户
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const queryUserById = async (id) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/queryUserById", {id: id})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户
|
||||
* @param query
|
||||
* @param unionId
|
||||
* @param unitId
|
||||
* @param sex
|
||||
* @param member
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const searchUser = async (query, unionId = null, unitId = null, sex = null, member = null) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/searchUser", {
|
||||
query,
|
||||
unionId,
|
||||
unitId,
|
||||
sex,
|
||||
member
|
||||
})
|
||||
return data.list
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取代表可以操作的教代会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getJdhByDb = async () => {
|
||||
const {data} = await $.get("/platform/proposal/common/getJdhByDb")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取代表可以操作的开启的教代会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getOpenJdhByDb = async () => {
|
||||
const {data} = await $.get("/platform/proposal/common/getOpenMeeting")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取教代会工作资料类型
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getGzzllx = async () => {
|
||||
const {data} = await $.get("/platform/jdh/Common/getGzzllx")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取疗休养活动
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getLxyHd = async () => {
|
||||
const {data} = await $.get("/platform/zgfw/lxy/common/getHdList")
|
||||
return data
|
||||
}
|
||||
const getlxyHdCd = async () => {
|
||||
const {data} = await $.get("/platform/zgfw/lxy/common/getlxyHdCd")
|
||||
return data
|
||||
}
|
||||
|
||||
const getNowLxyHd = async () => {
|
||||
const {data} = await $.get("/platform/zgfw/lxy/common/getNowHdList")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取基层工会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getUnionList = async (unionId) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/unionList", {unionId})
|
||||
return data
|
||||
}
|
||||
const threeUnitsByUnionGroupOrUnitId = async (unitId, groupId) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/threeUnitsByUnionGroupOrUnitId", {
|
||||
unitId,
|
||||
groupId
|
||||
})
|
||||
return data
|
||||
}
|
||||
|
||||
const unionGroupsByUnionId = async (unionId) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/unionGroupsByUnionId", {unionId})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取活动人员范围
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getActivityGroup = async () => {
|
||||
const {data} = await $.get('/platform/activity/basic/scope/getActivityUserScopeGroup')
|
||||
return data
|
||||
}
|
||||
/**
|
||||
* 查看该人员是否在活动范围中
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getScopeUser = async (activityGroupId) => {
|
||||
const {data} = await $.get('/platform/activity/basic/scope/getScopeUser', {activityGroupId})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code查询活动项目下面的类型
|
||||
* @param id
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getActivityTwoLevelType = async (code) => {
|
||||
const {data} = await $.get("/platform/activity/basic/basic/settings/getActivityTwoLevelType", {code})
|
||||
return data
|
||||
}
|
||||
|
||||
//获取二级教代会(双代会)工作资料类型
|
||||
const getJdh2Gzzllx = async () => {
|
||||
const {data} = await $.get("/platform/jdh/Common/getJdh2Gzzllx")
|
||||
return data
|
||||
}
|
||||
|
||||
const getLocationVariable = (variable) => {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split("&");
|
||||
for (let i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split("=");
|
||||
if (pair[0] == variable) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
const getConfigKey = async (key) => {
|
||||
const {data} = await $.get('/platform/staffTherapyRecuperation/common/getValue', {key})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据多个工会获取单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getUnitByUnions = async (unionId = null) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getUnitsByUnions", {unionId})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 多个单位或小组获取三级单位
|
||||
* @param unitId
|
||||
* @param groupId
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getThreeUnitsByUnionGroupsOrUnitIds = async (unitId, groupId) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getThreeUnitsByUnionGroupsOrUnitIds", {
|
||||
unitId,
|
||||
groupId
|
||||
})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 多个工会获取工会小组
|
||||
* @param unionId
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getUnionGroupsByUnions = async (unionId) => {
|
||||
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getUnionGroupsByUnions", {unionId})
|
||||
return data
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
基地信息
|
||||
</h3>
|
||||
</div>
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item label="年度">{{ viewData.year }}</el-descriptions-item>
|
||||
<el-descriptions-item label="排序编号">{{ viewData.sortNumber }}</el-descriptions-item>
|
||||
<el-descriptions-item label="酒店名称">{{ viewData.baseName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="区域性质">{{ viewData.regionalNature }}</el-descriptions-item>
|
||||
<!-- (校工会创建AND自由模式) OR (分工会创建) -->
|
||||
<!-- <template v-if="(viewData.createMode === 2 && viewData.signUpMode === 2 ) || viewData.createMode === 1">-->
|
||||
<!--<el-descriptions-item label="出行天数">{{ viewData.regionalNature=5?"五天四夜":"三天两夜" }}</el-descriptions-item>-->
|
||||
<el-descriptions-item label="标段时间">
|
||||
<div v-for="item in modifyBdList">
|
||||
<span v-if="viewData.lotId===item.id">{{ item.lotName }}</span>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预计费用(元)">{{ viewData.estimatedCost }}</el-descriptions-item>
|
||||
<el-descriptions-item label="酒店联系人">{{ viewData.baseContactPerson }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人电话">{{ viewData.baseContactNumber }}</el-descriptions-item>
|
||||
<el-descriptions-item label="报名开始时间">{{ viewData.signUpStartTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="报名结束时间">{{ viewData.signUpEndTime }}</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label="变更截至时间">{{ viewData.changeEndTime }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="活动开始时间">{{ viewData.activityStartTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="活动结束时间">{{ viewData.activityEndTime }}</el-descriptions-item>
|
||||
|
||||
|
||||
<!--</template>-->
|
||||
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
旅行社信息
|
||||
</h3>
|
||||
</div>
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item :span="2" label="旅行社名称">
|
||||
{{ viewData.travelAgency.travelAgencyName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">{{ viewData.travelAgency.contact }}</el-descriptions-item>
|
||||
<el-descriptions-item label="电话">{{ viewData.travelAgency.contactMobileNumber }}</el-descriptions-item>
|
||||
<el-descriptions-item label="邮箱">{{ viewData.travelAgency.email }}</el-descriptions-item>
|
||||
<el-descriptions-item label="官网">
|
||||
<a :href="viewData.travelAgency.officialWebsite" class="text-primary" target="_blank">
|
||||
{{ viewData.travelAgency.officialWebsite }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div class="panel panel-default mt20" style="border-color: #ebeef5">
|
||||
<div class="panel-heading" style="background: #fafafa;border-color: #ebeef5">
|
||||
<h3 class="panel-title">
|
||||
详细信息
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div v-html="viewData.content"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "BaseManageInfo",
|
||||
data() {
|
||||
return {
|
||||
viewData: {
|
||||
travelAgency: {}
|
||||
},
|
||||
modifyBdList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(id, obj) {
|
||||
this.modifyBdList = obj
|
||||
this.findOne(id)
|
||||
},
|
||||
async findOne(id) {
|
||||
const res = await $.get('/platform/staffTherapyRecuperation/baseManagement/selectBaseManageById/' + id)
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.viewTable .el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.viewTable .el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
*Desc:
|
||||
*Create by: jug
|
||||
*Create time:2023/11/10/11:07
|
||||
*/
|
||||
<template>
|
||||
<div class="el-descriptions">
|
||||
<div class="el-descriptions__body">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-descriptions__table {
|
||||
table-layout: fixed;
|
||||
!important;
|
||||
}
|
||||
|
||||
.el-descriptions table {
|
||||
table-layout: auto;
|
||||
}
|
||||
|
||||
.el-descriptions__body table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.el-descriptions :not(.is-bordered) th, td {
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
.el-descriptions .is-bordered th, td {
|
||||
border: 1px solid #ebeef5;
|
||||
padding: 12px 10px;
|
||||
}
|
||||
|
||||
.el-descriptions__body table th, td {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
text-align: left;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.el-descriptions__body table th {
|
||||
font-weight: 400;
|
||||
color: #909399;
|
||||
background: #fafafa;
|
||||
border: 1px solid #ebeef5;
|
||||
padding: 12px 10px;
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
.el-descriptions__body table td .el-form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.el-descriptions__body table td .is-required .el-form-item__error {
|
||||
background: #303133;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
z-index: 2000;
|
||||
font-size: 12px;
|
||||
line-height: 1.2;
|
||||
min-width: 10px;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.el-descriptions .el-date-editor.el-input, .el-date-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<el-drawer title="参加人员范围设置" :visible.sync="userScopeDialog" size="90%" :append-to-body="true" @closed="$emit('group_change')">
|
||||
<iframe v-if="userScopeDialog" src="/platform/activity/basic/scope" title="参加人员范围设置" style="width:100%;height:calc(100vh - 90px);border:0"></iframe>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
data() { return {userScopeDialog: false}; }
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,191 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<el-tabs tab-position="top" v-model="activeName" v-loading="loading">
|
||||
<el-tab-pane label="报名信息" name="1">
|
||||
<div class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
本人信息
|
||||
</h3>
|
||||
</div>
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item label="一卡通号">{{ viewData.loginName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="姓名">{{ viewData.userName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号">{{ viewData.idCard }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位">{{ viewData.unitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工会">{{ viewData.unionName }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="是否转入转出">
|
||||
<span class="label label-primary">
|
||||
<sapn v-if="viewData.takePartInUnionId!=union_id">转出报名</sapn>
|
||||
<sapn v-else-if="viewData.selfUnionId!=union_id">转入报名</sapn>
|
||||
<sapn v-else>本公会报名</sapn>
|
||||
</span>
|
||||
</el-descriptions-item>-->
|
||||
|
||||
<el-descriptions-item label="报名时间">{{ viewData.signingUptime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="参加活动时间">{{
|
||||
viewData.specificTime ? viewData.specificTime : '暂未更新'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="实际出行时间">{{
|
||||
viewData.takePartInTime ? viewData.takePartInTime : '暂未更新'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item v-if="viewData.lineName" label="线路名称">{{ viewData.lineName }}</el-descriptions-item>
|
||||
<el-descriptions-item v-if="viewData.lineName" label="旅行社名称">{{ viewData.travelAgencyName }}</el-descriptions-item>
|
||||
<el-descriptions-item v-else label="旅行社名称">{{ viewData.joinTravelAgencyName }}</el-descriptions-item>
|
||||
<template v-if="configData.familyInfo == 2">
|
||||
<el-descriptions-item label="是否携带家属">
|
||||
<span class="label label-primary">
|
||||
{{ viewData.companionList && viewData.companionList.length > 0 ? '携带' : '未携带' }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="床型">{{ viewData.bedInfo?.bedType }}</el-descriptions-item>
|
||||
<el-descriptions-item label="床位">{{
|
||||
viewData.bedInfo?.bedNum ? viewData.bedInfo?.bedNum : '暂无'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="意向拼床人">
|
||||
{{ viewData.bedInfo?.otherSleepUser ? viewData.bedInfo?.otherSleepUser : '暂无' }}
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-descriptions-item label="家属人数">{{ viewData.familyNumber }}</el-descriptions-item>
|
||||
</template>
|
||||
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
<div v-if="configData.familyInfo === 2" class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
同伴信息
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body" style="border: 1px solid rgb(235, 238, 245)">
|
||||
<el-table :data="viewData.companionList">
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="身份证号" prop="idCard"></el-table-column>
|
||||
<el-table-column label="年龄" prop="age"></el-table-column>
|
||||
<el-table-column label="床型" prop="bedType">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo?.bedType }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="床位" prop="bedNum">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo?.bedNum }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="意向拼床人" prop="otherSleepUser">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo?.otherSleepUser ? row.bedInfo?.otherSleepUser : '暂无' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="关系" prop="relation"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="所属分工会审核信息" name="2" v-if="viewData.selfUnionAuditId">
|
||||
<div class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
审核信息
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item label="审核人">
|
||||
{{ viewData.selfUnionAudit.username }}({{ viewData.selfUnionAudit.loginname }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">{{ viewData.selfUnionAudit.auditTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见">{{ viewData.selfUnionAudit.auditOpinion }}</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="意向线路分工会审核信息" name="3" v-if="viewData.joinLineUnionAuditId">
|
||||
<div class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
审核信息
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item label="审核人">
|
||||
{{ viewData.joinLineUnionAudit.username }}({{ viewData.joinLineUnionAudit.loginname }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">{{ viewData.joinLineUnionAudit.auditTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见">{{ viewData.joinLineUnionAudit.auditOpinion }}</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<slot name="handle"></slot>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
union_id: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
components: {
|
||||
'line-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: "1",
|
||||
viewData: {
|
||||
companionList: [],
|
||||
bedInfo: {},
|
||||
},
|
||||
loading: false,
|
||||
configData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async findOne(id) {
|
||||
this.loading = true
|
||||
const resp = await $.get("/platform/staffTherapyRecuperation/TheRapyAudit/findOne", {id})
|
||||
this.loading = false
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data.viewData
|
||||
} else {
|
||||
this.viewData = {}
|
||||
this.$notify.warning({title: '警告', message: resp.data})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
openView(id) {
|
||||
this.findOne(id)
|
||||
},
|
||||
openAudit(id, activeName) {
|
||||
this.findOne(id)
|
||||
this.activeName = activeName
|
||||
},
|
||||
async getConfigData() {
|
||||
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
|
||||
this.configData = resp.data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getConfigData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="view">
|
||||
<a v-for="file in files" :key="file.id || file.filepath" :href="file.filepath || preview(file.id)" target="_blank" style="display:block">{{ file.filename || file.name }}</a>
|
||||
</div>
|
||||
<el-upload v-else action="/platform/staffTherapyRecuperation/common/uploadFile" name="file"
|
||||
:limit="max" :multiple="max > 1" :file-list="fileList" :drag="card"
|
||||
:before-upload="beforeUpload" :on-success="success" :on-remove="remove" :on-preview="open">
|
||||
<el-button size="small" type="primary">选择文件</el-button>
|
||||
<div slot="tip"><slot></slot></div>
|
||||
</el-upload>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {files: {type: Array, default: () => []}, view: Boolean, card: Boolean,
|
||||
max: {type: Number, default: 10}, type: Array, max_size: Number},
|
||||
data() { return {fileList: []}; },
|
||||
watch: {files: {immediate: true, deep: true, handler(files) {
|
||||
this.fileList = (files || []).map(file => ({name: file.filename || file.name, url: file.filepath || therapyPreview(file.id), rawInfo: file}));
|
||||
}}},
|
||||
methods: {
|
||||
preview: therapyPreview,
|
||||
beforeUpload(file) {
|
||||
const suffix = file.name.split('.').pop().toLowerCase();
|
||||
if (this.type && !this.type.includes(suffix)) { this.$message.warning('文件格式不符合要求'); return false; }
|
||||
if (this.max_size && file.size > this.max_size) { this.$message.warning('文件大小超过限制'); return false; }
|
||||
return true;
|
||||
},
|
||||
success(result, file, list) {
|
||||
if (result.code !== 0) { this.$message.error(result.msg); return; }
|
||||
file.rawInfo = result.data;
|
||||
this.emit(list);
|
||||
},
|
||||
remove(file, list) { this.emit(list); },
|
||||
emit(list) {
|
||||
this.$emit('update:files', list.map(file => file.rawInfo || file.response && file.response.data).filter(Boolean));
|
||||
},
|
||||
open(file) { window.open(file.url || file.rawInfo && file.rawInfo.filepath); }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,146 @@
|
||||
<template>
|
||||
<div class="guava-main-content">
|
||||
<div v-show="v==='index'" key="index" class="transition-item">
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
||||
<el-card v-show="v==='edit'" key="edit" shadow="never" class="animated-card">
|
||||
<template #header>
|
||||
<el-row type="flex">
|
||||
<el-col :span="12">
|
||||
<el-button icon="el-icon-back" style="font-size: 16px" type="text" @click="v='index'">返回</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12" class="text-right">
|
||||
<slot name="edit_func"></slot>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<div :class="{'card_scroll':edit_scroll}">
|
||||
<slot name="edit"></slot>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card v-show="v==='view'" key="view" shadow="never" class="animated-card">
|
||||
<template #header>
|
||||
<el-button icon="el-icon-back" style="font-size: 16px" type="text" @click="v='index'">返回</el-button>
|
||||
</template>
|
||||
<div :class="{'card_scroll':edit_scroll}">
|
||||
<slot name="view"></slot>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card v-show="v==='public'" key="public" shadow="never" class="animated-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button icon="el-icon-back" style="font-size: 16px" type="text" @click="back()">返回
|
||||
</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<slot name="public"></slot>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: 'index'
|
||||
},
|
||||
//为true的时候页面不会滚动 card-body滚动 edit view 自己来控制
|
||||
edit_scroll: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
view_scroll: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
v: 'index',
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
v(newValue, oldValue) {
|
||||
this.$emit('vchange', {newValue, oldValue})
|
||||
this.$emit('input', newValue)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
index() {
|
||||
this.v = 'index'
|
||||
},
|
||||
edit() {
|
||||
this.v = 'edit'
|
||||
},
|
||||
view() {
|
||||
this.v = 'view'
|
||||
},
|
||||
public() {
|
||||
this.v = 'public'
|
||||
},
|
||||
back() {
|
||||
this.v = 'index'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.guava-main-content {
|
||||
padding: 10px 12px;
|
||||
background-color: #f6f6f6;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.animated-card {
|
||||
animation-name: cardAnimation;
|
||||
animation-duration: .5s;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
@keyframes cardAnimation {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(-50px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.el-card__header {
|
||||
padding: 5px 20px !important;
|
||||
}
|
||||
|
||||
.el-tabs--border-card {
|
||||
box-shadow: unset !important;
|
||||
}
|
||||
|
||||
.card_scroll {
|
||||
max-height: calc(100vh - 50px - 20px - 54px - 40px - 5px);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.card_scroll {
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.card_scroll::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.card_scroll::-webkit-scrollbar-vertical {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.card_scroll::-webkit-scrollbar-horizontal {
|
||||
display: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<el-upload action="/platform/staffTherapyRecuperation/common/uploadFile" name="file" list-type="picture-card"
|
||||
:file-list="fileList" :limit="limit" :before-upload="beforeUpload"
|
||||
:on-success="success" :on-remove="remove" :on-preview="open"
|
||||
:style="{'--therapy-width': width + 'px', '--therapy-height': height + 'px'}">
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {value: {type: Array, default: () => []}, limit: {type: Number, default: 1},
|
||||
width: {type: Number, default: 100}, height: {type: Number, default: 100}, fileType: Array, fileSize: Number},
|
||||
data() { return {fileList: []}; },
|
||||
watch: {value: {immediate: true, deep: true, handler(values) {
|
||||
this.fileList = (values || []).map((value, index) => ({name: '图片' + (index + 1), url: therapyPreview(value)}));
|
||||
}}},
|
||||
methods: {
|
||||
beforeUpload(file) {
|
||||
if (this.fileType && !this.fileType.includes(file.name.split('.').pop().toLowerCase())) {
|
||||
this.$message.warning('图片格式不符合要求'); return false;
|
||||
}
|
||||
if (this.fileSize && file.size > this.fileSize * 1024 * 1024) {
|
||||
this.$message.warning('图片大小超过限制'); return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
success(result, file, list) {
|
||||
if (result.code !== 0) { this.$message.error(result.msg); return; }
|
||||
file.url = result.data.filepath;
|
||||
this.emit(list);
|
||||
},
|
||||
remove(file, list) { this.emit(list); },
|
||||
emit(list) { this.$emit('input', list.map(file => file.response ? file.response.data.filepath : file.url)); },
|
||||
open(file) { window.open(file.url); }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-upload-list--picture-card .el-upload-list__item, .el-upload--picture-card {
|
||||
width: var(--therapy-width); height: var(--therapy-height); line-height: var(--therapy-height);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
线路信息
|
||||
</h3>
|
||||
</div>
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item label="年度">{{ viewData.year }}</el-descriptions-item>
|
||||
<el-descriptions-item label="编号">{{ viewData.serialNumber }}</el-descriptions-item>
|
||||
<el-descriptions-item label="线路名称">{{ viewData.lineName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="区域性质">{{ viewData.regionalNature }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="最少参与教工">{{ viewData.minimumGroupSize }}</el-descriptions-item>-->
|
||||
<!-- (校工会创建AND自由模式) OR (分工会创建) -->
|
||||
<!-- <template v-if="(viewData.createMode === 2 && viewData.signUpMode === 2 ) || viewData.createMode === 1">-->
|
||||
|
||||
<!-- <el-descriptions-item label="报名开始时间">{{ viewData.signUpStartTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="报名结束时间">{{ viewData.signUpEndTime }}</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label="变更截至时间">{{ viewData.changeEndTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="出行开始时间">{{ viewData.playStartTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="出行结束时间">{{ viewData.playEndTime }}</el-descriptions-item>-->
|
||||
|
||||
<!-- <el-descriptions-item label="交通工具">{{ viewData.trafficTools }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="预计费用(元)">{{ viewData.estimatedCost }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="预计人数(含家属)">{{ viewData.estimatedFamilyNumbers }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label=""></el-descriptions-item>-->
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default mt20" style="border:none" v-if="showTravelTimePeriod">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
出行时间段
|
||||
</h3>
|
||||
</div>
|
||||
<el-table :data="times" border>
|
||||
<el-table-column label="报名开始时间" prop="signUpStartTime" width="160"></el-table-column>
|
||||
<el-table-column label="报名结束时间" prop="signUpEndTime" width="160"></el-table-column>
|
||||
<el-table-column label="变更截至时间" prop="changeEndTime" width="160"></el-table-column>
|
||||
<el-table-column label="出行开始时间" prop="playStartTime" width="160"></el-table-column>
|
||||
<el-table-column label="出行结束时间" prop="playEndTime" width="160"></el-table-column>
|
||||
<el-table-column label="旅行社" prop="travelAgencyName" width="150"></el-table-column>
|
||||
<el-table-column label="联系人" prop="contact" width="100"></el-table-column>
|
||||
<el-table-column label="联系电话" prop="contactPhone" width="120"></el-table-column>
|
||||
<el-table-column label="负责人" prop="principal" width="100"></el-table-column>
|
||||
<el-table-column label="联系方式" prop="principalContact" width="120"></el-table-column>
|
||||
<el-table-column label="交通工具" prop="trafficTools" width="100"></el-table-column>
|
||||
<el-table-column label="预计费用(元/人次)" prop="estimatedCost" width="140"></el-table-column>
|
||||
<el-table-column label="最少成团人数(包括家属)" prop="estimatedFamilyNumbers" width="160"></el-table-column>
|
||||
<el-table-column label="最多人数" prop="maxPeopleNumber" width="100"></el-table-column>
|
||||
<el-table-column label="是否开启" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.enable ? '是' : '否' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="调剂报名截止时间" prop="adjustSignUpEndTime" width="160"></el-table-column>
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
旅行社信息
|
||||
</h3>
|
||||
</div>
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item :span="2" label="旅行社名称">
|
||||
旅行社表单已隐藏,查看页同步隐藏旅行社信息。
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
-->
|
||||
<div class="panel panel-default mt20" style="border-color: #ebeef5">
|
||||
<div class="panel-heading" style="background: #fafafa;border-color: #ebeef5">
|
||||
<h3 class="panel-title">
|
||||
线路内容
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div v-html="viewData.content"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "LineInfo",
|
||||
data() {
|
||||
return {
|
||||
viewData: {
|
||||
travelAgency:{}
|
||||
},
|
||||
//多个出行的时间段
|
||||
times: [],
|
||||
//分工会选择校工会的线路自己设置的时间信息等等。。。
|
||||
unionSelectLineData: {},
|
||||
//是否只看基本信息 因为出行时间针对每个分工会都不一样
|
||||
showTravelTimePeriod: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(lineId, usUnionId, mode, year) {
|
||||
this.findOne(lineId, usUnionId, mode, year)
|
||||
},
|
||||
async findOne(id, unionId, mode, year) {
|
||||
const resp = await $.get('/platform/staffTherapyRecuperation/line/selectLineInfoById/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
//校工会创建 分工会选择 所以每个分工会的活动时间会不一样
|
||||
if (unionId) {
|
||||
this.showTravelTimePeriod = true
|
||||
await this.findUnionSelectLineData(id, unionId, mode, year)
|
||||
} else {
|
||||
this.showTravelTimePeriod = false
|
||||
}
|
||||
}
|
||||
},
|
||||
async findUnionSelectLineData(lineId, unionId, mode, year) {
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/lineFghSelect/selectLineInfo', {
|
||||
lineId: lineId,
|
||||
unionId: unionId,
|
||||
mode: mode,
|
||||
year: year
|
||||
})
|
||||
if (resp.code === 0 && resp.data) {
|
||||
this.times = resp.data
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.viewTable .el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.viewTable .el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,158 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<el-tabs tab-position="top" v-model="activeName" v-loading="loading">
|
||||
<el-tab-pane label="报名信息" name="1">
|
||||
<div class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
本人信息
|
||||
</h3>
|
||||
</div>
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item label="一卡通号">{{ viewData.loginName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="姓名">{{ viewData.userName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号">{{ viewData.idCard }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位">{{ viewData.unitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工会">{{ viewData.unionName }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="是否转入转出">
|
||||
<span class="label label-primary">
|
||||
<sapn v-if="viewData.takePartInUnionId!=union_id">转出报名</sapn>
|
||||
<sapn v-else-if="viewData.selfUnionId!=union_id">转入报名</sapn>
|
||||
<sapn v-else>本公会报名</sapn>
|
||||
</span>
|
||||
</el-descriptions-item>-->
|
||||
|
||||
<el-descriptions-item label="报名时间">{{ viewData.signingUptime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="参加活动时间">{{
|
||||
viewData.specificTime ? viewData.specificTime : '暂未更新'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="实际出行时间">{{
|
||||
viewData.takePartInTime ? viewData.takePartInTime : '暂未更新'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="线路名称">{{ viewData.lineName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="旅行社名称">{{ viewData.travelAgencyName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="是否携带家属">
|
||||
<span class="label label-primary">
|
||||
{{ viewData.isFamily ? '携带' : '未携带' }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="床型">{{ viewData.bedInfo?.bedType }}</el-descriptions-item>
|
||||
<el-descriptions-item label="床位">{{
|
||||
viewData.bedInfo?.bedNum ? viewData.bedInfo?.bedNum : '暂无'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="意向拼床人">
|
||||
{{ viewData.bedInfo?.otherSleepUser ? viewData.bedInfo?.otherSleepUser : '暂无' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
同伴信息
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body" style="border: 1px solid rgb(235, 238, 245)">
|
||||
<el-table :data="viewData.companionList">
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="身份证号" prop="idCard"></el-table-column>
|
||||
<el-table-column label="年龄" prop="age"></el-table-column>
|
||||
<el-table-column label="床型" prop="bedType">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo?.bedType }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="床位" prop="bedNum">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo?.bedNum }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="意向拼床人" prop="otherSleepUser">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo?.otherSleepUser ? row.bedInfo?.otherSleepUser : '暂无' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="关系" prop="relation"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="校工会审核信息" name="2" v-if="viewData.schoolUnionAudit">
|
||||
<div class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading" style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none">
|
||||
<h3 class="panel-title">
|
||||
审核信息
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item label="审核人">
|
||||
{{ viewData.schoolUnionAudit.username }}({{ viewData.schoolUnionAudit.loginname }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">{{ viewData.schoolUnionAudit.auditTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见">{{ viewData.schoolUnionAudit.auditOpinion }}</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<slot name="handle"></slot>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
union_id: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
components: {
|
||||
'line-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: "1",
|
||||
viewData: {
|
||||
companionList: [],
|
||||
bedInfo: {},
|
||||
},
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async findOne(id) {
|
||||
this.loading = true
|
||||
const resp = await $.get("/platform/staffTherapyRecuperation/TheRapyAudit/findOne", {id})
|
||||
this.loading = false
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data.viewData
|
||||
} else {
|
||||
this.viewData = {}
|
||||
this.$notify.warning({title: '警告', message: resp.data})
|
||||
}
|
||||
},
|
||||
openView(id) {
|
||||
this.findOne(id)
|
||||
},
|
||||
openAudit(id, activeName) {
|
||||
this.findOne(id)
|
||||
this.activeName = activeName
|
||||
}
|
||||
},
|
||||
created() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<div class="card">
|
||||
<div class="card-header" v-if="$slots.header">
|
||||
<slot name="header"></slot>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div class="card-footer" v-if="$slots.footer">
|
||||
<slot name="footer"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "MCard"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.card {
|
||||
border: none;
|
||||
border-radius: .5rem;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
border-bottom:1px dashed rgba(0,0,0,.125);
|
||||
font-size: 1.15rem;
|
||||
}
|
||||
|
||||
.card-header:first-child {
|
||||
border-radius: calc(.5rem - 1px) calc(.5rem - 1px) 0 0
|
||||
}
|
||||
|
||||
.card-body>.van-cell{
|
||||
padding: 5px 0;
|
||||
}
|
||||
.card-body{
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
|
||||
.card-header, .card-footer {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<div class="loader"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "MLoading"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.loader {
|
||||
z-index: 10000;
|
||||
position: relative;
|
||||
width: 2.5em;
|
||||
height: 2.5em;
|
||||
transform: rotate(165deg);
|
||||
}
|
||||
|
||||
.loader:before, .loader:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
display: block;
|
||||
width: 0.5em;
|
||||
height: 0.5em;
|
||||
border-radius: 0.25em;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.loader:before {
|
||||
animation: before 2s infinite;
|
||||
}
|
||||
|
||||
.loader:after {
|
||||
animation: after 2s infinite;
|
||||
}
|
||||
|
||||
@keyframes before {
|
||||
0% {
|
||||
width: 0.5em;
|
||||
box-shadow: 1em -0.5em rgba(225, 20, 98, 0.75), -1em 0.5em rgba(111, 202, 220, 0.75);
|
||||
}
|
||||
35% {
|
||||
width: 2.5em;
|
||||
box-shadow: 0 -0.5em rgba(225, 20, 98, 0.75), 0 0.5em rgba(111, 202, 220, 0.75);
|
||||
}
|
||||
70% {
|
||||
width: 0.5em;
|
||||
box-shadow: -1em -0.5em rgba(225, 20, 98, 0.75), 1em 0.5em rgba(111, 202, 220, 0.75);
|
||||
}
|
||||
100% {
|
||||
box-shadow: 1em -0.5em rgba(225, 20, 98, 0.75), -1em 0.5em rgba(111, 202, 220, 0.75);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes after {
|
||||
0% {
|
||||
height: 0.5em;
|
||||
box-shadow: 0.5em 1em rgba(61, 184, 143, 0.75), -0.5em -1em rgba(233, 169, 32, 0.75);
|
||||
}
|
||||
35% {
|
||||
height: 2.5em;
|
||||
box-shadow: 0.5em 0 rgba(61, 184, 143, 0.75), -0.5em 0 rgba(233, 169, 32, 0.75);
|
||||
}
|
||||
70% {
|
||||
height: 0.5em;
|
||||
box-shadow: 0.5em -1em rgba(61, 184, 143, 0.75), -0.5em 1em rgba(233, 169, 32, 0.75);
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0.5em 1em rgba(61, 184, 143, 0.75), -0.5em -1em rgba(233, 169, 32, 0.75);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to center the whole thing!
|
||||
*/
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.loader {
|
||||
position: absolute;
|
||||
top: calc(50% - 1.25em);
|
||||
left: calc(50% - 1.25em);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<figure>
|
||||
<div class="dot white"></div>
|
||||
<div class="dot"></div>
|
||||
<div class="dot"></div>
|
||||
<div class="dot"></div>
|
||||
<div class="dot"></div>
|
||||
</figure>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "MTableLoading"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
body {
|
||||
background: #222;
|
||||
}
|
||||
|
||||
figure {
|
||||
position: absolute;
|
||||
margin: auto;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 6.250em;
|
||||
height: 6.250em;
|
||||
animation: rotate 2.4s linear infinite;
|
||||
}
|
||||
|
||||
.white {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: white;
|
||||
animation: flash 2.4s linear infinite;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.dot {
|
||||
position: absolute;
|
||||
margin: auto;
|
||||
width: 2.4em;
|
||||
height: 2.4em;
|
||||
border-radius: 100%;
|
||||
transition: all 1s ease;
|
||||
}
|
||||
|
||||
.dot:nth-child(2) {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: #FF4444;
|
||||
animation: dotsY 2.4s linear infinite;
|
||||
}
|
||||
|
||||
.dot:nth-child(3) {
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
background: #FFBB33;
|
||||
animation: dotsX 2.4s linear infinite;
|
||||
}
|
||||
|
||||
.dot:nth-child(4) {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background: #99CC00;
|
||||
animation: dotsY 2.4s linear infinite;
|
||||
}
|
||||
|
||||
.dot:nth-child(5) {
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: #33B5E5;
|
||||
animation: dotsX 2.4s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes rotate {
|
||||
0% {
|
||||
transform: rotate(0);
|
||||
}
|
||||
10% {
|
||||
width: 6.250em;
|
||||
height: 6.250em;
|
||||
}
|
||||
66% {
|
||||
width: 2.4em;
|
||||
height: 2.4em;
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
width: 6.250em;
|
||||
height: 6.250em;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes dotsY {
|
||||
66% {
|
||||
opacity: .1;
|
||||
width: 2.4em;
|
||||
}
|
||||
77% {
|
||||
opacity: 1;
|
||||
width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes dotsX {
|
||||
66% {
|
||||
opacity: .1;
|
||||
height: 2.4em;
|
||||
}
|
||||
77% {
|
||||
opacity: 1;
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes flash {
|
||||
33% {
|
||||
opacity: 0;
|
||||
border-radius: 0%;
|
||||
}
|
||||
55% {
|
||||
opacity: .6;
|
||||
border-radius: 100%;
|
||||
}
|
||||
66% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,671 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<van-uploader v-model="fileList" multiple
|
||||
:after-read="afterRead"
|
||||
@delete="doDelete"
|
||||
:max-count="max"
|
||||
:show-upload="!view"
|
||||
:deletable="!view"
|
||||
:max-size="max_size"
|
||||
:preview-options="{closeable:true}"
|
||||
@oversize="onOversize"
|
||||
@click-preview="clickPreview"
|
||||
:before-read="beforeRead"
|
||||
>
|
||||
</van-uploader>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
/**
|
||||
* 文件类型解析
|
||||
* @type {{isImg: wpUploadFileTypeResolve.isImg}}
|
||||
*/
|
||||
let fileTypeResolving = {
|
||||
/**
|
||||
* 是否是一张图片
|
||||
*/
|
||||
isImg: function (fileItem) {
|
||||
return fileTypeResolving.resolvingByType(fileItem.type, /image\/(\w)*/)
|
||||
},
|
||||
/**
|
||||
* 通过后缀验证图片
|
||||
*/
|
||||
isImgByName: function (fileItemName) {
|
||||
let checkSuffixArray = ['jpg', 'png', 'jpeg', 'bmp', 'gif', 'webp', 'tif', 'svg', 'wmf'];
|
||||
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray)
|
||||
},
|
||||
/**
|
||||
* 是否是视频
|
||||
*/
|
||||
isVideo: function (fileItem) {
|
||||
return fileTypeResolving.resolvingByType(fileItem.type, /video\/(\w)*/)
|
||||
},
|
||||
/**
|
||||
* 通过后缀验证图片
|
||||
*/
|
||||
isVideoByName: function (fileItemName) {
|
||||
let checkSuffixArray = ['mp4', 'Ogg', 'webm'];
|
||||
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray)
|
||||
},
|
||||
/**
|
||||
* 是否是音频
|
||||
*/
|
||||
isAudio: function (fileItem) {
|
||||
return fileTypeResolving.resolvingByType(fileItem.type, /audio\/(\w)*/)
|
||||
},
|
||||
/**
|
||||
* 通过后缀验证图片
|
||||
*/
|
||||
isAudioByName: function (fileItemName) {
|
||||
let checkSuffixArray = ['mp3', 'ogg', 'wav'];
|
||||
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray)
|
||||
},
|
||||
|
||||
/**
|
||||
* 是否是doc文件
|
||||
*/
|
||||
isDoc: function (fileItemName) {
|
||||
let checkSuffixArray = ['doc', 'docx', 'dot', 'dotx'];
|
||||
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
|
||||
},
|
||||
/**
|
||||
* 是否是excel文件
|
||||
*/
|
||||
isExcel: function (fileItemName) {
|
||||
let checkSuffixArray = ['xls', 'xlsx', 'csv', 'xlt', 'xltx'];
|
||||
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
|
||||
},
|
||||
/**
|
||||
* 是否是PPT文件
|
||||
*/
|
||||
isPPT: function (fileItemName) {
|
||||
let checkSuffixArray = ['ppt', 'pptx', 'pot', 'potx', 'odp'];
|
||||
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
|
||||
},
|
||||
/**
|
||||
* 是否是Pdf文件
|
||||
*/
|
||||
isPdf: function (fileItemName) {
|
||||
let checkSuffixArray = ['pdf'];
|
||||
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
|
||||
},
|
||||
/**
|
||||
* 是否是压缩文件
|
||||
* @param fileItem
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isZip: function (fileItemName) {
|
||||
let checkSuffixArray = ['zip', '7z', 'war', 'tar', 'rar', 'jar', 'zipx', 'zix', 'zoo'];
|
||||
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
|
||||
},
|
||||
isWeb: function (fileItemName) {
|
||||
let checkSuffixArray = ['html', 'htm'];
|
||||
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
|
||||
},
|
||||
isTxt: function (fileItemName) {
|
||||
let checkSuffixArray = ['txt'];
|
||||
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
|
||||
},
|
||||
isPsd: function (fileItemName) {
|
||||
let checkSuffixArray = ['psd'];
|
||||
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
|
||||
},
|
||||
isCad: function (fileItemName) {
|
||||
let checkSuffixArray = ['cad'];
|
||||
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
|
||||
},
|
||||
isIso: function (fileItemName) {
|
||||
let checkSuffixArray = ['iso'];
|
||||
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
|
||||
},
|
||||
isExe: function (fileItemName) {
|
||||
let checkSuffixArray = ['exe'];
|
||||
return fileTypeResolving.resolvingByName(fileItemName, checkSuffixArray);
|
||||
},
|
||||
/**
|
||||
* 根据文件类型来解析
|
||||
* @param fileType 文件类型
|
||||
* @param checkTypeModel 文件类型模型,如:image\/(\w)*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
resolvingByType: function (fileType, checkTypeModel) {
|
||||
if (checkTypeModel.test(fileType)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
/**
|
||||
* 根据名字和名字后缀名来验证文件
|
||||
* @param fileName 文件名
|
||||
* @param checkSuffixArray 文件类型包含的后缀
|
||||
*/
|
||||
resolvingByName: function (fileName, checkSuffixArray) {
|
||||
let suffixName = wpUploadFileTools.getSuffixNameByFileName(fileName);
|
||||
// 名字是否有效
|
||||
if (!wpUploadDataValid.isValidStr(suffixName)) {
|
||||
// 无效直接返回false
|
||||
return false;
|
||||
}
|
||||
suffixName = suffixName.trim();
|
||||
suffixName = suffixName.toLowerCase();
|
||||
if (checkSuffixArray.indexOf(suffixName) != -1) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件工具
|
||||
* @type {{}}
|
||||
*/
|
||||
let wpUploadFileTools = {
|
||||
/**
|
||||
* 获取文件显示模版
|
||||
* @param fileItem
|
||||
*/
|
||||
wapFileItemShow: function (fileItem) {
|
||||
return wpUploadFileTools.wapFileItemShowBase(fileItem, false);
|
||||
},
|
||||
/**
|
||||
* 包装已上传的文件列表
|
||||
*/
|
||||
wapFileItemShowWithUpload(uploadFile) {
|
||||
return wpUploadFileTools.wapFileItemShowBase(uploadFile, true);
|
||||
},
|
||||
/**
|
||||
* 获取文件显示的基本操作
|
||||
*/
|
||||
wapFileItemShowBase(fileItem, isUploaded = false) {
|
||||
let fileName = "";
|
||||
let suffix = "";
|
||||
let show = "";
|
||||
let showIcon = "";
|
||||
if (!isUploaded) {
|
||||
fileName = fileItem.name;
|
||||
suffix = wpUploadFileTools.getSuffixNameByFileName(fileName);
|
||||
show = wpUploadFileTools.resolvingShow(fileItem);
|
||||
showIcon = wpUploadFileShowResolving.getFileItemShowIcon(show, fileItem, false);
|
||||
} else {
|
||||
fileName = fileItem.name ? fileItem.name : wpUploadFileTools.resolvingUrlFileName(fileItem.url);
|
||||
let fileNameGetOFuRL = wpUploadFileTools.resolvingUrlFileName(fileItem.url);
|
||||
suffix = wpUploadFileTools.getSuffixNameByFileName(fileNameGetOFuRL);
|
||||
show = wpUploadFileTools.resolvingShowByFileName(fileNameGetOFuRL);
|
||||
showIcon = wpUploadFileShowResolving.getFileItemShowIcon(show, fileItem.url, true);
|
||||
}
|
||||
let fileItemShow = {
|
||||
// 文件的id
|
||||
id: wpUploadFileTools.uuid(),
|
||||
// 文件对象
|
||||
file: null,
|
||||
// 文件的类型
|
||||
type: null,
|
||||
// 文件的大小
|
||||
size: null,
|
||||
// 文件的名字
|
||||
name: fileName,
|
||||
// 文件地址
|
||||
url: null,
|
||||
// 后缀
|
||||
suffix: suffix,
|
||||
// 显示的类型
|
||||
show: show,
|
||||
// 显示的图标或者图片地址
|
||||
showIcon: showIcon,
|
||||
// 显示进度条
|
||||
processStatus: {
|
||||
show: false,
|
||||
width: 0,
|
||||
isFail: false
|
||||
},
|
||||
// 文件来源,0选择文件上传,1回显文件
|
||||
fileSource: 0,
|
||||
// 状态0未上传,失败也会转到0,1正在上传,2已经上传
|
||||
status: 0,
|
||||
// 上传文件的描述
|
||||
fileDes: null
|
||||
}
|
||||
if (!isUploaded) {
|
||||
// 如果非选择文件下面三个属性为null
|
||||
fileItemShow.file = fileItem;
|
||||
fileItemShow.type = fileItem.type;
|
||||
fileItemShow.size = fileItem.size;
|
||||
} else {
|
||||
// 文件描述
|
||||
fileItemShow.status = 2;
|
||||
fileItemShow.fileDes = fileItem;
|
||||
fileItemShow.fileSource = 1;
|
||||
fileItemShow.url = fileItem.url;
|
||||
}
|
||||
return fileItemShow;
|
||||
},
|
||||
/**
|
||||
* 解析URL的文件名字
|
||||
*/
|
||||
resolvingUrlFileName: function (fileUrl) {
|
||||
let index = fileUrl.lastIndexOf("/");
|
||||
if (index <= 0) {
|
||||
index = fileUrl.lastIndexOf("\\");
|
||||
}
|
||||
index = index + 1;
|
||||
let fileName = fileUrl.substring(index, fileUrl.length);
|
||||
return fileName;
|
||||
},
|
||||
/**
|
||||
* 获取文件名后缀
|
||||
* @param fileName 文件名全名
|
||||
* */
|
||||
getSuffixNameByFileName: function (fileName) {
|
||||
let str = fileName;
|
||||
let index = str.lastIndexOf(".");
|
||||
if (index < 0) {
|
||||
return "";
|
||||
}
|
||||
let pos = index + 1;
|
||||
return str.substring(pos, str.length);
|
||||
},
|
||||
/**
|
||||
* 解析显示类型
|
||||
* @param fileItem 文件
|
||||
* @returns {number}
|
||||
*/
|
||||
resolvingShow: function (fileItem) {
|
||||
// 默认0普通文件
|
||||
let showResult = 0;
|
||||
if (wpUploadFileTypeResolving.isImg(fileItem)) {
|
||||
showResult = 1;
|
||||
} else if (wpUploadFileTypeResolving.isVideo(fileItem)) {
|
||||
showResult = 2;
|
||||
} else if (wpUploadFileTypeResolving.isAudio(fileItem)) {
|
||||
showResult = 3;
|
||||
} else if (wpUploadFileTypeResolving.isDoc(fileItem.name)) {
|
||||
showResult = 4;
|
||||
} else if (wpUploadFileTypeResolving.isExcel(fileItem.name)) {
|
||||
showResult = 5;
|
||||
} else if (wpUploadFileTypeResolving.isPPT(fileItem.name)) {
|
||||
showResult = 6;
|
||||
} else if (wpUploadFileTypeResolving.isPdf(fileItem.name)) {
|
||||
showResult = 7;
|
||||
} else if (wpUploadFileTypeResolving.isZip(fileItem.name)) {
|
||||
showResult = 8;
|
||||
} else if (wpUploadFileTypeResolving.isWeb(fileItem.name)) {
|
||||
showResult = 9;
|
||||
} else if (wpUploadFileTypeResolving.isTxt(fileItem.name)) {
|
||||
showResult = 10;
|
||||
} else if (wpUploadFileTypeResolving.isPsd(fileItem.name)) {
|
||||
showResult = 11;
|
||||
} else if (wpUploadFileTypeResolving.isCad(fileItem.name)) {
|
||||
showResult = 12;
|
||||
} else if (wpUploadFileTypeResolving.isIso(fileItem.name)) {
|
||||
showResult = 13;
|
||||
} else if (wpUploadFileTypeResolving.isExe(fileItem.name)) {
|
||||
showResult = 14;
|
||||
}
|
||||
return showResult
|
||||
},
|
||||
|
||||
/**
|
||||
* 解析显示类型
|
||||
* @param fileItem 文件
|
||||
* @returns {number}
|
||||
*/
|
||||
resolvingShowByFileName: function (fileItemName) {
|
||||
// 默认0普通文件
|
||||
let showResult = 0;
|
||||
if (wpUploadFileTypeResolving.isImgByName(fileItemName)) {
|
||||
showResult = 1;
|
||||
} else if (wpUploadFileTypeResolving.isVideoByName(fileItemName)) {
|
||||
showResult = 2;
|
||||
} else if (wpUploadFileTypeResolving.isAudioByName(fileItemName)) {
|
||||
showResult = 3;
|
||||
} else if (wpUploadFileTypeResolving.isDoc(fileItemName)) {
|
||||
showResult = 4;
|
||||
} else if (wpUploadFileTypeResolving.isExcel(fileItemName)) {
|
||||
showResult = 5;
|
||||
} else if (wpUploadFileTypeResolving.isPPT(fileItemName)) {
|
||||
showResult = 6;
|
||||
} else if (wpUploadFileTypeResolving.isPdf(fileItemName)) {
|
||||
showResult = 7;
|
||||
} else if (wpUploadFileTypeResolving.isZip(fileItemName)) {
|
||||
showResult = 8;
|
||||
} else if (wpUploadFileTypeResolving.isWeb(fileItemName)) {
|
||||
showResult = 9;
|
||||
} else if (wpUploadFileTypeResolving.isTxt(fileItemName)) {
|
||||
showResult = 10;
|
||||
} else if (wpUploadFileTypeResolving.isPsd(fileItemName)) {
|
||||
showResult = 11;
|
||||
} else if (wpUploadFileTypeResolving.isCad(fileItemName)) {
|
||||
showResult = 12;
|
||||
} else if (wpUploadFileTypeResolving.isIso(fileItemName)) {
|
||||
showResult = 13;
|
||||
} else if (wpUploadFileTypeResolving.isExe(fileItemName)) {
|
||||
showResult = 14;
|
||||
}
|
||||
return showResult
|
||||
},
|
||||
/**
|
||||
* 生成UUID
|
||||
* @returns {string}
|
||||
*/
|
||||
uuid: function () {
|
||||
let str = wpUploadFileTools.uuidFull();
|
||||
str = str.replace(/-/g, "");
|
||||
return str;
|
||||
},
|
||||
uuidFull() {
|
||||
let s = []
|
||||
let hexDigits = "0123456789abcdef"
|
||||
for (var i = 0; i < 36; i++) {
|
||||
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1)
|
||||
}
|
||||
s[14] = "4"
|
||||
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1)
|
||||
s[8] = s[13] = s[18] = s[23] = "-"
|
||||
let uuid = s.join("")
|
||||
return uuid
|
||||
},
|
||||
/**
|
||||
* 禁止某个dom的某个事件
|
||||
*/
|
||||
disableObjEvent(domObj, eventName) {
|
||||
domObj.addEventListener(eventName, function (e) {
|
||||
e.preventDefault();
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据验证工具
|
||||
* @type {{isValid: wpUploadDataValid.isValid}}
|
||||
*/
|
||||
let wpUploadDataValid = {
|
||||
isValid: function (obj) {
|
||||
if (undefined === obj || null === obj) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
isValidStr: function (str) {
|
||||
let isValidObj = wpUploadDataValid.isValid(str);
|
||||
if (!isValidObj) {
|
||||
return isValidObj;
|
||||
}
|
||||
str = str.trim();
|
||||
if ("" == str || '' == str) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
isValidArray(array) {
|
||||
if (null == array || array == undefined || array.length <= 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
props: {
|
||||
files: Array,
|
||||
type: {
|
||||
type: Array,
|
||||
default: ['jpg', 'jpeg', 'png', 'doc', 'docx', 'xls', 'xlsx', 'pdf']
|
||||
},
|
||||
max: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
max_size: {
|
||||
type: Number,
|
||||
default: 100 * 1024 * 1024
|
||||
},
|
||||
view: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
del: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileList: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
files(val) {
|
||||
this.updateFileList(val)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 返回布尔值
|
||||
beforeRead(file) {
|
||||
const lastIndexOf = file.name.lastIndexOf(".")
|
||||
const type = this.type.map(v => v.toLowerCase()).includes(file.name.substr(lastIndexOf + 1).toLowerCase())
|
||||
if (!type) {
|
||||
this.$message.warning(`上传文件只能是 ${this.type.map(v => v.toLowerCase()).join("/")} 格式!`);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
getAccept() {
|
||||
return this.type.map(v => '.' + v).join(",")
|
||||
},
|
||||
onOversize() {
|
||||
this.$toast(`上传文件大小不能超过 ${this.max_size / 1024 / 1024} MB!`);
|
||||
},
|
||||
/**
|
||||
* 查看资源
|
||||
*/
|
||||
showSource(showItem) {
|
||||
const show = this.resolvingShowByFileName(showItem.filepath)
|
||||
if (show == 1 || show == 2 || show == 3) {
|
||||
$('.viewFile').viewer({
|
||||
url: 'src',
|
||||
});
|
||||
} else if (show == 4 || show == 5 || show == 7) {
|
||||
preview(showItem.filepath, showItem.id)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 解析显示类型
|
||||
* @param fileItem 文件
|
||||
* @returns {number}
|
||||
*/
|
||||
resolvingShowByFileName(fileItemName) {
|
||||
// 默认0普通文件
|
||||
let showResult = 0;
|
||||
if (fileTypeResolving.isImgByName(fileItemName)) {
|
||||
showResult = 1;
|
||||
} else if (fileTypeResolving.isVideoByName(fileItemName)) {
|
||||
showResult = 2;
|
||||
} else if (fileTypeResolving.isAudioByName(fileItemName)) {
|
||||
showResult = 3;
|
||||
} else if (fileTypeResolving.isDoc(fileItemName)) {
|
||||
showResult = 4;
|
||||
} else if (fileTypeResolving.isExcel(fileItemName)) {
|
||||
showResult = 5;
|
||||
} else if (fileTypeResolving.isPPT(fileItemName)) {
|
||||
showResult = 6;
|
||||
} else if (fileTypeResolving.isPdf(fileItemName)) {
|
||||
showResult = 7;
|
||||
} else if (fileTypeResolving.isZip(fileItemName)) {
|
||||
showResult = 8;
|
||||
} else if (fileTypeResolving.isWeb(fileItemName)) {
|
||||
showResult = 9;
|
||||
} else if (fileTypeResolving.isTxt(fileItemName)) {
|
||||
showResult = 10;
|
||||
} else if (fileTypeResolving.isPsd(fileItemName)) {
|
||||
showResult = 11;
|
||||
} else if (fileTypeResolving.isCad(fileItemName)) {
|
||||
showResult = 12;
|
||||
} else if (fileTypeResolving.isIso(fileItemName)) {
|
||||
showResult = 13;
|
||||
} else if (fileTypeResolving.isExe(fileItemName)) {
|
||||
showResult = 14;
|
||||
}
|
||||
return showResult
|
||||
},
|
||||
/**
|
||||
* 获取文件显示图标
|
||||
* @param filePath
|
||||
* @returns {string}
|
||||
*/
|
||||
getFileItemShowIcon(filePath) {
|
||||
let showIcon = '';
|
||||
switch (this.resolvingShowByFileName(filePath)) {
|
||||
case 0:
|
||||
showIcon = "#icon-yunpanlogo-3";
|
||||
break;
|
||||
// 图片
|
||||
case 1:
|
||||
showIcon = this.getImgShowIcon(filePath);
|
||||
break;
|
||||
// 视频
|
||||
case 2:
|
||||
showIcon = "#icon-yunpanlogo-6";
|
||||
break;
|
||||
// 音乐
|
||||
case 3:
|
||||
showIcon = "#icon-yunpanlogo-4";
|
||||
break;
|
||||
// doc
|
||||
case 4:
|
||||
showIcon = "#icon-yunpanlogo-2";
|
||||
break;
|
||||
// excel
|
||||
case 5:
|
||||
showIcon = "#icon-yunpanlogo-";
|
||||
break;
|
||||
// ppt
|
||||
case 6:
|
||||
showIcon = "#icon-yunpanlogo-1";
|
||||
break;
|
||||
// pdf
|
||||
case 7:
|
||||
showIcon = "#icon-yunpanlogo-12";
|
||||
break;
|
||||
// zip
|
||||
case 8:
|
||||
showIcon = "#icon-yasuobao";
|
||||
break;
|
||||
// web文件
|
||||
case 9:
|
||||
showIcon = "#icon-yunpanlogo-5";
|
||||
break;
|
||||
// txt文件
|
||||
case 10:
|
||||
showIcon = "#icon-yunpanlogo-7";
|
||||
break;
|
||||
// PSD
|
||||
case 11:
|
||||
showIcon = "#icon-yunpanlogo-10";
|
||||
break;
|
||||
// cad
|
||||
case 12:
|
||||
showIcon = "#icon-yunpanlogo-11";
|
||||
break;
|
||||
// ISO
|
||||
case 13:
|
||||
showIcon = "#icon-yunpanlogo-8";
|
||||
break;
|
||||
// 可执行
|
||||
case 14:
|
||||
showIcon = "#icon-yunpanlogo-9";
|
||||
break;
|
||||
// 普通文件
|
||||
default:
|
||||
showIcon = "#icon-yunpanlogo-3";
|
||||
}
|
||||
return showIcon;
|
||||
},
|
||||
/**
|
||||
* 获取图片的显示图标
|
||||
* @param fileItem
|
||||
* @returns {string|*}
|
||||
*/
|
||||
getImgShowIcon(fileItem) {
|
||||
return FILE_DOMAIN + fileItem;
|
||||
},
|
||||
change(fileList) {
|
||||
this.$emit("update:files", fileList.map(v => v.data))
|
||||
},
|
||||
afterRead(file) {
|
||||
file.status = 'uploading';
|
||||
file.message = '上传中...';
|
||||
|
||||
let formData = new FormData();
|
||||
formData.append("file", file.file, file.file.name);
|
||||
|
||||
$.ajax({
|
||||
url: FILE_UPLOAD_ADDRESS,
|
||||
type: "post",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: (res) => {
|
||||
const {code, data} = res
|
||||
if (code === 0) {
|
||||
file.status = 'success';
|
||||
file.data = data
|
||||
this.change(this.fileList)
|
||||
}
|
||||
},
|
||||
error: (err) => {
|
||||
file.status = 'failed';
|
||||
file.message = '上传失败';
|
||||
}
|
||||
});
|
||||
},
|
||||
doDelete(file) {
|
||||
if (file.data) {
|
||||
const {filename, filepath} = file.data
|
||||
if (this.del) {
|
||||
$.post(FILE_DELETE_ADDRESS, {filepath})
|
||||
}
|
||||
this.change(this.fileList)
|
||||
}
|
||||
},
|
||||
clickPreview(file) {
|
||||
const {filepath, id} = file.data
|
||||
const show = this.resolvingShowByFileName(filepath)
|
||||
if (show == 4 || show == 5 || show == 7) {
|
||||
preview(filepath, id)
|
||||
}
|
||||
},
|
||||
updateFileList(val) {
|
||||
if (!val || !val.length) {
|
||||
this.fileList = []
|
||||
return
|
||||
}
|
||||
|
||||
this.fileList = val.map(v => {
|
||||
let url = ''
|
||||
if (this.resolvingShowByFileName(v.filename) == 1) {
|
||||
url = APP_DOMAIN + '/platform/staffTherapyRecuperation/common/preview?id=' + v.id
|
||||
console.log(url)
|
||||
return {data: v, url, isImage: true, file: {name: v.filename}, status: 'success'}
|
||||
}
|
||||
return {data: v, url, file: {name: v.filename}, status: 'success'}
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.updateFileList(this.files)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.van-image-preview .van-image-preview__close-icon--top-right {
|
||||
font-size: 50px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,978 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style xmlns="">
|
||||
.query-row {
|
||||
height: 70px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.query-row .el-col {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.query-row:not(:last-child) {
|
||||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||||
}
|
||||
|
||||
.query-row-title {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.el-table-container {
|
||||
padding-top: 0;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>年  度:</span>
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年"
|
||||
style="width: 80%" @change="doSearch">
|
||||
</el-date-picker>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>查询类型:</span>
|
||||
<el-input placeholder="请输入内容" clearable
|
||||
v-model="pageForm.searchKeyword"
|
||||
style="width: 80%" @keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 110px;">
|
||||
<el-option label="姓名" value="userName"></el-option>
|
||||
<el-option label="一卡通号" value="loginName"></el-option>
|
||||
</el-select>
|
||||
<el-button slot="append" @click="doSearch">搜索</el-button>
|
||||
</el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<span>报名路线:</span>
|
||||
<el-tag :effect="pageForm.state===item.value?'dark':'plain'"
|
||||
:key="item.value"
|
||||
:type="item.label"
|
||||
@click="checkState(item.value)"
|
||||
style="margin-right: 10px;cursor: pointer;margin-bottom: 5px;font-size: 15px"
|
||||
v-for="item in options">
|
||||
{{ item.label }}
|
||||
</el-tag>
|
||||
<el-link :underline="false" @click="pageForm.state='';doSearch()"
|
||||
style="color: red" v-if="options.length&&pageForm.state">清空
|
||||
</el-link>
|
||||
<span style="color: red;font-size: 12px;margin-left: 10px">温馨提示:其他工会选我线路,所在工会审核过后,才显示数量</span>
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>所属工会:</span>
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会"
|
||||
@change="unionChange"
|
||||
filterable clearable style="width: 80%"
|
||||
:disabled="unionDisabled">
|
||||
<el-option
|
||||
v-for="item in unionOptions"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>所属单位:</span>
|
||||
<el-select v-model="pageForm.unitId" placeholder="请选择所属单位"
|
||||
@change="doSearch"
|
||||
filterable clearable style="width: 80%"
|
||||
:disabled="unitDisabled">
|
||||
<el-option
|
||||
v-for="item in unitOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>路线类型:</span>
|
||||
<el-select v-model="pageForm.regionalNature" filterable
|
||||
placeholder="请选择线路"
|
||||
style="width: 80%"
|
||||
@change="doSearch();pageForm.takePartInLineId=''">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="省内" value="省内"></el-option>
|
||||
<el-option label="省外" value="省外"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<span>选择路线:</span>
|
||||
<el-select v-model="pageForm.takePartInLineId" filterable clearable
|
||||
placeholder="请选择线路"
|
||||
style="width: 80%"
|
||||
@change="lineChange(pageForm.takePartInLineId);doSearch()">
|
||||
<el-option v-for="item in takePartInLines"
|
||||
:key="item.id"
|
||||
:label="item.lineName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>标  段:</span>
|
||||
<el-select v-model="pageForm.lotId" filterable clearable
|
||||
placeholder="请选择标段"
|
||||
style="width: 80%" @change="doSearch()">
|
||||
<el-option v-for="item in modifyConfig.lots"
|
||||
:key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<span>出行时间:</span>
|
||||
<el-select v-model="pageForm.selectId" filterable clearable
|
||||
placeholder="请选择出行时间"
|
||||
style="width: 80%" @change="doSearch()">
|
||||
<el-option v-for="item in linePlayTimes"
|
||||
:key="item.times"
|
||||
:label="item.times"
|
||||
:value="item.selectId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="审核列表" :app="this">
|
||||
<template #label_end>
|
||||
<!-- <span style="color: red;margin-left: 10px">温馨提示:省内线路不需要审核</span>-->
|
||||
|
||||
</template>
|
||||
|
||||
<template #func>
|
||||
<el-tag :effect="pageForm.state===item.value?'dark':'plain'"
|
||||
:key="item.value"
|
||||
:type="item.label"
|
||||
@click="checkState(item.value)"
|
||||
style="margin-right: 10px;cursor: pointer;font-size: 15px"
|
||||
v-for="item in options">
|
||||
{{ item.label }}
|
||||
</el-tag>
|
||||
<el-link :underline="false" @click="clearState" class="mr10"
|
||||
style="color: red" v-if="options.length&&pageForm.state">清空
|
||||
</el-link>
|
||||
<template
|
||||
v-if="!pageForm.regionalNature||
|
||||
(pageForm.regionalNature==='省内'&&modifyConfig.isSnLine)||
|
||||
(pageForm.regionalNature==='省外'&&modifyConfig.isSwLine)">
|
||||
<el-button type="primary" size="small" class="mr10"
|
||||
@click="openOnekeyAudit">一键审核
|
||||
</el-button>
|
||||
<el-radio-group @change="doSearch()" size="small"
|
||||
v-model="pageForm.isAudit">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%"
|
||||
row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
:selectable="ifEdit"
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='isTransferIn'">
|
||||
<sapn v-if="row.takePartInUnionId!=unionId">转出</sapn>
|
||||
<sapn v-else-if="row.selfUnionId!=unionId">转入</sapn>
|
||||
<sapn v-else>否</sapn>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='lineName'">
|
||||
<el-link type="primary" @click="openLine(row)">{{row.lineName}}
|
||||
</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='isFamily'">
|
||||
<el-link v-if="!row.familyNumber" type="primary" @click="openView(row)">
|
||||
{{row.isFamily?'携带':'未携带'}}({{row.isFamily}})
|
||||
</el-link>
|
||||
<el-link v-else type="primary">
|
||||
{{row.familyNumber?'携带':'未携带'}}({{row.familyNumber}})
|
||||
</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='num'">
|
||||
{{1+row.num}}
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='stateId'">
|
||||
<span v-if="row.stateId">
|
||||
<vi-table-state :state="row"></vi-table-state>
|
||||
</span>
|
||||
<sapn v-else style="color: #67C23A">暂无</sapn>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="180px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<template v-if="!pageForm.regionalNature
|
||||
||(pageForm.regionalNature==='省内'&&modifyConfig.isSnLine)
|
||||
||(pageForm.regionalNature==='省外'&&modifyConfig.isSwLine)">
|
||||
<el-dropdown-item v-if="ifRecall(row)" :command="{type:'recall',data:row}">
|
||||
撤回
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="ifEdit(row)" :command="{type:'handle',data:row}">
|
||||
审核
|
||||
</el-dropdown-item>
|
||||
|
||||
<template v-if="[2750].includes(row.stateId)">
|
||||
<el-dropdown-item :command="{type:'modify',data:row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',data:row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</template>
|
||||
</template>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<!--<el-button @click="openView(row)" size="mini" type="primary">查看
|
||||
</el-button>
|
||||
<template v-if="!pageForm.regionalNature||
|
||||
(pageForm.regionalNature==='省内'&&modifyConfig.isSnLine)||
|
||||
(pageForm.regionalNature==='省外'&&modifyConfig.isSwLine)">
|
||||
<el-button @click="doRecall(row)" size="mini" type="danger"
|
||||
v-if="ifRecall(row)">撤回
|
||||
</el-button>
|
||||
<el-button v-if="ifEdit(row)" @click="openEdit(row)" size="mini"
|
||||
type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
</template>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<enroll-info ref="viewEnrollInfo" :union_id="unionId"></enroll-info>
|
||||
</template>
|
||||
|
||||
<template #public>
|
||||
<line-info ref="viewLineInfo"></line-info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<enroll-info ref="editEnrollInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="审核" name="audit">
|
||||
<el-form :model="formData" label-width="130px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="auditTime">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核意见" prop="auditOpinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
|
||||
type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin: 40px 0;text-align: right">
|
||||
<el-button @click="$refs.guava.index()">返回
|
||||
</el-button>
|
||||
<el-button @click="doAudit(false,true)" type="warning">调整
|
||||
</el-button>
|
||||
<el-button @click="doAudit(false,false)" type="danger">拒绝
|
||||
</el-button>
|
||||
<el-button @click="doAudit(true,false)" type="primary">通过
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</enroll-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
width="50%">
|
||||
|
||||
<el-form :model="formData" label-width="130px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="auditTime">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核意见" prop="auditOpinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">返 回</el-button>
|
||||
<el-button @click="doOnekeyAudit(false,true)" type="warning">调 整</el-button>
|
||||
<el-button @click="doOnekeyAudit(false,false)" type="danger">拒 绝</el-button>
|
||||
<el-button type="primary" @click="doOnekeyAudit(true,false)">通 过</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="修改信息"
|
||||
:visible.sync="editVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="50%">
|
||||
<el-form :model="editFormData" label-width="120px" :rules="rules" ref="editForm" style="margin-right: 40px">
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="loginName" label="工号">
|
||||
<el-input v-model="editFormData.loginName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="userName" label="姓名">
|
||||
<el-input v-model="editFormData.userName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="userName" label="手机号">
|
||||
<el-input v-model="editFormData.mobile" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="userName" label="身份证号">
|
||||
<el-input v-model="editFormData.idCard" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="unionName" label="工会">
|
||||
<el-input v-model="editFormData.unionName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="unitName" label="单位">
|
||||
<el-input v-model="editFormData.unitName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-form-item prop="prop" :label="labelName">
|
||||
<template v-if="modifyConfig.familyInfo == 2">
|
||||
<el-collapse v-model="activeNames">
|
||||
<el-collapse-item title="点击可展开详细信息" name="1">
|
||||
<el-card shadow="never">
|
||||
<el-table :data="editFormData.companionList">
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="身份证号" prop="idCard" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="年龄" prop="age"></el-table-column>
|
||||
<el-table-column label="床型" prop="bedType">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo?.bedType }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="床位" prop="bedNum">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo?.bedNum }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="意向拼床人" prop="otherSleepUser">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo?.otherSleepUser ?
|
||||
row.bedInfo?.otherSleepUser : '暂无' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="关系" prop="relation"></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-input v-model="editFormData.bedType" readonly></el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
|
||||
<!--<el-form-item prop="travelName" label="旅行社">
|
||||
<el-select v-model="editFormData.agencyId" filterable clearable
|
||||
placeholder="请选择旅行社"
|
||||
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in agencyLists"
|
||||
:key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<el-form-item prop="travelLine" :label="lineLabelName">
|
||||
<el-select v-model="editFormData.takePartInLineId" filterable clearable
|
||||
placeholder="请选择线路"
|
||||
@change="validateLine"
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in unionSelectLines"
|
||||
:key="item.id"
|
||||
:label="item.lineName + '-' + item.regionalNature + '【' + item.lotName + '】' + '(' + item.playStartTime + '至' + item.playEndTime + ')' + '(' + item.signUpMode + ')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="specificTime" label="出行时间" v-if="pageForm.state==='3'">
|
||||
<el-select v-model="editFormData.specificTime" filterable clearable
|
||||
placeholder="请选择出行时间"
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in editSpecificTimes"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="editVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doEdit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
unionDisabled: false,
|
||||
unitDisabled: false,
|
||||
unionId: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getUnionId()}",
|
||||
dialogVisible: false,
|
||||
tableSelection: [],
|
||||
formData: {
|
||||
id: "",
|
||||
username: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('username')}",
|
||||
loginName: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('loginname')}",
|
||||
auditTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
auditOpinion: "",
|
||||
isTransferIn: false,
|
||||
},
|
||||
options: [
|
||||
{label: "总人数", value: "0"},
|
||||
{label: "本工会人员(自己线路)", value: "1"},
|
||||
// {label: "本工会人员(其他路线)", value: "2"},
|
||||
{label: "其他工会人员(选我线路)", value: "3"}
|
||||
],
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
takePartInLines: [],
|
||||
pageForm: {
|
||||
lotId: '',
|
||||
regionalNature: '',
|
||||
isAudit: "",
|
||||
state: "",
|
||||
year: moment().format('YYYY'),
|
||||
searchName: "userName",
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'loginName', label: '一卡通号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'unitName', label: '单位', sortable: true},
|
||||
{prop: 'unionName', label: '工会', sortable: true},
|
||||
{prop: 'lineName', label: '线路', sortable: true},
|
||||
{prop: 'regionalNature', label: '线路类型', sortable: true},
|
||||
// {prop: 'userNature', label: '人员性质'},
|
||||
{prop: 'isFamily', label: '是否携带家属'},
|
||||
// {prop: 'num', label: '人数'},
|
||||
// {prop: 'isTransferIn', label: '是否转入转出', sortable: true},
|
||||
{prop: 'linePlayTime', label: '出行时间', sortable: true},
|
||||
{prop: 'stateId', label: '审核状态', sortable: true},
|
||||
],
|
||||
modifyConfig: {},
|
||||
|
||||
linePlayTimes: [],
|
||||
|
||||
editVisible: false,
|
||||
editFormData: {
|
||||
companionList: []
|
||||
},
|
||||
rules: {
|
||||
loginName: [{required: true, message: '请填写工号', trigger: ['blur', 'change']}],
|
||||
userName: [{required: true, message: '请填写姓名', trigger: ['blur', 'change']}],
|
||||
unionName: [{required: true, message: '请选择工会', trigger: ['blur', 'change']}],
|
||||
unitName: [{required: true, message: '请选择单位', trigger: ['blur', 'change']}],
|
||||
// travelName: [{required: true, message: '请选择旅行社', trigger: ['blur', 'change']}],
|
||||
specificTime: [{required: true, message: '请选择出行时间', trigger: ['blur', 'change']}],
|
||||
// travelLine: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
editSpecificTimes: [],
|
||||
labelName: '',
|
||||
unionSelectLines: [],
|
||||
lineLabelName: '',
|
||||
|
||||
activeNames:[],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'enroll-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/Enrollinfo.vue?v=1.0.1'),
|
||||
'line-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
methods: {
|
||||
async validateLine() {
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/validSignUpInfo'
|
||||
, {enroll: JSON.stringify(this.editFormData)})
|
||||
if (resp.code !== 0) {
|
||||
this.$message.warning(resp.msg)
|
||||
this.editFormData.takePartInLineId = ''
|
||||
}
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type === 'view') {
|
||||
this.openView(data)
|
||||
} else if (type === 'recall') {
|
||||
this.doRecall(data)
|
||||
} else if (type === 'handle') {
|
||||
this.openEdit(data)
|
||||
} else if (type === 'modify') {
|
||||
this.openModify(data)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(data)
|
||||
}
|
||||
},
|
||||
async doDelete(row) {
|
||||
this.$confirm("您确定要删除【<span style='color: red'>" + row.userName + "</span>】的此条报名信息吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
dangerouslyUseHTMLString: true,
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" === a) {//确认后再执行
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/doDeleteMyEnrollInfoById/' + row.id)
|
||||
if (resp.code === 0) {
|
||||
await this.doSearch()
|
||||
this.$message.success('删除成功')
|
||||
await this.getApplyNumAudit();
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async openModify(row) {
|
||||
this.getUnionSelectLine(row.takePartInLineId)
|
||||
this.editFormData = {};
|
||||
const resp = await $.get("/platform/staffTherapyRecuperation/TheRapyAudit/findOne", {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.editFormData = {...resp.data.viewData}
|
||||
if (this.modifyConfig.familyInfo == 2) {
|
||||
this.editFormData.companionList = resp.data.viewData.companionList
|
||||
this.labelName = "家属信息"
|
||||
} else {
|
||||
this.editFormData.bedType = resp.data.viewData.familyNumber
|
||||
this.labelName = "家属数量"
|
||||
}
|
||||
}
|
||||
if (row.takePartInBaseManagementId) {
|
||||
this.editSpecificTime(row.takePartInBaseManagementId);
|
||||
this.lineLabelName = "酒店"
|
||||
} else if (row.takePartInLineId) {
|
||||
this.lineLabelName = '线路'
|
||||
}
|
||||
this.editVisible = true
|
||||
},
|
||||
async doEdit() {
|
||||
this.$refs['editForm'].validate().then(async () => {
|
||||
const confirm = await this.$confirm('您确定要修改这位老师的报名信息吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
if (!this.editFormData.takePartInLineId && !this.editFormData.takePartInBaseManagementId) {
|
||||
this.$message.warning('请选择线路')
|
||||
return
|
||||
}
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/user/query/doEdit', this.editFormData)
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success(resp.msg)
|
||||
this.editVisible = false
|
||||
await this.doSearch();
|
||||
} else {
|
||||
this.$notify.error(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async lineChange(val) {
|
||||
this.pageForm.selectId = '';
|
||||
const data = this.takePartInLines.find(v => v.id === val)
|
||||
if (!data) {
|
||||
return
|
||||
}
|
||||
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyXghAudit/getLinePlayTimeByLineId', {
|
||||
lineId: data.id,
|
||||
year: this.pageForm.year,
|
||||
signUpMode: 1,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.linePlayTimes = resp.data
|
||||
}
|
||||
},
|
||||
async doOnekeyAudit(flag, adjustment) {
|
||||
let msg = '';
|
||||
if (adjustment && !flag) {
|
||||
msg = '您确定要一键【调整】您所勾选的报名信息吗,调整后该报名信息将不会在审核列表中展示, 是否继续?'
|
||||
} else if (!adjustment && !flag) {
|
||||
msg = '您确定要一键【拒绝】您所勾选的报名信息吗,是否继续?'
|
||||
} else if (!adjustment && flag) {
|
||||
msg = '您确定要一键【通过】您所勾选的报名信息吗,是否继续?'
|
||||
}
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doOnekeyAudit", {
|
||||
ids: JSON.stringify(this.tableSelection),
|
||||
flag: flag,
|
||||
adjustment: adjustment,
|
||||
auditOpinion: this.formData.auditOpinion
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
await this.doSearch()
|
||||
this.dialogVisible = false
|
||||
} else {
|
||||
this.$notify.warning({title: '失败', message: resp.msg});
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
},
|
||||
async openOnekeyAudit() {
|
||||
if (this.tableSelection.length === 0) {
|
||||
this.$notify.warning({title: '警告', message: "请您先在左侧勾选在审核"});
|
||||
return
|
||||
}
|
||||
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.tableSelection = val.map(v => v.id);
|
||||
},
|
||||
ifEdit(row) {
|
||||
const {
|
||||
stateId,
|
||||
selfUnionId,
|
||||
takePartInUnionId
|
||||
} = row
|
||||
if (stateId === 2710 && selfUnionId === "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getUnionId()}") {
|
||||
return true
|
||||
} else if (stateId === 2720 && takePartInUnionId === "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getUnionId()}") {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
ifRecall(row) {
|
||||
const {
|
||||
stateId,
|
||||
selfUnionId,
|
||||
takePartInUnionId
|
||||
} = row
|
||||
// if ((stateId === 2715 || stateId === 2720 || stateId === 2750) && selfUnionId === "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getUnionId()}") {
|
||||
if ((stateId === 2715 || stateId === 2750) && selfUnionId === "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getUnionId()}") {
|
||||
return true
|
||||
} else if ((stateId === 2725 || stateId === 2750) && takePartInUnionId === "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getUnionId()}") {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
async doRecall(row) {
|
||||
const confirm = await this.$confirm('您确定要撤回吗, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doRecall", {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
await this.doSearch()
|
||||
} else {
|
||||
this.$notify.warning({title: '失败', message: resp.msg});
|
||||
}
|
||||
}
|
||||
},
|
||||
async doAudit(flag, adjustment) {
|
||||
let msg = '';
|
||||
if (adjustment && !flag) {
|
||||
msg = '您确定要【调整】该报名信息吗,调整后该报名信息将不会在审核列表中展示, 是否继续?'
|
||||
} else if (!adjustment && !flag) {
|
||||
msg = '您确定要【拒绝】该报名信息吗,是否继续?'
|
||||
} else if (!adjustment && flag) {
|
||||
msg = '您确定要【通过】该报名信息吗,是否继续?'
|
||||
}
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doAudit", {
|
||||
flag: flag,
|
||||
adjustment: adjustment,
|
||||
id: this.formData.id,
|
||||
isTransferIn: this.formData.isTransferIn,
|
||||
auditOpinion: this.formData.auditOpinion
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.$notify.warning({title: '失败', message: resp.msg});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
openLine(row) {
|
||||
this.$refs.guava.public()
|
||||
this.$refs.viewLineInfo.findOne(row.lineId)
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$set(this.formData, "isTransferIn", row.isTransferIn)
|
||||
this.$set(this.formData, "id", row.id)
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.editEnrollInfo.openAudit(row.id, 'audit')
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewEnrollInfo.openView(row.id)
|
||||
},
|
||||
async checkState(type) {
|
||||
this.pageForm.state = type
|
||||
this.$set(this.pageForm, "unionIds", [])
|
||||
this.$set(this.pageForm, "unionId", null)
|
||||
await this.getBmUserUnion()
|
||||
if (type === "1") {
|
||||
this.$set(this.pageForm, "unionId", this.unionId)
|
||||
this.unionDisabled = true
|
||||
} else if (type === "2") {
|
||||
this.unionDisabled = true
|
||||
this.unitDisabled = true
|
||||
} else if (type === "3") {
|
||||
this.unionDisabled = false
|
||||
this.unitDisabled = false
|
||||
|
||||
this.unionOptions = this.unionOptions.filter(v => v.id !== this.unionId)
|
||||
} else {
|
||||
this.unionDisabled = false
|
||||
this.unitDisabled = false
|
||||
}
|
||||
await this.unionChange()
|
||||
await this.doSearch()
|
||||
},
|
||||
async unionChange() {
|
||||
this.pageForm.unitId = null
|
||||
this.unitOptions = await getUnits(this.pageForm.unionId)
|
||||
this.takePartInLines = await this.getXlByUnion()
|
||||
await this.doSearch()
|
||||
},
|
||||
/**
|
||||
* 查询所有报名人员的工会
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getBmUserUnion() {
|
||||
const {data} = await $.post(loc() + "/getBmUserUnion")
|
||||
this.unionOptions = data
|
||||
},
|
||||
async getXlByUnion() {
|
||||
const {data} = await $.post(loc() + "/getXlByUnionAudit", {
|
||||
unionId: this.pageForm.unionId,
|
||||
year: this.pageForm.year,
|
||||
regionalNature: this.pageForm.regionalNature,
|
||||
state: this.pageForm.state
|
||||
})
|
||||
return data
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.states = JSON.stringify(pageForm.states)
|
||||
|
||||
$.post(loc() + "/pageData", pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async getApplyNumAudit() {
|
||||
const {data} = await $.post(loc() + "/getApplyNumAudit", this.pageForm)
|
||||
this.options = [
|
||||
{label: "总人数" + (data.count1 + data.count3) + "人", value: "0"},
|
||||
{label: "本工会人员(自己线路)" + data.count1 + "人", value: "1"},
|
||||
// {label: "本工会人员(其他路线)" + data.count2 + "人", value: "2"},
|
||||
{label: "其他工会人员(选我线路)" + data.count3 + "人", value: "3"}
|
||||
]
|
||||
|
||||
},
|
||||
async clearState() {
|
||||
this.pageForm.state = ''
|
||||
this.pageForm.unionId = ''
|
||||
await this.doSearch()
|
||||
},
|
||||
async doSearch() {
|
||||
this.pageForm.pageNumber = 1;
|
||||
this.pageData();
|
||||
await this.getApplyNumAudit()
|
||||
this.takePartInLines = await this.getXlByUnion()
|
||||
},
|
||||
async getModifyConfig() {
|
||||
const res = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
|
||||
if (res.code === 0) {
|
||||
this.modifyConfig = res.data
|
||||
}
|
||||
},
|
||||
async getUnionSelectLine(disPlayUnionSelectId = null) {
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/user/query/getUnionSelectLine', {
|
||||
startYear: this.pageForm.year,
|
||||
signUpMode: 1,
|
||||
disPlayUnionSelectId: disPlayUnionSelectId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.unionSelectLines = resp.data
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getBmUserUnion()
|
||||
await this.getModifyConfig()
|
||||
this.takePartInLines = await this.getXlByUnion()
|
||||
await this.doSearch()
|
||||
await this.getUnionSelectLine()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,806 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style xmlns="">
|
||||
.query-row {
|
||||
height: 70px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.query-row .el-col {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.query-row:not(:last-child) {
|
||||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||||
}
|
||||
|
||||
.query-row-title {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.el-table-container {
|
||||
padding-top: 0;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>年  度:</span>
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年"
|
||||
style="width: 80%" @change="doSearch">
|
||||
</el-date-picker>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>查询类型:</span>
|
||||
<el-input placeholder="请输入内容" clearable
|
||||
v-model="pageForm.searchKeyword"
|
||||
style="width: 80%" @keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 110px;">
|
||||
<el-option label="姓名" value="userName"></el-option>
|
||||
<el-option label="一卡通号" value="loginName"></el-option>
|
||||
</el-select>
|
||||
<el-button slot="append" @click="doSearch">搜索</el-button>
|
||||
</el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>所属工会:</span>
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会"
|
||||
@change="unionChange"
|
||||
filterable clearable style="width: 80%"
|
||||
:disabled="unionDisabled">
|
||||
<el-option
|
||||
v-for="item in unionOptions"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>所属单位:</span>
|
||||
<el-select v-model="pageForm.unitId" placeholder="请选择所属单位"
|
||||
@change="doSearch"
|
||||
filterable clearable style="width: 80%"
|
||||
:disabled="unitDisabled">
|
||||
<el-option
|
||||
v-for="item in unitOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>旅 行 社:</span>
|
||||
<el-select v-model="pageForm.agencyId" filterable clearable
|
||||
placeholder="请选择旅行社"
|
||||
|
||||
style="width: 80%">
|
||||
<el-option v-for="item in agencyLists"
|
||||
:key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="审核列表" :app="this">
|
||||
<template #label_end>
|
||||
|
||||
</template>
|
||||
|
||||
<template #func>
|
||||
<el-tag :effect="pageForm.state===item.value?'dark':'plain'"
|
||||
:key="item.value"
|
||||
:type="item.label"
|
||||
@click="checkState(item.value)"
|
||||
style="margin-right: 10px;cursor: pointer;font-size: 15px"
|
||||
v-for="item in options">
|
||||
{{ item.label }}
|
||||
</el-tag>
|
||||
<el-link :underline="false" @click="clearState" class="mr10"
|
||||
style="color: red" v-if="options.length&&pageForm.state">清空
|
||||
</el-link>
|
||||
<template v-if="modifyConfig.travelAudit">
|
||||
<el-button type="primary" size="small" class="mr10"
|
||||
@click="openOnekeyAudit">一键审核
|
||||
</el-button>
|
||||
<el-radio-group @change="doSearch()" size="small"
|
||||
v-model="pageForm.isAudit">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%"
|
||||
row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
:selectable="ifEdit"
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='isTransferIn'">
|
||||
<sapn v-if="row.takePartInUnionId!=unionId">转出</sapn>
|
||||
<sapn v-else-if="row.selfUnionId!=unionId">转入</sapn>
|
||||
<sapn v-else>否</sapn>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='isFamily'">
|
||||
<el-link v-if="!row.familyNumber" type="primary" @click="openUser(row)">
|
||||
{{row.isFamily?'携带':'未携带'}}({{row.isFamily}})
|
||||
</el-link>
|
||||
<el-link v-else type="primary">
|
||||
{{row.familyNumber?'携带':'未携带'}}({{row.familyNumber}})
|
||||
</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='num'">
|
||||
{{1+row.num}}
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='stateId'">
|
||||
<span v-if="row.stateId">
|
||||
<vi-table-state :state="row"></vi-table-state>
|
||||
</span>
|
||||
<sapn v-else style="color: #67C23A">暂无</sapn>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="180px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<template v-if="modifyConfig.travelAudit">
|
||||
<el-dropdown-item v-if="ifRecall(row)" :command="{type:'recall',data:row}">
|
||||
撤回
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="ifEdit(row)" :command="{type:'handle',data:row}">
|
||||
审核
|
||||
</el-dropdown-item>
|
||||
|
||||
<template v-if="[2750].includes(row.stateId)">
|
||||
<el-dropdown-item :command="{type:'modify',data:row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',data:row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</template>
|
||||
</template>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<enroll-info ref="viewEnrollInfo" :union_id="unionId"></enroll-info>
|
||||
</template>
|
||||
|
||||
<template #public>
|
||||
<line-info ref="viewLineInfo"></line-info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<enroll-info ref="editEnrollInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="审核" name="audit">
|
||||
<el-form :model="formData" label-width="130px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="auditTime">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核意见" prop="auditOpinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
|
||||
type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin: 40px 0;text-align: right">
|
||||
<el-button @click="$refs.guava.index()">返回
|
||||
</el-button>
|
||||
<el-button @click="doAudit(false,true)" type="warning">调整
|
||||
</el-button>
|
||||
<el-button @click="doAudit(false,false)" type="danger">拒绝
|
||||
</el-button>
|
||||
<el-button @click="doAudit(true,false)" type="primary">通过
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</enroll-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
width="50%">
|
||||
|
||||
<el-form :model="formData" label-width="130px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="auditTime">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核意见" prop="auditOpinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">返 回</el-button>
|
||||
<el-button @click="doOnekeyAudit(false,true)" type="warning">调 整</el-button>
|
||||
<el-button @click="doOnekeyAudit(false,false)" type="danger">拒 绝</el-button>
|
||||
<el-button type="primary" @click="doOnekeyAudit(true,false)">通 过</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="修改信息"
|
||||
:visible.sync="editVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="50%">
|
||||
<el-form :model="editFormData" label-width="120px" :rules="rules" ref="editForm" style="margin-right: 40px">
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="loginName" label="工号">
|
||||
<el-input v-model="editFormData.loginName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="userName" label="姓名">
|
||||
<el-input v-model="editFormData.userName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="userName" label="手机号">
|
||||
<el-input v-model="editFormData.mobile" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="userName" label="身份证号">
|
||||
<el-input v-model="editFormData.idCard" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="unionName" label="工会">
|
||||
<el-input v-model="editFormData.unionName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="unitName" label="单位">
|
||||
<el-input v-model="editFormData.unitName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-form-item prop="prop" :label="labelName">
|
||||
<template v-if="modifyConfig.familyInfo == 2">
|
||||
<el-collapse v-model="activeNames">
|
||||
<el-collapse-item title="点击可展开详细信息" name="1">
|
||||
<el-card shadow="never">
|
||||
<el-table :data="editFormData.companionList">
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="身份证号" prop="idCard" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="年龄" prop="age"></el-table-column>
|
||||
<el-table-column label="床型" prop="bedType">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo.bedType }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="床位" prop="bedNum">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo.bedNum }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="意向拼床人" prop="otherSleepUser">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo.otherSleepUser ?
|
||||
row.bedInfo.otherSleepUser : '暂无' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="关系" prop="relation"></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-input v-model="editFormData.bedType" readonly></el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="travelName" label="旅行社">
|
||||
<el-select v-model="editFormData.agencyId" filterable clearable
|
||||
placeholder="请选择旅行社"
|
||||
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in agencyLists"
|
||||
:key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="editVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doEdit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
unionDisabled: false,
|
||||
unitDisabled: false,
|
||||
unionId: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getUnionId()}",
|
||||
dialogVisible: false,
|
||||
tableSelection: [],
|
||||
formData: {
|
||||
id: "",
|
||||
username: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('username')}",
|
||||
loginName: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('loginname')}",
|
||||
auditTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
auditOpinion: "",
|
||||
isTransferIn: false,
|
||||
},
|
||||
options: [
|
||||
{label: "总人数", value: "0"},
|
||||
],
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
takePartInLines: [],
|
||||
pageForm: {
|
||||
lotId: '',
|
||||
regionalNature: '',
|
||||
isAudit: "",
|
||||
state: "",
|
||||
year: moment().format('YYYY'),
|
||||
searchName: "userName",
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'loginName', label: '一卡通号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'unitName', label: '单位', sortable: true},
|
||||
{prop: 'unionName', label: '工会', sortable: true},
|
||||
{prop: 'travelAgencyName', label: '旅行社', sortable: true},
|
||||
{prop: 'isFamily', label: '是否携带家属'},
|
||||
{prop: 'stateId', label: '审核状态', sortable: true},
|
||||
],
|
||||
modifyConfig: {},
|
||||
editVisible: false,
|
||||
editFormData: {
|
||||
companionList: []
|
||||
},
|
||||
rules: {
|
||||
loginName: [{required: true, message: '请填写工号', trigger: ['blur', 'change']}],
|
||||
userName: [{required: true, message: '请填写姓名', trigger: ['blur', 'change']}],
|
||||
unionName: [{required: true, message: '请选择工会', trigger: ['blur', 'change']}],
|
||||
unitName: [{required: true, message: '请选择单位', trigger: ['blur', 'change']}],
|
||||
travelName: [{required: true, message: '请选择旅行社', trigger: ['blur', 'change']}],
|
||||
specificTime: [{required: true, message: '请选择出行时间', trigger: ['blur', 'change']}],
|
||||
},
|
||||
editSpecificTimes: [],
|
||||
labelName: '',
|
||||
unionSelectLines: [],
|
||||
lineLabelName: '',
|
||||
activeNames:[],
|
||||
agencyLists: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'enroll-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/Enrollinfo.vue?v=1.0.1'),
|
||||
'line-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
methods: {
|
||||
async getAgencyList() {
|
||||
const {data} = await $.post("/platform/staffTherapyRecuperation/travelAgency/selectTravelAgencyByYears", {
|
||||
startYear: this.pageForm.startYear,
|
||||
endYear: this.pageForm.endYear
|
||||
})
|
||||
this.agencyLists = data
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type === 'view') {
|
||||
this.openView(data)
|
||||
} else if (type === 'recall') {
|
||||
this.doRecall(data)
|
||||
} else if (type === 'handle') {
|
||||
this.openEdit(data)
|
||||
} else if (type === 'modify') {
|
||||
this.openModify(data)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(data)
|
||||
}
|
||||
},
|
||||
async doDelete(row) {
|
||||
this.$confirm("您确定要删除【<span style='color: red'>" + row.userName + "</span>】的此条报名信息吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
dangerouslyUseHTMLString: true,
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" === a) {//确认后再执行
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/doDeleteMyEnrollInfoById/' + row.id)
|
||||
if (resp.code === 0) {
|
||||
await this.doSearch()
|
||||
this.$message.success('删除成功')
|
||||
await this.getApplyNumAudit();
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async openModify(row) {
|
||||
this.editFormData = {};
|
||||
const resp = await $.get("/platform/staffTherapyRecuperation/TheRapyAudit/findOne", {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.editFormData = {...resp.data.viewData}
|
||||
if (this.modifyConfig.familyInfo == 2) {
|
||||
this.editFormData.companionList = resp.data.viewData.companionList
|
||||
this.labelName = "家属信息"
|
||||
} else {
|
||||
this.editFormData.bedType = resp.data.viewData.familyNumber
|
||||
this.labelName = "家属数量"
|
||||
}
|
||||
}
|
||||
if (row.takePartInBaseManagementId) {
|
||||
this.editSpecificTime(row.takePartInBaseManagementId);
|
||||
this.lineLabelName = "酒店"
|
||||
} else if (row.takePartInLineId) {
|
||||
this.lineLabelName = '线路'
|
||||
}
|
||||
this.editVisible = true
|
||||
},
|
||||
async doEdit() {
|
||||
this.$refs['editForm'].validate().then(async () => {
|
||||
const confirm = await this.$confirm('您确定要修改这位老师的报名信息吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
if (!this.editFormData.takePartInLineId && !this.editFormData.takePartInBaseManagementId) {
|
||||
this.$message.warning('请选择线路')
|
||||
return
|
||||
}
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/user/query/doEdit', this.editFormData)
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success(resp.msg)
|
||||
this.editVisible = false
|
||||
await this.doSearch();
|
||||
} else {
|
||||
this.$notify.error(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async doOnekeyAudit(flag, adjustment) {
|
||||
let msg = '';
|
||||
if (adjustment && !flag) {
|
||||
msg = '您确定要一键【调整】您所勾选的报名信息吗,调整后该报名信息将不会在审核列表中展示, 是否继续?'
|
||||
} else if (!adjustment && !flag) {
|
||||
msg = '您确定要一键【拒绝】您所勾选的报名信息吗,是否继续?'
|
||||
} else if (!adjustment && flag) {
|
||||
msg = '您确定要一键【通过】您所勾选的报名信息吗,是否继续?'
|
||||
}
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doOnekeyAudit", {
|
||||
ids: JSON.stringify(this.tableSelection),
|
||||
flag: flag,
|
||||
adjustment: adjustment,
|
||||
auditOpinion: this.formData.auditOpinion
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
await this.doSearch()
|
||||
this.dialogVisible = false
|
||||
} else {
|
||||
this.$notify.warning({title: '失败', message: resp.msg});
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
},
|
||||
async openOnekeyAudit() {
|
||||
if (this.tableSelection.length === 0) {
|
||||
this.$notify.warning({title: '警告', message: "请您先在左侧勾选在审核"});
|
||||
return
|
||||
}
|
||||
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.tableSelection = val.map(v => v.id);
|
||||
},
|
||||
ifEdit(row) {
|
||||
const {
|
||||
stateId,
|
||||
selfUnionId,
|
||||
takePartInUnionId
|
||||
} = row
|
||||
if (stateId === 2710 && selfUnionId === "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getUnionId()}") {
|
||||
return true
|
||||
} else if (stateId === 2720 && takePartInUnionId === "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getUnionId()}") {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
ifRecall(row) {
|
||||
const {
|
||||
stateId,
|
||||
selfUnionId,
|
||||
takePartInUnionId
|
||||
} = row
|
||||
// if ((stateId === 2715 || stateId === 2720 || stateId === 2750) && selfUnionId === "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getUnionId()}") {
|
||||
if ((stateId === 2715 || stateId === 2750) && selfUnionId === "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getUnionId()}") {
|
||||
return true
|
||||
} else if ((stateId === 2725 || stateId === 2750) && takePartInUnionId === "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getUnionId()}") {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
async doRecall(row) {
|
||||
const confirm = await this.$confirm('您确定要撤回吗, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doRecall", {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
await this.doSearch()
|
||||
} else {
|
||||
this.$notify.warning({title: '失败', message: resp.msg});
|
||||
}
|
||||
}
|
||||
},
|
||||
async doAudit(flag, adjustment) {
|
||||
let msg = '';
|
||||
if (adjustment && !flag) {
|
||||
msg = '您确定要【调整】该报名信息吗,调整后该报名信息将不会在审核列表中展示, 是否继续?'
|
||||
} else if (!adjustment && !flag) {
|
||||
msg = '您确定要【拒绝】该报名信息吗,是否继续?'
|
||||
} else if (!adjustment && flag) {
|
||||
msg = '您确定要【通过】该报名信息吗,是否继续?'
|
||||
}
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doAudit", {
|
||||
flag: flag,
|
||||
adjustment: adjustment,
|
||||
id: this.formData.id,
|
||||
isTransferIn: this.formData.isTransferIn,
|
||||
auditOpinion: this.formData.auditOpinion
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.$notify.warning({title: '失败', message: resp.msg});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$set(this.formData, "isTransferIn", row.isTransferIn)
|
||||
this.$set(this.formData, "id", row.id)
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.editEnrollInfo.openAudit(row.id, 'audit')
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewEnrollInfo.openView(row.id)
|
||||
},
|
||||
async checkState(type) {
|
||||
this.pageForm.state = type
|
||||
this.$set(this.pageForm, "unionIds", [])
|
||||
this.$set(this.pageForm, "unionId", null)
|
||||
await this.getBmUserUnion()
|
||||
if (type === "1") {
|
||||
this.$set(this.pageForm, "unionId", this.unionId)
|
||||
this.unionDisabled = true
|
||||
} else if (type === "2") {
|
||||
this.unionDisabled = true
|
||||
this.unitDisabled = true
|
||||
} else if (type === "3") {
|
||||
this.unionDisabled = false
|
||||
this.unitDisabled = false
|
||||
|
||||
this.unionOptions = this.unionOptions.filter(v => v.id !== this.unionId)
|
||||
} else {
|
||||
this.unionDisabled = false
|
||||
this.unitDisabled = false
|
||||
}
|
||||
await this.unionChange()
|
||||
await this.doSearch()
|
||||
},
|
||||
async unionChange() {
|
||||
this.pageForm.unitId = null
|
||||
this.unitOptions = await getUnits(this.pageForm.unionId)
|
||||
await this.doSearch()
|
||||
},
|
||||
/**
|
||||
* 查询所有报名人员的工会
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getBmUserUnion() {
|
||||
const {data} = await $.post(loc() + "/getBmUserUnion")
|
||||
this.unionOptions = data
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.states = JSON.stringify(pageForm.states)
|
||||
|
||||
$.post(loc() + "/pageData", pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async getApplyNumAudit() {
|
||||
const {data} = await $.post(loc() + "/getApplyNumAudit", this.pageForm)
|
||||
this.options = [
|
||||
{label: "总人数" + (data.count1) + "人", value: "0"},
|
||||
]
|
||||
|
||||
},
|
||||
async clearState() {
|
||||
this.pageForm.state = ''
|
||||
this.pageForm.unionId = ''
|
||||
await this.doSearch()
|
||||
},
|
||||
async doSearch() {
|
||||
this.pageForm.pageNumber = 1;
|
||||
this.pageData();
|
||||
await this.getApplyNumAudit()
|
||||
},
|
||||
async getModifyConfig() {
|
||||
const res = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
|
||||
if (res.code === 0) {
|
||||
this.modifyConfig = res.data
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getBmUserUnion()
|
||||
await this.getAgencyList()
|
||||
await this.getModifyConfig()
|
||||
await this.doSearch()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,974 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style xmlns="">
|
||||
.query-row {
|
||||
height: 70px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.query-row .el-col {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.query-row:not(:last-child) {
|
||||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||||
}
|
||||
|
||||
.query-row-title {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.el-table-container {
|
||||
padding-top: 0;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>年  度:</span>
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年"
|
||||
style="width: 80%" @change="getLineSignNumber(); doSearch()">
|
||||
</el-date-picker>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>查询类型:</span>
|
||||
<el-input placeholder="请输入内容" clearable
|
||||
v-model="pageForm.searchKeyword"
|
||||
style="width: 80%" @keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 110px;">
|
||||
<el-option label="姓名" value="userName"></el-option>
|
||||
<el-option label="一卡通号" value="loginName"></el-option>
|
||||
</el-select>
|
||||
<el-button slot="append" @click="doSearch">搜索</el-button>
|
||||
</el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row align="middle" class="query-row" type="flex">-->
|
||||
<!-- <el-col class="query-row-title"></el-col>-->
|
||||
<!-- <el-col class="query-row-content">-->
|
||||
<!-- <span>报名路线:</span>-->
|
||||
<!-- <el-tag :effect="pageForm.state===item.value?'dark':'plain'"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :type="item.label"-->
|
||||
<!-- @click="checkState(item.value)"-->
|
||||
<!-- style="margin-right: 10px;cursor: pointer;margin-bottom: 5px;font-size: 15px"-->
|
||||
<!-- v-for="item in options">-->
|
||||
<!-- {{ item.label }}-->
|
||||
<!-- </el-tag>-->
|
||||
<!-- <el-link :underline="false" @click="pageForm.state='';doSearch()"-->
|
||||
<!-- style="color: red" v-if="options.length&&pageForm.state">清空-->
|
||||
<!-- </el-link>-->
|
||||
<!-- <span style="color: red;font-size: 12px;margin-left: 10px">温馨提示:其他工会选我线路,所在工会审核过后,才显示数量</span>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>所属工会:</span>
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会"
|
||||
@change="unionChange"
|
||||
filterable clearable style="width: 80%"
|
||||
:disabled="unionDisabled">
|
||||
<el-option
|
||||
v-for="item in unionOptions"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>所属单位:</span>
|
||||
<el-select v-model="pageForm.unitId" placeholder="请选择所属单位"
|
||||
@change="doSearch"
|
||||
filterable clearable style="width: 80%"
|
||||
:disabled="unitDisabled">
|
||||
<el-option
|
||||
v-for="item in unitOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>路线类型:</span>
|
||||
<el-select v-model="pageForm.regionalNature" filterable
|
||||
placeholder="请选择线路"
|
||||
style="width: 80%"
|
||||
@change="doSearch();pageForm.takePartInLineId=''">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="省内" value="省内"></el-option>
|
||||
<el-option label="省外" value="省外"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<span>选择路线:</span>
|
||||
<el-select v-model="pageForm.takePartInLineId" filterable clearable
|
||||
placeholder="请选择线路"
|
||||
style="width: 80%" @change="lineChange">
|
||||
<el-option v-for="item in takePartInLines"
|
||||
:key="item.id"
|
||||
:label="item.lineName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>标  段:</span>
|
||||
<el-select v-model="pageForm.lotId" filterable clearable
|
||||
placeholder="请选择标段"
|
||||
style="width: 80%" @change="doSearch()">
|
||||
<el-option v-for="item in modifyConfig.lots"
|
||||
:key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<span>出行时间:</span>
|
||||
<el-select v-model="pageForm.selectId" filterable clearable
|
||||
placeholder="请选择出行时间"
|
||||
style="width: 80%" @change="playChange">
|
||||
<el-option v-for="item in linePlayTimes"
|
||||
:key="item.times"
|
||||
:label="item.times"
|
||||
:value="item.selectId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="审核列表" :app="this">
|
||||
<template #label_end>
|
||||
|
||||
</template>
|
||||
|
||||
<template #func
|
||||
v-if="!pageForm.regionalNature||
|
||||
(pageForm.regionalNature==='省内'&&modifyConfig.isSnLine)||
|
||||
(pageForm.regionalNature==='省外'&&modifyConfig.isSwLine)">
|
||||
|
||||
<el-button size="small"
|
||||
style="background-color: #fff;border-color: #b3d8ff;color: #1867b0;font-size: 15px"
|
||||
>{{selectLine.lineName?selectLine.lineName:'全部'}}线路的人数:{{lineSignNumber}}人
|
||||
</el-button>
|
||||
|
||||
<!-- <span v-if="pageForm.takePartInLineId" style="margin-left: 10px">-->
|
||||
<!-- {{selectLine.lineName}}线路的报名人数:{{lineSignNumber}}-->
|
||||
<!-- </span>-->
|
||||
|
||||
<el-button type="primary" size="small" class="mr10"
|
||||
@click="openOnekeyAudit">一键审核
|
||||
</el-button>
|
||||
<el-radio-group @change="doSearch()" size="small"
|
||||
v-model="pageForm.isAudit">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%"
|
||||
row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
:selectable="ifEdit"
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='isTransferIn'">
|
||||
<sapn v-if="row.takePartInUnionId!=unionId">转出</sapn>
|
||||
<sapn v-else-if="row.selfUnionId!=unionId">转入</sapn>
|
||||
<sapn v-else>否</sapn>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='lineName'">
|
||||
<el-link type="primary" @click="openLine(row)">{{row.lineName}}
|
||||
</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='isFamily'">
|
||||
<el-link v-if="!row.familyNumber" type="primary" @click="openView(row)">
|
||||
{{row.isFamily?'携带':'未携带'}}({{row.isFamily}})
|
||||
</el-link>
|
||||
<el-link v-else type="primary">
|
||||
{{row.familyNumber?'携带':'未携带'}}({{row.familyNumber}})
|
||||
</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='num'">
|
||||
{{1+row.num}}
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='stateId'">
|
||||
<span v-if="row.stateId">
|
||||
<vi-table-state :state="row"></vi-table-state>
|
||||
</span>
|
||||
<sapn v-else style="color: #67C23A">暂无</sapn>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="180px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<template v-if="!pageForm.regionalNature
|
||||
||(pageForm.regionalNature==='省内'&&modifyConfig.isSnLine)
|
||||
||(pageForm.regionalNature==='省外'&&modifyConfig.isSwLine)">
|
||||
<el-dropdown-item v-if="ifRecall(row)" :command="{type:'recall',data:row}">
|
||||
撤回
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="ifEdit(row)" :command="{type:'handle',data:row}">
|
||||
审核
|
||||
</el-dropdown-item>
|
||||
|
||||
<template v-if="[2750].includes(row.stateId)">
|
||||
<el-dropdown-item :command="{type:'modify',data:row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',data:row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</template>
|
||||
</template>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
|
||||
<!--<el-button @click="openView(row)" size="mini" type="primary">查看
|
||||
</el-button>
|
||||
<template v-if="!pageForm.regionalNature||
|
||||
(pageForm.regionalNature==='省内'&&modifyConfig.isSnLine)||
|
||||
(pageForm.regionalNature==='省外'&&modifyConfig.isSwLine)">
|
||||
<el-button @click="doRecall(row)" size="mini" type="danger"
|
||||
v-if="ifRecall(row)">撤回
|
||||
</el-button>
|
||||
<el-button v-if="ifEdit(row)" @click="openEdit(row)" size="mini"
|
||||
type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
</template>-->
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<enroll-info ref="viewEnrollInfo" :union_id="unionId"></enroll-info>
|
||||
</template>
|
||||
|
||||
<template #public>
|
||||
<line-info ref="viewLineInfo"></line-info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<enroll-info ref="editEnrollInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="审核" name="audit">
|
||||
<el-form :model="formData" label-width="130px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="auditTime">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核意见" prop="auditOpinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
|
||||
type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin: 40px 0;text-align: right">
|
||||
<el-button @click="$refs.guava.index()">返回
|
||||
</el-button>
|
||||
<!--<el-button @click="doAudit(false,true)" type="warning">调整
|
||||
</el-button>-->
|
||||
<el-button @click="doAudit(false,false)" type="danger">拒绝
|
||||
</el-button>
|
||||
<el-button @click="doAudit(true,false)" type="primary">通过
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</enroll-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
width="50%">
|
||||
|
||||
<el-form :model="formData" label-width="130px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="auditTime">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核意见" prop="auditOpinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">返 回</el-button>
|
||||
<el-button @click="doOnekeyAudit(false,true)" type="warning">调 整</el-button>
|
||||
<el-button @click="doOnekeyAudit(false,false)" type="danger">拒 绝</el-button>
|
||||
<el-button type="primary" @click="doOnekeyAudit(true,false)">通 过</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="修改信息"
|
||||
:visible.sync="editVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="50%">
|
||||
<el-form :model="editFormData" label-width="120px" :rules="rules" ref="editForm" style="margin-right: 40px">
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="loginName" label="工号">
|
||||
<el-input v-model="editFormData.loginName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="userName" label="姓名">
|
||||
<el-input v-model="editFormData.userName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="userName" label="手机号">
|
||||
<el-input v-model="editFormData.mobile" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="userName" label="身份证号">
|
||||
<el-input v-model="editFormData.idCard" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="unionName" label="工会">
|
||||
<el-input v-model="editFormData.unionName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="unitName" label="单位">
|
||||
<el-input v-model="editFormData.unitName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="prop" :label="labelName">
|
||||
<template v-if="modifyConfig.familyInfo == 2">
|
||||
<el-collapse v-model="activeNames">
|
||||
<el-collapse-item title="点击可展开详细信息" name="1">
|
||||
<el-card shadow="never">
|
||||
<el-table :data="editFormData.companionList">
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="身份证号" prop="idCard" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="年龄" prop="age"></el-table-column>
|
||||
<el-table-column label="床型" prop="bedType">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo?.bedType }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="床位" prop="bedNum">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo?.bedNum }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="意向拼床人" prop="otherSleepUser">
|
||||
<template scope="{row}">
|
||||
{{ row.bedInfo?.otherSleepUser ?
|
||||
row.bedInfo?.otherSleepUser : '暂无' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="关系" prop="relation"></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-input v-model="editFormData.bedType" readonly></el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<!--<el-form-item prop="travelName" label="旅行社">
|
||||
<el-select v-model="editFormData.agencyId" filterable clearable
|
||||
placeholder="请选择旅行社"
|
||||
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in agencyLists"
|
||||
:key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<el-form-item prop="travelLine" :label="lineLabelName">
|
||||
<el-select v-model="editFormData.takePartInLineId" filterable clearable
|
||||
placeholder="请选择线路"
|
||||
@change="validateLine"
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in unionSelectLines"
|
||||
:key="item.id"
|
||||
:label="item.lineName + '-' + item.regionalNature + '【' + item.lotName + '】' + '(' + item.playStartTime + '至' + item.playEndTime + ')' + '(' + item.signUpMode + ')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="specificTime" label="出行时间" v-if="pageForm.state==='3'">
|
||||
<el-select v-model="editFormData.specificTime" filterable clearable
|
||||
placeholder="请选择出行时间"
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in editSpecificTimes"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="editVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doEdit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
unionDisabled: false,
|
||||
unitDisabled: false,
|
||||
unionId: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getUnionId()}",
|
||||
dialogVisible: false,
|
||||
tableSelection: [],
|
||||
formData: {
|
||||
id: "",
|
||||
username: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('username')}",
|
||||
loginName: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('loginname')}",
|
||||
auditTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
auditOpinion: "",
|
||||
isTransferIn: false,
|
||||
},
|
||||
options: [
|
||||
{label: "本工会人员(自己线路)", value: "1"},
|
||||
{label: "本工会人员(其他路线)", value: "2"},
|
||||
{label: "其他工会人员(选我线路)", value: "3"}
|
||||
],
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
takePartInLines: [],
|
||||
pageForm: {
|
||||
lotId: '',
|
||||
regionalNature: '',
|
||||
isAudit: "",
|
||||
state: "",
|
||||
year: moment().format('YYYY'),
|
||||
searchName: "userName",
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'loginName', label: '一卡通号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'unitName', label: '单位', sortable: true},
|
||||
{prop: 'unionName', label: '工会', sortable: true},
|
||||
{prop: 'lineName', label: '线路', sortable: true},
|
||||
{prop: 'regionalNature', label: '线路类型', sortable: true},
|
||||
// {prop: 'userNature', label: '人员性质'},
|
||||
{prop: 'isFamily', label: '是否携带家属'},
|
||||
// {prop: 'num', label: '人数'},
|
||||
// {prop: 'isTransferIn', label: '是否转入转出', sortable: true},
|
||||
{prop: 'linePlayTime', label: '出行时间', sortable: true},
|
||||
{prop: 'stateId', label: '审核状态', sortable: true},
|
||||
],
|
||||
modifyConfig: {},
|
||||
selectLine: {
|
||||
lineName: '全部'
|
||||
},
|
||||
lineSignNumber: 0,
|
||||
|
||||
times: null,
|
||||
linePlayTimes: [],
|
||||
|
||||
editVisible: false,
|
||||
editFormData: {},
|
||||
rules: {
|
||||
loginName: [{required: true, message: '请填写工号', trigger: ['blur', 'change']}],
|
||||
userName: [{required: true, message: '请填写姓名', trigger: ['blur', 'change']}],
|
||||
unionName: [{required: true, message: '请选择工会', trigger: ['blur', 'change']}],
|
||||
unitName: [{required: true, message: '请选择单位', trigger: ['blur', 'change']}],
|
||||
// travelName: [{required: true, message: '请选择旅行社', trigger: ['blur', 'change']}],
|
||||
specificTime: [{required: true, message: '请选择出行时间', trigger: ['blur', 'change']}],
|
||||
// travelLine: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
editSpecificTimes: [],
|
||||
labelName: '',
|
||||
unionSelectLines: [],
|
||||
lineLabelName: '',
|
||||
activeNames:[]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'enroll-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/XghEnrollInfo.vue'),
|
||||
'line-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/LineInfo.vue')
|
||||
|
||||
},
|
||||
methods: {
|
||||
async validateLine() {
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/validSignUpInfo'
|
||||
, {enroll: JSON.stringify(this.editFormData)})
|
||||
if (resp.code !== 0) {
|
||||
this.$message.warning(resp.msg)
|
||||
this.editFormData.takePartInLineId = ''
|
||||
}
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type === 'view') {
|
||||
this.openView(data)
|
||||
} else if (type === 'recall') {
|
||||
this.doRecall(data)
|
||||
} else if (type === 'handle') {
|
||||
this.openEdit(data)
|
||||
} else if (type === 'modify') {
|
||||
this.openModify(data)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(data)
|
||||
}
|
||||
},
|
||||
async doDelete(row){
|
||||
this.$confirm("您确定要删除【<span style='color: red'>" + row.userName + "</span>】的此条报名信息吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
dangerouslyUseHTMLString: true,
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" === a) {//确认后再执行
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/doDeleteMyEnrollInfoById/' + row.id)
|
||||
if (resp.code === 0) {
|
||||
await this.doSearch()
|
||||
this.$message.success('删除成功')
|
||||
await this.getLineSignNumber();
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async openModify(row) {
|
||||
this.getUnionSelectLine(row.takePartInLineId)
|
||||
this.editFormData = {};
|
||||
const resp = await $.get("/platform/staffTherapyRecuperation/TheRapyAudit/findOne", {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.editFormData = {...resp.data.viewData}
|
||||
if (this.modifyConfig.familyInfo == 2) {
|
||||
this.editFormData.companionList = resp.data.viewData.companionList
|
||||
this.labelName = "家属信息"
|
||||
} else {
|
||||
this.editFormData.bedType = resp.data.viewData.familyNumber
|
||||
this.labelName = "家属数量"
|
||||
}
|
||||
}
|
||||
if (row.takePartInBaseManagementId) {
|
||||
this.editSpecificTime(row.takePartInBaseManagementId);
|
||||
this.lineLabelName = "酒店"
|
||||
} else if (row.takePartInLineId) {
|
||||
this.lineLabelName = '线路'
|
||||
}
|
||||
this.editVisible = true
|
||||
},
|
||||
async doEdit() {
|
||||
this.$refs['editForm'].validate().then(async () => {
|
||||
const confirm = await this.$confirm('您确定要修改这位老师的报名信息吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
if (!this.editFormData.takePartInLineId && !this.editFormData.takePartInBaseManagementId){
|
||||
this.$message.warning('请选择线路')
|
||||
return
|
||||
}
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/user/query/doEdit', this.editFormData)
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success(resp.msg)
|
||||
this.editVisible = false
|
||||
await this.doSearch();
|
||||
await this.getLineSignNumber();
|
||||
} else {
|
||||
this.$notify.error(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async lineChange(val) {
|
||||
console.log(val)
|
||||
this.pageForm.selectId = ''
|
||||
if (val) {
|
||||
this.selectLine = this.takePartInLines.find(o => o.id === val)
|
||||
await this.getLinePlayTimeByLineId(val);
|
||||
} else {
|
||||
this.selectLine.lineName = ''
|
||||
}
|
||||
await this.getLineSignNumber()
|
||||
await this.doSearch()
|
||||
},
|
||||
async playChange() {
|
||||
await this.getLineSignNumber()
|
||||
await this.doSearch()
|
||||
},
|
||||
async getLinePlayTimeByLineId(id) {
|
||||
const resp = await $.get(loc() + '/getLinePlayTimeByLineId', {
|
||||
lineId: id,
|
||||
year: this.pageForm.year,
|
||||
signUpMode: 2,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.linePlayTimes = resp.data
|
||||
}
|
||||
},
|
||||
async getLineSignNumber() {
|
||||
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyXghAudit/getLineNumber', this.pageForm)
|
||||
this.lineSignNumber = resp.data
|
||||
},
|
||||
async doOnekeyAudit(flag, adjustment) {
|
||||
let msg = '';
|
||||
if (adjustment && !flag) {
|
||||
msg = '您确定要一键【调整】您所勾选的报名信息吗,调整后该报名信息将不会在审核列表中展示, 是否继续?'
|
||||
} else if (!adjustment && !flag) {
|
||||
msg = '您确定要一键【拒绝】您所勾选的报名信息吗,是否继续?'
|
||||
} else if (!adjustment && flag) {
|
||||
msg = '您确定要一键【通过】您所勾选的报名信息吗,是否继续?'
|
||||
}
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doOnekeyAudit", {
|
||||
ids: JSON.stringify(this.tableSelection),
|
||||
flag: flag,
|
||||
adjustment: adjustment,
|
||||
auditOpinion: this.formData.auditOpinion
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
await this.doSearch()
|
||||
this.dialogVisible = false
|
||||
} else {
|
||||
this.$notify.warning({title: '失败', message: resp.msg});
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
},
|
||||
async openOnekeyAudit() {
|
||||
if (this.tableSelection.length === 0) {
|
||||
this.$notify.warning({title: '警告', message: "请您先在左侧勾选在审核"});
|
||||
return
|
||||
}
|
||||
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.tableSelection = val.map(v => v.id);
|
||||
},
|
||||
ifEdit(row) {
|
||||
const {
|
||||
stateId,
|
||||
} = row
|
||||
if (stateId === 2730) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
ifRecall(row) {
|
||||
const {
|
||||
stateId,
|
||||
} = row
|
||||
if (stateId === 2750) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
async doRecall(row) {
|
||||
const confirm = await this.$confirm('您确定要撤回吗, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doRecall", {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
await this.doSearch()
|
||||
} else {
|
||||
this.$notify.warning({title: '失败', message: resp.msg});
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
async doAudit(flag, adjustment) {
|
||||
let msg = '';
|
||||
if (adjustment && !flag) {
|
||||
msg = '您确定要【调整】该报名信息吗,调整后该报名信息将不会在审核列表中展示, 是否继续?'
|
||||
} else if (!adjustment && !flag) {
|
||||
msg = '您确定要【拒绝】该报名信息吗,是否继续?'
|
||||
} else if (!adjustment && flag) {
|
||||
msg = '您确定要【通过】该报名信息吗,是否继续?'
|
||||
}
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doAudit", {
|
||||
flag: flag,
|
||||
adjustment: adjustment,
|
||||
id: this.formData.id,
|
||||
isTransferIn: this.formData.isTransferIn,
|
||||
auditOpinion: this.formData.auditOpinion
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
await this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.$notify.warning({title: '失败', message: resp.msg});
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
openLine(row) {
|
||||
this.$refs.guava.public()
|
||||
this.$refs.viewLineInfo.findOne(row.lineId)
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$set(this.formData, "isTransferIn", row.isTransferIn)
|
||||
this.$set(this.formData, "id", row.id)
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.editEnrollInfo.openAudit(row.id, 'audit')
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewEnrollInfo.openView(row.id)
|
||||
},
|
||||
async checkState(type) {
|
||||
this.pageForm.state = type
|
||||
this.$set(this.pageForm, "unionIds", [])
|
||||
this.$set(this.pageForm, "unionId", null)
|
||||
await this.getBmUserUnion()
|
||||
if (type === "1") {
|
||||
this.$set(this.pageForm, "unionId", this.unionId)
|
||||
this.unionDisabled = true
|
||||
} else if (type === "2") {
|
||||
this.unionDisabled = true
|
||||
this.unitDisabled = true
|
||||
} else if (type === "3") {
|
||||
this.unionDisabled = false
|
||||
this.unitDisabled = false
|
||||
|
||||
this.unionOptions = this.unionOptions.filter(v => v.id !== this.unionId)
|
||||
} else {
|
||||
this.unionDisabled = false
|
||||
this.unitDisabled = false
|
||||
}
|
||||
await this.unionChange()
|
||||
await this.doSearch()
|
||||
},
|
||||
async unionChange() {
|
||||
this.pageForm.unitId = null
|
||||
this.unitOptions = await getUnits(this.pageForm.unionId)
|
||||
this.takePartInLines = await this.getXlByUnion()
|
||||
await this.doSearch()
|
||||
},
|
||||
/**
|
||||
* 查询所有报名人员的工会
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getBmUserUnion() {
|
||||
const {data} = await $.post("/platform/staffTherapyRecuperation/TheRapyAudit/getBmUserUnion")
|
||||
this.unionOptions = data
|
||||
},
|
||||
async getXlByUnion() {
|
||||
const {data} = await $.post(loc() + "/getXghLine", {
|
||||
unionId: this.pageForm.unionId,
|
||||
year: this.pageForm.year,
|
||||
regionalNature: this.pageForm.regionalNature,
|
||||
state: this.pageForm.state
|
||||
})
|
||||
return data
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.states = JSON.stringify(pageForm.states)
|
||||
|
||||
$.post(loc() + "/pageData", pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
// async getApplyNumAudit() {
|
||||
// const {data} = await $.post(loc() + "/getApplyNumAudit", this.pageForm)
|
||||
// this.options = [
|
||||
// {label: "本工会人员(自己线路)" + data.count1 + "人", value: "1"},
|
||||
// {label: "本工会人员(其他路线)" + data.count2 + "人", value: "2"},
|
||||
// {label: "其他工会人员(选我线路)" + data.count3 + "人", value: "3"}
|
||||
// ]
|
||||
// },
|
||||
async doSearch() {
|
||||
this.pageForm.pageNumber = 1;
|
||||
this.pageData();
|
||||
//await this.getApplyNumAudit()
|
||||
this.takePartInLines = await this.getXlByUnion()
|
||||
},
|
||||
async getModifyConfig() {
|
||||
const res = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
|
||||
if (res.code === 0) {
|
||||
this.modifyConfig = res.data
|
||||
}
|
||||
},
|
||||
async getUnionSelectLine(disPlayUnionSelectId = null) {
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/user/query/getUnionSelectLine', {
|
||||
startYear: this.pageForm.year,
|
||||
//signUpMode: 1,
|
||||
disPlayUnionSelectId: disPlayUnionSelectId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.unionSelectLines = resp.data
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getBmUserUnion()
|
||||
await this.getModifyConfig()
|
||||
this.takePartInLines = await this.getXlByUnion()
|
||||
await this.doSearch()
|
||||
await this.getLineSignNumber()
|
||||
await this.getUnionSelectLine()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,698 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">目的地:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入目的地名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.baseName">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">旅行社:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select clearable filterable style="width: 100%"
|
||||
v-model="pageForm.travelAgencyId"
|
||||
@change="doSearch">
|
||||
<el-option :key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id"
|
||||
v-for="item in travelAgencyList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动范围:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select clearable filterable style="width: 100%"
|
||||
v-model="pageForm.regionalNature"
|
||||
@change="doSearch">
|
||||
<el-option key="1" label="省内" value="省内"></el-option>
|
||||
<el-option key="1" label="省外" value="省外"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">标段时间:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select clearable filterable style="width: 100%"
|
||||
v-model="pageForm.lotId"
|
||||
@change="doSearch">
|
||||
<el-option :key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id"
|
||||
v-for="item in modifyBdList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="目的地列表">
|
||||
<template #func>
|
||||
<el-button @click="openImport" size="medium" type="primary" style="margin-right: 10px">导入目的地</el-button>
|
||||
<el-button @click="openAdd" size="medium" type="primary">新建目的地</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop==='isDisabled'">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
@change="(val)=>{baseStatusChange(row.id)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isDisabled">
|
||||
</el-switch>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop==='lotId'">
|
||||
<div v-for="item in modifyBdList">
|
||||
<span v-if="row.lotId===item.id">{{item.lotName}}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop==='activityTime'">
|
||||
<span>
|
||||
{{row.activityStartTime + '至' + row.activityEndTime}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="250px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openEdit(row.id)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="doDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<el-form :model="formData" :rules="rules" label-width="160px" ref="form">
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="年度" prop="year">
|
||||
<el-date-picker style="width: 100%"
|
||||
@change="yearChange"
|
||||
type="year"
|
||||
v-model="formData.year"
|
||||
value-format="yyyy"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="排序编号" prop="sortNumber">
|
||||
<el-input maxlength="50" v-model="formData.sortNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="目的地名称" prop="baseName">
|
||||
<el-input maxlength="50" v-model="formData.baseName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="旅行社名称" prop="travelAgencyId">
|
||||
<el-select clearable filterable style="width: 100%" v-model="formData.travelAgencyId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.travelAgencyName+'('+ item.year +'年)'"
|
||||
:value="item.id"
|
||||
v-for="item in travelAgencyList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="组织形式" prop="createMode">
|
||||
<el-radio-group size="small" v-model="formData.createMode">
|
||||
<el-radio :label="1" border>校工会组织</el-radio>
|
||||
<el-radio :label="2" border>分工会组织</el-radio>
|
||||
</el-radio-group>
|
||||
<!--<div class="text-primary">-->
|
||||
<!-- <i class="el-icon-warning"></i>-->
|
||||
<!-- 温馨提醒:校工会可以为基层工会创建线路,分工会自行选择并设置活动相关时间。-->
|
||||
<!--</div>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="活动范围" prop="regionalNature">
|
||||
<el-radio-group size="small" v-model="formData.regionalNature">
|
||||
<el-radio label="省内" border>省内</el-radio>
|
||||
<el-radio label="省外" border>省外</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="标段时间" prop="lotId">
|
||||
<!--<el-input clearable maxlength="50" v-model="formData.lotId"></el-input>-->
|
||||
<el-select clearable filterable style="width: 100%" v-model="formData.lotId"
|
||||
@change="doBdModify">
|
||||
<el-option :key="item"
|
||||
:label="item.lotName"
|
||||
:value="item.id"
|
||||
v-for="item in modifyBdList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="预计费用(元/人次)" prop="estimatedCost">
|
||||
<el-select clearable filterable style="width: 100%" v-model="formData.estimatedCost">
|
||||
<el-option :key="item.id"
|
||||
:label="item.activityCost"
|
||||
:value="item.activityCost"
|
||||
v-for="item in modifyBdList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="目的地联系人" prop="baseContactPerson">
|
||||
<el-input clearable maxlength="20" v-model="formData.baseContactPerson"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="联系人电话" prop="baseContactNumber">
|
||||
<el-input clearable maxlength="20" v-model="formData.baseContactNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<template>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="报名开始时间" prop="signUpStartTime">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="formData.signUpStartTime"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="报名截至时间" prop="signUpEndTime">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="formData.signUpEndTime"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="变更截至时间" prop="changeEndTime">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="formData.changeEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item>
|
||||
<template #label>
|
||||
<span class="text-primary">
|
||||
<i class="el-icon-warning"></i>
|
||||
温馨提醒:
|
||||
</span>
|
||||
</template>
|
||||
<span class="text-primary">
|
||||
变更时间应该大于报名截至时间,小于活动时间。
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="活动开始时间" prop="activityStartTime">
|
||||
<el-date-picker
|
||||
placeholder="活动开始时间"
|
||||
style="width: 100%"
|
||||
type="date"
|
||||
v-model="formData.activityStartTime"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="活动结束时间" prop="activityEndTime">
|
||||
<el-date-picker
|
||||
placeholder="活动结束时间"
|
||||
style="width: 100%"
|
||||
type="date"
|
||||
v-model="formData.activityEndTime"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="24" :sm="24" :xs="24">
|
||||
<el-form-item label="详细信息" prop="content">
|
||||
<div id="lineContent"></div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="是否启用" prop="isDisabled">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="formData.isDisabled">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="24" :sm="24" :xs="24">
|
||||
<el-form-item label="图片上传" prop="files">
|
||||
<file-upload :files.sync="formData.files" :max="1" :type="['jpg', 'jpeg', 'png']">
|
||||
<template #el-upload__tip>
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
图片类请上传jpg/png/jpeg格式,上传数量为1个
|
||||
</div>
|
||||
</template>
|
||||
</file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<el-row class="pb20" justify="end" type="flex">
|
||||
<el-button @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button @click="doSubmit" type="primary" v-throttle>提交</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
<template #view>
|
||||
<base-info ref="viewBaseInfo"></base-info>
|
||||
</template>
|
||||
|
||||
<el-dialog
|
||||
title="目的地导入"
|
||||
:visible.sync="importVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="50%"
|
||||
>
|
||||
<el-timeline>
|
||||
<el-timeline-item timestamp="下载模板" placement="top">
|
||||
<el-card>
|
||||
<el-button size="medium" type=""
|
||||
@click="location.href='/platform/staffTherapyRecuperation/baseManagement/exportTemplate'"
|
||||
icon="el-icon-download">下载模板
|
||||
</el-button>
|
||||
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item timestamp="上传文件" placement="top">
|
||||
<el-card>
|
||||
<el-form>
|
||||
<el-upload
|
||||
name="file"
|
||||
ref="upload"
|
||||
:on-remove="(file, fileList) => {importData.fileList = fileHandleRemove(file, fileList)}"
|
||||
:on-change="(file, fileList) => {importData.fileList = fileHandleChange(file, fileList,{type:['xls','xlsx']})}"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
:file-list="importData.fileList">
|
||||
<el-button size="medium" type="" icon="el-icon-upload"
|
||||
style="width: 200px">选择文件
|
||||
</el-button>
|
||||
<div class="el-upload__tip" slot="tip" style="color: #F56C6C">
|
||||
只能上传 xls/xlsx 文件
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="importVisible = false" :disabled="importLoading">取 消</el-button>
|
||||
<el-button type="primary" @click="doImport" :loading="importLoading">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'base-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/BaseManageInfo.vue')
|
||||
},
|
||||
data() {
|
||||
const validateSignUpEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择报名截至时间'))
|
||||
}
|
||||
if (this.formData.signUpStartTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.signUpStartTime)) {
|
||||
callback(new Error('报名截至时间必须大于报名开始时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
const validateChangeEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择变更截至时间'))
|
||||
}
|
||||
if (this.formData.activityStartTime) {
|
||||
if (Date.parse(value) >= Date.parse(this.formData.activityStartTime)) {
|
||||
callback(new Error('变更截至时间必须小于活动开始时间'))
|
||||
}
|
||||
}
|
||||
if (this.formData.signUpEndTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.signUpEndTime)) {
|
||||
callback(new Error('变更截至时间必须大于活动截至时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
const validateActivityStartTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择活动开始时间'))
|
||||
}
|
||||
if (this.formData.changeEndTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.changeEndTime)) {
|
||||
callback(new Error('活动开始时间必须大于变更截至时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
const validateActivityEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择活动结束时间'))
|
||||
}
|
||||
if (this.formData.activityStartTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.activityStartTime)) {
|
||||
callback(new Error('活动结束时间必须大于活动开始时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
return {
|
||||
pageForm: {
|
||||
year: new Date().getFullYear().toString(),
|
||||
unionId: '',
|
||||
baseName: '',
|
||||
travelAgencyId: '',
|
||||
regionalNature: '',
|
||||
lotId: '',
|
||||
},
|
||||
unionOptions: [],
|
||||
travelAgencyList: [],
|
||||
signUpModeList: [],
|
||||
modifyBdList: [],
|
||||
formData: {
|
||||
id: '',
|
||||
sortNumber: '',
|
||||
baseName: '',
|
||||
travelAgencyId: '',
|
||||
regionalNature: '省内',
|
||||
year: new Date().getFullYear().toString(),
|
||||
isDisabled: false,
|
||||
lotId: '',
|
||||
content: '',
|
||||
signUpStartTime: '',
|
||||
signUpEndTime: '',
|
||||
changeEndTime: '',
|
||||
files: [],
|
||||
createMode: '',
|
||||
estimatedCost: '',
|
||||
activityStartTime: '',
|
||||
activityEndTime: '',
|
||||
baseContactPerson: '',
|
||||
baseContactNumber: '',
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '年度', prop: 'year', sortable: true},
|
||||
{label: '目的地名称', prop: 'baseName', sortable: true},
|
||||
{label: '承担旅行社', prop: 'travelAgencyName', sortable: true},
|
||||
{label: '标段时间', prop: 'lotId', sortable: true},
|
||||
{label: '联系人', prop: 'baseContactPerson', sortable: true},
|
||||
{label: '联系人电话', prop: 'baseContactNumber', sortable: true},
|
||||
{label: '活动时间', prop: 'activityTime', sortable: true},
|
||||
//{label: '创建工会', prop: 'createUnionName', sortable: true},
|
||||
{label: '活动范围', prop: 'regionalNature', sortable: true},
|
||||
//{label: '组织形式', prop: 'signUpMode', sortable: true},
|
||||
//{label: '编号', prop: 'serialNumber', sortable: true},
|
||||
{label: '创建人', prop: 'createUserName', sortable: true},
|
||||
{label: '是否启用', prop: 'isDisabled', sortable: true}
|
||||
],
|
||||
rules: {
|
||||
sortNumber: [{required: false, message: '请输入排序编号', trigger: ['change', 'blur']}],
|
||||
baseName: [{required: true, message: '请输入目的地名称', trigger: ['change', 'blur']}],
|
||||
travelAgencyId: [{required: true, message: '请选择旅行社', trigger: ['change', 'blur']}],
|
||||
regionalNature: [{required: true, message: '请选择区域性质', trigger: ['change', 'blur']}],
|
||||
year: [{required: true, message: '请选择年度', trigger: ['change', 'blur']}],
|
||||
lotId: [{required: true, message: '请选择出行天数', trigger: ['change', 'blur']}],
|
||||
content: [{required: false, message: '请输入详细内容', trigger: ['change', 'blur']}],
|
||||
signUpStartTime: [{required: true, message: '请选择报名开始时间', trigger: ['change', 'blur']}],
|
||||
signUpEndTime: [{required: true, validator: validateSignUpEndTime, trigger: ['change', 'blur']}],
|
||||
changeEndTime: [{required: true, validator: validateChangeEndTime, trigger: ['change', 'blur']}],
|
||||
files: [{required: true, message: '请上传图片', trigger: ['change', 'blur']}],
|
||||
createMode: [{required: true, message: '请选择组织方式', trigger: ['change', 'blur']}],
|
||||
activityStartTime: [{ required: true, validator: validateActivityStartTime, trigger: ['change', 'blur'] }],
|
||||
activityEndTime: [{ required: true, validator: validateActivityEndTime, trigger: ['change', 'blur'] }],
|
||||
estimatedCost: [{required: true, message: '请输入预计费用', trigger: ['change', 'blur']}],
|
||||
},
|
||||
//目的地导入
|
||||
importVisible: false,
|
||||
importLoading: false,
|
||||
importData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSearch() {
|
||||
this.formData.year = this.pageForm.year;
|
||||
await this.yearChange();
|
||||
await this.pageData();
|
||||
},
|
||||
async selectTravelAgencyList() {
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/travelAgency/selectTravelAgency', {year: this.formData.year})
|
||||
this.travelAgencyList = resp.data
|
||||
},
|
||||
async openAdd() {
|
||||
this.$refs.guava.edit()
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.formData.id = null
|
||||
this.initLineContentEditor()
|
||||
})
|
||||
},
|
||||
async openEdit(id) {
|
||||
const resp = await $.post(loc() + '/selectBaseManageById/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.$refs.guava.edit()
|
||||
await this.$nextTick()
|
||||
const data = resp.data
|
||||
data.year = data.year.toString()
|
||||
this.formData = {...data}
|
||||
this.initLineContentEditor(data.content)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async baseStatusChange(id) {
|
||||
const resp = await $.post(loc() + '/openClosedBase/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async doDelete(id) {
|
||||
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
const resp = await $.post(loc() + '/deleteBase/' + id)
|
||||
if (resp.code === 0) {
|
||||
await this.doSearch()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async doSubmit() {
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (!valid) return
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '提交中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
||||
const resp = await $.post(loc() + '/doSubmit', {base: JSON.stringify(this.formData)})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
yearChange() {
|
||||
this.formData.travelAgencyId = null
|
||||
this.selectTravelAgencyList()
|
||||
},
|
||||
async openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewBaseInfo.openView(id, this.modifyBdList)
|
||||
},
|
||||
doBdModify() {
|
||||
let obj = this.formData;
|
||||
this.modifyBdList.forEach((v, i) => {
|
||||
if (obj.lotId === v.id) {
|
||||
obj.estimatedCost = v.activityCost
|
||||
}
|
||||
});
|
||||
this.formData = obj;
|
||||
},
|
||||
async initPageData() {
|
||||
await this.getModifyBd();
|
||||
this.unionOptions = await getUnions(null)
|
||||
await this.selectTravelAgencyList()
|
||||
},
|
||||
async getModifyBd() {
|
||||
const res = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
|
||||
if (res.code === 0) {
|
||||
this.modifyBdList = res.data.lots
|
||||
// this.modifyBdList.forEach((v, i) => {
|
||||
// v.id = JSON.stringify(v.id)
|
||||
// })
|
||||
}
|
||||
},
|
||||
initLineContentEditor(content) {
|
||||
$("#lineContent").html("")
|
||||
lineContentEditor = new wangEditor("#lineContent")
|
||||
lineContentEditor.config.onchange = (html) => {
|
||||
this.formData.content = html
|
||||
}
|
||||
lineContentEditor.config.uploadImgShowBase64 = true
|
||||
lineContentEditor.create()
|
||||
if (content) {
|
||||
lineContentEditor.txt.html(content)
|
||||
}
|
||||
},
|
||||
openImport() {
|
||||
this.importData = {
|
||||
fileList: []
|
||||
}
|
||||
this.importVisible = true;
|
||||
},
|
||||
doImport() {
|
||||
if (this.importData.fileList.length === 0) {
|
||||
this.notifyWarning("请选择文件!")
|
||||
return
|
||||
}
|
||||
const data = new FormData();
|
||||
this.importData.fileList.forEach((val) => {
|
||||
data.append("file", val.raw, val.raw.name);
|
||||
});
|
||||
this.importLoading = true
|
||||
$.ajax({
|
||||
url: loc() + "/importBaseManager",
|
||||
type: "post",
|
||||
data: data,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: (data) => {
|
||||
if (data.code === 0){
|
||||
this.$message.success(data.msg)
|
||||
this.pageData();
|
||||
this.importVisible = false
|
||||
this.importLoading = false
|
||||
}else {
|
||||
this.importVisible = false
|
||||
}
|
||||
},
|
||||
error: (data) => {
|
||||
this.notifyWarning("导入失败")
|
||||
this.importLoading = false
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.initPageData();
|
||||
this.pageData();
|
||||
},
|
||||
computed: {
|
||||
editDialogTitle() {
|
||||
return this.formData.id ? '编辑目的地' : '新增目的地'
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,473 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.viewTable .el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.viewTable .el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">关键字:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.keywords">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="旅行社列表">
|
||||
<template #func>
|
||||
<el-button @click="openImport" size="medium" type="primary">导入旅行社</el-button>
|
||||
<el-button @click="openAdd" size="medium" type="primary">新建旅行社</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop==='isDisabled'">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
@change="(val)=>{travelAgencyStatusChange(row.id)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isDisabled">
|
||||
</el-switch>
|
||||
</template>
|
||||
<template scope="{row:{officialWebsite}}" v-else-if="column.prop==='officialWebsite'">
|
||||
<a :href="officialWebsite" class="text-primary" target="_blank">
|
||||
{{officialWebsite}}
|
||||
</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="250px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="doDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :title="editDialogTitle" :visible.sync="editDialogVisible"
|
||||
width="60%">
|
||||
<el-form :model="formData" :rules="rules" label-width="120px" ref="form">
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="年度" prop="year">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="year"
|
||||
v-model="formData.year"
|
||||
value-format="yyyy"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="编号" prop="serialNumber">
|
||||
<el-input maxlength="50" v-model="formData.serialNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="12" :xs="12">
|
||||
<el-form-item label="旅行社名称" prop="travelAgencyName">
|
||||
<el-input maxlength="50" v-model="formData.travelAgencyName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="12">
|
||||
<el-form-item label="是否自由组团" prop="signUpTravelAgency">
|
||||
<el-radio-group v-model="formData.signUpTravelAgency">
|
||||
<el-radio-button :label="true">是</el-radio-button>
|
||||
<el-radio-button :label="false">否</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="最多承担人数" prop="maxUndertakeNumber">
|
||||
<el-input-number
|
||||
v-model="formData.maxUndertakeNumber"
|
||||
:min="0"
|
||||
:precision="0"
|
||||
controls-position="right"
|
||||
placeholder="为空或0表示不限制"
|
||||
style="width: 100%">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="旅行社联系人" prop="contact">
|
||||
<el-input maxlength="10" v-model="formData.contact"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="联系电话" prop="contactMobileNumber">
|
||||
<el-input v-model="formData.contactMobileNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
<el-input maxlength="50" v-model="formData.email"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="官网" prop="officialWebsite">
|
||||
<el-input maxlength="100" v-model="formData.officialWebsite"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="24" :sm="24" :xs="24">
|
||||
<el-form-item label="备注" prop="note">
|
||||
<el-input maxlength="100"
|
||||
type="textarea"
|
||||
v-model="formData.note"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="是否启用" prop="isDisabled">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="formData.isDisabled">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="24" :sm="24" :xs="24">
|
||||
<el-form-item label="移动端缩略图" prop="files">
|
||||
<image-Upload :height="100" :width="100" :limit="1" :file-type="['png', 'jpg']" :file-size="1"
|
||||
v-model="formData.files"></image-Upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<el-row justify="end" type="flex">
|
||||
<el-button @click="editDialogVisible=false">取消</el-button>
|
||||
<el-button @click="doSubmit" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
<template #view>
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item label="旅行社编号">{{viewData.serialNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="旅行社名称">{{viewData.travelAgencyName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">{{viewData.contact}}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{viewData.contactMobileNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="邮箱">{{viewData.email}}</el-descriptions-item>
|
||||
<el-descriptions-item label="最多承担人数">{{viewData.maxUndertakeNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="官网">
|
||||
<a :href="viewData.officialWebsite" target="_blank">
|
||||
{{viewData.officialWebsite}}
|
||||
<span class="text-primary">立即访问</span>
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label="备注">{{viewData.note}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
|
||||
|
||||
<el-dialog
|
||||
title="旅行社导入"
|
||||
:visible.sync="importVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="50%"
|
||||
>
|
||||
<el-timeline>
|
||||
<el-timeline-item timestamp="下载模板" placement="top">
|
||||
<el-card>
|
||||
<el-button size="medium" type=""
|
||||
@click="location.href='/platform/staffTherapyRecuperation/common/downloadTemplate?filePath=travel/TravelAgencyImport.xlsx&fileName=旅行社导入模板.xls'"
|
||||
icon="el-icon-download">下载模板
|
||||
</el-button>
|
||||
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item timestamp="上传文件" placement="top">
|
||||
<el-card>
|
||||
<el-form>
|
||||
<el-upload
|
||||
name="file"
|
||||
ref="upload"
|
||||
:on-remove="(file, fileList) => {
|
||||
importData.fileList = fileHandleRemove(file, fileList)
|
||||
}"
|
||||
:on-change="(file, fileList) => {
|
||||
importData.fileList = fileHandleChange(file, fileList,{type:['xls','xlsx']})
|
||||
}"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
:file-list="importData.fileList">
|
||||
<el-button size="medium" type="" icon="el-icon-upload"
|
||||
style="width: 200px">选择文件
|
||||
</el-button>
|
||||
<div class="el-upload__tip" slot="tip" style="color: #F56C6C">
|
||||
只能上传 xls/xlsx 文件
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="importVisible = false" :disabled="importLoading">取 消</el-button>
|
||||
<el-button type="primary" @click="doImport" :loading="importLoading">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{label: '年度', prop: 'year', sortable: true},
|
||||
{label: '旅行社名称', prop: 'travelAgencyName', width: '200'},
|
||||
{label: '旅行社编号', prop: 'serialNumber', sortable: true},
|
||||
{label: '联系人', prop: 'contact'},
|
||||
{label: '联系人手机', prop: 'contactMobileNumber'},
|
||||
{label: '邮箱', prop: 'email'},
|
||||
{label: '最多承担人数', prop: 'maxUndertakeNumber'},
|
||||
{label: '官网', prop: 'officialWebsite'},
|
||||
{label: '备注', prop: 'note'},
|
||||
{label: '是否禁用', prop: 'isDisabled'}
|
||||
],
|
||||
editDialogVisible: false,
|
||||
rules: {
|
||||
serialNumber: [{required: true, message: '请输入编号', trigger: ['change', 'blur']}],
|
||||
travelAgencyName: [{required: true, message: '请输入旅行社名称', trigger: ['change', 'blur']}],
|
||||
contact: [{required: true, message: '请输入联系人姓名', trigger: ['change', 'blur']}],
|
||||
contactMobileNumber: [
|
||||
{required: true, message: '请输入联系人电话', trigger: 'blur',},
|
||||
{
|
||||
pattern: /^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/,
|
||||
message: '请输入正确的联系人电话',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
email: [
|
||||
{required: false, message: '请输入邮箱地址', trigger: 'blur'},
|
||||
{type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change']}
|
||||
],
|
||||
officialWebsite: [
|
||||
{required: false, message: '请输入官网地址', trigger: ['change', 'blur']},
|
||||
{type: 'url', message: '请输入正确的官网地址', trigger: ['blur', 'change']}],
|
||||
maxUndertakeNumber: [
|
||||
{required: false, message: '请输入最多承担人数', trigger: ['change', 'blur']}
|
||||
],
|
||||
note: [{required: false, message: '请输入备注', trigger: ['change', 'blur']}],
|
||||
year: [{required: true, message: '请选择年度', trigger: ['change', 'blur']}],
|
||||
signUpTravelAgency: [{required: true, message: '请选择是否自由组团', trigger: ['change', 'blur']}],
|
||||
//files: [{required: true, message: '请上传移动端缩略图', trigger: ['change', 'blur']}],
|
||||
},
|
||||
viewData: {},
|
||||
formData: {
|
||||
id: null,
|
||||
serialNumber: null,
|
||||
travelAgencyName: null,
|
||||
contact: null,
|
||||
contactMobileNumber: null,
|
||||
email: null,
|
||||
maxUndertakeNumber: null,
|
||||
officialWebsite: null,
|
||||
note: null,
|
||||
year: null,
|
||||
isDisabled: false,
|
||||
signUpTravelAgency: false
|
||||
},
|
||||
pageForm: {
|
||||
keywords: null,
|
||||
year: moment().format('YYYY')
|
||||
},
|
||||
//旅行社导入
|
||||
importVisible: false,
|
||||
importLoading: false,
|
||||
importData: {},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
editDialogTitle() {
|
||||
return this.formData.id ? '编辑旅行社' : '新增旅行社'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openAdd() {
|
||||
this.editDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.formData = {
|
||||
id: null,
|
||||
serialNumber: null,
|
||||
travelAgencyName: null,
|
||||
contact: null,
|
||||
contactMobileNumber: null,
|
||||
email: null,
|
||||
maxUndertakeNumber: null,
|
||||
officialWebsite: null,
|
||||
note: null,
|
||||
year: null,
|
||||
isDisabled: false,
|
||||
signUpTravelAgency: false,
|
||||
}
|
||||
})
|
||||
},
|
||||
async openEdit(row) {
|
||||
const cloneData = clone(row)
|
||||
cloneData.year = cloneData.year.toString()
|
||||
this.formData = {...cloneData}
|
||||
this.editDialogVisible = true
|
||||
},
|
||||
async doSubmit() {
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (!valid) return
|
||||
const resp = await $.post(loc() + '/doSubmit', {travelAgency: JSON.stringify(this.formData)})
|
||||
if (resp.code === 0) {
|
||||
this.editDialogVisible = false
|
||||
this.notifySuccess(resp.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async travelAgencyStatusChange(id) {
|
||||
const resp = await $.post(loc() + '/openClosedTravelAgency/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async doDelete(id) {
|
||||
const confirm = await this.$confirm('可能会导致数据不完整,您确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
const resp = await $.post(loc() + '/deleteTravelAgency/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
async openView(row) {
|
||||
this.viewData = row
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
async initPageData() {
|
||||
}, /** 旅行社导入 */
|
||||
openImport() {
|
||||
this.importData = {
|
||||
fileList: []
|
||||
}
|
||||
this.importVisible = true;
|
||||
},
|
||||
async doImport() {
|
||||
if (this.importData.fileList.length === 0) {
|
||||
this.notifyWarning("请选择文件!")
|
||||
return
|
||||
}
|
||||
const data = new FormData();
|
||||
|
||||
this.importData.fileList.forEach((val) => {
|
||||
data.append("file", val.raw, val.raw.name);
|
||||
});
|
||||
this.importLoading = true
|
||||
|
||||
const resp = await $.ajax({
|
||||
url: loc() + '/travelAgencyImport',
|
||||
type: 'POST',
|
||||
data: data,
|
||||
processData: false,
|
||||
contentType: false
|
||||
})
|
||||
if (resp.code===0){
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData();
|
||||
this.importVisible = false
|
||||
this.importLoading = false
|
||||
}else {
|
||||
this.notifyWarning("导入失败")
|
||||
this.importLoading = false
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.initPageData()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,5 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<iframe src="${therapyPageUrl,escape}" title="职工疗休养" style="width:100%;height:calc(100vh - 100px);border:0;background:#fff"></iframe>
|
||||
<!--# } #-->
|
||||
@@ -0,0 +1,23 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
||||
<title>?????</title>
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vue-http-loader/httpVueLoader.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/axios/axios.js"></script>
|
||||
<script>const APP_DOMAIN = location.origin; const FILE_DOMAIN = location.origin;</script>
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/vant/index.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/staffbenefit/therapyRecuperation/mobile/theme.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/staffbenefit/therapyRecuperation/mobile/main.css">
|
||||
<script src="${base!}/assets/platform/plugins/vant/index.js"></script>
|
||||
<script src="${base!}/assets/staffbenefit/therapyRecuperation/basic.js"></script>
|
||||
<script src="${base!}/assets/staffbenefit/therapyRecuperation/v.js"></script>
|
||||
<script src="${base!}/assets/staffbenefit/therapyRecuperation/mobileMixins.js"></script>
|
||||
<script src="${base!}/assets/staffbenefit/therapyRecuperation/compat.js"></script>
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/pdf/pdfh5.css">
|
||||
<script src="${base!}/assets/platform/plugins/pdfJs/h5/pdf.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/pdfJs/h5/pdf.worker.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/pdfJs/h5/pdfh5.js"></script>
|
||||
<style>[v-cloak]{display:none}body{margin:0}</style>
|
||||
</head><body>${layoutContent}</body></html>
|
||||
@@ -0,0 +1,42 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
||||
<title>?????</title>
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vue-http-loader/httpVueLoader.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/axios/axios.js"></script>
|
||||
<script>const APP_DOMAIN = location.origin; const FILE_DOMAIN = location.origin;</script>
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/index.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/fonts/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/fonts/themify-icons.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/staffbenefit/therapyRecuperation/css/common.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/staffbenefit/therapyRecuperation/css/main.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/staffbenefit/therapyRecuperation/css/elmain.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/staffbenefit/therapyRecuperation/css/panel.css">
|
||||
<script src="${base!}/assets/platform/plugins/element-ui/lib/index.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/wangEditor4/wangEditor.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/sortablejs/sortable.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vuedraggable/vuedraggable.umd.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/echarts/echarts.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/g2plot/g2plot.min.js"></script>
|
||||
<script src="${base!}/assets/staffbenefit/therapyRecuperation/basics.js"></script>
|
||||
<script src="${base!}/assets/staffbenefit/therapyRecuperation/v.js"></script>
|
||||
<script src="${base!}/assets/staffbenefit/therapyRecuperation/component.js"></script>
|
||||
<script src="${base!}/assets/staffbenefit/therapyRecuperation/initTableMixins.js"></script>
|
||||
<script src="${base!}/assets/staffbenefit/therapyRecuperation/compat.js"></script>
|
||||
<script>
|
||||
Vue.component('guava', httpVueLoader('/components/staffbenefit/therapyRecuperation/Guava.vue'));
|
||||
Vue.component('text-editor', httpVueLoader('/components/plugins/sysTextEditor/index.vue'));
|
||||
Vue.component('file-upload', httpVueLoader('/components/staffbenefit/therapyRecuperation/FileUpload.vue'));
|
||||
Vue.component('image-upload', httpVueLoader('/components/staffbenefit/therapyRecuperation/ImageUpload.vue'));
|
||||
Vue.component('border-table', httpVueLoader('/components/staffbenefit/therapyRecuperation/BorderTable.vue'));
|
||||
Vue.component('vuedraggable', window.vuedraggable);
|
||||
Vue.directive('auth', {inserted(el, binding) {
|
||||
const roles = ${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getRoleCodesJson()};
|
||||
const requested = Array.isArray(binding.value) ? binding.value : [binding.value];
|
||||
if (!requested.some(role => roles.includes(role))) el.parentNode.removeChild(el);
|
||||
}});
|
||||
</script>
|
||||
<style>body{margin:0;padding:12px;box-sizing:border-box;background:#f6f6f6} [v-cloak]{display:none} #therapy-loading{position:fixed;top:0;left:0;height:3px;width:100%;background:#409eff;z-index:99999}</style>
|
||||
</head><body>${layoutContent}</body></html>
|
||||
@@ -0,0 +1,276 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.card-body-center-bottom {
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.el-carousel-100 {
|
||||
position: relative;
|
||||
height: 600px;
|
||||
}
|
||||
|
||||
.el-carousel-100 .el-carousel__container {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.carousel-item-card {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.panel .el-radio-group > .el-radio {
|
||||
display: block;
|
||||
margin: 10px 0 !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<el-card class="m10" shadow="never" style="height: calc(100% - 20px)">
|
||||
<template #header>
|
||||
<h3 style="color: #1867b0">导入参加人员</h3>
|
||||
</template>
|
||||
|
||||
<el-steps :active="stepActive">
|
||||
<el-step icon="el-icon-edit" title="选择线路或旅行社"></el-step>
|
||||
<el-step icon="el-icon-upload" title="读取人员名单数据"></el-step>
|
||||
<el-step icon="el-icon-upload" title="导入数据"></el-step>
|
||||
<el-step icon="el-icon-bell" title="导入结果"></el-step>
|
||||
</el-steps>
|
||||
|
||||
<el-carousel :autoplay="false" :loop="false" arrow="never" class="el-carousel-100" indicator-position="none"
|
||||
ref="carousel">
|
||||
<el-carousel-item>
|
||||
|
||||
<el-card class="carousel-item-card" shadow="never">
|
||||
<el-date-picker
|
||||
@change="yearChange"
|
||||
placeholder="选择年"
|
||||
type="year"
|
||||
v-model="year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
|
||||
|
||||
<el-row :gutter="20" class="mt20" type="flex">
|
||||
<el-col>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
线路
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<el-radio-group @change="travelId=''" size="small" v-model="lineId">
|
||||
<el-radio :label="item.id"
|
||||
border v-for="item in lines">{{item.label}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
旅行社
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<el-radio-group @change="lineId=''" size="small" v-model="travelId">
|
||||
<el-radio :label="item.id"
|
||||
border v-for="item in travels">{{item.label}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
</el-carousel-item>
|
||||
<el-carousel-item>
|
||||
<el-card class="carousel-item-card" shadow="never">
|
||||
<el-button @click="downloadTemplate" size="small" type="primary">下载模板</el-button>
|
||||
|
||||
<el-upload
|
||||
:action="loc()+'/readExcel'"
|
||||
:auto-upload="false"
|
||||
:data="{lineId:lineId,travelAgencyId:travelId}"
|
||||
:file-list="fileList"
|
||||
:limit="1"
|
||||
:on-error="(err)=>{this.notifyWarning(err)}"
|
||||
:on-exceed="()=>{this.notifyWarning('最多只能选择一个文件')}"
|
||||
:on-success="fileHandleSuccess"
|
||||
accept="xls,xlsx"
|
||||
drag
|
||||
ref="upload"
|
||||
style="text-align: center"
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
</el-upload>
|
||||
|
||||
</el-card>
|
||||
</el-carousel-item>
|
||||
<el-carousel-item>
|
||||
<el-card class="carousel-item-card" shadow="never">
|
||||
|
||||
<div class="alert alert-warning">
|
||||
<p> excel表格:{{excelRows.length}}行</p>
|
||||
<p> 合法数据:{{tableData.length}}行</p>
|
||||
</div>
|
||||
|
||||
<el-table :data="tableData">
|
||||
<el-table-column label="一卡通号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="参加时间" prop="takePartInTime"></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-carousel-item>
|
||||
|
||||
<el-carousel-item>
|
||||
<el-card class="carousel-item-card" shadow="never">
|
||||
<el-result icon="success" subTitle="" title="导入成功"></el-result>
|
||||
</el-card>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
|
||||
<div class="card-body-center-bottom">
|
||||
<el-button :disabled="stepActive==0||loading" @click="prev" size="medium">上一步</el-button>
|
||||
<el-button :loading="loading" @click="next" size="medium" type="primary">
|
||||
{{nextBtnTxt}}
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
stepActive: 0,
|
||||
elCarouselItemHeight: '600px',
|
||||
|
||||
year: new Date().getFullYear().toString(),
|
||||
|
||||
lines: [],
|
||||
travels: [],
|
||||
|
||||
lineId: '',
|
||||
travelId: '',
|
||||
|
||||
fileList: [],
|
||||
excelRows: [],
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
nextBtnTxt() {
|
||||
return this.stepActive === 3 ? '完成' : '下一步'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
stepActive(v) {
|
||||
this.$refs.carousel.setActiveItem(v)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
fileHandleSuccess(resp) {
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.matchList
|
||||
this.excelRows = resp.data.excelRows
|
||||
this.stepActive++
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
this.$refs.upload.clearFiles()
|
||||
}
|
||||
},
|
||||
readExcel() {
|
||||
this.$refs.upload.submit()
|
||||
},
|
||||
prev() {
|
||||
this.stepActive--
|
||||
},
|
||||
async next() {
|
||||
const i = this.stepActive
|
||||
if (i === 0) {
|
||||
if (this.lineId === '' && this.travelId === '') {
|
||||
this.notifyWarning('请先选择线路或者旅行社')
|
||||
return
|
||||
}
|
||||
} else if (i === 1) {
|
||||
const files = this.$refs.upload.uploadFiles
|
||||
if (files.length === 0) {
|
||||
this.notifyWarning('请先选择文件')
|
||||
return
|
||||
}
|
||||
const isReady = files.every(v => v.status === 'ready')
|
||||
if (isReady) {
|
||||
this.$refs.upload.submit()
|
||||
return
|
||||
}
|
||||
} else if (i === 2) {
|
||||
if (this.tableData.length === 0) {
|
||||
this.notifyWarning('没有合法数据,无法导入')
|
||||
return
|
||||
}
|
||||
const resp = await $.post(loc() + '/doImportTakePartInUsers', {enroll: JSON.stringify(this.tableData)})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
return
|
||||
}
|
||||
} else if (i === 3) {
|
||||
this.tableData = []
|
||||
this.excelRows = []
|
||||
this.lineId = ''
|
||||
this.travelId = ''
|
||||
this.stepActive = 0
|
||||
this.$refs.upload.clearFiles()
|
||||
return
|
||||
}
|
||||
this.stepActive++
|
||||
},
|
||||
yearChange() {
|
||||
this.selectLineOrTravelAgency()
|
||||
},
|
||||
async selectLineOrTravelAgency() {
|
||||
const resp = await $.post(loc() + '/selectLineOrTravelAgency', {year: this.year})
|
||||
if (resp.code === 0) {
|
||||
this.lines = resp.data.lines
|
||||
this.travels = resp.data.travels
|
||||
}
|
||||
},
|
||||
downloadTemplate() {
|
||||
window.open(loc() + '/downloadTemplate')
|
||||
}
|
||||
},
|
||||
updated() {
|
||||
this.$nextTick(() => {
|
||||
const top = document.getElementsByClassName('el-carousel-100')[0].getBoundingClientRect().top
|
||||
const elCarouselHeight = window.innerHeight - top
|
||||
console.log(elCarouselHeight)
|
||||
})
|
||||
},
|
||||
created() {
|
||||
this.selectLineOrTravelAgency()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,451 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.companion_card {
|
||||
border: 1px #1867b0 solid;
|
||||
}
|
||||
|
||||
.row-expand-cover .el-table__expand-icon {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
/*
|
||||
.column-expand:before {
|
||||
content: '123'
|
||||
}*/
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
@change="doSearch"
|
||||
placeholder="选择年度"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">线路:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
v-model="pageForm.lineId">
|
||||
<el-option :label="item.lineName"
|
||||
:value="item.id"
|
||||
v-for="item in schoolFreeLineList"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">关键字:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.keywords">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('sysadmin')||@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('A06')}">
|
||||
<div class="search-item-label">分工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id"
|
||||
v-for="item in unionOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">线路类型:</div>
|
||||
<div class="search-item-option">
|
||||
<el-radio-group class="mr0-radio"
|
||||
v-model="pageForm.regionalNature">
|
||||
<el-radio-button :label="item.value"
|
||||
border v-for="item in regionalNatureList">
|
||||
{{item.label}}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">时间标段:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch" clearable filterable
|
||||
style="width: 100%"
|
||||
v-model="pageForm.lotId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id"
|
||||
v-for="item in lotList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="线路列表">
|
||||
<template #func>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
:width="column.width"
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row:{signUpMode}}" v-if="column.prop==='signUpMode'">
|
||||
{{signUpModeName(signUpMode)}}
|
||||
</template>
|
||||
<template scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
|
||||
{{createModeName(createMode)}}
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop==='isDisabled'">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
@change="(val)=>{lineStatusChange(row.id)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isDisabled">
|
||||
</el-switch>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop==='signUpUserAndFamilyNum'">
|
||||
<span class="text-primary" v-if="configData.familyInfo == 2">
|
||||
{{row.signUpUserNum + row.signUpUserFamilyNum}}
|
||||
</span>
|
||||
<span class="text-primary" v-else>
|
||||
{{row.signUpUserNum + row.familyNumber}}
|
||||
</span>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop==='playTime'">
|
||||
<template v-if="row.playStartTime">{{row.playStartTime + '至' + row.playEndTime}}</template>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="100px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openViewSignUpUsers(row.usId,row.unionId)" size="mini" type="primary">调整
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<vi-title2 title="报名人员">
|
||||
<template #func>
|
||||
<el-button @click="aKeyToAdjust" size="small" type="primary">一键调整
|
||||
</el-button>
|
||||
|
||||
<el-button @click="smsAlerts" size="small" type="primary">短信提醒
|
||||
</el-button>
|
||||
</template>
|
||||
</vi-title2>
|
||||
|
||||
<el-table :row-class-name="getRowClassName" :cell-class-name="getColumnClassName"
|
||||
:data="schoolFreeSignUpUserList" ref="adjustTable">
|
||||
<el-table-column selectable="" type="selection"></el-table-column>
|
||||
<el-table-column label="序号" type="expand" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-card class="companion_card" shadow="never">
|
||||
<h4 slot="header" style="color: #1867b0">
|
||||
家属信息
|
||||
</h4>
|
||||
<el-table :data="row.companionList">
|
||||
<el-table-column label="一卡通号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="关系" prop="relation"></el-table-column>
|
||||
<el-table-column label="身份证号" prop="idCard"></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="一卡通号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="单位" prop="unitName" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column label="工会" prop="unionName" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column label="报名时间" prop="signingUptime"></el-table-column>
|
||||
<el-table-column label="家属人数" prop="companionCount">
|
||||
<template scope="{row}">
|
||||
<span v-if="configData.familyInfo === 2" class="text-primary">
|
||||
{{row.companionCount}}
|
||||
</span>
|
||||
<span v-else class="text-primary">
|
||||
{{row.familyNumber}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否调整" prop="isNormal">
|
||||
<template scope="{row}">
|
||||
<span class="text-success" v-if="row.isNormal">
|
||||
未调整
|
||||
</span>
|
||||
<span class="text-danger" v-else>
|
||||
已调整
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template scope="{row}">
|
||||
<el-button @click="adjustmentUser(row.loginName,row.isNormal)" size="mini" type="primary"
|
||||
v-if="row.isNormal">调整
|
||||
</el-button>
|
||||
<el-button @click="adjustmentUser(row.loginName,row.isNormal)" size="mini" type="success"
|
||||
v-if="!row.isNormal">恢复
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'line-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lotList: [],
|
||||
regionalNatureList: [],
|
||||
schoolFreeLineList: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear().toString(),
|
||||
lineId: null,
|
||||
unionId: null
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '年度', prop: 'year', sortable: true},
|
||||
{label: '线路名称', prop: 'lineName', sortable: true},
|
||||
{label: '线路编号', prop: 'serialNumber', sortable: true},
|
||||
{label: '承担旅行社', prop: 'travelAgencyName', sortable: true, width: '150px'},
|
||||
{label: '所属分工会', prop: 'selectUnionName'},
|
||||
{label: '出行时间', prop: 'playTime', sortable: true},
|
||||
// {label: '创建工会', prop: 'createUnionName', sortable: true},
|
||||
{label: '线路类型', prop: 'regionalNature', sortable: true},
|
||||
// {label: '组织形式', prop: 'signUpMode', sortable: true},
|
||||
{label: '创建模式', prop: 'createMode'},
|
||||
// {label: '报名模式', prop: 'signUpMode'},
|
||||
{label: '最少参与教工', prop: 'minimumGroupSize'},
|
||||
{label: '报名人数(含家属)', prop: 'signUpUserAndFamilyNum', width: '150px'},
|
||||
{label: '是否启用', prop: 'isDisabled', sortable: true}
|
||||
|
||||
],
|
||||
schoolFreeSignUpUserList: [],
|
||||
currentLineId: null,
|
||||
currentLineSelectUnionId: null,
|
||||
unionOptions: [],
|
||||
configData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getLotList() {
|
||||
const {data} = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
|
||||
this.lotList = data.lots
|
||||
},
|
||||
getRowClassName({row, rowIndex}) {
|
||||
if (row.companionCount === 0) {
|
||||
return 'row-expand-cover'
|
||||
}
|
||||
},
|
||||
getColumnClassName({row, column, rowIndex, columnIndex}) {
|
||||
if (columnIndex === 1) {
|
||||
document.styleSheets[0].insertRule('.column-expand' + rowIndex + ':before{content: "' + (rowIndex + 1) + '"; position: absolute; left: 60px}')
|
||||
return 'column-expand' + rowIndex
|
||||
}
|
||||
},
|
||||
async findUnionSignUpModeLineList() {
|
||||
const {year} = this.pageForm
|
||||
const resp = await $.post(loc() + '/findUnionSignUpModeLineList', year)
|
||||
if (resp.code === 0) {
|
||||
this.schoolFreeLineList = resp.data
|
||||
}
|
||||
},
|
||||
createModeName(val) {
|
||||
const d = this.createModeList.find(v => v.value === val)
|
||||
return d ? d.label : null
|
||||
},
|
||||
signUpModeName(val) {
|
||||
const d = this.signUpModeList.find(v => v.value === val)
|
||||
return d ? d.label : null
|
||||
},
|
||||
async pageData() {
|
||||
sublime.showLoadingbar()
|
||||
this.tableLoading = true
|
||||
const resp = await $.post(loc() + '/pageData', this.pageForm)
|
||||
sublime.closeLoadingbar()
|
||||
this.tableLoading = false
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async openViewSignUpUsers(lineId, unionId) {
|
||||
this.currentLineId = lineId
|
||||
this.currentLineSelectUnionId = unionId
|
||||
const resp = await $.post(loc() + '/findUnionSignUpModeUserList', {lineId, unionId})
|
||||
if (resp.code === 0) {
|
||||
if (this.$refs.guava.v !== 'edit') {
|
||||
this.$refs.guava.edit()
|
||||
}
|
||||
this.schoolFreeSignUpUserList = resp.data
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
//调整人员
|
||||
async adjustmentUser(loginName, isNormal) {
|
||||
const msg = isNormal ? '确定要调整吗?' : '确定要恢复吗?'
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
const lineId = this.currentLineId
|
||||
const resp = await $.post(loc() + '/adjustmentUser', {lineId, loginNames: JSON.stringify([loginName])})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
await this.openViewSignUpUsers(this.currentLineId, this.currentLineSelectUnionId)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async aKeyToAdjust() {
|
||||
if (this.$refs.adjustTable.selection.length === 0) {
|
||||
this.notifyWarning('请选择需要调整的人员')
|
||||
return
|
||||
}
|
||||
|
||||
const confirm = await this.$confirm('您确定要一键调整吗', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
const lineId = this.currentLineId
|
||||
const selection = this.$refs.adjustTable.selection
|
||||
const loginNames = selection.filter(v=>v.isNormal === true).map(v => v.loginName)
|
||||
|
||||
if (loginNames.length == 0) {
|
||||
this.$message.warning('所有教职工已调整,请勿重复勾选')
|
||||
return
|
||||
}
|
||||
|
||||
const resp = await $.post(loc() + '/adjustmentUser', {lineId, loginNames: JSON.stringify(loginNames)})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
await this.openViewSignUpUsers(this.currentLineId, this.currentLineSelectUnionId)
|
||||
await this.pageData();
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async smsAlerts() {
|
||||
if (this.$refs.adjustTable.selection.length === 0) {
|
||||
this.notifyWarning('请选择需要发送短信通知的人员')
|
||||
return
|
||||
}
|
||||
const confirm = await this.$confirm('此操作会向已调整的人员发送短信,您确定要发送短信提醒吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
const lineId = this.currentLineId
|
||||
const selection = this.$refs.adjustTable.selection
|
||||
const loginNames = selection.filter(v=>v.isNormal === false).map(v => v.loginName)
|
||||
|
||||
if (loginNames.length == 0) {
|
||||
this.$message.warning('暂无已调整人员,请先进行人员调整')
|
||||
return
|
||||
}
|
||||
|
||||
const resp = await $.post( loc() + '/smsAlerts',{lineId:lineId,loginNames: JSON.stringify(loginNames)})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
await this.openViewSignUpUsers(this.currentLineId, this.currentLineSelectUnionId)
|
||||
await this.pageData();
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async lineStatusChange(id) {
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/line/openClosedLine/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async getConfigData() {
|
||||
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
|
||||
this.configData = resp.data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getConfigData()
|
||||
this.createModeList = await getEnumOptions('TheRapyRecuperationLineCreateMode')
|
||||
this.signUpModeList = await getEnumOptions('TheRapyRecuperationSignUpMode')
|
||||
this.regionalNatureList = await getEnumOptions('TheRapyRecuperationProvinceType')
|
||||
this.unionOptions = await getUnions(null)
|
||||
await this.findUnionSignUpModeLineList()
|
||||
this.lotList = this.getLotList()
|
||||
await this.pageData()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,516 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.item {
|
||||
padding: 6px 12px;
|
||||
margin: 0px 10px 0px 10px;
|
||||
border: solid 1px #eee;
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
.item:hover {
|
||||
background-color: #fdfdfd;
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.item + .item {
|
||||
border-top: none;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.clusterMembersSubmitBtn {
|
||||
/* position: absolute;
|
||||
bottom: 0px;
|
||||
right: 0px;*/
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.cluster-card {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.cluster-card .el-card__header {
|
||||
height: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.cluster-card .el-card__body {
|
||||
height: 660px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
@change="doSearch"
|
||||
placeholder="选择年度"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">线路名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable
|
||||
placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.keywords">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('sysadmin')||@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('A06')}">
|
||||
<div class="search-item-label">分工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch" clearable filterable style="width: 100%"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id"
|
||||
v-for="item in unionOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="线路列表">
|
||||
<template #func>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row:{signUpMode}}" v-if="column.prop==='signUpMode'">
|
||||
{{signUpModeName(signUpMode)}}
|
||||
</template>
|
||||
<template scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
|
||||
{{createModeName(createMode)}}
|
||||
</template>
|
||||
<template scope="{row}" v-if="column.prop==='times'">
|
||||
{{row.playStartTime.substr(0,10)}}至{{row.playEndTime.substr(0,10)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openViewClusterInfo(row.id)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openCluster(row.id,row.ascriptionUnionId)" size="mini" type="primary">组团
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
|
||||
<template #edit_func>
|
||||
<el-button @click="addCluster" type="primary">添加团</el-button>
|
||||
</template>
|
||||
<template #edit>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" v-for="item,itemKey in clusterData">
|
||||
<el-card class="cluster-card" shadow="never">
|
||||
<div class="text-primary" slot="header">
|
||||
<template v-if="!item.editClusterName">
|
||||
{{getClusterName(item)}}
|
||||
<i @click="item.editClusterName=true"
|
||||
class="el-icon-edit"
|
||||
v-if="itemKey!=='unSelectedUsers'"></i>
|
||||
</template>
|
||||
|
||||
<el-input @blur="item.editClusterName=false"
|
||||
autofocus
|
||||
maxlength="10"
|
||||
size="mini"
|
||||
v-if="item.editClusterName"
|
||||
v-model="item.clusterName"></el-input>
|
||||
|
||||
<i @click="removeCluster(itemKey)"
|
||||
class="el-icon-close"
|
||||
style="position: absolute;right: 5px;top: 5px;cursor: pointer"
|
||||
v-if="itemKey!=='unSelectedUsers'"></i>
|
||||
|
||||
<el-button @click="openBatchMove"
|
||||
size="mini"
|
||||
style="position:absolute;right: 10px"
|
||||
type="primary"
|
||||
v-if="itemKey==='unSelectedUsers'">批量调整
|
||||
</el-button>
|
||||
</div>
|
||||
<draggable @end="drag=false" @start="drag=true" group="cluster" style="height: 100%"
|
||||
v-model="item.members">
|
||||
<transition-group :style="tgGroup">
|
||||
<div :key="ele.loginName" class="item" v-for="ele in item.members">
|
||||
<el-popover :content="ele.userName+'-'+ele.loginName+'-'+ele.sex+'-'+ele.unionName"
|
||||
placement="right-end"
|
||||
trigger="hover">
|
||||
<el-row :gutter="4" slot="reference" style="white-space: nowrap" type="flex">
|
||||
<el-col :span="3">
|
||||
<el-tag :type="ele.isLeader?null:'info'" effect="dark" size="mini">
|
||||
{{ele.isLeader ? '团长' : '成员' }}
|
||||
</el-tag>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="16" style="overflow: hidden">
|
||||
{{ele.userName+'-'+ele.loginName+'-'+ele.sex+'-'+ele.unionName}}
|
||||
</el-col>
|
||||
|
||||
<el-col :span="3" style="overflow: hidden">
|
||||
{{'(' + ele.companionCount + ')'}}
|
||||
</el-col>
|
||||
|
||||
<el-col :span="2" class="text-center">
|
||||
<el-dropdown
|
||||
@command="(isLeader)=>{setMemberRole(itemKey,ele.loginName,isLeader)}"
|
||||
v-if="itemKey!=='unSelectedUsers'">
|
||||
<i class="el-icon-user-solid"></i>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="true">设为团长</el-dropdown-item>
|
||||
<el-dropdown-item command="false">设为成员</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-popover>
|
||||
</div>
|
||||
</transition-group>
|
||||
</draggable>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="clusterMembersSubmitBtn" justify="end" type="flex">
|
||||
<!-- <el-button @click="addCluster">添加团</el-button>-->
|
||||
<el-button @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button @click="setClusterMembers" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<div>
|
||||
<vi-title title="团列表"></vi-title>
|
||||
<el-card shadow="never">
|
||||
<el-tag :effect="item.id === selectClusterTagId ? 'dark':'light'"
|
||||
:key="item.id"
|
||||
@click="selectClusterTagId = item.id"
|
||||
class="mr10"
|
||||
style="cursor: pointer"
|
||||
v-for="item in clusterViewList"
|
||||
v-if="clusterViewList && clusterViewList.length>0">
|
||||
{{ item.clusterName }}
|
||||
</el-tag>
|
||||
</el-card>
|
||||
<vi-title class="mt10" title="人员列表"></vi-title>
|
||||
<el-card shadow="never">
|
||||
<el-table :data="clusterTableData">
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column label="一卡通号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="身份" prop="isLeader">
|
||||
<template scope="{row}">
|
||||
<span class="text-primary" v-if="row.isLeader">团长</span>
|
||||
<span v-else>成员</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="batchMoveDialogVisible" title="批量调整" width="60%">
|
||||
<div class="mb10">
|
||||
<vi-title2 title="原分组"></vi-title2>
|
||||
<el-radio-group size="small" v-model="batchMoveData.originalGroup">
|
||||
<el-radio :label="item"
|
||||
border
|
||||
v-for="(item,key) in clusterData">{{item.clusterName}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
|
||||
<el-table :data="batchMoveData.originalGroup.members"
|
||||
class="mt10 mb10"
|
||||
max-height="250px"
|
||||
ref="originalGroupMembersTable"
|
||||
v-show="batchMoveData.originalGroup && batchMoveData.originalGroup.members">
|
||||
<el-table-column type="selection"></el-table-column>
|
||||
<el-table-column label="一卡通号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="工会" prop="unionName"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div v-if="batchMoveData.originalGroup.members.length>0">
|
||||
<vi-title2 title="筛选条件"></vi-title2>
|
||||
|
||||
<el-form label-width="80px">
|
||||
<el-form-item label="分工会">
|
||||
<el-select multiple size="small" style="width: 100%" v-model="batchMoveData.cnd.unionNames">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.unionname"
|
||||
v-for="item in unionOptions">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="mb10" v-if="batchMoveData.originalGroup.members.length>0">
|
||||
<vi-title2 title="移动后分组"></vi-title2>
|
||||
<el-radio-group size="small" v-model="batchMoveData.currentGroup">
|
||||
<el-radio :disabled="item.clusterName == batchMoveData.originalGroup.clusterName"
|
||||
:label="item"
|
||||
border
|
||||
v-for="(item,key) in clusterData">{{item.clusterName}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
<el-row justify="end" type="flex">
|
||||
<el-button @click="batchMoveDialogVisible=false">取消</el-button>
|
||||
<el-button @click="doBatchMove" type="primary">确定</el-button>
|
||||
</el-row>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/assets/platform/plugins/sortablejs/sortable.min.js"></script>
|
||||
<script src="/assets/platform/plugins/vuedraggable/vuedraggable.umd.min.js"></script>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'line-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{label: '年度', prop: 'year', sortable: true},
|
||||
{label: '线路名称', prop: 'lineName', sortable: true},
|
||||
{label: '线路编号', prop: 'serialNumber', sortable: true},
|
||||
{label: '旅行社名称', prop: 'travelAgencyName', sortable: true},
|
||||
{label: '线路类型', prop: 'regionalNature', sortable: true},
|
||||
{label: '出行时间', prop: 'times', sortable: true},
|
||||
{label: '最少参与教工', prop: 'minimumGroupSize', sortable: true},
|
||||
// {label: '创建工会', prop: 'createUnionName'},
|
||||
// {label: '创建人', prop: 'createUserName', sortable: true},
|
||||
// {label: '创建模式', prop: 'createMode'},
|
||||
{label: '线路归属', prop: 'ascriptionUnionName', sortable: true},
|
||||
// {label: '组织形式', prop: 'signUpMode', sortable: true},
|
||||
],
|
||||
pageForm: {
|
||||
keywords: null,
|
||||
year: new Date().getFullYear().toString(),
|
||||
selectStatus: 0
|
||||
},
|
||||
drag: false,
|
||||
clusterData: {},
|
||||
tgGroup: 'min-height:100%;display: block',
|
||||
lineId: null,
|
||||
clusterViewList: [],
|
||||
selectClusterTagId: null,
|
||||
batchMoveDialogVisible: false,
|
||||
batchMoveData: {
|
||||
originalGroup: {
|
||||
members: []
|
||||
},
|
||||
currentGroup: null,
|
||||
cnd: {}
|
||||
},
|
||||
unionOptions: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
clusterTableData() {
|
||||
if (this.selectClusterTagId) {
|
||||
return this.clusterViewList.find(v => v.id === this.selectClusterTagId).members
|
||||
}
|
||||
return []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'batchMoveData.cnd': {
|
||||
handler(v) {
|
||||
const unionNames = v['unionNames']
|
||||
console.log(unionNames)
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getClusterName(item) {
|
||||
let count = 0
|
||||
item.members.forEach(item => {
|
||||
count += item.companionCount
|
||||
})
|
||||
return item.clusterName + '(' + (item.members.length + count) + ')'
|
||||
},
|
||||
async openViewClusterInfo(id) {
|
||||
this.$refs.guava.view()
|
||||
const resp = await $.post(loc() + '/selectClusterInfo/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.clusterViewList = resp.data
|
||||
if (this.clusterViewList && this.clusterViewList.length > 0) {
|
||||
this.selectClusterTagId = this.clusterViewList[0].id
|
||||
} else {
|
||||
this.selectClusterTagId = null
|
||||
}
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async openCluster(id, ascriptionUnionId) {
|
||||
this.lineId = id
|
||||
this.$refs.guava.edit()
|
||||
const resp = await $.post(loc() + '/findClusterInfo/', {
|
||||
lineId: id,
|
||||
usUnionId: ascriptionUnionId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.clusterData = resp.data
|
||||
}
|
||||
},
|
||||
addCluster() {
|
||||
const l = Object.keys(this.clusterData).length
|
||||
const key = "cluster" + l
|
||||
this.$set(this.clusterData, key, {
|
||||
members: [],
|
||||
clusterName: '团' + l,
|
||||
editClusterName: false,
|
||||
lineId: this.lineId
|
||||
})
|
||||
},
|
||||
removeCluster(key) {
|
||||
const h = this.clusterData[key]
|
||||
const m = h.members
|
||||
this.clusterData['unSelectedUsers'].members.push(...m)
|
||||
delete this.clusterData[key]
|
||||
},
|
||||
|
||||
async setClusterMembers() {
|
||||
const emptyCluster = Object.values(vue.clusterData).filter(v => v.clusterName !== '线路未分配人员').find(v => v.members.length === 0)
|
||||
if (emptyCluster) {
|
||||
this.notifyWarning(emptyCluster.clusterName + '未分配成员,请分配后再提交!')
|
||||
return
|
||||
}
|
||||
|
||||
const resp = await $.post(loc() + '/setClusterMembers', {
|
||||
clusters: JSON.stringify(this.clusterData),
|
||||
lineId: this.lineId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.$refs.guava.index()
|
||||
this.lineId = null
|
||||
this.clusterData = {}
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
setMemberRole(key, loginName, isLeader) {
|
||||
const i = this.clusterData[key].members.findIndex(v => v.loginName === loginName)
|
||||
this.$set(this.clusterData[key].members[i], 'isLeader', isLeader)
|
||||
},
|
||||
openBatchMove() {
|
||||
this.batchMoveDialogVisible = true
|
||||
this.batchMoveData = {
|
||||
originalGroup: {
|
||||
members: []
|
||||
},
|
||||
currentGroup: null,
|
||||
cnd: {}
|
||||
}
|
||||
},
|
||||
doBatchMove() {
|
||||
const unionNames = this.batchMoveData.cnd.unionNames
|
||||
|
||||
|
||||
//需要移动的数据(工会筛选)
|
||||
let filterData = []
|
||||
const unionSelectData = this.batchMoveData.originalGroup.members.filter(v => unionNames.includes(v['unionName']))
|
||||
const selectionData = this.$refs.originalGroupMembersTable.selection
|
||||
filterData = filterData.concat(unionSelectData).concat(selectionData)
|
||||
|
||||
const filterLoginNames = filterData.map(v => v.loginName)
|
||||
|
||||
//原分组移动之后剩下的数据
|
||||
const deleteData = this.batchMoveData.originalGroup.members.filter(v => !filterLoginNames.includes(v.loginName))
|
||||
|
||||
//现分组Name
|
||||
const cName = this.batchMoveData.currentGroup.clusterName
|
||||
|
||||
//原分组Name
|
||||
const oName = this.batchMoveData.originalGroup.clusterName
|
||||
|
||||
|
||||
for (let k in this.clusterData) {
|
||||
if (this.clusterData[k]['clusterName'] === cName) {
|
||||
this.clusterData[k].members = this.clusterData[k].members.concat(filterData)
|
||||
}
|
||||
if (this.clusterData[k]['clusterName'] === oName) {
|
||||
this.clusterData[k].members = deleteData
|
||||
}
|
||||
}
|
||||
|
||||
this.batchMoveDialogVisible = false
|
||||
},
|
||||
|
||||
createModeName(val) {
|
||||
const d = this.createModeList.find(v => v.value === val)
|
||||
return d ? d.label : null
|
||||
},
|
||||
signUpModeName(val) {
|
||||
const d = this.signUpModeList.find(v => v.value === val)
|
||||
return d ? d.label : null
|
||||
},
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.createModeList = await getEnumOptions('TheRapyRecuperationLineCreateMode')
|
||||
this.signUpModeList = await getEnumOptions('TheRapyRecuperationSignUpMode')
|
||||
this.unionOptions = await getUnions(null)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,687 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
@change="yearChange"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
:clearable="false">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">旅行社:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.travelAgencyId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id"
|
||||
v-for="item in travelAgencyArray"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">线路类型:</div>
|
||||
<div class="search-item-option">
|
||||
<el-radio-group class="mr0-radio"
|
||||
@change="doSearch"
|
||||
v-model="pageForm.regionalNature">
|
||||
<el-radio-button :label="item.value"
|
||||
border
|
||||
v-for="item in regionalNatureList">
|
||||
{{item.label}}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">线路名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch"
|
||||
clearable
|
||||
placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.keywords">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">分工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id"
|
||||
v-for="item in unionOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">时间标段:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.lotId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id"
|
||||
v-for="item in lotList"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="线路列表">
|
||||
<template #func>
|
||||
<el-button @click="doExportExcel" icon="el-icon-download" size="small" type="primary">导出表格</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData"
|
||||
:size="tableSize"
|
||||
@sort-change="pageOrder"
|
||||
ref="table"
|
||||
row-key="lineUnionSelectId"
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-loading="tableLoading">
|
||||
<el-table-column :index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column :key="column.prop"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns">
|
||||
<template scope="{row}" v-if="column.prop === 'playTimes' || column.prop === 'signUpTimes'">
|
||||
<template v-if="row[column.prop]">
|
||||
<template slot="content">
|
||||
<div :class="[index === row[column.prop].split(',').length - 1 ? '' : 'mb10']"
|
||||
:key="item"
|
||||
v-for="(item, index) in row[column.prop].split(',')">
|
||||
{{item}}
|
||||
</div>
|
||||
</template>
|
||||
<div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis">
|
||||
{{row[column.prop]}}
|
||||
</div>
|
||||
</template>
|
||||
<span v-else>暂未设置</span>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop === 'signUpMode'">
|
||||
{{signUpModeName(row.signUpMode)}}
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop === 'isOpen'">
|
||||
{{row.isOpen ? '是' : '否'}}
|
||||
</template>
|
||||
<template scope="{row}" v-else>
|
||||
{{row[column.prop]}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="120px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{action: openViewLineInfo, value: row}">
|
||||
查看线路基本信息
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{action: openViewTimeSlot, value: row}">
|
||||
查看出行时间段
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{action: openEditTimeSlot, value: row}">
|
||||
修改出行时间段
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{action: cancelLine, value: row}">
|
||||
取消线路
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<line-info ref="viewLineInfo"></line-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog :close-on-click-modal="false"
|
||||
:visible.sync="timeSlotsDialogVisible"
|
||||
title="出行时间段"
|
||||
width="85%">
|
||||
<el-table :data="timeSlots" border>
|
||||
<el-table-column label="报名开始时间" prop="signUpStartTime" width="160"></el-table-column>
|
||||
<el-table-column label="报名结束时间" prop="signUpEndTime" width="160"></el-table-column>
|
||||
<el-table-column label="变更截至时间" prop="changeEndTime" width="160"></el-table-column>
|
||||
<el-table-column label="出行开始时间" prop="playStartTime" width="160"></el-table-column>
|
||||
<el-table-column label="出行结束时间" prop="playEndTime" width="160"></el-table-column>
|
||||
<el-table-column label="旅行社" prop="travelAgencyName" width="150" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="联系人" prop="contact" width="100"></el-table-column>
|
||||
<el-table-column label="联系电话" prop="contactPhone" width="120"></el-table-column>
|
||||
<el-table-column label="联络人" prop="principal" width="100"></el-table-column>
|
||||
<el-table-column label="联络人联系方式" prop="principalContact" width="120"></el-table-column>
|
||||
<el-table-column label="交通工具" prop="trafficTools" width="100"></el-table-column>
|
||||
<el-table-column label="预计费用(元/人次)" prop="estimatedCost" width="140"></el-table-column>
|
||||
<el-table-column label="最少成团人数(包括家属)" prop="estimatedFamilyNumbers" width="170"></el-table-column>
|
||||
<el-table-column label="最多人数" prop="maxPeopleNumber" width="100"></el-table-column>
|
||||
<el-table-column label="是否开启" width="80">
|
||||
<template scope="{row}">
|
||||
{{row.enable ? '是' : '否'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="调剂报名截止时间" prop="adjustSignUpEndTime" width="160"></el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :close-on-click-modal="false"
|
||||
:visible.sync="editTimeSlotsDialogVisible"
|
||||
title="修改出行时间段"
|
||||
width="85%">
|
||||
<el-form :model="editTimeSlotsForm" label-width="0" ref="editTimeSlotsForm" size="small">
|
||||
<h4>{{editTimeSlotsForm.lineName}}</h4>
|
||||
<div :key="row.id || $index"
|
||||
class="panel panel-default mt20"
|
||||
style="border: none"
|
||||
v-for="(row, $index) in editTimeSlotsForm.times">
|
||||
<div class="panel-heading"
|
||||
style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none;display: flex;align-items: center;justify-content: space-between">
|
||||
<h3 class="panel-title">
|
||||
时间段{{$index + 1}}
|
||||
</h3>
|
||||
<el-button @click="removeEditTimeSlot($index)"
|
||||
circle
|
||||
icon="el-icon-circle-close"
|
||||
size="mini"
|
||||
type="danger"></el-button>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-descriptions border :column="3">
|
||||
<el-descriptions-item>
|
||||
<template slot="label"><span class="text-danger">*</span>报名开始时间</template>
|
||||
<el-form-item :prop="'times.' + $index + '.signUpStartTime'"
|
||||
:rules="{required:true,message:'请选择报名开始时间',trigger:['change','blur']}">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
v-model="row.signUpStartTime"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"><span class="text-danger">*</span>报名结束时间</template>
|
||||
<el-form-item :prop="'times.' + $index + '.signUpEndTime'"
|
||||
:rules="{required:true,message:'请选择报名结束时间',trigger:['change','blur']}">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
v-model="row.signUpEndTime"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"><span class="text-danger">*</span>变更截至时间</template>
|
||||
<el-form-item :prop="'times.' + $index + '.changeEndTime'"
|
||||
:rules="{required:true,message:'请选择变更截至时间',trigger:['change','blur']}">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
v-model="row.changeEndTime"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"><span class="text-danger">*</span>出行开始时间</template>
|
||||
<el-form-item :prop="'times.' + $index + '.playStartTime'"
|
||||
:rules="{required:true,message:'请选择出行开始时间',trigger:['change','blur']}">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
v-model="row.playStartTime"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"><span class="text-danger">*</span>出行结束时间</template>
|
||||
<el-form-item :prop="'times.' + $index + '.playEndTime'"
|
||||
:rules="{required:true,message:'请选择出行结束时间',trigger:['change','blur']}">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
v-model="row.playEndTime"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="调剂报名截止时间">
|
||||
<el-form-item :prop="'times.' + $index + '.adjustSignUpEndTime'">
|
||||
<el-date-picker clearable
|
||||
style="width: 100%"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
v-model="row.adjustSignUpEndTime"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"><span class="text-danger">*</span>旅行社</template>
|
||||
<el-form-item :prop="'times.' + $index + '.travelAgencyId'"
|
||||
:rules="{required:true,message:'请选择旅行社',trigger:['change','blur']}">
|
||||
<el-select @change="(val) => {selectTravelAgencyChange(val, row)}"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择旅行社"
|
||||
style="width: 100%"
|
||||
v-model="row.travelAgencyId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id"
|
||||
v-for="item in travelAgencyArray"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"><span class="text-danger">*</span>联系人</template>
|
||||
<el-form-item :prop="'times.' + $index + '.contact'"
|
||||
:rules="{required:true,message:'请输入联系人',trigger:['change','blur']}">
|
||||
<el-input clearable maxlength="10" v-model="row.contact"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"><span class="text-danger">*</span>联系电话</template>
|
||||
<el-form-item :prop="'times.' + $index + '.contactPhone'"
|
||||
:rules="[
|
||||
{required:true,message:'请输入联系电话',trigger:'blur'},
|
||||
{pattern:/^1[3-9]\d{9}$/,message:'联系电话格式不正确',trigger:'blur'}
|
||||
]">
|
||||
<el-input clearable maxlength="11" v-model="row.contactPhone"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"><span class="text-danger">*</span>联络人</template>
|
||||
<el-form-item :prop="'times.' + $index + '.principal'"
|
||||
:rules="{required:true,message:'请输入联络人',trigger:['change','blur']}">
|
||||
<el-input clearable maxlength="10" v-model="row.principal"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"><span class="text-danger">*</span>联络人联系方式</template>
|
||||
<el-form-item :prop="'times.' + $index + '.principalContact'"
|
||||
:rules="[
|
||||
{required:true,message:'请输入联络人联系方式',trigger:'blur'},
|
||||
{pattern:/^1[3-9]\d{9}$/,message:'联系方式格式不正确',trigger:'blur'}
|
||||
]">
|
||||
<el-input clearable maxlength="11" v-model="row.principalContact"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交通工具">
|
||||
<el-form-item :prop="'times.' + $index + '.trafficTools'">
|
||||
<el-input clearable v-model="row.trafficTools"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预计费用(元/人次)">
|
||||
<el-form-item :prop="'times.' + $index + '.estimatedCost'"
|
||||
:rules="{required:true,message:'请输入预计费用',trigger:['change','blur']}">
|
||||
<el-input clearable v-model="row.estimatedCost"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="最少成团人数(包括家属)">
|
||||
<el-form-item :prop="'times.' + $index + '.estimatedFamilyNumbers'"
|
||||
:rules="{pattern:/^[0-9]*$/,message:'最少成团人数格式不正确',trigger:'blur'}">
|
||||
<el-input clearable v-model="row.estimatedFamilyNumbers"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="最多人数">
|
||||
<el-form-item :prop="'times.' + $index + '.maxPeopleNumber'"
|
||||
:rules="{pattern:/^[0-9]*$/,message:'最多人数格式不正确',trigger:'blur'}">
|
||||
<el-input clearable v-model="row.maxPeopleNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否开启">
|
||||
<el-form-item :prop="'times.' + $index + '.enable'">
|
||||
<el-switch active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.enable"></el-switch>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="text-right mb25">
|
||||
<el-button @click="addEditTimeSlot" size="mini" type="primary">新增出行时间</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="end" type="flex">
|
||||
<el-button @click="closeEditTimeSlots">取消</el-button>
|
||||
<el-button :loading="editTimeSlotsLoading" @click="saveEditTimeSlots" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'line-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
year: moment().format('YYYY'),
|
||||
keywords: null,
|
||||
travelAgencyId: null,
|
||||
unionId: null,
|
||||
lotId: null,
|
||||
regionalNature: '全部'
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '选择工会', prop: 'unionName', sortable: true},
|
||||
{label: '线路名称', prop: 'lineName', sortable: true},
|
||||
{label: '线路类型', prop: 'regionalNature', sortable: true},
|
||||
// {label: '时间标段', prop: 'lotName', sortable: true},
|
||||
{label: '报名时间', prop: 'signUpTimes', sortable: 'custom', width: 230},
|
||||
{label: '出行时间', prop: 'playTimes', sortable: 'custom', width: 230},
|
||||
{label: '调剂报名截止时间', prop: 'adjustSignUpEndTime', sortable: true, width: 160},
|
||||
// {label: '组织形式', prop: 'signUpMode', sortable: true},
|
||||
// {label: '是否开放对外报名', prop: 'isOpen', sortable: true}
|
||||
],
|
||||
travelAgencyArray: [],
|
||||
unionOptions: [],
|
||||
lotList: [],
|
||||
regionalNatureList: [{
|
||||
label: '全部线路',
|
||||
value: '全部'
|
||||
}],
|
||||
signUpModeList: [],
|
||||
timeSlotsDialogVisible: false,
|
||||
timeSlots: [],
|
||||
editTimeSlotsDialogVisible: false,
|
||||
editTimeSlotsLoading: false,
|
||||
editTimeSlotsForm: {
|
||||
lineId: null,
|
||||
unionId: null,
|
||||
lineName: null,
|
||||
times: []
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.$set(this.pageForm, 'pageNumber', 1)
|
||||
this.pageData()
|
||||
},
|
||||
yearChange() {
|
||||
this.$set(this.pageForm, 'travelAgencyId', null)
|
||||
this.getTravelAgencyOptions(() => {
|
||||
this.doSearch()
|
||||
})
|
||||
},
|
||||
pageOrder(column) {
|
||||
if (column.prop === 'playTimes') {
|
||||
this.$set(this.pageForm, 'pageOrderName', 'playTime')
|
||||
} else if (column.prop === 'signUpTimes') {
|
||||
this.$set(this.pageForm, 'pageOrderName', 'signUpTimes')
|
||||
} else {
|
||||
this.$set(this.pageForm, 'pageOrderName', column.prop)
|
||||
}
|
||||
this.$set(this.pageForm, 'pageOrderBy', column.order)
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
$.post(loc() + '/pageData', this.pageForm)
|
||||
.then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$set(this, 'tableData', resp.data.list || [])
|
||||
this.$set(this.pageForm, 'totalCount', resp.data.totalCount || 0)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
.always(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
doExportExcel() {
|
||||
let url = loc() + '/doExportExcel?year=' + encodeURIComponent(this.pageForm.year || '')
|
||||
url += this.buildExportParam('keywords', this.pageForm.keywords)
|
||||
url += this.buildExportParam('travelAgencyId', this.pageForm.travelAgencyId)
|
||||
url += this.buildExportParam('unionId', this.pageForm.unionId)
|
||||
url += this.buildExportParam('lotId', this.pageForm.lotId)
|
||||
url += this.buildExportParam('regionalNature', this.pageForm.regionalNature)
|
||||
url += this.buildExportParam('pageOrderName', this.pageForm.pageOrderName)
|
||||
url += this.buildExportParam('pageOrderBy', this.pageForm.pageOrderBy)
|
||||
window.open(url)
|
||||
},
|
||||
buildExportParam(name, value) {
|
||||
return '&' + name + '=' + encodeURIComponent(value == null ? '' : value)
|
||||
},
|
||||
openViewLineInfo(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewLineInfo.openView(row.lineId, null, 1, this.pageForm.year)
|
||||
},
|
||||
openViewTimeSlot(row) {
|
||||
$.post(loc() + '/timeSlots', {
|
||||
lineId: row.lineId,
|
||||
unionId: row.unionId,
|
||||
year: this.pageForm.year
|
||||
}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$set(this, 'timeSlots', resp.data || [])
|
||||
this.$set(this, 'timeSlotsDialogVisible', true)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}).always(() => {
|
||||
})
|
||||
},
|
||||
openEditTimeSlot(row) {
|
||||
$.post(loc() + '/timeSlots', {
|
||||
lineId: row.lineId,
|
||||
unionId: row.unionId,
|
||||
year: this.pageForm.year
|
||||
}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$set(this, 'editTimeSlotsForm', {
|
||||
lineId: row.lineId,
|
||||
unionId: row.unionId,
|
||||
lineName: row.lineName,
|
||||
times: resp.data && resp.data.length > 0 ? resp.data : [this.createEditTimeSlotRow()]
|
||||
})
|
||||
this.$set(this, 'editTimeSlotsDialogVisible', true)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}).always(() => {
|
||||
})
|
||||
},
|
||||
createEditTimeSlotRow() {
|
||||
return {
|
||||
enable: true,
|
||||
signUpMode: 1,
|
||||
signUpStartTime: null,
|
||||
signUpEndTime: null,
|
||||
changeEndTime: null,
|
||||
adjustSignUpEndTime: null,
|
||||
playStartTime: null,
|
||||
playEndTime: null,
|
||||
travelAgencyId: null,
|
||||
contact: null,
|
||||
contactPhone: null,
|
||||
principal: null,
|
||||
principalContact: null,
|
||||
trafficTools: null,
|
||||
estimatedCost: null,
|
||||
estimatedFamilyNumbers: null,
|
||||
maxPeopleNumber: 0
|
||||
}
|
||||
},
|
||||
addEditTimeSlot() {
|
||||
this.editTimeSlotsForm.times.push(this.createEditTimeSlotRow())
|
||||
},
|
||||
removeEditTimeSlot(index) {
|
||||
if (this.editTimeSlotsForm.times.length <= 1) {
|
||||
this.$message.warning('请至少保留一个出行时间段')
|
||||
return
|
||||
}
|
||||
this.editTimeSlotsForm.times.splice(index, 1)
|
||||
},
|
||||
closeEditTimeSlots() {
|
||||
this.$set(this, 'editTimeSlotsDialogVisible', false)
|
||||
},
|
||||
selectTravelAgencyChange(val, row) {
|
||||
const item = this.travelAgencyArray.find(item => item.id === val)
|
||||
if (item) {
|
||||
this.$set(row, 'contact', item.contact)
|
||||
this.$set(row, 'contactPhone', item.contactMobileNumber)
|
||||
}
|
||||
},
|
||||
saveEditTimeSlots() {
|
||||
this.$refs.editTimeSlotsForm.validate((valid) => {
|
||||
if (!valid) {
|
||||
return
|
||||
}
|
||||
this.$set(this, 'editTimeSlotsLoading', true)
|
||||
$.post(loc() + '/saveTimeSlots', {
|
||||
lineId: this.editTimeSlotsForm.lineId,
|
||||
unionId: this.editTimeSlotsForm.unionId,
|
||||
year: this.pageForm.year,
|
||||
lineUnionSelects: JSON.stringify(this.editTimeSlotsForm.times)
|
||||
}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.$set(this, 'editTimeSlotsDialogVisible', false)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}).always(() => {
|
||||
this.$set(this, 'editTimeSlotsLoading', false)
|
||||
})
|
||||
})
|
||||
},
|
||||
cancelLine(row) {
|
||||
const msg = '确认取消该分工会选择的线路吗?取消后将删除该线路下已有报名、床位、同伴和变更记录。'
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
$.post(loc() + '/cancelLine', {
|
||||
lineId: row.lineId,
|
||||
unionId: row.unionId,
|
||||
year: this.pageForm.year
|
||||
}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}).always(() => {
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
getTravelAgencyOptions(callback) {
|
||||
$.post(loc() + '/travelAgencyOptions', {
|
||||
year: this.pageForm.year
|
||||
})
|
||||
.then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$set(this, 'travelAgencyArray', resp.data || [])
|
||||
}
|
||||
})
|
||||
.always(() => {
|
||||
if (callback) {
|
||||
callback()
|
||||
}
|
||||
})
|
||||
},
|
||||
getLotOptions() {
|
||||
$.post(loc() + '/lotOptions')
|
||||
.then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$set(this, 'lotList', resp.data || [])
|
||||
}
|
||||
})
|
||||
.always(() => {
|
||||
})
|
||||
},
|
||||
getUnionOptions() {
|
||||
getUnions(null).then((resp) => {
|
||||
this.$set(this, 'unionOptions', resp || [])
|
||||
})
|
||||
},
|
||||
getRegionalNatureOptions() {
|
||||
getEnumOptions('TheRapyRecuperationProvinceType').then((resp) => {
|
||||
this.$set(this, 'regionalNatureList', this.regionalNatureList.concat(resp || []))
|
||||
})
|
||||
},
|
||||
getSignUpModeOptions() {
|
||||
getEnumOptions('TheRapyRecuperationSignUpMode').then((resp) => {
|
||||
this.$set(this, 'signUpModeList', resp || [])
|
||||
})
|
||||
},
|
||||
signUpModeName(val) {
|
||||
const item = this.signUpModeList.find(item => item.value === val)
|
||||
return item ? item.label : null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getTravelAgencyOptions()
|
||||
this.getLotOptions()
|
||||
this.getUnionOptions()
|
||||
this.getRegionalNatureOptions()
|
||||
this.getSignUpModeOptions()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,892 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.timesTable .el-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.playPeriod {
|
||||
/*display: flex;*/
|
||||
/*flex-wrap: wrap;*/
|
||||
}
|
||||
|
||||
.playPeriod .el-form-item {
|
||||
/*flex: 0 0 20%;*/
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
@change="yearChange"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
:clearable="false">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">旅行社:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
v-model="pageForm.travelAgencyId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id"
|
||||
v-for="item in travelAgencyArray"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">线路类型:</div>
|
||||
<div class="search-item-option">
|
||||
<el-radio-group class="mr0-radio"
|
||||
@change="doSearch"
|
||||
v-model="pageForm.regionalNature">
|
||||
<el-radio-button :label="item.value"
|
||||
border v-for="item in regionalNatureList">
|
||||
{{item.label}}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">线路名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.keywords">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">时间标段:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch" clearable filterable
|
||||
style="width: 100%"
|
||||
v-model="pageForm.lotId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id"
|
||||
v-for="item in lotList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this"
|
||||
:label="'线路列表(温馨提示:您本年度省外线路最少需选择' + unionLineNumberConfig.minProvinceOutNumber + '条,省内最少' + unionLineNumberConfig.minProvinceInNumber + '条。目前已选择省外' + selectedLineCount.outCount + '条,省内' + selectedLineCount.inCount + '条)'">
|
||||
<template #func>
|
||||
|
||||
<el-radio-group @change="doSearch" size="small" v-model="pageForm.selectStatus">
|
||||
<!--<el-radio-button :label="0">全部</el-radio-button>-->
|
||||
<el-radio-button :label="1">已选择</el-radio-button>
|
||||
<el-radio-button :label="-1">可选择</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
ref="table"
|
||||
align="center"
|
||||
row-key="id"
|
||||
@selection-change="handleSelectionChange"
|
||||
header-align="center">
|
||||
<!-- <el-table-column type="selection" reserve-selection width="55px"
|
||||
:selectable="(row)=>{return row.isDisabled==true || !(row.usId==null || row.usId == '')}"></el-table-column>
|
||||
-->
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
:show-overflow-tooltip="column.prop!=='playTime'"
|
||||
:key="column.prop"
|
||||
v-for="column in tableColumns"
|
||||
:width="column.width"
|
||||
>
|
||||
<!--<template scope="{row}" v-if="column.prop==='isDisabled'">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
@change="(val)=>{lineStatusChange(row.id)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isDisabled">
|
||||
</el-switch>
|
||||
</template>-->
|
||||
<template scope="{row:{signUpMode}}" v-if="column.prop==='signUpMode'">
|
||||
{{signUpModeName(signUpMode)}}
|
||||
</template>
|
||||
<template scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
|
||||
{{createModeName(createMode)}}
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop==='belongUnionName'">
|
||||
{{pageForm.mode == 2 && pageForm.selectStatus == 1 ? '校工会' : row.belongUnionName}}
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop==='playTime'">
|
||||
<template v-if="row.playTimes">
|
||||
<!--<el-tooltip placement="top">
|
||||
<div slot="content">
|
||||
<div v-for="t in row.playTimes.split(',')" :key="t">
|
||||
{{t}}
|
||||
</div>
|
||||
</div>
|
||||
{{row.playTimes}}
|
||||
</el-tooltip>-->
|
||||
<el-tooltip placement="top">
|
||||
<div slot="content">
|
||||
<div v-for="(t,ti) in row.playTimes.split(',')" :key="t"
|
||||
:class="[ti==row.playTimes.split(',').length-1?'':'mb10']">
|
||||
{{t}}
|
||||
</div>
|
||||
</div>
|
||||
<div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis">
|
||||
{{row.playTimes}}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<!-- <div v-for="t in row.playTimes.split(',')" :key="t">
|
||||
{{t}}
|
||||
</div>-->
|
||||
</template>
|
||||
<el-button v-else @click="openSetLineTime(row)" :disabled="!canSelectLine()" type="text">
|
||||
选择并设置出行时间段
|
||||
</el-button>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop==='createUnionName'">
|
||||
<span v-if="!row.isSelect">
|
||||
{{row.createUnionName}}
|
||||
</span>
|
||||
<span v-else>{{row.belongUnionName}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="100px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{action:openViewLineInfo,value:row}">
|
||||
查看线路基本信息
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{action:openViewTimeSlot,value:row}" v-if="row.usId">
|
||||
查看出行时间段
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{action:openSetLineTime,value:row}" :disabled="!canSelectLine()" v-if="!row.usId">
|
||||
选择设置出行时间段
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{action:openSetLineTime,value:row}" :disabled="!canSelectLine()" v-if="row.usId">
|
||||
修改出行时间段
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{action:deSelect,value:row}" :disabled="!canSelectLine()" v-if="row.usId">
|
||||
取消选择
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<line-info ref="viewLineInfo"></line-info>
|
||||
</template>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="setLineTimeDialog" title="设置出行时间段信息"
|
||||
width="80%">
|
||||
<el-form :model="formData" :rules="rules" label-width="0" ref="form" size="small">
|
||||
<h4>{{formData.lineName}}</h4>
|
||||
|
||||
<div v-for="(row,$index) in formData.times" :key="row.id" class="panel panel-default mt20"
|
||||
style="border: none">
|
||||
<div class="panel-heading"
|
||||
style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none;display: flex;align-items: center;justify-content: space-between">
|
||||
<h3 class="panel-title">
|
||||
时间段{{$index+1}}
|
||||
</h3>
|
||||
<el-button icon="el-icon-circle-close" circle size="mini" type="danger"
|
||||
@click="formData.times.splice($index,1)"></el-button>
|
||||
</div>
|
||||
<el-row class="playPeriod">
|
||||
|
||||
<el-descriptions border :column="3" class="playPeriodTable">
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
出行开始时间
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.playStartTime'"
|
||||
:rules="{required:true,message:'出行开始时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="row.playStartTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
出行结束时间
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.playEndTime'"
|
||||
:rules="{required:true,message:'出行结束时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="row.playEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
旅行社
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.travelAgencyId'"
|
||||
:rules="{required:true,message:'旅行社',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-select v-model="row.travelAgencyId" style="width: 100%" clearable filterable
|
||||
placeholder="请选择旅行社"
|
||||
disabled
|
||||
@change="(val) => {selectTravelChange(val, row)}">
|
||||
<el-option :key="item.id"
|
||||
:label="item.travelAgencyName+'('+ item.year +'年)'"
|
||||
:value="item.id"
|
||||
v-for="item in travelAgencyList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
联系人
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.contact'"
|
||||
:rules="{required:true,message:'联系人',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-input clearable maxlength="10" disabled v-model="row.contact"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
联系电话
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.contactPhone'"
|
||||
:rules="[
|
||||
{ required: true, message: '联系电话不能为空', trigger: 'blur' },
|
||||
{ pattern: /^1[3-9]\d{9}$/, message: '联系电话格式不正确', trigger: 'blur' }
|
||||
]"
|
||||
label-width="0">
|
||||
<el-input clearable maxlength="11" disabled v-model="row.contactPhone"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
联络员
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.principal'"
|
||||
:rules="{required:true,message:'请输入联络员',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-input clearable maxlength="10" v-model="row.principal"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
联络员联系方式
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.principalContact'"
|
||||
:rules="[
|
||||
{ required: true, message: '联系方式不能为空', trigger: 'blur' },
|
||||
{ pattern: /^1[3-9]\d{9}$/, message: '联系方式格式不正确', trigger: 'blur' }
|
||||
]"
|
||||
label-width="0">
|
||||
<el-input clearable maxlength="11" v-model="row.principalContact"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<!--<el-descriptions-item label="最少参与教工">
|
||||
<el-form-item :prop="'times.' + $index + '.minimumGroupSize'"
|
||||
:rules="[
|
||||
{ required: true, message: '最少参与教工不能为空', trigger: 'blur' },
|
||||
{ pattern: /^[0-9]*$/, message: '最少参与教工格式不正确', trigger: 'blur' }
|
||||
]"
|
||||
label-width="0">
|
||||
<el-input clearable v-model="row.minimumGroupSize"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>-->
|
||||
|
||||
<el-descriptions-item label="交通工具">
|
||||
<el-form-item :prop="'times.' + $index + '.trafficTools'"
|
||||
:rules="{required:false,message:'交通工具',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-input clearable v-model="row.trafficTools"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="预计费用(元/人次)">
|
||||
<el-form-item :prop="'times.' + $index + '.estimatedCost'"
|
||||
:rules="{required:true,message:'预计费用',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-input clearable v-model="row.estimatedCost"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="最少成团人数(包括家属)">
|
||||
<el-form-item :prop="'times.' + $index + '.estimatedFamilyNumbers'"
|
||||
:rules="[
|
||||
{ required: false, message: '最少成团人数不能为空', trigger: 'blur' },
|
||||
{ pattern: /^[0-9]*$/, message: '最少成团人数格式不正确', trigger: 'blur' }
|
||||
]"
|
||||
label-width="0">
|
||||
<el-input clearable disabled v-model="row.estimatedFamilyNumbers"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
最多人数(为0时不控制最多人数)
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.maxPeopleNumber'"
|
||||
:rules="[
|
||||
{ required: false, message: '最多人数不能为空', trigger: 'blur' },
|
||||
{ pattern: /^[0-9]*$/, message: '最多人数格式不正确', trigger: 'blur' }
|
||||
]"
|
||||
label-width="0">
|
||||
<el-input clearable disabled v-model="row.maxPeopleNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="是否开启">
|
||||
<el-form-item :prop="'times.' + $index + '.enable'"
|
||||
label-width="0">
|
||||
<el-switch
|
||||
disabled
|
||||
v-model="row.enable"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="text-right mb25">
|
||||
<el-button
|
||||
@click="formData.times.push(createLineTimeRow())"
|
||||
size="mini" type="primary">新增出行时间
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="end" type="flex">
|
||||
<el-button @click="setLineTimeDialog=false">取消</el-button>
|
||||
<el-button @click="doSelect" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="timeLotsDialogVisible" title="查看出行时间段信息"
|
||||
width="80%">
|
||||
<div v-for="(row,$index) in timeLots" :key="row.id" class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading"
|
||||
style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none;display: flex;align-items: center;justify-content: space-between">
|
||||
<h3 class="panel-title">
|
||||
时间段{{$index+1}}
|
||||
</h3>
|
||||
</div>
|
||||
<el-row class="playPeriod">
|
||||
|
||||
<el-descriptions border :column="3" class="playPeriodTable">
|
||||
<el-descriptions-item label="报名开始时间">
|
||||
{{row.signUpStartTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名结束时间">
|
||||
{{row.signUpEndTime}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="变更截至时间">
|
||||
{{row.changeEndTime}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="出行开始时间">
|
||||
{{row.playStartTime}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="出行结束时间">
|
||||
{{row.playEndTime}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="旅行社">
|
||||
{{row.travelAgencyName}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="联系人">
|
||||
{{row.contact}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="联系电话">
|
||||
{{row.contactPhone}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="联络员">
|
||||
{{row.principal}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="联络员联系方式">
|
||||
{{row.principalContact}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<!--<el-descriptions-item label="最少参与教工">
|
||||
{{row.minimumGroupSize}}
|
||||
</el-descriptions-item>-->
|
||||
|
||||
<el-descriptions-item label="交通工具">
|
||||
{{row.trafficTools}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="预计费用(元/人次)">
|
||||
{{row.estimatedCost}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="成团人数包括家属">
|
||||
{{row.estimatedFamilyNumbers}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="最多人数">
|
||||
{{row.maxPeopleNumber}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="是否开启">
|
||||
<el-switch
|
||||
disabled
|
||||
v-model="row.enable"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="组织形式">
|
||||
{{signUpModeName(row.signUpMode)}}
|
||||
</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
|
||||
</el-row>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let lineContentEditor = null
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'line-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
data() {
|
||||
const validatePlayEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择出行结束时间'))
|
||||
}
|
||||
if (this.formData.playStartTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.playStartTime)) {
|
||||
callback(new Error('出行结束时间必须大于出行开始时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
|
||||
return {
|
||||
travelAgencyArray: [],
|
||||
travelAgencyList: [],
|
||||
tableColumns: [
|
||||
// {label: '年度', prop: 'year', sortable: true},
|
||||
{label: '线路名称', prop: 'lineName', sortable: true},
|
||||
{label: '线路类型', prop: 'regionalNature', sortable: true},
|
||||
{label: '时间标段', prop: 'lotName', sortable: true, sortProp: 'lotValue'},
|
||||
{label: '出行时间', prop: 'playTime', sortable: 'custom', sortProp: 'playStartTime', width: 230},
|
||||
{label: '承担旅行社', prop: 'travelAgencyName', sortable: true},
|
||||
// {label: '所属分工会', prop: 'belongUnionName', sortable: true},
|
||||
{label: '组织形式', prop: 'signUpMode', sortable: true},
|
||||
// {label: '编号', prop: 'serialNumber', sortable: true},
|
||||
// {label: '创建模式', prop: 'createMode', sortable: true},
|
||||
//{label: '创建人', prop: 'createUserName', sortable: true},
|
||||
{label: '选择工会', prop: 'belongUnionName', sortable: true},
|
||||
// {label: '是否启用', prop: 'isDisabled', sortable: true}
|
||||
],
|
||||
rules: {
|
||||
playStartTime: [{required: true, message: '请选择出行开始时间', trigger: ['change', 'blur']}],
|
||||
playEndTime: [{required: true, validator: validatePlayEndTime, trigger: ['change', 'blur']}],
|
||||
},
|
||||
viewData: {},
|
||||
formData: {
|
||||
playStartTime: null,
|
||||
playEndTime: null,
|
||||
id: null,
|
||||
lineId: null,
|
||||
times: []
|
||||
},
|
||||
pageForm: {
|
||||
keywords: null,
|
||||
year: moment().format('YYYY'),
|
||||
selectStatus: -1,
|
||||
unionId: null,
|
||||
regionalNature: '全部'
|
||||
},
|
||||
createModeList: [],
|
||||
signUpModeList: [],
|
||||
setLineTimeDialog: false,
|
||||
unionOptions: [],
|
||||
travelAgencyOptions: [],
|
||||
lotList: [],
|
||||
timeLots: [],
|
||||
timeLotsDialogVisible: false,
|
||||
lineConfig: {
|
||||
groupNumber: null,
|
||||
cost: null
|
||||
},
|
||||
configData: {},
|
||||
regionalNatureList: [{
|
||||
label: '全部线路',
|
||||
name: 'provinceAll',
|
||||
ordinal: 0,
|
||||
provinceIn: 'provinceIn',
|
||||
provinceOut: 'provinceOut',
|
||||
value: '全部'
|
||||
}],
|
||||
|
||||
multipleSelection: [],
|
||||
unionLineNumberConfig: {
|
||||
minProvinceOutNumber: 0,
|
||||
minProvinceInNumber: 0
|
||||
},
|
||||
selectedLineCount: {
|
||||
outCount: 0,
|
||||
inCount: 0
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
doSearch() {
|
||||
this.tableData = []
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.getLineSelectLimit()
|
||||
this.pageData()
|
||||
},
|
||||
selectTravelChange(val, row) {
|
||||
const o = this.travelAgencyList.find(o => o.id === val)
|
||||
row.contact = o.contact
|
||||
row.contactPhone = o.contactMobileNumber
|
||||
},
|
||||
pageOrder(column) {
|
||||
if (column.prop === 'playTime') {
|
||||
this.pageForm.pageOrderName = 'playStartTime'
|
||||
} else {
|
||||
this.pageForm.pageOrderName = column.prop;
|
||||
}
|
||||
this.pageForm.pageOrderBy = column.order;
|
||||
this.pageData();
|
||||
},
|
||||
createLineTimeRow() {
|
||||
// 分工会选择线路只维护出行信息,报名时间由管理员后续在线路选择情况页面统一设置。
|
||||
const o = this.travelAgencyList.find(o => o.id === this.lineConfig.travelAgencyId)
|
||||
return {
|
||||
enable: true,
|
||||
minimumGroupSize: this.lineConfig.groupNumber,
|
||||
estimatedCost: this.lineConfig.cost,
|
||||
travelAgencyId: this.lineConfig.travelAgencyId,
|
||||
estimatedFamilyNumbers: this.lineConfig.outsideQuota,
|
||||
contact: o.contact,
|
||||
contactPhone: o.contactMobileNumber,
|
||||
maxPeopleNumber: 0,
|
||||
principal: null,
|
||||
principalContact: null
|
||||
}
|
||||
},
|
||||
async openViewLineInfo({id, usUnionId}) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewLineInfo.openView(id, usUnionId, GetQueryString('mode'), this.pageForm.year)
|
||||
},
|
||||
async openViewTimeSlot({id, lineName, usUnionId}) {
|
||||
const resp = await $.post(loc() + '/selectLineInfo', {
|
||||
lineId: id,
|
||||
unionId: usUnionId,
|
||||
mode: GetQueryString('mode'),
|
||||
year: this.pageForm.year
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.timeLots = resp.data
|
||||
this.timeLotsDialogVisible = true
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
async openSetLineTime({id, lineName, usUnionId, signUpMode}) {
|
||||
if (!this.assertCanSelectLine()) return
|
||||
await this.getLineConfig(id)
|
||||
|
||||
const resp = await $.post(loc() + '/selectLineInfo', {
|
||||
lineId: id,
|
||||
unionId: usUnionId,
|
||||
mode: GetQueryString('mode'),
|
||||
year: this.pageForm.year
|
||||
})
|
||||
if (resp.code === 0 && resp.data) {
|
||||
this.formData = {
|
||||
times: []
|
||||
}
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
this.$set(this.formData, 'times', resp.data)
|
||||
} else {
|
||||
this.formData.times.push(this.createLineTimeRow())
|
||||
}
|
||||
// 回显线路的旅行社
|
||||
if (this.lineConfig.travelAgencyId) {
|
||||
const o = this.travelAgencyList.find(o => o.id === this.lineConfig.travelAgencyId)
|
||||
this.formData.times.forEach(row => {
|
||||
if (!row.travelAgencyId) {
|
||||
row.travelAgencyId = this.lineConfig.travelAgencyId
|
||||
row.contact = o.contact
|
||||
row.contactPhone = o.contactMobileNumber
|
||||
}
|
||||
})
|
||||
}
|
||||
this.formData.lineId = id
|
||||
this.formData.signUpMode = signUpMode
|
||||
this.$set(this.formData, 'lineName', lineName)
|
||||
|
||||
this.setLineTimeDialog = true
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async doSelect() {
|
||||
if (!this.assertCanSelectLine()) return
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (!valid) return
|
||||
|
||||
const confirm = await this.$confirm('请再次确认,是否选择此线路为疗休养线路?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
const fmtData = this.formData.times.map(v => {
|
||||
return {
|
||||
...v,
|
||||
lineId: this.formData.lineId,
|
||||
signUpMode: this.formData.signUpMode,
|
||||
mode: GetQueryString('mode')
|
||||
}
|
||||
})
|
||||
|
||||
const resp = await $.post(loc() + '/selectLineTimes', {lineUnionSelects: JSON.stringify(fmtData)})
|
||||
if (resp.code === 0) {
|
||||
this.setLineTimeDialog = false
|
||||
this.pageData()
|
||||
this.getLineSelectLimit()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
createModeName(val) {
|
||||
const d = this.createModeList.find(v => v.value === val)
|
||||
return d ? d.label : null
|
||||
},
|
||||
signUpModeName(val) {
|
||||
const d = this.signUpModeList.find(v => v.value === val)
|
||||
return d ? d.label : null
|
||||
},
|
||||
async deSelect({applyCount, id: lineId, usUnionId: unionId}) {
|
||||
if (!this.assertCanSelectLine()) return
|
||||
const msg = applyCount > 0 ? '已经有教工选择本线路,请确认是否取消选择本线路,一旦取消将清空报名人员!!!' : '您确定要取消吗?'
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
const resp = await $.post(loc() + '/deSelect', {lineId, unionId, mode: this.pageForm.mode})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async getTravelAgencyOptions() {
|
||||
const {data} = await $.get(loc() + '/getTravelAgencyOptions', {year: this.pageForm.year})
|
||||
this.travelAgencyArray = data
|
||||
},
|
||||
async yearChange() {
|
||||
this.$set(this.pageForm, 'travelAgencyId', null)
|
||||
await this.getTravelAgencyOptions()
|
||||
await this.selectTravelAgencyList()
|
||||
this.doSearch()
|
||||
},
|
||||
async getLotList() {
|
||||
const {data} = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
|
||||
this.$set(this, 'configData', data || {})
|
||||
this.lotList = data && data.lots ? data.lots : []
|
||||
},
|
||||
canSelectLine() {
|
||||
// 校工会选择线路入口不受基础设置选择线路时间控制,分工会入口继续按配置时间限制。
|
||||
if (this.pageForm.mode == 2) {
|
||||
return true
|
||||
}
|
||||
// 选择线路时间未配置完整时保持原有不限制逻辑;配置完整时按当前时间控制选择、修改和取消选择。
|
||||
if (!this.configData || !this.configData.lineSelectStartTime || !this.configData.lineSelectEndTime) {
|
||||
return true
|
||||
}
|
||||
const now = new Date().getTime()
|
||||
const startTime = Date.parse(this.configData.lineSelectStartTime)
|
||||
const endTime = Date.parse(this.configData.lineSelectEndTime)
|
||||
if (Number.isNaN(startTime) || Number.isNaN(endTime)) {
|
||||
return true
|
||||
}
|
||||
return now >= startTime && now <= endTime
|
||||
},
|
||||
getLineSelectTimeMessage() {
|
||||
if (!this.configData || !this.configData.lineSelectStartTime || !this.configData.lineSelectEndTime) {
|
||||
return '当前未配置选择线路时间'
|
||||
}
|
||||
const now = new Date().getTime()
|
||||
const startTime = Date.parse(this.configData.lineSelectStartTime)
|
||||
const endTime = Date.parse(this.configData.lineSelectEndTime)
|
||||
if (!Number.isNaN(startTime) && now < startTime) {
|
||||
return '选择线路还未开始,开始时间:' + this.configData.lineSelectStartTime
|
||||
}
|
||||
if (!Number.isNaN(endTime) && now > endTime) {
|
||||
return '选择线路已结束,结束时间:' + this.configData.lineSelectEndTime
|
||||
}
|
||||
return '当前不在选择线路时间范围内'
|
||||
},
|
||||
assertCanSelectLine() {
|
||||
if (this.canSelectLine()) {
|
||||
return true
|
||||
}
|
||||
this.notifyWarning(this.getLineSelectTimeMessage())
|
||||
return false
|
||||
},
|
||||
async getLineConfig(lineId) {
|
||||
const {data} = await $.post(loc() + '/getLineConfig/' + lineId)
|
||||
this.lineConfig = data
|
||||
},
|
||||
getLineSelectLimit() {
|
||||
// 提示数量由后台按当前登录人、所属分工会、年度和页面 mode 统一统计,避免前端自行拼装统计口径。
|
||||
$.post(loc() + '/getUnionLineSelectLimit', {
|
||||
year: this.pageForm.year,
|
||||
mode: this.pageForm.mode
|
||||
}).then((resp) => {
|
||||
if (resp.code === 0 && resp.data) {
|
||||
this.unionLineNumberConfig.minProvinceOutNumber = resp.data.minProvinceOutNumber || 0
|
||||
this.unionLineNumberConfig.minProvinceInNumber = resp.data.minProvinceInNumber || 0
|
||||
this.selectedLineCount.outCount = resp.data.selectedProvinceOutNumber || 0
|
||||
this.selectedLineCount.inCount = resp.data.selectedProvinceInNumber || 0
|
||||
}
|
||||
}).always(() => {
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
async selectTravelAgencyList() {
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/travelAgency/selectTravelAgency', {year: this.pageForm.year})
|
||||
this.travelAgencyList = resp.data
|
||||
},
|
||||
async doEditOpen(row) {
|
||||
console.log(row)
|
||||
const resp = await $.get(loc() + '/doEditOpen', {id: row.usId})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
this.pageData()
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.$set(this.pageForm, 'mode', GetQueryString('mode'))
|
||||
if (this.pageForm.mode == 2) {
|
||||
this.$set(this.pageForm, 'regionalNature', '全部')
|
||||
}
|
||||
await this.getLotList()
|
||||
this.getLineSelectLimit()
|
||||
this.pageData()
|
||||
this.createModeList = await getEnumOptions('TheRapyRecuperationLineCreateMode')
|
||||
this.signUpModeList = await getEnumOptions('TheRapyRecuperationSignUpMode')
|
||||
this.regionalNatureList.push(...await getEnumOptions('TheRapyRecuperationProvinceType'))
|
||||
// const result = await getEnumOptions('TheRapyRecuperationProvinceType')
|
||||
this.unionOptions = await getUnions(null)
|
||||
this.travelAgencyOptions = this.selectTravelAgencyList()
|
||||
await this.getTravelAgencyOptions()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,231 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
.center-col {
|
||||
background-color: white;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
width: calc((100% - (20px * 2)) / 2);
|
||||
}
|
||||
|
||||
.col-title {
|
||||
color: rgba(0, 0, 0, .45);
|
||||
font-size: 14px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.col-button {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button">
|
||||
<el-date-picker
|
||||
v-model="year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年"
|
||||
style="width: 100%" @change="doSearch">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-card shadow="never" class="mr5 mt20">
|
||||
<div class="col-title">
|
||||
线路报名人数
|
||||
<el-radio-group @change="doSearch()" v-model="regionalNature" size="mini"
|
||||
style="float: right">
|
||||
<el-radio-button label="省内">省内({{snNum}})人</el-radio-button>
|
||||
<el-radio-button label="省外">省外({{swNum}})人</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div id="lineBar"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-card shadow="never" class="ml5 mt20">
|
||||
<div class="col-title">
|
||||
旅行社平均分
|
||||
<el-rate style="float: right"
|
||||
value="5"
|
||||
disabled
|
||||
show-text
|
||||
:texts="aaa"
|
||||
text-color="#ff9900">
|
||||
</el-rate>
|
||||
|
||||
</div>
|
||||
<div id="travelAgencyRating"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-card shadow="never" class="ml5 mt20">
|
||||
<div class="col-title">
|
||||
线路平均分
|
||||
<el-rate style="float: right"
|
||||
value="5"
|
||||
disabled
|
||||
show-text
|
||||
:texts="aaa"
|
||||
text-color="#ff9900">
|
||||
</el-rate>
|
||||
</div>
|
||||
<div id="lineRating"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
const chart = {
|
||||
lineBar: undefined,
|
||||
travelAgencyRating: undefined,
|
||||
lineRating: undefined
|
||||
}
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
aaa: ['极差', '失望', '一般', '满意', '最高平均分五分'],
|
||||
snNum: 0,
|
||||
swNum: 0,
|
||||
year: moment().format('YYYY'),
|
||||
regionalNature: '省内'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSearch() {
|
||||
await this.getLineBar()
|
||||
await this.getSnSwNum()
|
||||
await this.getTravelAgencyRating()
|
||||
await this.getLineRating()
|
||||
|
||||
},
|
||||
async getLineRating() {
|
||||
let data = []
|
||||
const refs = await $.post(loc() + "/getLineRating", {year: this.year})
|
||||
refs.data.forEach(v => {
|
||||
data.push({lineName: v.lineName, avg: v.avg})
|
||||
})
|
||||
if (chart.lineRating) {
|
||||
chart.lineRating.changeData(data)
|
||||
return
|
||||
}
|
||||
setTimeout(() => {
|
||||
chart.lineRating = new G2Plot.Bar(document.getElementById("lineRating"), {
|
||||
data,
|
||||
xField: 'avg',
|
||||
yField: 'lineName',
|
||||
meta: {
|
||||
lineName: {
|
||||
alias: '线路',
|
||||
},
|
||||
avg: {
|
||||
alias: '平均分(分)',
|
||||
},
|
||||
},
|
||||
minBarWidth: 20,
|
||||
maxBarWidth: 20,
|
||||
});
|
||||
chart.lineRating.render();
|
||||
}, 300)
|
||||
},
|
||||
async getTravelAgencyRating() {
|
||||
let data = []
|
||||
const refs = await $.post(loc() + "/getTravelAgencyRating", {year: this.year})
|
||||
refs.data.forEach(v => {
|
||||
data.push({travelAgencyName: v.travelAgencyName, avg: v.avg})
|
||||
})
|
||||
if (chart.travelAgencyRating) {
|
||||
chart.travelAgencyRating.changeData(data)
|
||||
return
|
||||
}
|
||||
setTimeout(() => {
|
||||
chart.travelAgencyRating = new G2Plot.Bar(document.getElementById("travelAgencyRating"), {
|
||||
data,
|
||||
xField: 'avg',
|
||||
yField: 'travelAgencyName',
|
||||
meta: {
|
||||
travelAgencyName: {
|
||||
alias: '旅行社',
|
||||
},
|
||||
avg: {
|
||||
alias: '平均分(分)',
|
||||
},
|
||||
},
|
||||
minBarWidth: 20,
|
||||
maxBarWidth: 20,
|
||||
});
|
||||
chart.travelAgencyRating.render();
|
||||
}, 300)
|
||||
},
|
||||
async getLineBar() {
|
||||
let data = []
|
||||
const refs = await $.post(loc() + "/getLineBar", {regionalNature: this.regionalNature, year: this.year})
|
||||
refs.data.forEach(v => {
|
||||
data.push({lineName: v.lineName, lineNum: (v.enrollNum + v.companionNum)})
|
||||
})
|
||||
if (chart.lineBar) {
|
||||
chart.lineBar.changeData(data)
|
||||
return
|
||||
}
|
||||
setTimeout(() => {
|
||||
chart.lineBar = new G2Plot.Bar(document.getElementById("lineBar"), {
|
||||
data,
|
||||
xField: 'lineNum',
|
||||
yField: 'lineName',
|
||||
meta: {
|
||||
lineName: {
|
||||
alias: '线路名称',
|
||||
},
|
||||
lineNum: {
|
||||
alias: '报名人数',
|
||||
},
|
||||
},
|
||||
minBarWidth: 20,
|
||||
maxBarWidth: 20,
|
||||
});
|
||||
chart.lineBar.render();
|
||||
}, 300)
|
||||
},
|
||||
async getSnSwNum() {
|
||||
const {data} = await $.post(loc() + "/getSnSwNum", {year: this.year})
|
||||
this.snNum = data.snNum
|
||||
this.swNum = data.snNum
|
||||
}
|
||||
|
||||
},
|
||||
async created() {
|
||||
await this.getLineBar()
|
||||
await this.getSnSwNum()
|
||||
await this.getTravelAgencyRating()
|
||||
await this.getLineRating()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,804 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.query-row {
|
||||
height: 70px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.query-row .el-col {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.query-row:not(:last-child) {
|
||||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||||
}
|
||||
|
||||
.query-row-title {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.el-table-container {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>年  度:</span>
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
v-model="pageForm.startYear"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年"
|
||||
style="width: 38%" @change="yearChange">
|
||||
</el-date-picker>
|
||||
<span>至</span>
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
v-model="pageForm.endYear"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年"
|
||||
style="width: 38%" @change="yearChange">
|
||||
</el-date-picker>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>所属工会:</span>
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会"
|
||||
@change="doSearch()"
|
||||
filterable clearable style="width: 80%">
|
||||
<el-option
|
||||
v-for="item in unions"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>旅 行 社:</span>
|
||||
<el-select v-model="pageForm.travelAgencyId" filterable clearable
|
||||
placeholder="请选择旅行社"
|
||||
style="width: 80%" @change="agencyChange">
|
||||
<el-option v-for="item in agencyLists"
|
||||
:key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>路线类型:</span>
|
||||
<el-select v-model="pageForm.regionalNature" filterable
|
||||
placeholder="请选择线路"
|
||||
style="width: 80%"
|
||||
@change="lineTypeChange">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="省内" value="省内"></el-option>
|
||||
<el-option label="省外" value="省外"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>线  路:</span>
|
||||
<el-select v-model="pageForm.takePartInLineId" filterable clearable
|
||||
placeholder="请选择线路"
|
||||
style="width: 80%" @change="lineChange">
|
||||
<el-option v-for="item in lineList"
|
||||
:key="item.id"
|
||||
:label="item.lineName + '-' + item.regionalNature + '【' + item.lotName + '】' + '(' + item.signUpMode + ')'"
|
||||
:value="item.lineId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>标  段:</span>
|
||||
<el-select v-model="pageForm.lotId" filterable clearable
|
||||
placeholder="请选择标段"
|
||||
style="width: 80%" @change="doSearch()">
|
||||
<el-option v-for="item in modifyConfig.lots"
|
||||
:key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>出行年月:</span>
|
||||
<el-date-picker
|
||||
v-model="pageForm.playMonth"
|
||||
type="month"
|
||||
value-format="yyyy-MM"
|
||||
placeholder="请选择出行年月"
|
||||
style="width: 80%"
|
||||
clearable
|
||||
@change="doSearch">
|
||||
</el-date-picker>
|
||||
</el-col>
|
||||
<el-col :span="12"></el-col>
|
||||
</el-row>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="" :app="this" ref="table_tool">
|
||||
<template #func>
|
||||
<el-button @click="showGiveTimes"
|
||||
size="small"
|
||||
style="margin-right: 10px"
|
||||
type="primary">
|
||||
一键统赋时间
|
||||
</el-button>
|
||||
<!--#if(@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('loginname') == 'superadmin'){#-->
|
||||
<el-button @click="resendFailNotice"
|
||||
size="small"
|
||||
style="margin-right: 10px"
|
||||
type="warning">
|
||||
补发未成团通知
|
||||
</el-button>
|
||||
<el-button @click="sendGroupMail"
|
||||
size="small"
|
||||
style="margin-right: 10px"
|
||||
type="primary">
|
||||
发送成团邮件
|
||||
</el-button>
|
||||
<!--#}#-->
|
||||
<!-- <el-button icon="el-icon-s-promotion" size="small" type="primary"
|
||||
@click="doExport"
|
||||
class="mr10">导出成团线路人员
|
||||
</el-button>-->
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%"
|
||||
ref="table"
|
||||
row-key="lineUId" @sort-change="pageOrder"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-loading="tableLoading">
|
||||
<el-table-column type="selection" reserve-selection width="55px"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index" label="序号"
|
||||
width="80px" key="#index" fixed="left">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:width="column.width"
|
||||
:fixed="column.fixed"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='lineName'">
|
||||
<el-link type="primary" @click="openLine(row)">{{row.lineName}}
|
||||
</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-if="column.prop=='signUpMode'">
|
||||
<span>{{row.signUpMode == '1' ? '校工会组织' : '分工会组织'}}</span>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='groupCount'">
|
||||
<el-link type="primary" @click="openUserData(row)">
|
||||
{{Number(row.lineNum || 0) + Number(row.adultFamilyNum || 0)}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="380px" fixed="right">
|
||||
<template scope="{row}">
|
||||
<template>
|
||||
<el-button @click="openUserData(row)" size="mini" type="primary">
|
||||
查看人员
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" @click="sendSuccess(row)">
|
||||
发送成团通知
|
||||
</el-button>
|
||||
|
||||
<el-button class="ml10 mr10" size="mini" type="primary" @click="sendFail(row)">
|
||||
发送未成团通知
|
||||
</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #public>
|
||||
<line-info ref="viewLineInfo"></line-info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">工号姓名</div>
|
||||
<div class="search-item-option">
|
||||
<el-input v-model="userPageForm.searchKeyword" maxlength="10" clearable></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item"
|
||||
v-if="${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('sysadmin')||@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('A06')||@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('SchoolUnionMemberAdmin')}">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="flushUnits" @clear="flushUnits" clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属工会" style="width: 100%;"
|
||||
v-model="userPageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id" v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select clearable="true" filterable="true" placeholder="所属单位"
|
||||
style="width: 100%;"
|
||||
v-model="userPageForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id" v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="getUserDataByLineId" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-table :data="userData">
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in userDataTableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='isFamily'">
|
||||
<el-link v-if="!row.familyNumber" type="primary">
|
||||
{{row.isFamily?'携带':'未携带'}}({{row.isFamily}})
|
||||
</el-link>
|
||||
<el-link v-else type="primary">
|
||||
{{row.familyNumber?'携带':'未携带'}}({{row.familyNumber}})
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container" style="margin-bottom: 0px">
|
||||
<el-pagination
|
||||
@size-change="userPageSizeChange"
|
||||
@current-change="userPageNumberChange"
|
||||
:current-page="userPageForm.pageNumber"
|
||||
:page-sizes="[5,10, 20, 30, 50]"
|
||||
:page-size="userPageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="userPageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<el-dialog :close-on-click-modal="false"
|
||||
:visible.sync="setGiveLineTimeDialog"
|
||||
title="统赋出行时间段信息"
|
||||
width="80%">
|
||||
<el-form :model="giveLineTimesData"
|
||||
:rules="giveLineTimesRules"
|
||||
label-width="0"
|
||||
ref="giveLineTimesForm"
|
||||
size="small">
|
||||
<div :key="row.id"
|
||||
class="panel panel-default mt20"
|
||||
style="border: none"
|
||||
v-for="(row, index) in giveLineTimesData.times">
|
||||
<div class="panel-heading"
|
||||
style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none;display: flex;align-items: center;justify-content: space-between">
|
||||
<h3 class="panel-title">出行时间段</h3>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-descriptions border :column="3">
|
||||
<el-descriptions-item label="报名开始时间">
|
||||
<el-form-item :prop="'times.' + index + '.signUpStartTime'" label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="row.signUpStartTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名结束时间">
|
||||
<el-form-item :prop="'times.' + index + '.signUpEndTime'" label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="row.signUpEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="变更截至时间">
|
||||
<el-form-item :prop="'times.' + index + '.changeEndTime'" label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="row.changeEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="出行开始时间">
|
||||
<el-form-item :prop="'times.' + index + '.playStartTime'" label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="row.playStartTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="出行结束时间">
|
||||
<el-form-item :prop="'times.' + index + '.playEndTime'" label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="row.playEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否开启">
|
||||
<el-form-item :prop="'times.' + index + '.enable'" label-width="0">
|
||||
<el-switch
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.enable"
|
||||
:active-value="true"
|
||||
:inactive-value="false">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="调剂报名截止时间">
|
||||
<el-form-item :prop="'times.' + index + '.adjustSignUpEndTime'" label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="row.adjustSignUpEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-alert closable
|
||||
show-icon
|
||||
style="margin:10px 0"
|
||||
title="温馨提醒:变更时间应该大于报名截至时间,小于出行时间。"
|
||||
type="warning"></el-alert>
|
||||
</el-form>
|
||||
<el-row justify="end" type="flex">
|
||||
<el-button @click="setGiveLineTimeDialog=false">取消</el-button>
|
||||
<el-button @click="doSetGiveLineTimes" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
startYear: moment().format('YYYY'),
|
||||
endYear: moment().format('YYYY'),
|
||||
unionId: '',
|
||||
regionalNature: '',
|
||||
signUpMode: '',
|
||||
lotId: '',
|
||||
takePartInLineId: '',
|
||||
playMonth: '',
|
||||
travelAgencyId: '',
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'lineName', label: '线路名称', sortable: true, width: 300, fixed: 'left'},
|
||||
{prop: 'unionname', label: '选择线路工会', sortable: true, width: 220, fixed: 'left'},
|
||||
{prop: 'linePlayTime', label: '出行时间', width: 150},
|
||||
{prop: 'signUpTime', label: '报名时间', width: 150},
|
||||
{prop: 'adjustSignUpEndTime', label: '调剂报名截止时间', width: 160},
|
||||
{prop: 'travelAgencyName', label: '承担旅行社', sortable: true, width: 150},
|
||||
{prop: 'regionalNature', label: '线路类型', sortable: true, checked: 0},
|
||||
{prop: 'contact', label: '联系人', sortable: true, checked: 0},
|
||||
{prop: 'contactMobileNumber', label: '联系方式', checked: 0},
|
||||
{prop: 'estimatedFamilyNumbers', label: '最少成团人数', width: 80},
|
||||
{prop: 'groupCount', label: '成团计入人数', width: 80},
|
||||
{prop: 'lineNum', label: '教职工报名人数', width: 80},
|
||||
{prop: 'signUpUserFamilyNum', label: '家属总人数', width: 80},
|
||||
{prop: 'adultFamilyNum', label: '成年家属人数', width: 80},
|
||||
],
|
||||
|
||||
modifyConfig: {},
|
||||
lineList: [],
|
||||
agencyLists: [],
|
||||
unions: [],
|
||||
units:[],
|
||||
signUpModeOptions: [
|
||||
{label: '校工会组织', value: 2},
|
||||
{label: '分工会组织', value: 1},
|
||||
],
|
||||
|
||||
userPageForm:{
|
||||
pageNumber:1,
|
||||
pageSize: 10
|
||||
},
|
||||
userData:[],
|
||||
userDataTableColumns:[
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'unionName', label: '所属工会'},
|
||||
{prop: 'unitName', label: '所属单位', sortable: true},
|
||||
{prop: 'isFamily', label: '是否携带家属'},
|
||||
{prop: 'linePlayTime', label: '出行时间', sortable: true}
|
||||
],
|
||||
|
||||
lineUId: '',
|
||||
selectLine: {
|
||||
lineName: '全部'
|
||||
},
|
||||
takePartInLines: [],
|
||||
multipleSelection: [],
|
||||
therapyConfig: {
|
||||
signUpStartTime: null,
|
||||
signUpEndTime: null
|
||||
},
|
||||
giveLineTimesData: {
|
||||
times: []
|
||||
},
|
||||
giveLineTimesRules: {},
|
||||
setGiveLineTimeDialog: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'enroll-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/Enrollinfo.vue?v=1.0.1'),
|
||||
'line-info': httpVueLoader('/components/staffbenefit/therapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
methods: {
|
||||
handleSelectionChange(val) {
|
||||
this.$set(this, 'multipleSelection', val)
|
||||
},
|
||||
getTherapyConfig(callback) {
|
||||
if (this.therapyConfig && (this.therapyConfig.signUpStartTime || this.therapyConfig.signUpEndTime)) {
|
||||
callback()
|
||||
return
|
||||
}
|
||||
$.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
|
||||
.then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$set(this, 'therapyConfig', resp.data || {})
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
.always(() => {
|
||||
callback()
|
||||
})
|
||||
},
|
||||
showGiveTimes() {
|
||||
if (!this.multipleSelection || this.multipleSelection.length === 0) {
|
||||
this.$message.warning('请在线路列表中勾选您想要统赋时间的线路!')
|
||||
return
|
||||
}
|
||||
this.getTherapyConfig(() => {
|
||||
this.$set(this, 'giveLineTimesData', {
|
||||
times: [{
|
||||
signUpStartTime: this.therapyConfig.signUpStartTime,
|
||||
signUpEndTime: this.therapyConfig.signUpEndTime,
|
||||
changeEndTime: this.therapyConfig.signUpEndTime,
|
||||
playStartTime: '',
|
||||
playEndTime: '',
|
||||
enable: true,
|
||||
adjustSignUpEndTime: null
|
||||
}]
|
||||
})
|
||||
this.$set(this, 'setGiveLineTimeDialog', true)
|
||||
})
|
||||
},
|
||||
doSetGiveLineTimes() {
|
||||
this.$refs.giveLineTimesForm.validate((valid) => {
|
||||
if (!valid) {
|
||||
return
|
||||
}
|
||||
this.$confirm('请再次确认,是否为选择线路统赋时间?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const lineUnionSelectIds = []
|
||||
// 统计页列表按线路选择记录统计,统赋时只更新用户勾选的具体 lineUId。
|
||||
this.multipleSelection.forEach(row => {
|
||||
if (row.lineUId && lineUnionSelectIds.indexOf(row.lineUId) === -1) {
|
||||
lineUnionSelectIds.push(row.lineUId)
|
||||
}
|
||||
})
|
||||
if (lineUnionSelectIds.length === 0) {
|
||||
this.$message.warning('未找到可统赋时间的线路记录!')
|
||||
return
|
||||
}
|
||||
$.post('/platform/staffTherapyRecuperation/statistics/setGiveLineTimes', {
|
||||
lineUnionSelectIds: JSON.stringify(lineUnionSelectIds),
|
||||
lineUnionSelects: JSON.stringify(this.giveLineTimesData.times)
|
||||
}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$set(this, 'setGiveLineTimeDialog', false)
|
||||
this.pageData()
|
||||
this.$message.success(resp.msg)
|
||||
this.$refs.table.clearSelection()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}).always(() => {
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
})
|
||||
},
|
||||
doExport() {
|
||||
const {
|
||||
startYear,
|
||||
endYear,
|
||||
unionId,
|
||||
takePartInLineId,
|
||||
lotId,
|
||||
linePlayTime,
|
||||
regionalNature,
|
||||
travelAgencyId,
|
||||
} = this.pageForm
|
||||
window.open("/platform/staffTherapyRecuperation/user/query/doExport?" +
|
||||
"startYear=" + startYear +
|
||||
"&endYear=" + endYear +
|
||||
"&unionId=" + unionId +
|
||||
"&takePartInLineId=" + takePartInLineId +
|
||||
"&lotId=" + lotId +
|
||||
"®ionalNature=" + regionalNature +
|
||||
"&agencyId=" + travelAgencyId +
|
||||
"&satisfyPeople=true" +
|
||||
"&types=" + JSON.stringify(['line']) +
|
||||
"&linePlayTime=" + linePlayTime)
|
||||
},
|
||||
lineChange() {
|
||||
this.doSearch()
|
||||
},
|
||||
lineTypeChange() {
|
||||
this.pageForm.takePartInLineId = ''
|
||||
this.getUnionSelectLine()
|
||||
this.doSearch()
|
||||
},
|
||||
yearChange() {
|
||||
this.$set(this.pageForm, 'travelAgencyId', '')
|
||||
this.$set(this.pageForm, 'takePartInLineId', '')
|
||||
this.getAgencyList()
|
||||
this.getUnionSelectLine()
|
||||
this.doSearch()
|
||||
},
|
||||
agencyChange() {
|
||||
this.$set(this.pageForm, 'takePartInLineId', '')
|
||||
this.getUnionSelectLine()
|
||||
this.doSearch()
|
||||
},
|
||||
async sendSuccess(row) {
|
||||
this.$confirm("确定发送<span style='color: red'>成团通知</span>吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
dangerouslyUseHTMLString: true
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/statistics/sendSuccess', {id: row.lineUId})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
sendFail(row) {
|
||||
this.$confirm("确定发送<span style='color: red'>未成团通知</span>并<span style='color: red'>保留报名记录</span>吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
dangerouslyUseHTMLString: true
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/statistics/sendFail', {id: row.lineUId})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
sendGroupMail() {
|
||||
if (!this.multipleSelection || this.multipleSelection.length === 0) {
|
||||
this.$message.warning('请在线路列表中勾选需要发送成团邮件的线路!')
|
||||
return
|
||||
}
|
||||
this.$confirm("确定给所选线路的旅行社发送<span style='color: red'>成团邮件</span>吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
dangerouslyUseHTMLString: true
|
||||
}).then(() => {
|
||||
const lineUnionSelectIds = []
|
||||
// 成团邮件按线路选择记录发送,后台会按旅行社分组生成与定时任务一致的名单附件。
|
||||
this.multipleSelection.forEach(row => {
|
||||
if (row.lineUId && lineUnionSelectIds.indexOf(row.lineUId) === -1) {
|
||||
lineUnionSelectIds.push(row.lineUId)
|
||||
}
|
||||
})
|
||||
if (lineUnionSelectIds.length === 0) {
|
||||
this.$message.warning('未找到可发送成团邮件的线路记录!')
|
||||
return
|
||||
}
|
||||
this.tableLoading = true
|
||||
$.post('/platform/staffTherapyRecuperation/statistics/sendGroupMail', {
|
||||
lineUnionSelectIds: JSON.stringify(lineUnionSelectIds)
|
||||
}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.$refs.table.clearSelection()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}).always(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
resendFailNotice() {
|
||||
this.$confirm("确定补发<span style='color: red'>2026年已删除报名记录的未成团通知</span>吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
dangerouslyUseHTMLString: true
|
||||
}).then(() => {
|
||||
$.post('/platform/staffTherapyRecuperation/statistics/resendFailNotice')
|
||||
.then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
.always(() => {
|
||||
})
|
||||
})
|
||||
},
|
||||
openLine(row) {
|
||||
this.$refs.guava.public()
|
||||
if (row.regionalNature === "省内") {
|
||||
this.$refs.viewLineInfo.findOne(row.lineId, null)
|
||||
} else {
|
||||
this.$refs.viewLineInfo.findOne(row.lineId, row.usUnionId)
|
||||
|
||||
}
|
||||
},
|
||||
openUserData(row){
|
||||
this.lineUId = row.lineUId
|
||||
this.$refs.guava.edit();
|
||||
this.getUserDataByLineId(row)
|
||||
},
|
||||
getUnionSelectLine() {
|
||||
return $.post('/platform/staffTherapyRecuperation/user/query/getUnionSelectLine', {
|
||||
startYear: this.pageForm.startYear,
|
||||
endYear: this.pageForm.endYear,
|
||||
signUpMode: this.pageForm.signUpMode,
|
||||
flag: true,
|
||||
regionalNature: this.pageForm.regionalNature,
|
||||
travelAgencyId: this.pageForm.travelAgencyId
|
||||
}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$set(this, 'lineList', resp.data)
|
||||
}
|
||||
}).always(() => {
|
||||
})
|
||||
},
|
||||
getAgencyList() {
|
||||
return $.post('/platform/staffTherapyRecuperation/travelAgency/selectTravelAgencyByYears', {
|
||||
startYear: this.pageForm.startYear,
|
||||
endYear: this.pageForm.endYear
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$set(this, 'agencyLists', res.data)
|
||||
}
|
||||
}).always(() => {
|
||||
})
|
||||
},
|
||||
async getModifyConfig() {
|
||||
const res = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
|
||||
if (res.code === 0) {
|
||||
this.modifyConfig = res.data
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.userData, "unitId", "")
|
||||
if ("${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('sysadmin')||@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('A06')||@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('SchoolUnionMemberAdmin')}" === 'true') {
|
||||
this.units = await getUnits(this.userData.unionId)
|
||||
} else {
|
||||
this.units = await getUnits("${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getUnionId()}")
|
||||
}
|
||||
},
|
||||
userPageSizeChange(val) {
|
||||
this.userPageForm.pageSize = val;
|
||||
this.getUserDataByLineId();
|
||||
},
|
||||
userPageNumberChange(val) {
|
||||
this.userPageForm.pageNumber = val;
|
||||
this.getUserDataByLineId();
|
||||
},
|
||||
async getUserDataByLineId(row){
|
||||
this.userPageForm.takePartLineId = this.lineUId
|
||||
const resp = await $.post(loc() + '/getUserDateByLine',this.userPageForm)
|
||||
if (resp.code === 0){
|
||||
this.userData = resp.data.list
|
||||
this.userPageForm.totalCount = resp.data.totalCount
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.unions = await getUnions()
|
||||
await this.getModifyConfig();
|
||||
await this.getAgencyList();
|
||||
await this.getUnionSelectLine();
|
||||
this.pageData();
|
||||
this.flushUnits();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,278 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.chart-card {
|
||||
min-height: 520px;
|
||||
}
|
||||
|
||||
.chart-title {
|
||||
color: rgba(0, 0, 0, .65);
|
||||
font-size: 14px;
|
||||
line-height: 32px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.chart-container {
|
||||
height: 460px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
color: rgba(0, 0, 0, .45);
|
||||
font-size: 14px;
|
||||
line-height: 120px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
@change="getAllChartData">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10 chart-card" v-loading="chartLoading">
|
||||
<div class="chart-title">
|
||||
旅行社月度报名数量
|
||||
<el-button @click="doExportExcel"
|
||||
icon="el-icon-download"
|
||||
size="small"
|
||||
style="float: right"
|
||||
type="primary">导出表格</el-button>
|
||||
</div>
|
||||
<div v-if="chartData.length === 0" class="empty-text">暂无报名数据</div>
|
||||
<div v-show="chartData.length > 0" id="travelAgencyMonthlyChart" class="chart-container"></div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10 chart-card" v-loading="unionChartLoading">
|
||||
<div class="chart-title">
|
||||
二级工会出去疗休养人数
|
||||
<el-button @click="doExportUnionExcel"
|
||||
icon="el-icon-download"
|
||||
size="small"
|
||||
style="float: right"
|
||||
type="primary">导出表格</el-button>
|
||||
</div>
|
||||
<div v-if="unionChartData.length === 0" class="empty-text">暂无报名数据</div>
|
||||
<div v-show="unionChartData.length > 0" id="unionEnrollChart" class="chart-container"></div>
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const chart = {
|
||||
travelAgencyMonthlyChart: undefined,
|
||||
unionEnrollChart: undefined
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
chartLoading: false,
|
||||
chartData: [],
|
||||
unionChartLoading: false,
|
||||
unionChartData: [],
|
||||
pageForm: {
|
||||
year: moment().format('YYYY')
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getAllChartData() {
|
||||
this.getChartData()
|
||||
this.getUnionChartData()
|
||||
},
|
||||
getChartData() {
|
||||
this.chartLoading = true
|
||||
$.post(loc() + '/getChartData', this.pageForm)
|
||||
.then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.renderChart(resp.data || [])
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
.always(() => {
|
||||
this.chartLoading = false
|
||||
})
|
||||
},
|
||||
getUnionChartData() {
|
||||
this.unionChartLoading = true
|
||||
$.post(loc() + '/getUnionChartData', this.pageForm)
|
||||
.then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.renderUnionChart(resp.data || [])
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
.always(() => {
|
||||
this.unionChartLoading = false
|
||||
})
|
||||
},
|
||||
renderChart(data) {
|
||||
const chartData = []
|
||||
data.forEach(item => {
|
||||
chartData.push({
|
||||
travelAgencyName: item.travelAgencyName,
|
||||
monthName: item.monthName,
|
||||
enrollNumber: Number(item.enrollNumber || 0)
|
||||
})
|
||||
})
|
||||
this.$set(this, 'chartData', chartData)
|
||||
if (chart.travelAgencyMonthlyChart) {
|
||||
chart.travelAgencyMonthlyChart.changeData(chartData)
|
||||
return
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
const dom = document.getElementById('travelAgencyMonthlyChart')
|
||||
if (!dom) {
|
||||
return
|
||||
}
|
||||
chart.travelAgencyMonthlyChart = new G2Plot.Column(dom, {
|
||||
data: chartData,
|
||||
isGroup: true,
|
||||
xField: 'travelAgencyName',
|
||||
yField: 'enrollNumber',
|
||||
seriesField: 'monthName',
|
||||
meta: {
|
||||
travelAgencyName: {
|
||||
alias: '旅行社'
|
||||
},
|
||||
monthName: {
|
||||
alias: '月份'
|
||||
},
|
||||
enrollNumber: {
|
||||
alias: '报名数量'
|
||||
}
|
||||
},
|
||||
columnWidthRatio: 0.65,
|
||||
label: {
|
||||
position: 'middle',
|
||||
style: {
|
||||
fill: '#FFFFFF',
|
||||
opacity: 0.8
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
position: 'top'
|
||||
},
|
||||
xAxis: {
|
||||
title: {
|
||||
text: '旅行社'
|
||||
},
|
||||
label: {
|
||||
autoHide: true,
|
||||
autoRotate: true
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: '报名数量'
|
||||
},
|
||||
min: 0
|
||||
}
|
||||
})
|
||||
chart.travelAgencyMonthlyChart.render()
|
||||
})
|
||||
},
|
||||
renderUnionChart(data) {
|
||||
const chartData = []
|
||||
data.forEach(item => {
|
||||
chartData.push({
|
||||
unionName: item.unionName,
|
||||
monthName: item.monthName,
|
||||
enrollNumber: Number(item.enrollNumber || 0)
|
||||
})
|
||||
})
|
||||
this.$set(this, 'unionChartData', chartData)
|
||||
if (chart.unionEnrollChart) {
|
||||
chart.unionEnrollChart.changeData(chartData)
|
||||
return
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
const dom = document.getElementById('unionEnrollChart')
|
||||
if (!dom) {
|
||||
return
|
||||
}
|
||||
chart.unionEnrollChart = new G2Plot.Column(dom, {
|
||||
data: chartData,
|
||||
isGroup: true,
|
||||
xField: 'unionName',
|
||||
yField: 'enrollNumber',
|
||||
seriesField: 'monthName',
|
||||
meta: {
|
||||
unionName: {
|
||||
alias: '二级工会'
|
||||
},
|
||||
monthName: {
|
||||
alias: '月份'
|
||||
},
|
||||
enrollNumber: {
|
||||
alias: '出行人数'
|
||||
}
|
||||
},
|
||||
columnWidthRatio: 0.65,
|
||||
label: {
|
||||
position: 'middle',
|
||||
style: {
|
||||
fill: '#FFFFFF',
|
||||
opacity: 0.8
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
position: 'top'
|
||||
},
|
||||
xAxis: {
|
||||
title: {
|
||||
text: '二级工会'
|
||||
},
|
||||
label: {
|
||||
autoHide: true,
|
||||
autoRotate: true
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: '出行人数'
|
||||
},
|
||||
min: 0
|
||||
}
|
||||
})
|
||||
chart.unionEnrollChart.render()
|
||||
})
|
||||
},
|
||||
doExportExcel() {
|
||||
window.open(loc() + '/doExportExcel?year=' + encodeURIComponent(this.pageForm.year || ''))
|
||||
},
|
||||
doExportUnionExcel() {
|
||||
window.open(loc() + '/doExportUnionExcel?year=' + encodeURIComponent(this.pageForm.year || ''))
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getAllChartData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,93 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">分工会</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择分工会" filterable clearable
|
||||
style="width: 100%" @change="pageData" @clear="pageData">
|
||||
<el-option v-for="item in unionOptions"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-table :data="tableData"
|
||||
style="width: 100%"
|
||||
ref="table"
|
||||
v-loading="tableLoading">
|
||||
<el-table-column align="center" header-align="center" type="index" label="序号" width="80px">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index + 1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" prop="unionName" label="分工会名称"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" prop="provinceOutNumber"
|
||||
label="省外数量"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" prop="provinceInNumber"
|
||||
label="省内数量"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" prop="selectedProvinceOutNumber"
|
||||
label="已选择省外数量"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" prop="selectedProvinceInNumber"
|
||||
label="已选择省内数量"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" prop="finished" label="是否完成">
|
||||
<template scope="{row}">
|
||||
<el-tag v-if="row.finished" type="success">已完成</el-tag>
|
||||
<el-tag v-else type="danger">未完成</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
tableLoading: false,
|
||||
tableData: [],
|
||||
unionOptions: [],
|
||||
pageForm: {
|
||||
unionId: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
pageData() {
|
||||
this.tableLoading = true;
|
||||
$.post(loc() + '/pageData', this.pageForm)
|
||||
.then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data || []
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
.always(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.unionOptions = await getUnions(null)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,573 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.item-button {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.item-button .el-button {
|
||||
padding: 12px 25px;
|
||||
}
|
||||
|
||||
/*.el-dialog__title {
|
||||
font-size: 18px; !* 修改标题字体大小 *!
|
||||
color: red; !* 修改标题字体颜色 *!
|
||||
border-bottom: none; !* 去掉标题底部边框线 *!
|
||||
}*/
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<el-card shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<h3 style="color: rgb(24, 103, 176);font-family: Microsoft YaHei;">疗休养配置</h3>
|
||||
</div>
|
||||
|
||||
<el-form ref="addForm" :model="formData" :rules="formRules" label-width="170px">
|
||||
<el-tabs v-model="activeTab" type="card">
|
||||
<el-tab-pane label="基本配置" name="baseConfig">
|
||||
<el-form-item label="配置名称" prop="configName">
|
||||
<el-input v-model="formData.configName" placeholder="请输入配置名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="activityGroupId" label="参加人员范围">
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 99%">
|
||||
<el-select v-model="formData.activityGroupId" placeholder="请选择参加人员范围" filterable
|
||||
clearable
|
||||
style="width: 99%">
|
||||
<el-option v-for="item in activityGroupList"
|
||||
:value="item.groupId"
|
||||
:key="item.groupId"
|
||||
:label="item.groupName"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div>
|
||||
<el-button @click="$refs.drawerUserScope.userScopeDialog = true" type="primary">设置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 报名时间范围绑定配置实体的两个独立字段,保存时随 formData 一并提交到后台。 -->
|
||||
<el-form-item label="报名时间">
|
||||
<el-date-picker
|
||||
v-model="formData.signUpStartTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
placeholder="请选择报名开始时间">
|
||||
</el-date-picker>
|
||||
<span style="display: inline-block; margin: 0 10px;">至</span>
|
||||
<el-date-picker
|
||||
v-model="formData.signUpEndTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
placeholder="请选择报名结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 选择线路时间用于控制分工会/校工会在线路选择页可选择、修改、取消选择的时间范围。 -->
|
||||
<el-form-item label="选择线路时间">
|
||||
<el-date-picker
|
||||
v-model="formData.lineSelectStartTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
placeholder="请选择选择线路开始时间">
|
||||
</el-date-picker>
|
||||
<span style="display: inline-block; margin: 0 10px;">至</span>
|
||||
<el-date-picker
|
||||
v-model="formData.lineSelectEndTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
placeholder="请选择选择线路结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="省外最少成团人数(包括家属)" prop="outsideQuota">
|
||||
<el-input v-model.number="formData.outsideQuota"
|
||||
placeholder="请输入省外最少成团人数(包括家属)"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<!--<el-form-item label="省外名额分配比例" prop="outsideQuotaProportion">
|
||||
<el-input placeholder="请输入省外名额分配比例" v-model="formData.outsideQuotaProportion">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</el-form-item>-->
|
||||
|
||||
|
||||
<el-form-item label="省外几年去一次" prop="outsideNumber">
|
||||
<el-input max="100"
|
||||
placeholder="请输入省外几年去一次"
|
||||
v-model.number="formData.outsideNumber"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="每年旅行频率" prop="travelFrequency">
|
||||
<el-input max="100" disabled
|
||||
placeholder="请输入每年旅行频率"
|
||||
v-model.number="formData.travelFrequency"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!--<el-form-item label="最少教工人数" prop="groupNumber">
|
||||
<el-input max="100"
|
||||
placeholder="请输入最少教工人数"
|
||||
v-model.number="formData.groupNumber"></el-input>
|
||||
</el-form-item>-->
|
||||
|
||||
<!--<el-form-item label="不可取消修改天数" prop="modifyDays">
|
||||
<el-input max="100"
|
||||
placeholder="请输入不可取消修改天数"
|
||||
v-model.number="formData.modifyDays"></el-input>
|
||||
</el-form-item>-->
|
||||
|
||||
<el-form-item label="可以修改几次" prop="modifyNumber">
|
||||
<el-input max="100"
|
||||
placeholder="请输入可以修改几次"
|
||||
v-model.number="formData.modifyNumber"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="省内线路是否需要审核" prop="isSnLine">
|
||||
<el-radio-group v-model="formData.isSnLine">
|
||||
<el-radio-button :label="true">需要</el-radio-button>
|
||||
<el-radio-button :label="false">不需要</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="省外线路是否需要审核" prop="isSwLine">
|
||||
<el-radio-group v-model="formData.isSwLine">
|
||||
<el-radio-button :label="true">需要</el-radio-button>
|
||||
<el-radio-button :label="false">不需要</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="旅行社是否需要审核" prop="travelAudit">
|
||||
<el-radio-group v-model="formData.travelAudit">
|
||||
<el-radio-button :label="true">需要</el-radio-button>
|
||||
<el-radio-button :label="false">不需要</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="全批次最多报名人数" prop="allLineSignUpNumber">
|
||||
<el-input max="100"
|
||||
placeholder="请输入全批次最多报名人数"
|
||||
v-model.number="formData.allLineSignUpNumber"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="省内起始年份" prop="provinceStartYear">
|
||||
<el-input max="100"
|
||||
placeholder="请输入省内起始年份"
|
||||
v-model.number="formData.provinceStartYear"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="床位信息" prop="bedInfo">
|
||||
<el-radio-group v-model="formData.bedInfo">
|
||||
<el-radio-button :label="true">需要</el-radio-button>
|
||||
<el-radio-button :label="false">不需要</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="家属信息" prop="familyInfo">
|
||||
<el-radio-group v-model="formData.familyInfo">
|
||||
<el-radio-button :label="1">数量</el-radio-button>
|
||||
<el-radio-button :label="2">详细信息</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="标段管理" name="lotManage">
|
||||
<el-form-item label="标段">
|
||||
<el-button type="primary" @click="formData.lots.push({})"
|
||||
style="float: right;">增加一条
|
||||
</el-button>
|
||||
<el-table :data="formData.lots" stripe style="width: 100%">
|
||||
<el-table-column prop="index" label="序号" width="180">
|
||||
<template scope="scope">
|
||||
{{scope.$index+1}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lotName" label="标段名称">
|
||||
<template scope="{row}">
|
||||
<el-input v-model="row.lotName" placeholder="请输入标段名称"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lotValue" label="标段值">
|
||||
<template scope="{row}">
|
||||
<el-input v-model="row.lotValue" placeholder="请输入标段值"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="activityCost" label="标段费用">
|
||||
<template scope="{row}">
|
||||
<el-input v-model="row.activityCost" placeholder="请输入标段费用"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--# if(@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('sysadmin')){ #-->
|
||||
<el-table-column prop="index" label="操作">
|
||||
<template scope="scope">
|
||||
<el-button type="danger" icon="el-icon-delete"
|
||||
@click="deleteLotsRow(scope)"></el-button>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<!--# } #-->
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="分工会线路数量管理" name="unionLineNumberManage">
|
||||
<el-form-item label="分工会线路数量">
|
||||
<el-table :data="formData.unionLineNumberConfigs" stripe style="width: 100%">
|
||||
<el-table-column prop="index" label="序号" width="120">
|
||||
<template scope="scope">
|
||||
{{scope.$index+1}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unionId" label="分工会">
|
||||
<template scope="{row}">
|
||||
<el-select v-model="row.unionId" placeholder="请选择分工会" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:disabled="isUnionSelected(item.id, row)"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="minProvinceOutNumber" label="最少省外数量">
|
||||
<template scope="{row}">
|
||||
<el-input v-model.number="row.minProvinceOutNumber"
|
||||
placeholder="请输入最少省外数量"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="minProvinceInNumber" label="最少省内数量">
|
||||
<template scope="{row}">
|
||||
<el-input v-model.number="row.minProvinceInNumber"
|
||||
placeholder="请输入最少省内数量"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="index" width="140">
|
||||
<template slot="header">
|
||||
<el-button type="primary" size="small" @click="addUnionLineNumberRow">添加一条</el-button>
|
||||
</template>
|
||||
<template scope="scope">
|
||||
<el-button type="danger" icon="el-icon-delete"
|
||||
@click="deleteUnionLineNumberRow(scope.$index)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="服务须知" name="serviceNotice">
|
||||
<el-form-item label="疗休养服务须知" prop="notice">
|
||||
<text-editor v-model="formData.notice"></text-editor>
|
||||
</el-form-item>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<el-form-item class="item-button">
|
||||
<el-button type="danger" @click="resetForm">重 置</el-button>
|
||||
<el-button type="primary" @click="operation" :loading="subLoading">提 交
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-dialog
|
||||
title="该标段被以下线路/目的地绑定,是否强制删除"
|
||||
:visible.sync="centerDialogVisible"
|
||||
width="50%"
|
||||
center>
|
||||
<template>
|
||||
<el-card>
|
||||
<div v-if="LineNameList.line!=null">
|
||||
<el-descriptions class="margin-top" title="线路名称" :column="3">
|
||||
<el-descriptions-item v-for="(o,index) in LineNameList.line">
|
||||
<template slot="label">
|
||||
{{o.index}}
|
||||
</template>
|
||||
{{o}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<br/>
|
||||
</div>
|
||||
<div v-if="LineNameList.base!=null">
|
||||
<el-descriptions class="margin-top" title="目的地名称" :column="3">
|
||||
<el-descriptions-item v-for="o in LineNameList.base">
|
||||
<template slot="label">
|
||||
{{o.index}}
|
||||
</template>
|
||||
{{o}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="closeDialog">取 消</el-button>
|
||||
<el-button type="primary" @click="deleteLotById">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</guava>
|
||||
|
||||
<drawer-user-scope
|
||||
@group_change="getActivityGroup"
|
||||
ref="drawerUserScope"
|
||||
:group_id.sync="formData.activityGroupId"
|
||||
></drawer-user-scope>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
|
||||
data() {
|
||||
return {
|
||||
activeTab: 'baseConfig',
|
||||
activityGroupList: [],
|
||||
unionOptions: [],
|
||||
subLoading: false,
|
||||
formData: {
|
||||
isSnLine: 0,
|
||||
isSwLine: 0,
|
||||
travelAudit: 0,
|
||||
lots: [],
|
||||
unionLineNumberConfigs: [],
|
||||
configName: '智慧工会疗休养配置',
|
||||
// 报名时间范围对应后台 signUpStartTime/signUpEndTime 两个字段。
|
||||
signUpStartTime: null,
|
||||
signUpEndTime: null,
|
||||
// 选择线路时间范围对应后台 lineSelectStartTime/lineSelectEndTime 两个字段。
|
||||
lineSelectStartTime: null,
|
||||
lineSelectEndTime: null,
|
||||
outsideQuota: null,
|
||||
outsideQuotaProportion: 0,
|
||||
outsideNumber: null,
|
||||
travelFrequency: null,
|
||||
groupNumber: null,
|
||||
modifyDays: null,
|
||||
modifyNumber: null,
|
||||
allLineSignUpNumber: null,
|
||||
notice: null,
|
||||
provinceStartYear: null,
|
||||
bedInfo: true,
|
||||
familyInfo: 1,
|
||||
},
|
||||
formRules: {
|
||||
configName: [{required: true, message: '请填写配置名称', trigger: ['blur', 'change']}],
|
||||
isSnLine: [{required: true, message: '请选择省内线路是否需要审核', trigger: ['blur', 'change']}],
|
||||
isSwLine: [{required: true, message: '请选择省外线路是否需要审核', trigger: ['blur', 'change']}],
|
||||
travelAudit: [{required: true, message: '请选择旅行社是否需要审核', trigger: ['blur', 'change']}],
|
||||
outsideQuota: [{
|
||||
required: true,
|
||||
message: '省外最少成团人数(包括家属)',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
outsideNumber: [{
|
||||
required: true,
|
||||
message: '请填写省外几年去一次',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
travelFrequency: [{
|
||||
required: true,
|
||||
message: '请填写每年旅行频率',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
groupNumber: [{
|
||||
required: true,
|
||||
message: '请填写最少教工人数',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
modifyDays: [{
|
||||
required: true,
|
||||
message: '请填写不可取消修改天数',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
modifyNumber: [{
|
||||
required: true,
|
||||
message: '请填写可以修改几次',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
outsideQuotaProportion: [{
|
||||
required: true,
|
||||
message: '请填写比例',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
allLineSignUpNumber: [{
|
||||
required: true,
|
||||
message: '请输入全批次最多报名人数',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
notice: [{required: true, message: '请输入详细内容', trigger: ['change', 'blur']}],
|
||||
provinceStartYear: [{required: true, message: '请输入省内起始年份', trigger: ['change', 'blur']}],
|
||||
bedInfo: [{required: true, message: '请选择床位信息', trigger: ['change', 'blur']}],
|
||||
familyInfo: [{required: true, message: '请选择家属信息', trigger: ['change', 'blur']}],
|
||||
|
||||
},
|
||||
marks: [],
|
||||
lotDeleteList: [],
|
||||
LineNameList:{},
|
||||
centerDialogVisible:false,
|
||||
tableScopeId:'',
|
||||
tableScopeIndex:'',
|
||||
userScopeDialog: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'drawer-user-scope': httpVueLoader('/components/staffbenefit/therapyRecuperation/DrawerUserScope.vue'),
|
||||
},
|
||||
methods: {
|
||||
async deleteLotsRow(scope) {
|
||||
//this.lotDeleteList.push(scope.row.id);
|
||||
//console.log(this.lotDeleteList)
|
||||
const res = await $.get(loc() + '/getLotsById?lotId=' + scope.row.id)
|
||||
if (res.code===0) {
|
||||
this.LineNameList = res.data
|
||||
}
|
||||
if (!$.isEmptyObject(this.LineNameList)) {
|
||||
this.centerDialogVisible = true;
|
||||
this.tableScopeId=scope.row.id
|
||||
this.tableScopeIndex=scope.$index;
|
||||
}else {
|
||||
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
this.tableScopeId=scope.row.id
|
||||
this.tableScopeIndex=scope.$index;
|
||||
await this.deleteLotById();
|
||||
}
|
||||
//this.formData.lots.splice(scope.$index, 1)
|
||||
},
|
||||
addUnionLineNumberRow() {
|
||||
// 分工会线路数量配置用于后续按当前登录人的工会,判断至少应选择几条省内、省外线路。
|
||||
const row = {
|
||||
unionId: null,
|
||||
minProvinceOutNumber: null,
|
||||
minProvinceInNumber: null
|
||||
}
|
||||
this.formData.unionLineNumberConfigs.push(row)
|
||||
},
|
||||
deleteUnionLineNumberRow(index) {
|
||||
this.formData.unionLineNumberConfigs.splice(index, 1)
|
||||
},
|
||||
isUnionSelected(unionId, row) {
|
||||
// 分工会数量配置要求同一个分工会只能出现一次;当前行已选值不禁用,便于清空或改选。
|
||||
return this.formData.unionLineNumberConfigs.some(item => item !== row && item.unionId === unionId)
|
||||
},
|
||||
resetForm() {
|
||||
this.formData.lots = []
|
||||
this.$set(this.formData, 'unionLineNumberConfigs', [])
|
||||
if (this.$refs['addForm']) {
|
||||
this.$refs['addForm'].resetFields()
|
||||
}
|
||||
},
|
||||
async operation() {
|
||||
const valid = await this.$refs["addForm"].validate()
|
||||
if (valid) {
|
||||
this.subLoading = true
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
})
|
||||
const cloneData = clone(this.formData)
|
||||
|
||||
if (this.lotDeleteList && this.lotDeleteList.length > 0) {
|
||||
cloneData.lotDeleteList = JSON.stringify(this.lotDeleteList)
|
||||
}
|
||||
if (this.formData.lots && this.formData.lots.length > 0) {
|
||||
cloneData.lots = JSON.stringify(this.formData.lots)
|
||||
}
|
||||
if (this.formData.unionLineNumberConfigs && this.formData.unionLineNumberConfigs.length > 0) {
|
||||
cloneData.unionLineNumberConfigs = JSON.stringify(this.formData.unionLineNumberConfigs)
|
||||
}
|
||||
cloneData.outsideQuotaProportion = cloneData.outsideQuotaProportion / 100
|
||||
const resp = await $.post(loc() + "/operation", cloneData)
|
||||
if (resp.code === 0){
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
loading.close()
|
||||
this.subLoading = false
|
||||
}else {
|
||||
this.$notify.error({title: '失败', message: resp.msg});
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
async findOne() {
|
||||
await this.getActivityGroup()
|
||||
const {data} = await $.get(loc() + "/findOne")
|
||||
if (data.outsideQuotaProportion) {
|
||||
data.outsideQuotaProportion = data.outsideQuotaProportion * 1000 / 10
|
||||
}
|
||||
if (!data.lots) {
|
||||
data.lots = []
|
||||
}
|
||||
if (!data.unionLineNumberConfigs) {
|
||||
this.$set(data, 'unionLineNumberConfigs', [])
|
||||
}
|
||||
this.formData = data
|
||||
this.initLineContentEditor(data.notice)
|
||||
},
|
||||
async getActivityGroup() {
|
||||
const {data} = await $.get('/platform/activity/basic/scope/getActivityUserScopeGroup')
|
||||
this.activityGroupList = data
|
||||
},
|
||||
initLineContentEditor(content) {
|
||||
this.$set(this.formData, "notice", content || "")
|
||||
},
|
||||
async closeDialog() {
|
||||
this.tableScopeIndex = '';
|
||||
this.tableScopeId = '';
|
||||
this.centerDialogVisible = false;
|
||||
this.LineNameList = {};
|
||||
},
|
||||
async deleteLotById() {
|
||||
if (this.tableScopeId == null || this.tableScopeId===''){
|
||||
this.formData.lots.splice(this.tableScopeIndex, 1);
|
||||
this.$notify.success({title: '成功', message: "操作成功"});
|
||||
return;
|
||||
}
|
||||
const resp = await $.get(loc() + '/deleteLotById?lotId=' + this.tableScopeId)
|
||||
if (resp.code===0){
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
this.tableScopeId='';
|
||||
this.centerDialogVisible = false;
|
||||
this.formData.lots.splice(this.tableScopeIndex, 1)
|
||||
await this.findOne();
|
||||
}else {
|
||||
this.$notify.error({title: '失败', message: resp.msg});
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.findOne();
|
||||
this.unionOptions = await getUnions(null)
|
||||
this.initLineContentEditor();
|
||||
},
|
||||
watch: {
|
||||
'formData.activityGroupId': {
|
||||
async handler(newVal, oldVal) {
|
||||
this.activityGroupList = await getActivityGroup()
|
||||
this.userScopeDialog = false
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,651 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.container img {
|
||||
background-size: contain;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin: 5px auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.content {
|
||||
line-height: 26px;
|
||||
padding: 0px 20px 56px 20px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: 19px;
|
||||
color: #505050;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
border-color: grey;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.van-skeleton {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.van-skeleton__content {
|
||||
height: 600px;
|
||||
padding-top: 60px;
|
||||
}
|
||||
|
||||
.van-skeleton__row, .van-skeleton__title {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.family_join {
|
||||
background-color: #ff976a;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.joinPopup {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.join_content {
|
||||
padding: 20px;
|
||||
height: calc(100% - 40px - 46px - 60px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.join_submit {
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.van-cell {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
.van-tabs__wrap {
|
||||
margin: 6px;
|
||||
}
|
||||
|
||||
.van-tabs__nav--card {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.van-tabs__nav--card .van-tab.van-tab--active {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.van-tabs__nav--card .van-tab {
|
||||
border-right: 0 !important;
|
||||
}
|
||||
|
||||
.top_icon {
|
||||
position: fixed;
|
||||
bottom: 80px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.van-field__control {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.companionList_empty_text {
|
||||
text-align: center;
|
||||
padding: 10px 0px;
|
||||
font-size: 14px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.header div span {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.header :last-child {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-empty {
|
||||
position: relative;
|
||||
transform: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: transparent;
|
||||
height: calc(100vh - 46px - 153px - 60px);
|
||||
}
|
||||
|
||||
.submitButton {
|
||||
background-color: white !important;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.submitButton .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.van-image-preview img {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="职工疗休养-酒店介绍"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!--线路详情-->
|
||||
<van-skeleton title :loading="skeLoading" :row="12">
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<div class="title">
|
||||
<van-tag size="large" color="#1867b0" style="color: white;position: relative; top: -2px">
|
||||
{{baseData.lotName}}
|
||||
</van-tag>
|
||||
{{baseData.baseName}}
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<div>
|
||||
<span class="line_label">区  域:</span>
|
||||
{{baseData.regionalNature}}
|
||||
</div>
|
||||
<div>
|
||||
<span>创建模式:</span>
|
||||
{{baseData.createMode === 1 ? '校工会' : '分工会'}}
|
||||
</div>
|
||||
<div>
|
||||
<span>报名时间:</span>
|
||||
{{moment(baseData.signUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(baseData.signUpEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
<div>
|
||||
<span>活动时间:</span>
|
||||
{{moment(baseData.activityStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(baseData.activityEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div v-if="baseData.content" v-html="baseData.content" class="content"></div>
|
||||
<div v-else v-html="configData.notice" class="content"></div>
|
||||
<!--<van-empty
|
||||
v-else class="custom-image"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
description="暂无详细信息"
|
||||
></van-empty>-->
|
||||
|
||||
</div>
|
||||
</van-skeleton>
|
||||
|
||||
<!--置顶图标-->
|
||||
<image v-if="btnFlag" @click="backTop" src="/assets/staffbenefit/therapyRecuperation/svg/top.svg"
|
||||
class="top_icon"></image>
|
||||
|
||||
<!--底部报名按钮-->
|
||||
<div class="footer" v-if="fromUrlByMy != 'edit'">
|
||||
<template v-if="baseData.isNormal==0&&baseData.isNormalFalse>0">
|
||||
<van-button @click="join"
|
||||
class="join">我要报名
|
||||
</van-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<van-button v-if="moment().unix() <= moment(baseData.signUpEndTime).unix()" @click="join" class="join">我要报名
|
||||
</van-button>
|
||||
<van-button v-if="moment().unix() > moment(baseData.signUpEndTime).unix()" class="join">报名结束</van-button>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!--报名弹出框-->
|
||||
<van-popup v-model:show="joinPopup" position="right" class="joinPopup">
|
||||
<van-nav-bar @click-left="joinPopup = false" fixed left-arrow placeholder title="疗休养报名"></van-nav-bar>
|
||||
<div class="join_content">
|
||||
|
||||
<van-form @submit="joinSubmit">
|
||||
|
||||
<!--基础信息-->
|
||||
<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
基础信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field label="姓名" readonly v-model="formData.userName"></van-field>
|
||||
<van-field label="一卡通号" readonly v-model="formData.loginName"></van-field>
|
||||
<van-field label="身份证件" name="idCard" :rules="[{ required: true }]"
|
||||
placeholder="请填写身份证号、护照、台胞证等" v-model="formData.idCard"></van-field>
|
||||
<van-field label="手机号" name="mobile" :rules="[{ required: true }]"
|
||||
placeholder="请填写手机号" v-model="formData.mobile"></van-field>
|
||||
<van-field label="所属工会" readonly v-model="formData.unionName"></van-field>
|
||||
<van-field label="报名酒店" readonly v-model="formData.baseName"></van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--床位信息-->
|
||||
<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
床位信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field @click="self = true; roomVisible = true" readonly is-link label="房间" name="bedType"
|
||||
placeholder="请选择房间" v-model="formData.bedInfo.bedType"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
<van-field v-if="formData.bedInfo.bedType == '标准间'" @click="self = true; bedVisible = true"
|
||||
readonly is-link label="床位"
|
||||
name="bedNum" placeholder="请选择床位" v-model="formData.bedInfo.bedNum"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
<van-field v-if="formData.bedInfo.bedType == '标准间'" :rules="[{ validator, message: '请选择是否拼房' }]"
|
||||
label="是否拼房" name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="formData.bedInfo.isSleepTogether">
|
||||
<van-radio :name="true" shape="square">是</van-radio>
|
||||
<van-radio :name="false" shape="square">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field v-if="formData.bedInfo.bedType == '标准间' && formData.bedInfo.isSleepTogether == true"
|
||||
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开"
|
||||
v-model="formData.bedInfo.otherSleepUser"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--随行人信息-->
|
||||
<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header"
|
||||
style="display: flex; justify-content: space-between; align-items: center">
|
||||
<span style="float:left;">随行人信息</span>
|
||||
<div>
|
||||
<van-tag @click="delCompanion" size="large" type="primary" color="lightgrey">删除随行人</van-tag>
|
||||
<van-tag @click="addCompanion" size="large" type="primary" color="#1867b0">添加随行人</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="formData.companionList.length > 0" class="van-card-body">
|
||||
<van-tabs v-model="active" type="card" color="#0e78c5" animated>
|
||||
<van-tab v-for="item, index in formData.companionList" :title="'随行人' + (index + 1)">
|
||||
<van-field label="姓名" name="userName" placeholder="请填写姓名" v-model="item.userName"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
<!--<van-field label="一卡通号" name="loginName" placeholder="若没有工号,请忽略此项" v-model="item.loginName"></van-field>-->
|
||||
<van-field label="年龄" name="age" placeholder="请填写年龄" v-model="item.age"
|
||||
type="digit" :rules="[{ required: true }]"></van-field>
|
||||
<van-field :rules="[{ required: true, message: '请选择性别' }]" label="性别" name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="item.sex">
|
||||
<van-radio name="男" shape="square">男</van-radio>
|
||||
<van-radio name="女" shape="square">女</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="身份证件" name="idCard" placeholder="请填写身份证号、护照、台胞证等"
|
||||
:rules="[{ required: true }]"
|
||||
v-model="item.idCard"></van-field>
|
||||
<van-field label="手机号" name="mobile" placeholder="请填写手机号"
|
||||
:rules="[{ required: true }]" type="digit"
|
||||
v-model="item.mobile"></van-field>
|
||||
<van-field @click="companionVisible = true" readonly is-link label="与本人关系"
|
||||
name="relation"
|
||||
placeholder="随行人与本人关系" v-model="item.relation"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
|
||||
<van-field @click="self = false; roomVisible = true" readonly is-link label="房间"
|
||||
name="bedType" placeholder="请选择房间"
|
||||
v-model="item.bedInfo.bedType"></van-field>
|
||||
<div style="font-size: 8px; color:orangered; padding-left: 16px; padding-bottom: 4px">
|
||||
提醒:如果跟报名人员同一房间,无须选择!
|
||||
</div>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间'" @click="self = false; bedVisible = true"
|
||||
readonly is-link label="床位"
|
||||
name="bedNum" placeholder="请选择床位" v-model="item.bedInfo.bedNum"></van-field>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间'"
|
||||
:rules="[{ validator, message: '请选择是否拼房' }]" label="是否拼房">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="item.bedInfo.isSleepTogether">
|
||||
<van-radio :name="true" shape="square">是</van-radio>
|
||||
<van-radio :name="false" shape="square">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间' && item.bedInfo.isSleepTogether == true"
|
||||
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开"
|
||||
v-model="item.bedInfo.otherSleepUser"></van-field>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
<div v-if="formData.companionList.length == 0" class="companionList_empty_text">
|
||||
<span>
|
||||
如有随行人出行,请添加随行人
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submitButton">
|
||||
<van-button class="join join_submit">提交报名</van-button>
|
||||
</div>
|
||||
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
|
||||
</van-popup>
|
||||
|
||||
<!--房间类型弹出框-->
|
||||
<van-popup position="bottom" round v-model="roomVisible">
|
||||
<van-picker
|
||||
title="入住房间" show-toolbar
|
||||
:columns="roomColumns"
|
||||
@confirm="roomConfirm"
|
||||
@cancel="roomCancel">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!--床位弹出框-->
|
||||
<van-popup position="bottom" round v-model="bedVisible">
|
||||
<van-picker
|
||||
title="床位" show-toolbar
|
||||
:columns="bedColumns"
|
||||
@confirm="bedConfirm"
|
||||
@cancel="bedVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!--随行人关系弹出框-->
|
||||
<van-popup position="bottom" round v-model="companionVisible">
|
||||
<van-picker
|
||||
title="与本人关系" show-toolbar
|
||||
:columns="companionColumns"
|
||||
@confirm="(value, index) => {formData.companionList[active].relation = value; companionVisible = false}"
|
||||
@cancel="companionVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
roomColumns: ['大床房', '标准间'],
|
||||
bedColumns: ['1', '2'],
|
||||
companionColumns: ['配偶', '子女'],
|
||||
bedVisible: false,
|
||||
roomVisible: false,
|
||||
companionVisible: false,
|
||||
joinPopup: false,
|
||||
skeLoading: true,
|
||||
id: '',
|
||||
baseData: {},
|
||||
formData: {
|
||||
userName: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('username')}",
|
||||
loginName: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('loginname')}",
|
||||
unionName: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('union').getUnionname()}",
|
||||
idCard: "",
|
||||
mobile: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('mobile')}",
|
||||
lineName: '',
|
||||
takePartInLineId: '',
|
||||
takePartInUnionId: '',
|
||||
companionList: [],
|
||||
bedInfo: {},
|
||||
},
|
||||
self: true,
|
||||
btnFlag: false,
|
||||
index: 0,
|
||||
scrollTop: 0,
|
||||
fromUrlByMy: '',
|
||||
enrollId: '',
|
||||
configData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
roomCancel() {
|
||||
if (!this.self) {
|
||||
this.formData.companionList[this.active].bedInfo.bedType = ''
|
||||
}
|
||||
this.roomVisible = false
|
||||
},
|
||||
roomConfirm(value, index) {
|
||||
if (this.self) {
|
||||
this.formData.bedInfo.bedType = value
|
||||
} else {
|
||||
this.formData.companionList[this.active].bedInfo.bedType = value
|
||||
}
|
||||
this.roomVisible = false
|
||||
},
|
||||
bedConfirm(value, index) {
|
||||
if (this.self) {
|
||||
this.formData.bedInfo.bedNum = value
|
||||
} else {
|
||||
this.formData.companionList[this.active].bedInfo.bedNum = value
|
||||
}
|
||||
this.bedVisible = false
|
||||
},
|
||||
validator(value) {
|
||||
return value != null
|
||||
},
|
||||
async joinSubmit() {
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
const cloneData = clone(this.formData)
|
||||
cloneData.companionList.forEach((item, index) => {
|
||||
if (item.userName === '') {
|
||||
cloneData.companionList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/doSignUpForBaseManagement', {
|
||||
enroll: JSON.stringify(cloneData),
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (resp.code === 0) {
|
||||
toast.message = '提交成功'
|
||||
toast.type = 'success'
|
||||
} else {
|
||||
toast.message = resp.msg
|
||||
toast.type = 'fail'
|
||||
}
|
||||
setTimeout(() => {
|
||||
toast.clear()
|
||||
}, resp.code === 0 ? 500 : 3000)
|
||||
if (resp.code === 0) {
|
||||
location.href = '/platform/staffTherapyRecuperation/mobile/myRecuperation?index=' + this.index
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
addCompanion() {
|
||||
this.formData.companionList.push({userName: '', loginName: '', sex: '', relation: '', bedInfo: {}})
|
||||
},
|
||||
delCompanion() {
|
||||
this.formData.companionList.splice(this.active, 1)
|
||||
},
|
||||
async join() {
|
||||
const re = await $.post('/platform/staffTherapyRecuperation/line/enroll/validSignUpInfo', {
|
||||
enroll: JSON.stringify({
|
||||
takePartInBaseManagementId: this.baseData.id,
|
||||
isNormal: this.baseData.isNormal,
|
||||
id: this.enrollId
|
||||
}),
|
||||
})
|
||||
if (re.code !== 0) {
|
||||
vant.Toast({
|
||||
message: re.msg,
|
||||
duration: 3000
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.fromUrlByMy !== 'editDo') {
|
||||
this.formData = {
|
||||
userName: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('username')}",
|
||||
loginName: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('loginname')}",
|
||||
unionName: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('union').getUnionname()}",
|
||||
idCard: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('idcard')}",
|
||||
mobile: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('mobile')}",
|
||||
baseName: this.baseData.baseName,
|
||||
takePartInBaseManagementId: this.baseData.id,
|
||||
companionList: [],
|
||||
bedInfo: {},
|
||||
}
|
||||
this.$set(this.formData.bedInfo, 'bedType', '大床房')
|
||||
}
|
||||
this.joinPopup = true
|
||||
},
|
||||
async getData() {
|
||||
const res = await $.get('/platform/staffTherapyRecuperation/baseManagement/selectBaseAllInfo', {
|
||||
id: this.id
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.baseData = res.data
|
||||
this.formData.baseName = this.baseData.baseName
|
||||
this.skeLoading = false
|
||||
}
|
||||
},
|
||||
// 点击图片回到顶部方法,加计时器是为了过渡顺滑
|
||||
backTop() {
|
||||
const that = this
|
||||
let timer = setInterval(() => {
|
||||
let speed = Math.floor(-that.scrollTop / 5)
|
||||
document.documentElement.scrollTop = document.body.scrollTop = that.scrollTop + speed
|
||||
if (that.scrollTop === 0) {
|
||||
clearInterval(timer)
|
||||
}
|
||||
}, 16)
|
||||
},
|
||||
// 为了计算距离顶部的高度,当高度大于100显示回顶部图标,小于100则隐藏
|
||||
scrollToTop() {
|
||||
const that = this
|
||||
that.scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
|
||||
that.btnFlag = that.scrollTop > 100;
|
||||
},
|
||||
//修改时查询报名信息,进行回显
|
||||
async findSignUpInfoById() {
|
||||
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/findSignUpInfoById/' + this.enrollId)
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
if (this.formData.bedInfo === null) {
|
||||
this.formData.bedInfo = {}
|
||||
}
|
||||
if (this.formData.companionList) {
|
||||
this.formData.companionList.forEach(item => {
|
||||
if (item.bedInfo === null) {
|
||||
item.bedInfo = {}
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
async getConfigData() {
|
||||
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
|
||||
this.configData = resp.data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = getQueryString('id') ? getQueryString('id') : ''
|
||||
this.enrollId = getQueryString('enrollId') ? getQueryString('enrollId') : ''
|
||||
this.index = getQueryString('index') ? getQueryString('index') : ''
|
||||
await this.getConfigData()
|
||||
//编辑传出来的参数
|
||||
this.fromUrlByMy = getQueryString('fromUrlByMy') ? getQueryString('fromUrlByMy') : ''
|
||||
if (this.enrollId) {
|
||||
await this.findSignUpInfoById()
|
||||
}
|
||||
this.getData()
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('scroll', this.scrollToTop)
|
||||
document.addEventListener('click', function (event) {
|
||||
// 打印被点击的元素标签名和 class
|
||||
if (event.target.tagName === 'IMG') {
|
||||
vant.ImagePreview([event.target.src])
|
||||
}
|
||||
})
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener('scroll', this.scrollToTop)
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,165 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.van-doc-card {
|
||||
margin: 10px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.choose_button .button_text {
|
||||
font-size: 14px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.pre_text {
|
||||
white-space: break-spaces;
|
||||
padding-left: 7px;
|
||||
}
|
||||
|
||||
.pdfjs {
|
||||
height: 90%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="职工疗休养"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!--顶部轮播图-->
|
||||
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
|
||||
<van-swipe-item>
|
||||
<van-image width="100%" height="180" src="/assets/staffbenefit/therapyRecuperation/img/index1.jpeg"></van-image>
|
||||
</van-swipe-item>
|
||||
<van-swipe-item>
|
||||
<van-image height="180" src="/assets/staffbenefit/therapyRecuperation/img/index1.jpeg"></van-image>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
|
||||
<!--按钮导航-->
|
||||
<div class="choose_button van-doc-card">
|
||||
<van-grid :column-num="chooseButton.length" :border="false">
|
||||
<van-grid-item @click="toLineList(item.value)" v-for="item in chooseButton">
|
||||
<van-image width="46" height="46" :src="item.imgUrl"></van-image>
|
||||
<div class="button_text">{{item.label}}</div>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<!--疗休养描述-->
|
||||
<div class="van-doc-card" style="margin-top: 20px; height: calc(100vh - 200px)">
|
||||
<van-image width="190" height="43" src="/assets/staffbenefit/therapyRecuperation/img/title.png"></van-image>
|
||||
<div v-if="isPdf" class="pre_text" v-html="configData.notice"></div>
|
||||
<div v-else id="demo" class="pdf_div"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
let pdfh5 = null
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
chooseButton: [],
|
||||
configData: {},
|
||||
isPdf: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async toLineList(index) {
|
||||
/*const isExist = await getScopeUser(this.configData.activityGroupId)
|
||||
if (!isExist) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '您不在疗休养报名范围中',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
return
|
||||
}*/
|
||||
localStorage.setItem("clickIndex", JSON.stringify({clickIndex: index}))
|
||||
location.href = '/platform/staffTherapyRecuperation/mobile/mobileLineListPage'
|
||||
},
|
||||
async getConfigData() {
|
||||
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
|
||||
this.configData = resp.data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.chooseButton = await getEnumOptions('TheRapyRecuperationType')
|
||||
this.chooseButton = this.chooseButton.filter(o => o.value !== 3 && o.value !== 2)
|
||||
await this.getConfigData()
|
||||
|
||||
try {
|
||||
const parser = new DOMParser();
|
||||
const doc = parser.parseFromString(this.configData.notice, 'text/html');
|
||||
const link = doc.querySelector('a');
|
||||
const href = link.getAttribute('href');
|
||||
this.$nextTick(() => {
|
||||
pdfh5 = new Pdfh5('#demo', {
|
||||
pdfurl: href,
|
||||
});
|
||||
})
|
||||
}catch (e) {
|
||||
this.isPdf = true
|
||||
document.addEventListener('click', function (event) {
|
||||
// 打印被点击的元素标签名和 class
|
||||
if (event.target.tagName === 'IMG' && !['van-image__img', 'top_icon'].includes(event.target.className)) {
|
||||
vant.ImagePreview({
|
||||
images: [event.target.src],
|
||||
closeable: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
if (pdfh5) pdfh5.on("complete", function () {
|
||||
const imgDoc = document.querySelectorAll('img')
|
||||
let array = []
|
||||
let classArray = []
|
||||
imgDoc.forEach(o => {
|
||||
if(!['van-image__img', 'top_icon'].includes(o.getAttribute('class'))) {
|
||||
classArray.push(o.getAttribute('class'))
|
||||
array.push(o.getAttribute('src'))
|
||||
}
|
||||
})
|
||||
document.addEventListener('click', function (event) {
|
||||
// 打印被点击的元素标签名和 class
|
||||
if (event.target.tagName === 'IMG' && !['van-image__img', 'top_icon'].includes(event.target.className)) {
|
||||
const index = classArray.indexOf(event.target.className)
|
||||
if(index !== -1) {
|
||||
vant.ImagePreview({
|
||||
images: array,
|
||||
startPosition: index,
|
||||
closeable: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,896 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
#app {
|
||||
font-family: 微软雅黑,serif;
|
||||
}
|
||||
|
||||
.container img {
|
||||
background-size: contain;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin: 5px auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.backTop {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 10px 10px 10px 10px;
|
||||
}
|
||||
|
||||
.content {
|
||||
line-height: 26px;
|
||||
padding: 0px 10px 56px 10px;
|
||||
}
|
||||
|
||||
.pdf_div {
|
||||
padding-bottom: 70px;
|
||||
height: 800px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: 19px;
|
||||
color: #505050;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
border-color: grey;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.van-skeleton {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.van-skeleton__content {
|
||||
height: 600px;
|
||||
padding-top: 60px;
|
||||
}
|
||||
|
||||
.van-skeleton__row, .van-skeleton__title {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.family_join {
|
||||
background-color: #ff976a;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.joinPopup {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.join_content {
|
||||
padding: 20px;
|
||||
height: calc(100% - 26px - 60px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.join_submit {
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.van-cell {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
.van-tabs__wrap {
|
||||
margin: 6px;
|
||||
}
|
||||
|
||||
.van-tabs__nav--card {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.van-tabs__nav--card .van-tab.van-tab--active {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.van-tabs__nav--card .van-tab {
|
||||
border-right: 0 !important;
|
||||
}
|
||||
|
||||
.top_icon {
|
||||
position: fixed;
|
||||
bottom: 80px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.van-field__control {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.companionList_empty_text {
|
||||
text-align: center;
|
||||
padding: 10px 0px;
|
||||
font-size: 14px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.header div span {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.header :last-child {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-empty {
|
||||
position: relative;
|
||||
transform: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: transparent;
|
||||
height: calc(100vh - 46px - 153px - 60px);
|
||||
}
|
||||
|
||||
.submitButton {
|
||||
background-color: white !important;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.submitButton .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.van-image-preview img {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.van-tag {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.go(-1)" fixed left-arrow placeholder
|
||||
title="职工疗休养-线路介绍"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<template v-if="isLoad">
|
||||
<!--线路详情-->
|
||||
<van-skeleton title :loading="skeLoading" :row="12">
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<div class="title">
|
||||
<van-tag size="large" color="#1867b0" style="position: relative; top: -2px">
|
||||
{{lineData.lotName}}
|
||||
</van-tag>
|
||||
{{lineData.lineName}}
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<div v-if="lineData.regionalNature == '省内'">
|
||||
<div>
|
||||
<span class="line_label">预计费用:</span>
|
||||
<label>{{lineData.estimatedCost}}元</label>
|
||||
</div>
|
||||
<div v-if="configData.familyInfo == 2">
|
||||
<span>当前报名:</span>
|
||||
{{lineData.signUpUserNum + lineData.signUpUserFamilyNum + '(家属' + lineData.signUpUserFamilyNum
|
||||
+
|
||||
'人)'}}
|
||||
</div>
|
||||
<div v-else>
|
||||
<span>当前报名:</span>
|
||||
{{lineData.signUpUserNum + lineData.familyNumber + '(家属' + lineData.familyNumber
|
||||
+
|
||||
'人)'}}
|
||||
</div>
|
||||
<div>
|
||||
<span class="line_label">成团人数包括家属:</span>
|
||||
<label v-if="lineData.estimatedFamilyNumbers">{{lineData.estimatedFamilyNumbers}}人</label>
|
||||
<label v-else>不限制</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<div>
|
||||
<span class="line_label">预计费用:</span>
|
||||
<label>{{lineData.estimatedCost}}元</label>
|
||||
</div>
|
||||
<div v-if="configData.familyInfo == 2">
|
||||
<span>当前报名:</span>
|
||||
{{lineData.signUpUserNum + '(家属' + lineData.signUpUserFamilyNum
|
||||
+
|
||||
'人)'}}
|
||||
</div>
|
||||
<div v-else>
|
||||
<span>当前报名:</span>
|
||||
{{lineData.signUpUserNum + '(家属' + lineData.familyNumber
|
||||
+
|
||||
'人)'}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="hasSignUpTime()">
|
||||
<span>报名时间:</span>
|
||||
{{moment(lineData.signUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(lineData.signUpEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
<div>
|
||||
<span>出行时间:</span>
|
||||
{{moment(lineData.playStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(lineData.playEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
<div>
|
||||
<span>旅 行 社:</span>
|
||||
{{lineData.travelAgencyName}}
|
||||
</div>
|
||||
<div>
|
||||
<span>联系方式:</span>
|
||||
{{lineData.contactMobileNumber}}
|
||||
</div>
|
||||
<div>
|
||||
<span class="line_label">最少成团人数(包括家属):</span>
|
||||
<label>{{configData.outsideQuota}}人</label>
|
||||
</div>
|
||||
<div>
|
||||
<span class="line_label">联络人:</span>
|
||||
<label>{{lineData.principal}}</label>
|
||||
</div>
|
||||
<div>
|
||||
<span class="line_label">联系方式:</span>
|
||||
<label>{{lineData.principalContact}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider :style="{ color: 'orange', fontSize: '12px' }">上下滑动翻页,单击查看,再单击返回</van-divider>
|
||||
<!--<div v-if="lineData.content" v-html="lineData.content" class="content"></div>
|
||||
<div v-else v-html="configData.notice" class="content"></div>-->
|
||||
<div v-if="isPdf" v-html="lineData.content" class="content"></div>
|
||||
<div v-else id="demo" class="pdf_div"></div>
|
||||
|
||||
<!--<van-empty
|
||||
v-else class="custom-image"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
description="暂无详细信息"
|
||||
></van-empty>-->
|
||||
</div>
|
||||
</van-skeleton>
|
||||
|
||||
<!--置顶图标-->
|
||||
<image v-if="btnFlag" @click="backTop" src="/assets/staffbenefit/therapyRecuperation/svg/top.svg"
|
||||
class="top_icon"></image>
|
||||
|
||||
<!--底部报名按钮-->
|
||||
<div class="footer" v-if="fromUrlByMy != 'edit'">
|
||||
<van-button v-if="signUpButtonState() === 'canSignUp'" @click="join"
|
||||
class="join">{{fromUrlByMy === 'editDo' ? '修改报名' : '我要报名'}}
|
||||
</van-button>
|
||||
<van-button v-if="signUpButtonState() === 'notStarted'" class="join">报名还未开始
|
||||
</van-button>
|
||||
<van-button v-if="signUpButtonState() === 'ended'" class="join">报名结束
|
||||
</van-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!--报名弹出框-->
|
||||
<van-popup v-model:show="joinPopup" position="right" class="joinPopup">
|
||||
<van-nav-bar @click-left="signType == '2' ? history.go(-1) : joinPopup = false" fixed left-arrow placeholder title="疗休养报名"></van-nav-bar>
|
||||
<div class="join_content">
|
||||
|
||||
<van-form @submit="joinSubmit">
|
||||
|
||||
<!--基础信息-->
|
||||
<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
基础信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field label="姓名" readonly v-model="formData.userName"></van-field>
|
||||
<van-field label="一卡通号" readonly v-model="formData.loginName"></van-field>
|
||||
<van-field label="身份证件" name="idCard" :rules="[{ required: true }]"
|
||||
placeholder="请填写身份证号、护照、台胞证等" v-model="formData.idCard"></van-field>
|
||||
<van-field label="手机号" name="mobile" :rules="[{ required: true }]"
|
||||
placeholder="请填写手机号" v-model="formData.mobile"></van-field>
|
||||
<van-field label="所属工会" readonly v-model="formData.unionName"></van-field>
|
||||
<van-field v-if="signType != '2'" label="报名线路" readonly v-model="formData.lineName"></van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--床位信息-->
|
||||
<div v-if="configData.bedInfo === true" class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
床位信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field @click="self = true; roomVisible = true" readonly is-link label="房间" name="bedType"
|
||||
placeholder="请选择房间" v-model="formData.bedInfo.bedType"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
<van-field v-if="formData.bedInfo.bedType == '标准间'" @click="self = true; bedVisible = true"
|
||||
readonly is-link label="床位"
|
||||
name="bedNum" placeholder="请选择床位" v-model="formData.bedInfo.bedNum"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
<van-field v-if="formData.bedInfo.bedType == '标准间'"
|
||||
:rules="[{ validator, message: '请选择是否拼房' }]"
|
||||
label="是否拼房" name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="formData.bedInfo.isSleepTogether">
|
||||
<van-radio :name="true" shape="square">是</van-radio>
|
||||
<van-radio :name="false" shape="square">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field
|
||||
v-if="formData.bedInfo.bedType == '标准间' && formData.bedInfo.isSleepTogether == true"
|
||||
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开"
|
||||
v-model="formData.bedInfo.otherSleepUser"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--随行人信息-->
|
||||
<div v-if="index != 2" class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header"
|
||||
style="display: flex; justify-content: space-between; align-items: center">
|
||||
<span style="float:left;">随行人信息</span>
|
||||
<div v-if="configData.familyInfo === 2">
|
||||
<van-tag @click="delCompanion" size="large" type="primary" color="lightgrey">删除随行人
|
||||
</van-tag>
|
||||
<van-tag @click="addCompanion" size="large" type="primary" color="#1867b0">添加随行人
|
||||
</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="configData.familyInfo === 2">
|
||||
<div v-if="formData.companionList.length > 0" class="van-card-body">
|
||||
<van-tabs v-model="active" type="card" color="#0e78c5" animated>
|
||||
<van-tab v-for="item, index in formData.companionList" :title="'随行人' + (index + 1)">
|
||||
<van-field label="姓名" name="userName" placeholder="请填写姓名"
|
||||
v-model="item.userName"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
<!--<van-field label="一卡通号" name="loginName" placeholder="若没有工号,请忽略此项" v-model="item.loginName"></van-field>-->
|
||||
<van-field label="年龄" name="age" placeholder="请填写年龄" v-model="item.age"
|
||||
type="digit" :rules="[{ required: true }]"></van-field>
|
||||
<van-field :rules="[{ required: true, message: '请选择性别' }]" label="性别"
|
||||
name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="item.sex">
|
||||
<van-radio name="男" shape="square">男</van-radio>
|
||||
<van-radio name="女" shape="square">女</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="身份证件" name="idCard" placeholder="请填写身份证号、护照、台胞证等"
|
||||
:rules="[{ required: true }]"
|
||||
v-model="item.idCard"></van-field>
|
||||
<van-field label="手机号" name="mobile" placeholder="请填写手机号"
|
||||
:rules="[{ required: true }]" type="digit"
|
||||
v-model="item.mobile"></van-field>
|
||||
<van-field @click="companionVisible = true" readonly is-link label="与本人关系"
|
||||
name="relation"
|
||||
placeholder="随行人与本人关系" v-model="item.relation"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
|
||||
<van-field @click="self = false; roomVisible = true" readonly is-link label="房间"
|
||||
name="bedType" placeholder="请选择房间"
|
||||
v-model="item.bedInfo.bedType"></van-field>
|
||||
<div style="font-size: 12px; color:orangered; padding-left: 16px; padding-bottom: 4px">
|
||||
提醒:如果跟报名人员同一房间,无须选择!
|
||||
</div>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间'"
|
||||
@click="self = false; bedVisible = true"
|
||||
readonly is-link label="床位"
|
||||
name="bedNum" placeholder="请选择床位"
|
||||
v-model="item.bedInfo.bedNum"></van-field>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间'"
|
||||
:rules="[{ validator, message: '请选择是否拼房' }]" label="是否拼房">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal"
|
||||
v-model="item.bedInfo.isSleepTogether">
|
||||
<van-radio :name="true" shape="square">是</van-radio>
|
||||
<van-radio :name="false" shape="square">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field
|
||||
v-if="item.bedInfo.bedType == '标准间' && item.bedInfo.isSleepTogether == true"
|
||||
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开"
|
||||
v-model="item.bedInfo.otherSleepUser"></van-field>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
<div v-if="formData.companionList.length == 0" class="companionList_empty_text">
|
||||
<span>
|
||||
如有随行人出行,请添加随行人
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<van-field label="家属数量" name="familyNumber" placeholder="请填写家属数量" v-model="formData.familyNumber"
|
||||
type="digit" :rules="[{ required: true }]"></van-field>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div class="submitButton">
|
||||
<van-button class="join join_submit">提交报名</van-button>
|
||||
</div>
|
||||
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
|
||||
</van-popup>
|
||||
|
||||
<!--房间类型弹出框-->
|
||||
<van-popup position="bottom" round v-model="roomVisible">
|
||||
<van-picker
|
||||
title="入住房间" show-toolbar
|
||||
:columns="roomColumns"
|
||||
@confirm="roomConfirm"
|
||||
@cancel="roomCancel">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!--床位弹出框-->
|
||||
<van-popup position="bottom" round v-model="bedVisible">
|
||||
<van-picker
|
||||
title="床位" show-toolbar
|
||||
:columns="bedColumns"
|
||||
@confirm="bedConfirm"
|
||||
@cancel="bedVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!--随行人关系弹出框-->
|
||||
<van-popup position="bottom" round v-model="companionVisible">
|
||||
<van-picker
|
||||
title="与本人关系" show-toolbar
|
||||
:columns="companionColumns"
|
||||
@confirm="(value, index) => {formData.companionList[active].relation = value; companionVisible = false}"
|
||||
@cancel="companionVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
let pdfh5 = null
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
isPdf: false,
|
||||
isLoad: false,
|
||||
active: 0,
|
||||
roomColumns: ['大床房', '标准间'],
|
||||
bedColumns: ['1', '2'],
|
||||
companionColumns: ['配偶', '子女', '父母'],
|
||||
bedVisible: false,
|
||||
roomVisible: false,
|
||||
companionVisible: false,
|
||||
joinPopup: false,
|
||||
skeLoading: true,
|
||||
id: '',
|
||||
lineData: {},
|
||||
formData: {
|
||||
userName: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('username')}",
|
||||
loginName: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('loginname')}",
|
||||
unionName: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('union').getUnionname()}",
|
||||
idCard: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('idcard')}",
|
||||
mobile: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('mobile')}",
|
||||
lineName: '',
|
||||
takePartInLineId: '',
|
||||
takePartInUnionId: '',
|
||||
companionList: [],
|
||||
bedInfo: {},
|
||||
},
|
||||
self: true,
|
||||
btnFlag: false,
|
||||
index: 0,
|
||||
scrollTop: 0,
|
||||
fromUrlByMy: '',
|
||||
enrollId: '',
|
||||
configData: {},
|
||||
signType: '',
|
||||
takePartInTravelAgencyId: '',
|
||||
queryYear: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
roomCancel() {
|
||||
if (!this.self) {
|
||||
this.formData.companionList[this.active].bedInfo.bedType = ''
|
||||
}
|
||||
this.roomVisible = false
|
||||
},
|
||||
roomConfirm(value, index) {
|
||||
if (this.self) {
|
||||
this.formData.bedInfo.bedType = value
|
||||
} else {
|
||||
this.formData.companionList[this.active].bedInfo.bedType = value
|
||||
}
|
||||
this.roomVisible = false
|
||||
},
|
||||
bedConfirm(value, index) {
|
||||
if (this.self) {
|
||||
this.formData.bedInfo.bedNum = value
|
||||
} else {
|
||||
this.formData.companionList[this.active].bedInfo.bedNum = value
|
||||
}
|
||||
this.bedVisible = false
|
||||
},
|
||||
validator(value) {
|
||||
return value != null
|
||||
},
|
||||
async joinSubmit() {
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
const cloneData = clone(this.formData)
|
||||
cloneData.companionList.forEach((item, index) => {
|
||||
if (item.userName === '') {
|
||||
cloneData.companionList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
let url = ''
|
||||
if(this.signType == '2') {
|
||||
cloneData.takePartInTravelAgencyId = this.takePartInTravelAgencyId
|
||||
url = '/platform/staffTherapyRecuperation/line/enroll/doSignUpForTravelAgency'
|
||||
} else {
|
||||
url = '/platform/staffTherapyRecuperation/line/enroll/doSignUpForLine'
|
||||
}
|
||||
const resp = await $.post(url, {
|
||||
enroll: JSON.stringify(cloneData),
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (resp.code === 0) {
|
||||
toast.message = '提交成功'
|
||||
toast.type = 'success'
|
||||
setTimeout(() => {
|
||||
toast.clear()
|
||||
}, 500)
|
||||
location.replace('/platform/staffTherapyRecuperation/mobile/myRecuperation?index=' + this.index)
|
||||
} else {
|
||||
toast.clear()
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: resp.msg,
|
||||
}).then(() => {
|
||||
})
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
isValidDate(value) {
|
||||
// 报名时间字段为空或格式无效时按未开始处理,避免页面展示 Invalid date。
|
||||
return value && moment(value).isValid()
|
||||
},
|
||||
hasSignUpTime() {
|
||||
// 报名时间需要开始、结束两个时间都有效才展示完整区间。
|
||||
return this.isValidDate(this.lineData.signUpStartTime) && this.isValidDate(this.lineData.signUpEndTime)
|
||||
},
|
||||
signUpButtonState() {
|
||||
const now = moment().unix()
|
||||
const adjustSignUpEndTime = this.isValidDate(this.lineData.adjustSignUpEndTime) ? moment(this.lineData.adjustSignUpEndTime).unix() : 0
|
||||
|
||||
if (this.hasSignUpTime()) {
|
||||
const signUpStartTime = moment(this.lineData.signUpStartTime).unix()
|
||||
const signUpEndTime = moment(this.lineData.signUpEndTime).unix()
|
||||
|
||||
if (now < signUpStartTime) {
|
||||
return 'notStarted'
|
||||
}
|
||||
|
||||
if (now <= signUpEndTime) {
|
||||
return 'canSignUp'
|
||||
}
|
||||
}
|
||||
|
||||
// 被解散用户允许走调剂报名截止时间,保留原有调剂报名入口判断。
|
||||
if (this.lineData.isDismissed && adjustSignUpEndTime > 0 && now <= adjustSignUpEndTime) {
|
||||
return 'canSignUp'
|
||||
}
|
||||
|
||||
if (!this.hasSignUpTime()) {
|
||||
return 'notStarted'
|
||||
}
|
||||
|
||||
return 'ended'
|
||||
},
|
||||
canSignUp() {
|
||||
return this.signUpButtonState() === 'canSignUp'
|
||||
},
|
||||
addCompanion() {
|
||||
if (!this.lineData.isFamilySignUp) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '当前线路暂无法添加随行人',
|
||||
})
|
||||
return
|
||||
}
|
||||
this.formData.companionList.push({userName: '', loginName: '', sex: '', relation: '', bedInfo: {}})
|
||||
},
|
||||
delCompanion() {
|
||||
this.formData.companionList.splice(this.active, 1)
|
||||
},
|
||||
async join() {
|
||||
const re = await $.post('/platform/staffTherapyRecuperation/line/enroll/validSignUpInfo', {
|
||||
enroll: JSON.stringify({
|
||||
id: this.enrollId,
|
||||
isNormal: this.lineData.isNormal,
|
||||
takePartInLineId: this.lineData.usId,
|
||||
takePartInUnionId: this.takePartInUnionId
|
||||
}),
|
||||
})
|
||||
if (re.code !== 0) {
|
||||
if (re.msg === '您今年已报名,如要继续报名请进入我的疗休养,取消已选择') {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: re.msg,
|
||||
confirmButtonText: '跳转页面',
|
||||
}).then(() => {
|
||||
location.href = '/platform/staffTherapyRecuperation/mobile/myRecuperation?index=' + this.index
|
||||
}).catch(() => {
|
||||
});
|
||||
} else {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: re.msg,
|
||||
}).then(() => {
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
if (re.msg === '当前线路所指定的旅行社可报名人数剩余1人,是否继续报名') {
|
||||
try {
|
||||
await vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: re.msg,
|
||||
})
|
||||
} catch (e) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if (this.fromUrlByMy !== 'editDo') {
|
||||
this.formData = {
|
||||
userName: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('username')}",
|
||||
loginName: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('loginname')}",
|
||||
unionName: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('union').getUnionname()}",
|
||||
idCard: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('idcard')}",
|
||||
mobile: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('mobile')}",
|
||||
lineName: this.lineData.lineName,
|
||||
takePartInLineId: this.lineData.usId,
|
||||
takePartInUnionId: this.takePartInUnionId,
|
||||
companionList: [],
|
||||
bedInfo: {},
|
||||
}
|
||||
this.$set(this.formData.bedInfo, 'bedType', '大床房')
|
||||
}
|
||||
this.joinPopup = true
|
||||
},
|
||||
async getData() {
|
||||
const res = await $.get('/platform/staffTherapyRecuperation/line/enroll/selectLineAllInfo', {
|
||||
usId: this.id,
|
||||
usUnionId: this.takePartInUnionId,
|
||||
year: this.queryYear
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.lineData = res.data
|
||||
this.formData.lineName = this.lineData.lineName
|
||||
this.formData.takePartInLineId = this.lineData.usId
|
||||
this.skeLoading = false
|
||||
}
|
||||
},
|
||||
// 点击图片回到顶部方法,加计时器是为了过渡顺滑
|
||||
backTop() {
|
||||
const that = this
|
||||
let timer = setInterval(() => {
|
||||
let speed = Math.floor(-that.scrollTop / 5)
|
||||
document.documentElement.scrollTop = document.body.scrollTop = that.scrollTop + speed
|
||||
if (that.scrollTop === 0) {
|
||||
clearInterval(timer)
|
||||
}
|
||||
}, 16)
|
||||
},
|
||||
// 为了计算距离顶部的高度,当高度大于100显示回顶部图标,小于100则隐藏
|
||||
scrollToTop() {
|
||||
const that = this
|
||||
that.scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
|
||||
that.btnFlag = that.scrollTop > 100;
|
||||
},
|
||||
//修改时查询报名信息,进行回显
|
||||
async findSignUpInfoById() {
|
||||
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/findSignUpInfoById/' + this.enrollId)
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
if (this.formData.bedInfo === null) {
|
||||
this.formData.bedInfo = {}
|
||||
}
|
||||
if (this.formData.companionList) {
|
||||
this.formData.companionList.forEach(item => {
|
||||
if (item.bedInfo === null) {
|
||||
item.bedInfo = {}
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
async getConfigData() {
|
||||
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
|
||||
this.configData = resp.data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const loading = this.$toast({
|
||||
duration: 0,
|
||||
message: '正在加载线路信息',
|
||||
forbidClick: true,
|
||||
loadingType: 'spinner',
|
||||
type: 'loading',
|
||||
overlay: true
|
||||
});
|
||||
this.id = getQueryString('id') ? getQueryString('id') : ''
|
||||
this.queryYear = getQueryString('queryYear') ? getQueryString('queryYear') : ''
|
||||
this.index = getQueryString('index') ? getQueryString('index') : ''
|
||||
this.signType = getQueryString('signType') ? getQueryString('signType') : ''
|
||||
this.takePartInTravelAgencyId = getQueryString('takePartInTravelAgencyId') ? getQueryString('takePartInTravelAgencyId') : ''
|
||||
await this.getConfigData()
|
||||
//编辑传出来的参数
|
||||
this.fromUrlByMy = getQueryString('fromUrlByMy') ? getQueryString('fromUrlByMy') : ''
|
||||
this.enrollId = getQueryString('enrollId') ? getQueryString('enrollId') : ''
|
||||
this.takePartInUnionId = getQueryString('takePartInUnionId') ? getQueryString('takePartInUnionId') : ''
|
||||
if (this.enrollId) {
|
||||
await this.findSignUpInfoById()
|
||||
}
|
||||
if(!this.signType) {
|
||||
await this.getData()
|
||||
} else {
|
||||
this.joinPopup = true
|
||||
}
|
||||
this.isLoad = true
|
||||
|
||||
try {
|
||||
const parser = new DOMParser();
|
||||
const doc = parser.parseFromString(this.lineData.content, 'text/html');
|
||||
const link = doc.querySelector('a');
|
||||
const href = link.getAttribute('href');
|
||||
this.$nextTick(() => {
|
||||
pdfh5 = new Pdfh5('#demo', {
|
||||
pdfurl: href,
|
||||
});
|
||||
})
|
||||
}catch (e) {
|
||||
this.isPdf = true
|
||||
document.addEventListener('click', function (event) {
|
||||
// 打印被点击的元素标签名和 class
|
||||
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
|
||||
vant.ImagePreview({
|
||||
images: [event.target.src],
|
||||
closeable: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
if (pdfh5) pdfh5.on("complete", function () {
|
||||
const imgDoc = document.querySelectorAll('img')
|
||||
let array = []
|
||||
let classArray = []
|
||||
imgDoc.forEach(o => {
|
||||
if(o.getAttribute('class') !== 'top_icon') {
|
||||
classArray.push(o.getAttribute('class'))
|
||||
array.push(o.getAttribute('src'))
|
||||
}
|
||||
})
|
||||
document.addEventListener('click', function (event) {
|
||||
// 打印被点击的元素标签名和 class
|
||||
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
|
||||
const index = classArray.indexOf(event.target.className)
|
||||
if(index !== -1) {
|
||||
vant.ImagePreview({
|
||||
images: array,
|
||||
startPosition: index,
|
||||
closeable: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
loading.close()
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('scroll', this.scrollToTop)
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener('scroll', this.scrollToTop)
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,911 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
#app {
|
||||
font-family: 微软雅黑, serif;
|
||||
min-height: 100vh;
|
||||
background: #f7f8fa;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 0;
|
||||
padding: 18px 18px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
position: relative;
|
||||
margin: 12px 16px;
|
||||
background-color: #fff;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 2px 10px rgba(31, 35, 41, 0.08);
|
||||
width: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.list-card > .content {
|
||||
padding: 14px 14px;
|
||||
display: flex;
|
||||
min-height: 92px;
|
||||
}
|
||||
|
||||
.content-right {
|
||||
width: calc(100% - 108px);
|
||||
max-width: calc(100% - 108px);
|
||||
padding-left: 12px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.cr-title {
|
||||
/*max-height: 40px;*/
|
||||
line-height: 18px;
|
||||
overflow: hidden;
|
||||
font-weight: bold;
|
||||
color: #111827;
|
||||
}
|
||||
|
||||
.line-title-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.line-title-text {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.group-tag {
|
||||
flex: 0 0 auto;
|
||||
margin-top: 1px;
|
||||
border-radius: 4px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.choose_button .button_text {
|
||||
font-size: 13px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.concat, .mobile, .union {
|
||||
font-size: 12px;
|
||||
line-height: 19px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
color: #667085;
|
||||
}
|
||||
|
||||
.van-tag {
|
||||
padding: 1px 7px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
line-height: 15px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
.line-filter-dropdowns {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.line-filter-dropdowns .van-dropdown-menu {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
height: 36px;
|
||||
border: 1px solid #dce1e8;
|
||||
border-radius: 18px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.line-filter-dropdowns .van-dropdown-menu__bar {
|
||||
height: 34px;
|
||||
box-shadow: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.line-filter-dropdowns .van-dropdown-menu__title {
|
||||
max-width: 100%;
|
||||
padding: 0 18px 0 8px;
|
||||
color: #344054;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #1a73ff;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.no_active {
|
||||
background-color: transparent;
|
||||
color: #344054;
|
||||
}
|
||||
|
||||
.van-list {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.van-row {
|
||||
text-align: center;
|
||||
color: #1867b0;
|
||||
padding: 0px 0px 10px 0px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.desc_info div {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.group-count-number.grouped {
|
||||
color: #12b76a;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.group-count-number.not-grouped {
|
||||
color: #f79009;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sign_button .van-button {
|
||||
width: 72px;
|
||||
height: 26px;
|
||||
color: white;
|
||||
background: rgb(24, 103, 176);
|
||||
border-color: rgb(24, 103, 176);
|
||||
font-size: 11px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-action-sheet__cancel, .van-action-sheet__item {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.line-search {
|
||||
margin-top: 14px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.line-search .van-search {
|
||||
padding: 0;
|
||||
border: 1px solid #dce1e8;
|
||||
border-radius: 18px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.line-search .van-search__action {
|
||||
color: #1a73ff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.line-search .van-search__content {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.type-icon {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
margin: 0 auto;
|
||||
border-radius: 50%;
|
||||
background: #f2f4f7;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.type-icon.active-icon {
|
||||
border: 2px solid #1a73ff;
|
||||
background: #eef5ff;
|
||||
}
|
||||
|
||||
.type-icon .van-image {
|
||||
width: 30px !important;
|
||||
height: 30px !important;
|
||||
}
|
||||
|
||||
.line-thumb {
|
||||
flex: 0 0 96px;
|
||||
}
|
||||
|
||||
.line-thumb .van-image {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.union-popup {
|
||||
max-height: 70vh;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.union-popup-header {
|
||||
height: 52px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 18px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.union-popup-title {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #111827;
|
||||
}
|
||||
|
||||
.union-popup-action {
|
||||
color: #1a73ff;
|
||||
}
|
||||
|
||||
.union-popup-search {
|
||||
padding: 0 18px 12px;
|
||||
}
|
||||
|
||||
.union-popup-search .van-search {
|
||||
padding: 0;
|
||||
border-radius: 18px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.union-list {
|
||||
max-height: calc(70vh - 116px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.union-item {
|
||||
padding: 13px 18px;
|
||||
border-bottom: 1px solid #f2f4f7;
|
||||
color: #111827;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.union-item.active-union {
|
||||
color: #1a73ff;
|
||||
font-weight: bold;
|
||||
background: #f5f9ff;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak v-if="isLoad">
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="疗休养线路"></van-nav-bar>
|
||||
|
||||
|
||||
<!--<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearArray"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>-->
|
||||
|
||||
<van-notice-bar v-if="schoolTime != '' && schoolTime != null" mode="closeable">
|
||||
您的入校时间为{{schoolTime}},疗休养额度为1500。
|
||||
</van-notice-bar>
|
||||
|
||||
<!--按钮导航-->
|
||||
<div class="choose_button van-doc-card">
|
||||
<van-grid :column-num="chooseButton.length" :border="false">
|
||||
<van-grid-item @click="pageForm.theRapyRecuperationType = item.value; doSearch()"
|
||||
v-for="item in chooseButton">
|
||||
<div :class="['type-icon', pageForm.theRapyRecuperationType == item.value ? 'active-icon' : '']">
|
||||
<van-image :src="item.imgUrl"></van-image>
|
||||
</div>
|
||||
<div :style="pageForm.theRapyRecuperationType == item.value ? 'color: #1867b0; font-weight: bold' : 'color: black; font-weight: normal'"
|
||||
class="button_text">{{item.label}}
|
||||
</div>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div class="line-filter-dropdowns"
|
||||
v-if="['0', 0, '1', 1].includes(pageForm.theRapyRecuperationType)">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item
|
||||
v-model="pageForm.signUpStatus"
|
||||
:options="signUpStatusOptions"
|
||||
@change="changeSignUpStatus">
|
||||
</van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item
|
||||
v-model="pageForm.lineUnionType"
|
||||
:options="lineUnionTypeOptions"
|
||||
@change="changeLineUnionType">
|
||||
</van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div class="line-search">
|
||||
<van-search
|
||||
v-model="pageForm.lineKeyword"
|
||||
label="线路"
|
||||
placeholder="请输入线路名称"
|
||||
show-action
|
||||
@clear="doSearch"
|
||||
@search="doSearch">
|
||||
<template #action>
|
||||
<div @click="doSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-sticky>
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:immediate-check="true"
|
||||
@load="onLoad"
|
||||
finished-text="没有更多了"
|
||||
v-model="loading">
|
||||
<div @click.stop="clickLineRow(o)" class="list-card" v-for="o in tableData">
|
||||
<div class="content">
|
||||
<div class="line-thumb">
|
||||
<van-image
|
||||
height="82"
|
||||
radius="8"
|
||||
:src="CREATE_PREVIEW_URL(o.fileId)"
|
||||
width="96">
|
||||
</van-image>
|
||||
</div>
|
||||
<div v-if="pageForm.theRapyRecuperationType != '2' && pageForm.theRapyRecuperationType != '3'"
|
||||
class="content-right">
|
||||
<div class="cr-title line-title-row">
|
||||
<span class="line-title-text" style="font-size: 14px">{{o.lineName}}</span>
|
||||
<van-tag
|
||||
:color="isGrouped(o) ? '#e7f8ef' : '#fff3e6'"
|
||||
:text-color="isGrouped(o) ? '#12b76a' : '#f79009'"
|
||||
class="group-tag">
|
||||
{{isGrouped(o) ? '已成团' : '未成团'}}
|
||||
</van-tag>
|
||||
</div>
|
||||
<div class="desc_info">
|
||||
<!--<div class="union">
|
||||
<span>组织形式:</span>{{o.createMode === 2 && o.signUpMode === 2 ? '校工会' : o.usUnionName}}
|
||||
</div>-->
|
||||
<!--<div class="concat" v-if="modifyConfig.familyInfo == 2">
|
||||
<span>已报人数:</span>{{o.signUpUserNum + o.signUpUserFamilyNum + '(家属' +
|
||||
o.signUpUserFamilyNum + '人)'}}
|
||||
</div>
|
||||
|
||||
<div class="concat" v-else>
|
||||
<span>已报人数:</span>{{o.signUpUserNum + o.familyNumber + '(家属' +
|
||||
o.familyNumber + '人)'}}
|
||||
</div>-->
|
||||
|
||||
<div class="concat">
|
||||
<span>预计费用:</span>
|
||||
{{o.estimatedCost}}元
|
||||
</div>
|
||||
|
||||
<div class="concat">
|
||||
<span>出行时段:</span>
|
||||
{{moment(o.playStartTime).format('MM-DD') + ' 至 ' + moment(o.playEndTime).format('MM-DD')}}
|
||||
</div>
|
||||
|
||||
<div class="mobile">
|
||||
<!--<span>出行时间:</span>{{moment(o.playStartTime).format('YYYY-MM-DD')}}-->
|
||||
<span>组织机构:</span>
|
||||
{{o.signUpMode === 2 ? '校工会' : o.usUnionName}}
|
||||
</div>
|
||||
|
||||
<div class="mobile">
|
||||
<span>成团人数:</span>
|
||||
<span :class="['group-count-number', isGrouped(o) ? 'grouped' : 'not-grouped']">
|
||||
{{getGroupCount(o)}}
|
||||
</span>/{{getMinimumGroupCount(o)}}人
|
||||
</div>
|
||||
|
||||
<!--<div class="mobile">
|
||||
<span>旅 行 社:</span>{{o.travelAgencyName}}
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="pageForm.theRapyRecuperationType == '2'" class="content-right">
|
||||
<div class="cr-title">
|
||||
<span>{{o.travelAgencyName}}</span>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div class="concat">
|
||||
<span>联 系 人:</span>{{o.contact}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>联系电话:</span>{{o.contactMobileNumber}}
|
||||
</div>
|
||||
<!--<div class="mobile">
|
||||
<span>邮箱:</span>{{o.email}}
|
||||
</div>-->
|
||||
<div class="concat" v-if="modifyConfig.familyInfo == 2">
|
||||
<span>已报人数:</span>{{o.signUpUserNum + o.signUpUserFamilyNum + '(家属' +
|
||||
o.signUpUserFamilyNum + '人)'}}
|
||||
</div>
|
||||
|
||||
<div class="concat" v-else>
|
||||
<span>已报人数:</span>{{o.signUpUserNum + o.familyNumber + '(家属' +
|
||||
o.familyNumber + '人)'}}
|
||||
</div>
|
||||
<!--<div class="union" style="margin-top: 0">
|
||||
|
||||
<span>官  网:</span>
|
||||
<span style="color: #0e5996"
|
||||
@click.stop="window.open(o.officialWebsite.indexOf('http') !== -1 ? o.officialWebsite : 'https://' + o.officialWebsite)">
|
||||
{{o.officialWebsite}}
|
||||
</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="pageForm.theRapyRecuperationType == '3'" class="content-right">
|
||||
<div class="cr-title">
|
||||
<span>{{o.baseName}}</span>
|
||||
<div>
|
||||
<van-tag color="#1867b0">{{o.regionalNature}}</van-tag>
|
||||
<van-tag color="#1867b0">{{o.lotName}}</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div class="desc_info">
|
||||
<div class="concat">
|
||||
<span>联 系 人:</span>{{o.baseContactPerson}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>联系方式:</span>{{o.baseContactNumber}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>旅 行 社:</span>{{o.travelAgencyName}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-if="pageForm.theRapyRecuperationType == '2'">
|
||||
<van-row gutter="20" class="sign_button">
|
||||
<van-col @click="" span="12" style="border-right: 1px lightgrey solid"></van-col>
|
||||
<van-col span="12" style="text-align: right">
|
||||
<van-button @click.stop="openSignUser(o, 'travel')" round size="mini" type="info">
|
||||
查看人员
|
||||
</van-button>
|
||||
<van-button @click.stop="findOne(o)" round size="mini" type="info"
|
||||
style="margin-right: 8px">
|
||||
我要报名
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
<van-popup class="union-popup" position="bottom" round v-model:show="unionPop" @closed="handleUnionPopupClosed">
|
||||
<div class="union-popup-header">
|
||||
<span @click="cancelUnionSelect">取消</span>
|
||||
<span class="union-popup-title">选择分工会</span>
|
||||
<span class="union-popup-action" @click="confirmUnion">确定</span>
|
||||
</div>
|
||||
<div class="union-popup-search">
|
||||
<van-search
|
||||
v-model="unionKeyword"
|
||||
placeholder="搜索分工会名称">
|
||||
</van-search>
|
||||
</div>
|
||||
<div class="union-list">
|
||||
<div :class="['union-item', tempUnionId === item.value ? 'active-union' : '']"
|
||||
@click="tempUnionId = item.value"
|
||||
v-for="item in filteredUnionColumns">
|
||||
{{item.text}}
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
<van-action-sheet
|
||||
v-model="selectLinePopup"
|
||||
cancel-text="取消"
|
||||
:description="clickRow.lineName"
|
||||
close-on-click-action>
|
||||
<button v-for="(item,index) in selectLineList" type="button" class="van-action-sheet__item">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>
|
||||
<div class="van-action-sheet__name">{{item.name}}</div>
|
||||
<div v-if="item.playTime" class="van-action-sheet__name">{{item.playTime}}</div>
|
||||
<div v-if="item.adjustPlayTime" class="van-action-sheet__name">{{item.adjustPlayTime}}</div>
|
||||
</div>
|
||||
<div class="sign_button">
|
||||
<div>
|
||||
<van-button @click.stop="onSelect(item)" size="mini" type="info"
|
||||
style="margin-right: 8px">
|
||||
点击报名
|
||||
</van-button>
|
||||
</div>
|
||||
<div style="margin-top: 4px">
|
||||
<van-button @click.stop="openSignUser(item, 'line')" size="mini" type="info"
|
||||
style="margin-right: 8px">
|
||||
查看人员
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</van-action-sheet>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
searchKeyWord: '',
|
||||
isLoad: false,
|
||||
yearArray: [],
|
||||
unionColumns: [],
|
||||
unionPop: false,
|
||||
unionKeyword: '',
|
||||
tempUnionId: null,
|
||||
selectedOtherUnionName: '',
|
||||
isConfirmUnion: false,
|
||||
chooseButton: [],
|
||||
signUpStatusOptions: [
|
||||
{text: '全部', value: 0},
|
||||
{text: '报名中', value: 1},
|
||||
{text: '报名已结束', value: 2}
|
||||
],
|
||||
lineUnionTypeOptions: [
|
||||
{text: '全部线路', value: 4},
|
||||
{text: '本分工会线路', value: 1},
|
||||
{text: '其他分工会线路', value: 2},
|
||||
{text: '校工会线路', value: 3}
|
||||
],
|
||||
pageForm: {
|
||||
theRapyRecuperationType: 0,
|
||||
lineUnionType: 1,
|
||||
unionId: "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('union').getId()}",
|
||||
lineKeyword: '',
|
||||
year: null,
|
||||
signUpStatus: 1,
|
||||
pageNumber: 1,
|
||||
// 移动端线路查询每次只加载 5 条,配合 van-list 下滑分页追加数据。
|
||||
pageSize: 5
|
||||
},
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
lineData: {},
|
||||
modifyConfig: {},
|
||||
|
||||
clickRow: {},
|
||||
selectLineList: [],
|
||||
selectLinePopup: false,
|
||||
|
||||
schoolTime: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
filteredUnionColumns() {
|
||||
if (!this.unionKeyword) {
|
||||
return this.unionColumns
|
||||
}
|
||||
return this.unionColumns.filter(item => item.text.indexOf(this.unionKeyword) !== -1)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async openSignUser(row, type) {
|
||||
const id = type === 'line' ? row.usId : row.id
|
||||
location.href = '/platform/staffTherapyRecuperation/mobile/userSignInfo?type=' + type + '&id=' + id
|
||||
},
|
||||
isValidDate(value) {
|
||||
// 报名截止时间为空或格式无效时不展示,避免页面出现 Invalid date。
|
||||
return value && moment(value).isValid()
|
||||
},
|
||||
async clickLineRow(o) {
|
||||
this.clickRow = o
|
||||
if (this.pageForm.theRapyRecuperationType == 2) {
|
||||
await this.findOne(o)
|
||||
return
|
||||
}
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/getSelectLineById',
|
||||
{
|
||||
lineId: o.lineId,
|
||||
usId: o.usId,
|
||||
unionId: this.pageForm.unionId,
|
||||
theRapyRecuperationType: this.pageForm.theRapyRecuperationType,
|
||||
lineUnionType: this.pageForm.lineUnionType,
|
||||
signUpStatus: this.pageForm.signUpStatus,
|
||||
}
|
||||
)
|
||||
this.selectLineList = resp.data
|
||||
this.selectLineList.forEach((item, index) => {
|
||||
item.name = '出行时间' + (index + 1) + ' :' + moment(item.playStartTime).format('YYYY-MM-DD HH:mm')
|
||||
item.playTime = this.isValidDate(item.signUpEndTime) ? '报名截止:' + moment(item.signUpEndTime).format('YYYY-MM-DD HH:mm') : ''
|
||||
item.adjustPlayTime = this.isValidDate(item.adjustSignUpEndTime) ? '调剂报名截止:' + moment(item.adjustSignUpEndTime).format('YYYY-MM-DD HH:mm') : ''
|
||||
if (this.modifyConfig.familyInfo == 2) {
|
||||
item.subname = '已报人数:'
|
||||
+ (item.signUpUserNum + item.signUpUserFamilyNum)
|
||||
+ '(家属' + item.signUpUserFamilyNum + '人)'
|
||||
} else {
|
||||
item.subname = '已报人数:'
|
||||
+ (item.signUpUserNum + item.signUpUserFamilyNum)
|
||||
+ '(家属' + item.familyNumber + '人)'
|
||||
}
|
||||
})
|
||||
this.selectLinePopup = true
|
||||
},
|
||||
onSelect(item) {
|
||||
this.findOne(item)
|
||||
},
|
||||
getGroupCount(o) {
|
||||
// 成团人数口径与PC统计页一致:报名教职工人数 + 成年家属人数。
|
||||
return Number(o.signUpUserNum || 0) + Number(o.adultFamilyNum || 0)
|
||||
},
|
||||
getMinimumGroupCount(o) {
|
||||
return Number(o.estimatedFamilyNumbers || 0)
|
||||
},
|
||||
isGrouped(o) {
|
||||
const minimumGroupCount = this.getMinimumGroupCount(o)
|
||||
return minimumGroupCount > 0 && this.getGroupCount(o) >= minimumGroupCount
|
||||
},
|
||||
changeSignUpStatus(signUpStatus) {
|
||||
this.$set(this.pageForm, 'signUpStatus', signUpStatus)
|
||||
this.getData()
|
||||
},
|
||||
changeLineUnionType(lineUnionType) {
|
||||
// 线路来源下拉框统一承接原按钮逻辑:其他分工会仍需弹窗确认具体分工会。
|
||||
if (lineUnionType == 1) {
|
||||
this.resetToCurrentUnionLine()
|
||||
} else if (lineUnionType == 2) {
|
||||
this.otherUnionClick()
|
||||
} else if (lineUnionType == 3) {
|
||||
this.selectSchoolUnionLine()
|
||||
} else if (lineUnionType == 4) {
|
||||
this.selectAllUnionLine()
|
||||
}
|
||||
},
|
||||
otherUnionClick() {
|
||||
if (this.unionColumns.length === 0) {
|
||||
vant.Toast('暂时没有其他分工会公开线路')
|
||||
this.resetToCurrentUnionLine()
|
||||
return
|
||||
}
|
||||
this.isConfirmUnion = false
|
||||
this.unionKeyword = ''
|
||||
this.tempUnionId = this.pageForm.unionId
|
||||
this.unionPop = true
|
||||
},
|
||||
selectAllUnionLine() {
|
||||
this.selectedOtherUnionName = ''
|
||||
this.pageForm.unionId = "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('union').getId()}"
|
||||
this.pageForm.lineUnionType = 4
|
||||
this.getData()
|
||||
},
|
||||
resetToCurrentUnionLine() {
|
||||
this.selectedOtherUnionName = ''
|
||||
this.pageForm.unionId = "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('union').getId()}"
|
||||
this.pageForm.lineUnionType = 1
|
||||
this.getData()
|
||||
},
|
||||
selectSchoolUnionLine() {
|
||||
// 校工会线路使用 signUpMode=2 查询,不绑定具体分工会,避免沿用其他分工会弹窗选择结果。
|
||||
this.selectedOtherUnionName = ''
|
||||
this.pageForm.unionId = "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('union').getId()}"
|
||||
this.pageForm.lineUnionType = 3
|
||||
this.getData()
|
||||
},
|
||||
cancelUnionSelect() {
|
||||
this.unionPop = false
|
||||
},
|
||||
handleUnionPopupClosed() {
|
||||
if (!this.isConfirmUnion) {
|
||||
this.resetToCurrentUnionLine()
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.loading = true
|
||||
this.finished = false
|
||||
if (this.pageForm.theRapyRecuperationType == 0 || this.pageForm.theRapyRecuperationType == 1) {
|
||||
// 省内、省外线路默认按当前登录人所属分工会筛选,避免首屏展示全部线路。
|
||||
this.selectedOtherUnionName = ''
|
||||
this.pageForm.unionId = "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('union').getId()}"
|
||||
this.$set(this.pageForm, 'lineUnionType', 1)
|
||||
}
|
||||
this.getData()
|
||||
},
|
||||
async join(o) {
|
||||
const re = await $.post('/platform/staffTherapyRecuperation/line/enroll/validSignUpInfo', {
|
||||
enroll: JSON.stringify({
|
||||
takePartInTravelAgencyId: o.id,
|
||||
}),
|
||||
})
|
||||
if (re.code !== 0) {
|
||||
vant.Toast({
|
||||
message: re.msg,
|
||||
duration: 3000
|
||||
})
|
||||
return
|
||||
}
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
const sendData = {
|
||||
takePartInTravelAgencyId: o.id,
|
||||
}
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/doSignUpForTravelAgency', {
|
||||
enroll: JSON.stringify(sendData),
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (resp.code === 0) {
|
||||
toast.message = '提交成功'
|
||||
toast.type = 'success'
|
||||
} else {
|
||||
toast.message = resp.msg
|
||||
toast.type = 'fail'
|
||||
}
|
||||
setTimeout(() => {
|
||||
toast.clear()
|
||||
}, resp.code === 0 ? 500 : 3000)
|
||||
if (resp.code === 0) {
|
||||
location.href = '/platform/staffTherapyRecuperation/mobile/myRecuperation?index=' + this.pageForm.theRapyRecuperationType
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
confirmUnion() {
|
||||
if (!this.tempUnionId) {
|
||||
vant.Toast('请选择分工会')
|
||||
return
|
||||
}
|
||||
const union = this.unionColumns.find(item => item.value === this.tempUnionId)
|
||||
this.selectedOtherUnionName = union ? union.text : ''
|
||||
this.isConfirmUnion = true
|
||||
this.pageForm.lineUnionType = 2
|
||||
this.pageForm.unionId = this.tempUnionId
|
||||
this.getData()
|
||||
this.unionPop = false
|
||||
},
|
||||
async findOne(o) {
|
||||
const type = Number(this.pageForm.theRapyRecuperationType)
|
||||
localStorage.setItem("clickIndex", JSON.stringify({clickIndex: type}))
|
||||
if (type !== 2 && type !== 3) {
|
||||
location.href = '/platform/staffTherapyRecuperation/mobile/lineInfo?id=' + o.usId + '&index=' + this.pageForm.theRapyRecuperationType
|
||||
+ '&takePartInUnionId=' + o.takePartInUnionId
|
||||
} else if (type === 3) {
|
||||
location.href = '/platform/staffTherapyRecuperation/mobile/baseInfo?id=' + o.usId + '&index=' + this.pageForm.theRapyRecuperationType
|
||||
} else if (type === 2) {
|
||||
const re = await $.post('/platform/staffTherapyRecuperation/line/enroll/validSignUpInfo', {
|
||||
enroll: JSON.stringify({
|
||||
takePartInTravelAgencyId: o.id,
|
||||
}),
|
||||
})
|
||||
if (re.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: re.msg,
|
||||
})
|
||||
return
|
||||
}
|
||||
location.href = '/platform/staffTherapyRecuperation/mobile/lineInfo?id=' + o.usId + '&index=' + this.pageForm.theRapyRecuperationType
|
||||
+ '&takePartInUnionId=' + o.takePartInUnionId + '&signType=2' + '&takePartInTravelAgencyId=' + o.id
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
this.loading = true
|
||||
this.finished = false
|
||||
if (this.pageForm.lineUnionType === 1) {
|
||||
this.pageForm.unionId = "${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getPrincipalProperty('union').getId()}"
|
||||
}
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
// van-list 触底时按 pageNumber/pageSize 查询下一页,并追加到当前列表。
|
||||
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/pageData', this.pageForm)
|
||||
|
||||
if (res.code === 0 && res.data) {
|
||||
const list = res.data.list || []
|
||||
this.tableData = this.tableData.concat(list)
|
||||
if (this.tableData.length >= res.data.totalCount || list.length === 0) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
} else {
|
||||
this.finished = true
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
createYear() {
|
||||
for (let i = 2023; i <= 2043; i++) {
|
||||
this.yearArray.push({value: i, text: i + '年'})
|
||||
}
|
||||
this.yearArray.unshift({value: null, text: '全部'})
|
||||
},
|
||||
async getTheRapyUnions() {
|
||||
const resp = await $.get('/platform/staffTherapyRecuperation/line/enroll/getTheRapyUnions', {
|
||||
year: this.pageForm.year,
|
||||
theRapyRecuperationType: this.pageForm.theRapyRecuperationType
|
||||
})
|
||||
return resp.data
|
||||
},
|
||||
async getModifyConfig() {
|
||||
const res = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
|
||||
if (res.code === 0) {
|
||||
this.modifyConfig = res.data
|
||||
}
|
||||
},
|
||||
async getSchoolTime() {
|
||||
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/getSchoolTime')
|
||||
this.schoolTime = res.data
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (localStorage.getItem('clickIndex') !== null) {
|
||||
const clickIndex = localStorage.getItem('clickIndex')
|
||||
this.pageForm.theRapyRecuperationType = JSON.parse(clickIndex).clickIndex
|
||||
}
|
||||
if (this.pageForm.theRapyRecuperationType == 1) {
|
||||
// 省外线路进入时同样默认展示本分工会线路,和省内线路页签保持一致。
|
||||
this.$set(this.pageForm, 'lineUnionType', 1)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.createYear()
|
||||
await this.getModifyConfig()
|
||||
await this.getSchoolTime()
|
||||
this.chooseButton = await getEnumOptions('TheRapyRecuperationType')
|
||||
this.chooseButton = this.chooseButton.filter(o => o.value !== 3 && o.value !== 2)
|
||||
const unions = await this.getTheRapyUnions()
|
||||
unions.forEach(item => {
|
||||
this.unionColumns.push({text: item.unionname, value: item.id})
|
||||
})
|
||||
this.isLoad = true
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,586 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
#app {
|
||||
font-family: 微软雅黑,serif;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 10px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
position: relative;
|
||||
margin: 10px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.list-card > .content {
|
||||
padding: 16px 10px 8px;
|
||||
display: flex;
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
.content-right {
|
||||
width: calc(100% - 150px);
|
||||
max-width: calc(100% - 150px);
|
||||
padding-left: 15px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.cr-title {
|
||||
/*max-height: 40px;*/
|
||||
line-height: 20px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-grid-item__content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.choose_button .button_text {
|
||||
font-size: 14px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.concat, .mobile, .union {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 30px;
|
||||
font-size: 12px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #1867b0;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.no_active {
|
||||
background-color: #e7e9f0;
|
||||
color: #69707a;
|
||||
}
|
||||
|
||||
.van-row {
|
||||
text-align: center;
|
||||
color: #1867b0;
|
||||
font-weight: bold;
|
||||
padding: 0px 0px 10px 0px;
|
||||
font-family: cursive;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.van-list {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.popVisible {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.pop_footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.pop_footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.van-tag {
|
||||
padding: 2px 7px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.cus_content {
|
||||
height: calc(100% - 40px - 46px - 60px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.desc_info div {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.operateDiv {
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.operateDiv .van-button {
|
||||
height: 28px;
|
||||
border-radius: 8px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder
|
||||
title="我的疗休养"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearArray"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.signUpStateId" :options="stateArray"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<!--按钮导航-->
|
||||
<div class="choose_button van-doc-card">
|
||||
<van-grid :column-num="chooseButton.length" :border="false">
|
||||
<van-grid-item @click="pageForm.theRapyRecuperationType = item.value; doSearch()"
|
||||
v-for="item in chooseButton">
|
||||
<van-image width="46" height="46" :src="item.imgUrl"></van-image>
|
||||
<div :style="pageForm.theRapyRecuperationType == item.value ? 'color: #1867b0; font-weight: bold' : 'color: black; font-weight: normal'"
|
||||
class="button_text">{{item.label}}
|
||||
</div>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
|
||||
<!--<van-divider></van-divider>
|
||||
|
||||
<div class="footer">
|
||||
<van-button @click="pageForm.signUpStateId = 1; getData()" :class="pageForm.signUpStateId == 1 ? 'active' : 'no_active'">已报名</van-button>
|
||||
<van-button @click="pageForm.signUpStateId = 2; getData()" :class="pageForm.signUpStateId == 2 ? 'active' : 'no_active'">已参加</van-button>
|
||||
<van-button @click="pageForm.signUpStateId = 3; getData()" :class="pageForm.signUpStateId == 3 ? 'active' : 'no_active'">未参加</van-button>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:immediate-check="true"
|
||||
finished-text="没有更多了"
|
||||
v-model="loading">
|
||||
<div class="list-card" v-for="o in tableData">
|
||||
<div @click="findOne(o)" class="content">
|
||||
|
||||
<van-image
|
||||
height="86"
|
||||
radius="8"
|
||||
:src="CREATE_PREVIEW_URL(o.fileId)"
|
||||
width="130"></van-image>
|
||||
|
||||
<div v-if="pageForm.theRapyRecuperationType != '2' && pageForm.theRapyRecuperationType != '3'"
|
||||
class="content-right">
|
||||
<div class="cr-title">
|
||||
<span style="font-size: 14px">{{o.lineName}}</span>
|
||||
<!--<div>
|
||||
<van-tag color="#1867b0">{{o.lotName}}</van-tag>
|
||||
<van-tag color="#1867b0">{{o.signUpMode === 2 ? '校工会' :
|
||||
o.signUpUnionName}}
|
||||
</van-tag>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="desc_info">
|
||||
<!--<div class="union">
|
||||
<span>分工会:</span>{{o.signUpUnionName}}
|
||||
</div>-->
|
||||
<!--<div class="concat">
|
||||
<span>时间:</span>{{o.YEAR}}
|
||||
</div>-->
|
||||
<!--<div class="concat">
|
||||
<span>已报人数:</span>{{o.signUpUserNum + o.signUpUserFamilyNum + '(家属' + o.signUpUserFamilyNum + '人)'}}
|
||||
</div>-->
|
||||
<div class="concat">
|
||||
<span>线路类型:{{o.regionalNature}}</span>
|
||||
</div>
|
||||
|
||||
<div class="concat">
|
||||
<span>出行时段:{{o.lotName}}</span>
|
||||
</div>
|
||||
<div class="mobile" v-if="![2715,2725,2735].includes(o.stateId)">
|
||||
<span v-if="configData.familyInfo == 2">随行家属:{{o.companionUserNames ? o.companionUserNames : '无'}}</span>
|
||||
<span v-else>随行家属:{{o.familyNumber}}人</span>
|
||||
</div>
|
||||
<div class="mobile" v-else>
|
||||
<span>审核状态:</span><span :style="'color: ' + o.stateColor">{{o.stateName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="pageForm.theRapyRecuperationType == '2'" class="content-right">
|
||||
<div class="cr-title">
|
||||
<span>{{o.travelAgencyName}}</span>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div class="concat">
|
||||
<span>联系人:</span>{{o.contact}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>联系电话:</span>{{o.contactMobileNumber}}
|
||||
</div>
|
||||
<!--<div class="mobile">
|
||||
<span>邮箱:</span>{{o.email}}
|
||||
</div>-->
|
||||
<div class="concat" v-if="configData.familyInfo == 2">
|
||||
<span>已报人数:</span>{{o.signUpUserNum + o.signUpUserFamilyNum + '(家属' +
|
||||
o.signUpUserFamilyNum + '人)'}}
|
||||
</div>
|
||||
|
||||
<div class="concat" v-else>
|
||||
<span>已报人数:</span>{{o.signUpUserNum + o.totalFamilyNumber + '(家属' +
|
||||
o.totalFamilyNumber + '人)'}}
|
||||
</div>
|
||||
<!--<div class="union" style="margin-top: 0">
|
||||
<span>官网:</span>
|
||||
<span style="color: #0e5996" @click.stop="window.open(o.officialWebsite.indexOf('http') !== -1 ? o.officialWebsite : 'https://' + o.officialWebsite)">
|
||||
{{o.officialWebsite}}
|
||||
</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="pageForm.theRapyRecuperationType == '3'" class="content-right">
|
||||
<div class="cr-title">
|
||||
<span>{{o.baseName}}</span>
|
||||
<div>
|
||||
<van-tag color="#1867b0">{{o.regionalNature}}</van-tag>
|
||||
<van-tag color="#1867b0">{{o.lotName}}</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div class="desc_info">
|
||||
<div class="concat">
|
||||
<span>联 系 人:</span>{{o.baseContactPerson}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>联系方式:</span>{{o.baseContactNumber}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>旅 行 社:</span>{{o.travelAgencyName}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="operateDiv">
|
||||
<van-button v-if="canModify(o)" @click="edit(o)"
|
||||
type="info" size="small" color="#1867b0" :disabled="o.isTakePartIn == true || getDisabled(o)">
|
||||
修 改
|
||||
</van-button>
|
||||
<!--<van-button v-if="pageForm.theRapyRecuperationType == '2'
|
||||
&& ![2715,2725,2735].includes(o.stateId)" @click="edit(o)"
|
||||
type="info" size="small" color="#1867b0" :disabled="o.isTakePartIn == true || getDisabled(o)">
|
||||
修 改
|
||||
</van-button>-->
|
||||
<van-button type="info" size="small" color="#1867b0" @click="cancel(o)"
|
||||
:disabled="getDisabled(o) || !canCancel(o)">
|
||||
取 消
|
||||
</van-button>
|
||||
<van-button v-if="o.isTakePartIn == true" type="info" size="small" color="#1867b0"
|
||||
@click="satisfaction(o)">满意度反馈</van-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
<van-popup class="popVisible" position="right" v-model="popVisible">
|
||||
<van-nav-bar @click-left="popVisible = false" fixed left-arrow placeholder title="满意度评分"></van-nav-bar>
|
||||
<div class="cus_content">
|
||||
<van-field name="rate" label="旅行社评分">
|
||||
<template #input>
|
||||
<van-rate v-model="satisfactionForm.evaluationForTravelAgency" allow-half void-icon="star" color="#ffd21e"></van-rate>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field name="rate" label="路线评分">
|
||||
<template #input>
|
||||
<van-rate v-model="satisfactionForm.evaluationForLine" allow-half void-icon="star" color="#ffd21e"></van-rate>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field name="rate" label="风景评分">
|
||||
<template #input>
|
||||
<van-rate v-model="satisfactionForm.evaluationForJourney" allow-half void-icon="star" color="#ffd21e"></van-rate>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field
|
||||
v-model="satisfactionForm.feedbackContent"
|
||||
rows="4"
|
||||
autosize
|
||||
label="其他建议"
|
||||
type="textarea"
|
||||
maxlength="100"
|
||||
placeholder="请输入其他建议"
|
||||
show-word-limit>
|
||||
</van-field>
|
||||
</div>
|
||||
|
||||
<div class="pop_footer">
|
||||
<van-button @click="satisfactionSubmit" class="cus_button">提交评分</van-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
yearArray: [],
|
||||
popVisible: false,
|
||||
chooseButton: [],
|
||||
pageForm: {
|
||||
theRapyRecuperationType: null,
|
||||
signUpStateId: 1,
|
||||
year: new Date().getFullYear(),
|
||||
},
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
satisfactionForm: {},
|
||||
configData: {},
|
||||
stateArray: [
|
||||
{value: 1, text: '已报名'},
|
||||
{value: 2, text: '已参加'},
|
||||
{value: 3, text: '未参加'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isValidDate(value) {
|
||||
return value && moment(value).isValid()
|
||||
},
|
||||
canModify(o) {
|
||||
if (this.pageForm.theRapyRecuperationType == '2' || [2715,2725,2735].includes(o.stateId)) {
|
||||
return false
|
||||
}
|
||||
if (o.isDismissed && this.isValidDate(o.adjustSignUpEndTime)) {
|
||||
return moment().unix() <= moment(o.adjustSignUpEndTime).unix()
|
||||
}
|
||||
return this.isValidDate(o.changeEndTime) && moment().unix() < moment(o.changeEndTime).unix()
|
||||
},
|
||||
canCancel(o) {
|
||||
if (o.isTakePartIn === true) {
|
||||
return false
|
||||
}
|
||||
if (this.pageForm.theRapyRecuperationType == '2') {
|
||||
return true
|
||||
}
|
||||
if (o.isDismissed && this.isValidDate(o.adjustSignUpEndTime)) {
|
||||
return moment().unix() <= moment(o.adjustSignUpEndTime).unix()
|
||||
}
|
||||
return this.isValidDate(o.changeEndTime) && moment().unix() < moment(o.changeEndTime).unix()
|
||||
},
|
||||
getDisabled(o) {
|
||||
/*if(o.regionalNature === '省内') {
|
||||
return this.configData.isSnLine && o.stateId === 2750
|
||||
}
|
||||
if(o.regionalNature === '省外') {
|
||||
return this.configData.isSwLine && o.stateId === 2750
|
||||
}*/
|
||||
//return this.pageForm.theRapyRecuperationType == '2'
|
||||
return false
|
||||
},
|
||||
doSearch() {
|
||||
this.loading = true
|
||||
this.finished = false
|
||||
this.getData()
|
||||
},
|
||||
satisfaction(o) {
|
||||
this.satisfactionForm = {
|
||||
id: o.id,
|
||||
evaluationForJourney: o.evaluationForJourney ? o.evaluationForJourney * 1 : '',
|
||||
evaluationForLine: o.evaluationForLine ? o.evaluationForLine * 1 : '',
|
||||
evaluationForTravelAgency: o.evaluationForTravelAgency ? o.evaluationForTravelAgency * 1 : '',
|
||||
feedbackContent: o.feedbackContent ? o.feedbackContent : '',
|
||||
}
|
||||
this.popVisible = true
|
||||
},
|
||||
async satisfactionSubmit() {
|
||||
for (const key in this.satisfactionForm) {
|
||||
if(key !== 'feedbackContent' && this.satisfactionForm[key] === '') {
|
||||
vant.Toast('请先评分再提交')
|
||||
return
|
||||
}
|
||||
}
|
||||
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/doFeedBack', this.satisfactionForm)
|
||||
if(res.code === 0) {
|
||||
this.popVisible = false
|
||||
vant.Toast('操作成功')
|
||||
this.getData()
|
||||
}else {
|
||||
vant.Toast(res.msg)
|
||||
}
|
||||
},
|
||||
async edit(o) {
|
||||
if (this.pageForm.theRapyRecuperationType != '2' && this.pageForm.theRapyRecuperationType != '3') {
|
||||
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/validSignUpInfo', {
|
||||
enroll: JSON.stringify({
|
||||
takePartInLineId: o.takePartInLineId,
|
||||
id: o.id,
|
||||
takePartInUnionId: o.takePartInUnionId,
|
||||
takePartInBaseManagementId: o.takePartInBaseManagementId
|
||||
}),
|
||||
})
|
||||
if (res.code === 0) {
|
||||
location.href = '/platform/staffTherapyRecuperation/mobile/lineInfo?id=' + o.takePartInLineId +
|
||||
'&index=' + this.pageForm.theRapyRecuperationType + '&enrollId=' + o.id + '&fromUrlByMy=editDo' +
|
||||
'&takePartInUnionId=' + o.takePartInUnionId
|
||||
} else {
|
||||
vant.Toast(res.msg)
|
||||
}
|
||||
} else if (this.pageForm.theRapyRecuperationType == '3') {
|
||||
location.href = '/platform/staffTherapyRecuperation/mobile/baseInfo?id=' + o.takePartInBaseManagementId +
|
||||
'&index=' + this.pageForm.theRapyRecuperationType + '&enrollId=' + o.id + '&fromUrlByMy=editDo'
|
||||
} else if (this.pageForm.theRapyRecuperationType == '2') {
|
||||
location.href = '/platform/staffTherapyRecuperation/mobile/lineInfo?enrollId=' + o.id + '&index=' + this.pageForm.theRapyRecuperationType
|
||||
+ '&takePartInUnionId=' + o.takePartInUnionId + '&signType=2' + '&takePartInTravelAgencyId=' + o.takePartInTravelAgencyId
|
||||
}
|
||||
},
|
||||
async cancel(o) {
|
||||
if(o.isTakePartIn === true) {
|
||||
this.$toast('您已出行,不能取消')
|
||||
return
|
||||
}
|
||||
if(this.pageForm.theRapyRecuperationType != '2') {
|
||||
const re = await $.post('/platform/staffTherapyRecuperation/line/enroll/canDelete/' + o.id)
|
||||
if(re.code !== 0) {
|
||||
vant.Toast(re.msg)
|
||||
return
|
||||
}
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提醒',
|
||||
message: '您确定要取消此报名吗?',
|
||||
}).then(async () => {
|
||||
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/doDeleteMyEnrollInfoById/' + o.id)
|
||||
if(res.code === 0) {
|
||||
vant.Toast('取消成功')
|
||||
this.getData()
|
||||
}else {
|
||||
vant.Toast(res.msg)
|
||||
}
|
||||
}).catch(() => {});
|
||||
},
|
||||
async findOne(o) {
|
||||
if(this.pageForm.theRapyRecuperationType != '2') {
|
||||
location.href = '/platform/staffTherapyRecuperation/mobile/lineInfo?id=' + o.takePartInLineId + '&fromUrlByMy=edit&takePartInUnionId=' + o.takePartInUnionId + '&queryYear=' + this.pageForm.year
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
this.loading = true
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/mySignUpPageData', this.pageForm)
|
||||
|
||||
if (res.code === 0 && res.data) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
async getType() {
|
||||
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/getType')
|
||||
return res.data
|
||||
},
|
||||
createYear() {
|
||||
for (let i = 2023; i <= 2043; i++) {
|
||||
this.yearArray.push({value: i, text: i + '年'})
|
||||
}
|
||||
},
|
||||
async getConfigData() {
|
||||
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
|
||||
this.configData = resp.data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.createYear()
|
||||
this.yearArray.unshift({value: null, text: '所有年度'})
|
||||
this.pageForm.theRapyRecuperationType = getQueryString('index') ? getQueryString('index') : await this.getType()
|
||||
this.chooseButton = await getEnumOptions('TheRapyRecuperationType')
|
||||
this.chooseButton = this.chooseButton.filter(o => o.value !== 3 && o.value !== 2)
|
||||
await this.getConfigData()
|
||||
this.onLoad()
|
||||
},
|
||||
mounted() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,84 @@
|
||||
<!--#
|
||||
layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
#app {
|
||||
font-family: 微软雅黑,serif;
|
||||
}
|
||||
|
||||
.van-index-bar {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.van-empty {
|
||||
height: calc(100vh - 46px - 54px);
|
||||
position: unset;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder
|
||||
title="报名人员"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-search v-model="searchKeyWord" placeholder="请输入姓名查询" @search="getSignUser"></van-search>
|
||||
<template v-if="Object.keys(signUserData).length > 0">
|
||||
<van-index-bar :sticky-offset-top="46" :index-list="Object.keys(signUserData)">
|
||||
<template v-for="(value, key) in signUserData">
|
||||
<van-index-anchor :index="key"></van-index-anchor>
|
||||
<van-cell v-for="item in value" :title="item.userName + '(' + item.unionName + ')'"></van-cell>
|
||||
</template>
|
||||
</van-index-bar>
|
||||
</template>
|
||||
<van-empty v-else description="暂无报名人员"></van-empty>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
searchKeyWord: '',
|
||||
signUserData: [],
|
||||
id: '',
|
||||
type: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getSignUser() {
|
||||
const params = this.type === 'line' ? {usId: this.id, searchKeyWord: this.searchKeyWord} : {travelId: this.id, searchKeyWord: this.searchKeyWord}
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力查询中',
|
||||
})
|
||||
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/openSignUser', params)
|
||||
this.signUserData = resp.data
|
||||
toast.close()
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = getQueryString('id')
|
||||
this.type = getQueryString('type')
|
||||
await this.getSignUser()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||