123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- function CLEARTUIL(){
- $('input[name="staff[]"]:checked').each(function(){
- $(this).removeAttr("disabled");
- $(this).attr('checked',false);
- });
- $("#AUTDO").html('');
- $('#uidlist').val('');
- }
- function changeStaff(staff,rid,sid){
-
-
- $("#oldStaff").val(sid+'_'+staff);
- $("#rid").val(rid);
-
- var url='/ajaxRoleStaff';
- $.ajax({
- url:url,
- type: "post",
- cache: false,
- dataType: "json",
- data: {
- name:staff
- },
- global: true,
- success: function(data){
- $("#roleStaff").html(data['html']);
-
- },
- error:function(err){
- // document.getElementById('i_commont').innerHTML = err.responseText;
- }
- });
- }
- function email(elid){
- $('.mailDetail').hide();
- $('.mailAddressee').hide();
- //$('.send').hide();
- $("#html_"+elid).show();
- $("#client_"+elid).show();
- //$("#send_"+elid).show();
- }
- function tabC(a,b){
- $('#tab'+a).show();
- $('#tab'+b).hide();
- }
- $(function() {
- $("select[node='category']").change(function(){
-
- var cidKey=$(this).val();
- var categoryStaff = JSON.stringify(invoiceStaff);
- categoryStaff=JSON.parse(categoryStaff);
-
- var html='';
- for (var i=0;i<categoryStaff[cidKey].length;i++){
- html+='<option value="'+categoryStaff[cidKey][i][0]+'" >'+categoryStaff[cidKey][i][1]+'</option>';
- }
- $("select[node-category='staff']").html(html);
-
- });
-
- $("a[node-iacd]").click(function(){
- var cidKey=$(this).attr('data-cidKey');
- $("#cidKey").val(cidKey);
-
- $("select[node='category']").val(cidKey);
-
- var categoryStaff = JSON.stringify(invoiceStaff);
- categoryStaff=JSON.parse(categoryStaff);
-
- var html='';
- for (var i=0;i<categoryStaff[cidKey].length;i++){
- html+='<option value="'+categoryStaff[cidKey][i][0]+'" >'+categoryStaff[cidKey][i][1]+'</option>';
- }
- $("select[node-category='staff']").html(html);
-
- });
-
- $("a[id^='execute_']").click(function(){
- var mold=$(this).attr('data');
- $("#mold").val(mold);
- });
-
- $("a[id^='invoiceManage_']").click(function(){
- var mold=$(this).attr('data');
- $("#mold").val(mold);
- });
-
-
- $("input[id^='verify_']").click(function(){
-
- var uid=$(this).val();
- var uname=$(this).attr('data');
- var ischeck=$(this).attr('checked');
-
- if(ischeck==undefined){
- alert('请清空重新设置审批流程');
- return ;
- }else{
- $(this).attr("disabled","disabled");
- }
-
-
-
- var chk_value =[];
- $('input[name="staff[]"]:checked').each(function(){
- chk_value.push($(this).val());
- });
-
- if(chk_value.length==1){
- $("#AUTDO").html(uname);
- $('#uidlist').val(uid);
- }else{
- var html2=$("#AUTDO").html();
- $("#AUTDO").html(html2+'->'+uname);
- var uil=$('#uidlist').val();
- $('#uidlist').val(uil+','+uid);
- }
-
- return ;
-
- });
-
-
- $("#natureNULL").click(function(){
-
- if($("#natureNULL").attr("checked")=='checked'){
- $("#natureNULL").val('NULL');
- $("input[name='nature[]']").attr("disabled",true);
- }else{
- $("#natureNULL").val('');
- $("input[name='nature[]']").attr("disabled",false);
- }
- });
-
- $("p[id^='send_']").click(function(){
- $(this).html('已发送');
- });
-
- $("input[id^='title']").keyup(function(){
- $("span[name='titleHtml']").html($(this).val());
- });
- $("input[id^='inlineradio1']").click(function(){
- $("#emailTemplate1").show();
- $("#emailTemplate2").hide();
- $("#emailTemplate3").hide();
- });
- $("input[id^='inlineradio2']").click(function(){
- $("#emailTemplate1").hide();
- $("#emailTemplate2").show();
- $("#emailTemplate3").hide();
- });
- $("input[id^='inlineradio3']").click(function(){
- $("#emailTemplate1").hide();
- $("#emailTemplate2").hide();
- $("#emailTemplate3").show();
- });
- $("textarea[id^='content']").keyup(function(){
-
- $("p[name='contentHtml']").html($(this).val());
-
- });
-
- $("textarea[id^='content']").charCount({
- allowed: 59,
- warning: 10,
- counterText: '剩余为'
- });
-
-
-
-
- })
|