|
@@ -785,6 +785,7 @@ $(function () {
|
|
})
|
|
})
|
|
$(".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
|
|
if(!orgId){
|
|
if(!orgId){
|
|
layer.msg("请选择项目");
|
|
layer.msg("请选择项目");
|
|
@@ -833,7 +834,7 @@ $(function () {
|
|
},
|
|
},
|
|
success: function (data) {
|
|
success: function (data) {
|
|
if (data && data.code == 200) {
|
|
if (data && data.code == 200) {
|
|
- _this.saveSetData()
|
|
|
|
|
|
+ _this.saveSetData(orgId)
|
|
}else{
|
|
}else{
|
|
layer.msg(data.msg)
|
|
layer.msg(data.msg)
|
|
}
|
|
}
|
|
@@ -862,7 +863,8 @@ $(function () {
|
|
console.log('fieldList', fieldList)
|
|
console.log('fieldList', fieldList)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- saveSetData() {
|
|
|
|
|
|
+ saveSetData(orgId) {
|
|
|
|
+ setData.orgId=orgId
|
|
fieldList.forEach(item => {
|
|
fieldList.forEach(item => {
|
|
if (item.label === '被访人公司') {
|
|
if (item.label === '被访人公司') {
|
|
setData.visitedCompType = item.value
|
|
setData.visitedCompType = item.value
|
|
@@ -1586,19 +1588,25 @@ $(function () {
|
|
url: contextPath + "/api/organisation/organization/"+orgid,
|
|
url: contextPath + "/api/organisation/organization/"+orgid,
|
|
success: function (data) {
|
|
success: function (data) {
|
|
if (data && data.code == 200) {
|
|
if (data && data.code == 200) {
|
|
- if(data.data.passType.indexOf("3") != -1){
|
|
|
|
|
|
+ if(data.data.passType=="3"){
|
|
$("input[type='checkbox']").eq(0).attr("checked",true);
|
|
$("input[type='checkbox']").eq(0).attr("checked",true);
|
|
- }
|
|
|
|
- if(data.data.passType.indexOf("2") != -1){
|
|
|
|
|
|
+ }else if(data.data.passType=="2"){
|
|
$("input[type='checkbox']").eq(1).attr("checked",true);
|
|
$("input[type='checkbox']").eq(1).attr("checked",true);
|
|
- }
|
|
|
|
- if(data.data.passType.indexOf("4") != -1){
|
|
|
|
|
|
+ }else if(data.data.passType=="4"){
|
|
$("input[type='checkbox']").eq(2).attr("checked",true);
|
|
$("input[type='checkbox']").eq(2).attr("checked",true);
|
|
$(".kaola_info").css("display","block");
|
|
$(".kaola_info").css("display","block");
|
|
$(".koalaAuthUrl input").val(data.data.koalaAuthUrl)
|
|
$(".koalaAuthUrl input").val(data.data.koalaAuthUrl)
|
|
$(".koalaUserName input").val(data.data.koalaUserName)
|
|
$(".koalaUserName input").val(data.data.koalaUserName)
|
|
$(".koalaUserPwd input").val(data.data.koalaUserPwd)
|
|
$(".koalaUserPwd input").val(data.data.koalaUserPwd)
|
|
|
|
+ }else{
|
|
|
|
+ $("input[type='checkbox']").eq(0).attr("checked",false);
|
|
|
|
+ $("input[type='checkbox']").eq(1).attr("checked",false);
|
|
|
|
+ $("input[type='checkbox']").eq(2).attr("checked",false);
|
|
}
|
|
}
|
|
|
|
+ }else{
|
|
|
|
+ $("input[type='checkbox']").eq(0).attr("checked",false);
|
|
|
|
+ $("input[type='checkbox']").eq(1).attr("checked",false);
|
|
|
|
+ $("input[type='checkbox']").eq(2).attr("checked",false);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
error: function (error) {
|
|
error: function (error) {
|
|
@@ -1659,6 +1667,44 @@ $(function () {
|
|
$("#make").attr("checked",true);
|
|
$("#make").attr("checked",true);
|
|
}
|
|
}
|
|
_this.upFieldDataUI()
|
|
_this.upFieldDataUI()
|
|
|
|
+ }else{
|
|
|
|
+ console.log("111111111111")
|
|
|
|
+ setData = {
|
|
|
|
+ id: "",
|
|
|
|
+ orgId: "",
|
|
|
|
+ isLinglingAudit:"",
|
|
|
|
+ visitedCompType:"",
|
|
|
|
+ visitedMobileType: "",
|
|
|
|
+ visitCompType: "",
|
|
|
|
+ visitNameType: "",
|
|
|
|
+ orderAffirm:""
|
|
|
|
+ }
|
|
|
|
+ $("#audit").attr("checked",false);
|
|
|
|
+ $("#make").attr("checked",false);
|
|
|
|
+ fieldList.forEach(item => {
|
|
|
|
+ if (item.label === '被访人公司') {
|
|
|
|
+ item.value = setData.visitedCompType
|
|
|
|
+ }
|
|
|
|
+ if (item.label === '被访人手机号') {
|
|
|
|
+ item.value = setData.visitedMobileType
|
|
|
|
+ }
|
|
|
|
+ if (item.label === '访客公司') {
|
|
|
|
+ item.value = setData.visitCompType
|
|
|
|
+ }
|
|
|
|
+ if (item.label === '访客姓名') {
|
|
|
|
+ item.value = setData.visitNameType
|
|
|
|
+ }
|
|
|
|
+ if (setData.isLinglingAudit == 1) {
|
|
|
|
+ if (item.label === '被访人公司'||item.label === '被访人手机号') {
|
|
|
|
+ item.disabled = false
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (item.label === '被访人公司'||item.label === '被访人手机号') {
|
|
|
|
+ item.disabled = true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ _this.upFieldDataUI()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|