Browse Source

优化无转换关系问题, 新增240/箱

曹鹤洋 2 years ago
parent
commit
d526814953

+ 6 - 2
Application/Admin/Controller/NewQcodeController.class.php

@@ -598,7 +598,10 @@ class  NewQcodeController extends AddonController
                         ->join('qr_qcode_unit u on u.code=d.matter_no')
                         ->where('c.id='.$val)
                         ->select();
-
+                    if(!$largelabel[$key]){
+                        //转换关系不存在
+                        $this->ajaxReturn(['code'=>1,'msg'=>'该产品转换关系缺失,请联系技术人员']);
+                    }
                     $largelabel[$key][0]['l_weight'] = $largelabel[$key][0]['l_weight']/100;
                     if($largelabel[$key][0]['l_num']!==null){
                         $largelabel[$key][0]['l_num'] = $largelabel[$key][0]['l_num']/10000;
@@ -631,9 +634,10 @@ class  NewQcodeController extends AddonController
 //            $smalllabel[0][$key]['imgcode']="data:image/png;base64,".$imgcode;
 //        }
             //var_dump($smalllabel[0]);
-            $total['largrlabel']=$largelabel?$largelabel:'';
+            $total['largrlabel'] =$largelabel?$largelabel:'';
             $total['smalllabel']=$smalllabel?$smalllabel:'';
             $total['num']=$num;
+            $total['code']=0;
             $this->ajaxReturn($total);
         }
     }

+ 1 - 0
Application/Admin/View/NewQcode/index.html

@@ -339,6 +339,7 @@
                             <option value="105">========105箱========</option>
                             <option value="144">========144箱========</option>
                             <option value="180">========180箱========</option>
+                            <option value="240">========240箱========</option>
                         </select>
                     </td>
                 </tr>

+ 13 - 11
Application/Admin/View/Qcode/budadetail.html

@@ -1226,17 +1226,19 @@
                     "sign_type":1,
                 },
                 success: function (result) {
-                    //console.log(result);
-                    large = result.largrlabel;//大标签列表
-                    small = result.smalllabel;//小标签列表
-                    var newlabel_type1 = $('#newlabel_type1').val();
-
-                    if (newlabel_type1 == 'v010') {
-                        //打印盒包装纸(100*150)大件
-                        small_v010_print(result,reFormData.printType1,idList.toString(),reptQty,1);
-                    }
-
-
+                    if(result.code==0){
+						large = result.largrlabel;//大标签列表
+						small = result.smalllabel;//小标签列表
+						var newlabel_type1 = $('#newlabel_type1').val();
+
+						if (newlabel_type1 == 'v010') {
+							//打印盒包装纸(100*150)大件
+							small_v010_print(result,reFormData.printType1,idList.toString(),reptQty,1);
+						}
+					}else{
+						$.messager.alert('系统提示', result.msg, 'error');
+						return false;
+					}
                 },
                 error: function (XMLHttpRequest, textStatus, errorThrown) {
                     $.messager.alert('系统提示', '数据加载错误,请刷新重试!', 'error');