⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.php

📁 极限网络智能办公系统 - Office Automation 2008 官方100% 源码
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?
include_once("inc/auth.php");
include_once("inc/utility_all.php");
?>

<html>
<head>
<title>新建销售记录</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<script Language="JavaScript">
function LoadWindow1()
{
  URL="product_select";
  loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
  loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;
  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");
}
function LoadWindow2()
{
  URL="service_select";
  loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
  loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;
  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");
}

function CheckForm()
{
    protb_output();
    sertb_output();
    if(document.form1.PRO_CONTENT.value=="" && document.form1.SER_CONTENT.value=="")
    {
    	alert("产品或服务不能为空!");
    	return false;
    }
/*
	if (document.all("TYPE").value=="PRO")
    {
    	if(document.form1.PRO_NAME.value=="")
      { alert("产品名称不能为空!");
        return (false);
      }
      if(document.form1.PRO_ID.value=="")
      { alert("产品名称不能为空!");
        return (false);
      }
      if(document.form1.PRICE.value=="")
      { alert("单价不能为空!");
        return (false);
      }
       if(document.form1.TRANS_QTY.value=="")
      { alert("数量不能为空!");
        return (false);
      }
    }

     if (document.all("TYPE").value=="SER")
    {
    	if(document.form1.SER_NAME.value=="")
      { alert("服务名称不能为空!");
        return (false);
      }
      if(document.form1.SER_ID.value=="")
      { alert("服务名称不能为空!");
        return (false);
      }
      if(document.form1.TOTAL_PRICE.value=="")
      { alert("总价不能为空!");
        return (false);
      }
       if(document.form1.CUSTOMER_ID.value=="")
      { alert("客户名称不能为空!");
        return (false);
      }
       if(document.form1.CUSTOMER_NAME.value=="")
      { alert("客户名称不能为空!");
        return (false);
      }

       if(document.form1.CREATE_DATE.value=="")
      { alert("记录日期不能为空!");
        return (false);
      }

    }
*/
       if(document.form1.CUSTOMER_ID.value=="")
      { alert("客户名称不能为空!");
        return (false);
      }
       if(document.form1.CUSTOMER_NAME.value=="")
      { alert("客户名称不能为空!");
        return (false);
      }

       if(document.form1.CREATE_DATE.value=="")
      { alert("记录日期不能为空!");
        return (false);
      }
   document.form1.submit();
}
function protb_output()
{
	lv_tb_id="PRO_MYTABLE";
  var data_str="";
  for (i=1; i < document.all(lv_tb_id).rows.length; i++)
  {
      for (j=0; j < document.all(lv_tb_id).rows(i).cells.length-1; j++)
      {
          data_str+=document.all(lv_tb_id).rows(i).cells(j).innerHTML+"`";
      }
      data_str+="\n";
  }
  document.form1.PRO_CONTENT.value=data_str;
}
function sertb_output()
{
	lv_tb_id="SER_MYTABLE";
  var data_str="";
  for (i=1; i < document.all(lv_tb_id).rows.length; i++)
  {
      for (j=0; j < document.all(lv_tb_id).rows(i).cells.length-1; j++)
      {
          data_str+=document.all(lv_tb_id).rows(i).cells(j).innerHTML+"`";
      }
      data_str+="\n";
  }
  document.form1.SER_CONTENT.value=data_str;
}
function LoadWindow3()
{
  URL="/general/sale_manage/crm/linkman/customer_select";
  loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
  loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;
  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");
}


function clear_dept1()
{

  document.form1.PRO_ID.value="";
	document.form1.PRO_NAME.value="";
}

function clear_dept2()
{

  document.form1.SER_ID.value="";
	document.form1.SER_NAME.value="";
}

function td_calendar(fieldname)
{
  myleft=document.body.scrollLeft+event.clientX-event.offsetX-80;
  mytop=document.body.scrollTop+event.clientY-event.offsetY+140;

  window.showModalDialog("/inc/calendar.php?FIELDNAME="+fieldname,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:215px;dialogTop:"+mytop+"px;dialogLeft:"+myleft+"px");
}

function sel_change()
{
	  for(i=0;i<document.all("SERVICE_TYPE").length;i++)
     {
        el=document.all("SERVICE_TYPE").item(i);
        if(el.checked)
        {
        	 val=el.value;
        }
     }
     if(val=="0")
     {
      document.all("TYPE").value="PRO";
     	document.all("SER").style.display="none";
     	document.all("TOTALPRICE").style.display="none";
     	document.all("SERLIST").style.display="none"
     	if(document.all("PRO").style.display=="none")
      	  document.all("PRO").style.display="";
      if(document.all("PRI").style.display=="none")
      	  document.all("PRI").style.display="";
      if(document.all("QTY").style.display=="none")
      	  document.all("QTY").style.display="";
      if(document.all("PROLIST").style.display=="none")
      	  document.all("PROLIST").style.display="";	  

      document.all("SER_ID").value="";
      document.all("SER_NAME").value="";
      document.all("TOTAL_PRICE").value="";
     }
    else
     {
     	document.all("TYPE").value="SER";
      if(document.all("SER").style.display=="none")
         document.all("SER").style.display="";
      if(document.all("TOTALPRICE").style.display=="none")
     	   document.all("TOTALPRICE").style.display="";
     	if(document.all("SERLIST").style.display=="none")
     	   document.all("SERLIST").style.display="";   
      document.all("PRI").style.display="none";
      document.all("QTY").style.display="none";
      document.all("PRO").style.display="none";
      document.all("PROLIST").style.display="none"
      document.all("PRO_ID").value="";
      document.all("PRO_NAME").value="";
      document.all("PRICE").value="";
      document.all("TRANS_QTY").value="";
     }
	}
function pro_addnew()
{
  if(document.form1.PRO_ID.value=="")
  { alert("产品名称不能为空!");
    return (false);
  }
  if(document.form1.PRICE.value=="")
  { alert("单价不能为空!");
    return (false);
  }
   if(document.form1.TRANS_QTY.value=="")
  { alert("数量不能为空!");
    return (false);
  }
  var mytable=document.all("PRO_MYTABLE");
  rownum=mytable.rows.length;
  mynewrow = mytable.insertRow();
  mynewrow.className="TableData";
  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -