Commit 36a9bb9d authored by 谢希宇's avatar 谢希宇

Submit by Strive

Date 2021/03/22
parent c82fee50
......@@ -173,7 +173,8 @@
<select id="fetchSearchByPage" parameterType="java.util.Map" resultMap="resultMap">
SELECT
<include refid="sqlColumns"/>,
CONVERT(AES_DECRYPT(f.nickname,'aideakey') USING UTF8) name, o.org_name orgName,
f.nickname name,
o.org_name orgName,
cr.verif_date verifDate
FROM t_aidea_check_result t
LEFT JOIN wx_mp_fanss f ON t.openid = f.openid AND f.delflag = '0'
......
......@@ -133,10 +133,10 @@ public class CheckresultServiceImpl extends GenericServiceImpl<Checkresult> impl
String token = mpTokenUtil.getToken(mpAccountsService.getMpAccountsAppid(appid));
String refuseTmpId = SystemConfig.p.getProperty("CHECK_RESULT_TEMPLATE_MSG");
String first = "您好,您的检测已出结果。";
String remark = "点击“详情”查看详细报告";
String remark = "点击详情查询您的检测报告。";
String[] keywords = { checkresult.getCheckProject(),//检测项目
checkresult.getCheckMethod(),//检测类型
String[] keywords = { checkresult.getName(),
checkresult.getCheckProject(),//检测项目
DateFormatUtils.getDateFormat(checkresult.getVerifDate(), "yyyy年MM月dd日"),//检测券核销时间
remark};//检测结果
String url = SystemConfig.p.getProperty("MOBILE_MP_DOMAIN_NAME") + "/bzgldetails?appid="+appid+"&tokenId=1&id="+checkresult.getId();
......
......@@ -182,7 +182,7 @@
<select id="fetchById" parameterType="java.lang.Long" resultType="com.cftech.consultsheet.model.ConsultSheet">
SELECT
<include refid="sqlColumns"/>, d.name pharmacist, e.org_name hospital, f.store fansAlias, CONVERT(AES_DECRYPT(f.nickname,'aideakey') USING UTF8) nickName
<include refid="sqlColumns"/>, d.name pharmacist, e.org_name hospital, f.store fansAlias, f.nickname nickName
FROM t_aidea_consult_sheet a
LEFT JOIN t_qyuser b ON b.id = a.doctor_id
LEFT JOIN t_qyuser c ON c.id = a.service_id
......
......@@ -345,15 +345,17 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
if (StringUtils.isNoneBlank(consultSheet.getOpenId())) {
MpFanssEntity mpFanssEntity = mpFanssService.getWxUser(consultSheet.getOpenId());
if (mpFanssEntity != null) {
nickname = mpFanssEntity.getNickname();
fansAlias = mpFanssEntity.getStore();
nickname = StringUtils.isBlank(mpFanssEntity.getNickname()) ? "":mpFanssEntity.getNickname();
fansAlias = StringUtils.isBlank(mpFanssEntity.getStore()) ? "":mpFanssEntity.getStore();
}
}
//推送客服消息
String msg = null;
Qyuser service = qyuserService.fetchById(consultSheet.getServiceId());
msg = SystemConfig.p.getProperty("QY_SEND_CUSTOMERSERVICE_MSG").replace("{NUMBER}", consultSheet.getConsultId()).replace("{NICKNAME}", StringUtils.isBlank(nickname) ? "":nickname).replace("{FANSALIAS}", fansAlias);
msg = SystemConfig.p.getProperty("QY_SEND_CUSTOMERSERVICE_MSG").replace("{NUMBER}", consultSheet.getConsultId())//
.replace("{NICKNAME}", nickname)//
.replace("{FANSALIAS}", fansAlias);
List<Qyuser> serviceUsers = new ArrayList();
serviceUsers.add(service);
JSONObject result = qyMsgUtil.sendText(accounts, false, serviceUsers, null, null,
......@@ -361,7 +363,9 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
log.info("客服,消息发送日志 {}", result.toString());
Qyuser doctor = qyuserService.fetchById(consultSheet.getDoctorId());
msg = SystemConfig.p.getProperty("QY_SEND_DOCTOR_MSG").replace("{NUMBER}", consultSheet.getConsultId()).replace("{NICKNAME}", StringUtils.isBlank(nickname) ? "":nickname).replace("{FANSALIAS}", fansAlias);
msg = SystemConfig.p.getProperty("QY_SEND_DOCTOR_MSG").replace("{NUMBER}", consultSheet.getConsultId())//
.replace("{NICKNAME}", nickname)//
.replace("{FANSALIAS}", fansAlias);
List<Qyuser> doctorUsers = new ArrayList();
doctorUsers.add(doctor);
qyMsgUtil.sendText(accounts, false, doctorUsers, null, null,
......
......@@ -619,12 +619,12 @@ public class ConsultSheetController {
//咨询单审核失败推送消息(客服)
msg = SystemConfig.p.getProperty("QY_SEND_SERVICE_AUDIT_SUCCESS_MAG") + consultSheet.getConsultId() + ";患者昵称:" +
(StringUtils.isNoneBlank(consultSheet.getNickName()) ? consultSheet.getNickName() : "") + ";患者别名:" +
consultSheet.getFansAlias() + ";患者openid:"+consultSheet.getOpenId();
(StringUtils.isNoneBlank(consultSheet.getFansAlias()) ? consultSheet.getFansAlias() : "");
} else {
//咨询单审核失败推送消息(客服)
msg = SystemConfig.p.getProperty("QY_SEND_SERVICE_AUDIT_FAIL_MAG") + consultSheet.getConsultId() + ";患者昵称:" +
(StringUtils.isNoneBlank(consultSheet.getNickName()) ? consultSheet.getNickName() : "") + ";患者别名:" +
consultSheet.getFansAlias() + ";患者openid:"+consultSheet.getOpenId();
(StringUtils.isNoneBlank(consultSheet.getFansAlias()) ? consultSheet.getFansAlias() : "");
}
qyMsgUtil.sendText(accounts, false, qyusers, null, null, agenId, msg, false);
......
......@@ -123,7 +123,7 @@
<select id="fetchById" parameterType="java.lang.Long" resultMap="resultMap">
SELECT
<include refid="sqlColumns"/>, c.name couponName, CONVERT(AES_DECRYPT(f.nickname,'aideakey') USING UTF8) nickName, h.name hospitalName
<include refid="sqlColumns"/>, c.name couponName, f.nickname nickName, h.name hospitalName
FROM t_aidea_coupon_record t
LEFT JOIN t_aidea_check_coupon c ON t.coupon_id = c.id
LEFT JOIN wx_mp_fanss f ON f.openid = t.openid AND f.delflag = '0'
......@@ -140,7 +140,7 @@
<select id="fetchSearchByPage" parameterType="java.util.Map" resultMap="resultMap">
SELECT
<include refid="sqlColumns"/>, c.name couponName, CONVERT(AES_DECRYPT(f.nickname,'aideakey') USING UTF8) nickName
<include refid="sqlColumns"/>, c.name couponName, f.nickname nickName
FROM t_aidea_coupon_record t
LEFT JOIN t_aidea_check_coupon c ON t.coupon_id = c.id
LEFT JOIN wx_mp_fanss f ON f.openid = t.openid AND f.delflag = '0'
......@@ -302,7 +302,7 @@
</select>
<update id="updatePdaLog" parameterType="java.util.Map">
update t_aidea_PdaLog
update t_aidea_pdalog
set resultJson = #{resultJson, jdbcType=VARCHAR},
status = #{status, jdbcType=BIGINT},
update_time = now()
......@@ -311,7 +311,7 @@
<insert id="insertPdaLog" parameterType="java.util.Map" useGeneratedKeys="true"
keyProperty="id">
insert into t_aidea_PdaLog (id, content, create_time)
insert into t_aidea_pdalog (id, content, create_time)
values (#{id, jdbcType=VARCHAR}, #{content, jdbcType=VARCHAR}, now())
</insert>
......
......@@ -39,19 +39,19 @@ public class Couponrecord implements Serializable {
@ExportConfig(value = "二维码链接", width = 100, showLevel = 1)
private String qrcode;
/* 失效时间 */
@ExportConfig(value = "失效时间", width = 100, showLevel = 1)
@ExportConfig(value = "失效时间", width = 100, showLevel = 1, dateFormat = "yyyy-MM-dd")
private Date invalidDate;
/* 核销时间 */
@ExportConfig(value = "核销时间", width = 100, showLevel = 1)
@ExportConfig(value = "核销时间", width = 100, showLevel = 1, dateFormat = "yyyy-MM-dd")
private Date verifDate;
/* 设备号 */
@ExportConfig(value = "设备号", width = 100, showLevel = 1)
private String facilityNo;
/* 过期时间 */
@ExportConfig(value = "过期时间", width = 100, showLevel = 1)
@ExportConfig(value = "过期时间", width = 100, showLevel = 1, dateFormat = "yyyy-MM-dd")
private Date expireDate;
/* 过期时间 */
@ExportConfig(value = "生效时间", width = 100, showLevel = 1)
@ExportConfig(value = "生效时间", width = 100, showLevel = 1, dateFormat = "yyyy-MM-dd")
private Date takeEffectDate;
/* 医院id */
private Long hospitalId;
......
......@@ -153,7 +153,18 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
}
} else if (StringUtils.equals(lastCouponrecord.getType(), "1")) {//通过第一张开始时间获取购买数量
List<Couponrecord> lastCouponrecordList = findCouponrecordBySort("2", openid);
if (lastCouponrecordList == null || lastCouponrecordList.size() == 0) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(lastCouponrecord.getCreateTime());
calendar.set(Calendar.MONTH, 0);
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.set(Calendar.HOUR_OF_DAY, 1);
calendar.set(Calendar.MINUTE, 1);
number = buyingMedicineNumber(openid, calendar.getTime());//获取最后一张券购买数量
} else {
number = buyingMedicineNumber(openid, lastCouponrecordList.get(0).getCreateTime());//获取最后一张券购买数量
}
//通过第一张最后购买数量,所以只需赠送第二章
if (number >= 6) {//赠送第二张
......
......@@ -5,6 +5,7 @@ import com.cftech.couponrecord.dao.CouponrecordMapper;
import com.cftech.couponrecord.model.Couponrecord;
import com.cftech.couponrecord.service.PdaCouponrecordService;
import com.cftech.couponrecord.util.Md5Utils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
......@@ -14,6 +15,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
@Slf4j
@Service("pdaCouponrecordService")
public class PdaCouponrecordServiceImpl implements PdaCouponrecordService {
......@@ -22,6 +24,7 @@ public class PdaCouponrecordServiceImpl implements PdaCouponrecordService {
private CouponrecordMapper couponrecordMapper;
public JSONObject writeOff(JSONObject obj) {
log.info("pda回调接口 ,{} " + obj.toString());
JSONObject rtnJson = new JSONObject();
String logId = UUID.randomUUID().toString();
Map<String, Object> map = new HashMap<String, Object>();
......
......@@ -297,9 +297,6 @@
rules: {},
messages: {},
submitHandler: function (form) {
console.log(form);
console.log("==" + $("#myForm").serialize());
$("#save").attr("disabled", true);
$.getJSON("#springUrl('/a/hospital/formData')", $("#myForm").serialize(), function (returnobj) {
$("#save").attr("disabled", false);
......@@ -309,7 +306,7 @@
btnoktext: "继续添加",
btncanceltext: "关闭",
success: function () {
location.href = "#springUrl('/a/hospital/form')";
location.href = "#springUrl('/a/hospital/form')?pageType=Edit";
},
cancel: function () {
location.href = "#springUrl('/a/hospital/list')";
......
......@@ -377,7 +377,7 @@
url: "#springUrl('/a/msgrecord/byUserIdFindReceiver')",
data: {userId: userId,
"_csrf": csrftoken.value,
"_csrf_header": csrfheader.value,},
"_csrf_header": csrfheader.value},
dataType: "json",
success: function (datas) {
let arr = datas.data;
......
......@@ -24,6 +24,10 @@
<!-- DataTables -->
<link rel="stylesheet" href="plugins/datatables/dataTables.bootstrap.css">
<!-- FixedColumns -->
<link rel="stylesheet" href="plugins/FixedColumns-3.3.2/css/fixedColumns.bootstrap.css">
<link rel="stylesheet" href="plugins/FixedColumns-3.3.2/css/fixedColumns.dataTables.css">
<!-- Theme style -->
<link rel="stylesheet" href="dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
......@@ -263,6 +267,7 @@
<tr>
<!--<th><input hidden class='checkQyCode1' type="checkBox"></th>-->
<th style="width: 20px"><input class='checkQyCode' type="checkBox"></th>
<th style="width: 60px">操作</th>
<th style="width: 120px">订单编码</th>
<th style="width: 120px">咨询单编码</th>
<th style="width: 120px">产品名称</th>
......@@ -270,20 +275,12 @@
<th style="width: 60px">原金额</th>
<th style="width: 60px">昵称</th>
<th style="width: 60px">别名</th>
<!--<th>openid</th>-->
<th style="width: 120px">顺丰运单号</th>
<th style="width: 60px">订单状态</th>
<!--<th>支付交易号</th>-->
<th style="width: 60px">是否开票</th>
<th style="width: 60px">患者类型</th>
<th style="width: 60px">新用户</th>
<th style="width: 120px">创建时间</th>
<!-- <th>确认时间</th>-->
<!-- <th>付款时间</th>-->
<!-- <th>发货时间</th>-->
<!-- <th>签收时间</th>-->
<!-- <th>取消时间</th>-->
<th style="width: 60px">操作</th>
</tr>
</thead>
<tbody id="tablebody">
......@@ -309,6 +306,9 @@
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables/extensions/i18n/lanauage_ch.js"></script>
<script src="plugins/datatables/dataTables.bootstrap.min.js"></script>
<script src="plugins/FixedColumns-3.3.2/js/dataTables.fixedColumns.js"></script>
<!--<script src="plugins/FixedColumns-3.3.2/js/fixedColumns.bootstrap.js"></script>-->
<!-- SlimScroll -->
<script src="plugins/slimScroll/jquery.slimscroll.min.js"></script>
<script src="plugins/datepicker/bootstrap-datepicker.js"></script>
......@@ -333,7 +333,6 @@
<script>
var csrf = '${_csrf.token}';
var csrf_header = '${_csrf.headerName}';
var defaultStatus = true;
//咨询单列表通过订单编码跳转单条订单信息
var orderCode = `${orderCode}`;
......@@ -382,6 +381,11 @@
});
};
$.extend($.fn.dataTable.defaults, {
searching: false,
ordering: false
} );
$('#table').DataTable({
"lengthChange": false,
"searching": false,
......@@ -393,11 +397,17 @@
"sAjaxSource": sSource,
"fnServerData": retrieveData,
"pagingType": "full_numbers",
fixedColumns: {
leftColumns: 2
},
"autoWidth": true,
"scrollX": true,
"sScrollY": false,
"rowCallback": RowCallBack,
"aoColumns": [
{
"mData": "id"
},
{
"mData": "id"
},
......@@ -424,25 +434,14 @@
,
{
"mData": "fansAlias"
}
// ,
// {
// "mData": "openid"
// }
,
},
{
"mData": "courierNumber"
}
,
{
"mData": "status"
}
// ,
// {
// "mData": "tradeNo"
// }
,
},
{
"mData": "confirm"
}
......@@ -458,31 +457,6 @@
{
"mData": "createTime"
}
,
// {
// "mData": "orderTime"
// }
// ,
// {
// "mData": "payTime"
// }
// ,
// {
// "mData": "sendExpressDateStr"
// }
// ,
// {
// "mData": "acceptExpressDateStr"
// }
// ,
// {
// "mData": "cancelTime"
// }
// ,
{
"mData": "id"
}
],
"aoColumnDefs": [
{ // set default column settings
......@@ -509,28 +483,51 @@
},
{
"aTargets": [1],
"mData": "id",
"mRender": function (a, b, c, d) {
var html = '#if($shiro.hasPermission("qy:order:edit"))';
if (c.status == '0') {
html += '<a href="#springUrl("/a/order/form?pageType=Edit&id=' + a + '")" class="btn green">订单确认</a>';
}
if (c.status != '0') {
html += '<a href="#springUrl("/a/order/form?pageType=View&id=' + a + '")" class="btn green">查看详情</a>';
}
if (c.status == '1') {
html += '<a onclick="updateStatusSuccess(' + a + ')" class="btn green">订单付款</a>';
}
if (c.status != '4' && c.status != '5') {
html += '<a onclick="showModal(' + a + ')" class="btn green">订单关闭</a>';
}
if (c.status != '0') {//待付款可复制链接
html += '<a onclick="copyPayLink(`' + c.payUrl + '`)" class="btn green">复制链接</a>';
}
html += '#end';
return html;
}
},
{
"aTargets": [2],
"mData": "number",
"mRender": function (a, b, c, d) {
return a;
}
},
{
"aTargets": [2],
"aTargets": [3],
"mData": "consultCode",
"mRender": function (a, b, c, d) {
return a;
}
},
{
"aTargets": [3],
"aTargets": [4],
"mData": "productName",
"mRender": function (a, b, c, d) {
return a;
}
}
,
},
{
"aTargets": [4],
"aTargets": [5],
"mData": "orderAmount",
"mRender": function (a, b, c, d) {
if (a != null && Number.isInteger(a)) {
......@@ -540,10 +537,9 @@
}
return '';
}
}
,
},
{
"aTargets": [5],
"aTargets": [6],
"mData": "totalAmount",
"mRender": function (a, b, c, d) {
if (a != null) {
......@@ -551,10 +547,9 @@
}
return '';
}
}
,
},
{
"aTargets": [6],
"aTargets": [7],
"mData": "nickName",
"mRender": function (a, b, c, d) {
if (a) {
......@@ -563,10 +558,9 @@
return null;
}
}
}
,
},
{
"aTargets": [7],
"aTargets": [8],
"mData": "fansAlias",
"mRender": function (a, b, c, d) {
if (a) {
......@@ -575,18 +569,9 @@
return null;
}
}
}
// ,
// {
// "aTargets": [8],
// "mData": "openid",
// "mRender": function (a, b, c, d) {
// return a;
// }
// }
,
},
{
"aTargets": [8],
"aTargets": [9],
"mData": "courierNumber",
"mRender": function (a, b, c, d) {
if (a) {
......@@ -596,10 +581,9 @@
}
return html;
}
}
,
},
{
"aTargets": [9],
"aTargets": [10],
"mData": "status",
"mRender": function (a, b, c, d) {
if (a == '0') {
......@@ -617,24 +601,15 @@
}
}
},
// {
// "aTargets": [11],
// "mData": "tradeNo",
// "mRender": function (a, b, c, d) {
// return a;
// }
// }
// ,
{
"aTargets": [10],
"aTargets": [11],
"mData": "confirm",
"mRender": function (a, b, c, d) {
return a == null ? '否':'是';
}
}
,
},
{
"aTargets": [11],
"aTargets": [12],
"mData": "isThree",
"mRender": function (a, b, c, d) {
if (a == '0') {
......@@ -645,10 +620,9 @@
return '';
}
}
}
,
},
{
"aTargets": [12],
"aTargets": [13],
"mData": "isSales",
"mRender": function (a, b, c, d) {
if (a == '4') {
......@@ -660,7 +634,7 @@
}
,
{
"aTargets": [13],
"aTargets": [14],
"mData": "createTime",
"mRender": function (a, b, c, d) {
let time = formatDates(a);
......@@ -670,91 +644,6 @@
return formatDates(a);
}
}
,
// {
// "aTargets": [13],
// "mData": "orderTime",
// "mRender": function (a, b, c, d) {
// let time = formatDates(a);
// if (time.indexOf("1970") != -1) {
// return '';
// }
// return formatDates(a);
// }
// }
// ,
// {
// "aTargets": [14],
// "mData": "payTime",
// "mRender": function (a, b, c, d) {
// let time = formatDates(a);
// if (time.indexOf("1970") != -1) {
// return '';
// }
// return formatDates(a);
// }
// }
// ,
// {
// "aTargets": [15],
// "mData": "sendExpressDateStr",
// "mRender": function (a, b, c, d) {
// return a;
// }
// }
// ,
// {
// "aTargets": [16],
// "mData": "acceptExpressDateStr",
// "mRender": function (a, b, c, d) {
// return a;
// }
// }
// ,
// {
// "aTargets": [17],
// "mData": "cancelTime",
// "mRender": function (a, b, c, d) {
// let time = formatDates(a);
// if (time.indexOf("1970") != -1) {
// return '';
// }
// return formatDates(a);
// }
// }
//,
{
"aTargets": [14],
"mData": "id",
"mRender": function (a, b, c, d) {
var html = '#if($shiro.hasPermission("qy:order:edit"))';
html += '<div class="btn-group" style="min-width: 100px;">\n' +
// '<button type="button" class="btn btn-success btn-flat">操作</button>\n' +
'<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">\n' +
' <span class="caret"></span>\n' +
' <span class="sr-only">Toggle Dropdown</span>\n' +
'</button>\n' +
'<ul class="dropdown-menu" role="menu" style="min-width: 100px;">\n';
if (c.status == '0') {
html += '<li><a href="#springUrl("/a/order/form?pageType=Edit&id=' + a + '")">订单确认</a></li>';
}
if (c.status != '0') {
html += '<li><a href="#springUrl("/a/order/form?pageType=View&id=' + a + '")">查看详情</a></li>';
}
if (c.status == '1') {
html += '<li><a onclick="updateStatusSuccess(' + a + ')">订单付款</a></li>';
}
if (c.status != '4' && c.status != '5') {
html += '<li><a onclick="showModal(' + a + ')">订单关闭</a></li>';
}
if (c.status != '0') {//待付款可复制链接
html += '<li><a onclick="copyPayLink(`' + c.payUrl + '`)">复制链接</a></li>';
}
html += '</ul>';
html += '#end';
return html;
}
}
]
});
......@@ -1232,7 +1121,7 @@
*/
function RowCallBack(row, data, index) {
if (data.isThree == '0') {
$('td', row).eq(11).css('background-color', "RGB(249,203,132)");
$('td', row).eq(12).css('background-color', "RGB(249,203,132)");
}
}
</script>
......
......@@ -90,7 +90,7 @@
o.courier_number,
o.address_des,
t.id as productId,
CONVERT ( AES_DECRYPT( m.`name`, 'aideakey' ) USING UTF8 ) memberName,
m.`name` memberName,
CONVERT ( AES_DECRYPT( m.phone, 'aideakey' ) USING UTF8 ) memberPhone,
a.address
</sql>
......@@ -314,8 +314,8 @@
DATE_FORMAT(aw.create_time, '%Y-%m-%d %H:%i:%s') sendExpressDateStr,
DATE_FORMAT(aw.accept_express_date, '%Y-%m-%d %H:%i:%s') acceptExpressDateStr,
f.store fansAlias,
CONVERT(AES_DECRYPT(f.nickname,'aideakey') USING UTF8) nickName,
CONVERT ( AES_DECRYPT( m.`name`, 'aideakey' ) USING UTF8 ) memberName,
f.nickname nickName,
m.`name` memberName,
CONVERT ( AES_DECRYPT( m.phone, 'aideakey' ) USING UTF8 ) memberPhone,
s.address,
au.status isThree,
......
......@@ -655,9 +655,13 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
qyuserConds.equal("t.id", order.getServiceId());//客服
qyusers = qyuserService.fetchSearchByPage(qyuserConds, null, 0, 0);
BigDecimal payAmount = new BigDecimal(order.getPayAmount());
BigDecimal ratio = new BigDecimal(100);
double payAmountDb = payAmount.divide(ratio).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
msg = SystemConfig.p.getProperty("QY_SEND_SERVICE_PAYMENT_SUCCESS_MAG") + order.getNumber() + ";患者昵称:" +
(StringUtils.isNoneBlank(order.getNickName()) ? order.getNickName() : "") + ";患者别名:" +
order.getFansAlias() + ";患者openid:"+order.getOpenid() + ";患者付款金额:" + order.getPayAmount() + "(单位/分)";
(StringUtils.isNoneBlank(order.getFansAlias()) ? order.getFansAlias() : "")+ ";患者付款金额:" + payAmountDb + "(单位/元)";
}
if (qyusers != null && qyusers.size() > 0) {
......
......@@ -160,6 +160,10 @@
src="plugins/jquery-validation/js/jquery.validate.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="common/js/cfapp.js"></script>
<script>
var csrfheader = {name: '_csrf_header', value: '${_csrf.headerName}'};
var csrftoken = {name: '_csrf', value: '${_csrf.token}'};
</script>
<script>
function formatDates(now) {
var now = new Date(now);
......@@ -334,7 +338,38 @@
function updateStatus(dom) {
let id = $(dom).attr('data-id');
let status = $(dom).attr('data-status');
console.log(id + "=====" + status);
Cfapp.confirm({
message: "确定要设置批次号" + (status == "0" ? "失效" : "激活") + "吗",
btnoktext: "确定",
btncanceltext: "取消",
success: function () {
$.ajax({
type: "POST",
url: "#springUrl('/a/productBatch/updateStatus')",
data: { id: id,
status: status,
_csrf: csrftoken.value,
_csrf_header: csrfheader.value},
dataType: "json",
success: function (data) {
if (data.errorNo == 0) {
Cfapp.alert({
message: "更新成功",
btntext: "确定",
success: function () {
location.href = "#springUrl('/a/productBatch/list')";
}
});
}
},
error: function () {
}
})
},
cancel: function () {
$(".modal-backdrop").fadeOut();
}
})
}
function importExcel() {
......
......@@ -88,7 +88,18 @@
<select id="fetchById" parameterType="java.lang.Long" resultMap="resultMap">
SELECT
<include refid="sqlColumns"/>,
t.id,
t.number,
t.batch_no,
t.product_id,
t.accounts_id,
t.del_flag,
t.status,
t.create_time,
t.update_time,
t.description,
t.create_by,
t.update_by,
p.product_number productCode,
p.product_name productName,
p.common_name commonName
......
......@@ -16,6 +16,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
......@@ -171,7 +172,7 @@ public class ProductBatchController {
if (file == null) {
return list(request, model);
}
// 构造临时路径来存储上传的文件
// 构造临时路径来存储上传的文件
String uploadPath = System.getProperty("java.io.tmpdir");
File uploadDir = new File(uploadPath);
if (!uploadDir.exists()) {
......@@ -196,4 +197,26 @@ public class ProductBatchController {
return list(request, model);
}
/**
* 设置批次号激活失效
* @return
*/
@RequestMapping("/updateStatus")
@ResponseBody
public JSONObject updateStatus(@RequestParam Long id, @RequestParam String status) {
JSONObject rtnJosn = new JSONObject();
try {
ProductBatch productBatch = productBatchService.fetchById(id);
if (productBatch != null) {
productBatch.setStatus(status);
productBatchService.update(productBatch);
rtnJosn.put("errorNo", 0);
return rtnJosn;
}
} catch (Exception e) {
rtnJosn.put("errorNo", 1);
}
rtnJosn.put("errorNo", 1);
return rtnJosn;
}
}
......@@ -194,14 +194,10 @@
<th>咨询单编码</th>
<th>是否打印</th>
<th>粉丝昵称</th>
<th>OpenId</th>
<th>联系人</th>
<th>联系人手机号</th>
<th>订单员</th>
<!-- <th>收派状态</th>-->
<th>创建时间</th>
<!-- <th>发件时间</th>-->
<!-- <th>收件时间</th>-->
<th>操作</th>
</tr>
</thead>
......@@ -343,10 +339,6 @@
"width": "100px",
"mData": "nickName"
},
{
"width": "120px",
"mData": "openId"
},
{
"width": "100px",
"mData": "contact",
......@@ -380,20 +372,6 @@
}
}
},
// {
// "width": "80px",
// "mData": "filterResult",
// "mRender": function (a, b, c, d) {
// switch (a) {
// case "1":
// return "人工确认";
// case "2":
// return "可收派";
// case "3":
// return "不可收派";
// }
// }
// },
{
"width": "130px",
"mData": "createTime",
......@@ -402,28 +380,6 @@
}
},
// {
// "width": "130px",
// "mData": "sendExpressDate",
// "mRender": function (a, b, c, d) {
// let time = formatDates(a);
// if (time.indexOf("1970") == -1) {
// return formatDates(a, "yyyy-MM-dd HH:mm:ss");
// }
// return "";
// }
// },
// {
// "width": "130px",
// "mData": "acceptExpressDate",
// "mRender": function (a, b, c, d) {
// let time = formatDates(a);
// if (time.indexOf("1970") == -1) {
// return formatDates(a, "yyyy-MM-dd HH:mm:ss");
// }
// return "";
// }
// },
{
"width": "120px",
"mData": "id"
......@@ -434,22 +390,14 @@
'targets': [0]
},
{
"aTargets": [12],
"aTargets": [11],
"mData": "id",
"mRender": function (a, b, c, d) {
var html = '';
html += '<div class="btn-group" style="min-width: 100px;">\n' +
//'<button type="button" class="btn btn-success btn-flat">操作</button>\n' +
'<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">\n' +
' <span class="caret"></span>\n' +
' <span class="sr-only">Toggle Dropdown</span>\n' +
'</button>\n' +
'<ul class="dropdown-menu" role="menu" style="min-width: 100px;">\n';
html += '<li><a href="#springUrl("/a/waybill/form?id=' + a + '")" class="btn green">查看</a></li>';
html += '<a href="#springUrl("/a/waybill/form?id=' + a + '")" class="btn green">查看</a>';
html += '#if($shiro.hasPermission("qy:waybill:edit"))';
html += '<li><a onclick="printerSfSdk(' + c.orderId + ')" class="btn green">打印物流单</a></li>';
html += '<li><a onclick="printSheets(' + c.orderId + ')" class="btn green">打印随行单</a></li>';
html += '</ul>';
html += '<a onclick="printerSfSdk(' + c.orderId + ')" class="btn green">打印物流单</a>';
html += '<a onclick="printSheets(' + c.orderId + ')" class="btn green">打印随行单</a>';
html += '#end';
return html;
}
......
......@@ -222,7 +222,7 @@
od.drugs_name drugsName,
od.drugs_code drugsCode,
od.price,
AES_DECRYPT(f.nickname, 'aideakey') nickName,
f.nickname nickName,
cs.consult_id consultSheetCode,
qyu.name storageManageName,
t.route_des routeDes,
......@@ -276,7 +276,7 @@
od.drugs_name drugsName,
od.drugs_code drugsCode,
od.price,
AES_DECRYPT(f.nickname, 'aideakey') nickName,
f.nickname nickName,
cs.consult_id consultSheetCode,
CASE WHEN t.storage_manage = '1' THEN 'admin' ELSE qyu.name END storageManageName,
t.route_des routeDes,
......@@ -341,7 +341,7 @@
od.drugs_name drugsName,
od.drugs_code drugsCode,
od.price,
AES_DECRYPT(f.nickname, 'aideakey') nickName,
f.nickname nickName,
cs.consult_id consultSheetCode,
qyu.name storageManageName,
t.route_des routeDes,
......
......@@ -12,7 +12,7 @@ CONSULT_SHEET_AUDIT_REFUSE_TEMPLATE_MSG=qJNaTk1KaSCha1LowafhVWS6y4rNBI5JxKP5Af9C
#\u54A8\u8BE2\u5355\u5BA1\u6838\u5931\u8D25\u6A21\u677F\u6D88\u606F
CONSULT_SHEET_AUDIT_FAILED_TEMPLATE_MSG=77tLdRPQx1m8Gg0-t9HCGVOlka0G4ocFPdq8D5UkHwk
#\u75C5\u8F7D\u68C0\u6D4B\u7ED3\u679C\u901A\u77E5\u6A21\u677F\u6D88\u606F
CHECK_RESULT_TEMPLATE_MSG=5Fy77DKlvulE4L2vxsQfhOsJuRqQzIoI-LSmDYWCJt0
CHECK_RESULT_TEMPLATE_MSG=EFXXW0EuaryPpK0jYPhZxYQIA8BaHfGtY1MoVz_n6T0
#\u75C5\u8F7D\u68C0\u6D4B\u5238\u751F\u6548\u63D0\u9192
CHECK_COUPON_TAKE_EFFECT_REMIND_TEMPLATE_MSG=
......@@ -83,7 +83,7 @@ jwt.duration=86400000
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u03AAtrue
security.secure=false
#\u662F\u5426\u96C6\u7FA4 master\u4E3Atrue
quartz.isCluster=true
quartz.isCluster=false
#\u987A\u4E30\u7269\u6D41\u914D\u7F6E\u4FE1\u606F\u53C2\u6570
#\u987A\u4E30\u5BA2\u6237\u7F16\u7801
......
table.DTFC_Cloned tr {
background-color: white;
margin-bottom: 0;
}
div.DTFC_LeftHeadWrapper table,
div.DTFC_RightHeadWrapper table {
border-bottom: none !important;
margin-bottom: 0 !important;
background-color: white;
}
div.DTFC_LeftBodyWrapper table,
div.DTFC_RightBodyWrapper table {
border-top: none;
margin: 0 !important;
z-index: 2;
}
div.DTFC_LeftBodyWrapper table thead .sorting:before, div.DTFC_LeftBodyWrapper table thead .sorting:after,
div.DTFC_LeftBodyWrapper table thead .sorting_asc:before,
div.DTFC_LeftBodyWrapper table thead .sorting_asc:after,
div.DTFC_LeftBodyWrapper table thead .sorting_desc:before,
div.DTFC_LeftBodyWrapper table thead .sorting_desc:after,
div.DTFC_LeftBodyWrapper table thead .sorting:before,
div.DTFC_LeftBodyWrapper table thead .sorting:after,
div.DTFC_LeftBodyWrapper table thead .sorting_asc:before,
div.DTFC_LeftBodyWrapper table thead .sorting_asc:after,
div.DTFC_LeftBodyWrapper table thead .sorting_desc:before,
div.DTFC_LeftBodyWrapper table thead .sorting_desc:after,
div.DTFC_RightBodyWrapper table thead .sorting:before,
div.DTFC_RightBodyWrapper table thead .sorting:after,
div.DTFC_RightBodyWrapper table thead .sorting_asc:before,
div.DTFC_RightBodyWrapper table thead .sorting_asc:after,
div.DTFC_RightBodyWrapper table thead .sorting_desc:before,
div.DTFC_RightBodyWrapper table thead .sorting_desc:after,
div.DTFC_RightBodyWrapper table thead .sorting:before,
div.DTFC_RightBodyWrapper table thead .sorting:after,
div.DTFC_RightBodyWrapper table thead .sorting_asc:before,
div.DTFC_RightBodyWrapper table thead .sorting_asc:after,
div.DTFC_RightBodyWrapper table thead .sorting_desc:before,
div.DTFC_RightBodyWrapper table thead .sorting_desc:after {
display: none;
}
div.DTFC_LeftBodyWrapper table tbody tr:first-child th,
div.DTFC_LeftBodyWrapper table tbody tr:first-child td,
div.DTFC_RightBodyWrapper table tbody tr:first-child th,
div.DTFC_RightBodyWrapper table tbody tr:first-child td {
border-top: none;
}
div.DTFC_LeftFootWrapper table,
div.DTFC_RightFootWrapper table {
border-top: none;
margin-top: 0 !important;
background-color: white;
}
div.DTFC_Blocker {
background-color: white;
}
table.DTFC_Cloned tr{background-color:white;margin-bottom:0}div.DTFC_LeftHeadWrapper table,div.DTFC_RightHeadWrapper table{border-bottom:none !important;margin-bottom:0 !important;background-color:white}div.DTFC_LeftBodyWrapper table,div.DTFC_RightBodyWrapper table{border-top:none;margin:0 !important;z-index:2}div.DTFC_LeftBodyWrapper table thead .sorting:before,div.DTFC_LeftBodyWrapper table thead .sorting:after,div.DTFC_LeftBodyWrapper table thead .sorting_asc:before,div.DTFC_LeftBodyWrapper table thead .sorting_asc:after,div.DTFC_LeftBodyWrapper table thead .sorting_desc:before,div.DTFC_LeftBodyWrapper table thead .sorting_desc:after,div.DTFC_LeftBodyWrapper table thead .sorting:before,div.DTFC_LeftBodyWrapper table thead .sorting:after,div.DTFC_LeftBodyWrapper table thead .sorting_asc:before,div.DTFC_LeftBodyWrapper table thead .sorting_asc:after,div.DTFC_LeftBodyWrapper table thead .sorting_desc:before,div.DTFC_LeftBodyWrapper table thead .sorting_desc:after,div.DTFC_RightBodyWrapper table thead .sorting:before,div.DTFC_RightBodyWrapper table thead .sorting:after,div.DTFC_RightBodyWrapper table thead .sorting_asc:before,div.DTFC_RightBodyWrapper table thead .sorting_asc:after,div.DTFC_RightBodyWrapper table thead .sorting_desc:before,div.DTFC_RightBodyWrapper table thead .sorting_desc:after,div.DTFC_RightBodyWrapper table thead .sorting:before,div.DTFC_RightBodyWrapper table thead .sorting:after,div.DTFC_RightBodyWrapper table thead .sorting_asc:before,div.DTFC_RightBodyWrapper table thead .sorting_asc:after,div.DTFC_RightBodyWrapper table thead .sorting_desc:before,div.DTFC_RightBodyWrapper table thead .sorting_desc:after{display:none}div.DTFC_LeftBodyWrapper table tbody tr:first-child th,div.DTFC_LeftBodyWrapper table tbody tr:first-child td,div.DTFC_RightBodyWrapper table tbody tr:first-child th,div.DTFC_RightBodyWrapper table tbody tr:first-child td{border-top:none}div.DTFC_LeftFootWrapper table,div.DTFC_RightFootWrapper table{border-top:none;margin-top:0 !important;background-color:white}div.DTFC_Blocker{background-color:white}
table.DTFC_Cloned tr {
background-color: white;
margin-bottom: 0;
}
div.DTFC_LeftHeadWrapper table,
div.DTFC_RightHeadWrapper table {
border-bottom: none !important;
margin-bottom: 0 !important;
background-color: white;
}
div.DTFC_LeftBodyWrapper table,
div.DTFC_RightBodyWrapper table {
border-top: none;
margin: 0 !important;
z-index: 2;
}
div.DTFC_LeftBodyWrapper table thead .sorting:before, div.DTFC_LeftBodyWrapper table thead .sorting:after,
div.DTFC_LeftBodyWrapper table thead .sorting_asc:before,
div.DTFC_LeftBodyWrapper table thead .sorting_asc:after,
div.DTFC_LeftBodyWrapper table thead .sorting_desc:before,
div.DTFC_LeftBodyWrapper table thead .sorting_desc:after,
div.DTFC_LeftBodyWrapper table thead .sorting:before,
div.DTFC_LeftBodyWrapper table thead .sorting:after,
div.DTFC_LeftBodyWrapper table thead .sorting_asc:before,
div.DTFC_LeftBodyWrapper table thead .sorting_asc:after,
div.DTFC_LeftBodyWrapper table thead .sorting_desc:before,
div.DTFC_LeftBodyWrapper table thead .sorting_desc:after,
div.DTFC_RightBodyWrapper table thead .sorting:before,
div.DTFC_RightBodyWrapper table thead .sorting:after,
div.DTFC_RightBodyWrapper table thead .sorting_asc:before,
div.DTFC_RightBodyWrapper table thead .sorting_asc:after,
div.DTFC_RightBodyWrapper table thead .sorting_desc:before,
div.DTFC_RightBodyWrapper table thead .sorting_desc:after,
div.DTFC_RightBodyWrapper table thead .sorting:before,
div.DTFC_RightBodyWrapper table thead .sorting:after,
div.DTFC_RightBodyWrapper table thead .sorting_asc:before,
div.DTFC_RightBodyWrapper table thead .sorting_asc:after,
div.DTFC_RightBodyWrapper table thead .sorting_desc:before,
div.DTFC_RightBodyWrapper table thead .sorting_desc:after {
display: none;
}
div.DTFC_LeftBodyWrapper table tbody tr:first-child th,
div.DTFC_LeftBodyWrapper table tbody tr:first-child td,
div.DTFC_RightBodyWrapper table tbody tr:first-child th,
div.DTFC_RightBodyWrapper table tbody tr:first-child td {
border-top: none;
}
div.DTFC_LeftFootWrapper table,
div.DTFC_RightFootWrapper table {
border-top: none;
margin-top: 0 !important;
background-color: white;
}
div.DTFC_Blocker {
background-color: white;
}
table.dataTable.table-striped.DTFC_Cloned tbody {
background-color: white;
}
table.DTFC_Cloned tr{background-color:white;margin-bottom:0}div.DTFC_LeftHeadWrapper table,div.DTFC_RightHeadWrapper table{border-bottom:none !important;margin-bottom:0 !important;background-color:white}div.DTFC_LeftBodyWrapper table,div.DTFC_RightBodyWrapper table{border-top:none;margin:0 !important;z-index:2}div.DTFC_LeftBodyWrapper table thead .sorting:before,div.DTFC_LeftBodyWrapper table thead .sorting:after,div.DTFC_LeftBodyWrapper table thead .sorting_asc:before,div.DTFC_LeftBodyWrapper table thead .sorting_asc:after,div.DTFC_LeftBodyWrapper table thead .sorting_desc:before,div.DTFC_LeftBodyWrapper table thead .sorting_desc:after,div.DTFC_LeftBodyWrapper table thead .sorting:before,div.DTFC_LeftBodyWrapper table thead .sorting:after,div.DTFC_LeftBodyWrapper table thead .sorting_asc:before,div.DTFC_LeftBodyWrapper table thead .sorting_asc:after,div.DTFC_LeftBodyWrapper table thead .sorting_desc:before,div.DTFC_LeftBodyWrapper table thead .sorting_desc:after,div.DTFC_RightBodyWrapper table thead .sorting:before,div.DTFC_RightBodyWrapper table thead .sorting:after,div.DTFC_RightBodyWrapper table thead .sorting_asc:before,div.DTFC_RightBodyWrapper table thead .sorting_asc:after,div.DTFC_RightBodyWrapper table thead .sorting_desc:before,div.DTFC_RightBodyWrapper table thead .sorting_desc:after,div.DTFC_RightBodyWrapper table thead .sorting:before,div.DTFC_RightBodyWrapper table thead .sorting:after,div.DTFC_RightBodyWrapper table thead .sorting_asc:before,div.DTFC_RightBodyWrapper table thead .sorting_asc:after,div.DTFC_RightBodyWrapper table thead .sorting_desc:before,div.DTFC_RightBodyWrapper table thead .sorting_desc:after{display:none}div.DTFC_LeftBodyWrapper table tbody tr:first-child th,div.DTFC_LeftBodyWrapper table tbody tr:first-child td,div.DTFC_RightBodyWrapper table tbody tr:first-child th,div.DTFC_RightBodyWrapper table tbody tr:first-child td{border-top:none}div.DTFC_LeftFootWrapper table,div.DTFC_RightFootWrapper table{border-top:none;margin-top:0 !important;background-color:white}div.DTFC_Blocker{background-color:white}table.dataTable.table-striped.DTFC_Cloned tbody{background-color:white}
table.DTFC_Cloned thead,
table.DTFC_Cloned tfoot {
background-color: white;
}
div.DTFC_Blocker {
background-color: white;
}
div.DTFC_LeftWrapper table.dataTable,
div.DTFC_RightWrapper table.dataTable {
margin-bottom: 0;
z-index: 2;
}
div.DTFC_LeftWrapper table.dataTable.no-footer,
div.DTFC_RightWrapper table.dataTable.no-footer {
border-bottom: none;
}
table.dataTable.display tbody tr.DTFC_NoData {
background-color: transparent;
}
table.DTFC_Cloned thead,table.DTFC_Cloned tfoot{background-color:white}div.DTFC_Blocker{background-color:white}div.DTFC_LeftWrapper table.dataTable,div.DTFC_RightWrapper table.dataTable{margin-bottom:0;z-index:2}div.DTFC_LeftWrapper table.dataTable.no-footer,div.DTFC_RightWrapper table.dataTable.no-footer{border-bottom:none}table.dataTable.display tbody tr.DTFC_NoData{background-color:transparent}
div.DTFC_LeftHeadWrapper table,
div.DTFC_LeftBodyWrapper table,
div.DTFC_LeftFootWrapper table {
border-right-width: 0;
}
div.DTFC_RightHeadWrapper table,
div.DTFC_RightBodyWrapper table,
div.DTFC_RightFootWrapper table {
border-left-width: 0;
}
div.DTFC_LeftHeadWrapper table,
div.DTFC_RightHeadWrapper table {
margin-bottom: 0 !important;
}
div.DTFC_LeftBodyWrapper table,
div.DTFC_RightBodyWrapper table {
border-top: none;
margin: 0 !important;
}
div.DTFC_LeftFootWrapper table,
div.DTFC_RightFootWrapper table {
margin-top: 0 !important;
z-index: 2;
}
div.DTFC_Blocker {
background-color: white;
}
div.DTFC_LeftHeadWrapper table,div.DTFC_LeftBodyWrapper table,div.DTFC_LeftFootWrapper table{border-right-width:0}div.DTFC_RightHeadWrapper table,div.DTFC_RightBodyWrapper table,div.DTFC_RightFootWrapper table{border-left-width:0}div.DTFC_LeftHeadWrapper table,div.DTFC_RightHeadWrapper table{margin-bottom:0 !important}div.DTFC_LeftBodyWrapper table,div.DTFC_RightBodyWrapper table{border-top:none;margin:0 !important}div.DTFC_LeftFootWrapper table,div.DTFC_RightFootWrapper table{margin-top:0 !important;z-index:2}div.DTFC_Blocker{background-color:white}
div.DTFC_LeftWrapper table.dataTable,
div.DTFC_RightWrapper table.dataTable {
z-index: 2;
}
div.DTFC_LeftWrapper table.dataTable.no-footer,
div.DTFC_RightWrapper table.dataTable.no-footer {
border-bottom: none;
}
div.DTFC_Blocker {
background-color: white;
}
div.DTFC_LeftWrapper table.dataTable,div.DTFC_RightWrapper table.dataTable{z-index:2}div.DTFC_LeftWrapper table.dataTable.no-footer,div.DTFC_RightWrapper table.dataTable.no-footer{border-bottom:none}div.DTFC_Blocker{background-color:white}
div.DTFC_LeftWrapper table.ui.table.dataTable {
border-right: none;
}
div.DTFC_RightWrapper table.ui.table.dataTable {
border-left: none;
}
div.DTFC_Blocker {
background-color: white;
}
div.DTFC_LeftWrapper table.dataTable,
div.DTFC_RightWrapper table.dataTable {
z-index: 2;
}
div.DTFC_LeftHeadWrapper table.ui.table.dataTable,
div.DTFC_RightHeadWrapper table.ui.table.dataTable {
border-bottom: none;
}
div.DTFC_LeftBodyWrapper table.ui.table.dataTable,
div.DTFC_RightBodyWrapper table.ui.table.dataTable {
border-top: none;
}
div.DTFC_LeftBodyWrapper table.ui.table.dataTable thead .sorting:after,
div.DTFC_LeftBodyWrapper table.ui.table.dataTable thead .sorting_asc:after,
div.DTFC_LeftBodyWrapper table.ui.table.dataTable thead .sorting_desc:after,
div.DTFC_LeftBodyWrapper table.ui.table.dataTable thead .sorting:after,
div.DTFC_LeftBodyWrapper table.ui.table.dataTable thead .sorting_asc:after,
div.DTFC_LeftBodyWrapper table.ui.table.dataTable thead .sorting_desc:after,
div.DTFC_RightBodyWrapper table.ui.table.dataTable thead .sorting:after,
div.DTFC_RightBodyWrapper table.ui.table.dataTable thead .sorting_asc:after,
div.DTFC_RightBodyWrapper table.ui.table.dataTable thead .sorting_desc:after,
div.DTFC_RightBodyWrapper table.ui.table.dataTable thead .sorting:after,
div.DTFC_RightBodyWrapper table.ui.table.dataTable thead .sorting_asc:after,
div.DTFC_RightBodyWrapper table.ui.table.dataTable thead .sorting_desc:after {
display: none;
}
div.DTFC_LeftWrapper table.ui.table.dataTable{border-right:none}div.DTFC_RightWrapper table.ui.table.dataTable{border-left:none}div.DTFC_Blocker{background-color:white}div.DTFC_LeftWrapper table.dataTable,div.DTFC_RightWrapper table.dataTable{z-index:2}div.DTFC_LeftHeadWrapper table.ui.table.dataTable,div.DTFC_RightHeadWrapper table.ui.table.dataTable{border-bottom:none}div.DTFC_LeftBodyWrapper table.ui.table.dataTable,div.DTFC_RightBodyWrapper table.ui.table.dataTable{border-top:none}div.DTFC_LeftBodyWrapper table.ui.table.dataTable thead .sorting:after,div.DTFC_LeftBodyWrapper table.ui.table.dataTable thead .sorting_asc:after,div.DTFC_LeftBodyWrapper table.ui.table.dataTable thead .sorting_desc:after,div.DTFC_LeftBodyWrapper table.ui.table.dataTable thead .sorting:after,div.DTFC_LeftBodyWrapper table.ui.table.dataTable thead .sorting_asc:after,div.DTFC_LeftBodyWrapper table.ui.table.dataTable thead .sorting_desc:after,div.DTFC_RightBodyWrapper table.ui.table.dataTable thead .sorting:after,div.DTFC_RightBodyWrapper table.ui.table.dataTable thead .sorting_asc:after,div.DTFC_RightBodyWrapper table.ui.table.dataTable thead .sorting_desc:after,div.DTFC_RightBodyWrapper table.ui.table.dataTable thead .sorting:after,div.DTFC_RightBodyWrapper table.ui.table.dataTable thead .sorting_asc:after,div.DTFC_RightBodyWrapper table.ui.table.dataTable thead .sorting_desc:after{display:none}
/*! FixedColumns 3.3.2
* ©2010-2020 SpryMedia Ltd - datatables.net/license
*/
/**
* @summary FixedColumns
* @description Freeze columns in place on a scrolling DataTable
* @version 3.3.2
* @file dataTables.fixedColumns.js
* @author SpryMedia Ltd (www.sprymedia.co.uk)
* @contact www.sprymedia.co.uk/contact
* @copyright Copyright 2010-2020 SpryMedia Ltd.
*
* This source file is free software, available under the following license:
* MIT license - http://datatables.net/license/mit
*
* This source file is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
*
* For details please refer to: http://www.datatables.net
*/
(function( factory ){
if ( typeof define === 'function' && define.amd ) {
// AMD
define( ['jquery', 'datatables.net'], function ( $ ) {
return factory( $, window, document );
} );
}
else if ( typeof exports === 'object' ) {
// CommonJS
module.exports = function (root, $) {
if ( ! root ) {
root = window;
}
if ( ! $ || ! $.fn.dataTable ) {
$ = require('datatables.net')(root, $).$;
}
return factory( $, root, root.document );
};
}
else {
// Browser
factory( jQuery, window, document );
}
}(function( $, window, document, undefined ) {
'use strict';
var DataTable = $.fn.dataTable;
var _firefoxScroll;
/**
* When making use of DataTables' x-axis scrolling feature, you may wish to
* fix the left most column in place. This plug-in for DataTables provides
* exactly this option (note for non-scrolling tables, please use the
* FixedHeader plug-in, which can fix headers and footers). Key
* features include:
*
* * Freezes the left or right most columns to the side of the table
* * Option to freeze two or more columns
* * Full integration with DataTables' scrolling options
* * Speed - FixedColumns is fast in its operation
*
* @class
* @constructor
* @global
* @param {object} dt DataTables instance. With DataTables 1.10 this can also
* be a jQuery collection, a jQuery selector, DataTables API instance or
* settings object.
* @param {object} [init={}] Configuration object for FixedColumns. Options are
* defined by {@link FixedColumns.defaults}
*
* @requires jQuery 1.7+
* @requires DataTables 1.8.0+
*
* @example
* var table = $('#example').dataTable( {
* "scrollX": "100%"
* } );
* new $.fn.dataTable.fixedColumns( table );
*/
var FixedColumns = function ( dt, init ) {
var that = this;
/* Sanity check - you just know it will happen */
if ( ! ( this instanceof FixedColumns ) ) {
alert( "FixedColumns warning: FixedColumns must be initialised with the 'new' keyword." );
return;
}
if ( init === undefined || init === true ) {
init = {};
}
// Use the DataTables Hungarian notation mapping method, if it exists to
// provide forwards compatibility for camel case variables
var camelToHungarian = $.fn.dataTable.camelToHungarian;
if ( camelToHungarian ) {
camelToHungarian( FixedColumns.defaults, FixedColumns.defaults, true );
camelToHungarian( FixedColumns.defaults, init );
}
// v1.10 allows the settings object to be got form a number of sources
var dtSettings = new $.fn.dataTable.Api( dt ).settings()[0];
/**
* Settings object which contains customisable information for FixedColumns instance
* @namespace
* @extends FixedColumns.defaults
* @private
*/
this.s = {
/**
* DataTables settings objects
* @type object
* @default Obtained from DataTables instance
*/
"dt": dtSettings,
/**
* Number of columns in the DataTable - stored for quick access
* @type int
* @default Obtained from DataTables instance
*/
"iTableColumns": dtSettings.aoColumns.length,
/**
* Original outer widths of the columns as rendered by DataTables - used to calculate
* the FixedColumns grid bounding box
* @type array.<int>
* @default []
*/
"aiOuterWidths": [],
/**
* Original inner widths of the columns as rendered by DataTables - used to apply widths
* to the columns
* @type array.<int>
* @default []
*/
"aiInnerWidths": [],
/**
* Is the document layout right-to-left
* @type boolean
*/
rtl: $(dtSettings.nTable).css('direction') === 'rtl'
};
/**
* DOM elements used by the class instance
* @namespace
* @private
*
*/
this.dom = {
/**
* DataTables scrolling element
* @type node
* @default null
*/
"scroller": null,
/**
* DataTables header table
* @type node
* @default null
*/
"header": null,
/**
* DataTables body table
* @type node
* @default null
*/
"body": null,
/**
* DataTables footer table
* @type node
* @default null
*/
"footer": null,
/**
* Display grid elements
* @namespace
*/
"grid": {
/**
* Grid wrapper. This is the container element for the 3x3 grid
* @type node
* @default null
*/
"wrapper": null,
/**
* DataTables scrolling element. This element is the DataTables
* component in the display grid (making up the main table - i.e.
* not the fixed columns).
* @type node
* @default null
*/
"dt": null,
/**
* Left fixed column grid components
* @namespace
*/
"left": {
"wrapper": null,
"head": null,
"body": null,
"foot": null
},
/**
* Right fixed column grid components
* @namespace
*/
"right": {
"wrapper": null,
"head": null,
"body": null,
"foot": null
}
},
/**
* Cloned table nodes
* @namespace
*/
"clone": {
/**
* Left column cloned table nodes
* @namespace
*/
"left": {
/**
* Cloned header table
* @type node
* @default null
*/
"header": null,
/**
* Cloned body table
* @type node
* @default null
*/
"body": null,
/**
* Cloned footer table
* @type node
* @default null
*/
"footer": null
},
/**
* Right column cloned table nodes
* @namespace
*/
"right": {
/**
* Cloned header table
* @type node
* @default null
*/
"header": null,
/**
* Cloned body table
* @type node
* @default null
*/
"body": null,
/**
* Cloned footer table
* @type node
* @default null
*/
"footer": null
}
}
};
if ( dtSettings._oFixedColumns ) {
throw 'FixedColumns already initialised on this table';
}
/* Attach the instance to the DataTables instance so it can be accessed easily */
dtSettings._oFixedColumns = this;
/* Let's do it */
if ( ! dtSettings._bInitComplete )
{
dtSettings.oApi._fnCallbackReg( dtSettings, 'aoInitComplete', function () {
that._fnConstruct( init );
}, 'FixedColumns' );
}
else
{
this._fnConstruct( init );
}
};
$.extend( FixedColumns.prototype , {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Public methods
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* Update the fixed columns - including headers and footers. Note that FixedColumns will
* automatically update the display whenever the host DataTable redraws.
* @returns {void}
* @example
* var table = $('#example').dataTable( {
* "scrollX": "100%"
* } );
* var fc = new $.fn.dataTable.fixedColumns( table );
*
* // at some later point when the table has been manipulated....
* fc.fnUpdate();
*/
"fnUpdate": function ()
{
this._fnDraw( true );
},
/**
* Recalculate the resizes of the 3x3 grid that FixedColumns uses for display of the table.
* This is useful if you update the width of the table container. Note that FixedColumns will
* perform this function automatically when the window.resize event is fired.
* @returns {void}
* @example
* var table = $('#example').dataTable( {
* "scrollX": "100%"
* } );
* var fc = new $.fn.dataTable.fixedColumns( table );
*
* // Resize the table container and then have FixedColumns adjust its layout....
* $('#content').width( 1200 );
* fc.fnRedrawLayout();
*/
"fnRedrawLayout": function ()
{
this._fnColCalc();
this._fnGridLayout();
this.fnUpdate();
},
/**
* Mark a row such that it's height should be recalculated when using 'semiauto' row
* height matching. This function will have no effect when 'none' or 'auto' row height
* matching is used.
* @param {Node} nTr TR element that should have it's height recalculated
* @returns {void}
* @example
* var table = $('#example').dataTable( {
* "scrollX": "100%"
* } );
* var fc = new $.fn.dataTable.fixedColumns( table );
*
* // manipulate the table - mark the row as needing an update then update the table
* // this allows the redraw performed by DataTables fnUpdate to recalculate the row
* // height
* fc.fnRecalculateHeight();
* table.fnUpdate( $('#example tbody tr:eq(0)')[0], ["insert date", 1, 2, 3 ... ]);
*/
"fnRecalculateHeight": function ( nTr )
{
delete nTr._DTTC_iHeight;
nTr.style.height = 'auto';
},
/**
* Set the height of a given row - provides cross browser compatibility
* @param {Node} nTarget TR element that should have it's height recalculated
* @param {int} iHeight Height in pixels to set
* @returns {void}
* @example
* var table = $('#example').dataTable( {
* "scrollX": "100%"
* } );
* var fc = new $.fn.dataTable.fixedColumns( table );
*
* // You may want to do this after manipulating a row in the fixed column
* fc.fnSetRowHeight( $('#example tbody tr:eq(0)')[0], 50 );
*/
"fnSetRowHeight": function ( nTarget, iHeight )
{
nTarget.style.height = iHeight+"px";
},
/**
* Get data index information about a row or cell in the table body.
* This function is functionally identical to fnGetPosition in DataTables,
* taking the same parameter (TH, TD or TR node) and returning exactly the
* the same information (data index information). THe difference between
* the two is that this method takes into account the fixed columns in the
* table, so you can pass in nodes from the master table, or the cloned
* tables and get the index position for the data in the main table.
* @param {node} node TR, TH or TD element to get the information about
* @returns {int} If nNode is given as a TR, then a single index is
* returned, or if given as a cell, an array of [row index, column index
* (visible), column index (all)] is given.
*/
"fnGetPosition": function ( node )
{
var idx;
var inst = this.s.dt.oInstance;
if ( ! $(node).parents('.DTFC_Cloned').length )
{
// Not in a cloned table
return inst.fnGetPosition( node );
}
else
{
// Its in the cloned table, so need to look up position
if ( node.nodeName.toLowerCase() === 'tr' ) {
idx = $(node).index();
return inst.fnGetPosition( $('tr', this.s.dt.nTBody)[ idx ] );
}
else
{
var colIdx = $(node).index();
idx = $(node.parentNode).index();
var row = inst.fnGetPosition( $('tr', this.s.dt.nTBody)[ idx ] );
return [
row,
colIdx,
inst.oApi._fnVisibleToColumnIndex( this.s.dt, colIdx )
];
}
}
},
fnToFixedNode: function ( rowIdx, colIdx )
{
var found;
if ( colIdx < this.s.iLeftColumns ) {
found = $(this.dom.clone.left.body).find('[data-dt-row='+rowIdx+'][data-dt-column='+colIdx+']');
}
else if ( colIdx >= this.s.iRightColumns ) {
found = $(this.dom.clone.right.body).find('[data-dt-row='+rowIdx+'][data-dt-column='+colIdx+']');
}
if ( found && found.length ) {
return found[0];
}
// Fallback - non-fixed node
var table = new $.fn.dataTable.Api(this.s.dt);
return table.cell(rowIdx, colIdx).node();
},
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Private methods (they are of course public in JS, but recommended as private)
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* Initialisation for FixedColumns
* @param {Object} oInit User settings for initialisation
* @returns {void}
* @private
*/
"_fnConstruct": function ( oInit )
{
var i, iLen, iWidth,
that = this;
/* Sanity checking */
if ( typeof this.s.dt.oInstance.fnVersionCheck != 'function' ||
this.s.dt.oInstance.fnVersionCheck( '1.8.0' ) !== true )
{
alert( "FixedColumns "+FixedColumns.VERSION+" required DataTables 1.8.0 or later. "+
"Please upgrade your DataTables installation" );
return;
}
if ( this.s.dt.oScroll.sX === "" )
{
this.s.dt.oInstance.oApi._fnLog( this.s.dt, 1, "FixedColumns is not needed (no "+
"x-scrolling in DataTables enabled), so no action will be taken. Use 'FixedHeader' for "+
"column fixing when scrolling is not enabled" );
return;
}
/* Apply the settings from the user / defaults */
this.s = $.extend( true, this.s, FixedColumns.defaults, oInit );
/* Set up the DOM as we need it and cache nodes */
var classes = this.s.dt.oClasses;
this.dom.grid.dt = $(this.s.dt.nTable).parents('div.'+classes.sScrollWrapper)[0];
this.dom.scroller = $('div.'+classes.sScrollBody, this.dom.grid.dt )[0];
/* Set up the DOM that we want for the fixed column layout grid */
this._fnColCalc();
this._fnGridSetup();
/* Event handlers */
var mouseController;
var mouseDown = false;
// When the mouse is down (drag scroll) the mouse controller cannot
// change, as the browser keeps the original element as the scrolling one
$(this.s.dt.nTableWrapper).on( 'mousedown.DTFC', function (e) {
if ( e.button === 0 ) {
mouseDown = true;
$(document).one( 'mouseup', function () {
mouseDown = false;
} );
}
} );
// When the body is scrolled - scroll the left and right columns
$(this.dom.scroller)
.on( 'mouseover.DTFC touchstart.DTFC', function () {
if ( ! mouseDown ) {
mouseController = 'main';
}
} )
.on( 'scroll.DTFC', function (e) {
if ( ! mouseController && e.originalEvent ) {
mouseController = 'main';
}
if ( mouseController === 'main' || mouseController === 'key' ) {
if ( that.s.iLeftColumns > 0 ) {
that.dom.grid.left.liner.scrollTop = that.dom.scroller.scrollTop;
}
if ( that.s.iRightColumns > 0 ) {
that.dom.grid.right.liner.scrollTop = that.dom.scroller.scrollTop;
}
}
} );
var wheelType = 'onwheel' in document.createElement('div') ?
'wheel.DTFC' :
'mousewheel.DTFC';
if ( that.s.iLeftColumns > 0 ) {
// When scrolling the left column, scroll the body and right column
$(that.dom.grid.left.liner)
.on( 'mouseover.DTFC touchstart.DTFC', function () {
if ( ! mouseDown && mouseController !== 'key' ) {
mouseController = 'left';
}
} )
.on( 'scroll.DTFC', function ( e ) {
if ( ! mouseController && e.originalEvent ) {
mouseController = 'left';
}
if ( mouseController === 'left' ) {
that.dom.scroller.scrollTop = that.dom.grid.left.liner.scrollTop;
if ( that.s.iRightColumns > 0 ) {
that.dom.grid.right.liner.scrollTop = that.dom.grid.left.liner.scrollTop;
}
}
} )
.on( wheelType, function(e) {
mouseController = 'left';
// Pass horizontal scrolling through
var xDelta = e.type === 'wheel' ?
-e.originalEvent.deltaX :
e.originalEvent.wheelDeltaX;
that.dom.scroller.scrollLeft -= xDelta;
} );
// Header will not trigger scroll on left column, but might on `main` (sorting)
$(that.dom.grid.left.head).on( 'mouseover.DTFC touchstart.DTFC', function () {
mouseController = 'main';
});
}
if ( that.s.iRightColumns > 0 ) {
// When scrolling the right column, scroll the body and the left column
$(that.dom.grid.right.liner)
.on( 'mouseover.DTFC touchstart.DTFC', function () {
if ( ! mouseDown && mouseController !== 'key' ) {
mouseController = 'right';
}
} )
.on( 'scroll.DTFC', function ( e ) {
if ( ! mouseController && e.originalEvent ) {
mouseController = 'right';
}
if ( mouseController === 'right' ) {
that.dom.scroller.scrollTop = that.dom.grid.right.liner.scrollTop;
if ( that.s.iLeftColumns > 0 ) {
that.dom.grid.left.liner.scrollTop = that.dom.grid.right.liner.scrollTop;
}
}
} )
.on( wheelType, function(e) {
mouseController = 'right';
// Pass horizontal scrolling through
var xDelta = e.type === 'wheel' ?
-e.originalEvent.deltaX :
e.originalEvent.wheelDeltaX;
that.dom.scroller.scrollLeft -= xDelta;
} );
$(that.dom.grid.right.head).on( 'mouseover.DTFC touchstart.DTFC', function () {
mouseController = 'main';
});
}
$(window).on( 'resize.DTFC', function () {
that._fnGridLayout.call( that );
} );
var bFirstDraw = true;
var jqTable = $(this.s.dt.nTable);
jqTable
.on( 'draw.dt.DTFC', function () {
that._fnColCalc();
that._fnDraw.call( that, bFirstDraw );
bFirstDraw = false;
} )
.on('key-focus.dt.DTFC', function () {
// KeyTable navigation needs to be main focused
mouseController = 'key';
})
.on( 'column-sizing.dt.DTFC', function () {
that._fnColCalc();
that._fnGridLayout( that );
} )
.on( 'column-visibility.dt.DTFC', function ( e, settings, column, vis, recalc ) {
if ( recalc === undefined || recalc ) {
that._fnColCalc();
that._fnGridLayout( that );
that._fnDraw( true );
}
} )
.on( 'select.dt.DTFC deselect.dt.DTFC', function ( e, dt, type, indexes ) {
if ( e.namespace === 'dt' ) {
that._fnDraw( false );
}
} )
.on( 'position.dts.dt.DTFC', function (e, tableTop) {
// Sync up with Scroller
if (that.dom.grid.left.body) {
$(that.dom.grid.left.body).find('table').eq(0).css('top', tableTop);
}
if (that.dom.grid.right.body) {
$(that.dom.grid.right.body).find('table').eq(0).css('top', tableTop);
}
} )
.on( 'destroy.dt.DTFC', function () {
jqTable.off( '.DTFC' );
$(that.dom.scroller).off( '.DTFC' );
$(window).off( '.DTFC' );
$(that.s.dt.nTableWrapper).off( '.DTFC' );
$(that.dom.grid.left.liner).off( '.DTFC '+wheelType );
$(that.dom.grid.left.wrapper).remove();
$(that.dom.grid.right.liner).off( '.DTFC '+wheelType );
$(that.dom.grid.right.wrapper).remove();
} );
/* Get things right to start with - note that due to adjusting the columns, there must be
* another redraw of the main table. It doesn't need to be a full redraw however.
*/
this._fnGridLayout();
this.s.dt.oInstance.fnDraw(false);
},
/**
* Calculate the column widths for the grid layout
* @returns {void}
* @private
*/
"_fnColCalc": function ()
{
var that = this;
var iLeftWidth = 0;
var iRightWidth = 0;
this.s.aiInnerWidths = [];
this.s.aiOuterWidths = [];
$.each( this.s.dt.aoColumns, function (i, col) {
var th = $(col.nTh);
var border;
if ( ! th.filter(':visible').length ) {
that.s.aiInnerWidths.push( 0 );
that.s.aiOuterWidths.push( 0 );
}
else
{
// Inner width is used to assign widths to cells
// Outer width is used to calculate the container
var iWidth = th.outerWidth();
// When working with the left most-cell, need to add on the
// table's border to the outerWidth, since we need to take
// account of it, but it isn't in any cell
if ( that.s.aiOuterWidths.length === 0 ) {
border = $(that.s.dt.nTable).css('border-left-width');
iWidth += typeof border === 'string' && border.indexOf('px') === -1 ?
1 :
parseInt( border, 10 );
}
// Likewise with the final column on the right
if ( that.s.aiOuterWidths.length === that.s.dt.aoColumns.length-1 ) {
border = $(that.s.dt.nTable).css('border-right-width');
iWidth += typeof border === 'string' && border.indexOf('px') === -1 ?
1 :
parseInt( border, 10 );
}
that.s.aiOuterWidths.push( iWidth );
that.s.aiInnerWidths.push( th.width() );
if ( i < that.s.iLeftColumns )
{
iLeftWidth += iWidth;
}
if ( that.s.iTableColumns-that.s.iRightColumns <= i )
{
iRightWidth += iWidth;
}
}
} );
this.s.iLeftWidth = iLeftWidth;
this.s.iRightWidth = iRightWidth;
},
/**
* Set up the DOM for the fixed column. The way the layout works is to create a 1x3 grid
* for the left column, the DataTable (for which we just reuse the scrolling element DataTable
* puts into the DOM) and the right column. In each of he two fixed column elements there is a
* grouping wrapper element and then a head, body and footer wrapper. In each of these we then
* place the cloned header, body or footer tables. This effectively gives as 3x3 grid structure.
* @returns {void}
* @private
*/
"_fnGridSetup": function ()
{
var that = this;
var oOverflow = this._fnDTOverflow();
var block;
this.dom.body = this.s.dt.nTable;
this.dom.header = this.s.dt.nTHead.parentNode;
this.dom.header.parentNode.parentNode.style.position = "relative";
var nSWrapper =
$('<div class="DTFC_ScrollWrapper" style="position:relative; clear:both;">'+
'<div class="DTFC_LeftWrapper" style="position:absolute; top:0; left:0;" aria-hidden="true">'+
'<div class="DTFC_LeftHeadWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div>'+
'<div class="DTFC_LeftBodyWrapper" style="position:relative; top:0; left:0; height:0; overflow:hidden;">'+
'<div class="DTFC_LeftBodyLiner" style="position:relative; top:0; left:0; overflow-y:scroll;"></div>'+
'</div>'+
'<div class="DTFC_LeftFootWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div>'+
'</div>'+
'<div class="DTFC_RightWrapper" style="position:absolute; top:0; right:0;" aria-hidden="true">'+
'<div class="DTFC_RightHeadWrapper" style="position:relative; top:0; left:0;">'+
'<div class="DTFC_RightHeadBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div>'+
'</div>'+
'<div class="DTFC_RightBodyWrapper" style="position:relative; top:0; left:0; height:0; overflow:hidden;">'+
'<div class="DTFC_RightBodyLiner" style="position:relative; top:0; left:0; overflow-y:scroll;"></div>'+
'</div>'+
'<div class="DTFC_RightFootWrapper" style="position:relative; top:0; left:0;">'+
'<div class="DTFC_RightFootBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div>'+
'</div>'+
'</div>'+
'</div>')[0];
var nLeft = nSWrapper.childNodes[0];
var nRight = nSWrapper.childNodes[1];
this.dom.grid.dt.parentNode.insertBefore( nSWrapper, this.dom.grid.dt );
nSWrapper.appendChild( this.dom.grid.dt );
this.dom.grid.wrapper = nSWrapper;
if ( this.s.iLeftColumns > 0 )
{
this.dom.grid.left.wrapper = nLeft;
this.dom.grid.left.head = nLeft.childNodes[0];
this.dom.grid.left.body = nLeft.childNodes[1];
this.dom.grid.left.liner = $('div.DTFC_LeftBodyLiner', nSWrapper)[0];
nSWrapper.appendChild( nLeft );
}
if ( this.s.iRightColumns > 0 )
{
this.dom.grid.right.wrapper = nRight;
this.dom.grid.right.head = nRight.childNodes[0];
this.dom.grid.right.body = nRight.childNodes[1];
this.dom.grid.right.liner = $('div.DTFC_RightBodyLiner', nSWrapper)[0];
nRight.style.right = oOverflow.bar+"px";
block = $('div.DTFC_RightHeadBlocker', nSWrapper)[0];
block.style.width = oOverflow.bar+"px";
block.style.right = -oOverflow.bar+"px";
this.dom.grid.right.headBlock = block;
block = $('div.DTFC_RightFootBlocker', nSWrapper)[0];
block.style.width = oOverflow.bar+"px";
block.style.right = -oOverflow.bar+"px";
this.dom.grid.right.footBlock = block;
nSWrapper.appendChild( nRight );
}
if ( this.s.dt.nTFoot )
{
this.dom.footer = this.s.dt.nTFoot.parentNode;
if ( this.s.iLeftColumns > 0 )
{
this.dom.grid.left.foot = nLeft.childNodes[2];
}
if ( this.s.iRightColumns > 0 )
{
this.dom.grid.right.foot = nRight.childNodes[2];
}
}
// RTL support - swap the position of the left and right columns (#48)
if ( this.s.rtl ) {
$('div.DTFC_RightHeadBlocker', nSWrapper).css( {
left: -oOverflow.bar+'px',
right: ''
} );
}
},
/**
* Style and position the grid used for the FixedColumns layout
* @returns {void}
* @private
*/
"_fnGridLayout": function ()
{
var that = this;
var oGrid = this.dom.grid;
var iWidth = $(oGrid.wrapper).width();
var iBodyHeight = this.s.dt.nTable.parentNode.offsetHeight;
var iFullHeight = this.s.dt.nTable.parentNode.parentNode.offsetHeight;
var oOverflow = this._fnDTOverflow();
var iLeftWidth = this.s.iLeftWidth;
var iRightWidth = this.s.iRightWidth;
var rtl = $(this.dom.body).css('direction') === 'rtl';
var wrapper;
var scrollbarAdjust = function ( node, width ) {
if ( ! oOverflow.bar ) {
// If there is no scrollbar (Macs) we need to hide the auto scrollbar
node.style.width = (width+20)+"px";
node.style.paddingRight = "20px";
node.style.boxSizing = "border-box";
}
else if ( that._firefoxScrollError() ) {
// See the above function for why this is required
if ( $(node).height() > 34 ) {
node.style.width = (width+oOverflow.bar)+"px";
}
}
else {
// Otherwise just overflow by the scrollbar
node.style.width = (width+oOverflow.bar)+"px";
}
};
// When x scrolling - don't paint the fixed columns over the x scrollbar
if ( oOverflow.x )
{
iBodyHeight -= oOverflow.bar;
}
oGrid.wrapper.style.height = iFullHeight+"px";
if ( this.s.iLeftColumns > 0 )
{
wrapper = oGrid.left.wrapper;
wrapper.style.width = iLeftWidth+'px';
wrapper.style.height = '1px';
// Swap the position of the left and right columns for rtl (#48)
// This is always up against the edge, scrollbar on the far side
if ( rtl ) {
wrapper.style.left = '';
wrapper.style.right = 0;
}
else {
wrapper.style.left = 0;
wrapper.style.right = '';
}
oGrid.left.body.style.height = iBodyHeight+"px";
if ( oGrid.left.foot ) {
oGrid.left.foot.style.top = (oOverflow.x ? oOverflow.bar : 0)+"px"; // shift footer for scrollbar
}
scrollbarAdjust( oGrid.left.liner, iLeftWidth );
oGrid.left.liner.style.height = iBodyHeight+"px";
oGrid.left.liner.style.maxHeight = iBodyHeight+"px";
}
if ( this.s.iRightColumns > 0 )
{
wrapper = oGrid.right.wrapper;
wrapper.style.width = iRightWidth+'px';
wrapper.style.height = '1px';
// Need to take account of the vertical scrollbar
if ( this.s.rtl ) {
wrapper.style.left = oOverflow.y ? oOverflow.bar+'px' : 0;
wrapper.style.right = '';
}
else {
wrapper.style.left = '';
wrapper.style.right = oOverflow.y ? oOverflow.bar+'px' : 0;
}
oGrid.right.body.style.height = iBodyHeight+"px";
if ( oGrid.right.foot ) {
oGrid.right.foot.style.top = (oOverflow.x ? oOverflow.bar : 0)+"px";
}
scrollbarAdjust( oGrid.right.liner, iRightWidth );
oGrid.right.liner.style.height = iBodyHeight+"px";
oGrid.right.liner.style.maxHeight = iBodyHeight+"px";
oGrid.right.headBlock.style.display = oOverflow.y ? 'block' : 'none';
oGrid.right.footBlock.style.display = oOverflow.y ? 'block' : 'none';
}
},
/**
* Get information about the DataTable's scrolling state - specifically if the table is scrolling
* on either the x or y axis, and also the scrollbar width.
* @returns {object} Information about the DataTables scrolling state with the properties:
* 'x', 'y' and 'bar'
* @private
*/
"_fnDTOverflow": function ()
{
var nTable = this.s.dt.nTable;
var nTableScrollBody = nTable.parentNode;
var out = {
"x": false,
"y": false,
"bar": this.s.dt.oScroll.iBarWidth
};
if ( nTable.offsetWidth > nTableScrollBody.clientWidth )
{
out.x = true;
}
if ( nTable.offsetHeight > nTableScrollBody.clientHeight )
{
out.y = true;
}
return out;
},
/**
* Clone and position the fixed columns
* @returns {void}
* @param {Boolean} bAll Indicate if the header and footer should be updated as well (true)
* @private
*/
"_fnDraw": function ( bAll )
{
this._fnGridLayout();
this._fnCloneLeft( bAll );
this._fnCloneRight( bAll );
$(this.dom.scroller).trigger('scroll');
/* Draw callback function */
if ( this.s.fnDrawCallback !== null )
{
this.s.fnDrawCallback.call( this, this.dom.clone.left, this.dom.clone.right );
}
/* Event triggering */
$(this).trigger( 'draw.dtfc', {
"leftClone": this.dom.clone.left,
"rightClone": this.dom.clone.right
} );
},
/**
* Clone the right columns
* @returns {void}
* @param {Boolean} bAll Indicate if the header and footer should be updated as well (true)
* @private
*/
"_fnCloneRight": function ( bAll )
{
if ( this.s.iRightColumns <= 0 ) {
return;
}
var that = this,
i, jq,
aiColumns = [];
for ( i=this.s.iTableColumns-this.s.iRightColumns ; i<this.s.iTableColumns ; i++ ) {
if ( this.s.dt.aoColumns[i].bVisible ) {
aiColumns.push( i );
}
}
this._fnClone( this.dom.clone.right, this.dom.grid.right, aiColumns, bAll );
},
/**
* Clone the left columns
* @returns {void}
* @param {Boolean} bAll Indicate if the header and footer should be updated as well (true)
* @private
*/
"_fnCloneLeft": function ( bAll )
{
if ( this.s.iLeftColumns <= 0 ) {
return;
}
var that = this,
i, jq,
aiColumns = [];
for ( i=0 ; i<this.s.iLeftColumns ; i++ ) {
if ( this.s.dt.aoColumns[i].bVisible ) {
aiColumns.push( i );
}
}
this._fnClone( this.dom.clone.left, this.dom.grid.left, aiColumns, bAll );
},
/**
* Make a copy of the layout object for a header or footer element from DataTables. Note that
* this method will clone the nodes in the layout object.
* @returns {Array} Copy of the layout array
* @param {Object} aoOriginal Layout array from DataTables (aoHeader or aoFooter)
* @param {Object} aiColumns Columns to copy
* @param {boolean} events Copy cell events or not
* @private
*/
"_fnCopyLayout": function ( aoOriginal, aiColumns, events )
{
var aReturn = [];
var aClones = [];
var aCloned = [];
for ( var i=0, iLen=aoOriginal.length ; i<iLen ; i++ )
{
var aRow = [];
aRow.nTr = $(aoOriginal[i].nTr).clone(events, false)[0];
for ( var j=0, jLen=this.s.iTableColumns ; j<jLen ; j++ )
{
if ( $.inArray( j, aiColumns ) === -1 )
{
continue;
}
var iCloned = $.inArray( aoOriginal[i][j].cell, aCloned );
if ( iCloned === -1 )
{
var nClone = $(aoOriginal[i][j].cell).clone(events, false)[0];
aClones.push( nClone );
aCloned.push( aoOriginal[i][j].cell );
aRow.push( {
"cell": nClone,
"unique": aoOriginal[i][j].unique
} );
}
else
{
aRow.push( {
"cell": aClones[ iCloned ],
"unique": aoOriginal[i][j].unique
} );
}
}
aReturn.push( aRow );
}
return aReturn;
},
/**
* Clone the DataTable nodes and place them in the DOM (sized correctly)
* @returns {void}
* @param {Object} oClone Object containing the header, footer and body cloned DOM elements
* @param {Object} oGrid Grid object containing the display grid elements for the cloned
* column (left or right)
* @param {Array} aiColumns Column indexes which should be operated on from the DataTable
* @param {Boolean} bAll Indicate if the header and footer should be updated as well (true)
* @private
*/
"_fnClone": function ( oClone, oGrid, aiColumns, bAll )
{
var that = this,
i, iLen, j, jLen, jq, nTarget, iColumn, nClone, iIndex, aoCloneLayout,
jqCloneThead, aoFixedHeader,
dt = this.s.dt;
/*
* Header
*/
if ( bAll )
{
$(oClone.header).remove();
oClone.header = $(this.dom.header).clone(true, false)[0];
oClone.header.className += " DTFC_Cloned";
oClone.header.style.width = "100%";
oGrid.head.appendChild( oClone.header );
/* Copy the DataTables layout cache for the header for our floating column */
aoCloneLayout = this._fnCopyLayout( dt.aoHeader, aiColumns, true );
jqCloneThead = $('>thead', oClone.header);
jqCloneThead.empty();
/* Add the created cloned TR elements to the table */
for ( i=0, iLen=aoCloneLayout.length ; i<iLen ; i++ )
{
jqCloneThead[0].appendChild( aoCloneLayout[i].nTr );
}
/* Use the handy _fnDrawHead function in DataTables to do the rowspan/colspan
* calculations for us
*/
dt.oApi._fnDrawHead( dt, aoCloneLayout, true );
}
else
{
/* To ensure that we copy cell classes exactly, regardless of colspan, multiple rows
* etc, we make a copy of the header from the DataTable again, but don't insert the
* cloned cells, just copy the classes across. To get the matching layout for the
* fixed component, we use the DataTables _fnDetectHeader method, allowing 1:1 mapping
*/
aoCloneLayout = this._fnCopyLayout( dt.aoHeader, aiColumns, false );
aoFixedHeader=[];
dt.oApi._fnDetectHeader( aoFixedHeader, $('>thead', oClone.header)[0] );
for ( i=0, iLen=aoCloneLayout.length ; i<iLen ; i++ )
{
for ( j=0, jLen=aoCloneLayout[i].length ; j<jLen ; j++ )
{
aoFixedHeader[i][j].cell.className = aoCloneLayout[i][j].cell.className;
// If jQuery UI theming is used we need to copy those elements as well
$('span.DataTables_sort_icon', aoFixedHeader[i][j].cell).each( function () {
this.className = $('span.DataTables_sort_icon', aoCloneLayout[i][j].cell)[0].className;
} );
}
}
}
this._fnEqualiseHeights( 'thead', this.dom.header, oClone.header );
/*
* Body
*/
if ( this.s.sHeightMatch == 'auto' )
{
/* Remove any heights which have been applied already and let the browser figure it out */
$('>tbody>tr', that.dom.body).css('height', 'auto');
}
if ( oClone.body !== null )
{
$(oClone.body).remove();
oClone.body = null;
}
oClone.body = $(this.dom.body).clone(true)[0];
oClone.body.className += " DTFC_Cloned";
oClone.body.style.paddingBottom = dt.oScroll.iBarWidth+"px";
oClone.body.style.marginBottom = (dt.oScroll.iBarWidth*2)+"px"; /* For IE */
if ( oClone.body.getAttribute('id') !== null )
{
oClone.body.removeAttribute('id');
}
$('>thead>tr', oClone.body).empty();
$('>tfoot', oClone.body).remove();
var nBody = $('tbody', oClone.body)[0];
$(nBody).empty();
if ( dt.aiDisplay.length > 0 )
{
/* Copy the DataTables' header elements to force the column width in exactly the
* same way that DataTables does it - have the header element, apply the width and
* colapse it down
*/
var nInnerThead = $('>thead>tr', oClone.body)[0];
for ( iIndex=0 ; iIndex<aiColumns.length ; iIndex++ )
{
iColumn = aiColumns[iIndex];
nClone = $(dt.aoColumns[iColumn].nTh).clone(true)[0];
nClone.innerHTML = "";
var oStyle = nClone.style;
oStyle.paddingTop = "0";
oStyle.paddingBottom = "0";
oStyle.borderTopWidth = "0";
oStyle.borderBottomWidth = "0";
oStyle.height = 0;
oStyle.width = that.s.aiInnerWidths[iColumn]+"px";
nInnerThead.appendChild( nClone );
}
/* Add in the tbody elements, cloning form the master table */
$('>tbody>tr', that.dom.body).each( function (z) {
var i = that.s.dt.oFeatures.bServerSide===false ?
that.s.dt.aiDisplay[ that.s.dt._iDisplayStart+z ] : z;
var aTds = that.s.dt.aoData[ i ].anCells || $(this).children('td, th');
var n = this.cloneNode(false);
n.removeAttribute('id');
n.setAttribute( 'data-dt-row', i );
for ( iIndex=0 ; iIndex<aiColumns.length ; iIndex++ )
{
iColumn = aiColumns[iIndex];
if ( aTds.length > 0 )
{
nClone = $( aTds[iColumn] ).clone(true, true)[0];
nClone.removeAttribute( 'id' );
nClone.setAttribute( 'data-dt-row', i );
nClone.setAttribute( 'data-dt-column', iColumn );
n.appendChild( nClone );
}
}
nBody.appendChild( n );
} );
}
else
{
$('>tbody>tr', that.dom.body).each( function (z) {
nClone = this.cloneNode(true);
nClone.className += ' DTFC_NoData';
$('td', nClone).html('');
nBody.appendChild( nClone );
} );
}
oClone.body.style.width = "100%";
oClone.body.style.margin = "0";
oClone.body.style.padding = "0";
// Interop with Scroller - need to use a height forcing element in the
// scrolling area in the same way that Scroller does in the body scroll.
if ( dt.oScroller !== undefined )
{
var scrollerForcer = dt.oScroller.dom.force;
if ( ! oGrid.forcer ) {
oGrid.forcer = scrollerForcer.cloneNode( true );
oGrid.liner.appendChild( oGrid.forcer );
}
else {
oGrid.forcer.style.height = scrollerForcer.style.height;
}
}
oGrid.liner.appendChild( oClone.body );
this._fnEqualiseHeights( 'tbody', that.dom.body, oClone.body );
/*
* Footer
*/
if ( dt.nTFoot !== null )
{
if ( bAll )
{
if ( oClone.footer !== null )
{
oClone.footer.parentNode.removeChild( oClone.footer );
}
oClone.footer = $(this.dom.footer).clone(true, true)[0];
oClone.footer.className += " DTFC_Cloned";
oClone.footer.style.width = "100%";
oGrid.foot.appendChild( oClone.footer );
/* Copy the footer just like we do for the header */
aoCloneLayout = this._fnCopyLayout( dt.aoFooter, aiColumns, true );
var jqCloneTfoot = $('>tfoot', oClone.footer);
jqCloneTfoot.empty();
for ( i=0, iLen=aoCloneLayout.length ; i<iLen ; i++ )
{
jqCloneTfoot[0].appendChild( aoCloneLayout[i].nTr );
}
dt.oApi._fnDrawHead( dt, aoCloneLayout, true );
}
else
{
aoCloneLayout = this._fnCopyLayout( dt.aoFooter, aiColumns, false );
var aoCurrFooter=[];
dt.oApi._fnDetectHeader( aoCurrFooter, $('>tfoot', oClone.footer)[0] );
for ( i=0, iLen=aoCloneLayout.length ; i<iLen ; i++ )
{
for ( j=0, jLen=aoCloneLayout[i].length ; j<jLen ; j++ )
{
aoCurrFooter[i][j].cell.className = aoCloneLayout[i][j].cell.className;
}
}
}
this._fnEqualiseHeights( 'tfoot', this.dom.footer, oClone.footer );
}
/* Equalise the column widths between the header footer and body - body get's priority */
var anUnique = dt.oApi._fnGetUniqueThs( dt, $('>thead', oClone.header)[0] );
$(anUnique).each( function (i) {
iColumn = aiColumns[i];
this.style.width = that.s.aiInnerWidths[iColumn]+"px";
} );
if ( that.s.dt.nTFoot !== null )
{
anUnique = dt.oApi._fnGetUniqueThs( dt, $('>tfoot', oClone.footer)[0] );
$(anUnique).each( function (i) {
iColumn = aiColumns[i];
this.style.width = that.s.aiInnerWidths[iColumn]+"px";
} );
}
},
/**
* From a given table node (THEAD etc), get a list of TR direct child elements
* @param {Node} nIn Table element to search for TR elements (THEAD, TBODY or TFOOT element)
* @returns {Array} List of TR elements found
* @private
*/
"_fnGetTrNodes": function ( nIn )
{
var aOut = [];
for ( var i=0, iLen=nIn.childNodes.length ; i<iLen ; i++ )
{
if ( nIn.childNodes[i].nodeName.toUpperCase() == "TR" )
{
aOut.push( nIn.childNodes[i] );
}
}
return aOut;
},
/**
* Equalise the heights of the rows in a given table node in a cross browser way
* @returns {void}
* @param {String} nodeName Node type - thead, tbody or tfoot
* @param {Node} original Original node to take the heights from
* @param {Node} clone Copy the heights to
* @private
*/
"_fnEqualiseHeights": function ( nodeName, original, clone )
{
if ( this.s.sHeightMatch == 'none' && nodeName !== 'thead' && nodeName !== 'tfoot' )
{
return;
}
var that = this,
i, iLen, iHeight, iHeight2, iHeightOriginal, iHeightClone,
rootOriginal = original.getElementsByTagName(nodeName)[0],
rootClone = clone.getElementsByTagName(nodeName)[0],
jqBoxHack = $('>'+nodeName+'>tr:eq(0)', original).children(':first'),
iBoxHack = jqBoxHack.outerHeight() - jqBoxHack.height(),
anOriginal = this._fnGetTrNodes( rootOriginal ),
anClone = this._fnGetTrNodes( rootClone ),
heights = [];
for ( i=0, iLen=anClone.length ; i<iLen ; i++ )
{
iHeightOriginal = anOriginal[i].offsetHeight;
iHeightClone = anClone[i].offsetHeight;
iHeight = iHeightClone > iHeightOriginal ? iHeightClone : iHeightOriginal;
if ( this.s.sHeightMatch == 'semiauto' )
{
anOriginal[i]._DTTC_iHeight = iHeight;
}
heights.push( iHeight );
}
for ( i=0, iLen=anClone.length ; i<iLen ; i++ )
{
anClone[i].style.height = heights[i]+"px";
anOriginal[i].style.height = heights[i]+"px";
}
},
/**
* Determine if the UA suffers from Firefox's overflow:scroll scrollbars
* not being shown bug.
*
* Firefox doesn't draw scrollbars, even if it is told to using
* overflow:scroll, if the div is less than 34px height. See bugs 292284 and
* 781885. Using UA detection here since this is particularly hard to detect
* using objects - its a straight up rendering error in Firefox.
*
* @return {boolean} True if Firefox error is present, false otherwise
*/
_firefoxScrollError: function () {
if ( _firefoxScroll === undefined ) {
var test = $('<div/>')
.css( {
position: 'absolute',
top: 0,
left: 0,
height: 10,
width: 50,
overflow: 'scroll'
} )
.appendTo( 'body' );
// Make sure this doesn't apply on Macs with 0 width scrollbars
_firefoxScroll = (
test[0].clientWidth === test[0].offsetWidth && this._fnDTOverflow().bar !== 0
);
test.remove();
}
return _firefoxScroll;
}
} );
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Statics
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* FixedColumns default settings for initialisation
* @name FixedColumns.defaults
* @namespace
* @static
*/
FixedColumns.defaults = /** @lends FixedColumns.defaults */{
/**
* Number of left hand columns to fix in position
* @type int
* @default 1
* @static
* @example
* var = $('#example').dataTable( {
* "scrollX": "100%"
* } );
* new $.fn.dataTable.fixedColumns( table, {
* "leftColumns": 2
* } );
*/
"iLeftColumns": 1,
/**
* Number of right hand columns to fix in position
* @type int
* @default 0
* @static
* @example
* var table = $('#example').dataTable( {
* "scrollX": "100%"
* } );
* new $.fn.dataTable.fixedColumns( table, {
* "rightColumns": 1
* } );
*/
"iRightColumns": 0,
/**
* Draw callback function which is called when FixedColumns has redrawn the fixed assets
* @type function(object, object):void
* @default null
* @static
* @example
* var table = $('#example').dataTable( {
* "scrollX": "100%"
* } );
* new $.fn.dataTable.fixedColumns( table, {
* "drawCallback": function () {
* alert( "FixedColumns redraw" );
* }
* } );
*/
"fnDrawCallback": null,
/**
* Height matching algorthim to use. This can be "none" which will result in no height
* matching being applied by FixedColumns (height matching could be forced by CSS in this
* case), "semiauto" whereby the height calculation will be performed once, and the result
* cached to be used again (fnRecalculateHeight can be used to force recalculation), or
* "auto" when height matching is performed on every draw (slowest but must accurate)
* @type string
* @default semiauto
* @static
* @example
* var table = $('#example').dataTable( {
* "scrollX": "100%"
* } );
* new $.fn.dataTable.fixedColumns( table, {
* "heightMatch": "auto"
* } );
*/
"sHeightMatch": "semiauto"
};
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Constants
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* FixedColumns version
* @name FixedColumns.version
* @type String
* @default See code
* @static
*/
FixedColumns.version = "3.3.2";
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* DataTables API integration
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
DataTable.Api.register( 'fixedColumns()', function () {
return this;
} );
DataTable.Api.register( 'fixedColumns().update()', function () {
return this.iterator( 'table', function ( ctx ) {
if ( ctx._oFixedColumns ) {
ctx._oFixedColumns.fnUpdate();
}
} );
} );
DataTable.Api.register( 'fixedColumns().relayout()', function () {
return this.iterator( 'table', function ( ctx ) {
if ( ctx._oFixedColumns ) {
ctx._oFixedColumns.fnRedrawLayout();
}
} );
} );
DataTable.Api.register( 'rows().recalcHeight()', function () {
return this.iterator( 'row', function ( ctx, idx ) {
if ( ctx._oFixedColumns ) {
ctx._oFixedColumns.fnRecalculateHeight( this.row(idx).node() );
}
} );
} );
DataTable.Api.register( 'fixedColumns().rowIndex()', function ( row ) {
row = $(row);
return row.parents('.DTFC_Cloned').length ?
this.rows( { page: 'current' } ).indexes()[ row.index() ] :
this.row( row ).index();
} );
DataTable.Api.register( 'fixedColumns().cellIndex()', function ( cell ) {
cell = $(cell);
if ( cell.parents('.DTFC_Cloned').length ) {
var rowClonedIdx = cell.parent().index();
var rowIdx = this.rows( { page: 'current' } ).indexes()[ rowClonedIdx ];
var columnIdx;
if ( cell.parents('.DTFC_LeftWrapper').length ) {
columnIdx = cell.index();
}
else {
var columns = this.columns().flatten().length;
columnIdx = columns - this.context[0]._oFixedColumns.s.iRightColumns + cell.index();
}
return {
row: rowIdx,
column: this.column.index( 'toData', columnIdx ),
columnVisible: columnIdx
};
}
else {
return this.cell( cell ).index();
}
} );
DataTable.Api.registerPlural( 'cells().fixedNodes()', 'cell().fixedNode()', function () {
return this.iterator( 'cell', function ( settings, row, column ) {
return settings._oFixedColumns
? settings._oFixedColumns.fnToFixedNode( row, column )
: this.cell(row, column).node();
}, 1 );
} );
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Initialisation
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// Attach a listener to the document which listens for DataTables initialisation
// events so we can automatically initialise
$(document).on( 'init.dt.fixedColumns', function (e, settings) {
if ( e.namespace !== 'dt' ) {
return;
}
var init = settings.oInit.fixedColumns;
var defaults = DataTable.defaults.fixedColumns;
if ( init || defaults ) {
var opts = $.extend( {}, init, defaults );
if ( init !== false ) {
new FixedColumns( settings, opts );
}
}
} );
// Make FixedColumns accessible from the DataTables instance
$.fn.dataTable.FixedColumns = FixedColumns;
$.fn.DataTable.FixedColumns = FixedColumns;
return FixedColumns;
}));
/*!
Copyright 2010-2020 SpryMedia Ltd.
This source file is free software, available under the following license:
MIT license - http://datatables.net/license/mit
This source file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
For details please refer to: http://www.datatables.net
FixedColumns 3.3.2
©2010-2020 SpryMedia Ltd - datatables.net/license
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(c,h,k){c instanceof String&&(c=String(c));for(var t=c.length,n=0;n<t;n++){var z=c[n];if(h.call(k,z,n,c))return{i:n,v:z}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(c,h,k){if(c==Array.prototype||c==Object.prototype)return c;c[h]=k.value;return c};$jscomp.getGlobal=function(c){c=["object"==typeof globalThis&&globalThis,c,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var h=0;h<c.length;++h){var k=c[h];if(k&&k.Math==Math)return k}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(c,h){var k=$jscomp.propertyToPolyfillSymbol[h];if(null==k)return c[h];k=c[k];return void 0!==k?k:c[h]};
$jscomp.polyfill=function(c,h,k,t){h&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(c,h,k,t):$jscomp.polyfillUnisolated(c,h,k,t))};$jscomp.polyfillUnisolated=function(c,h,k,t){k=$jscomp.global;c=c.split(".");for(t=0;t<c.length-1;t++){var n=c[t];if(!(n in k))return;k=k[n]}c=c[c.length-1];t=k[c];h=h(t);h!=t&&null!=h&&$jscomp.defineProperty(k,c,{configurable:!0,writable:!0,value:h})};
$jscomp.polyfillIsolated=function(c,h,k,t){var n=c.split(".");c=1===n.length;t=n[0];t=!c&&t in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var z=0;z<n.length-1;z++){var u=n[z];if(!(u in t))return;t=t[u]}n=n[n.length-1];k=$jscomp.IS_SYMBOL_NATIVE&&"es6"===k?t[n]:null;h=h(k);null!=h&&(c?$jscomp.defineProperty($jscomp.polyfills,n,{configurable:!0,writable:!0,value:h}):h!==k&&($jscomp.propertyToPolyfillSymbol[n]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(n):$jscomp.POLYFILL_PREFIX+n,n=
$jscomp.propertyToPolyfillSymbol[n],$jscomp.defineProperty(t,n,{configurable:!0,writable:!0,value:h})))};$jscomp.polyfill("Array.prototype.find",function(c){return c?c:function(h,k){return $jscomp.findInternal(this,h,k).v}},"es6","es3");
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(h){return c(h,window,document)}):"object"===typeof exports?module.exports=function(h,k){h||(h=window);k&&k.fn.dataTable||(k=require("datatables.net")(h,k).$);return c(k,h,h.document)}:c(jQuery,window,document)})(function(c,h,k,t){var n=c.fn.dataTable,z,u=function(a,b){var d=this;if(this instanceof u){if(b===t||!0===b)b={};var f=c.fn.dataTable.camelToHungarian;f&&(f(u.defaults,u.defaults,!0),f(u.defaults,
b));a=(new c.fn.dataTable.Api(a)).settings()[0];this.s={dt:a,iTableColumns:a.aoColumns.length,aiOuterWidths:[],aiInnerWidths:[],rtl:"rtl"===c(a.nTable).css("direction")};this.dom={scroller:null,header:null,body:null,footer:null,grid:{wrapper:null,dt:null,left:{wrapper:null,head:null,body:null,foot:null},right:{wrapper:null,head:null,body:null,foot:null}},clone:{left:{header:null,body:null,footer:null},right:{header:null,body:null,footer:null}}};if(a._oFixedColumns)throw"FixedColumns already initialised on this table";
a._oFixedColumns=this;a._bInitComplete?this._fnConstruct(b):a.oApi._fnCallbackReg(a,"aoInitComplete",function(){d._fnConstruct(b)},"FixedColumns")}else alert("FixedColumns warning: FixedColumns must be initialised with the 'new' keyword.")};c.extend(u.prototype,{fnUpdate:function(){this._fnDraw(!0)},fnRedrawLayout:function(){this._fnColCalc();this._fnGridLayout();this.fnUpdate()},fnRecalculateHeight:function(a){delete a._DTTC_iHeight;a.style.height="auto"},fnSetRowHeight:function(a,b){a.style.height=
b+"px"},fnGetPosition:function(a){var b=this.s.dt.oInstance;if(c(a).parents(".DTFC_Cloned").length){if("tr"===a.nodeName.toLowerCase())return a=c(a).index(),b.fnGetPosition(c("tr",this.s.dt.nTBody)[a]);var d=c(a).index();a=c(a.parentNode).index();return[b.fnGetPosition(c("tr",this.s.dt.nTBody)[a]),d,b.oApi._fnVisibleToColumnIndex(this.s.dt,d)]}return b.fnGetPosition(a)},fnToFixedNode:function(a,b){var d;b<this.s.iLeftColumns?d=c(this.dom.clone.left.body).find("[data-dt-row="+a+"][data-dt-column="+
b+"]"):b>=this.s.iRightColumns&&(d=c(this.dom.clone.right.body).find("[data-dt-row="+a+"][data-dt-column="+b+"]"));return d&&d.length?d[0]:(new c.fn.dataTable.Api(this.s.dt)).cell(a,b).node()},_fnConstruct:function(a){var b=this;if("function"!=typeof this.s.dt.oInstance.fnVersionCheck||!0!==this.s.dt.oInstance.fnVersionCheck("1.8.0"))alert("FixedColumns "+u.VERSION+" required DataTables 1.8.0 or later. Please upgrade your DataTables installation");else if(""===this.s.dt.oScroll.sX)this.s.dt.oInstance.oApi._fnLog(this.s.dt,
1,"FixedColumns is not needed (no x-scrolling in DataTables enabled), so no action will be taken. Use 'FixedHeader' for column fixing when scrolling is not enabled");else{this.s=c.extend(!0,this.s,u.defaults,a);a=this.s.dt.oClasses;this.dom.grid.dt=c(this.s.dt.nTable).parents("div."+a.sScrollWrapper)[0];this.dom.scroller=c("div."+a.sScrollBody,this.dom.grid.dt)[0];this._fnColCalc();this._fnGridSetup();var d,f=!1;c(this.s.dt.nTableWrapper).on("mousedown.DTFC",function(g){0===g.button&&(f=!0,c(k).one("mouseup",
function(){f=!1}))});c(this.dom.scroller).on("mouseover.DTFC touchstart.DTFC",function(){f||(d="main")}).on("scroll.DTFC",function(g){!d&&g.originalEvent&&(d="main");if("main"===d||"key"===d)0<b.s.iLeftColumns&&(b.dom.grid.left.liner.scrollTop=b.dom.scroller.scrollTop),0<b.s.iRightColumns&&(b.dom.grid.right.liner.scrollTop=b.dom.scroller.scrollTop)});var e="onwheel"in k.createElement("div")?"wheel.DTFC":"mousewheel.DTFC";0<b.s.iLeftColumns&&(c(b.dom.grid.left.liner).on("mouseover.DTFC touchstart.DTFC",
function(){f||"key"===d||(d="left")}).on("scroll.DTFC",function(g){!d&&g.originalEvent&&(d="left");"left"===d&&(b.dom.scroller.scrollTop=b.dom.grid.left.liner.scrollTop,0<b.s.iRightColumns&&(b.dom.grid.right.liner.scrollTop=b.dom.grid.left.liner.scrollTop))}).on(e,function(g){d="left";b.dom.scroller.scrollLeft-="wheel"===g.type?-g.originalEvent.deltaX:g.originalEvent.wheelDeltaX}),c(b.dom.grid.left.head).on("mouseover.DTFC touchstart.DTFC",function(){d="main"}));0<b.s.iRightColumns&&(c(b.dom.grid.right.liner).on("mouseover.DTFC touchstart.DTFC",
function(){f||"key"===d||(d="right")}).on("scroll.DTFC",function(g){!d&&g.originalEvent&&(d="right");"right"===d&&(b.dom.scroller.scrollTop=b.dom.grid.right.liner.scrollTop,0<b.s.iLeftColumns&&(b.dom.grid.left.liner.scrollTop=b.dom.grid.right.liner.scrollTop))}).on(e,function(g){d="right";b.dom.scroller.scrollLeft-="wheel"===g.type?-g.originalEvent.deltaX:g.originalEvent.wheelDeltaX}),c(b.dom.grid.right.head).on("mouseover.DTFC touchstart.DTFC",function(){d="main"}));c(h).on("resize.DTFC",function(){b._fnGridLayout.call(b)});
var l=!0,m=c(this.s.dt.nTable);m.on("draw.dt.DTFC",function(){b._fnColCalc();b._fnDraw.call(b,l);l=!1}).on("key-focus.dt.DTFC",function(){d="key"}).on("column-sizing.dt.DTFC",function(){b._fnColCalc();b._fnGridLayout(b)}).on("column-visibility.dt.DTFC",function(g,q,p,r,w){if(w===t||w)b._fnColCalc(),b._fnGridLayout(b),b._fnDraw(!0)}).on("select.dt.DTFC deselect.dt.DTFC",function(g,q,p,r){"dt"===g.namespace&&b._fnDraw(!1)}).on("position.dts.dt.DTFC",function(g,q){b.dom.grid.left.body&&c(b.dom.grid.left.body).find("table").eq(0).css("top",
q);b.dom.grid.right.body&&c(b.dom.grid.right.body).find("table").eq(0).css("top",q)}).on("destroy.dt.DTFC",function(){m.off(".DTFC");c(b.dom.scroller).off(".DTFC");c(h).off(".DTFC");c(b.s.dt.nTableWrapper).off(".DTFC");c(b.dom.grid.left.liner).off(".DTFC "+e);c(b.dom.grid.left.wrapper).remove();c(b.dom.grid.right.liner).off(".DTFC "+e);c(b.dom.grid.right.wrapper).remove()});this._fnGridLayout();this.s.dt.oInstance.fnDraw(!1)}},_fnColCalc:function(){var a=this,b=0,d=0;this.s.aiInnerWidths=[];this.s.aiOuterWidths=
[];c.each(this.s.dt.aoColumns,function(f,e){e=c(e.nTh);if(e.filter(":visible").length){var l=e.outerWidth();if(0===a.s.aiOuterWidths.length){var m=c(a.s.dt.nTable).css("border-left-width");l+="string"===typeof m&&-1===m.indexOf("px")?1:parseInt(m,10)}a.s.aiOuterWidths.length===a.s.dt.aoColumns.length-1&&(m=c(a.s.dt.nTable).css("border-right-width"),l+="string"===typeof m&&-1===m.indexOf("px")?1:parseInt(m,10));a.s.aiOuterWidths.push(l);a.s.aiInnerWidths.push(e.width());f<a.s.iLeftColumns&&(b+=l);
a.s.iTableColumns-a.s.iRightColumns<=f&&(d+=l)}else a.s.aiInnerWidths.push(0),a.s.aiOuterWidths.push(0)});this.s.iLeftWidth=b;this.s.iRightWidth=d},_fnGridSetup:function(){var a=this._fnDTOverflow();this.dom.body=this.s.dt.nTable;this.dom.header=this.s.dt.nTHead.parentNode;this.dom.header.parentNode.parentNode.style.position="relative";var b=c('<div class="DTFC_ScrollWrapper" style="position:relative; clear:both;"><div class="DTFC_LeftWrapper" style="position:absolute; top:0; left:0;" aria-hidden="true"><div class="DTFC_LeftHeadWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div><div class="DTFC_LeftBodyWrapper" style="position:relative; top:0; left:0; height:0; overflow:hidden;"><div class="DTFC_LeftBodyLiner" style="position:relative; top:0; left:0; overflow-y:scroll;"></div></div><div class="DTFC_LeftFootWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div></div><div class="DTFC_RightWrapper" style="position:absolute; top:0; right:0;" aria-hidden="true"><div class="DTFC_RightHeadWrapper" style="position:relative; top:0; left:0;"><div class="DTFC_RightHeadBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div></div><div class="DTFC_RightBodyWrapper" style="position:relative; top:0; left:0; height:0; overflow:hidden;"><div class="DTFC_RightBodyLiner" style="position:relative; top:0; left:0; overflow-y:scroll;"></div></div><div class="DTFC_RightFootWrapper" style="position:relative; top:0; left:0;"><div class="DTFC_RightFootBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div></div></div></div>')[0],
d=b.childNodes[0],f=b.childNodes[1];this.dom.grid.dt.parentNode.insertBefore(b,this.dom.grid.dt);b.appendChild(this.dom.grid.dt);this.dom.grid.wrapper=b;0<this.s.iLeftColumns&&(this.dom.grid.left.wrapper=d,this.dom.grid.left.head=d.childNodes[0],this.dom.grid.left.body=d.childNodes[1],this.dom.grid.left.liner=c("div.DTFC_LeftBodyLiner",b)[0],b.appendChild(d));if(0<this.s.iRightColumns){this.dom.grid.right.wrapper=f;this.dom.grid.right.head=f.childNodes[0];this.dom.grid.right.body=f.childNodes[1];
this.dom.grid.right.liner=c("div.DTFC_RightBodyLiner",b)[0];f.style.right=a.bar+"px";var e=c("div.DTFC_RightHeadBlocker",b)[0];e.style.width=a.bar+"px";e.style.right=-a.bar+"px";this.dom.grid.right.headBlock=e;e=c("div.DTFC_RightFootBlocker",b)[0];e.style.width=a.bar+"px";e.style.right=-a.bar+"px";this.dom.grid.right.footBlock=e;b.appendChild(f)}this.s.dt.nTFoot&&(this.dom.footer=this.s.dt.nTFoot.parentNode,0<this.s.iLeftColumns&&(this.dom.grid.left.foot=d.childNodes[2]),0<this.s.iRightColumns&&(this.dom.grid.right.foot=
f.childNodes[2]));this.s.rtl&&c("div.DTFC_RightHeadBlocker",b).css({left:-a.bar+"px",right:""})},_fnGridLayout:function(){var a=this,b=this.dom.grid;c(b.wrapper).width();var d=this.s.dt.nTable.parentNode.offsetHeight,f=this.s.dt.nTable.parentNode.parentNode.offsetHeight,e=this._fnDTOverflow(),l=this.s.iLeftWidth,m=this.s.iRightWidth,g="rtl"===c(this.dom.body).css("direction"),q=function(p,r){e.bar?a._firefoxScrollError()?34<c(p).height()&&(p.style.width=r+e.bar+"px"):p.style.width=r+e.bar+"px":(p.style.width=
r+20+"px",p.style.paddingRight="20px",p.style.boxSizing="border-box")};e.x&&(d-=e.bar);b.wrapper.style.height=f+"px";0<this.s.iLeftColumns&&(f=b.left.wrapper,f.style.width=l+"px",f.style.height="1px",g?(f.style.left="",f.style.right=0):(f.style.left=0,f.style.right=""),b.left.body.style.height=d+"px",b.left.foot&&(b.left.foot.style.top=(e.x?e.bar:0)+"px"),q(b.left.liner,l),b.left.liner.style.height=d+"px",b.left.liner.style.maxHeight=d+"px");0<this.s.iRightColumns&&(f=b.right.wrapper,f.style.width=
m+"px",f.style.height="1px",this.s.rtl?(f.style.left=e.y?e.bar+"px":0,f.style.right=""):(f.style.left="",f.style.right=e.y?e.bar+"px":0),b.right.body.style.height=d+"px",b.right.foot&&(b.right.foot.style.top=(e.x?e.bar:0)+"px"),q(b.right.liner,m),b.right.liner.style.height=d+"px",b.right.liner.style.maxHeight=d+"px",b.right.headBlock.style.display=e.y?"block":"none",b.right.footBlock.style.display=e.y?"block":"none")},_fnDTOverflow:function(){var a=this.s.dt.nTable,b=a.parentNode,d={x:!1,y:!1,bar:this.s.dt.oScroll.iBarWidth};
a.offsetWidth>b.clientWidth&&(d.x=!0);a.offsetHeight>b.clientHeight&&(d.y=!0);return d},_fnDraw:function(a){this._fnGridLayout();this._fnCloneLeft(a);this._fnCloneRight(a);c(this.dom.scroller).trigger("scroll");null!==this.s.fnDrawCallback&&this.s.fnDrawCallback.call(this,this.dom.clone.left,this.dom.clone.right);c(this).trigger("draw.dtfc",{leftClone:this.dom.clone.left,rightClone:this.dom.clone.right})},_fnCloneRight:function(a){if(!(0>=this.s.iRightColumns)){var b,d=[];for(b=this.s.iTableColumns-
this.s.iRightColumns;b<this.s.iTableColumns;b++)this.s.dt.aoColumns[b].bVisible&&d.push(b);this._fnClone(this.dom.clone.right,this.dom.grid.right,d,a)}},_fnCloneLeft:function(a){if(!(0>=this.s.iLeftColumns)){var b,d=[];for(b=0;b<this.s.iLeftColumns;b++)this.s.dt.aoColumns[b].bVisible&&d.push(b);this._fnClone(this.dom.clone.left,this.dom.grid.left,d,a)}},_fnCopyLayout:function(a,b,d){for(var f=[],e=[],l=[],m=0,g=a.length;m<g;m++){var q=[];q.nTr=c(a[m].nTr).clone(d,!1)[0];for(var p=0,r=this.s.iTableColumns;p<
r;p++)if(-1!==c.inArray(p,b)){var w=c.inArray(a[m][p].cell,l);-1===w?(w=c(a[m][p].cell).clone(d,!1)[0],e.push(w),l.push(a[m][p].cell),q.push({cell:w,unique:a[m][p].unique})):q.push({cell:e[w],unique:a[m][p].unique})}f.push(q)}return f},_fnClone:function(a,b,d,f){var e=this,l,m,g=this.s.dt;if(f){c(a.header).remove();a.header=c(this.dom.header).clone(!0,!1)[0];a.header.className+=" DTFC_Cloned";a.header.style.width="100%";b.head.appendChild(a.header);var q=this._fnCopyLayout(g.aoHeader,d,!0);var p=
c(">thead",a.header);p.empty();var r=0;for(l=q.length;r<l;r++)p[0].appendChild(q[r].nTr);g.oApi._fnDrawHead(g,q,!0)}else{q=this._fnCopyLayout(g.aoHeader,d,!1);var w=[];g.oApi._fnDetectHeader(w,c(">thead",a.header)[0]);r=0;for(l=q.length;r<l;r++){var x=0;for(p=q[r].length;x<p;x++)w[r][x].cell.className=q[r][x].cell.className,c("span.DataTables_sort_icon",w[r][x].cell).each(function(){this.className=c("span.DataTables_sort_icon",q[r][x].cell)[0].className})}}this._fnEqualiseHeights("thead",this.dom.header,
a.header);"auto"==this.s.sHeightMatch&&c(">tbody>tr",e.dom.body).css("height","auto");null!==a.body&&(c(a.body).remove(),a.body=null);a.body=c(this.dom.body).clone(!0)[0];a.body.className+=" DTFC_Cloned";a.body.style.paddingBottom=g.oScroll.iBarWidth+"px";a.body.style.marginBottom=2*g.oScroll.iBarWidth+"px";null!==a.body.getAttribute("id")&&a.body.removeAttribute("id");c(">thead>tr",a.body).empty();c(">tfoot",a.body).remove();var C=c("tbody",a.body)[0];c(C).empty();if(0<g.aiDisplay.length){l=c(">thead>tr",
a.body)[0];for(m=0;m<d.length;m++){var A=d[m];var v=c(g.aoColumns[A].nTh).clone(!0)[0];v.innerHTML="";p=v.style;p.paddingTop="0";p.paddingBottom="0";p.borderTopWidth="0";p.borderBottomWidth="0";p.height=0;p.width=e.s.aiInnerWidths[A]+"px";l.appendChild(v)}c(">tbody>tr",e.dom.body).each(function(y){y=!1===e.s.dt.oFeatures.bServerSide?e.s.dt.aiDisplay[e.s.dt._iDisplayStart+y]:y;var D=e.s.dt.aoData[y].anCells||c(this).children("td, th"),B=this.cloneNode(!1);B.removeAttribute("id");B.setAttribute("data-dt-row",
y);for(m=0;m<d.length;m++)A=d[m],0<D.length&&(v=c(D[A]).clone(!0,!0)[0],v.removeAttribute("id"),v.setAttribute("data-dt-row",y),v.setAttribute("data-dt-column",A),B.appendChild(v));C.appendChild(B)})}else c(">tbody>tr",e.dom.body).each(function(y){v=this.cloneNode(!0);v.className+=" DTFC_NoData";c("td",v).html("");C.appendChild(v)});a.body.style.width="100%";a.body.style.margin="0";a.body.style.padding="0";g.oScroller!==t&&(l=g.oScroller.dom.force,b.forcer?b.forcer.style.height=l.style.height:(b.forcer=
l.cloneNode(!0),b.liner.appendChild(b.forcer)));b.liner.appendChild(a.body);this._fnEqualiseHeights("tbody",e.dom.body,a.body);if(null!==g.nTFoot){if(f){null!==a.footer&&a.footer.parentNode.removeChild(a.footer);a.footer=c(this.dom.footer).clone(!0,!0)[0];a.footer.className+=" DTFC_Cloned";a.footer.style.width="100%";b.foot.appendChild(a.footer);q=this._fnCopyLayout(g.aoFooter,d,!0);b=c(">tfoot",a.footer);b.empty();r=0;for(l=q.length;r<l;r++)b[0].appendChild(q[r].nTr);g.oApi._fnDrawHead(g,q,!0)}else for(q=
this._fnCopyLayout(g.aoFooter,d,!1),b=[],g.oApi._fnDetectHeader(b,c(">tfoot",a.footer)[0]),r=0,l=q.length;r<l;r++)for(x=0,p=q[r].length;x<p;x++)b[r][x].cell.className=q[r][x].cell.className;this._fnEqualiseHeights("tfoot",this.dom.footer,a.footer)}b=g.oApi._fnGetUniqueThs(g,c(">thead",a.header)[0]);c(b).each(function(y){A=d[y];this.style.width=e.s.aiInnerWidths[A]+"px"});null!==e.s.dt.nTFoot&&(b=g.oApi._fnGetUniqueThs(g,c(">tfoot",a.footer)[0]),c(b).each(function(y){A=d[y];this.style.width=e.s.aiInnerWidths[A]+
"px"}))},_fnGetTrNodes:function(a){for(var b=[],d=0,f=a.childNodes.length;d<f;d++)"TR"==a.childNodes[d].nodeName.toUpperCase()&&b.push(a.childNodes[d]);return b},_fnEqualiseHeights:function(a,b,d){if("none"!=this.s.sHeightMatch||"thead"===a||"tfoot"===a){var f=b.getElementsByTagName(a)[0];d=d.getElementsByTagName(a)[0];a=c(">"+a+">tr:eq(0)",b).children(":first");a.outerHeight();a.height();f=this._fnGetTrNodes(f);b=this._fnGetTrNodes(d);var e=[];d=0;for(a=b.length;d<a;d++){var l=f[d].offsetHeight;
var m=b[d].offsetHeight;l=m>l?m:l;"semiauto"==this.s.sHeightMatch&&(f[d]._DTTC_iHeight=l);e.push(l)}d=0;for(a=b.length;d<a;d++)b[d].style.height=e[d]+"px",f[d].style.height=e[d]+"px"}},_firefoxScrollError:function(){if(z===t){var a=c("<div/>").css({position:"absolute",top:0,left:0,height:10,width:50,overflow:"scroll"}).appendTo("body");z=a[0].clientWidth===a[0].offsetWidth&&0!==this._fnDTOverflow().bar;a.remove()}return z}});u.defaults={iLeftColumns:1,iRightColumns:0,fnDrawCallback:null,sHeightMatch:"semiauto"};
u.version="3.3.2";n.Api.register("fixedColumns()",function(){return this});n.Api.register("fixedColumns().update()",function(){return this.iterator("table",function(a){a._oFixedColumns&&a._oFixedColumns.fnUpdate()})});n.Api.register("fixedColumns().relayout()",function(){return this.iterator("table",function(a){a._oFixedColumns&&a._oFixedColumns.fnRedrawLayout()})});n.Api.register("rows().recalcHeight()",function(){return this.iterator("row",function(a,b){a._oFixedColumns&&a._oFixedColumns.fnRecalculateHeight(this.row(b).node())})});
n.Api.register("fixedColumns().rowIndex()",function(a){a=c(a);return a.parents(".DTFC_Cloned").length?this.rows({page:"current"}).indexes()[a.index()]:this.row(a).index()});n.Api.register("fixedColumns().cellIndex()",function(a){a=c(a);if(a.parents(".DTFC_Cloned").length){var b=a.parent().index();b=this.rows({page:"current"}).indexes()[b];a=a.parents(".DTFC_LeftWrapper").length?a.index():this.columns().flatten().length-this.context[0]._oFixedColumns.s.iRightColumns+a.index();return{row:b,column:this.column.index("toData",
a),columnVisible:a}}return this.cell(a).index()});n.Api.registerPlural("cells().fixedNodes()","cell().fixedNode()",function(){return this.iterator("cell",function(a,b,d){return a._oFixedColumns?a._oFixedColumns.fnToFixedNode(b,d):this.cell(b,d).node()},1)});c(k).on("init.dt.fixedColumns",function(a,b){if("dt"===a.namespace){a=b.oInit.fixedColumns;var d=n.defaults.fixedColumns;if(a||d)d=c.extend({},a,d),!1!==a&&new u(b,d)}});c.fn.dataTable.FixedColumns=u;return c.fn.DataTable.FixedColumns=u});
/*! Bootstrap 3 styling wrapper for FixedColumns
* ©2018 SpryMedia Ltd - datatables.net/license
*/
(function( factory ){
if ( typeof define === 'function' && define.amd ) {
// AMD
define( ['jquery', 'datatables.net-bs', 'datatables.net-fixedcolumns'], function ( $ ) {
return factory( $, window, document );
} );
}
else if ( typeof exports === 'object' ) {
// CommonJS
module.exports = function (root, $) {
if ( ! root ) {
root = window;
}
if ( ! $ || ! $.fn.dataTable ) {
$ = require('datatables.net-bs')(root, $).$;
}
if ( ! $.fn.dataTable.FixedColumns ) {
require('datatables.net-fixedcolumns')(root, $);
}
return factory( $, root, root.document );
};
}
else {
// Browser
factory( jQuery, window, document );
}
}(function( $, window, document, undefined ) {
return $.fn.dataTable;
}));
\ No newline at end of file
/*!
Bootstrap 3 styling wrapper for FixedColumns
©2018 SpryMedia Ltd - datatables.net/license
*/
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs","datatables.net-fixedcolumns"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net-bs")(a,b).$);b.fn.dataTable.FixedColumns||require("datatables.net-fixedcolumns")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c,a,b,d){return c.fn.dataTable});
/*! Bootstrap 4 styling wrapper for FixedColumns
* ©2018 SpryMedia Ltd - datatables.net/license
*/
(function( factory ){
if ( typeof define === 'function' && define.amd ) {
// AMD
define( ['jquery', 'datatables.net-bs4', 'datatables.net-fixedcolumns'], function ( $ ) {
return factory( $, window, document );
} );
}
else if ( typeof exports === 'object' ) {
// CommonJS
module.exports = function (root, $) {
if ( ! root ) {
root = window;
}
if ( ! $ || ! $.fn.dataTable ) {
$ = require('datatables.net-bs4')(root, $).$;
}
if ( ! $.fn.dataTable.FixedColumns ) {
require('datatables.net-fixedcolumns')(root, $);
}
return factory( $, root, root.document );
};
}
else {
// Browser
factory( jQuery, window, document );
}
}(function( $, window, document, undefined ) {
return $.fn.dataTable;
}));
\ No newline at end of file
/*!
Bootstrap 4 styling wrapper for FixedColumns
©2018 SpryMedia Ltd - datatables.net/license
*/
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-fixedcolumns"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net-bs4")(a,b).$);b.fn.dataTable.FixedColumns||require("datatables.net-fixedcolumns")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c,a,b,d){return c.fn.dataTable});
/*! DataTables styling wrapper for FixedColumns
* ©2018 SpryMedia Ltd - datatables.net/license
*/
(function( factory ){
if ( typeof define === 'function' && define.amd ) {
// AMD
define( ['jquery', 'datatables.net-dt', 'datatables.net-fixedcolumns'], function ( $ ) {
return factory( $, window, document );
} );
}
else if ( typeof exports === 'object' ) {
// CommonJS
module.exports = function (root, $) {
if ( ! root ) {
root = window;
}
if ( ! $ || ! $.fn.dataTable ) {
$ = require('datatables.net-dt')(root, $).$;
}
if ( ! $.fn.dataTable.FixedColumns ) {
require('datatables.net-fixedcolumns')(root, $);
}
return factory( $, root, root.document );
};
}
else {
// Browser
factory( jQuery, window, document );
}
}(function( $, window, document, undefined ) {
return $.fn.dataTable;
}));
\ No newline at end of file
/*! Foundation styling wrapper for FixedColumns
* ©2018 SpryMedia Ltd - datatables.net/license
*/
(function( factory ){
if ( typeof define === 'function' && define.amd ) {
// AMD
define( ['jquery', 'datatables.net-zf', 'datatables.net-fixedcolumns'], function ( $ ) {
return factory( $, window, document );
} );
}
else if ( typeof exports === 'object' ) {
// CommonJS
module.exports = function (root, $) {
if ( ! root ) {
root = window;
}
if ( ! $ || ! $.fn.dataTable ) {
$ = require('datatables.net-zf')(root, $).$;
}
if ( ! $.fn.dataTable.FixedColumns ) {
require('datatables.net-fixedcolumns')(root, $);
}
return factory( $, root, root.document );
};
}
else {
// Browser
factory( jQuery, window, document );
}
}(function( $, window, document, undefined ) {
return $.fn.dataTable;
}));
\ No newline at end of file
/*!
Foundation styling wrapper for FixedColumns
©2018 SpryMedia Ltd - datatables.net/license
*/
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-zf","datatables.net-fixedcolumns"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net-zf")(a,b).$);b.fn.dataTable.FixedColumns||require("datatables.net-fixedcolumns")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c,a,b,d){return c.fn.dataTable});
/*! jQuery UI styling wrapper for FixedColumns
* ©2018 SpryMedia Ltd - datatables.net/license
*/
(function( factory ){
if ( typeof define === 'function' && define.amd ) {
// AMD
define( ['jquery', 'datatables.net-jqui', 'datatables.net-fixedcolumns'], function ( $ ) {
return factory( $, window, document );
} );
}
else if ( typeof exports === 'object' ) {
// CommonJS
module.exports = function (root, $) {
if ( ! root ) {
root = window;
}
if ( ! $ || ! $.fn.dataTable ) {
$ = require('datatables.net-jqui')(root, $).$;
}
if ( ! $.fn.dataTable.FixedColumns ) {
require('datatables.net-fixedcolumns')(root, $);
}
return factory( $, root, root.document );
};
}
else {
// Browser
factory( jQuery, window, document );
}
}(function( $, window, document, undefined ) {
return $.fn.dataTable;
}));
\ No newline at end of file
/*!
jQuery UI styling wrapper for FixedColumns
©2018 SpryMedia Ltd - datatables.net/license
*/
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-jqui","datatables.net-fixedcolumns"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net-jqui")(a,b).$);b.fn.dataTable.FixedColumns||require("datatables.net-fixedcolumns")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c,a,b,d){return c.fn.dataTable});
/*! Semanic UI styling wrapper for FixedColumns
* ©2018 SpryMedia Ltd - datatables.net/license
*/
(function( factory ){
if ( typeof define === 'function' && define.amd ) {
// AMD
define( ['jquery', 'datatables.net-se', 'datatables.net-fixedcolumns'], function ( $ ) {
return factory( $, window, document );
} );
}
else if ( typeof exports === 'object' ) {
// CommonJS
module.exports = function (root, $) {
if ( ! root ) {
root = window;
}
if ( ! $ || ! $.fn.dataTable ) {
$ = require('datatables.net-se')(root, $).$;
}
if ( ! $.fn.dataTable.FixedColumns ) {
require('datatables.net-fixedcolumns')(root, $);
}
return factory( $, root, root.document );
};
}
else {
// Browser
factory( jQuery, window, document );
}
}(function( $, window, document, undefined ) {
return $.fn.dataTable;
}));
\ No newline at end of file
/*!
Semanic UI styling wrapper for FixedColumns
©2018 SpryMedia Ltd - datatables.net/license
*/
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-se","datatables.net-fixedcolumns"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net-se")(a,b).$);b.fn.dataTable.FixedColumns||require("datatables.net-fixedcolumns")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c,a,b,d){return c.fn.dataTable});
......@@ -79,7 +79,7 @@
<sql id="sqlColumnslist">
id,
number,
CONVERT(AES_DECRYPT(name,'aideakey') USING UTF8) name,
name,
CONVERT(AES_DECRYPT(phone,'aideakey') USING UTF8) phone,
imageurl,
cardid,
......@@ -121,7 +121,7 @@
(
#{id, jdbcType=BIGINT},
#{number, jdbcType=VARCHAR},
AES_ENCRYPT(#{name, jdbcType=VARBINARY},'aideakey'),
#{name, jdbcType=VARCHAR},
AES_ENCRYPT(#{phone, jdbcType=VARBINARY},'aideakey'),
#{imageurl, jdbcType=VARCHAR},
#{cardid, jdbcType=VARCHAR},
......@@ -151,7 +151,7 @@
SELECT
t.id,
t.number,
CONVERT( AES_DECRYPT(t.name,'aideakey') USING UTF8) t.name ,
t.name,
CONVERT( AES_DECRYPT( t.phone,'aideakey') USING UTF8) t.phone,
t.imageurl,
t.cardid,
......@@ -206,7 +206,7 @@
SELECT
member.id,
member.number,
CONVERT(AES_DECRYPT(member.name,'aideakey') USING UTF8) member.name,
member.name,
member.surname,
CONVERT(AES_DECRYPT(member.phone,'aideakey') USING UTF8) member.phone,
member.imageurl,
......@@ -242,7 +242,7 @@
number = #{number, jdbcType=VARCHAR},
</if>
<if test="name != null">
name = AES_ENCRYPT(#{name, jdbcType=VARBINARY},'aideakey'),
name = #{name, jdbcType=VARCHAR},
</if>
<if test="surname!=null">
surname = #{surname},
......@@ -326,7 +326,7 @@
m.id,
m.imageurl,
m.sex,
CONVERT(AES_DECRYPT(m.name,'aideakey') USING UTF8) as name,
m.name,
CONVERT(AES_DECRYPT(m.phone,'aideakey') USING UTF8) as phone,
m.open_id AS openId,
m.create_time as createTime,
......@@ -348,7 +348,7 @@
<!--个人信息回填
-->
<select id="memberFormation" parameterType="java.lang.String" resultType="com.cftech.member.model.MemberVO">
SELECT id,CONVERT(AES_DECRYPT(name,'aideakey') USING UTF8) AS memberName, sex, CONVERT(AES_DECRYPT(birthday,'aideakey')USING UTF8) birthday, imageurl,
SELECT id,name memberName, sex, CONVERT(AES_DECRYPT(birthday,'aideakey')USING UTF8) birthday, imageurl,
CONVERT(AES_DECRYPT(email,'aideakey')USING UTF8) AS mailbox, CONVERT(AES_DECRYPT(phone,'aideakey')USING UTF8) as phone, cardid
FROM wx_mp_member WHERE open_id = #{openid} and del_flag=0
</select>
......@@ -357,7 +357,7 @@
SELECT
f.id,
f.openid,
CONVERT(AES_DECRYPT(f.nickname,'aideakey') USING UTF8) nickname,
f.nickname nickname,
f.headimgurl,
CASE WHEN au.id IS NOT NULL THEN '1' ELSE '0' END isThree
FROM wx_mp_fanss f
......@@ -371,7 +371,7 @@
update wx_mp_member
<set>
<if test="memberName !=null">
`name` = AES_ENCRYPT(#{memberName},'aideakey'),
`name` = #{memberName},
</if>
<if test="sex !=null">
sex = #{sex},
......
......@@ -123,8 +123,11 @@ public class MemberServiceImpl extends GenericServiceImpl<Member> implements Mem
rtnJson.put("errorNo", "0");
rtnJson.put("data", member);
} else {
MpFanssEntity fanssEntity = fanssService.getWxUser(openid);
MemberVO member = memberVOS.get(0);
member.setImageUrl(fanssEntity.getHeadimgurl());
rtnJson.put("errorNo", "0");
rtnJson.put("data", memberVOS.get(0));
rtnJson.put("data", member);
}
} catch (Exception e) {
e.printStackTrace();
......
......@@ -175,7 +175,7 @@ public class MemberController {
// }
if (!StringUtils.isEmpty(member.getName())) {
conds.like("CONVERT(AES_DECRYPT(m.name,'aideakey') USING UTF8)", member.getName());
conds.like("m.name", member.getName());
}
if (!StringUtils.isEmpty(member.getPhone())) {
conds.like("CONVERT(AES_DECRYPT(m.phone,'aideakey') USING UTF8)", member.getPhone());
......@@ -261,7 +261,7 @@ public class MemberController {
conds.equal("m.del_flag", Constants.DEL_FLAG_0);
if (!StringUtils.isEmpty(member.getName())) {
conds.like("CONVERT(AES_DECRYPT(m.name,'aideakey') USING UTF8)", member.getName());
conds.like("m.name", member.getName());
}
if (!StringUtils.isEmpty(member.getPhone())) {
......
......@@ -186,7 +186,7 @@
<select id="fetchById" parameterType="java.lang.Long" resultMap="resultMap">
SELECT
<include refid="sqlColumns"/>,
CONVERT(AES_DECRYPT(f.nickname, 'aideakey') USING UTF8) nickName
f.nickname nickName
FROM t_shipping_address t
LEFT JOIN wx_mp_fanss f ON t.open_id = f.openid AND f.delflag = '0'
LEFT JOIN area a ON t.province_id = a.areaid
......
......@@ -94,7 +94,7 @@ public class MpFanssController {
conds.equal("source", mpFanssEntity.getSource());
}
if (StringUtils.isNotBlank(mpFanssEntity.getNickname())) {
conds.like("CONVERT(AES_DECRYPT(nickname,'aideakey') USING UTF8)", mpFanssEntity.getNickname());
conds.like("nickname", mpFanssEntity.getNickname());
}
if (StringUtils.isNotBlank(startTime)) {
conds.greatEqual("subscribetime", startTime);
......@@ -135,7 +135,7 @@ public class MpFanssController {
conds.equal("source", mpFanssEntity.getSource());
}
if (StringUtils.isNotBlank(mpFanssEntity.getNickname())) {
conds.like("CONVERT(AES_DECRYPT(nickname,'aideakey') USING UTF8)", mpFanssEntity.getNickname());
conds.like("nickname USING UTF8)", mpFanssEntity.getNickname());
}
if (StringUtils.isNotBlank(startTime)) {
conds.greatEqual("t.subscribetime", startTime);
......
......@@ -49,12 +49,12 @@
<sql id="Base_Column_List_Store">
t.id, t.openid,t.canceltime,
CONVERT(AES_DECRYPT(t.nickname,'aideakey') USING UTF8) nickname,t.sex, CONVERT(AES_DECRYPT(t.city,'aideakey') USING UTF8) city,CONVERT(AES_DECRYPT(t.province,'aideakey') USING UTF8) province,t.country,t.headimgurl,t.createtime,t.subscribetime,
t.nickname nickname,t.sex, CONVERT(AES_DECRYPT(t.city,'aideakey') USING UTF8) city,CONVERT(AES_DECRYPT(t.province,'aideakey') USING UTF8) province,t.country,t.headimgurl,t.createtime,t.subscribetime,
t.delflag,t.status,t.source
</sql>
<sql id="Base_Column_List">
id, openid, canceltime, CONVERT(AES_DECRYPT(nickname,'aideakey') USING UTF8) nickname, sex,CONVERT(AES_DECRYPT(city,'aideakey') USING UTF8) city,CONVERT(AES_DECRYPT(province,'aideakey') USING UTF8) province,country,country,headimgurl,createtime,subscribetime,delflag,status,source,recommender,store,taglist
id, openid, canceltime, nickname nickname, sex,CONVERT(AES_DECRYPT(city,'aideakey') USING UTF8) city,CONVERT(AES_DECRYPT(province,'aideakey') USING UTF8) province,country,country,headimgurl,createtime,subscribetime,delflag,status,source,recommender,store,taglist
</sql>
......@@ -94,7 +94,7 @@
sex,city,province,country,delflag,headimgurl,
subscribetime,createtime,timestamp,updatetime,mpaccountid,userid,taglist,status,recommender,store,source,description,unionid)
values (#{openid,jdbcType=VARCHAR},
AES_ENCRYPT( #{nickname,jdbcType=VARBINARY},'aideakey'),
#{nickname,jdbcType=VARCHAR},
#{sex,jdbcType=VARCHAR},
AES_ENCRYPT(#{city,jdbcType=VARBINARY},'aideakey'),
AES_ENCRYPT( #{province,jdbcType=VARBINARY},'aideakey'),
......@@ -162,7 +162,6 @@
<update id="updateByPrimaryKey" parameterType="com.cftech.mp.fans.model.MpFanssEntity">
update wx_mp_fanss
<set>
<if test="encodingaeskey != null">
encodingaeskey = #{encodingaeskey,jdbcType=VARCHAR},
</if>
......@@ -237,7 +236,7 @@
id = #{id},
</if>
<if test="nickname != null">
nickname = AES_ENCRYPT(#{nickname},'aideakey'),
nickname = #{nickname},
</if>
<if test="sex != null">
sex = #{sex},
......
......@@ -176,6 +176,7 @@
<div class="form-group form-md-line-input col-md-4">
<label>职位</label>
<select name="positionId" class="form-control pull-right">
<option value="">请选择职位</option>
#foreach($item in $positions)
<option label="${item.name}" value="${item.id}" #if($item.id == $data.positionId) selected #end>${item.name}</option>
#end
......
......@@ -126,7 +126,7 @@
SELECT
t.id, t.name, t.qrcode, t.avatar, t.mobile, t.email, t.role, t.wxno, t.gender, t.accounts_id,
t.store_id, t.store_name, t.wxuser_id, t.org_id, t.tag_ids, t.status, t.create_time,
t.update_time, t.description, t.del_flag, t.create_by, t.update_by,u.username loginName, t.user_type, t.peak_val, t.assigned, t.un_assigned
t.update_time, t.description, t.del_flag, t.create_by, t.update_by,u.username loginName, t.user_type, t.peak_val, t.assigned, t.un_assigned, t.position_id
FROM t_qyuser t
left join user u on u.userid=t.id
WHERE t.id=#{id}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment