Permalink
Browse files

Merge branch 'master' into upgrade_to_rails32

  • Loading branch information...
2 parents f948099 + 15fdafc commit 5a3826dbb847ba11df171e6f90bbc134975f829f @chengdh committed May 9, 2012
@@ -422,10 +422,12 @@ jQuery(function($) {
});
//运单修改时,判断权限
- $('form.update_carrying_fee,form.update_goods_fee').livequery(function() {
+ $('form.update_goods_fee,form.update_carrying_fee,form.update_all').livequery(function() {
$('#carrying_bill_form :input').attr('readonly', true);
$('#carrying_bill_form select').attr('disabled', true);
- $('#carrying_fee').attr('readonly', false);
+ });
+ //可修改货款时,除了运费其他都可以修改
+ $('form.update_goods_fee').livequery(function() {
$('#goods_fee').attr('readonly', false);
$('#from_customer_name').attr('readonly', false);
$('#from_customer_phone').attr('readonly', false);
@@ -434,18 +436,27 @@ jQuery(function($) {
$('#to_customer_phone').attr('readonly', false);
$('#to_customer_mobile').attr('readonly', false);
$('#note').attr('readonly', false);
- $('#select_org_input_to_org_id').attr('readonly', false);
-
- $('#from_org_id').attr('disabled', false);
- $('#transit_org_id').attr('disabled', false);
- $('#area_id').attr('disabled', false);
- $('#to_org_id').attr('disabled', false);
+ //$('#select_org_input_to_org_id').attr('readonly', false);
+ //$('#from_org_id').attr('disabled', false);
+ //$('#transit_org_id').attr('disabled', false);
+ //$('#area_id').attr('disabled', false);
+ //$('#to_org_id').attr('disabled', false);
$('#pay_type').attr('disabled', false);
});
+ //可修改运费时,只能修改运费,其他都不可修改
+ $('form.update_carrying_fee').livequery(function() {
+ $('#carrying_fee').attr('readonly', false);
+ $('#note').attr('readonly', false);
+ });
+
$('form.update_all').livequery(function() {
- $('#carrying_bill_form :input,#carrying_bill_form select').attr('readonly', false);
+ $('#carrying_bill_form :input').attr('readonly', false);
+ $('#carrying_bill_form select').attr('disabled', false);
+ $('#insured_rate').attr('readonly', true);
+ $('#insured_fee').attr('readonly', true);
+
});
//手工运单,自动解析日期和数量
@@ -23,4 +23,3 @@ def export_excel
@transfer_payment_list = resource_class.find(params[:id],:include => [:bank,:user,:carrying_bills])
end
end
-
@@ -28,7 +28,7 @@ def ccb_to_txt
def cib_to_txt
ret = ''
self.carrying_bills.each_with_index do |bill,index|
- ret += [index + 1,0,bill.from_customer.bank_card,bill.from_customer.name,'|',"#{bill.act_pay_fee}|",0].join('|') + "|\r\n"
+ ret += ['nb40',index + 1,0,bill.from_customer.bank_card,bill.from_customer.name,'兴业银行','|||',"#{bill.act_pay_fee}","燕赵#{bill.bill_no}"].join('|') + "|\r\n"
end
ret
end
@@ -1,7 +1,10 @@
<%= semantic_form_for CarryingBill.search,:html => {:id => "customer_code_search_form",:method => :get } do |f|%>
<%= f.inputs do %>
- <%= hidden_field_tag :show_fields,'.deliver_date,.pay_date'%>
- <%= hidden_field_tag :hide_fields,params[:hide_fields]%>
+ <%= hidden_field_tag :show_fields,'.state,.deliver_date,.pay_date'%>
+ <%= hidden_field_tag :hide_fields,'.note'%>
+ <%= f.input params[:bill_date_gte].present? ? params[:bill_date_gte] : :bill_date_gte,:label => "票据日期",:as => :string,:input_html =>{:class => 'datepicker',:size => 20,:readonly => true,:value => Date.today.beginning_of_month} %>
+ <%= f.input params[:bill_date_lte].present? ? params[:bill_date_lte] : :bill_date_lte,:label => "~",:as => :string,:input_html =>{:class => 'datepicker',:size => 20,:readonly => true,:value => Date.today} %>
+
<%= f.input :from_customer_code_or_from_customer_name_eq,:label => "客户编号/姓名",:as => :string,:input_html =>{:size => 20} %>
<% end %>
<%= f.actions do %>
@@ -1,7 +1,7 @@
<%= semantic_form_for CarryingBill.search,:html => {:id => "multi_bills_search_form",:method => :get } do |f|%>
<%= f.inputs do %>
- <%= hidden_field_tag :show_fields,'.deliver_date,.pay_date'%>
- <%= hidden_field_tag :hide_fields,params[:hide_fields]%>
+ <%= hidden_field_tag :show_fields,'.state,.deliver_date,.pay_date'%>
+ <%= hidden_field_tag :hide_fields,'.note'%>
<%= text_area_tag :bill_nos,nil,:size => "90x5",:id => "txt_multi_bills_search" %>
<% end %>
<%= f.actions :class => 'text-left' do %>
@@ -1,4 +1,4 @@
-<%cache "menu_bar_#{current_user.id}_#{current_user.updated_at.to_i}" do %>
+<% cache "menu_bar_#{current_user.id}_#{current_user.updated_at.to_i}" do %>
<div id='menu_bar' class="block">
<%current_user.default_role.system_function_groups.each do |f_group,functions|%>
<div class='menu-group'>
@@ -1,5 +1,4 @@
# -*- encoding : utf-8 -*-
-#coding: utf-8
class DeviseCreateUsers < ActiveRecord::Migration
def self.up
create_table(:users) do |t|
@@ -29,4 +28,3 @@ def self.down
drop_table :users
end
end
-
View
@@ -221,7 +221,7 @@
bill.to_short_carrying_fee 20
bill.pay_type CarryingBill::PAY_TYPE_CASH
bill.goods_num 20
- bill.bill_no "0000001"
+ bill.bill_no "0200001"
bill.goods_no "110320郑石11-100"
bill.goods_info "手工运单"
end
@@ -280,7 +280,7 @@
bill.to_short_carrying_fee 20
bill.pay_type CarryingBill::PAY_TYPE_CASH
- bill.bill_no "0000002"
+ bill.bill_no "0200002"
bill.goods_no "110320安郑1-3"
bill.goods_info "手工中转运单"
bill.association :from_org,:factory => :ay
@@ -1,12 +1,11 @@
# -*- encoding : utf-8 -*-
-#coding: utf-8
require 'spec_helper'
describe HandTransitBill do
before(:each) do
@hand_transit_bill = Factory.build(:hand_transit_bill)
end
- it "应能够成功创建一张手工中转票据" do
+ it "应能够成功创建一张手工中转票据" do
@hand_transit_bill.save!
end
end

0 comments on commit 5a3826d

Please sign in to comment.