Commit 93b5d6f0 by 孙龙

Merge branch 'feature/sl/20230808-new-wms' into 'master'

Feature/sl/20230808 new wms

See merge request !3
parents 2b6ff513 501dab58
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
<IfModule deflate_module>
# js,html,xml,css,ͨıGzipѹ
AddOutputFilterByType DEFLATE application/x-javascript text/html text/plain text/xml text/css
</IfModule>
open_basedir=/home/wwwroot/perm-manager:/tmp/:/proc/
......@@ -234,7 +234,7 @@ Class AjaxController extends Controller
return $this->ajaxReturn(-1,"模板名称已经存在,请修改模板名称再提交!");
}
}
//dd($data['html']);
$data['t_id'] = intval($id);
try{
DB::Connection("label")->transaction(function () use($data,$request) {
......@@ -264,7 +264,7 @@ Class AjaxController extends Controller
}
exit;
}
//dd($data);
// --------------------------新增模板------------------------------------------------------------
//新增模板
......
......@@ -45,8 +45,8 @@ Class ApiController extends Controller
foreach($list as &$item){
if(intval($item["print_num"]) <= 0){
$item["print_num"] = 1;
}elseif(intval($item["print_num"]) >= 100){
$item["print_num"] = 100;//单个明细限制100
}elseif(intval($item["print_num"]) >= 50){
$item["print_num"] = 50;//单个明细限制100
}
}
if(count($list) > 150){//所有型号数限制150
......
......@@ -105,6 +105,8 @@ class LabelService {
$info["ichunt2020"]["customer_com"] = isset($item["customer_com"]) ? $item["customer_com"] : "";
$info["ichunt2020"]["customer_order_sn"] = isset($item["customer_order_sn"]) ? $item["customer_order_sn"] : "";
$info["ichunt2020"]["delivery_date"] = isset($item["delivery_date"]) ? $item["delivery_date"] : "";
$info["ichunt2020"]["coo"] = isset($item["coo"]) ? $item["coo"] : "";
$info["ichunt2020"]["customer_material_number"] = isset($item["customer_material_number"]) ? $item["customer_material_number"] : "";
return $this->getHtml($_html,$info);
}
......@@ -112,7 +114,8 @@ class LabelService {
protected function getHtml($_html,$info){
try{
$matches = [];
$a = preg_match_all('/<<<(.*?)>>>/i',$_html,$matches);
preg_match_all('/<<<(.*?)>>>/i',$_html,$matches);
$arr = [];
foreach($matches[1] as $k=>$field){
$arr[$k] = isset($info["ichunt2020"][$field])?$info["ichunt2020"][$field] : '';
}
......@@ -122,6 +125,9 @@ class LabelService {
$html = $_html;
}
$html = str_replace("箜"," ",$html);
$html = str_replace("蒯"," %0A ".PHP_EOL ,$html);
$dom = HtmlDomParser::str_get_html( $html );
//处理文本
......@@ -144,6 +150,7 @@ class LabelService {
foreach($yiweimaits as $k=>$yiweimait){
try{
$a = $yiweimait->style;
$yiweimait->datatypes = str_replace(["#","%","&"],"",$yiweimait->datatypes);
if(empty($yiweimait->datatypes)){
$yiweimait->datatypes = "暂无数据";
}
......@@ -162,7 +169,8 @@ class LabelService {
if(empty($erweima->datatypes)){
$erweima->datatypes = "暂无数据";
}
$b = 'data:image/png;base64,' . DNS2D::getBarcodePNG($erweima->datatypes, "QRCODE");
// dump($erweima->datatypes);
$b = 'data:image/png;base64,' . DNS2D::getBarcodePNG(urldecode($erweima->datatypes), "QRCODE");
$c = preg_replace('/background: url\((.*?)\) 0% 0% \/ 100% 100%/'," background: url({$b}) 0% 0% / 100% 100% ",$a);
$erweima->style = $c;
}catch(\Exception $e){
......
......@@ -16,6 +16,8 @@ class OfflineLabelService{
"data_code",
"customer_order_sn",
"delivery_date",
"coo",
"customer_material_number",
];
public function getOfflineUploadData($data){
......
File mode changed
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
Options -MultiViews
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Send Requests To Front Controller...
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
<IfModule deflate_module>
# 对js,html,xml,css,普通文本开启Gzip压缩
AddOutputFilterByType DEFLATE application/x-javascript text/html text/plain text/xml text/css
</IfModule>
......@@ -74,9 +74,11 @@ layui.use(['form', 'table', 'laydate','upload'], function() {
,{field: 'goods_number', title: '数量',width:80}
,{field: 'customer_code', title: '客户编码'}
,{field: 'customer_type', title: '客户型号'}
,{field: 'data_code', title: '批次'}
,{field: 'data_code', title: '批次D/C'}
,{field: 'customer_order_sn', title: '客户订单号'}
,{field: 'delivery_date', title: '发货日期'}
,{field: 'coo', title: '产地'}
,{field: 'customer_material_number', title: '客户物料编码'}
]]
,data:data_123456
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment