增加了套餐包有效期

This commit is contained in:
1215525055@qq.com 2025-07-09 18:00:57 +08:00
parent 73e82ea4ad
commit cc0ec85811
12 changed files with 229 additions and 13 deletions

View File

@ -13,7 +13,8 @@ import io.swagger.annotations.ApiModelProperty;
**/ **/
@ApiModel @ApiModel
public class PackageInfoAppDTO { public class PackageInfoAppDTO {
@ApiModelProperty(name = "packageExpire", value = "有效天数")
private String packageExpire;
@ApiModelProperty(name = "packageInfoId", value = "套餐ID") @ApiModelProperty(name = "packageInfoId", value = "套餐ID")
private String packageInfoId; private String packageInfoId;
@ApiModelProperty(name = "packageName", value = "套餐名称") @ApiModelProperty(name = "packageName", value = "套餐名称")
@ -39,6 +40,14 @@ public class PackageInfoAppDTO {
@ApiModelProperty(name = "createTime", value = "") @ApiModelProperty(name = "createTime", value = "")
private String createTime; private String createTime;
public String getPackageExpire() {
return packageExpire == null ? "" : packageExpire.trim();
}
public void setPackageExpire(String packageExpire) {
this.packageExpire = packageExpire;
}
public String getPackageOnlienTime() { public String getPackageOnlienTime() {
return packageOnlienTime == null ? "" : packageOnlienTime.trim(); return packageOnlienTime == null ? "" : packageOnlienTime.trim();
} }

View File

@ -23,6 +23,8 @@ public class PackageInfoDTO {
private String packageInfoId; private String packageInfoId;
@ApiModelProperty(name = "packageName", value = "套餐名称") @ApiModelProperty(name = "packageName", value = "套餐名称")
private String packageName; private String packageName;
@ApiModelProperty(name = "packageExpire", value = "有效天数")
private String packageExpire;
@ApiModelProperty(name = "packageType", value = "类型写材料 . 全托管等的枚举名") @ApiModelProperty(name = "packageType", value = "类型写材料 . 全托管等的枚举名")
private String packageType; private String packageType;
@ApiModelProperty(name = "packageMode", value = "可购买次数 single(每个用户可购买1次), infinite(不限)") @ApiModelProperty(name = "packageMode", value = "可购买次数 single(每个用户可购买1次), infinite(不限)")
@ -68,6 +70,14 @@ public class PackageInfoDTO {
@ApiModelProperty(name = "userList", value = "") @ApiModelProperty(name = "userList", value = "")
List<RelatedUserDTO> userList = new ArrayList<>(); List<RelatedUserDTO> userList = new ArrayList<>();
public String getPackageExpire() {
return packageExpire == null ? "" : packageExpire.trim();
}
public void setPackageExpire(String packageExpire) {
this.packageExpire = packageExpire;
}
public List<RelatedUserDTO> getUserList() { public List<RelatedUserDTO> getUserList() {
return userList == null ? new ArrayList<>() : userList; return userList == null ? new ArrayList<>() : userList;
} }

View File

@ -41,6 +41,10 @@ public class PackageOrderDTO {
private String creator; private String creator;
@ApiModelProperty(name = "gmtCreate", value = "下单时间") @ApiModelProperty(name = "gmtCreate", value = "下单时间")
private String gmtCreate; private String gmtCreate;
@ApiModelProperty(name = "packageExpireTime", value = "到期日期")
private String packageExpireTime;
@ApiModelProperty(name = "packageExpire", value = "有效天数")
private String packageExpire;
@ApiModelProperty(name = "modifier", value = "") @ApiModelProperty(name = "modifier", value = "")
private String modifier; private String modifier;
@ApiModelProperty(name = "gmtModified", value = "") @ApiModelProperty(name = "gmtModified", value = "")
@ -56,6 +60,22 @@ public class PackageOrderDTO {
@ApiModelProperty(name = "packageInfoAppDTO", value = "") @ApiModelProperty(name = "packageInfoAppDTO", value = "")
private PackageInfoAppDTO packageInfoAppDTO; private PackageInfoAppDTO packageInfoAppDTO;
public String getPackageExpireTime() {
return packageExpireTime == null ? "" : packageExpireTime.trim();
}
public void setPackageExpireTime(String packageExpireTime) {
this.packageExpireTime = packageExpireTime;
}
public String getPackageExpire() {
return packageExpire == null ? "" : packageExpire.trim();
}
public void setPackageExpire(String packageExpire) {
this.packageExpire = packageExpire;
}
public PackageInfoAppDTO getPackageInfoAppDTO() { public PackageInfoAppDTO getPackageInfoAppDTO() {
return packageInfoAppDTO; return packageInfoAppDTO;
} }

View File

@ -23,6 +23,9 @@ public class PackageInfoVO {
@ApiModelProperty(name = "packageName", value = "套餐名称") @ApiModelProperty(name = "packageName", value = "套餐名称")
@CheckEmptyAnnotation(name = "套餐名称") @CheckEmptyAnnotation(name = "套餐名称")
private String packageName; private String packageName;
@ApiModelProperty(name = "packageExpire", value = "套餐有效天数")
@CheckNumberAnnotation(name = "套餐有效天数")
private Integer packageExpire;
@ApiModelProperty(name = "packageType", value = "类型写材料 . 全托管等的枚举名") @ApiModelProperty(name = "packageType", value = "类型写材料 . 全托管等的枚举名")
@CheckEmptyAnnotation(name = "类型") @CheckEmptyAnnotation(name = "类型")
private String packageType; private String packageType;
@ -66,6 +69,14 @@ public class PackageInfoVO {
@ApiModelProperty(name = "userList", value = "") @ApiModelProperty(name = "userList", value = "")
List<RelatedUserVO> userList = new ArrayList<>(); List<RelatedUserVO> userList = new ArrayList<>();
public Integer getPackageExpire() {
return packageExpire == null ? 0 : packageExpire;
}
public void setPackageExpire(Integer packageExpire) {
this.packageExpire = packageExpire;
}
public List<RelatedUserVO> getUserList() { public List<RelatedUserVO> getUserList() {
return userList == null ? new ArrayList<>() : userList; return userList == null ? new ArrayList<>() : userList;
} }

View File

@ -205,4 +205,6 @@ public interface IPackageOrderService {
Map<String, Integer> getCount(String userId); Map<String, Integer> getCount(String userId);
void updateWriteoff(String packageOrderId, PackageOrderWriteoffVO packageOrderWriteoffVO); void updateWriteoff(String packageOrderId, PackageOrderWriteoffVO packageOrderWriteoffVO);
List<PackageOrderDTO> getExpireList();
} }

View File

@ -46,6 +46,7 @@ import org.springframework.stereotype.Service;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
import java.util.*; import java.util.*;
/** /**
@ -218,11 +219,15 @@ public class PackageOrderServiceImpl extends DefaultBaseService implements IPack
/** /**
* 1. 更改到账时间 , 状态 * 1. 更改到账时间 , 状态
*/ */
String time = DateUtil.getTime();
Map<String, Object> params = super.getHashMap(2); Map<String, Object> params = super.getHashMap(2);
params.put("packageNo", packageOrderVO.getAccountRechargeId());// 关联支付 params.put("packageNo", packageOrderVO.getAccountRechargeId());// 关联支付
params.put("packageAccountItem", packageOrderVO.getPackageAccountItem()); // 关联扣款流水 params.put("packageAccountItem", packageOrderVO.getPackageAccountItem()); // 关联扣款流水
params.put("packagePayStatus", "1"); // 已支付 params.put("packagePayStatus", "1"); // 已支付
params.put("packagePay", DateUtil.getTime()); // 支付时间 params.put("packagePay", time); // 支付时间
if(!StringUtils.isEmpty(infoAppDTO.getPackageExpire())) {
params.put("packageExpireTime", calculateFutureDate(time, Integer.valueOf(infoAppDTO.getPackageExpire()))); // 到期时间
}
packageOrderDao.updatePay(params); packageOrderDao.updatePay(params);
return true; return true;
} }
@ -250,11 +255,15 @@ public class PackageOrderServiceImpl extends DefaultBaseService implements IPack
/** /**
* 1. 更改到账时间 , 状态 * 1. 更改到账时间 , 状态
*/ */
String time = DateUtil.getTime();
Map<String, Object> params = super.getHashMap(2); Map<String, Object> params = super.getHashMap(2);
params.put("packageNo", packageOrderVO.getAccountRechargeId());// 关联支付 params.put("packageNo", packageOrderVO.getAccountRechargeId());// 关联支付
params.put("packageAccountItem", packageOrderVO.getPackageAccountItem()); // 关联扣款流水 params.put("packageAccountItem", packageOrderVO.getPackageAccountItem()); // 关联扣款流水
params.put("packagePayStatus", "1"); // 已支付 params.put("packagePayStatus", "1"); // 已支付
params.put("packagePay", DateUtil.getTime()); // 支付时间 params.put("packagePay", time); // 支付时间
if(!StringUtils.isEmpty(infoAppDTO.getPackageExpire())) {
params.put("packageExpireTime", calculateFutureDate(time, Integer.valueOf(infoAppDTO.getPackageExpire()))); // 到期时间
}
packageOrderDao.updatePay(params); packageOrderDao.updatePay(params);
} }
@ -319,6 +328,14 @@ public class PackageOrderServiceImpl extends DefaultBaseService implements IPack
packageOrderItemService.saveApp("minus", packageOrderItemAppVO); packageOrderItemService.saveApp("minus", packageOrderItemAppVO);
} }
@Override
public List<PackageOrderDTO> getExpireList() {
Map<String, Object> params = new HashMap<>();
params.put("queryExpire", "queryExpire");
List<PackageOrderDTO> list = packageOrderDao.list(params);
return list;
}
@Override @Override
public List<PackageOrderDTO> list(Map<String, Object> params) { public List<PackageOrderDTO> list(Map<String, Object> params) {
List<PackageOrderDTO> list = packageOrderDao.list(params); List<PackageOrderDTO> list = packageOrderDao.list(params);
@ -426,6 +443,10 @@ public class PackageOrderServiceImpl extends DefaultBaseService implements IPack
data.put("packageOrderId", packageOrderId); data.put("packageOrderId", packageOrderId);
String currentDate = DateUtil.getTime(); String currentDate = DateUtil.getTime();
data.put("packageNo", packageOrderVO.getAccountRechargeId()); data.put("packageNo", packageOrderVO.getAccountRechargeId());
if(!StringUtils.isEmpty(packageInfoDTO.getPackageExpire())) {
data.put("packageExpire", packageInfoDTO.getPackageExpire());
data.put("packageExpireTime", calculateFutureDate(DateUtil.getTime(), Integer.valueOf(packageInfoDTO.getPackageExpire())));
}
data.put("creator", packageOrderVO.getUserId()); data.put("creator", packageOrderVO.getUserId());
data.put("gmtCreate", currentDate); data.put("gmtCreate", currentDate);
data.put("modifier", packageOrderVO.getUserId()); data.put("modifier", packageOrderVO.getUserId());
@ -435,6 +456,22 @@ public class PackageOrderServiceImpl extends DefaultBaseService implements IPack
} }
public static String calculateFutureDate(String dateTimeStr, int days) {
// 定义日期时间格式
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
try {
// 解析输入字符串
LocalDateTime dateTime = LocalDateTime.parse(dateTimeStr, formatter);
// 添加指定天数
LocalDateTime futureDate = dateTime.plusDays(days);
// 格式化输出
return futureDate.format(formatter);
} catch (DateTimeParseException e) {
throw new IllegalArgumentException("无效的日期时间格式请使用yyyy-MM-dd HH:mm:ss", e);
}
}
@Override @Override
public PackageOrderDTO getByPackageNo(String packageNo) { public PackageOrderDTO getByPackageNo(String packageNo) {
Map<String, Object> params = super.getHashMap(2); Map<String, Object> params = super.getHashMap(2);

View File

@ -0,0 +1,59 @@
package cn.com.tenlion.operator.task;
import cn.com.tenlion.operator.enums.SysCallbackStatusEnum;
import cn.com.tenlion.operator.pojo.dtos.packageorder.PackageOrderDTO;
import cn.com.tenlion.operator.pojo.pos.callback.SysCallbackPO;
import cn.com.tenlion.operator.pojo.vos.packageorder.PackageOrderWriteoffVO;
import cn.com.tenlion.operator.service.packageorder.IPackageOrderService;
import cn.com.tenlion.operator.service.sys.callback.SysCallbackService;
import cn.com.tenlion.operator.service.sys.task.SysTaskService;
import cn.com.tenlion.operator.serviceother.operator.accountrecharge.IAccountRechargeService;
import cn.com.tenlion.quartzconfig.service.quartzconfig.IQuartzConfigService;
import cn.com.tenlion.quartzconfig.util.QuartzConfigLog;
import cn.com.tenlion.quartzconfig.util.QuartzConfigSpringUtil;
import ink.wgink.interfaces.start.IApplicationStart;
import org.apache.commons.lang3.StringUtils;
import org.quartz.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@DisallowConcurrentExecution // 防止定时任务并行执行防止1个没有执行完另一个又开始了
public class ClosePackageOrder implements Job {
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
JobDataMap dataMap = jobExecutionContext.getJobDetail().getJobDataMap();
Map<String, Object> params = (Map<String, Object>) dataMap.get("params");// 获取参数
String jobId = params.get("jobId").toString();// 定时ID
String jobClassName = params.get("jobClassName").toString();// 定时类名
String jobTitle = params.get("jobTitle").toString();// 定时名称
/// 定时任务中通过工具类可以获取容器Bean
QuartzConfigLog.info(jobId, jobClassName, jobTitle + "开始执行");// 自定义日志记录
try {
IPackageOrderService orderService = QuartzConfigSpringUtil.getBean(IPackageOrderService.class);
// 查找已经过期的 , 数量还大于0的 ,
List<PackageOrderDTO> list = orderService.getExpireList();
// 扣除所有次数
for(PackageOrderDTO orderDTO : list) {
if (orderDTO.getPackageTotalSurplusCount() > 0 && !StringUtils.isEmpty(orderDTO.getPackageExpireTime())) {
PackageOrderWriteoffVO vo = new PackageOrderWriteoffVO();
vo.setPackageOutCount(orderDTO.getPackageTotalSurplusCount());
vo.setPackageOutRemark("套餐包到期");
orderService.updateWriteoff(orderDTO.getPackageOrderId(), vo);
}
}
QuartzConfigLog.info(jobId, jobClassName, jobTitle + "执行成功");// 自定义日志记录
}catch(Exception e) {
QuartzConfigLog.error(jobId, jobTitle + "执行失败", e);// 自定义日志记录
}
}
}

View File

@ -5,6 +5,7 @@
<resultMap id="packageInfoAppDTO" type="cn.com.tenlion.operator.pojo.dtos.packageinfo.PackageInfoAppDTO"> <resultMap id="packageInfoAppDTO" type="cn.com.tenlion.operator.pojo.dtos.packageinfo.PackageInfoAppDTO">
<result column="package_info_id" property="packageInfoId"/> <result column="package_info_id" property="packageInfoId"/>
<result column="package_name" property="packageName"/> <result column="package_name" property="packageName"/>
<result column="package_expire" property="packageExpire"/>
<result column="package_type" property="packageType"/> <result column="package_type" property="packageType"/>
<result column="package_mode" property="packageMode"/> <result column="package_mode" property="packageMode"/>
<result column="package_original_price" property="packageOriginalPrice"/> <result column="package_original_price" property="packageOriginalPrice"/>
@ -20,6 +21,7 @@
<resultMap id="packageInfoDTO" type="cn.com.tenlion.operator.pojo.dtos.packageinfo.PackageInfoDTO"> <resultMap id="packageInfoDTO" type="cn.com.tenlion.operator.pojo.dtos.packageinfo.PackageInfoDTO">
<result column="package_info_id" property="packageInfoId"/> <result column="package_info_id" property="packageInfoId"/>
<result column="package_name" property="packageName"/> <result column="package_name" property="packageName"/>
<result column="package_expire" property="packageExpire"/>
<result column="package_type" property="packageType"/> <result column="package_type" property="packageType"/>
<result column="package_mode" property="packageMode"/> <result column="package_mode" property="packageMode"/>
<result column="package_original_price" property="packageOriginalPrice"/> <result column="package_original_price" property="packageOriginalPrice"/>
@ -100,6 +102,7 @@
INSERT INTO operator_package_info( INSERT INTO operator_package_info(
package_info_id, package_info_id,
package_name, package_name,
package_expire,
package_type, package_type,
package_mode, package_mode,
package_original_price, package_original_price,
@ -124,6 +127,7 @@
) VALUES( ) VALUES(
#{packageInfoId}, #{packageInfoId},
#{packageName}, #{packageName},
#{packageExpire},
#{packageType}, #{packageType},
#{packageMode}, #{packageMode},
#{packageOriginalPrice}, #{packageOriginalPrice},
@ -205,6 +209,9 @@
<if test="packageName != null and packageName != ''"> <if test="packageName != null and packageName != ''">
package_name = #{packageName}, package_name = #{packageName},
</if> </if>
<if test="packageExpire != null ">
package_expire = #{packageExpire},
</if>
<if test="packageType != null and packageType != ''"> <if test="packageType != null and packageType != ''">
package_type = #{packageType}, package_type = #{packageType},
</if> </if>
@ -251,6 +258,7 @@
<select id="get" parameterType="map" resultMap="packageInfoDTO"> <select id="get" parameterType="map" resultMap="packageInfoDTO">
SELECT SELECT
t1.package_name, t1.package_name,
t1.package_expire,
t1.package_type, t1.package_type,
t1.package_mode, t1.package_mode,
t1.package_original_price, t1.package_original_price,
@ -355,6 +363,7 @@
<select id="listApp" parameterType="map" resultMap="packageInfoAppDTO"> <select id="listApp" parameterType="map" resultMap="packageInfoAppDTO">
SELECT SELECT
t1.package_info_id, t1.package_info_id,
t1.package_expire,
t1.package_name, t1.package_name,
t1.package_type, t1.package_type,
t1.package_mode, t1.package_mode,
@ -405,6 +414,7 @@
<select id="getApp" parameterType="map" resultMap="packageInfoAppDTO"> <select id="getApp" parameterType="map" resultMap="packageInfoAppDTO">
SELECT SELECT
t1.package_info_id, t1.package_info_id,
t1.package_expire,
t1.package_name, t1.package_name,
t1.package_type, t1.package_type,
t1.package_mode, t1.package_mode,
@ -438,6 +448,7 @@
SELECT SELECT
t1.package_info_id, t1.package_info_id,
t1.package_name, t1.package_name,
t1.package_expire,
t1.package_type, t1.package_type,
t1.package_mode, t1.package_mode,
t1.package_original_price, t1.package_original_price,

View File

@ -6,6 +6,8 @@
<result column="package_order_id" property="packageOrderId"/> <result column="package_order_id" property="packageOrderId"/>
<result column="package_name" property="packageName"/> <result column="package_name" property="packageName"/>
<result column="package_info_id" property="packageInfoId"/> <result column="package_info_id" property="packageInfoId"/>
<result column="package_expire_time" property="packageExpireTime"/>
<result column="package_expire" property="packageExpire"/>
<result column="package_total_money" property="packageTotalMoney"/> <result column="package_total_money" property="packageTotalMoney"/>
<result column="package_total_count" property="packageTotalCount"/> <result column="package_total_count" property="packageTotalCount"/>
<result column="package_total_avg_money" property="packageTotalAvgMoney"/> <result column="package_total_avg_money" property="packageTotalAvgMoney"/>
@ -62,6 +64,9 @@
SET SET
package_account_item = #{packageAccountItem}, package_account_item = #{packageAccountItem},
package_pay_status = #{packagePayStatus}, package_pay_status = #{packagePayStatus},
<if test="packageExpireTime != null and packageExpireTime != ''">
package_expire_time = #{packageExpireTime},
</if>
package_pay = #{packagePay} package_pay = #{packagePay}
WHERE WHERE
package_no = #{packageNo} package_no = #{packageNo}
@ -83,6 +88,8 @@
package_order_id, package_order_id,
package_info_id, package_info_id,
package_total_money, package_total_money,
package_expire,
package_expire_time,
package_total_count, package_total_count,
package_total_avg_money, package_total_avg_money,
package_total_surplus_count, package_total_surplus_count,
@ -99,6 +106,8 @@
#{packageOrderId}, #{packageOrderId},
#{packageInfoId}, #{packageInfoId},
#{packageTotalMoney}, #{packageTotalMoney},
#{packageExpire},
#{packageExpireTime},
#{packageTotalCount}, #{packageTotalCount},
#{packageTotalAvgMoney}, #{packageTotalAvgMoney},
#{packageTotalSurplusCount}, #{packageTotalSurplusCount},
@ -165,6 +174,12 @@
</if> </if>
<if test="packagePay != null and packagePay != ''"> <if test="packagePay != null and packagePay != ''">
package_pay = #{packagePay}, package_pay = #{packagePay},
</if>
<if test="packageExpireTime != null and packageExpireTime != ''">
package_expire_time = #{packageExpireTime},
</if>
<if test="packageExpire != null and packageExpire != ''">
package_expire = #{packageExpire},
</if> </if>
gmt_modified = #{gmtModified}, gmt_modified = #{gmtModified},
modifier = #{modifier}, modifier = #{modifier},
@ -179,6 +194,8 @@
t1.package_order_id, t1.package_order_id,
t1.package_info_id, t1.package_info_id,
t1.package_total_money, t1.package_total_money,
t1.package_expire_time,
t1.package_expire,
t1.package_total_count, t1.package_total_count,
t1.package_total_avg_money, t1.package_total_avg_money,
t1.package_total_surplus_count, t1.package_total_surplus_count,
@ -268,6 +285,8 @@
t1.package_order_id, t1.package_order_id,
t1.package_info_id, t1.package_info_id,
t1.package_total_money, t1.package_total_money,
t1.package_expire_time,
t1.package_expire,
t1.package_total_count, t1.package_total_count,
t1.package_total_avg_money, t1.package_total_avg_money,
t1.package_total_surplus_count, t1.package_total_surplus_count,
@ -305,6 +324,10 @@
<if test="notCheckStatus == null"> <if test="notCheckStatus == null">
AND t1.is_delete = 0 AND t1.is_delete = 0
</if> </if>
<if test="queryExpire != null and queryExpire == 'queryExpire' ">
AND t1.is_delete = 0 AND t1.package_total_surplus_count > 0 AND t1.package_expire_time != '' AND t1.package_expire_time IS NOT NULL AND t1.package_pay_status = '1'
AND NOW() > t1.package_expire_time
</if>
<if test="keYong != null and keYong != ''"> <if test="keYong != null and keYong != ''">
AND t1.package_total_surplus_count > 0 AND t1.package_total_surplus_count > 0
</if> </if>

View File

@ -141,7 +141,7 @@
return rowData; return rowData;
} }
}, },
{field: 'packageLimitUsers', width: 150, title: '范围', align:'center', {field: 'packageLimitUsers', width: 120, title: '范围', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -177,7 +177,7 @@
return (rowData / 100.00 ) + "<b></b>"; return (rowData / 100.00 ) + "<b></b>";
} }
},*/ },*/
{field: 'packageCount', width: 120, title: '套餐次数', align:'center', {field: 'packageCount', width: 100, title: '套餐次数', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -186,6 +186,15 @@
return rowData + "<b></b>"; return rowData + "<b></b>";
} }
}, },
{field: 'packageExpire', width: 100, title: '有效期', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData + "<b></b>";
}
},
{field: 'packageOnlien', width: 240, title: '发布', align:'center', fixed: 'right', {field: 'packageOnlien', width: 240, title: '发布', align:'center', fixed: 'right',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];

View File

@ -25,10 +25,23 @@
</div> </div>
<div class="layui-card-body" style="padding: 15px;"> <div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm"> <form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item"> <div class=" layui-row">
<label class="layui-form-label">套餐名称<span style="color: red">*</span></label> <div class="layui-col-xs6">
<div class="layui-input-block"> <div class="layui-form-item">
<input type="text" id="packageName" name="packageName" class="layui-input" value="" placeholder="请输入套餐名称" maxlength="200"> <label class="layui-form-label">套餐名称<span style="color: red">*</span></label>
<div class="layui-input-block">
<input type="text" id="packageName" name="packageName" class="layui-input" value="" placeholder="请输入套餐名称" maxlength="200">
</div>
</div>
</div>
<div class="layui-col-xs6">
<div class="layui-form-item">
<label class="layui-form-label">套餐有效期<span style="color: red">*</span></label>
<div class="layui-input-block">
<input type="number" id="packageExpire" name="packageExpire" style="width: 90%;float: left" class="layui-input" value="" placeholder="请输入套餐有效天数(自用户购买之日开始算起)" lay-verify="required">
<button type="button" class="layui-form-btn layui-btn layui-btn-primary" style="width: 10%" ></button>
</div>
</div>
</div> </div>
</div> </div>
<div class=" layui-row"> <div class=" layui-row">

View File

@ -25,10 +25,22 @@
</div> </div>
<div class="layui-card-body" style="padding: 15px;"> <div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm"> <form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item"> <div class=" layui-row">
<label class="layui-form-label">套餐名称<span style="color: red">*</span></label> <div class="layui-col-xs6">
<div class="layui-input-block"> <div class="layui-form-item">
<input type="text" id="packageName" name="packageName" class="layui-input" value="" placeholder="请输入套餐名称" maxlength="200"> <label class="layui-form-label">套餐名称<span style="color: red">*</span></label>
<div class="layui-input-block">
<input type="text" id="packageName" name="packageName" class="layui-input" value="" placeholder="请输入套餐名称" maxlength="200">
</div>
</div>
</div>
<div class="layui-col-xs6">
<div class="layui-form-item">
<label class="layui-form-label">套餐有效期<span style="color: red">*</span></label>
<div class="layui-input-block">
<input type="text" id="packageExpire" name="packageExpire" class="layui-input" value="" placeholder="请输入套餐有效天数(自用户购买之日开始算起)" maxlength="200">
</div>
</div>
</div> </div>
</div> </div>
<div class=" layui-row"> <div class=" layui-row">