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
})
......
......@@ -172,7 +172,7 @@
<div class="sjglbox fl">
<select class="sjgl sjgl1 fl">
<option value="">自定义</option>
<option value="data_code">批次号</option>
<option value="data_code">批次号(D/C)</option>
<option value="sku_code">SKU编码</option>
<option value="goods_type">型号名称</option>
<option value="goods_brand">型号品牌</option>
......@@ -183,6 +183,8 @@
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</option>
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
......@@ -244,7 +246,7 @@
<div class="sjglbox fl">
<select class="sjgl sjgl1 fl">
<option value="">自定义</option>
<option value="data_code">批次号</option>
<option value="data_code">批次号(D/C)</option>
<option value="sku_code">SKU编码</option>
<option value="goods_type">型号名称</option>
<option value="goods_brand">型号品牌</option>
......@@ -255,6 +257,8 @@
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</option>
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
......@@ -272,6 +276,8 @@
<option value="#">#</option>
<option value=";"></option>
<option value=":"></option>
<option value="箜">空格</option>
<option value="蒯">换行</option>
</select>
</span>
<div class="sjglbox fl">
......@@ -288,6 +294,9 @@
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</option>
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
......@@ -305,12 +314,14 @@
<option value="#">#</option>
<option value=";"></option>
<option value=":"></option>
<option value="箜">空格</option>
<option value="蒯">换行</option>
</select>
</span>
<div class="sjglbox fl">
<select class="sjgl sjgl3 fl">
<option value="">自定义</option>
<option value="data_code">批次号</option>
<option value="data_code">批次号(D/C)</option>
<option value="sku_code">SKU编码</option>
<option value="goods_type">型号名称</option>
<option value="goods_brand">型号品牌</option>
......@@ -321,6 +332,8 @@
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</opt
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
......@@ -338,12 +351,163 @@
<option value="#">#</option>
<option value=";"></option>
<option value=":"></option>
<option value="箜">空格</option>
<option value="蒯">换行</option>
</select>
</span>
<div class="sjglbox fl">
<select class="sjgl sjgl4 fl">
<option value="">自定义</option>
<option value="data_code">批次号</option>
<option value="data_code">批次号(D/C)</option>
<option value="sku_code">SKU编码</option>
<option value="goods_type">型号名称</option>
<option value="goods_brand">型号品牌</option>
<option value="goods_number">型号数量</option>
<option value="sale_order_sn">销售单号</option>
<option value="customer_code">客户编码</option>
<option value="customer_type">客户型号</option>
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</option>
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
</div>
<div class="sjglgroup clr">
<span class="fl">
<select style="width:60px;" class="sjgl">
<option value="/">/</option>
<option value="\">\</option>
<option value="-">-</option>
<option value="+">+</option>
<option value="%">%</option>
<option value="&amp;">&amp;</option>
<option value="*">*</option>
<option value="#">#</option>
<option value=";"></option>
<option value=":"></option>
<option value="箜">空格</option>
<option value="蒯">换行</option>
</select>
</span>
<div class="sjglbox fl">
<select class="sjgl sjgl5 fl">
<option value="">自定义</option>
<option value="data_code">批次号(D/C)</option>
<option value="sku_code">SKU编码</option>
<option value="goods_type">型号名称</option>
<option value="goods_brand">型号品牌</option>
<option value="goods_number">型号数量</option>
<option value="sale_order_sn">销售单号</option>
<option value="customer_code">客户编码</option>
<option value="customer_type">客户型号</option>
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</option>
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
</div>
<div class="sjglgroup clr">
<span class="fl">
<select style="width:60px;" class="sjgl">
<option value="/">/</option>
<option value="\">\</option>
<option value="-">-</option>
<option value="+">+</option>
<option value="%">%</option>
<option value="&amp;">&amp;</option>
<option value="*">*</option>
<option value="#">#</option>
<option value=";"></option>
<option value=":"></option>
<option value="箜">空格</option>
<option value="蒯">换行</option>
</select>
</span>
<div class="sjglbox fl">
<select class="sjgl sjgl6 fl">
<option value="">自定义</option>
<option value="data_code">批次号(D/C)</option>
<option value="sku_code">SKU编码</option>
<option value="goods_type">型号名称</option>
<option value="goods_brand">型号品牌</option>
<option value="goods_number">型号数量</option>
<option value="sale_order_sn">销售单号</option>
<option value="customer_code">客户编码</option>
<option value="customer_type">客户型号</option>
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</option>
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
</div>
<div class="sjglgroup clr">
<span class="fl">
<select style="width:60px;" class="sjgl">
<option value="/">/</option>
<option value="\">\</option>
<option value="-">-</option>
<option value="+">+</option>
<option value="%">%</option>
<option value="&amp;">&amp;</option>
<option value="*">*</option>
<option value="#">#</option>
<option value=";"></option>
<option value=":"></option>
<option value="箜">空格</option>
<option value="蒯">换行</option>
</select>
</span>
<div class="sjglbox fl">
<select class="sjgl sjgl7 fl">
<option value="">自定义</option>
<option value="data_code">批次号(D/C)</option>
<option value="sku_code">SKU编码</option>
<option value="goods_type">型号名称</option>
<option value="goods_brand">型号品牌</option>
<option value="goods_number">型号数量</option>
<option value="sale_order_sn">销售单号</option>
<option value="customer_code">客户编码</option>
<option value="customer_type">客户型号</option>
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</option>
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
</div>
<div class="sjglgroup clr">
<span class="fl">
<select style="width:60px;" class="sjgl">
<option value="/">/</option>
<option value="\">\</option>
<option value="-">-</option>
<option value="+">+</option>
<option value="%">%</option>
<option value="&amp;">&amp;</option>
<option value="*">*</option>
<option value="#">#</option>
<option value=";"></option>
<option value=":"></option>
<option value="箜">空格</option>
<option value="蒯">换行</option>
</select>
</span>
<div class="sjglbox fl">
<select class="sjgl sjgl8 fl">
<option value="">自定义</option>
<option value="data_code">批次号(D/C)</option>
<option value="sku_code">SKU编码</option>
<option value="goods_type">型号名称</option>
<option value="goods_brand">型号品牌</option>
......@@ -354,6 +518,8 @@
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</option>
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
......
......@@ -13,7 +13,7 @@
<div class="sjglbox fl">
<select class="sjgl sjgl1 fl">
<option value="">自定义</option>
<option value="data_code">批次号</option>
<option value="data_code">批次号(D/C)</option>
<option value="sku_code">SKU编码</option>
<option value="goods_type">型号名称</option>
<option value="goods_brand">型号品牌</option>
......@@ -24,6 +24,8 @@
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</option>
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
......@@ -35,13 +37,13 @@
</div>
<div class="tools tool5" >
<div class="group-value clr">
<div class="group-value clr">
<div class="sjglgroup clr">
<span class="fl">数据关联</span>
<div class="sjglbox fl">
<select class="sjgl sjgl1 fl">
<option value="">自定义</option>
<option value="data_code">批次号</option>
<option value="data_code">批次号(D/C)</option>
<option value="sku_code">SKU编码</option>
<option value="goods_type">型号名称</option>
<option value="goods_brand">型号品牌</option>
......@@ -52,6 +54,8 @@
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</option>
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
......@@ -69,6 +73,8 @@
<option value="#">#</option>
<option value=";"></option>
<option value=":"></option>
<option value="箜">空格</option>
<option value="蒯">换行</option>
</select>
</span>
<div class="sjglbox fl">
......@@ -85,6 +91,9 @@
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</option>
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
......@@ -102,12 +111,14 @@
<option value="#">#</option>
<option value=";"></option>
<option value=":"></option>
<option value="箜">空格</option>
<option value="蒯">换行</option>
</select>
</span>
<div class="sjglbox fl">
<select class="sjgl sjgl3 fl">
<option value="">自定义</option>
<option value="data_code">批次号</option>
<option value="data_code">批次号(D/C)</option>
<option value="sku_code">SKU编码</option>
<option value="goods_type">型号名称</option>
<option value="goods_brand">型号品牌</option>
......@@ -118,6 +129,8 @@
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</opt
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
......@@ -135,12 +148,163 @@
<option value="#">#</option>
<option value=";"></option>
<option value=":"></option>
<option value="箜">空格</option>
<option value="蒯">换行</option>
</select>
</span>
<div class="sjglbox fl">
<select class="sjgl sjgl4 fl">
<option value="">自定义</option>
<option value="data_code">批次号</option>
<option value="data_code">批次号(D/C)</option>
<option value="sku_code">SKU编码</option>
<option value="goods_type">型号名称</option>
<option value="goods_brand">型号品牌</option>
<option value="goods_number">型号数量</option>
<option value="sale_order_sn">销售单号</option>
<option value="customer_code">客户编码</option>
<option value="customer_type">客户型号</option>
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</option>
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
</div>
<div class="sjglgroup clr">
<span class="fl">
<select style="width:60px;" class="sjgl">
<option value="/">/</option>
<option value="\">\</option>
<option value="-">-</option>
<option value="+">+</option>
<option value="%">%</option>
<option value="&amp;">&amp;</option>
<option value="*">*</option>
<option value="#">#</option>
<option value=";"></option>
<option value=":"></option>
<option value="箜">空格</option>
<option value="蒯">换行</option>
</select>
</span>
<div class="sjglbox fl">
<select class="sjgl sjgl5 fl">
<option value="">自定义</option>
<option value="data_code">批次号(D/C)</option>
<option value="sku_code">SKU编码</option>
<option value="goods_type">型号名称</option>
<option value="goods_brand">型号品牌</option>
<option value="goods_number">型号数量</option>
<option value="sale_order_sn">销售单号</option>
<option value="customer_code">客户编码</option>
<option value="customer_type">客户型号</option>
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</option>
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
</div>
<div class="sjglgroup clr">
<span class="fl">
<select style="width:60px;" class="sjgl">
<option value="/">/</option>
<option value="\">\</option>
<option value="-">-</option>
<option value="+">+</option>
<option value="%">%</option>
<option value="&amp;">&amp;</option>
<option value="*">*</option>
<option value="#">#</option>
<option value=";"></option>
<option value=":"></option>
<option value="箜">空格</option>
<option value="蒯">换行</option>
</select>
</span>
<div class="sjglbox fl">
<select class="sjgl sjgl6 fl">
<option value="">自定义</option>
<option value="data_code">批次号(D/C)</option>
<option value="sku_code">SKU编码</option>
<option value="goods_type">型号名称</option>
<option value="goods_brand">型号品牌</option>
<option value="goods_number">型号数量</option>
<option value="sale_order_sn">销售单号</option>
<option value="customer_code">客户编码</option>
<option value="customer_type">客户型号</option>
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</option>
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
</div>
<div class="sjglgroup clr">
<span class="fl">
<select style="width:60px;" class="sjgl">
<option value="/">/</option>
<option value="\">\</option>
<option value="-">-</option>
<option value="+">+</option>
<option value="%">%</option>
<option value="&amp;">&amp;</option>
<option value="*">*</option>
<option value="#">#</option>
<option value=";"></option>
<option value=":"></option>
<option value="箜">空格</option>
<option value="蒯">换行</option>
</select>
</span>
<div class="sjglbox fl">
<select class="sjgl sjgl7 fl">
<option value="">自定义</option>
<option value="data_code">批次号(D/C)</option>
<option value="sku_code">SKU编码</option>
<option value="goods_type">型号名称</option>
<option value="goods_brand">型号品牌</option>
<option value="goods_number">型号数量</option>
<option value="sale_order_sn">销售单号</option>
<option value="customer_code">客户编码</option>
<option value="customer_type">客户型号</option>
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</option>
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
</div>
<div class="sjglgroup clr">
<span class="fl">
<select style="width:60px;" class="sjgl">
<option value="/">/</option>
<option value="\">\</option>
<option value="-">-</option>
<option value="+">+</option>
<option value="%">%</option>
<option value="&amp;">&amp;</option>
<option value="*">*</option>
<option value="#">#</option>
<option value=";"></option>
<option value=":"></option>
<option value="箜">空格</option>
<option value="蒯">换行</option>
</select>
</span>
<div class="sjglbox fl">
<select class="sjgl sjgl8 fl">
<option value="">自定义</option>
<option value="data_code">批次号(D/C)</option>
<option value="sku_code">SKU编码</option>
<option value="goods_type">型号名称</option>
<option value="goods_brand">型号品牌</option>
......@@ -151,6 +315,8 @@
<option value="customer_com">客户公司</option>
<option value="customer_order_sn">客户订单号</option>
<option value="delivery_date">送货日期</option>
<option value="coo">产地</option>
<option value="customer_material_number">客户物料编码</option>
</select>
<input type="text" class="sjgl zdynr" placeholder="输入自定义内容" />
</div>
......
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