longmeizhen@avic-s.com há 11 meses atrás
pai
commit
6c887e0335

+ 1 - 1
src/main/webapp/WEB-INF/pages/admin/visitor/visitorOrderInfoList.jsp

@@ -110,7 +110,7 @@
 <script type="text/html" id="indexTpl">
 	{{d.LAY_TABLE_INDEX+1}}
 </script>
-<script type="text/javascript" src="<c:url value='/scripts/admin/visitor/visitorOrderInfoList.js?v=20220614.1'/>"></script>
+<script type="text/javascript" src="<c:url value='/scripts/admin/visitor/visitorOrderInfoList.js?v=20231221'/>"></script>
 
 
 </html>

+ 53 - 7
src/main/webapp/scripts/admin/visitor/visitorOrderInfoList.js

@@ -785,6 +785,7 @@ $(function () {
 				})
 				$(".save_btn").on("click", function () {
 					var orgId = $('.meal-select#orgId').attr('org__id')
+
 					var passType = "",koalaAuthUrl= "",koalaUserName= "",koalaUserPwd= "",show = false
 					if(!orgId){
 						layer.msg("请选择项目");
@@ -833,7 +834,7 @@ $(function () {
 						},
 						success: function (data) {
 							if (data && data.code == 200) {
-								_this.saveSetData()
+								_this.saveSetData(orgId)
 							}else{
 								layer.msg(data.msg)
 							}
@@ -862,7 +863,8 @@ $(function () {
 				console.log('fieldList', fieldList)
 			})
 		},
-		saveSetData() {
+		saveSetData(orgId) {
+			setData.orgId=orgId
 			fieldList.forEach(item => {
 				if (item.label === '被访人公司') {
 					setData.visitedCompType = item.value
@@ -1586,19 +1588,25 @@ $(function () {
 				url: contextPath + "/api/organisation/organization/"+orgid,
 				success: function (data) {
 					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);
-						}
-						if(data.data.passType.indexOf("2") != -1){
+						}else if(data.data.passType=="2"){
 							$("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);
 							$(".kaola_info").css("display","block");
 							$(".koalaAuthUrl input").val(data.data.koalaAuthUrl)
 							$(".koalaUserName input").val(data.data.koalaUserName)
 							$(".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) {
@@ -1659,6 +1667,44 @@ $(function () {
 								$("#make").attr("checked",true);
 							}
 							_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()
 						}
 					}
 				},