📄 new.php
字号:
<?php
include_once( "inc/auth.php" );
echo "\r\n<html>\r\n<head>\r\n<title>新建销售记录</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n";
echo "<S";
echo "CRIPT language=javascript src=\"/inc/calendar/calendar.js\"></SCRIPT>\r\n";
echo "<s";
echo "cript Language=\"JavaScript\">\r\nfunction CheckForm()\r\n{\r\n if(document.form1.CUSTOMER_ID.value==\"\")\r\n { alert(\"客户不能为空!\");\r\n return (false);\r\n }\r\n if(document.form1.PRODUCT_ID.value==\"\")\r\n { alert(\"产品不能为空!\");\r\n return (false);\r\n }\r\n document.form1.submit();\r\n}\r\n\r\nfunction LoadWindow1()\r\n{\r\n URL=\"/general/sale/sale_history/customer_select\";\r\n loc_x=document.body.sc";
echo "rollLeft+event.clientX-event.offsetX-100;\r\n loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;\r\n window.showModalDialog(URL,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:245px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_x+\"px\");\r\n display1();\r\n}\r\nfunction LoadWindow2()\r\n{\r\n URL=\"/general/sale/sale_history/product_select\";\r\n loc_x=document.body.sc";
echo "rollLeft+event.clientX-event.offsetX-100;\r\n loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;\r\n window.showModalDialog(URL,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:245px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_x+\"px\");\r\n display2();\r\n}\r\n\r\nfunction td_calendar(fieldname)\r\n{\r\n myleft=document.body.scrollLeft+event.clientX-event.offsetX-80;";
echo "\r\n mytop=document.body.scrollTop+event.clientY-event.offsetY+140;\r\n\r\n window.showModalDialog(\"/inc/calendar.php?FIELDNAME=\"+fieldname,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:205px;dialogTop:\"+mytop+\"px;dialogLeft:\"+myleft+\"px\");\r\n}\r\n\r\nfunction select_contact()\r\n{\r\n\tvar customer_id\t\t\t= document.form1.CUSTOMER_ID.value;\r\n\tvar child_sale_history\t= docum";
echo "ent.getElementById('child_sale_history');\r\n\tif(customer_id != ''){\r\n\t\tchild_sale_history.src = \"child_sale_history.php?CUSTOMER_ID=\"+customer_id;\r\n\t\tdocument.getElementById('show_contact').style.display = \"\";\r\n\t}\r\n}\r\n\r\nfunction display1()\r\n{\r\n\tvar customer_name\t= document.form1.CUSTOMER_NAME.value;\r\n\tvar show_display\t= document.getElementById('display1');\r\n\r\n\tif(customer_name == \"\" || customer_nam";
echo "e.substr(0, 1) == \" \")\r\n\t{\r\n\t\tshow_display.style.display\t= \"\";\r\n\t}else{\r\n\t\tshow_display.style.display\t= \"none\";\r\n\t}\r\n}\r\n\r\nfunction display2()\r\n{\r\n\tvar product_name_type\t= document.form1.PRODUCT_NAME_TYPE.value;\r\n\tvar show_display\t\t= document.getElementById('display2');\r\n\r\n\tif(product_name_type == \"\" || product_name_type.substr(0, 1) == \" \")\r\n\t{\r\n\t\tshow_display.style.display\t= \"\";\r\n\t}else{\r\n\t\tshow_";
echo "display.style.display\t= \"none\";\r\n\t}\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n<form action=\"add.php\" method=\"post\" name=\"form1\">\r\n<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n <tr class=\"tablehead1\">\r\n <td><img src=\"/images/notify_new.gif\" align=\"absmiddle\"> 新建销售记录</td>\r\n </tr>\r\n <tr class=\"tablehead2\">\r\n <td><BUTTON class=btn onClick=\"CheckForm();\" t";
echo "itle=\"保存\"><table><tr valign=top ><td><img src=\"/images/littlegif/b_u.gif\" align=\"center\"></td> <td>";
echo "<s";
echo "pan id=\"showallid\">保存</span></td></tr></table></BUTTON> <BUTTON class=btn onClick=\"history.back();\" title=\"返回\"><table><tr valign=top ><td><img src=\"/images/littlegif/b_u.gif\" align=\"center\"></td> <td>";
echo "<s";
echo "pan id=\"showallid\">返回</span></td></tr></table></BUTTON>\r\n </td>\r\n </tr>\r\n</table>\r\n<br>\r\n<table border=\"0\" cellspacing=\"1\" width=\"100%\" cellpadding=\"5\" >\r\n <tr>\r\n <td nowrap class=\"TableLine2\">客户名称: </td>\r\n <td class=\"TableLine1\" colspan=\"3\">\r\n <input type=\"hidden\" name=\"CUSTOMER_ID\" value=\"";
echo $CUSTOMER_ID;
echo "\">\r\n <input type=\"text\" name=\"CUSTOMER_NAME\" class=\"BigStatic\" size=\"33\" maxlength=\"100\" readonly value=\"";
echo $CUSTOMER_NAME;
echo "\"> \r\n <input type=\"button\" value=\"选 择\" class=\"SmallButton\" onClick=\"LoadWindow1()\" title=\"选择客户\" name=\"button\"> ";
echo "<s";
echo "pan name=\"display1\" id=\"display1\" style=\"color:#FF0000;font:bold;\">!</span>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableLine2\">产品: </td>\r\n <td class=\"TableLine1\" colspan=\"3\">\r\n <input type=\"hidden\" name=\"PRODUCT_ID\" value=\"";
echo $PRODUCT_ID;
echo "\">\r\n <input type=\"text\" name=\"PRODUCT_NAME_TYPE\" class=\"BigStatic\" size=\"33\" maxlength=\"100\" readonly value=\"";
echo $PRODUCT_NAME_TYPE;
echo "\"> \r\n <input type=\"button\" value=\"选 择\" class=\"SmallButton\" onClick=\"LoadWindow2()\" title=\"选择产品\" name=\"button\"> ";
echo "<s";
echo "pan name=\"display2\" id=\"display2\" style=\"color:#FF0000;font:bold;\">!</span>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableLine2\">销售日期: </td>\r\n <td nowrap class=\"TableLine1\" colspan=\"3\">\r\n\t\t<input class='Wdate' type=\"text\" name=\"DATE\" id=\"DATE\" value=\"";
echo $DATE;
echo "\" size=\"12\" maxlength=\"10\" onclick=\"popUpCalendar(document.form1,document.form1.DATE,'yyyy-mm-dd')\"/>\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td nowrap class=\"TableLine2\" width=\"120\">数量:</td>\r\n <td nowrap class=\"TableLine1\">\r\n <input type=\"text\" name=\"AMT\" class=\"BigInput\" size=\"11\" maxlength=\"11\" value=\"";
echo $AMT;
echo "\"> \r\n </td>\r\n\t<td nowrap class=\"TableLine2\" width=\"120\">价格:</td>\r\n <td nowrap class=\"TableLine1\">\r\n <input type=\"text\" name=\"PRICE\" class=\"BigInput\" size=\"25\" maxlength=\"25\" value=\"";
echo $PRICE;
echo "\"> \r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableLine2\" width=\"120\">折扣:</td>\r\n <td nowrap class=\"TableLine1\" colspan=\"3\">\r\n <input type=\"text\" name=\"DISCOUNT\" class=\"BigInput\" size=\"20\" maxlength=\"100\" value=\"";
echo $DISCOUNT;
echo "\"> \r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableLine2\" width=\"120\">销售员:</td>\r\n <td nowrap class=\"TableLine1\" colspan=\"3\">\r\n <input type=\"text\" name=\"SALESMAN\" class=\"BigInput\" size=\"20\" maxlength=\"100\" value=\"";
echo $SALESMAN;
echo "\"> \r\n </td>\r\n </tr>\r\n <tr style=\"display:none;\" id=\"show_contact\" name=\"show_contact\">\r\n\t<td nowrap class=\"TableLine2\" width=\"120\">相关交往:</td>\r\n <td nowrap class=\"TableLine1\" colspan=\"3\"><iframe name=\"child_sale_history\" id=\"child_sale_history\" style=\"border:0px;border-collapse:collapse; border:1px dotted #000000;\" frameborder=\"0\" scrolling=\"yes\" allowtransparency=\"true\"></iframe></td>\r\n";
echo " </tr>\r\n <tr>\r\n <td nowrap class=\"TableLine2\">备注: </td>\r\n <td nowrap class=\"TableLine1\" colspan=\"3\">\r\n <textarea cols=37 rows=3 name=\"MEMO\" class=\"BigInput\" wrap=\"yes\">";
echo $MEMO;
echo "</textarea>\r\n </td>\r\n </tr>\r\n </table>\r\n </form>\r\n</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -