| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- $(function () {
- var status = $("#statu").val();
- var apply_type = $("#apply_type").val();
- var buttonStatus = $("#buttonStatus").val();
- if(status == 2){
- // wj 添加简易流程分发
- if(apply_type == 2 || apply_type == 3 ){
- //$('#jylctg').css({ "display": "inline-block" });
- $('#jylcff').css({ "display": "inline-block" });
- }
- $("#fsgbm").css({ "display": "inline-block" });
- //待分发没有退回按钮status
- //$("#bh").css({ "display": "inline-block" });
- }else if(status == 3){
- $("#hgxsctg").css({ "display": "inline-block" });
- //$("#hgxscbh").css({ "display": "inline" });
- }else if (status == 4){
- $("#lhpytj").css({ "display": "inline-block" });
- $("#sfzdtz").css({ "display": "inline-block" });
- $("#bh").css({ "display": "inline-block" });
- }else if (status == 11){
- /*if(buttonStatus == 0){
- $("#jrqzfsp").css({ "display": "inline" });
- $("#bh").css({ "display": "inline" });
- }
- if(buttonStatus == 1){
- $("#jrlhpy").css({ "display": "inline" });
- $("#bh").css({ "display": "inline" });
- }*/
- $("#hgxscbf").css({ "display": "inline-block" });
- $("#jrqzfsp").css({ "display": "inline-block" });
- $("#jrlhpy").css({ "display": "inline-block" });
- $("#bh").css({ "display": "inline-block" });
- }else if(status == 6){
- $("#zftg").css({ "display": "inline-block" });
- $("#btg").css({ "display": "inline-block" });
- }else if(status == 14) {
- //简易流程会签
- // $("#tyqyjylc").css({ "display": "inline-block" });
- // $("#jjqyjylc").css({ "display": "inline-block" });
- $("#easy_process_approved").css({"display": "inline-block"});
- $("#easy_process_deny").css({"display": "inline-block"});
- }
- // }else if(status == 15){
- // //简易流程汇总
- // $("#jylctg").css({ "display": "inline-block" });
- // $("#fsgbm").css({ "display": "inline-block" });
- // $("#bh").css({ "display": "inline-block" });
- // }
- });
- /*
- 参数解释:
- title 标题
- url 请求的url
- id 需要操作的数据id
- w 弹出层宽度(缺省调默认值)
- h 弹出层高度(缺省调默认值)
- */
- /*审核*/
- function area_approval(title, url, w, h) {
- var index = layer_show(title, pagePath+url, w, h);
- //默认全屏
- layer.full(index);
- }
- /*详情*/
- function area_details(title, url, w, h) {
- var index = layer_show(title, pagePath+url, w, h);
- //默认全屏
- layer.full(index);
- }
- function select_department(title, url, w, h) {
- var id = $("#apply_id").val();
- layer_show(title, pagePath+url+"&id="+id, w, h);
- // layer.full(index);
- }
- //附件上传
- function fileUpload(){
- var id = $("#apply_id").val();
- var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
- var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
- var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
- var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
- if(isIE) {
- var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
- reIE.test(userAgent);
- var fIEVersion = parseFloat(RegExp["$1"]);
- if(fIEVersion == 7 || fIEVersion == 8 || fIEVersion == 9 || fIEVersion == 10 || isIE11) {
- console.log("这是IE:"+fIEVersion);
- $("#fileForm").ajaxSubmit({
- success: function (data) {
- console.log(data);
- },
- error: function (error) {
- console.log(error);
- },
- url:pagePath +"/areaManager/fileUpload?id="+id ,
- type: "post",
- dataType: "json"
- });
- }
- }else{
- var form = $('#fileForm')[0];
- var data = new FormData(form);
- $.ajax({
- type: "POST",
- enctype: 'multipart/form-data',
- url:pagePath +"/areaManager/fileUpload" ,
- data: data,
- processData: false,
- contentType: false,
- cache: false,
- timeout: 600000,
- success: function (data) {
- console.log("SUCCESS : ", data);
- },
- error: function (e) {
- console.log("ERROR : ", e);
- }
- })
- }
- }
- function submit1(type) {
- $.ajax({
- type: "POST",
- dataType: "json",
- url: pagePath +"/areaManager/submit?id="+id+"&comment="+comment+"&type="+type+"&apply_type_str="+apply_type_str+"&fileDown.file_id=9999" ,
- data: $('#form-content-add').serialize(),
- success: function (data) {
- if (data.success) {
- succeedMessage(data.message);
- setTimeClose();
- } else {
- errorMessage(data.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- });
- return false;
- }
- function cancle(){
- var index = parent.layer.getFrameIndex(window.name);
- parent.layer.close(index);
- }
- /*撤回*/
- function withdraw(applyId){
- layer.confirm(
- '确认撤回吗?',
- function(index){
- var url = "/stockLand/withdraw/"+applyId;
- //此处请求后台程序,下方是成功后的前台处理……
- $.ajax({
- type:"POST",
- dataType:"json",
- url: pagePath+url,
- data:{
- "timestamp":new Date().getTime()
- },
- success: function (result) {
- if (result.success) {
- smileMessage(result.message)
- setTime();
- } else {
- errorMessage(result.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- });
- }
- );
-
- }
|