qiuenguang 1 жил өмнө
parent
commit
6c040d454a

+ 7 - 2
application/admin/controller/QcodeAdd.php

@@ -161,10 +161,15 @@ class QcodeAdd extends Backend
             $this->error('添加失败');
         }
         $flow = [
-            'l_flow' => (int)$batchList['l_flow'],
+            'l_flow' => (int)$batchList['large_endnum'],
             'bach_num' => $batchList['bach_num'],
         ];
-        $resetFlow->name($userinfo['company'].'_'."reset_flow")->where('product_id',$batchList['matter_id'])->update($flow);
+        if ($resetFlow->name($userinfo['company'].'_'."reset_flow")->where('product_id',$batchList['matter_id'])->find()){
+            $resetFlow->name($userinfo['company'].'_'."reset_flow")->where('product_id',$batchList['matter_id'])->update($flow);
+        }else{
+            $flow['product_id'] = $batchList['matter_id'];
+            $resetFlow->save($flow);
+        }
         $last_id = $bach->getLastInsID();
         if ($last_id){
             //插入大小二维码数据

+ 1 - 1
application/admin/view/qcode_add/index.html

@@ -154,7 +154,7 @@
             </tr>
             <tr>
                 <td><span>小件开始流水号</span></td>
-                <td><input type="text" id="c-small_start_liushui" name="small_start_liushui" ></td>
+                <td><input type="text" id="c-small_start_liushui" name="small_start_liushui" value="1"></td>
             </tr>
             <tr>
                 <td><span>小件重量(单位克 数值)</span></td>