|
@@ -273,6 +273,18 @@ $(function () {
|
|
</div>\
|
|
</div>\
|
|
</div>\
|
|
</div>\
|
|
<div class="view-flex">\
|
|
<div class="view-flex">\
|
|
|
|
+ <div class="plan-title">预约信息确认:</div>\
|
|
|
|
+ <div class="xq_audit_item clearfloat required group-item">\
|
|
|
|
+ <div class="checkbox-wp">\
|
|
|
|
+ <span class="checkbox-input">\
|
|
|
|
+ <input type="checkbox" id="make" class="check-item staple-make" data-id="6"/>\
|
|
|
|
+ <span class="checkbox-inner"></span>\
|
|
|
|
+ </span> \
|
|
|
|
+ <label class="checkbox-con" for="wx-6">开启</label>\
|
|
|
|
+ </div>\
|
|
|
|
+ </div>\
|
|
|
|
+ </div>\
|
|
|
|
+ <div class="view-flex">\
|
|
<div class="plan-title">预约输入字段:</div>\
|
|
<div class="plan-title">预约输入字段:</div>\
|
|
<div class="field-content"></div>\
|
|
<div class="field-content"></div>\
|
|
</div>\
|
|
</div>\
|
|
@@ -409,6 +421,36 @@ $(function () {
|
|
</div>\
|
|
</div>\
|
|
</div>\
|
|
</div>\
|
|
</div> ',
|
|
</div> ',
|
|
|
|
+ "visitorCodeTpl": '<div class="dialog-wp">\
|
|
|
|
+ <div class="mask"></div>\
|
|
|
|
+ <div class="dialog dialog-print-con">\
|
|
|
|
+ <div class="title-wp">\
|
|
|
|
+ <span>访客预约码</span>\
|
|
|
|
+ <span class="close-btn"></button>\
|
|
|
|
+ </div>\
|
|
|
|
+ <div class=" dialog-print-wp " >\
|
|
|
|
+ <div class="base-title" style="text-align: center;margin-bottom: 20px;"><%=orgName%></div>\
|
|
|
|
+ <div class="print-item">\
|
|
|
|
+ <div class="p-i-tip">链接:</div>\
|
|
|
|
+ <div class="p-i-con">\
|
|
|
|
+ <span class="p-i-input p-span-url">\
|
|
|
|
+ <%=qrUrl%>\
|
|
|
|
+ </span>\
|
|
|
|
+ </div>\
|
|
|
|
+ </div>\
|
|
|
|
+ <div class="print-item">\
|
|
|
|
+ <button class="btn-white btn-copy">复制链接</button>\
|
|
|
|
+ <button class="btn-white btn-qr-code">生成二维码</button>\
|
|
|
|
+ </div>\
|
|
|
|
+ <div class="print-item">\
|
|
|
|
+ <div class="qr-left" id="qrCode"></div>\
|
|
|
|
+ </div>\
|
|
|
|
+ </div>\
|
|
|
|
+ <div class="dialog-btns">\
|
|
|
|
+ <button class="btn-white cancel-btn">返回</button>\
|
|
|
|
+ </div>\
|
|
|
|
+ </div>\
|
|
|
|
+ </div>',
|
|
"visitorModelTpl": '<div class="dialog-wp">\
|
|
"visitorModelTpl": '<div class="dialog-wp">\
|
|
<div class="mask"></div>\
|
|
<div class="mask"></div>\
|
|
<div class="dialog dialog-print-con">\
|
|
<div class="dialog dialog-print-con">\
|
|
@@ -495,7 +537,8 @@ $(function () {
|
|
visitedCompType: 1,
|
|
visitedCompType: 1,
|
|
visitedMobileType: 1,
|
|
visitedMobileType: 1,
|
|
visitCompType: 1,
|
|
visitCompType: 1,
|
|
- visitNameType: 1
|
|
|
|
|
|
+ visitNameType: 1,
|
|
|
|
+ orderAffirm: 0
|
|
};
|
|
};
|
|
fieldList = [
|
|
fieldList = [
|
|
{
|
|
{
|
|
@@ -656,6 +699,35 @@ $(function () {
|
|
}, function (index) {});
|
|
}, function (index) {});
|
|
|
|
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+ // 访客预约码
|
|
|
|
+ $(".reservation-code").on("click", function () {
|
|
|
|
+ var orgId = $("#conditionform #orgId").attr('org__id');
|
|
|
|
+ _this.getVisitorQenterUrlHandler(orgId, backData => {
|
|
|
|
+ if (!backData) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ console.log('backData', backData);
|
|
|
|
+ $("body").append(template.render(tpl.visitorCodeTpl)({
|
|
|
|
+ orgName: $("#conditionform #orgId").val(),
|
|
|
|
+ qrUrl: backData
|
|
|
|
+ }));
|
|
|
|
+
|
|
|
|
+ $(".btn-copy").on("click", function () {
|
|
|
|
+ _this.copyToClipboard(backData)
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ $(".btn-qr-code").on("click", function () {
|
|
|
|
+ $("#qrCode").empty(); // 清空子元素
|
|
|
|
+ $("#qrCode").qrcode({width:200,height:200,text:backData});
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ $(".close-btn,.dialog-wp .cancel-btn").on("click", function () {
|
|
|
|
+ $(".dialog-wp").remove();
|
|
|
|
+ })
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+
|
|
// 通行方案设计
|
|
// 通行方案设计
|
|
$(".through-plan").on("click", function () {
|
|
$(".through-plan").on("click", function () {
|
|
$("body").append(template.render(tpl.throughTpl)({
|
|
$("body").append(template.render(tpl.throughTpl)({
|
|
@@ -701,6 +773,16 @@ $(function () {
|
|
})
|
|
})
|
|
_this.upFieldDataUI()
|
|
_this.upFieldDataUI()
|
|
})
|
|
})
|
|
|
|
+ $(".staple-make").on("click",function(){
|
|
|
|
+ let arr = $(".xq_audit_item .staple-make:checked")
|
|
|
|
+ if (arr.length>0) {
|
|
|
|
+ if ($(arr[0]).data("id") == 6) {
|
|
|
|
+ setData.orderAffirm = 1;
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ setData.orderAffirm = 0;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
$(".save_btn").on("click", function () {
|
|
$(".save_btn").on("click", function () {
|
|
var orgId = $('.meal-select#orgId').attr('org__id')
|
|
var orgId = $('.meal-select#orgId').attr('org__id')
|
|
var passType = "",koalaAuthUrl= "",koalaUserName= "",koalaUserPwd= "",show = false
|
|
var passType = "",koalaAuthUrl= "",koalaUserName= "",koalaUserPwd= "",show = false
|
|
@@ -815,6 +897,24 @@ $(function () {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ copyToClipboard: function(str) {
|
|
|
|
+ const el = document.createElement('textarea'); //创建input对象
|
|
|
|
+ el.value = str;
|
|
|
|
+ el.setAttribute('readonly', ''); //当前获得焦点的元素
|
|
|
|
+ el.style.position = 'absolute';
|
|
|
|
+ el.style.left = '-9999px';
|
|
|
|
+ document.body.appendChild(el); //添加元素
|
|
|
|
+ const selectedStr = document.getSelection().rangeCount > 0 ? document.getSelection().getRangeAt(0) : false;
|
|
|
|
+ el.select();
|
|
|
|
+ document.execCommand('copy'); //执行复制
|
|
|
|
+ document.body.removeChild(el);//删除元素
|
|
|
|
+ if (selectedStr) {
|
|
|
|
+ document.getSelection().removeAllRanges();
|
|
|
|
+ document.getSelection().addRange(selectedStr);
|
|
|
|
+ }
|
|
|
|
+ layer.msg('复制完成')
|
|
|
|
+ },
|
|
//导出
|
|
//导出
|
|
exportAjax: function () {
|
|
exportAjax: function () {
|
|
var _this = this;
|
|
var _this = this;
|
|
@@ -933,6 +1033,7 @@ $(function () {
|
|
click_callback:function(){
|
|
click_callback:function(){
|
|
var orgId = $('.meal-select#orgId').attr('org__id')
|
|
var orgId = $('.meal-select#orgId').attr('org__id')
|
|
_this.getCaseDetail(orgId)
|
|
_this.getCaseDetail(orgId)
|
|
|
|
+ _this.getSetData(orgId)
|
|
} })
|
|
} })
|
|
},
|
|
},
|
|
//模糊搜索事件
|
|
//模糊搜索事件
|
|
@@ -1332,6 +1433,29 @@ $(function () {
|
|
}
|
|
}
|
|
return fmt
|
|
return fmt
|
|
},
|
|
},
|
|
|
|
+ // 获取访客预约码地址
|
|
|
|
+ getVisitorQenterUrlHandler: function (orgId, callback) {
|
|
|
|
+ console.log('orgId', orgId);
|
|
|
|
+ let contextPath = window.location.hostname === 'localhost'? 'https://wx.palmnest.com/super_cloud' : $("#contextPath").val().split("super_service")[0]+"super_cloud"
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: "post",
|
|
|
|
+ url: contextPath + "/api/organisation/wechat/qenter/getVisitorQenterUrl",
|
|
|
|
+ data: {
|
|
|
|
+ "orgId": orgId,
|
|
|
|
+ },
|
|
|
|
+ success: function (data) {
|
|
|
|
+ if (data && data.code == 200) {
|
|
|
|
+ callback(data.data);
|
|
|
|
+ } else {
|
|
|
|
+ layer.msg(data.msg);
|
|
|
|
+ callback();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error: function (error) {
|
|
|
|
+ layer.msg('error')
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
visitorRegister: function (data, callback) {
|
|
visitorRegister: function (data, callback) {
|
|
var _this = this;
|
|
var _this = this;
|
|
$.ajax({
|
|
$.ajax({
|
|
@@ -1502,7 +1626,8 @@ $(function () {
|
|
visitedCompType: data.data.visitedCompType,
|
|
visitedCompType: data.data.visitedCompType,
|
|
visitedMobileType: data.data.visitedMobileType,
|
|
visitedMobileType: data.data.visitedMobileType,
|
|
visitCompType: data.data.visitCompType,
|
|
visitCompType: data.data.visitCompType,
|
|
- visitNameType: data.data.visitNameType
|
|
|
|
|
|
+ visitNameType: data.data.visitNameType,
|
|
|
|
+ orderAffirm: data.data.orderAffirm
|
|
}
|
|
}
|
|
fieldList.forEach(item => {
|
|
fieldList.forEach(item => {
|
|
if (item.label === '被访人公司') {
|
|
if (item.label === '被访人公司') {
|
|
@@ -1530,6 +1655,9 @@ $(function () {
|
|
if (setData.isLinglingAudit == 1) {
|
|
if (setData.isLinglingAudit == 1) {
|
|
$("#audit").attr("checked",true);
|
|
$("#audit").attr("checked",true);
|
|
}
|
|
}
|
|
|
|
+ if (setData.orderAffirm == 1) {
|
|
|
|
+ $("#make").attr("checked",true);
|
|
|
|
+ }
|
|
_this.upFieldDataUI()
|
|
_this.upFieldDataUI()
|
|
}
|
|
}
|
|
}
|
|
}
|