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

📄 index.php

📁 极限网络智能办公系统 Office Automation V3.0官方100%源代码.
💻 PHP
字号:
<?
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()
{
	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.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.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);
      }

    }
   document.form1.submit();
}

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";
     	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="";

      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="";

      document.all("PRI").style.display="none";
      document.all("QTY").style.display="none";
      document.all("PRO").style.display="none";

       document.all("PRO_ID").value="";
      document.all("PRO_NAME").value="";
      document.all("PRICE").value="";
       document.all("TRANS_QTY").value="";

     }


}
</script>
</head>

<body class="bodycolor" topmargin="5">
<br>
<table border="0" width="70%" cellpadding="2" cellspacing="1" align="center" bgcolor="#000000" class="small">
  <form enctype="multipart/form-data" action="add.php"  method="post" name="form1">

    <tr>
      <td class="TableData" colspan="2" align="left">
       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" value="0" name='SERVICE_TYPE' id='SERVICE_TYPE1' checked onclick="sel_change()"><label for="SERVICE_TYPE1">产 品</label> &nbsp;
       <input type="radio" value="1" name='SERVICE_TYPE' id='SERVICE_TYPE2' onclick="sel_change()"><label for="SERVICE_TYPE2">服 务</label>
     </td>
    </tr>
    <tr id="PRO">
      <td nowrap  class="TableData">产品:</td>
      <td class="TableData">
        <input type="hidden" name="PRO_ID">
        <input type="text" name="PRO_NAME" size="20" class="BigStatic" maxlength="20" readonly>
        &nbsp;<input type="button" value="选 择" class="SmallButton" onClick="LoadWindow1()" title="选择" name="button">
        &nbsp;<input type="button" value="清 空" class="SmallButton" onClick="clear_dept1()" title="清空" name="button">
      </td>
    </tr>

     <tr id="SER" style="display:none">
      <td nowrap  class="TableData">服务:</td>
      <td class="TableData">
        <input type="hidden" name="SER_ID">
        <input type="text" name="SER_NAME" size="20" class="BigStatic" maxlength="20"  readonly>
        &nbsp;<input type="button" value="选 择" class="SmallButton" onClick="LoadWindow2()" title="选择" name="button">
        &nbsp;<input type="button" value="清 空" class="SmallButton" onClick="clear_dept2()" title="清空" name="button">
      </td>
    </tr>

   <tr id="PRI">

      <td nowrap class="TableData">单价:</td>
      <td class="TableData">
      	<input type="text" name="PRICE" size="20" maxlength="20" class="BigInput" value="0.0">
      </td>
   </tr>
   <tr id="QTY">
      <td nowrap class="TableData">数量:</td>
      <td class="TableData">
        <input type="text" name="TRANS_QTY" size="20" maxlength="20" class="BigInput">
      </td>
   </tr>
   <tr id="TOTALPRICE" style="display:none">
      <td nowrap class="TableData">总价:</td>
      <td class="TableData">
        <input type="text" name="TOTAL_PRICE" size="20" maxlength="20" class="BigInput">
      </td>
   </tr>
   <tr>
   <td nowrap class="TableData">客户名称: </td>
    <td class="TableData">
      <input type="hidden" name="CUSTOMER_ID" value="<?=$CUSTOMER_ID?>">
      <input type="text" name="CUSTOMER_NAME" class="BigStatic" size="15" maxlength="100" readonly value="<?=$CUSTOMER_NAME?>">&nbsp;
      <input type="button" value="选 择" class="SmallButton" onClick="LoadWindow3()" title="选择客户" name="button">
    </td>
  </tr>
    <tr>
      <td nowrap class="TableData">记录日期:</td>
      <td class="TableData">
        <input type="text" name="CREATE_DATE"   class="BigStatic" readonly size="20" maxlength="20" class="BigInput">
        <img src="/images/menu/calendar.gif" border="0" style="cursor:hand" onclick="td_calendar('form1.CREATE_DATE');">
      </td>
   </tr>
   <tr>
      <td nowrap class="TableData">销售员:</td>
      <td class="TableData">
         <input type="hidden" name="SELLER" value="<?=$LOGIN_USER_ID?>" >
<?
      $query2="select USER_NAME from USER where USER_ID='$LOGIN_USER_ID'";
      $cursor2 = exequery($connection, $query2);
       if($ROW=mysql_fetch_array($cursor2))
       $SELLER1_NAME=$ROW["USER_NAME"];
?>
        <input type="text" name="SELLER_NAME" class="BigStatic" readonly size="15" maxlength="100" value="<?=$SELLER1_NAME?>">

      </td>
   </tr>

   <tr>
      <td nowrap class="TableData">备注:</td>
      <td class="TableData">
        <textarea name="MEMO" cols="45" rows="5" class="BigInput"><?=$MEMO?></textarea>
      </td>
  </tr>
    <tr align="center" class="TableControl">
      <td colspan="2" nowrap>
        <input type="hidden" name="CONTRACT_ID" value="-1">
        <input type="hidden" name="LINE_ID" value="-1">
        <input type="hidden" name="TYPE" value="PRO" >
        <input type="button" value="确认" class="BigButton" onclick="CheckForm();">&nbsp;&nbsp;
      &nbsp;&nbsp;<input type="button" value="清空" class="BigButton" onclick="location='index.php'">
      </td>
    </tr>
  </table>
</form>
</body>
</html>

⌨️ 快捷键说明

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