📄 expense_view.php
字号:
<?
########################################
#OsoonCrm
#费用详细信息
########################################
include "include/db.inc.php";
include "include/check.inc.php";
include "include/header.inc.php";
include "include/array.inc.php";
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="90%">
<tr valign=top>
<td width="201">
<? include "include/left.inc.php"; ?>
</td>
<td align=center>
<br>
<?
// 费用详细信息
$sql="select * from $tbl_crm_expense where ExpenseID='$eid'";
//$sql.=" and $where_account_view ";// 添加检查
// expense可以查看所有费用
if ($G_username != "expense") $sql.=" and $where_account_view ";
$res=mysql_query($sql);
$row=@mysql_fetch_array($res);
$UserID = $row[UserID]; // 费用报销人ID
$aid = $row[AccountID];
$pid = $row[ProjectID];
// 对象客户信息
$sql="select * from $tbl_crm_account where AccountID='$aid'";
$res=mysql_query($sql);
$row_a=@mysql_fetch_array($res);
// 相应项目信息
$sql="select * from $tbl_crm_project where ProjectID='$pid'";
$res=mysql_query($sql);
$row_p=@mysql_fetch_array($res);
?>
<?
// 功能按钮
$btn_edit_1 = " <input type=button value=\"编辑\" style=\"width:60\" onclick=\"javascript:document.location='expense_edit.php?eid=$eid'\"> ";
$btn_edit_0 = " <input type=button value=\"编辑\" style=\"width:60\" disabled> ";
$btn_copy_1 = " <input type=button value=\"复制\" style=\"width:60\" onclick=\"javascript:document.location='expense_add.php?eid=$eid'\"> ";
$btn_copy_0 = " <input type=button value=\"复制\" style=\"width:60\" disabled> ";
$btn_delete_1 = " <input type=button value=\"删除\" style=\"width:60\" onclick=\"javascript:cfmop('expense_man.php?action=delete&eid=$eid','注意:是否真的删除这个费用?');\"> ";
$btn_delete_0 = " <input type=button value=\"删除\" style=\"width:60\" disabled> ";
$btn_list = " <input type=button value=\"返回列表\" style=\"width:60\" onclick=\"javascript:document.location='expense_list.php'\"> ";
// 如果不是自己的费用
if ($G_username != "expense")
//$btn_display = $btn_edit_0.$btn_copy_0.$btn_delete_0.$btn_list;
$btn_display = $btn_list;
else
$btn_display = $btn_edit_1.$btn_copy_1.$btn_delete_1.$btn_list;
?>
<table width="95%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td width="50%">
<b>费用详细信息</b>
</td>
<td width="50%" align=right>
<? echo $btn_display; ?>
</td>
</tr>
</table>
<hr width=95% align=center>
<table width="95%" border="0" cellspacing="0" cellpadding="5" align="center" bgcolor="#ede5d2" bordercolor="#FFFFFF">
<tr>
<td colspan="2"><b>基本信息</b></td>
</tr>
</table>
<table width="95%" border="1" cellspacing="0" cellpadding="5" align="center" bgcolor="#F5F1E9" bordercolor="#ede5d2">
<tr>
<td width="25%">费用名</td>
<td width="25%">
<? echo $row[ExpenseName]; ?>
</td>
<td width="25%">费用额(元)</td>
<td width="25%">
<? echo $row[RealExpense]; ?>
</td>
</tr>
<tr>
<td width="25%">对象客户</td>
<td width="25%">
<? echo $array_crm_id2account[$row[AccountID]]; ?>
</td>
<td width="25%">相应项目</td>
<td width="25%">
<? echo $row_p[ProjectName]; ?>
</td>
</tr>
<tr>
<td width="25%">报销人</td>
<td width="25%">
<? echo $array_crm_id2user[$UserID]; ?>
</td>
<td width="25%">报销部门</td>
<td width="25%">
<? echo $array_crm_id2dept[$row[DeptID]]; ?>
</td>
</tr>
<tr>
<td width="25%">费用类别</td>
<td width="25%">
<select name="ProjectExpenseType" disabled>
<option value=1 <? if ($row[ProjectExpenseType]==1) echo "selected"; ?>>日常费用</option>
<option value=2 <? if ($row[ProjectExpenseType]==2) echo "selected"; ?>>项目费用</option>
</select>
</td>
<td width="25%">费用种类</td>
<td width="25%"><? echo $array_crm_expense_name[$row[ProjectExpenseName]] ?> </td>
</tr>
<tr>
<td width="25%">费用发生时间</td>
<td colspan="3"><? echo $row[UseTime] ?> </td>
</tr>
<tr>
<td width="25%">费用事由</td>
<td colspan=3>
<textarea name="ShiYou" style="height:40px;width:400px;" readonly><? echo $row[ShiYou]; ?></textarea>
</td>
</tr>
</table>
<br>
<table width="95%" border="0" cellspacing="0" cellpadding="5" align="center" bgcolor="#ede5d2" bordercolor="#FFFFFF">
<tr>
<td colspan="2"> <b>对象客户</b></td>
</tr>
</table>
<table width="95%" border="1" cellspacing="0" cellpadding="5" align="center" bgcolor="#F5F1E9" bordercolor="#ede5d2">
<tr>
<td width="25%">客户名称</td>
<td width="25%"><? echo $row_a[AccountName]; ?> </td>
<td width="25%">电话</td>
<td width="25%"><? echo $row_a[Tel]; ?> </td>
</tr>
<tr>
<td width="25%">类型</td>
<td width="25%"><? echo $array_crm_account_type[$row_a[AccountType]]; ?> </td>
<td width="25%">网站</td>
<td width="25%"><? echo $row_a[WebSite]; ?> </td>
</tr>
<tr>
<td width="25%">行业</td>
<td colspan="3"><? echo $array_crm_account_industry[$row_a[AccountIndustry]]; ?> </td>
</tr>
<tr>
<td width="25%">地址</td>
<td colspan="3"><? echo $row_a[Address]; ?> </td>
</tr>
</table>
<br>
<p></p>
</td>
</tr>
</table>
<? include "include/footer.inc.php"; ?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -