跳转页面:
erb: $.mobile.changePage("<%= url_for :controller => :TaskPicture, :action => :index, :query => {:Id =>@taskstorespecialexhibit.SID ,:Type =>'04', :taskDetailId =>@taskDetailId } %>");}window.location.href = "<%= url_for :controller => :TaskDetail, :action => :index %>";
<input type="button" value=" 返 回 " οnclick="href('<%= url_for :controller => :NoticeInfo%>')" class="ui-btn-left" />
<a dialog="true" data-direction="reverse" href="<%=url_for :controller =>:NoticeInfo,:action=>:index %>" >
href="<%=url_for :controller =>:Settings,:action=>:index,:query => {:taskdetail => 'taskdetail'} %>"
rb:
render :action => :index, :back => 'callback:' + url_for(:controller=>:TaskDetail ,:action => :callback_alert)render :controller =>:Settings,:action => :sync_upLoad, :back => 'callback:' + url_for(:controller=>:TaskDetail ,:action => :callback_alert)
WebView.navigate ( url_for :controller=> :TaskDetail, :action => :index_show, :query => {:msg => @msg} )
redirect :action => :do_login, :query => {:login => @params['login'], :password => @params['password']}
render :partial => "Parameters"
redirect :action =>:edit
数据查询:
NoticeInfo.find(:all ,:order => 'CreateDate',:orderdir => 'DESC')TaskPicture.find_by_sql(sql)
TaskList.find(:all)
TaskList.find(:all).first
NoticeInfo.find(:all ,:order => 'CreateDate',:orderdir => 'DESC')
UserInfoTbl.find(
:all, :conditions => { { :name => "ACCOUNT", :op => "=" } => SyncEngine.get_user_name } ) TaskStoreSpecialExhibit.find( :count, :conditions => { { :name => "TASK_STORE_LIST_SID", :op => "=" } => get_task_store_list_sid } ) PhotoLog.find( :first, :conditions => { { :name => "CREATE_DATE", :op => "=" } => Time.now.strftime("%Y-%m-%d"), { :name => "TYPE", :op => "=" } => type } ) TaskPicture.find( :all, :conditions => { { :name => "SID", :op => "in" } => arr } ) TaskDetail.find( :all, :order=>['TASK_DATE', 'TASK_DETAIL_ID','TASK_TYPE'], :orderdir=>'ASC' ) TaskStoreSpecialExhibit.find( :all, :conditions => { { :name => "TASK_STORE_LIST_SID", :op => "=" } => @params['StoreListId'] }, :order=>['SID'] ) SubStandard.find( :count, :conditions => "STORE_SPECIAL_SID AND SUBSTANDARD_SID='#{substandardtbl.PARAMETER_ID}'") ProductInfo.find( :all, :conditions => "PROD_ID NOT IN (Select PRODUCT_ID from SpecialExhibitProduct where SPECIAL_EXHIBIT_ID='#{get_special_sid}') AND NAME1 LIKE '#{query}'", :group => "prod_id,name1", :order=>['PROD_ID'] ) 写异常: app_error "manson_version: "+ $app_version + " SID: " + @params["SID"] + " DESCRIPTION: " + @params["DESCRIPTION"] + " CREATE_DATE1: " + @taskpictures[0].CREATE_DATE1RhoLog.error("结束日志","!!!!!!!")
rho_error( "unable to load rhodes_translator gem." )
---------------------------------------------
nowDate = Time.now.strftime("%y%m%d%H%M%S")
$.each(data,function(key,val){ });redirect :controller => :TaskPicture, :action => :index, :query => {:Id =>params['storeListId'] ,:Type => '03', :taskDetailId => params['taskDetailId']}Alert.show_popup @params.to_s
Alert.show_popup @taskPrices["0"]["PRICE"].to_sAlert.show_popup( :title => "", :message => "正在获取gps,不能进行此操作.", :icon => :question,
:buttons => ["取消"])οnclick="this.style.visibility='hidden';sendLog()"
style.visibility='visible'
id ="confirmButton"$("#confirmButton").attr('style','visibility:visible');改平台:1、app\helpers\browser_helper.rb中添加
def is_win32System::get_property('platform') == 'WINDOWS_DESKTOP'end2、app\layout.erb中js css Content-Type 添加||System::get_property('platform') == 'WINDOWS_DESKTOP'更新版本:1、putty 148 index修改2、项目build.yml修改3、154(190)数据库修改:版本!,网址!SFA编译win32:删batteryinfo telephonyinfo
get提交参数时有特殊符号的改用post
======================fiddler测试脚本==========================
post
Post:
Accept: application/json, text/javascript, */*
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E; MSOffice 12)Content-Type: application/jsonHost: 10.0.13.94:8090Content-Length: 39{ "login":"00107215", "password":"456" }
{ "resource":"NoticeInfo", "user_id":"00112513" }
{
"resource":"TaskStorePrice",
"user_id":"00112513" ,"attributes": {"PDAFLAG":"U", "NO_PRICETAG":"1", "id":"61337809"}}
//映射文件
mount -t cifs -o username=svradmin,password='Mobility4$3#' //10.0.1.149/Pictures /var/www/AuditSystemServer/public/Pictures/ mount -t cifs -o username=svradmin,password='Mobility4$3#' //10.0.1.149/InstallPackage /var/www/AuditSystemServer/public/InstallPackage/
update taskdetail
set DETAIL_STATE_TASK ='03'稽核数据放开:
UPDATE dbo.TaskList
set SDATE='2013-09-23 00:00:00',NDATE='2013-09-29 00:00:00',STATE_TASK='03'update dbo.TaskDetail
set TASK_DATE='2013-09-23 00:00:00'update taskdetail
set DETAIL_STATE_TASK ='03'UPDATE dbo.TaskStoreSpecialExhibit
set TaskStoreSpecialExhibit.SPECIAL_IS_OK=nullupdate dbo.TaskCustomerProduct
set TOTAL_QTY=nullupdate dbo.TaskCustomer
set PDAFLAG=nullDELETE TaskStoreListPicture
DELETE TaskStoreSpecialPictureDELETE TaskCustomerPictureDELETE tasktrafficDELETE TaskTrafficPictureupdate dbo.TaskStoreListset STIME=null,ETIME=null,IS_FIND=null,REASON_LINE=null,STORE_ABNORMAL_STATE=null,SPEC_ARR_REA=null,IS_PASTDUE_REA=null,UPDATE_USER1=null,UPDATE_DATE1=null,PDAFLAG=null,is_apply=nullupdate dbo.TaskStorePrice
set price = null,NO_PRICETAG=null,IS_ENTERSTORE=null====================================
13.51重启后(如果有问题)
sudo /etc/init.d/thin restart
sudo /etc/init.d/nginx restart
sudo /etc/init.d/redis restart
sudo /etc/init.d/networking restart
清空redis缓存
解决实例化异常:
E 09/26/2013 15:41:18:261 000012ac RubyVM| D:/MotorolaRhoMobileSuite2.2.1.12/ruby/lib/ruby/gems/1.9.1/gems/rhodes-3.5.1.12/lib/framework/rholang/rhomsg_en.rb:3: warning: already initialized constant LocalMessages
解法:moduleLifeCycle unless(const_defined?(:LocalMessages)) RESET ='LocalMessages' end #...end
E 09/26/2013 15:51:34:517 00000d68 RubyVM| D:/MotorolaRhoMobileSuite2.2.1.12/ruby/lib/ruby/gems/1.9.1/gems/rhodes-3.5.1.12/lib/framework/rho/rhosupport.rb:40: warning: regexp match /.../n against to UTF-8 string
解法:
from
s.to_s.gsub(/[^a-zA-Z0-9_\-.]/n) do
to
s.to_s.gsub(/[^a-zA-Z0-9_\-.]/) do
jquerymobile局部刷新问题备注:
listview针对jquerymobile针对listview组件刷新。
$("div[data-role=content] ul").notifyDataSetChanged();
$("div[data-role=content] ul").listview();
如果想针对listview内部的li刷新可以使用
$("div[data-role=content] ul li").listview("refresh");
next if (/^\s*$/)=~line
next if ( line=~ /^\s*$/ )
/^[a-zA-Z]:\\(.+\\)*.+\.(txt)$/
zw!@#235300109394
兼容手机显示:
<head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta http-equiv="Page-Enter" content="revealTrans(duration=5.0,transition=5)"><!--打开的动画--><Link href="audit.ico" rel="Shortcut Icon"><!--头文件图标-->
</head>
日志查看:
/opt/nginx/logs
grep '00133416' *| grep 'task_store_list'
rhodes的DIY:
RhoMobile(rhodes修改)
1、桌面版主菜单乱码修订(wn): 位置:D:\MotorolaRhoMobileSuite2.2.1.12\ruby\lib\ruby\gems\1.9.1\gems\rhodes-3.5.1.12\platform\wm\rhodes\simulator\MainWindowsQt.cpp 修改:Insert 48行: #include <QTextCodec> Insert 131行: QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); 2、照片压缩75%(android) 位置:D:\MotorolaRhoMobileSuite2.2.1.12\ruby\lib\ruby\gems\1.9.1\gems\rhodes-3.5.1.12\platform\android\Rhodes\src\com\rhomobile\rhodes\camera\ImageCaptureCallback.java修改: Insert 36行: import android.graphics.Bitmap;
import android.graphics.BitmapFactory; import ndroid.graphics.PixelFormat; import java.io.BufferedOutputStream; Insert 63行: Bitmap bm = BitmapFactory.decodeByteArray(data, 0, data.length); BufferedOutputStream bos = new BufferedOutputStream(osOwn); 注释64-68行:// if (osCommon != null) { // osCommon.write(data); // osCommon.flush(); // osCommon.close(); //} Insert 69-70行: bm.compress(Bitmap.CompressFormat.JPEG, 75, bos); bos.flush(); bos.close(); 注释70-72行://osOwn.write(data); //osOwn.flush(); //osOwn.close(); Insert 81行: bm.compress(Bitmap.CompressFormat.JPEG, 75, bos); Insert 82行: bos.flush(); Insert 83行: bos.close();3、 屏蔽返回键(android)
位置:D:\MotorolaRhoMobileSuite2.2.1.12\ruby\lib\ruby\gems\1.9.1\gems\rhodes-3.5.1.12\platform\android\Rhodes\src\com\rhomobile\rhodes\RhodesActivity.java
update 311行: //MainView v = r.getMainView(); update 312行: //v.goBack();//back(v.activeTab());4、屏蔽旋转图片(android)
位置: D:\MotorolaRhoMobileSuite2.2.1.12\ruby\lib\ruby\gems\1.9.1\gems\rhodes-3.5.1.12\platform\android\Rhodes\src\com\rhomobile\rhodes\camera\ImageCapture.java
update 377行: //parameters.set("rotation", deviceRotation );
打印机:
\\shqprt003
听留言 214000 +自己的电话