初始版本

This commit is contained in:
2026-04-19 01:39:41 +08:00
commit 2b4d3e9880
1272 changed files with 389959 additions and 0 deletions

View File

@@ -0,0 +1,108 @@
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');?>
<table width="1500px" class="list">
<tr><td class='H' align="center" colspan="21"><h3>销货订单记录</h3></td></tr>
</table>
<table width="1500px" class="list" border="1">
<thead>
<tr>
<th width="120" align="center">订单日期</th>
<th width="120" align="center">订单编号</th>
<th width="120" align="center">业务类别</th>
<th width="80" align="center">销售人员</th>
<th width="120" align="center">客户</th>
<th width="60" align="center">销售金额</th>
<th width="60" align="center">订单状态</th>
<th width="60" align="center">交货日期</th>
<th width="60" align="center">制单人</th>
<th width="60" >审核人</th>
<th width="100" align="center">订单备注</th>
<th width="100" align="center">商品</th>
<th width="60" align="center">单位</th>
<th width="60" align="center">数量</th>
<th width="60" align="center">销售单价</th>
<th width="60" align="center">折扣率(%)</th>
<th width="60" align="center">折扣额</th>
<th width="60" align="center">金额</th>
<th width="60" align="center">仓库</th>
<th width="100" align="center">备注</th>
<th width="100" align="center">源单号</th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
$n = 1;
$qty = $amount = 0;
foreach($list as $arr=>$row) {
$postData = unserialize($row['postData']);
$n = isset($postData['entries']) ? count($postData['entries'])+1 : 1;
?>
<tr target="id">
<td rowspan="<?php echo $n?>" ><?php echo $row['billDate']?></td>
<td rowspan="<?php echo $n?>" ><?php echo $row['billNo']?></td>
<td rowspan="<?php echo $n?>" ><?php echo $row['transTypeName']?></td>
<td rowspan="<?php echo $n?>" ><?php echo $row['salesName']?></td>
<td rowspan="<?php echo $n?>" ><?php echo $row['contactNo'].' '.$row['contactName'];?></td>
<td rowspan="<?php echo $n?>" ><?php echo $row['totalAmount']?></td>
<td rowspan="<?php echo $n?>" ><?php echo intval($row['billStatus'])==2 ? '全部出库' :'未出库'?></td>
<td rowspan="<?php echo $n?>" ><?php echo $row['deliveryDate']?></td>
<td rowspan="<?php echo $n?>" ><?php echo $row['userName']?></td>
<td rowspan="<?php echo $n?>" ><?php echo $row['checkName']?></td>
<td rowspan="<?php echo $n?>" ><?php echo $row['description']?></td>
<?php
$i = 1;
foreach($postData['entries'] as $arr1=>$row1) {
$qty += abs($row1['qty']);
$amount += abs($row1['amount']);
if ($i==1) {
?>
<td ><?php echo $row1['invNumber'].' '.$row1['invName'].' '.$row1['invSpec']?></td>
<td ><?php echo $row1['mainUnit']?></td>
<td ><?php echo abs($row1['qty'])?></td>
<td ><?php echo $row1['price']?></td>
<td ><?php echo $row1['discountRate']?></td>
<td ><?php echo $row1['deduction']?></td>
<td ><?php echo abs($row1['amount'])?></td>
<td ><?php echo $row1['locationName']?></td>
<td ><?php echo $row1['description']?></td>
<td ></td>
</tr>
<?php } else {?>
<tr target="id">
<td ><?php echo $row1['invNumber'].' '.$row1['invName'].' '.$row1['invSpec']?></td>
<td ><?php echo $row1['mainUnit']?></td>
<td ><?php echo abs($row1['qty'])?></td>
<td ><?php echo $row1['price']?></td>
<td ><?php echo $row1['discountRate']?></td>
<td ><?php echo $row1['deduction']?></td>
<td ><?php echo abs($row1['amount'])?></td>
<td ><?php echo $row1['locationName']?></td>
<td ><?php echo $row1['description']?></td>
<td ></td>
</tr>
<?php }$i++;}?>
<tr target="id">
<td >合计</td>
<td ></td>
<td ><?php echo $qty?></td>
<td ></td>
<td ></td>
<td ></td>
<td ><?php echo $amount?></td>
<td ></td>
<td ></td>
<td ></td>
</tr>
<?php $qty = $amount = 0;$n = 1;}?>
</tbody>
</table>

View File

@@ -0,0 +1,154 @@
<?php $this->load->view('header');?>
<script type="text/javascript">
var DOMAIN = document.domain;
var WDURL = "";
var SCHEME= "<?php echo sys_skin()?>";
try{
document.domain = '<?php echo base_url()?>';
}catch(e){
}
//ctrl+F5 增加版本号来清空iframe的缓存的
$(document).keydown(function(event) {
/* Act on the event */
if(event.keyCode === 116 && event.ctrlKey){
var defaultPage = Public.getDefaultPage();
var href = defaultPage.location.href.split('?')[0] + '?';
var params = Public.urlParam();
params['version'] = Date.parse((new Date()));
for(i in params){
if(i && typeof i != 'function'){
href += i + '=' + params[i] + '&';
}
}
defaultPage.location.href = href;
event.preventDefault();
}
});
</script>
<link href="<?php echo base_url()?>statics/css/<?php echo sys_skin()?>/bills.css?ver=201511241412" rel="stylesheet" type="text/css">
<style>
#barCodeInsert{margin-left: 10px;font-weight: 100;font-size: 12px;color: #fff;background-color: #B1B1B1;padding: 0 5px;border-radius: 2px;line-height: 19px;height: 20px;display: inline-block;}
#barCodeInsert.active{background-color: #23B317;}
</style>
</head>
<body>
<div class="wrapper">
<span id="config" class="ui-icon ui-state-default ui-icon-config"></span>
<div class="mod-toolbar-top mr0 cf dn" id="toolTop"></div>
<div class="bills cf">
<div class="con-header">
<dl class="cf">
<dd class="pct25">
<label>客户:</label>
<span class="ui-combo-wrap" id="customer">
<input type="text" name="" class="input-txt" autocomplete="off" value="" data-ref="date">
<i class="ui-icon-ellipsis"></i></span></dd>
<dd id="identifier" class="pct20 tc" style="display:none">
<label>销售人员:</label>
<span class="ui-combo-wrap" id="sales">
<input type="text" class="input-txt" autocomplete="off">
<i class="trigger"></i></span>
</dd>
<dd class="pct20 tc" >
<label>单据日期:</label>
<input type="text" id="date" class="ui-input ui-datepicker-input" value="2015-10-31">
</dd>
<dd class="pct20 tc" >
<label>交货日期:</label>
<input type="text" id="deliveryDate" class="ui-input ui-datepicker-input" value="">
</dd>
<dd id="classes" class="pct15 tr">
<label class="radio">
<input type="radio" name="classes" value="150601">
订货</label>
<label class="radio">
<input type="radio" name="classes" value="150602">
退货</label>
</dd>
</dl>
<p id="identifier" class="cf tr" style="margin: 10px 0 0 0; "><label>单据编号:</label><span id="number"><?php echo str_no('XSDD');?></span></p>
</div>
<div class="grid-wrap">
<table id="grid">
</table>
<div id="page"></div>
</div>
<div class="con-footer cf">
<div class="mb10">
<textarea type="text" id="note" class="ui-input ui-input-ph">暂无备注信息</textarea>
</div>
<ul id="amountArea" class="cf">
<li>
<label>优惠率:</label>
<input type="text" id="discountRate" class="ui-input" data-ref="deduction">%
</li>
<li>
<label>优惠金额:</label>
<input type="text" id="deduction" class="ui-input" data-ref="payment">
</li>
<li>
<label>优惠后金额:</label>
<input type="text" id="discount" class="ui-input ui-input-dis" data-ref="discountRate" disabled>
</li>
</ul>
<ul class="dn">
<li>
<label id="paymentTxt">本次收款:</label>
<input type="text" id="payment" class="ui-input">&emsp;
</li>
<li id="accountWrap" class="dn">
<label>结算账户:</label>
<span class="ui-combo-wrap" id="account" style="padding:0;">
<input type="text" class="input-txt" autocomplete="off">
<i class="trigger"></i></span><a id="accountInfo" class="ui-icon ui-icon-folder-open" style="display:none;"></a>
</li>
<li>
<label>本次欠款:</label>
<input type="text" id="arrears" class="ui-input ui-input-dis" disabled>
</li>
<li>
<label>累计欠款:</label>
<input type="text" id="totalArrears" class="ui-input ui-input-dis" disabled>
</li>
</ul>
<ul class="c999 cf">
<li>
<label>制单人:</label>
<span id="userName"></span>
</li>
<li>
<label>审核人:</label>
<span id="checkName"></span>
</li>
<li>
<label>录单时间:</label>
<span id="createTime"></span>
</li>
<li>
<label>最后修改时间:</label>
<span id="modifyTime"></span>
</li>
</ul>
</div>
<div class="cf" id="bottomField">
<div class="fr" id="toolBottom"></div>
</div>
<div id="mark"></div>
</div>
<div id="initCombo" class="dn">
<input type="text" class="textbox goodsAuto" name="goods" autocomplete="off">
<input type="text" class="textbox storageAuto" name="storage" autocomplete="off">
<input type="text" class="textbox unitAuto" name="unit" autocomplete="off">
<input type="text" class="textbox priceAuto" name="price" autocomplete="off">
<input type="text" class="textbox skuAuto" name="price" autocomplete="off">
</div>
<div id="storageBox" class="shadow target_box dn">
</div>
</div>
<script src="<?php echo base_url()?>statics/js/dist/salesOrder.js?ver=201510141132"></script>
</body>
</html>

View File

@@ -0,0 +1,74 @@
<?php $this->load->view('header');?>
<script type="text/javascript">
var DOMAIN = document.domain;
var WDURL = "";
var SCHEME= "<?php echo sys_skin()?>";
try{
document.domain = '<?php echo base_url()?>';
}catch(e){
}
//ctrl+F5 增加版本号来清空iframe的缓存的
$(document).keydown(function(event) {
/* Act on the event */
if(event.keyCode === 116 && event.ctrlKey){
var defaultPage = Public.getDefaultPage();
var href = defaultPage.location.href.split('?')[0] + '?';
var params = Public.urlParam();
params['version'] = Date.parse((new Date()));
for(i in params){
if(i && typeof i != 'function'){
href += i + '=' + params[i] + '&';
}
}
defaultPage.location.href = href;
event.preventDefault();
}
});
</script>
<style>
#matchCon { width: 220px; }
#print{margin-left:10px;}
a.ui-btn{margin-left:10px;}
#reAudit,#audit{display:none;}
</style>
</head>
<body>
<div class="wrapper">
<div class="mod-search cf">
<div class="fl">
<ul class="ul-inline">
<li>
<input type="text" id="matchCon" class="ui-input ui-input-ph" value="请输入单据号或客户名或备注">
</li>
<li>
<label>日期:</label>
<input type="text" id="beginDate" value="2015-07-21" class="ui-input ui-datepicker-input">
<i>-</i>
<input type="text" id="endDate" value="2015-07-27" class="ui-input ui-datepicker-input">
</li>
<li><a class="mrb more" id="moreCon">(高级搜索)</a><a class="ui-btn" id="search">查询</a><!--<a class="ui-btn ui-btn-refresh" id="refresh" title="刷新"><b></b></a>--></li>
</ul>
</div>
<div class="fr"><a class="ui-btn ui-btn-sp" id="add">新增</a>
<a class="ui-btn" id="print" target="_blank" href="javascript:void(0);">打印</a>
<a class="ui-btn" id="export" target="_blank" href="javascript:void(0);">导出</a>
<a class="ui-btn dn" id="audit">审核</a><a class="ui-btn" id="reAudit">反审核</a></div>
</div>
<!-- <div class="mod-toolbar-top cf">
<div class="fl"><strong class="tit">仓库</strong></div>
<div class="fr"><a class="ui-btn ui-btn-sp mrb" id="search">新增</a><a class="ui-btn" id="export">导出</a></div>
</div>-->
<div class="grid-wrap">
<table id="grid">
</table>
<div id="page"></div>
</div>
</div>
<script src="<?php echo base_url()?>/statics/js/dist/salesOrderList.js?ver=201507241412"></script>
</body>
</html>

View File

@@ -0,0 +1,139 @@
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $transType==150601 ? '销货订单' :'销货退货订单'?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style></style>
</head>
<body>
<?php for($t=1; $t<=$countpage; $t++){?>
<table width="800" align="center">
<tr height="15px">
<td align="center" style="font-family:'宋体'; font-size:18px; font-weight:normal;height:50px;"></td>
</tr>
<tr height="15px">
<td align="center" style="font-family:'宋体'; font-size:18px; font-weight:normal;"><?php echo $system['companyName']?></td>
</tr>
<tr height="15px">
<td align="center" style="font-family:'宋体'; font-size:18px; font-weight:normal;height:25px;"><?php echo $transType==150601 ? '销货订单' :'销货退货订单'?></td>
</tr>
</table>
<table width="800" align="center">
<tr height="15" align="left">
<td width="220" style="font-family:'宋体'; font-size:12px;height:20px;">客户:<?php echo $contactNo.' '.$contactName?> </td>
<td width="120" style="font-family:'宋体'; font-size:12px;height:20px;">销售人员:<?php echo $salesName?></td>
<td width="120" style="font-family:'宋体'; font-size:12px;height:20px;">单据日期:<?php echo $billDate?></td>
<td width="180" style="font-family:'宋体'; font-size:12px;height:20px;">单据编号:<?php echo $billNo?></td>
<td width="50" style="font-family:'宋体'; font-size:12px;height:20px;">币别RMB</td>
</tr>
</table>
<table width="900" border="1" cellpadding="2" cellspacing="1" align="center" style="border-collapse:collapse;border:solid #000000;border-width:1px 0 0 1px;">
<tr style="height:20px">
<td width="30" style="border:solid #000000;border-width:0 1px 1px 0;padding:2px; font-family:'宋体'; font-size:14px;height:15px;" align="center">序号</td>
<td width="220" style="border:solid #000000;border-width:0 1px 1px 0;padding:2px; font-family:'宋体'; font-size:14px;height:15px;" align="center">商品</td>
<td width="30" style="border:solid #000000;border-width:0 1px 1px 0;padding:2px; font-family:'宋体'; font-size:14px;height:15px;" align="center">单位</td>
<td width="40" style="border:solid #000000;border-width:0 1px 1px 0;padding:2px; font-family:'宋体'; font-size:14px;height:15px;" align="center">数量</td>
<td width="60" style="border:solid #000000;border-width:0 1px 1px 0;padding:2px; font-family:'宋体'; font-size:14px;height:15px;" align="center">销售单价</td>
<td width="60" style="border:solid #000000;border-width:0 1px 1px 0;padding:2px; font-family:'宋体'; font-size:14px;height:15px;" align="center">折扣率(%)</td>
<td width="50" style="border:solid #000000;border-width:0 1px 1px 0;padding:2px; font-family:'宋体'; font-size:14px;height:15px;" align="center">折扣额</td>
<td width="60" style="border:solid #000000;border-width:0 1px 1px 0;padding:2px; font-family:'宋体'; font-size:14px;height:15px;" align="center">销售金额</td>
<td width="80" style="border:solid #000000;border-width:0 1px 1px 0;padding:2px; font-family:'宋体'; font-size:14px;height:15px;" align="center">仓库</td>
</tr>
<?php
$i = ($t-1)*$num + 1;
foreach($list as $arr=>$row) {
if ($row['i']>=(($t-1)*$num + 1) && $row['i'] <=$t*$num) {
?>
<tr style="border:solid #000000;border-width:0 1px 1px 0;padding:2px;height:15px;font-family:'宋体'; font-size:12px;">
<td width="30" align="center"><?php echo $row['i']?></td>
<td width="220" style="border:solid #000000;border-width:0 1px 1px 0;height:15px;font-family:'宋体'; font-size:12px;"><?php echo $row['goods'];?></td>
<td width="30" align="center" style="border:solid #000000;border-width:0 1px 1px 0;height:15px;font-family:'宋体'; font-size:12px;"><?php echo $row['invSpec']?></td>
<td width="40" align="right"><?php echo str_money(abs($row['qty']),$system['qtyPlaces'])?></td>
<td width="60" align="right"><?php echo abs($row['price'])?></td>
<td width="60" align="right"><?php echo $row['discountRate']?></td>
<td width="50" align="right"><?php echo $row['deduction']?></td>
<td width="60" align="right"><?php echo str_money(abs($row['amount']),2)?></td>
<td width="80"><?php echo $row['locationName']?></td>
</tr>
<?php
$s = $row['i'];
}
$i++;
}
?>
<?php
//补全
if ($t==$countpage) {
for ($m=$s+1;$m<=$t*$num;$m++) {
?>
<tr style="border:solid #000000;border-width:0 1px 1px 0;padding:2px;height:15px;font-family:'宋体'; font-size:12px;">
<td width="30" align="center" style="border:solid #000000;border-width:0 1px 1px 0;height:15px;font-family:'宋体'; font-size:12px;"><?php echo $m?></td>
<td width="220"></td>
<td width="30"></td>
<td width="40"></td>
<td width="60"></td>
<td width="60"></td>
<td width="50"></td>
<td width="60"></td>
<td width="80"></td>
</tr>
<?php }}?>
<?php if ($t==$countpage) {?>
<tr style="height:20px">
<td colspan="3" align="right" style="border:solid #000000;border-width:0 1px 1px 0;padding:2px;height:15px;font-family:'宋体'; font-size:12px;">合计:</td>
<td width="60" align="right"><?php echo str_money(abs($totalQty),$system['qtyPlaces'])?></td>
<td width="60" align="center"></td>
<td width="60" align="center"></td>
<td width="60" align="center"></td>
<td width="60" align="right"><?php echo str_money(abs($totalAmount),2)?></td>
<td width="80" align="center"></td>
</tr>
<tr target="id">
<td colspan="9" style="border:solid #000000;border-width:0 1px 1px 0;padding:2px; font-family:'宋体'; font-size:12px;height:15px;">合计 金额大写: <?php echo str_num2rmb(abs($totalAmount))?> </td>
</tr>
<?php }?>
</table>
<table width="800" align="center">
<tr height="15" align="left">
<td align="left" width="700" style="font-family:'宋体'; font-size:12px;height:25px;">备注: <?php echo $description?></td>
<td width="0" ></td>
<td width="0" ></td>
<td width="0" ></td>
<td width="0" ></td>
</tr>
</table>
<table width="800" align="center">
<tr height="15" align="left">
<td align="left" width="200" style="font-family:'宋体'; font-size:12px;height:25px;">制单人:<?php echo $userName?> </td>
<td width="150" style="font-family:'宋体'; font-size:12px;height:25px;">发货人签字____________</td>
<td width="150" style="font-family:'宋体'; font-size:12px;height:25px;">客户签字____________</td>
<td width="150"></td>
<td width="50" ></td>
</tr>
</table>
<?php echo $t==$countpage?'':'<br><br><br>';}?>
</body>
</html>