123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- function invoiceShow(){
-
- var chkRadio = $('input:radio[name="invoiceType"]:checked').val();
- if (chkRadio == null) {
- alert("没有选中项");
- return false;
- } else if(chkRadio==1) {
- $('#plainInvoice_box').hide();
- $('#specialInvoice_box').show();
- }else if(chkRadio==0){
- $('#plainInvoice_box').show();
- $('#specialInvoice_box').hide();
- }
-
- }
- function mailShow(){
- var chkRadio = $('input:radio[name="doPost"]:checked').val();
- if (chkRadio == null) {
- alert("没有选中项");
- return false;
- } else if(chkRadio==1) {
- $('#mail_box').show();
- }else if(chkRadio==0){
- $('#mail_box').hide();
- }
- }
- $(function () {
-
- $('#invoice').validator({
- timely: 3,
- focusCleanup: true,
- rules: {
- invoiceTitle: function() {
- return $('#invoicePlain').prop('checked');
- },
- invoiceCompany: function() {
- return $('#invoiceSpecial').prop('checked');
- }
- ,isMail: function() {
- return $('#isMail').prop('checked');
- }
- },
- fields: {
- invoiceTitle: 'required(invoiceTitle);',
- invoiceCompany:'required(invoiceCompany);',
- TIN:'required(invoiceCompany);',
- address:'required(invoiceCompany);',
- phone:'required(invoiceCompany);',
- bank:'required(invoiceCompany);',
- bankAccount:'required(invoiceCompany);',
- 'invoicePrice': 'required; '
- ,invoiceElement: 'required; '
- ,'invoiceType': 'required'
- ,recipients: 'required(isMail); '
- ,recipientsPhone: 'required(isMail); '
- ,recipientsAddress: 'required(isMail); '
- }
- });
-
-
- $("form[name='invoiceApproval']").validator({
- timely: 3,
- focusCleanup: true,
- theme:"yellow_top",
-
-
- fields: {
- 'opinion': 'required; '
- }
- });
-
- })
|