mode_custfina.js 835 B

123456789101112131415161718192021222324252627282930313233343536
  1. function initbodys(){
  2. $(form('custid')).change(function(){
  3. var val = this.value,txt='';
  4. if(val!=''){
  5. txt = this.options[this.selectedIndex].text;
  6. }
  7. form('custname').value=txt;
  8. form('htid').value = '';
  9. });
  10. c.onselectdata['custname']=function(){
  11. form('htid').value = '';
  12. }
  13. $(form('htid')).change(function(){
  14. var val = this.value,txt='';
  15. salechange(val);
  16. });
  17. var defe = js.request('def_htid');
  18. if(defe && defe<0)salechange(defe);
  19. }
  20. function salechange(v){
  21. if(v==''){
  22. form('custid').value='';
  23. return;
  24. }
  25. js.ajax(geturlact('ractchange'),{ractid:v},function(a){
  26. form('custid').value=a.custid;
  27. form('custname').value=a.custname;
  28. form('money').value=a.money;
  29. form('type').value=a.type;
  30. form('htnum').value=a.num;
  31. form('dt').value=a.signdt;
  32. },'get,json');
  33. }