2013年11月3日 星期日

generator-combo-tunning

d

combo with reference

{object}
0.60,VENDPROD.PM,combo,100%,20,Product Manager ,,
{spaceLine}
{getJson} 
tableReadCombo?table=ADDRESS_BOOK&limit=999999&fields=RECORDID,NAME&order=NAME&where=where status:`A` and (true) &format=S,S&callback=?{/getJson} 
{comboConstrain}PARENT_RECORDID=reference{/comboConstrain}
{reference}VENDPROD.VENDOR_NO{/reference}        
{onfocusUpdateCombo}
{/object}



order by

{getJson} tableRead?table=CUSTOMER&limit=999999&fields=RECORDID,NAME&order=NAME&where=where status:`A` &format=S,S&callback=?{/getJson}


comboSelfData current form data

var s050209=_lookup('SALES_ORDER_INV_DESC.recordID'+i);
var s2=_lookup('SALES_ORDER_INV_DESC.DESCRIPTION'+i);
comboSelfData0=comboSelfData0+delimiter2+s050209+'<,>'+s2.replace(/,/g,'%2C');

_comboSelfData('targetID'+currentRow,comboSelfData0,targetValue,'noSpace');


combo key value which retrieval from database many times

Step 1 add bean inLingual java
Step 2 add Upldate Lingual.jsp
Step 3 update input.jsp

{combo}[CATS]{/combo}
{combo}[CURS]{/combo}
{combo}[PVIA]{/combo}
{combo}[MTYPES]{/combo}
{combo}[PAYTS]{/combo}

adoption combo settings 
{object}
1.361,DNOTE_LINE.MAINTAIN_TYPE,combo:GRID,10%,150,M. Type,,{tooltip}Maintenance Type{/tooltip}
{labelInLineStyle}font-style: italic;{/labelInLineStyle}
{combo}[MTYPES]{/combo}
{tooltip}Maintain Type{/tooltip}
{/object}



grid combo on change update other fields 

{onChange}
s10=this.value;
s= 'tableRead?
table= VENDOR_PRODUCT_VIEW_FOR_SOPD
&fields=VENDOR_QUOTATION,VENDOR_NO,CUR,RATE,PRICE,UNIT,VENDOR_PARTNO
&key=RECORDID
&value="'+s10+'"
&format=S,S,S,S,S,S,S
&callback=?
&db='+DATABASE ;
$.getJSON(s,function(data) {if (data[0] ){
_refreshv("SALES_ORDER_PO_DESC.SUPPLIER"+thisRow,data[0][1]);
_refreshv("SALES_ORDER_PO_DESC.CUR"+thisRow,data[0][2]);
_refreshv("SALES_ORDER_PO_DESC.RATE"+thisRow,translate(data[0][3],5));
_refreshv("SALES_ORDER_PO_DESC.PRICE"+thisRow,translate(data[0][4],2));
_refreshv("SALES_ORDER_PO_DESC.UNIT"+thisRow,data[0][5]);
_refreshv("SALES_ORDER_PO_DESC.VENDOR_PARTNO"+thisRow,data[0][6]);
}});
{/onChange}


combo display depend on parent (contact person display depend on company)

{object}
0.381,SALES_ORDER_HEAD.SALES_TO_NAME,combo,98%:50%:200px,50,Contact Name,,
{getJson}
tableRead?table=ADDRESS_BOOK&fields=RECORDID,NAME&where=where (status:`A` or status:`D`) and (true) &format=S,S&callback=?
{/getJson}
{reference}SALES_ORDER_HEAD.CUSTOMER_NO{/reference}        
{comboConstrain}PARENT_RECORDID=reference{/comboConstrain}
{onfocusUpdateCombo}
{/object}


combo display no triangle

0.51,GRN_HEADER.SUPPLIER,combo,18,18,Supplier,,{colSpan}3{/colSpan}{getJson} tableRead?table=VENDOR&fields=RECORDID,NAME&where=where status:`A` &format=S,S&callback=?{/getJson}{refresh}currentEntity=_lookup('this.id');{/refresh}{disabled}{inLineStyle}-webkit-appearance: button;{/inLineStyle}


combo from table in grid 

2.361,SALES_ORDER_PO_DESC.SUPPLIER,combo:GRID,17%,100,Supplier,,{getJson} tableRead?table=VENDOR&fields=RECORDID,NAME&where=where status:`A` &format=S,S&callback=?{/getJson}


simple combo in grid

2.361,SALES_ORDER_PO_DESC.UNIT,combo:GRID,6%,150,Unit,,{combo}job,job,set,set{/combo}




combo from table

0.20,employee.employeeNumber,combo,20%:200px:400px,40,Employee Name,,{events}onchange="keyValue=this.value; retrieval();"{/events} {getJson}tableRead?table=employee&fields=surname,employeenumber&where=where status:`A`&format=S,S&callback=?{/getJson}


xml combo setting

0.240,employee.terminationReason,combo,28%,50,Termination Reason,,{combo} 1, Regisnation,2,Dissmissal with Benefits,3,End of Employment Contract,4,Layoff / Redundanc,5,Summary Dismissal,+             6,Intra-group Transfer,7,Early Retirement (Reach 60),8,Retirement (Reach 65),9,Permanent Departure from Hong Kong,10,Total Incapacity ,11,Early Retirement per Contract,12,Retirement per Contract,13,Death {/combo}


+++++++++++++++++++++++++++++++++++

{onChange}s10=this.value;s= 'tableRead?table= ADDRESS_BOOK&fields=MOBILE,EMAIL&key=RECORDID&value="'+s10+'"&format=S,S&callback=?&db='+DATABASE ;$.getJSON(s,function(data) {if (data[0] ){_refreshv("VENDOR_PRODUCT.VENDOR_MOBILE"+thisRow,data[0][0]); _refreshv("VENDOR_PRODUCT.VENDOR_EMAIL"+thisRow,data[0][1]);}});  {/onChange

沒有留言:

張貼留言