123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- 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; '
- }
- });
-
- $("form[name='invoicePrint']").validator({
- timely: 3,
- focusCleanup: true,
- theme:"yellow_top",
- fields: {
- 'invoiceNo': 'required; '
- }
- });
- $("form[name='invoiceExpress']").validator({
- timely: 3,
- focusCleanup: true,
- theme:"yellow_top",
- fields: {
- 'actualItems': 'required; ',
- 'nu': 'required; ',
- 'express': 'required; '
- }
- });
-
- $("form[name='untreadInvoice']").validator({
- timely: 3,
- focusCleanup: true,
- rules: {
- isUntread: function() {
- return $("input[node-untread='post']").prop('checked');
- }
- },
- fields: {
- untreadReason: 'required; '
- ,untreadPost: 'required; '
- ,untreadCompany: 'required(isUntread); '
- ,untreadNumber: 'required(isUntread); '
- ,untreadItems: 'required(isUntread); '
- }
- });
-
- $("form[name='receivablesInvoice']").validator({
- timely: 3,
- focusCleanup: true,
- fields: {
- receivablesPrice: 'required; '
- ,receivablesMessage: 'required; '
- ,receivablesBank: 'required '
- ,receivablesDate: 'required '
- ,receivablesCategory: 'required '
- ,receivablesStaff: 'required '
- }
- });
-
- })
|