This repository has been archived on 2026-06-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
EDT/pc/tmpl/备用/order_print_confirm(for马斯米亚).php
wsh5485 7e47ce238b chore: 添加多个图片和资源文件
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
2025-06-15 13:04:37 +08:00

142 lines
7.3 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?
//-----------------------------------------------------后台->订单打印->确认单 for 马斯米亚
//
$s_group_by="category";
//
$s_key=$_key;
$s_ka="n";
$s_key=$_key;
$con=" and ka<> 'y'";
//
$con_u="";
if($s_username){
$s_username=str_replace("",",",$s_username);
//去掉最后一个逗号
if(substr($s_username,strlen($s_username)-1,1)==",")
$s_username1=substr($s_username,0,-1);
else
$s_username1=$s_username;
$arr_username=explode(",",$s_username1);
//去掉重复值
$arr_username=array_unique($arr_username);
$confirm_str=$p_title=$error="";
for($i=0;$i<count($arr_username);$i++){
//检查是否存在
$m_client=get_db_msg("select * from ".$table_pre."client where username='".$arr_username[$i]."'");
//
if($m_client["id"]){
if($m_client["face"]=="4"){
$con_u.=" (uid='".$m_client["id"]."') or ";
if($m_client["is_checked"]!="y"){
$error_confirm.=$arr_username[$i].",";
$confirm_str.="<span style=\"color:#0000ff;\">".$arr_username[$i]."(未确认)</span>,";
}else{
$confirm_str.="<span style=\"color:#ff0000;\">".$arr_username[$i]."(已确认)</span>,";
}
}else{
$con_u.=" (upath='".$m_client["path"]."-".$m_client["id"]."' or upath like '".$m_client["path"]."-".$m_client["id"]."-%') or ";
}
$p_title.=$m_client["title"]."(".$m_client["username"]."),";
}else{
$error.=$arr_username[$i].",";
}
}
}
if($con_u)
$con.=" and (".substr($con_u,0,-3).") ";
if($confirm_str)
$confirm_str=substr($confirm_str,0,-1);
//取得店铺框
$js_function=get_client_autocompelete("","n")."\n";
$js_function.="$(function() {
$('#s_username').autocomplete(clients, {
max: 100, //列表里的条目数
minChars: 0, //自动完成激活之前填入的最小字符
width: 300, //提示的宽度,溢出隐藏
scrollHeight: 300, //提示的高度,溢出显示滚动条
matchContains: true, //包含匹配,就是data参数里的数据,是否只要包含文本框里的数据就显示
autoFill: false, //自动填充
multiple:true,
multipleSeparator:',',
formatItem: function(row, i, max) {
return row.t+'('+row.u+')';
},
formatMatch: function(row, i, max) {
return row.t + row.u;
},
formatResult: function(row) {
return row.u;
}
}).result(function(event, row, formatted) {
$('#s_username').value=row.u;
});
});
";
$search_content.="店铺:<input type=text name=\"s_username\" id=\"s_username\" style=\"width:300px\" value=\"".$s_username."\">";
$search_content.=" <input type=submit value=\"提交\" class=\"button_act\"> ";
if($confirm_str)
$search_content.="<div style=\"width:100%;padding:4px;\" align=\"center\">".$confirm_str."</div>";
if($con_u){
$_title1="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td colspan=\"2\" align=\"center\" style=\"font-size:22px;font-weight:bold;\">钜兆时装(上海)有限公司<br />
2013秋订货明细表</td>
</tr>
<tr>
<td width=\"70%\" height=\"18\" align=\"left\">订货方:".$m_client["username"]."-".$m_client["title"]." &nbsp;&nbsp;&nbsp;&nbsp; 品牌:MiaMia</td>
<td width=\"30%\" align=\"right\">打印日期:".date("Y-m-d")."</td>
</tr>
</table>";
//取得已订总件数和金额
$tmp=get_db_msg("select sum(".get_size_sql("sum").") 'num',sum(".get_size_sql("sum").")*price 'je' from ".$table_pre."order where ".$s_group_by."<>'' ".$con);
$total_yd_js=$tmp["num"];
$total_yd_je=$tmp["je"];
//取得已订总款数
$tmp=get_db_msg("select count(distinct no) 'num' from ".$table_pre."order where ".$s_group_by."<>'' ".$con);
$total_yd_ks=$tmp["num"];
//取得大类数组
$arr_tj=array();
$q="select * from ".$table_pre."keyword where cate='".$s_group_by."' order by no";
//echo $q."<br>";
$r=$db->query($q);
$count=$l=$total_num=$total_money=0;
$total_ks=0;
while($m=$db->fetch_array($r)){
$list=$count+1;
$arr_tj[$count][0]=$m["no"]."-".$m["title"];
//设计款数
$tmp=get_db_msg("select count(*) 'num' from ".$table_pre."kh where ".$s_group_by."='".$m["no"]."' and ka<>'y'");
$arr_tj[$count][1]=$tmp["num"];
$total_ks+=$tmp["num"];
//已订款数
$tmp=get_db_msg("select count(distinct no) 'num' from ".$table_pre."order where ".$s_group_by."='".$m["no"]."'".$con);
$arr_tj[$count][2]=$tmp["num"];
//取得数量
$tmp=get_db_msg("select sum(".get_size_sql("sum").") 'num' from ".$table_pre."order where _key='".$s_key."' and ".$s_group_by."='".$m["no"]."'".$con);
$arr_tj[$count][3]=$tmp["num"];
$count++;
}
//按照数组输出表格
$num=count($arr_tj);
if($num>0){
$_content="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">";
$_content.="<tr><td width=\"20%\" style=\"border-top:1px solid #999999;border-bottom:1px solid #999999;\" align=\"left\">款式</td><td width=\"10%\" style=\"border-top:1px solid #999999;border-bottom:1px solid #999999;\" align=\"right\">接单总款</td><td width=\"10%\" style=\"border-top:1px solid #999999;border-bottom:1px solid #999999;\" align=\"right\">订货总款</td><td width=\"10%\" style=\"border-top:1px solid #999999;border-bottom:1px solid #999999;border-right:1px dashed #999999;\" align=\"right\">订货总量&nbsp;</td><td width=\"20%\" style=\"border-top:1px solid #999999;border-bottom:1px solid #999999;\" align=\"left\">&nbsp;款式</td><td width=\"10%\" style=\"border-top:1px solid #999999;border-bottom:1px solid #999999;\" align=\"right\">接单总款</td><td width=\"10%\" style=\"border-top:1px solid #999999;border-bottom:1px solid #999999;\" align=\"right\">订货总款</td><td width=\"10%\" style=\"border-top:1px solid #999999;border-bottom:1px solid #999999;\" align=\"right\">订货总量</td></tr>";
$half=ceil($num/2);
for($i=0;$i<$half;$i++){
$_content.="<tr><td align=\"left\">".$arr_tj[$i][0]."</td><td align=\"right\">".deel_num($arr_tj[$i][1])."</td><td align=\"right\">".deel_num($arr_tj[$i][2])."</td><td align=\"right\" style=\"border-right:1px dashed #999999;\">".deel_num($arr_tj[$i][3])."&nbsp;</td>";
$_content.="<td align=\"left\">&nbsp;".$arr_tj[$half+$i][0]."</td><td align=\"right\">".deel_num($arr_tj[$half+$i][1])."</td><td align=\"right\">".deel_num($arr_tj[$half+$i][2])."</td><td align=\"right\">".deel_num($arr_tj[$half+i][3])."</td></tr>";
}
$_content.="<tr height=\"20\"><td align=\"left\" colspan=\"5\" style=\"border-top:1px solid #999999;\">合计</td><td align=\"right\" style=\"border-top:1px solid #999999;\">".deel_num($total_ks)."</td><td align=\"right\" style=\"border-top:1px solid #999999;\">".deel_num($total_yd_ks)."</td><td align=\"right\" style=\"border-top:1px solid #999999;\">".deel_num($total_yd_js)."</td></tr>";
$_content.="<tr><td colspan=\"8\" height=\"20\">&nbsp;</td></tr>";
$_content.="<tr><td colspan=\"8\" align=\"left\">";
$_content.="<table>
<tr><td width=\"50\" align=\"left\">总接单:</td><td align=\"right\" width=\"50\">".$total_ks."款</td><td>&nbsp;</td></tr>
<tr><td align=\"left\">总订货:</td><td align=\"right\">".$total_yd_ks."款</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$total_yd_js."件&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;牌&nbsp;&nbsp;价: RMB".keep_float($total_yd_je,0,',')."</td></tr>
</table>";
$_content.="</td></tr>";
$_content.="<tr><td colspan=\"8\" height=\"20\">&nbsp;</td></tr>";
$_content.="<tr height=\"20\"><td colspan=\"8\" align=\"left\">主办业务:张&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;订货人:".$m_client["username"]."-".$m_client["title"]."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;负责人:</td></tr>";
$_content.="</table>";
}
}
?>