tinfoclass_add.js 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672
  1. var i=0;
  2. var checkflag=true;
  3. $(".mainform")
  4. .Validform(
  5. {
  6. btnSubmit : "#btn_sub",
  7. tiptype: function (msg, o, cssctl) {
  8. if (o.type == 3) {//失败
  9. layer.tips(msg, o.obj, {
  10. tips: [1, '#F74D4D'],
  11. time: 3000
  12. });
  13. }
  14. },
  15. showAllError : true,
  16. ignoreHidden : true,
  17. beforeCheck : function(curform) {
  18. //在表单提交执行验证之前执行的函数,curform参数是当前表单对象。
  19. //这里明确return false的话将不会继续执行验证操作;
  20. },
  21. beforeSubmit : function(curform) {
  22. //在验证成功后,表单提交前执行的函数,curform参数是当前表单对象。
  23. //这里明确return false的话表单将不会提交;
  24. },
  25. callback : function(form) {
  26. var isCf=false;
  27. var ary= new Array();
  28. var ary2= new Array();
  29. $("input[name='xxxmc']").each(function(){
  30. ary.push($(this).val());
  31. });
  32. $("input[name='xxxdbmc']").each(function(){
  33. ary2.push($(this).val());
  34. });
  35. if(ary.length==0 || ary2.length==0){
  36. isCf=true;
  37. alert("您尚未填写完整相关信息项信息,请填写后提交。");
  38. }
  39. var nary=ary.sort();
  40. for(var i = 0; i < nary.length - 1; i++)
  41. {
  42. if (nary[i] == nary[i+1])
  43. {
  44. isCf=true;
  45. alert("存在重复信息项名称:" + nary[i]+",请修改后提交。");
  46. break;
  47. }
  48. }
  49. var nary2=ary2.sort();
  50. for(var i = 0; i < nary2.length - 1; i++)
  51. {
  52. if (nary2[i] == nary2[i+1])
  53. {
  54. isCf=true;
  55. alert("存在重复信息项英文名称:" + nary2[i]+",请修改后提交。");
  56. break;
  57. }
  58. }
  59. if(!isCf){
  60. var data1={"id":$("#id").val(),"infoname":$("#infoname").val(),"providebmcode":$("#providebmcode").val()};
  61. $.ajax({
  62. async:false,
  63. type:"post",
  64. url:"../tinfoclass/infonameUnique",
  65. contentType: "application/x-www-form-urlencoded;charset=utf-8",
  66. dataType: 'json',
  67. data:data1,
  68. success:function(result){
  69. if(result.exist=='0'){
  70. var check = confirm("您确定要提交表单吗?");
  71. if (check&&checkflag) {
  72. checkflag=false;
  73. mainform.action = "../tinfoclass/tinfoclass_save";
  74. mainform.submit();
  75. }
  76. }
  77. else{
  78. layer.msg('本部门中已存在该信息类名称,请修改信息类名称', {icon: 6});
  79. }
  80. },
  81. error:function(){
  82. layer.msg('服务器异常', {icon: 6});
  83. }
  84. });
  85. }
  86. return false;
  87. }
  88. });
  89. $(document).ready(function(){
  90. $('#sharetype').change(function(){
  91. if($(this).val()=="1"){
  92. $("#shareconditionsDis").show();
  93. $("#gxtj").text("共享条件");
  94. //传值取判断共享方式的取值,判断前先清空下拉框中的值
  95. issharemode($(this).val());
  96. }
  97. else if($(this).val()=="3"){
  98. $("#shareconditionsDis").show();
  99. $("#gxtj").text("不予共享依据");
  100. //传值取判断共享方式的取值,判断前先清空下拉框中的值
  101. issharemode($(this).val());
  102. }
  103. else{
  104. $("#shareconditionsDis").hide();
  105. $("#shareconditions").val("");
  106. //传值取判断共享方式的取值,判断前先清空下拉框中的值
  107. issharemode($(this).val());
  108. }
  109. })
  110. $("#isopensocial").change(function(){
  111. if($(this).val()=="不予开放"){
  112. $("#openconditionDis").show();
  113. $("#kftj").text("不予开放依据");
  114. }
  115. else if($(this).val()=="无条件开放"){
  116. $("#openconditionDis").hide();
  117. $("#opencondition").val("");
  118. }
  119. else if($(this).val()=="有条件开放"){
  120. $("#openconditionDis").show();
  121. $("#opencondition").val("依申请开放");
  122. $("#kftj").text("开放条件");
  123. }
  124. else{
  125. $("#openconditionDis").hide();
  126. $("#opencondition").val("");
  127. }
  128. })
  129. $("#managetype").change(function(){
  130. if($(this).val()=="是"){
  131. $("#glxtDis").show();
  132. }
  133. else if($(this).val()=="否"){
  134. $("#glxtDis").hide();
  135. $("#systeminfoname").val("");
  136. $("#systeminfoid").val("");
  137. }
  138. })
  139. $("#isglqz").change(function(){
  140. if($(this).val()=="是"){
  141. $("#isglqzDis").show();
  142. $("#isglqzDis2").hide();
  143. $('#qzqdBt').text("*");
  144. $("#qzqdDes").val("");
  145. $('#qzqd').removeAttr("ignore");
  146. }
  147. else if($(this).val()=="否"){
  148. $("#isglqzDis").hide();
  149. $("#isglqzDis2").show();
  150. if( $("#qzqdDes").val()==""){
  151. $("#qzqdDes").val("无需关联权责");
  152. }
  153. $("#qzqd").val("");
  154. $("#qzqdid").val("");
  155. }else{
  156. $("#isglqzDis").hide();
  157. $("#isglqzDis2").hide();
  158. $("#qzqd").val("");
  159. $("#qzqdid").val("");
  160. }
  161. })
  162. $("#glzyfl").bind("click",function(){
  163. var dgurl="../resClassify/resClassify_check";
  164. var index=layer.open({
  165. type: 2,
  166. move: false,
  167. area: [($(window).width()-80)+'px', ($(window).height()-80)+'px'],
  168. offset: '50px',
  169. shadeClose: true ,
  170. title : '资源分类',
  171. content: dgurl //这里content是一个URL,如果你不想让iframe出现滚动条,你还可以content: ['http://sentsin.com', 'no']
  172. });
  173. layer.full(index);
  174. });
  175. /**
  176. * 资源分类选择页面
  177. */
  178. $("#infotypename").bind("click",function(){
  179. var dgurl="../resClassify/resClassify_choose";
  180. var index=layer.open({
  181. type: 2,
  182. move: false,
  183. area: [($(window).width()-80)+'px', ($(window).height()-80)+'px'],
  184. offset: '50px',
  185. shadeClose: true ,
  186. title : '资源分类',
  187. content: dgurl //这里content是一个URL,如果你不想让iframe出现滚动条,你还可以content: ['http://sentsin.com', 'no']
  188. });
  189. layer.full(index);
  190. })
  191. $("#ywbmname").bind("click",ywbmChoose);
  192. function ywbmChoose(){
  193. var dgurl="../code/ywbm_choose";
  194. var index=layer.open({
  195. type: 2,
  196. move: false,
  197. area: [($(window).width()-80)+'px', ($(window).height()-80)+'px'],
  198. offset: '50px',
  199. shadeClose: true ,
  200. title : '业务部门',
  201. content: dgurl //这里content是一个URL,如果你不想让iframe出现滚动条,你还可以content: ['http://sentsin.com', 'no']
  202. });
  203. layer.full(index);
  204. }
  205. $("#xzqhname").bind("click",xzqhChoose);
  206. function xzqhChoose(){
  207. var dgurl="../code/xzqh_choose";
  208. var index=layer.open({
  209. type: 2,
  210. move: false,
  211. area: [($(window).width()-80)+'px', ($(window).height()-80)+'px'],
  212. offset: '50px',
  213. shadeClose: true ,
  214. title : '行政区划',
  215. content: dgurl //这里content是一个URL,如果你不想让iframe出现滚动条,你还可以content: ['http://sentsin.com', 'no']
  216. });
  217. layer.full(index);
  218. }
  219. /**
  220. * 提供方选择页面
  221. */
  222. // $("#providename").bind("click",function(){
  223. // var dgurl="../tinfoclass/dept_choose?type=1";
  224. // var index=layer.open({
  225. // type: 2,
  226. // move: false,
  227. // area: [($(window).width()-80)+'px', ($(window).height()-80)+'px'],
  228. // offset: '50px',
  229. // shadeClose: true ,
  230. // title : '信息类提供方',
  231. // content: dgurl //这里content是一个URL,如果你不想让iframe出现滚动条,你还可以content: ['http://sentsin.com', 'no']
  232. // });
  233. //
  234. // })
  235. $("#providebmname").bind("click",function(){
  236. var dgurl="../tinfoclass/dept_choose?type=2";
  237. var index=layer.open({
  238. type: 2,
  239. move: false,
  240. area: [($(window).width()-80)+'px', ($(window).height()-80)+'px'],
  241. offset: '50px',
  242. shadeClose: true ,
  243. title : '信息类提供方部门',
  244. content: dgurl //这里content是一个URL,如果你不想让iframe出现滚动条,你还可以content: ['http://sentsin.com', 'no']
  245. });
  246. layer.full(index);
  247. })
  248. $("#providezgname").bind("click",function(){
  249. var dgurl="../tinfoclass/dept_choose?type=3";
  250. var index=layer.open({
  251. type: 2,
  252. move: false,
  253. area: [($(window).width()-80)+'px', ($(window).height()-80)+'px'],
  254. offset: '50px',
  255. shadeClose: true ,
  256. title : '信息类提供方主管部门',
  257. content: dgurl //这里content是一个URL,如果你不想让iframe出现滚动条,你还可以content: ['http://sentsin.com', 'no']
  258. });
  259. layer.full(index);
  260. })
  261. $('#formattype').change(function(){
  262. var optionObj=$(this).find("option:selected");
  263. $("#formattypename").val(optionObj.attr("formattypename"));
  264. $("#formattypeid").val(optionObj.attr("formattypeid"));
  265. $.ajax({
  266. async:false,
  267. type:"post",
  268. url:"../tinfoclass/tinfoclass_item-"+optionObj.val(),
  269. contentType: "application/json;charset=utf-8",
  270. dataType: 'json',
  271. success:function(result){
  272. $("#subformattype option").remove();
  273. $("#subformattype").append("<option value='' subformattypename='' subformattypeid='' title='请选择'>请选择</option>");
  274. for (var i = 0; i < result.length; i++) {
  275. $("#subformattype").append("<option value='"+result[i].codeCode+"' subformattypename='"+result[i].codeCode+"' subformattypeid='"+result[i].id+"'>"+result[i].codeName+"</option>");
  276. }
  277. },
  278. error:function(){
  279. }
  280. });
  281. });
  282. /**
  283. * 关联业务系统 选择
  284. */
  285. $("#systeminfoname").bind("click",function(){
  286. var dgurl="../systeminfo/systeminfo_choose_list";
  287. var index=layer.open({
  288. type: 2,
  289. move: false,
  290. area: [($(window).width()-80)+'px', ($(window).height()-80)+'px'],
  291. offset: '50px',
  292. shadeClose: true ,
  293. title : '业务系统',
  294. content: dgurl //这里content是一个URL,如果你不想让iframe出现滚动条,你还可以content: ['http://sentsin.com', 'no']
  295. });
  296. layer.full(index);
  297. });
  298. $("#qzqd").bind("click",function(){
  299. var dgurl="../powerrespon/choose_list";
  300. var index=layer.open({
  301. type: 2,
  302. move: false,
  303. area: [($(window).width()-80)+'px', ($(window).height()-80)+'px'],
  304. offset: '50px',
  305. shadeClose: true ,
  306. title : '权责清单',
  307. content: dgurl //这里content是一个URL,如果你不想让iframe出现滚动条,你还可以content: ['http://sentsin.com', 'no']
  308. });
  309. layer.full(index);
  310. });
  311. /**
  312. * 关联业务事项选择
  313. */
  314. $("#ywsx").bind("click",function(){
  315. var dgurl="../tbusinessitem/tbusinessitem_choose_list";
  316. var index=layer.open({
  317. type: 2,
  318. move: false,
  319. area: [($(window).width()-80)+'px', ($(window).height()-80)+'px'],
  320. offset: '50px',
  321. shadeClose: true ,
  322. title : '业务事项',
  323. content: dgurl //这里content是一个URL,如果你不想让iframe出现滚动条,你还可以content: ['http://sentsin.com', 'no']
  324. });
  325. layer.full(index);
  326. });
  327. $('#subformattype').change(function(){
  328. var optionObj=$(this).find("option:selected");
  329. $("#subformattypename").val(optionObj.attr("subformattypename"));
  330. $("#subformattypeid").val(optionObj.attr("subformattypeid"));
  331. })
  332. $('#sharemode').change(function(){
  333. var iteValue = $("#sharetype").val();
  334. console.log('sharetype的值:' + iteValue);
  335. var optionObj=$(this).find("option:selected");
  336. $("#sharemodename").val(optionObj.attr("sharemodename"));
  337. $("#sharemodeid").val(optionObj.attr("sharemodeid"));
  338. $.ajax({
  339. async:false,
  340. type:"post",
  341. url:"../tinfoclass/tinfoclass_item-"+optionObj.val(),
  342. contentType: "application/json;charset=utf-8",
  343. dataType: 'json',
  344. success:function(result){
  345. $("#sharemodetype option").remove();
  346. $("#sharemodetype").append("<option value='' sharemodetypename='' sharemodetypeid='' title='请选择'>请选择</option>");
  347. for (var i = 0; i < result.length; i++) {
  348. $("#sharemodetype").append("<option value='"+result[i].codeCode+"' sharemodetypename='"+result[i].codeName+"' sharemodetypeid='"+result[i].id+"'>"+result[i].codeName+"</option>");
  349. }
  350. },
  351. error:function(){
  352. }
  353. });
  354. })
  355. $('#sharemodetype').change(function(){
  356. var optionObj=$(this).find("option:selected");
  357. $("#sharemodetypename").val(optionObj.attr("sharemodetypename"));
  358. $("#sharemodetypeid").val(optionObj.attr("sharemodetypeid"));
  359. })
  360. // 设置默认值
  361. $("#managetype").val("否");
  362. $("#isglqz").val("否");
  363. })
  364. function deleteInfo(obj){
  365. $("#"+obj).remove();
  366. }
  367. function editxxxInfo(id){
  368. var dgurl="../tinfoclass/tinfoclass_xxladd?id="+id;
  369. var index=layer.open({
  370. type: 2,
  371. move: false,
  372. area: [($(window).width()-80)+'px', ($(window).height()-80)+'px'],
  373. offset: '50px',
  374. shadeClose: true ,
  375. title : '信息项新增',
  376. content: dgurl //这里content是一个URL,如果你不想让iframe出现滚动条,你还可以content: ['http://sentsin.com', 'no']
  377. });
  378. layer.full(index);
  379. }
  380. function editxxxInfoHx(id){
  381. var obj = new Object();
  382. obj.isprimary=$("#"+id+" select[name='isprimary']").val();
  383. obj.xxxmc=$("#"+id+" input[name='xxxmc']").val();
  384. obj.xxxbm=$("#"+id+" input[name='xxxbm']").val();
  385. obj.xxxdbmc=$("#"+id+" input[name='xxxdbmc']").val();
  386. obj.glsjy=$("#"+id+" input[name='glsjy']").val();
  387. obj.sjymc=$("#"+id+" input[name='sjymc']").val();
  388. obj.sjylbname=$("#"+id+" input[name='sjylbname']").val();
  389. obj.sjylb=$("#"+id+" input[name='sjylb']").val();
  390. obj.sjylbid=$("#"+id+" input[name='sjylbid']").val();
  391. obj.subsjylbname=$("#"+id+" input[name='subsjylbname']").val();
  392. obj.subsjylb=$("#"+id+" input[name='subsjylb']").val();
  393. obj.subsjylbid=$("#"+id+" input[name='subsjylbid']").val();
  394. obj.codesetName=$("#"+id+" input[name='codesetName']").val();
  395. obj.codesetid=$("#"+id+" input[name='codesetid']").val();
  396. obj.datasize=$("#"+id+" input[name='datasize']").val();
  397. obj.ranges=$("#"+id+" input[name='ranges']").val();
  398. obj.indexnum=$("#"+id+" input[name='indexnum']").val();
  399. obj.description=$("#"+id+" input[name='description']").val();
  400. obj.sharetype=$("#"+id+" input[name='xxx_sharetype']").val();
  401. obj.shareconditions=$("#"+id+" input[name='xxx_shareconditions']").val();
  402. obj.sharemodename=$("#"+id+" input[name='xxx_sharemodename']").val();
  403. obj.sharemode=$("#"+id+" input[name='xxx_sharemode']").val();
  404. obj.sharemodeid=$("#"+id+" input[name='xxx_sharemodeid']").val();
  405. obj.sharemodetypename=$("#"+id+" input[name='xxx_sharemodetypename']").val();
  406. obj.sharemodetype=$("#"+id+" input[name='xxx_sharemodetype']").val();
  407. obj.sjyid=$("#"+id+" input[name='sjyid']").val();
  408. obj.sharemodetypeid=$("#"+id+" input[name='xxx_sharemodetypeid']").val();
  409. obj.isopensocial=$("#"+id+" input[name='xxx_isopensocial']").val();
  410. obj.opencondition=$("#"+id+" input[name='xxx_opencondition']").val();
  411. return obj;
  412. }
  413. function addDataMetaInfoZt(obj,xxxid){
  414. $("#"+xxxid).remove();
  415. var selectvalue1="";
  416. var selectvalue2="";
  417. if(obj.isprimary=="是"){
  418. selectvalue1="selected";
  419. }
  420. else{
  421. selectvalue2="selected";
  422. }
  423. var html="<tr id=\""+xxxid+"\">"
  424. +"<td width=\"200\" class=\"fn-text-center\"><a href=\"javascript:deleteInfo('"+xxxid+"')\" title=\"删除\" >删除</a></td>"
  425. +"<td width=\"100\" class=\"fn-text-center\"><select name=\"isprimary\" class=\"input-select\">"
  426. +" <option value=\"否\" title=\"否\" "+selectvalue2+">否</option>"
  427. +" <option value=\"是\" title=\"是\" "+selectvalue1+">是</option>"
  428. +" </select></td>"
  429. +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"xxxmc\" value=\""+obj.xxxmc+"\"/></td>"
  430. +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"xxxdbmc\" value=\""+obj.xxxdbmc+"\"/></td>"
  431. +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"xxxbm\" readonly=\"true\" value=\""+obj.xxxbm+"\"/></td>"
  432. +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"glsjy\" readonly=\"true\" value=\""+obj.glsjy+"\"/></td>"
  433. +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"sjymc\" readonly=\"true\" value=\""+obj.sjymc+"\"/></td>"
  434. +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"sjylbname\" readonly=\"true\" value=\""+obj.sjylbname+"\"/></td>"
  435. +" <input type=\"hidden\" name=\"sjylb\" readonly=\"true\" value=\""+obj.sjylb+"\"/>"
  436. +" <input type=\"hidden\" name=\"sjylbid\" readonly=\"true\" value=\""+obj.sjylbid+"\"/>"
  437. +"<td width=\"100\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"subsjylbname\" readonly=\"true\" value=\""+obj.subsjylbname+"\"/></td>"
  438. +" <input type=\"hidden\" name=\"subsjylb\" readonly=\"true\" value=\""+obj.subsjylb+"\"/>"
  439. +" <input type=\"hidden\" name=\"subsjylbid\" readonly=\"true\" value=\""+obj.subsjylbid+"\"/>"
  440. +"<td width=\"160\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"codesetName\" readonly=\"true\" value=\""+obj.codesetName+"\"/></td>"
  441. +" <input type=\"hidden\" name=\"codesetid\" readonly=\"true\" value=\""+obj.codesetid+"\"/>"
  442. +"<td width=\"160\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"datasize\" readonly=\"true\" value=\""+obj.datasize+"\"/></td>"
  443. +"<td width=\"100\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"ranges\" readonly=\"true\" value=\""+obj.ranges+"\"/></td>"
  444. +"<td width=\"160\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" datatype=\"n\" nullmsg=\"必填\" sucmsg=\"&nbsp;\" errormsg=\"请输数字\" type=\"text\" name=\"indexnum\" value=\""+obj.indexnum+"\" /><span class=\"Validform_checktip\"></span></td>"
  445. +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"description\" /></td>"
  446. +" <input type=\"hidden\" name=\"sjyid\" readonly=\"true\" value=\""+obj.sjyid+"\"/>"
  447. +" <input type=\"hidden\" name=\"glxxxid\" readonly=\"true\" value=\""+obj.glxxxid+"\"/>"
  448. +"</tr>";
  449. $("#dataMetaInfo").append(html);
  450. $("#listscroll").tableHeadFixer({"left" : 3});
  451. }
  452. function addDataMetaInfo(obj,xxxid){
  453. $("#"+xxxid).remove();
  454. var selectvalue1="";
  455. var selectvalue2="";
  456. if(obj.isprimary.value=="是"){
  457. selectvalue1="selected";
  458. }
  459. else{
  460. selectvalue2="selected";
  461. }
  462. var html="<tr id=\""+i+"\">"
  463. +"<td width=\"200\" class=\"fn-text-center\"><a href=\"javascript:deleteInfo('"+i+"')\" title=\"删除\" >删除</a>&nbsp;&nbsp;<a href=\"javascript:editxxxInfo('"+i+"')\" title=\"修改\" >修改</a></td>"
  464. +"<td width=\"100\" class=\"fn-text-center\"><select name=\"isprimary\" class=\"input-select\">"
  465. +" <option value=\"否\" title=\"否\" "+selectvalue2+">否</option>"
  466. +" <option value=\"是\" title=\"是\" "+selectvalue1+">是</option>"
  467. +" </select></td>"
  468. +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"xxxmc\" value=\""+obj.xxxmc.value+"\"/></td>"
  469. +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"xxxdbmc\" value=\""+obj.xxxdbmc.value+"\"/></td>"
  470. +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"xxxbm\" readonly=\"true\" value=\""+obj.xxxbm.value+"\"/></td>"
  471. +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"glsjy\" readonly=\"true\" value=\""+obj.glsjy.value+"\"/></td>"
  472. +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"sjymc\" readonly=\"true\" value=\""+obj.sjymc.value+"\"/></td>"
  473. +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"sjylbname\" readonly=\"true\" value=\""+obj.sjylbname.value+"\"/></td>"
  474. +" <input type=\"hidden\" name=\"sjylb\" readonly=\"true\" value=\""+obj.sjylb.value+"\"/>"
  475. +" <input type=\"hidden\" name=\"sjylbid\" readonly=\"true\" value=\""+obj.sjylbid.value+"\"/>"
  476. +"<td width=\"100\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"subsjylbname\" readonly=\"true\" value=\""+obj.subsjylbname.value+"\"/></td>"
  477. +" <input type=\"hidden\" name=\"subsjylb\" readonly=\"true\" value=\""+obj.subsjylb.value+"\"/>"
  478. +" <input type=\"hidden\" name=\"subsjylbid\" readonly=\"true\" value=\""+obj.subsjylbid.value+"\"/>"
  479. +"<td width=\"160\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"codesetName\" readonly=\"true\" value=\""+obj.codesetName.value+"\"/></td>"
  480. +" <input type=\"hidden\" name=\"codesetid\" readonly=\"true\" value=\""+obj.codesetid.value+"\"/>"
  481. +"<td width=\"160\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"datasize\" readonly=\"true\" value=\""+obj.datasize.value+"\"/></td>"
  482. +"<td width=\"100\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"ranges\" readonly=\"true\" value=\""+obj.ranges.value+"\"/></td>"
  483. +"<td width=\"160\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" datatype=\"n\" nullmsg=\"必填\" sucmsg=\"&nbsp;\" errormsg=\"请输数字\" type=\"text\" name=\"indexnum\" value=\""+obj.indexnum.value+"\" /><span class=\"Validform_checktip\"></span></td>"
  484. +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"description\" /></td>"
  485. // +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"xxx_sharetype\" value=\""+obj.sharetype.value+"\"/></td>"
  486. // +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"xxx_shareconditions\" readonly=\"true\" value=\""+obj.shareconditions.value+"\"/></td>"
  487. // +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"xxx_sharemodename\" readonly=\"true\" value=\""+obj.sharemodename.value+"\"/></td>"
  488. // +" <input type=\"hidden\" name=\"xxx_sharemode\" readonly=\"true\" value=\""+obj.sharemode.value+"\"/>"
  489. // +" <input type=\"hidden\" name=\"xxx_sharemodeid\" readonly=\"true\" value=\""+obj.sharemodeid.value+"\"/>"
  490. // +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"xxx_sharemodetypename\" readonly=\"true\" value=\""+obj.sharemodetypename.value+"\"/></td>"
  491. // +" <input type=\"hidden\" name=\"xxx_sharemodetype\" readonly=\"true\" value=\""+obj.sharemodetype.value+"\"/>"
  492. +" <input type=\"hidden\" name=\"sjyid\" readonly=\"true\" value=\""+obj.sjyid.value+"\"/>"
  493. +" <input type=\"hidden\" name=\"glxxxid\" readonly=\"true\" value=\"\"/>"
  494. // +" <input type=\"hidden\" name=\"xxx_sharemodetypeid\" readonly=\"true\" value=\""+obj.sharemodetypeid.value+"\"/>"
  495. // +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"xxx_isopensocial\" readonly=\"true\" value=\""+obj.isopensocial.value+"\"/></td>"
  496. // +"<td width=\"200\" class=\"fn-text-center\"><input class=\"input-normal input-wdl\" type=\"text\" name=\"xxx_opencondition\" readonly=\"true\" value=\""+obj.opencondition.value+"\"/></td>"
  497. +"</tr>";
  498. $("#dataMetaInfo").append(html);
  499. i++;
  500. $("#listscroll").tableHeadFixer({"left" : 3});
  501. }
  502. function opendgAdd(){
  503. if($("#infotypeid").val()!=""){
  504. var data1={"infotypeid":$("#infotypeid").val()};
  505. $.ajax({
  506. async:false,
  507. type:"post",
  508. url:"../tinfoclass/getinfotypecode",
  509. contentType: "application/x-www-form-urlencoded;charset=utf-8",
  510. dataType: 'json',
  511. data:data1,
  512. success:function(result){
  513. if(result.remark.indexOf("1")==0||result.remark.indexOf("2")==0){//
  514. var check=confirm("您要关联申请目录吗?");
  515. var dgurl="../tinfoclass/tinfoclass_yapplylist";
  516. if(!check){
  517. dgurl="../tinfoclass/tinfoclass_xxladd"
  518. }
  519. var index=layer.open({
  520. type: 2,
  521. move: false,
  522. area: [($(window).width()-80)+'px', ($(window).height()-80)+'px'],
  523. offset: '50px',
  524. shadeClose: true ,
  525. title : '信息项新增',
  526. content: dgurl //这里content是一个URL,如果你不想让iframe出现滚动条,你还可以content: ['http://sentsin.com', 'no']
  527. });
  528. layer.full(index);
  529. }
  530. else {//非主题编目
  531. var dgurl="../tinfoclass/tinfoclass_xxladd";
  532. var index=layer.open({
  533. type: 2,
  534. move: false,
  535. area: [($(window).width()-80)+'px', ($(window).height()-80)+'px'],
  536. offset: '50px',
  537. shadeClose: true ,
  538. title : '信息项新增',
  539. content: dgurl //这里content是一个URL,如果你不想让iframe出现滚动条,你还可以content: ['http://sentsin.com', 'no']
  540. });
  541. layer.full(index);
  542. }
  543. },
  544. error:function(){
  545. layer.msg('服务器异常', {icon: 6});
  546. }
  547. });
  548. }
  549. else{
  550. layer.msg("请先选择资源分类");
  551. }
  552. }
  553. if("2507c1e07750425fb77c731f5fcc9875,432bdef9ae45462c9314399cc04af819,46338a4c48b642b384e6569df07f6336,526c80da2851498bbfe660690bea5887,7aece946acd2441c8ea712e40189f540,ab5ff50a39684a59867eb3f3c139cbd2,c03adff00a9d4ddfa1d19dfb2a271847,d00d9819459344d3aede40790c5acb6a".indexOf($("#providebmcode").val())==-1){
  554. $('#qzqdBt').text("");
  555. $('#qzqd').attr("ignore","ignore");
  556. }
  557. else{
  558. $('#qzqdBt').text("*");
  559. $('#qzqd').removeAttr("ignore");
  560. }
  561. function issharemode(sharetype){
  562. //console.log("获取到sharetype的值为"+sharetype);
  563. //清空值
  564. $("#sharemodename").val("");
  565. $("#sharemodeid").val("");
  566. $("#sharemodetype").val("");
  567. $("#sharemodetypename").val("");
  568. $("#sharemodetypeid").val("");
  569. $.ajax({
  570. async:false,
  571. type:"post",
  572. url:"../tinfoclass/tinfoclass_item-gxfs",
  573. contentType: "application/json;charset=utf-8",
  574. dataType: 'json',
  575. success:function(result){
  576. $("#sharemode option").remove();
  577. $("#sharemode").append("<option value='' sharemodename='' sharemodeid='' title='请选择'>请选择</option>");
  578. for (var i = 0; i < result.length; i++) {
  579. //console.log("第==="+i+"===次循环,循环的值为:"+result[i].codeName);
  580. //有条件共享与无条件共享时,共享方式下拉选项禁用[不予共享]
  581. if(sharetype=="1"||sharetype=="2"){
  582. if(result[i].codeName=="不予共享"){
  583. $("#sharemode").append("<option value='"+result[i].codeCode+"' sharemodename='"+result[i].codeName+"' sharemodeid='"+result[i].id + "' disabled=disabled >"+result[i].codeName+"</option>");
  584. }else{
  585. $("#sharemode").append("<option value='"+result[i].codeCode+"' sharemodename='"+result[i].codeName+"' sharemodeid='"+result[i].id+"'>"+result[i].codeName+"</option>");
  586. }
  587. }else if(sharetype=="3"){
  588. //当用户下拉[共享类型为不予共享],那么禁用共享方式中下拉选项中的平台共享方式
  589. if(result[i].codeName=="共享平台方式"){
  590. $("#sharemode").append("<option value='"+result[i].codeCode+"' sharemodename='"+result[i].codeName+"' sharemodeid='"+result[i].id + "' disabled=disabled >"+result[i].codeName+"</option>");
  591. }else{
  592. $("#sharemode").append("<option value='"+result[i].codeCode+"' sharemodename='"+result[i].codeName+"' sharemodeid='"+result[i].id+"'>"+result[i].codeName+"</option>");
  593. }
  594. }else{
  595. $("#sharemode").append("<option value='"+result[i].codeCode+"' sharemodename='"+result[i].codeName+"' sharemodeid='"+result[i].id+"'>"+result[i].codeName+"</option>");
  596. }
  597. }
  598. },
  599. error:function(){
  600. }
  601. });
  602. }
  603. function setDefaultInfoclassProvidebm(row) {
  604. console.log(row);
  605. // 此处逻辑复制自dept_choose.html 2024年01月31日09:28:03 hujie 移除识别parent
  606. document.getElementById('providebmcode').value =row.id;
  607. document.getElementById('providebmname').value =row.name;
  608. document.getElementById('providename').value =row.name;
  609. if(row.ywbmname!=""){
  610. document.getElementById('ywbmname').value =row.ywbmname;
  611. document.getElementById('ywbmcode').value =row.ywbmcode;
  612. document.getElementById('ywbmid').value =row.ywbmid;
  613. if(document.getElementById('ywbm_dis')!=undefined) {
  614. document.getElementById('ywbm_dis').innerText =row.ywbmname;
  615. }
  616. }
  617. if(row.xzqhname!=""){
  618. document.getElementById('xzqhname').value =row.xzqhname;
  619. document.getElementById('xzqhid').value =row.xzqhid;
  620. document.getElementById('xzqhcode').value =row.xzqhcode;
  621. }
  622. if(document.getElementById('creditno')!=undefined) {
  623. document.getElementById('creditno').value =row.creditno;
  624. }
  625. if(document.getElementById('creditno_dis')!=undefined) {
  626. document.getElementById('creditno_dis').innerText =row.creditno;
  627. }
  628. if("2507c1e07750425fb77c731f5fcc9875,432bdef9ae45462c9314399cc04af819,46338a4c48b642b384e6569df07f6336,526c80da2851498bbfe660690bea5887,7aece946acd2441c8ea712e40189f540,ab5ff50a39684a59867eb3f3c139cbd2,c03adff00a9d4ddfa1d19dfb2a271847,d00d9819459344d3aede40790c5acb6a".indexOf(row.id)==-1){
  629. $(document.getElementById('qzqdBt')).text("");
  630. $(document.getElementById('qzqd')).attr("ignore","ignore");
  631. } else {
  632. $(document.getElementById('qzqdBt')).text("*");
  633. $(document.getElementById('qzqd')).removeAttr("ignore");
  634. }
  635. }