Commit 4fd92b8a by 孙龙

标签新增字段

parent 7223a165
APP_ENV=production APP_ENV=production
APP_DEBUG=true APP_DEBUG=true
DING_ALERT=true DING_ALERT=true
APP_KEY=fasyzIUunp4HcLBudUmkMnDc5H4Z4rNW APP_KEY=fasyzIUunp4HcLBudUmkMnDc5H4Z4rNW
DB_HOST=192.168.1.252 DB_HOST=192.168.1.252
DB_DATABASE=ichuntcms DB_DATABASE=ichuntcms
DB_USERNAME=ichuntcms DB_USERNAME=ichuntcms
DB_PASSWORD=ichuntcms#zsyM DB_PASSWORD=ichuntcms#zsyM
DB_PORT=3306 DB_PORT=3306
DB_WEB_HOST=192.168.1.252 DB_WEB_HOST=192.168.1.252
DB_WEB_DATABASE=liexin DB_WEB_DATABASE=liexin
DB_WEB_USERNAME=liexin DB_WEB_USERNAME=liexin
DB_WEB_PASSWORD=liexin#zsyM DB_WEB_PASSWORD=liexin#zsyM
DB_PORT=3306 DB_PORT=3306
DB_LABEL_HOST=192.168.1.252 DB_LABEL_HOST=192.168.1.252
DB_LABEL_DATABASE=lie_labels DB_LABEL_DATABASE=lie_labels
DB_LABEL_USERNAME=lie_labels DB_LABEL_USERNAME=lie_labels
DB_LABEL_PASSWORD=lie_labels#zsyM DB_LABEL_PASSWORD=lie_labels#zsyM
DB_PORT=3306 DB_PORT=3306
DB_MONGO_HOST=192.168.1.237 DB_MONGO_HOST=192.168.1.237
DB_MONGO_DATABASE=ichunt DB_MONGO_DATABASE=ichunt
DB_MONGO_USERNAME=ichunt DB_MONGO_USERNAME=ichunt
DB_MONGO_PASSWORD=huntmon6699 DB_MONGO_PASSWORD=huntmon6699
DB_MONGO_PORT=27017 DB_MONGO_PORT=27017
CACHE_DRIVER=file CACHE_DRIVER=file
SESSION_DRIVER=file SESSION_DRIVER=file
QUEUE_DRIVER=sync QUEUE_DRIVER=sync
REDIS_HOST=192.168.1.235 REDIS_HOST=192.168.1.235
REDIS_PASSWORD=icDb29mLy2s REDIS_PASSWORD=icDb29mLy2s
REDIS_PORT=6379 REDIS_PORT=6379
REDIS_READ_HOST=192.168.1.237 REDIS_READ_HOST=192.168.1.237
REDIS_READ_PASSWORD=icDb29mLy2s REDIS_READ_PASSWORD=icDb29mLy2s
REDIS_READ_PORT=6379 REDIS_READ_PORT=6379
RABBITMQ_HOST=192.168.1.252 RABBITMQ_HOST=192.168.1.252
RABBITMQ_PORT=5672 RABBITMQ_PORT=5672
RABBITMQ_VHOST=/ RABBITMQ_VHOST=/
RABBITMQ_LOGIN=guest RABBITMQ_LOGIN=guest
RABBITMQ_PASSWORD=guest RABBITMQ_PASSWORD=guest
MAIL_DRIVER=smtp MAIL_DRIVER=smtp
MAIL_HOST='smtp.exmail.qq.com' MAIL_HOST='smtp.exmail.qq.com'
MAIL_PORT=25 MAIL_PORT=25
MAIL_FROM='系统管理员' MAIL_FROM='系统管理员'
MAIL_USERNAME='admin-it@teshehui.com' MAIL_USERNAME='admin-it@teshehui.com'
MAIL_PASSWORD='Admin$_it$_tsh$_k031iQk0' MAIL_PASSWORD='Admin$_it$_tsh$_k031iQk0'
MAIL_ENCRYPTION=tls MAIL_ENCRYPTION=tls
ADMIN=liuzhiyong@teshehui.com ADMIN=liuzhiyong@teshehui.com
LOGIN_DOMAIN='user.liexin.net' LOGIN_DOMAIN='user.liexin.net'
ERP_DOMAIN=http://192.168.1.235:6886 ERP_DOMAIN=http://192.168.1.238:6999
ERP_DB_NAME=ICHUNT ERP_DB_NAME=ICHUNT
\ No newline at end of file
...@@ -425,6 +425,7 @@ Class AjaxController extends Controller ...@@ -425,6 +425,7 @@ Class AjaxController extends Controller
$html = $request->input("html",''); $html = $request->input("html",'');
$datas = $request->input("datas",''); $datas = $request->input("datas",'');
$returnHtml = []; $returnHtml = [];
// dump($datas);
foreach($datas as $k=>$item){ foreach($datas as $k=>$item){
$createHtml = (new \App\Services\LabelService)->getLabelOfflineHtml($html,$item); $createHtml = (new \App\Services\LabelService)->getLabelOfflineHtml($html,$item);
if($createHtml){ if($createHtml){
......
...@@ -98,14 +98,20 @@ class LabelService { ...@@ -98,14 +98,20 @@ class LabelService {
$info["ichunt2020"]["customer_code"] = isset($item["customer_code"]) ? $item["customer_code"] : ""; $info["ichunt2020"]["customer_code"] = isset($item["customer_code"]) ? $item["customer_code"] : "";
$info["ichunt2020"]["customer_type"] = isset($item["customer_type"]) ? $item["customer_type"] : ""; $info["ichunt2020"]["customer_type"] = isset($item["customer_type"]) ? $item["customer_type"] : "";
$info["ichunt2020"]["customer_com"] = isset($item["customer_com"]) ? $item["customer_com"] : ""; $info["ichunt2020"]["customer_com"] = isset($item["customer_com"]) ? $item["customer_com"] : "";
$info["ichunt2020"]["data_code"] = isset($item["data_code"]) ? $item["data_code"] : "";
$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); return $this->getHtml($_html,$info);
} }
protected function getHtml($_html,$info){ protected function getHtml($_html,$info){
// dump($_html);
// dump($info);
try{ try{
$matches = []; $matches = [];
$a = preg_match_all('/<<<(.*?)>>>/i',$_html,$matches); preg_match_all('/<<<(.*?)>>>/i',$_html,$matches);
$arr = [];
foreach($matches[1] as $k=>$field){ foreach($matches[1] as $k=>$field){
$arr[$k] = isset($info["ichunt2020"][$field])?$info["ichunt2020"][$field] : ''; $arr[$k] = isset($info["ichunt2020"][$field])?$info["ichunt2020"][$field] : '';
} }
...@@ -115,8 +121,10 @@ class LabelService { ...@@ -115,8 +121,10 @@ class LabelService {
$html = $_html; $html = $_html;
} }
$dom = HtmlDomParser::str_get_html( $html ); $html = str_replace("箜"," ",$html);
// dump($html);
$dom = HtmlDomParser::str_get_html( $html );
//处理文本 //处理文本
$textareas = $dom->find('textarea'); $textareas = $dom->find('textarea');
foreach($textareas as $k=>$textarea){ foreach($textareas as $k=>$textarea){
...@@ -137,6 +145,7 @@ class LabelService { ...@@ -137,6 +145,7 @@ class LabelService {
foreach($yiweimaits as $k=>$yiweimait){ foreach($yiweimaits as $k=>$yiweimait){
try{ try{
$a = $yiweimait->style; $a = $yiweimait->style;
$yiweimait->datatypes = str_replace(["#","%","&"],"",$yiweimait->datatypes);
$b = 'data:image/png;base64,' . DNS1D::getBarcodePNG($yiweimait->datatypes, "C128"); $b = 'data:image/png;base64,' . DNS1D::getBarcodePNG($yiweimait->datatypes, "C128");
$c = preg_replace('/background: url\((.*?)\) 0% 0% \/ 100% 100%/'," background: url({$b}) 0% 0% / 100% 100% ",$a); $c = preg_replace('/background: url\((.*?)\) 0% 0% \/ 100% 100%/'," background: url({$b}) 0% 0% / 100% 100% ",$a);
$yiweimait->style = $c; $yiweimait->style = $c;
......
...@@ -271,7 +271,7 @@ ...@@ -271,7 +271,7 @@
<option value="#">#</option> <option value="#">#</option>
<option value=";"></option> <option value=";"></option>
<option value=":"></option> <option value=":"></option>
<option value="">空格</option> <option value="">空格</option>
</select> </select>
</span> </span>
<div class="sjglbox fl"> <div class="sjglbox fl">
...@@ -305,7 +305,7 @@ ...@@ -305,7 +305,7 @@
<option value="#">#</option> <option value="#">#</option>
<option value=";"></option> <option value=";"></option>
<option value=":"></option> <option value=":"></option>
<option value="">空格</option> <option value="">空格</option>
</select> </select>
</span> </span>
<div class="sjglbox fl"> <div class="sjglbox fl">
...@@ -339,7 +339,7 @@ ...@@ -339,7 +339,7 @@
<option value="#">#</option> <option value="#">#</option>
<option value=";"></option> <option value=";"></option>
<option value=":"></option> <option value=":"></option>
<option value="">空格</option> <option value="">空格</option>
</select> </select>
</span> </span>
<div class="sjglbox fl"> <div class="sjglbox fl">
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<option value="#">#</option> <option value="#">#</option>
<option value=";"></option> <option value=";"></option>
<option value=":"></option> <option value=":"></option>
<option value="">空格</option> <option value="">空格</option>
</select> </select>
</span> </span>
<div class="sjglbox fl"> <div class="sjglbox fl">
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<option value="#">#</option> <option value="#">#</option>
<option value=";"></option> <option value=";"></option>
<option value=":"></option> <option value=":"></option>
<option value="">空格</option> <option value="">空格</option>
</select> </select>
</span> </span>
<div class="sjglbox fl"> <div class="sjglbox fl">
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
<option value="#">#</option> <option value="#">#</option>
<option value=";"></option> <option value=";"></option>
<option value=":"></option> <option value=":"></option>
<option value="">空格</option> <option value="">空格</option>
</select> </select>
</span> </span>
<div class="sjglbox fl"> <div class="sjglbox fl">
......
[" <div class=\"edit-con\" style=\"width: 440px; height: 280px; background-color: rgb(255, 255, 255); border: 0px;\"><div class=\"yiweimait huabuitem\" type=\"5\" w=\"227\" h=\"47\" name=\"yiweimait\" style=\" background: url(data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAATgAAAAeAQMAAACCM5C2AAAABlBMVEX\/\/\/8AAABVwtN+AAAAAXRSTlMAQObYZgAAAD1JREFUOI3tyrEJADAIBEDB9iHDpBVcXbANOMy3QjJGGq8+IdRtVW12g6m4bhFUHsDa3ZgZXTJv3rx5n98DzVlxMwDPJ9UAAAAASUVORK5CYII=) 0% 0% \/ 100% 100% no-repeat; width: 227px; height: 47px; display: block; top: 51px; left: 97px;\" x=\"97\" y=\"51\" sjgl1=\"goods_type||zdyxkpoiop\" datatypes=\"MP5610GQG-P\" sjgl2=\"data_code||zdyxkpoiop\" sjgl3=\"coo||zdyxkpoiop\" sjgl4=\"customer_material_number||zdyxkpoiop\"><\/div><div class=\"erweimait huabuitem\" type=\"5\" w=\"45\" h=\"45\" name=\"erweimait\" style=\" background: url(data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD8AAAA\/AQMAAABtkYKcAAAABlBMVEX\/\/\/8AAABVwtN+AAAAAXRSTlMAQObYZgAAAM1JREFUKJF90EEOgyAQBdBJ2OsNykVIvJbdlB7NXgCuwM4tCRtMDL8D0iqtLauXDPr\/QMAq7IBEf+BJUa+o2xGgglUwBdMXXiO+\/IGL\/gmJDI6QsWZt4BpA7RPsOfiEibazARbBrmI6B38oDeHhsLhLdwBnLavklbXy1wbcMOkMYYkhzA5p80ikDD+SiA34z6E0zDA7yl6osMOdWgBpzI8QlgZcg0eIpU\/veNkjALeNJEe3AGaULXw\/p65B0ki3HJFG5Q\/INWJ9Z0wDzBtP9HdPrmKH\/ZgAAAAASUVORK5CYII=) 0% 0% \/ 100% 100% no-repeat; width: 45px; height: 45px; display: block; top: 186.016px; left: 192px;\" x=\"192\" y=\"186.015625\" sjgl1=\"goods_type||zdyxkpoiop\" datatypes=\"MP5610GQG-P+10\/10\" sjgl2=\"+goods_number||zdyxkpoiop\" sjgl3=\"\/goods_number||zdyxkpoiop\" sjgl4=\"customer_material_number||zdyxkpoiop\"><\/div><\/div> "] [" <div class=\"edit-con\" style=\"width: 440px; height: 280px; background-color: rgb(255, 255, 255); border: 0px;\"><div class=\"yiweimait huabuitem act\" type=\"5\" w=\"357\" h=\"68\" name=\"yiweimait\" style=\" background: url(data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlYAAAAeAQMAAADU\/8J0AAAABlBMVEX\/\/\/8AAABVwtN+AAAAAXRSTlMAQObYZgAAAFpJREFUSIntzLEJwDAMRFGDWoFXMaQ90OoGtQatIrhWkHiMFOp+89+gimFGPKxSuuhr2JvCo4oyA909Yzp03QweCDIj3exkrWffjT6FGG211VZbbbXVVls\/sj4TYtZxKc2KIgAAAABJRU5ErkJggg==) 0% 0% \/ 100% 100% no-repeat; width: 357px; height: 68px; display: block; top: 28.0156px; left: 44px;\" x=\"44\" y=\"28.015625\" sjgl1=\"goods_type||zdyxkpoiop\" datatypes=\"MP5610GQG-P 22+ zh s123456\" sjgl2=\" data_code||zdyxkpoiop\" sjgl3=\" coo||zdyxkpoiop\" sjgl4=\" customer_material_number||zdyxkpoiop\"><\/div><div class=\"erweimait huabuitem\" type=\"5\" w=\"209\" h=\"156\" name=\"erweimait\" style=\" background: url(data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLAQMAAAACgOipAAAABlBMVEX\/\/\/8AAABVwtN+AAAAAXRSTlMAQObYZgAAASZJREFUKJF90r3NgzAQBuBDFJRsEC9iyWslFZayR1glnsAr0Lm15AYkxPvdGQg\/IZ+rR\/Jxf4aAMfnqCXT0k4BJwkhaQac3HZigASQ\/znR4XtBvAdfcMsRmLL+ZMJMLlz2VSw8rpV+JWVv\/j3xKryPNZyV6uZ1qLiEcwutMyR9ayTA1lDypvrJ7Ik+BIVhJigHJHan8yOShLd2KTrnxVmvaU\/GqPVqvO6b+QT6yhxIU7zQVPM+OCiY2HMPVbmRswy1XB041kqQIvL46JIfX48h8K4dL9PzGMtaZeVKdN5neOkrrO8qqHW\/b5K2X1+SVCPMTmlhXB\/JTqqXJD+2J2ALgAw\/\/RQS4JQBV69bPdjT8HFYKc+vTnVvfUabo9fSY\/x3eLxUH\/gF2sf2L1EsM9gAAAABJRU5ErkJggg==) 0% 0% \/ 100% 100% no-repeat; width: 209px; height: 156px; display: block; top: 109px; left: 101px;\" x=\"101\" y=\"109\" sjgl1=\"goods_type||zdyxkpoiop\" datatypes=\"MP56#1%0GQG-P+YAGEO 10\uff1b22+\" sjgl2=\"+goods_brand||zdyxkpoiop\" sjgl3=\" goods_number||zdyxkpoiop\" sjgl4=\"\uff1bdata_code||zdyxkpoiop\"><\/div><\/div> "]
\ No newline at end of file \ No newline at end of file
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