Эх сурвалжийг харах

新增批次一箱件数选项、大件码数量显示优化925.2

曹鹤洋 2 жил өмнө
parent
commit
4976385ed1

+ 30 - 29
Application/Admin/View/NewQcode/index.html

@@ -186,26 +186,26 @@
                             <li>
                                 <span>生产厂商:</span>
                                 <input id="company_code" type="hidden" name="supplier_code"
-                                    value="{$userinfo[printer_code]}" readonly style="background:#EBEBE4">
+                                       value="{$userinfo[printer_code]}" readonly style="background:#EBEBE4">
                                 <input id="supplier_id" type="hidden" name="supplier_id" value="{$userinfo[id]}">
                                 <input id="company_name" type="text" name="supplier_name" value="{$userinfo[nickname]}"
-                                    readonly style="background:#EBEBE4">
+                                       readonly style="background:#EBEBE4">
                                 <!--<input name="company_name" readonly="readonly" id="company_name"   value="浙江美浓世纪集团有限公司">-->
                             </li>
                             <li>
                                 <span>邮政编码:</span><input name=" " type="text" id="postcode"
-                                    value="{$userinfo[postcode]}" readonly style="background:#EBEBE4">
+                                                         value="{$userinfo[postcode]}" readonly style="background:#EBEBE4">
                             </li>
                             <li>
                                 <span>电&ensp;&ensp;&ensp;&ensp;话:</span><input name=" " type="text" id="phone"
-                                    value="{$userinfo[mobile]}" readonly style="background:#EBEBE4">
+                                                                               value="{$userinfo[mobile]}" readonly style="background:#EBEBE4">
                             </li>
                         </ul>
                         <ul>
                             <li>
                                 地&ensp;&ensp;&ensp;&ensp;址:<input class="company_addres" name=" " type="text"
-                                    id="company_address" value="{$userinfo[company_address]}" readonly
-                                    style="background:#EBEBE4">
+                                                                  id="company_address" value="{$userinfo[company_address]}" readonly
+                                                                  style="background:#EBEBE4">
                             </li>
                         </ul>
                     </li>
@@ -225,26 +225,26 @@
                                     </volist>
                                 </select>
                                 <input id="company_code" type="hidden" name="supplier_code"
-                                    value="{$companylist[0][printer_code]}" readonly style="background:#EBEBE4">
+                                       value="{$companylist[0][printer_code]}" readonly style="background:#EBEBE4">
                                 <!--<input id="company_id" type="hidden"  name="supplier_id" value="{$companylist[0][id]}">-->
                                 <input id="company_name" type="hidden" name="supplier_name"
-                                    value="{$companylist[0][nickname]}" readonly style="background:#EBEBE4">
+                                       value="{$companylist[0][nickname]}" readonly style="background:#EBEBE4">
                                 <!--<input name="company_name" readonly="readonly" id="company_name"   value="浙江美浓世纪集团有限公司">-->
                             </li>
                             <li>
                                 <span>邮政编码:</span><input name=" " type="text" id="postcode"
-                                    value="{$companylist[0][postcode]}" readonly style="background:#EBEBE4">
+                                                         value="{$companylist[0][postcode]}" readonly style="background:#EBEBE4">
                             </li>
                             <li>
                                 <span>电&ensp;&ensp;&ensp;&ensp;话:</span><input name=" " type="text" id="phone"
-                                    value="{$companylist[0][mobile]}" readonly style="background:#EBEBE4">
+                                                                               value="{$companylist[0][mobile]}" readonly style="background:#EBEBE4">
                             </li>
                         </ul>
                         <ul>
                             <li>
                                 地&ensp;&ensp;&ensp;&ensp;址:<input class="company_addres" name=" " type="text"
-                                    id="company_address" value="{$companylist[0][company_address]}" readonly
-                                    style="background:#EBEBE4">
+                                                                  id="company_address" value="{$companylist[0][company_address]}" readonly
+                                                                  style="background:#EBEBE4">
                             </li>
                         </ul>
                     </li>
@@ -265,20 +265,20 @@
                                 </volist>
                             </select>
                             <input name=" " type="hidden" readonly="readonly" id="product_num"
-                                value="{$productlist[0][product_num]}">
+                                   value="{$productlist[0][product_num]}">
                             <input id="matter_type" type="hidden" name="matter_type" value="{$productlist[0][temple]}">
                             <input id="product_name" type="hidden" name="matter_name"
-                                value="{$productlist[0][product_name]}">
+                                   value="{$productlist[0][product_name]}">
                         </li>
 
-<!--                        <li>-->
-<!--                            <span>产品规格:</span><input name="matter_size" readonly="readonly" id="product_size" value=""-->
-<!--                                style="background:#EBEBE4">-->
-<!--                        </li>-->
+                        <!--                        <li>-->
+                        <!--                            <span>产品规格:</span><input name="matter_size" readonly="readonly" id="product_size" value=""-->
+                        <!--                                style="background:#EBEBE4">-->
+                        <!--                        </li>-->
                         <li>
                             <span>辅料代码:</span>
                             <input id="product_code" type="text" name="matter_no" value="" readonly
-                                style="background:#EBEBE4">
+                                   style="background:#EBEBE4">
                             <!--<span>产品编号:</span>-->
                         </li>
                     </ul>
@@ -348,6 +348,7 @@
                         <select name="box_num" id="box_num" style="width:175px;height:35px;">
                             <option value="1">========选择=========</option>
                             <option value="50">========50========</option>
+                            <option value="250">========250张========</option>
                             <option value="500">========500张========</option>
                             <option value="1000">=======1000张========</option>
                             <option value="2000">=======2000张========</option>
@@ -374,13 +375,13 @@
                 <tr>
                     <td><span>生产日期</span></td>
                     <td> <input name="manufacture_date" style="height:30px;width:173px;" id="manufacture_date"
-                            class="Wdate required" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})" />
+                                class="Wdate required" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})" />
                     </td>
                 </tr>
                 <tr>
                     <td><span>打码日期</span></td>
                     <td> <input name="print_date" style="height:30px;width:173px;" id="print_date"
-                            class="Wdate required" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})" />
+                                class="Wdate required" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})" />
                     </td>
                 </tr>
                 <!--                            <tr class="big_lable">-->
@@ -391,7 +392,7 @@
                     <td><span>生产批次号</span></td>
                     <td>
                         <input name="bach_num" type="text" id="bach_num" value="" class="required" readonly
-                            style="background:#EBEBE4">
+                               style="background:#EBEBE4">
                         <span id="reset_bach_num" style="cursor:pointer;">重置批次号</span>
                         <input name="reset_bach_num_status" id="reset_bach_num_status" type="hidden" value="1">
                     </td>
@@ -400,10 +401,10 @@
                     <td><span>大件开始流水号</span></td>
                     <td>
                         <input name="l_flow" type="text" id="l_flow" value="" class="required" readonly
-                            style="background:#EBEBE4">
+                               style="background:#EBEBE4">
                         <span id="reset_large_liushui" style="cursor:pointer;">重置流水号</span>
                         <input name="reset_large_liushui_status" id="reset_large_liushui_status" type="hidden"
-                            value="1">
+                               value="1">
                     </td>
                 </tr>
 
@@ -434,11 +435,11 @@
             </table>
         </fieldset>
         <div style="position:fixed;bottom:0;width:100%;height:50px;line-height:50px;">
-<!--            <div>-->
-                <!--<div id="createcode">
-                                打印
-                            </div>-->
-                <button type="submit" class="submitbtn" id="send">保存</button>
+            <!--            <div>-->
+            <!--<div id="createcode">
+                            打印
+                        </div>-->
+            <button type="submit" class="submitbtn" id="send">保存</button>
         </div>
     </form>
 

+ 4 - 2
static/basejs/tg_small_v010.js

@@ -80,7 +80,8 @@ function small_v010_print(result,type,idList,reptQty,sign_type) {
             }
             if (data['largrlabel'][j][k]['proportion']){
                 var proportion = data['largrlabel'][j][k]['numn']*data['largrlabel'][j][k]['proportion'];
-                proportion = String(proportion).replace(/^(.*\..{4}).*$/,"$1");
+                //proportion = String(proportion).replace(/^(.*\..{2}).*$/,"$1");
+                proportion = Math.floor(proportion * 100) / 100;
             }else{
                 var proportion = '';
             }
@@ -211,7 +212,8 @@ function small_v010_print(result,type,idList,reptQty,sign_type) {
                     }
                     if (data['largrlabel'][j][k]['proportion']){
                         var proportion = data['largrlabel'][j][k]['numn']*data['largrlabel'][j][k]['proportion'];
-                        proportion = String(proportion).replace(/^(.*\..{4}).*$/,"$1");
+                        // proportion = String(proportion).replace(/^(.*\..{4}).*$/,"$1");
+                        proportion = Math.floor(proportion * 100) / 100;
                     }else{
                         var proportion = '';
                     }