enterprise_change_edit.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. var locked = false;
  2. var EpChangeEdit = {
  3. epChangeEditData: {},
  4. validateFields: {
  5. newName: {validators: {notEmpty: {message: '医院名称不能为空'}}}, //, regexp: {regexp: /^([\u4E00-\u9FA5]|\(|\)){1,100}$/, message: "单位名称只允许中文"}
  6. newIdCard: {validators: {notEmpty: {message: '登记号不能为空'}}},
  7. newLegal: {validators: {notEmpty: {message: '法人代表不能为空'}}}, //, regexp: {regexp: /^[\u4e00-\u9fa5]{1,50}$/, message: "法人代表只允许中文"}
  8. newMedicalCommunityId: {validators: {notEmpty: {message: '请选择所属医共体'}}},
  9. newIsGeneral: {validators: {notEmpty: {message: '请选择是否总院'}}},
  10. newProvince: {validators: {notEmpty: {message: '请选择医院所在省份'}}},
  11. newCity: {validators: {notEmpty: {message: '请选择医院所在市'}}},
  12. newCounty: {
  13. validators: {
  14. callback: {
  15. message: "请选择医院所在县/区",
  16. callback: function (value, validator) {
  17. if ($("#newProvince").val() > 0 && $("#newCity").val() > 0 && $("#newCounty option").length > 1 && $("#newCounty option:selected").length == 0) {
  18. //当省市都有值时,如果县有列表,必选
  19. return false;
  20. }
  21. return true;
  22. }
  23. }
  24. }
  25. },
  26. newAddress: {validators: {notEmpty: {message: '医院地址不能为空'}}},
  27. newBankCard: {
  28. validators: {
  29. notEmpty: {
  30. message: '银行账号不能为空'
  31. }
  32. }
  33. },
  34. newBank: {
  35. validators: {
  36. notEmpty: {
  37. message: '开户银行不能为空'
  38. }
  39. }, regexp: {regexp: /^([\u4E00-\u9FA5]|\(|\)|\(|\)){1,100}$/, message: "开户银行只允许中文"}
  40. },
  41. newBankNetwork: {
  42. validators: {notEmpty: {message: '开户银行网点不能为空'},
  43. regexp: {
  44. regexp: /^[\u4e00-\u9fa5]*银行[\u4e00-\u9fa5]*$/,
  45. message: "开户银行网点格式不正确"
  46. }}
  47. },
  48. newAgentName: {validators: {notEmpty: {message: '人才联络员不能为空'}}},
  49. newEphone: {
  50. validators: {
  51. notEmpty: {
  52. message: '医院电话不能为空'
  53. },
  54. regexp: {
  55. regexp: /(^(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})))$/,
  56. message: "医院电话格式不正确"
  57. }
  58. }
  59. },
  60. newAgentPhone: {
  61. validators: {
  62. notEmpty: {
  63. message: '人才联络员电话不能为空'
  64. },
  65. regexp: {
  66. regexp: /(^(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})))$/,
  67. message: "人才联络员电话格式不正确"
  68. }
  69. }
  70. },
  71. newAgentEmail: {
  72. validators: {
  73. notEmpty: {
  74. message: '电子邮箱不能为空'
  75. },
  76. emailAddress: {
  77. message: "电子邮箱格式不正确"
  78. }
  79. }
  80. }
  81. }
  82. };
  83. /**
  84. * 清除数据
  85. */
  86. EpChangeEdit.clearData = function () {
  87. this.epChangeEditData = {};
  88. }
  89. /**
  90. * 设置对话框中的数据
  91. *
  92. * @param key 数据的名称
  93. * @param val 数据的具体值
  94. */
  95. EpChangeEdit.set = function (key, val) {
  96. this.epChangeEditData[key] = (typeof val == "undefined") ? $("#" + key).val() : val;
  97. return this;
  98. }
  99. /**
  100. * 设置对话框中的数据
  101. *
  102. * @param key 数据的名称
  103. * @param val 数据的具体值
  104. */
  105. EpChangeEdit.get = function (key) {
  106. return $("#" + key).val();
  107. }
  108. /**
  109. * 关闭此对话框
  110. */
  111. EpChangeEdit.close = function () {
  112. parent.layer.close(window.parent.EnterpriseCenter.layerIndex);
  113. }
  114. /**
  115. * 收集数据
  116. */
  117. EpChangeEdit.collectData = function () {
  118. this
  119. .set('id')
  120. .set('type')
  121. .set('newName')
  122. .set('newIdCard')
  123. .set('newLegal')
  124. .set('newMedicalCommunityId')
  125. .set('newIsGeneral')
  126. .set('newProvince')
  127. .set('newCity')
  128. .set('newCounty')
  129. .set('newAddress')
  130. .set('newBankCard')
  131. .set('newBank')
  132. .set('newBankNetwork')
  133. .set('newEphone')
  134. .set('newAgentName')
  135. .set('newAgentPhone')
  136. .set('newAgentEmail')
  137. .set('enterprise_id');
  138. }
  139. /**
  140. * 验证数据
  141. */
  142. EpChangeEdit.validate = function () {
  143. $('#ecr_form').data("bootstrapValidator").resetForm();
  144. $('#ecr_form').bootstrapValidator('validate');
  145. return $("#ecr_form").data('bootstrapValidator').isValid();
  146. }
  147. EpChangeEdit.initFileTable = function () {
  148. $("#fileTable").bootstrapTable({
  149. url: Feng.ctxPath + "/common/api/listCurrencyFileType",
  150. method: 'POST',
  151. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  152. search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
  153. showRefresh: false, // 是否显示刷新按钮
  154. clickToSelect: true, // 是否启用点击选中行
  155. singleSelect: true, // 设置True 将禁止多选
  156. striped: true, // 是否显示行间隔色
  157. escape: true,
  158. pagination: false, // 设置为 true 会在表格底部显示分页条
  159. paginationHAlign: "left",
  160. paginationDetailHAlign: "right",
  161. sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
  162. showColumns: false,
  163. detailView: true, //是否显示父子表
  164. pageList: [10, 30, 50],
  165. queryParams: function (params) {
  166. return $.extend({"type": "enterpriseChange"}, params)
  167. },
  168. rowStyle: function (row, index) {
  169. return {classes: "info"};
  170. },
  171. columns: EpChangeEdit.initFileTypeColumn(),
  172. onPostBody: function () {
  173. $("td.uitd_showTip").bind("mouseover", function () {
  174. var htm = $(this).html();
  175. $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
  176. });
  177. },
  178. onLoadSuccess: function (data) {
  179. $("#fileTable").bootstrapTable('expandAllRows');
  180. },
  181. onExpandRow: function (index, row, $detail) {
  182. var ajax = new $ax(Feng.ctxPath + "/common/api/listTalentCommonFile", function (data) {
  183. if (data == null || data.length == 0) {
  184. return;
  185. }
  186. var checkState = $("#checkState").length > 0 ? $("#checkState").val() : 1;
  187. var files = "";
  188. if (checkState != 1) {
  189. files = $("#files").val().split(",");
  190. }
  191. var html = '<ul class="imgs"><li style="width: 80%;font-weight: bold;padding-top: 5px;">附件原名</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">预览</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">操作</li>';
  192. for (var key in data) {
  193. var sn = data[key].url.lastIndexOf(".");
  194. var suffix = data[key].ext;//data[key].url.substring(sn+1,data[key].url.length);
  195. var imgStr = "";
  196. if (suffix == "pdf" || suffix == "PDF") {
  197. imgStr = "<button type='button' onclick=\"Feng.showPdf('" + data[key].url + "','" + data[key].id + "','" + data[key].orignName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
  198. } else if (suffix == "xlsx" || suffix == "XLSX" || suffix == 'xls' || suffix == 'XLS' || suffix == 'docx' || suffix == 'doc' || suffix == 'DOCX' || suffix == 'DOC') {
  199. imgStr = "<button type='button' onclick=\"Feng.showExcel('" + data[key].url + "','" + data[key].id + "','" + data[key].orignName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
  200. } else {
  201. imgStr = '<img class=\"imgUrl\" src=\"' + data[key].url + '\" style=\"width:25px;height:25px;\">';
  202. }
  203. var btn = "<button type=\'button\' onclick=\"EpChangeEdit.checkFile('" + row.id + "','" + data[key].id + "')\" style=\'margin-right: 10px\' class=\"btn btn-xs btn-info\"><i class=\"fa fa-paste\"></i>修改</button>" +
  204. "<button type='button' onclick=\"EpChangeEdit.deleteFile('" + data[key].id + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-times\"></i>删除</button>";
  205. html = html + '<li style="display: none">' + data[key].id + '</li>\n' +
  206. '<li style="width: 80%;padding-top: 5px;">' + data[key].orignName + '</li>\n' +
  207. '<li style="width: 10%;">' + imgStr + '</li>\n' +
  208. '<li style="width: 10%;padding-top: 2px;">' + (checkState == 1 ? btn : (files.indexOf(data[key].typeId.toString()) > -1 ? btn : "")) + '</li>';
  209. }
  210. html = html + '</ul>';
  211. $detail.html(html);
  212. $(".imgs").viewer({
  213. // toolbar:false,
  214. fullscreen: false
  215. });
  216. }, function (data) {
  217. Feng.error("查询失败!" + data.responseJSON.message + "!");
  218. });
  219. var queryData = {};
  220. queryData["mainId"] = $("#id").val();
  221. queryData["typeId"] = row.id;
  222. ajax.set(queryData);
  223. ajax.start();
  224. }
  225. });
  226. }
  227. EpChangeEdit.initFileTypeColumn = function () {
  228. return [
  229. {field: 'selectItem', checkbox: false, visible: false},
  230. {title: '名称', field: 'name', visible: true, align: 'center', valign: 'middle', width: "30%", 'class': 'uitd_showTip',
  231. formatter: function (value, row, index) {
  232. if (row.must == 1) {
  233. return '<i class="fa fa-paste"></i><span style="font-weight:bold;color:red;font-size:14px;font-family:宋体"> * </span> ' + value;
  234. }
  235. if (row.must == 2) {
  236. return '<i class="fa fa-paste"></i>' + value;
  237. }
  238. }
  239. },
  240. {title: '备注', field: 'description', visible: true, align: 'center', valign: 'middle', width: "50%", 'class': 'uitd_showTip',
  241. formatter: function (value, row, index) {
  242. return '<span style="color: red">' + value + '</span>';
  243. }
  244. },
  245. {title: '模板', field: 'templateUrl', visible: true, align: 'center', valign: 'middle', width: "10%",
  246. formatter: function (value, row, index) {
  247. if (value == null || value == '' || value == 'null') {
  248. return '无';
  249. }
  250. return "<button type='button' onclick=\"Feng.downloadFile('" + row.id + "',3)\" style='margin-right: 10px' class=\"btn btn-xs btn-primary\">" +
  251. "<i class=\"fa fa-download\"></i>下载" +
  252. "</button>";
  253. }
  254. },
  255. {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "10%",
  256. formatter: function (value, row, index) {
  257. var checkState = $("#checkState").length > 0 ? $("#checkState").val() : 1;
  258. if (checkState == 1) {
  259. return "<button type='button' onclick=\"EpChangeEdit.checkFile('" + value + "','" + null + "')\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
  260. "<i class=\"fa fa-upload\"></i>上传" +
  261. "</button>";
  262. } else {
  263. var files = $("#files").val().split(",");
  264. if (files.indexOf(value.toString()) != -1) {
  265. return "<button type='button' onclick=\"EpChangeEdit.checkFile('" + value + "','" + null + "')\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
  266. "<i class=\"fa fa-upload\"></i>上传" +
  267. "</button>";
  268. } else {
  269. return "";
  270. }
  271. }
  272. }
  273. }
  274. ]
  275. }
  276. //选择附件并显示附件名
  277. EpChangeEdit.checkFile = function (fileTypeId, fileId) {
  278. var checkState = $("#checkState").val();
  279. if (checkState == 2) {
  280. Feng.error("正在审核中,无法修改");
  281. return;
  282. }
  283. if (checkState == 4) {
  284. Feng.error("审核通过,无法修改");
  285. return;
  286. }
  287. $("#upload_file").unbind("change");
  288. $("#upload_file").change(function () {
  289. if (!Feng.chkFileInvalid(this.files[0], 5, 10, ["image/jpeg", "image/gif", "image/png", "image/jpg", "application/pdf"], "只允许上传PDF或图片"))
  290. return;
  291. EpChangeEdit.upload(fileTypeId, fileId);
  292. });
  293. $('#upload_file').val("");
  294. $('#upload_file').click()
  295. }
  296. //上传附件
  297. EpChangeEdit.upload = function (fileTypeId, fileId) {
  298. if (fileId != null && fileId != 'null') {
  299. $("#fileId").val(fileId)
  300. } else {
  301. $("#fileId").val("");
  302. }
  303. $("#mainId").val($("#id").val());
  304. $("#typeId").val(fileTypeId);
  305. var index = layer.load(0, {shade: false, time: 0});
  306. $("#index").val(index);
  307. $("#uploadForm").submit();
  308. }
  309. //删除附件
  310. EpChangeEdit.deleteFile = function (id) {
  311. var checkState = $("#checkState").val();
  312. if (checkState == 2) {
  313. Feng.error("正在审核中,无法修改");
  314. return;
  315. }
  316. if (checkState == 4) {
  317. Feng.error("审核通过,无法删除");
  318. return;
  319. }
  320. var operation = function () {
  321. var ajax = new $ax("/common/api/deleteTalentCommonFile", function (data) {
  322. if (data.code == 200) {
  323. Feng.success(data.msg);
  324. $("#fileTable").bootstrapTable("refresh", {});
  325. } else {
  326. Feng.error(data.msg);
  327. }
  328. }, function (data) {
  329. Feng.error("删除失败!" + data.responseJSON.message + "!");
  330. });
  331. ajax.set("id", id);
  332. ajax.start();
  333. }
  334. Feng.confirm("删除后无法恢复,确认删除吗?", operation);
  335. }
  336. EpChangeEdit.addSubmit = function () {
  337. this.clearData();
  338. this.collectData();
  339. if (!this.validate()) {
  340. return;
  341. }
  342. var checkState = $("#checkState").val();
  343. if (checkState == 2 || checkState == 5 || checkState == 7) {
  344. Feng.info("正在审核中,无法修改")
  345. return;
  346. }
  347. if (checkState == 4) {
  348. Feng.info("已审核通过,无法修改")
  349. return;
  350. }
  351. // $(".layui-layer-btn0",parent.document).css("pointer-events","none");
  352. if (locked) {
  353. Feng.info("保存进行中,请耐心等候")
  354. return;
  355. }
  356. locked = true;
  357. layer.load(0, {shade: false, time: 0});
  358. /*var ajax = new $ax(Feng.ctxPath + "/enterprise/api/upsert", function (data) {
  359. if (data.code == "200") {
  360. Feng.success(data.msg);
  361. $("#fileLi").removeAttr("style");
  362. $("#id").val(data.obj.id);
  363. $("#checkState").val(data.obj.checkState);
  364. window.parent.EnterpriseCenter.table.refresh();
  365. } else {
  366. Feng.info(data.msg);
  367. }
  368. // $(".layui-layer-btn0",parent.document).css("pointer-events","block");
  369. locked = false;
  370. }, function (data) {
  371. Feng.error("添加失败!" + data.responseJSON.msg + "!");
  372. locked = false;
  373. });
  374. ajax.set(this.epChangeEditData);
  375. ajax.start();*/
  376. $("#ecr_form :input").removeAttr("disabled");
  377. $("#ecr_form").attr("action", "/enterprise/api/upsert");
  378. $("#ecr_form")[0].submit();
  379. };
  380. /**
  381. * 提交审核
  382. */
  383. EpChangeEdit.submitToCheck = function () {
  384. if (locked) {
  385. Feng.info("保存进行中,请耐心等候")
  386. return;
  387. }
  388. var id = $("#id").val();
  389. if (id == null || id == "") {
  390. Feng.info("请先填写基础信息并上传附件");
  391. return;
  392. }
  393. var checkState = $("#checkState").val();
  394. if (checkState == 2 || checkState == 5) {
  395. Feng.error("正在审核中,无法修改");
  396. return;
  397. }
  398. if (checkState == 4) {
  399. Feng.error("审核通过,无法修改");
  400. return;
  401. }
  402. $(".layui-layer-btn1", parent.document).css("pointer-events", "none");
  403. var operation = function () {
  404. var ajax = new $ax(Feng.ctxPath + "/enterprise/api/submitToCheck", function (data) {
  405. if (data.code == 200) {
  406. Feng.success(data.msg);
  407. window.parent.EnterpriseCenter.table.refresh();
  408. EpChangeEdit.close();
  409. } else {
  410. Feng.error(data.msg);
  411. }
  412. $(".layui-layer-btn1", parent.document).css("pointer-events", "block");
  413. }, function (data) {
  414. Feng.error("提交审核失败!" + data.responseJSON.message + "!");
  415. $(".layui-layer-btn1", parent.document).css("pointer-events", "block");
  416. });
  417. ajax.set("id", id);
  418. ajax.start();
  419. }
  420. Feng.confirm("请确认基础信息已核对无误,相应附件已上传,一旦提交,无法修改", operation);
  421. }
  422. EpChangeEdit.setFieldDisabled = function () {
  423. var checkState = $("#checkState").length > 0 ? $("#checkState").val() : 1;
  424. if (checkState != 1) {
  425. $("#ecr_form :input").prop("disabled", true);
  426. $("#ecr_form :button").css("display", "none");
  427. var fields = $("#fields").val().split(",");
  428. for (var i in fields) {
  429. $("#" + fields[i]).removeAttr("disabled");
  430. }
  431. var files = $("#files").val().split(",");
  432. for (var i in files) {
  433. switch (files[i]) {
  434. case "newImgurl":
  435. $("#imgurl").removeAttr("disabled");
  436. $("#imgurl").parent().find("button").removeAttr("disabled").css("display", "block");
  437. break;
  438. case "newBankImg":
  439. $("#bankImg").removeAttr("disabled");
  440. $("#bankImg").parent().find("button").removeAttr("disabled").css("display", "block");
  441. break;
  442. case "newDomainImg":
  443. $("#domainImg").removeAttr("disabled");
  444. $("#domainImg").parent().find("button").removeAttr("disabled").css("display", "block");
  445. break;
  446. case "newTypeImg":
  447. $("#typeImg").removeAttr("disabled");
  448. $("#typeImg").parent().find("button").removeAttr("disabled").css("display", "block");
  449. break;
  450. case "newBeian":
  451. $("#beian").removeAttr("disabled");
  452. $("#beian").parent().find("button").removeAttr("disabled").css("display", "block");
  453. break;
  454. }
  455. }
  456. }
  457. }
  458. EpChangeEdit.callBack = function (data) {
  459. layer.closeAll();
  460. EpChangeEdit.setFieldDisabled();
  461. locked = false;
  462. Feng.info(data.msg);
  463. if (data.code == 200) {
  464. $("#id").val(data.id);
  465. $("input[type=file]").val("");
  466. window.parent.EnterpriseCenter.table.refresh();
  467. }
  468. };
  469. EpChangeEdit.downloadFile = function (id) {
  470. window.location.href = Feng.ctxPath + '/enterprisechangeRecord/downloadFile?id=' + id;
  471. };
  472. $("#imgurl,#bankImg,#beian,#domainImg,#typeImg").change(function (e) {
  473. var that = this;
  474. if (!Feng.chkFileInvalid(that.files[0], 5, 10, ["image/jpeg", "image/gif", "image/png", "image/jpg", "application/pdf"], "只允许上传PDF或图片")) {
  475. return;
  476. }
  477. var file = that.files[0];
  478. var imgSrc;
  479. var reader = new FileReader();
  480. reader.readAsDataURL(file);
  481. reader.onload = function () {
  482. if (Feng.isImg(file.type)) {
  483. imgSrc = this.result;
  484. $(that).prev("img").attr("src", imgSrc);
  485. } else {
  486. $(that).prev("img").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
  487. Feng.info("上传成功!<span style='color:red;'>*点击图标可预览</span>");
  488. }
  489. };
  490. });
  491. $("img").click(function () {
  492. var fileInput = $(this).next("input");
  493. var file = fileInput[0].files[0];
  494. if (typeof file != "undefined" && file.type == "application/pdf") {
  495. var url = URL.createObjectURL(file);
  496. var filename = file.name;
  497. //window.open(url)
  498. Feng.pdfReader(url, filename);
  499. } else {
  500. var url = $(this).data("url");
  501. if (typeof url != "undefined") {
  502. Feng.showPdf(url);
  503. }
  504. }
  505. })
  506. EpChangeEdit.afterSelectProvince = function () {
  507. var province = $("#newProvince").val();
  508. $("#newCity").empty();
  509. $("#newCounty").empty();
  510. if (province == null || province == '') {
  511. return;
  512. }
  513. Feng.addAjaxSelect({
  514. "id": "newCity",
  515. "displayCode": "code",
  516. "displayName": "name",
  517. "type": "GET",
  518. "url": Feng.ctxPath + "/common/tool/findCityByProvinceSelect/code/" + province
  519. });
  520. }
  521. /**
  522. * 加载县
  523. */
  524. EpChangeEdit.afterSelectCity = function () {
  525. var city = $("#newCity").val();
  526. $("#newCounty").empty();
  527. if (city == null || city == '') {
  528. return;
  529. }
  530. Feng.addAjaxSelect({
  531. "id": "newCounty",
  532. "displayCode": "code",
  533. "displayName": "name",
  534. "type": "GET",
  535. "url": Feng.ctxPath + "/common/tool/findCountyByCitySelect/code/" + city
  536. });
  537. }
  538. $(function () {
  539. EpChangeEdit.setFieldDisabled();
  540. var type = $("#type").val();
  541. var special = parseInt($("#special").val());
  542. $('#ecr_form').bootstrapValidator({
  543. feedbackIcons: {
  544. valid: 'glyphicon glyphicon-ok',
  545. invalid: 'glyphicon glyphicon-remove',
  546. validating: 'glyphicon glyphicon-refresh'
  547. },
  548. group: '.rowGroup',
  549. fields: EpChangeEdit.validateFields,
  550. live: 'enabled',
  551. message: '该字段不能为空'
  552. });
  553. //加载省份
  554. Feng.addAjaxSelect({
  555. "id": "newProvince",
  556. "displayCode": "code",
  557. "displayName": "name",
  558. "type": "GET",
  559. "url": Feng.ctxPath + "/common/tool/getProvinceSelect"
  560. });
  561. $("select").each(function () {
  562. $(this).val($(this).attr("value"));
  563. $(this).trigger("change");
  564. })
  565. var id = $("#id").val();
  566. if (id != null && id != '') {
  567. $("#fileLi").removeAttr("style");
  568. } else {
  569. $("#fileLi").attr("style", "pointer-events: none");
  570. }
  571. });