📄 redinvoice.jsp
字号:
with(cur_cell.children[0].runtimeStyle){
borderRight=borderBottom="buttonhighlight 1px solid";
borderLeft=borderTop="black 1px solid";
backgroundColor="#dddddd";
paddingLeft="5px";
//textAlign="center";
}
}
}
}
function overIt(){
if(dragStart)return;
var the_obj = event.srcElement;
var i = 0;
if(the_obj.tagName.toLowerCase() != "table"){
var the_td = get_Element(the_obj,"td");
if(the_td==null) return;
var the_tr = the_td.parentElement;
var the_table = get_Element(the_td,"table");
if(the_tr.rowIndex!=0){
for(i=0;i<the_tr.cells.length;i++){
with(the_tr.cells[i]){
runtimeStyle.backgroundColor=act_bgc;
runtimeStyle.color=act_fc;
}
}
}else{
for(i=1;i<the_table.rows.length;i++){
with(the_table.rows[i].cells(the_td.cellIndex)){
runtimeStyle.backgroundColor=act_bgc;
runtimeStyle.color=act_fc;
}
}
if(the_td.mode==undefined)the_td.mode = false;
the_td.style.cursor=the_td.mode?"n-resize":"s-resize";
}
}
}
function outIt(){
var the_obj = event.srcElement;
var i=0;
if(the_obj.tagName.toLowerCase() != "table"){
var the_td = get_Element(the_obj,"td");
if(the_td==null) return;
var the_tr = the_td.parentElement;
var the_table = get_Element(the_td,"table");
if(the_tr.rowIndex!=0){
for(i=0;i<the_tr.cells.length;i++){
with(the_tr.cells[i]){
runtimeStyle.backgroundColor='';
runtimeStyle.color='';
}
}
}else{
var the_table=the_tr.parentElement.parentElement;
for(i=0;i<the_table.rows.length;i++){
with(the_table.rows[i].cells(the_td.cellIndex)){
runtimeStyle.backgroundColor='';
runtimeStyle.color='';
}
}
}
}
}
var charPYStr = "qqqq";
var charBHStr = "wwww";
function judge_CN(char1,char2,mode){
var charSet=charMode?charPYStr:charBHStr;
for(var n=0;n<(char1.length>char2.length?char1.length:char2.length);n++){
if(char1.charAt(n)!=char2.charAt(n)){
if(mode) return(charSet.indexOf(char1.charAt(n))>charSet.indexOf(char2.charAt(n))?1:-1);
else return(charSet.indexOf(char1.charAt(n))<charSet.indexOf(char2.charAt(n))?1:-1);
break;
}
}
return(0);
}
function sort_tab(the_tab,col,mode){
var tab_arr = new Array();
var i;
var start=new Date;
for(i=1;i<the_tab.rows.length;i++){
tab_arr.push(new Array(the_tab.rows[i].cells[col].innerText.toLowerCase(),the_tab.rows[i]));
}
function SortArr(mode) {
return function (arr1, arr2){
var flag;
var a,b;
a = arr1[0];
b = arr2[0];
if(/^(\+|-)?\d+($|\.\d+$)/.test(a) && /^(\+|-)?\d+($|\.\d+$)/.test(b)){
a=eval(a);
b=eval(b);
flag=mode?(a>b?1:(a<b?-1:0)):(a<b?1:(a>b?-1:0));
}else{
a=a.toString();
b=b.toString();
if(a.charCodeAt(0)>=19968 && b.charCodeAt(0)>=19968){
flag = judge_CN(a,b,mode);
}else{
flag=mode?(a>b?1:(a<b?-1:0)):(a<b?1:(a>b?-1:0));
}
}
return flag;
};
}
tab_arr.sort(SortArr(mode));
for(i=0;i<tab_arr.length;i++){
the_tab.lastChild.appendChild(tab_arr[i][1]);
}
window.status = " (Time spent: " + (new Date - start) + "ms)";
}
function change_row(the_tab,line1,line2){
the_tab.rows[line1].swapNode(the_tab.rows[line2])
}
function change_col(the_tab,line1,line2){
for(var i=0;i<the_tab.rows.length;i++)
the_tab.rows[i].cells[line1].swapNode(the_tab.rows[i].cells[line2]);
}
function Move_up(the_table){
event.cancelBubble=true;
if(cur_row==null || cur_row<=1)return;
change_row(the_table,cur_row,--cur_row);
}
function Move_down(the_table){
event.cancelBubble=true;
if(cur_row==null || cur_row==the_table.rows.length-1 || cur_row==0)return;
change_row(the_table,cur_row,++cur_row);
}
function Move_left(the_table){
event.cancelBubble=true;
if(cur_col==null || cur_col==0)return;
change_col(the_table,cur_col,--cur_col);
if(cur_col==sort_col)sort_col=cur_col+1;
else if(cur_col+1==sort_col)sort_col=cur_col;
}
function Move_right(the_table){
event.cancelBubble=true;
if(cur_col==null || cur_col==the_table.rows[0].cells.length-1)return;
change_col(the_table,cur_col,++cur_col);
if(cur_col==sort_col)sort_col=cur_col-1;
else if(cur_col-1==sort_col)sort_col=cur_col;
}
function add_row(the_table) {
event.cancelBubble=true;
var the_row,the_cell;
the_row = cur_row==null?-1:(cur_row+1);
clear_color();
var newrow=the_table.insertRow(the_row);
for (var i=0;i<the_table.rows[0].cells.length;i++) {
the_cell=newrow.insertCell(i);
the_cell.innerText="NewRow_" + the_cell.parentElement.rowIndex;
}
read_def(the_table);
}
function del_row(the_table) {
if(the_table.rows.length==1) return;
var the_row;
the_row = (cur_row==null || cur_row==0)?-1:cur_row;
the_table.deleteRow(the_row);
cur_row = null;
cur_cell=null;
}
function add_col(the_table) {
event.cancelBubble=true;
var the_col,i,the_cell;
the_col = cur_col==null?-1:(cur_col+1);
var the_title=prompt("Please input the title: ","Untitled");
if(the_title==null)return;
if(the_col!=-1 && the_col<=sort_col && sort_col!=null)sort_col++;
the_title=the_title==""?"Untitled":the_title
clear_color();
for(var i=0;i<the_table.rows.length;i++){
the_cell=the_table.rows[i].insertCell(the_col);
the_cell.innerText=i==0?the_title:("NewCol_" + the_cell.cellIndex);
}
read_def(the_table);
}
function del_col(the_table) {
if(the_table.rows[0].cells.length==1) return;
var the_col,the_cell;
the_col = cur_col==null?(the_table.rows[0].cells.length-1):cur_col;
if(the_col!=-1 && the_col<sort_col && sort_col!=null)sort_col--;
else if(the_col==sort_col)sort_col=null;
for(var i=0;i<the_table.rows.length;i++) the_table.rows[i].deleteCell(the_col);
cur_col = null;
cur_cell=null;
}
function res_tab(the_table){
the_table.outerHTML=Org_con;
init();
}
function exp_tab(the_table){
var the_content="";
document.onclick();
the_content=the_table.outerHTML;
the_content=the_content.replace(/ style=\"[^\"]*\"/g,"");
the_content=the_content.replace(/ mode=\"(false|true)"/g,"");
the_content=the_content.replace(/ oBgc=\"[\w#\d]*\"/g,"");
the_content=the_content.replace(/ oFc=\"[\w#\d]*\"/g,"");
the_content=the_content.replace(/<DIV contentEditable=false>([^<]*)<\/DIV>/ig,"$1");
the_content="<style>table{font-size: 9pt;word-break:break-all;cursor: default;BORDER: black 1px solid;background-color:#eeeecc;border-collapse:collapse;border-Color:#999999;align:center;}</style>\n"+the_content;
var newwin=window.open("about:blank","_blank","");
newwin.document.open();
newwin.document.write(the_content);
newwin.document.close();
newwin=null;
}
</script>
</head>
<body>
<table width=100% border=1 cellSpacing=0 cellPadding=2 id="PowerTable">
<!-- 红字发票 具有调用退货单选择 -->
<tr bgColor=#E0F5FE>
<td>开票日期:</td>
<td><input type="text" name="invoiceDate" value="" onfocus="return calendar()" width="20"/></td>
<td>
发票号:</td>
<td> <input type="text" name="invoiceCode" size="8"></td>
<td> 客户:</td>
<td><input type="text" name="cusCode" size="8"></td>
</tr>
<tr>
<td> 客户地址:</td>
<td><input type="text" name="cusAddress" size="8"></td>
<td>
销售类型:</td>
<td><select name="sellTypeCode"><option value=" "></option></select></td>
<td>
部门:</td>
<td><select name="invoiceDate"><option value="deptCode"></option></select>
</td></tr>
<tr>
<td>
销售员:</td>
<td><select name="personCode"><option value=" "></option></select></td>
<td>
开户银行:</td>
<td><input type="text" name="bankName" ></td>
<td>
银行帐号:</td>
<td><input type="text" name="bankCardNO" ></td></tr>
<tr>
<td>
付款条件:</td><td><select name="payCode"><option value="现销">现销</option><option value="赊销">赊销</option></select></td>
<td>
币种:</td>
<td><select name="foreignCurrCode"><option value="RMB">RMB</option><option value="DOLLOR">DOLLOR</option></select></td>
<td>汇率:</td>
<td>
<input type="text" name="exchRate" size="5"></td></tr>
<tr>
<td>
备注:</td>
<td><input type="text" name="remark" ></td>
<td>制单人:</td>
<td><input type="text" name="maker" size="8"></td>
<td>
审核人:</td>
<td><input type="text" name="checker" size="8"></td></tr>
<tr>
<td ><html:submit value="开票"></html:submit></td>
<td colspan="5"><html:reset value="取消"></html:reset ></td></tr>
</table>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -