From ea5ff87f1b222bca129b866d50aaf5402b69d42f Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 18 十二月 2023 09:43:07 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI

---
 WebTM/views/领料发货/销售出库/Kf_SellOutBill.html |  845 +++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 620 insertions(+), 225 deletions(-)

diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill.html"
index f042095..f0b68b5 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill.html"
@@ -65,7 +65,6 @@
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
                                                 <input type="hidden" name="HInterID" id="HInterID" value="0">
-                                                <input type="hidden" name="HSTOCKORGID" id="HSTOCKORGID" lay-verify="HSTOCKORGID" value="0">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
@@ -75,36 +74,107 @@
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label">閿�鍞儴闂�</label>
+                                            <label class="layui-form-label">婧愬崟绫诲瀷</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;">
-                                                <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;">
+                                                <select name="BillType" id="BillType" lay-filter="BillType" style="width: 180px; ">
+                                                    <option style="color:blue;" selected="selected" value="1401">閿�鍞鍗�</option>
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">婧愬崟鍙�</label>
+                                            <div class="layui-input-inline">
+                                                <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <input type="hidden" name="HMainSourceBillType" id="HMainSourceBillType" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="text" name="HMainSourceBillNo" id="HMainSourceBillNo" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;"  readonly>
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HMainSource" style="width:40px;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                 </button>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">閿�鍞儴闂�</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="background-color:#efefef4d;" readonly>
+                                                <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>-->
                                             </div>
                                         </div>
                                         <div class="layui-inline">
                                             <label class="layui-form-label">閿�鍞憳</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" name="HEmpName" id="HEmpName" " class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="text" name="HEmpName" id="HEmpName" " class="layui-input" value="" style="background-color:#efefef4d;" readonly>
                                                 <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;">
+                                                <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
+                                                </button>-->
                                             </div>
                                         </div>
-
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">涓荤</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="background-color:#efefef4d;" readonly>
+                                                <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="HManagerList" style="width:40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>-->
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">瀹㈡埛<label style="color:red"> * </label></label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="background-color:#efefef4d;" readonly>
+                                                <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>-->
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">甯佸埆</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HCurName" id="HCurName" class="layui-input" value="" style="background-color:#efefef4d;" readonly>
+                                                <input type="hidden" name="HCurID" id="HCurID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="HCurList" style="width:40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>-->
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">姹囩巼<label style="color:red"> * </label></label>
+                                            <div class="layui-input-inline">
+                                                <input class="layui-input" name="HExRate" id="HExRate" autocomplete="off" value="0" style="background-color: #efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">鑱旂郴浜�</label>
+                                            <div class="layui-input-inline">
+                                                <input class="layui-input" name="HLinkMan" id="HLinkMan" autocomplete="off" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">鑱旂郴鐢佃瘽</label>
+                                            <div class="layui-input-inline">
+                                                <input class="layui-input" name="HLinkPhone" id="HLinkPhone" autocomplete="off" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-inline">
                                             <label class="layui-form-label">閿�鍞柟寮�</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" name="HSellSName" id="HSellSName" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="text" name="HSellSName" id="HSellSName" class="layui-input" value="" style="background-color:#efefef4d;" readonly>
                                                 <input type="hidden" name="HSellSID" id="HSellSID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HSellSList" style="width:40px;">
+                                                <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="HSellSList" style="width:40px;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
+                                                </button>-->
                                             </div>
                                         </div>
                                         <div class="layui-inline">
@@ -117,18 +187,6 @@
                                                 </button>
                                             </div>
                                         </div>
-                                        <div class="layui-inline" style="width:900px;">
-                                            <label class="layui-form-label">瀹㈡埛</label>
-                                            <div class="layui-input-inline" style="width:700px;">
-                                                <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="float:left;width:465px;">
-                                                <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;">
-                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <div class="layui-row">
                                         <div class="layui-inline">
                                             <label class="layui-form-label">浠撶</label>
                                             <div class="layui-input-inline">
@@ -149,60 +207,6 @@
                                                 </button>
                                             </div>
                                         </div>
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label">婧愬崟绫诲瀷</label>
-                                            <div class="layui-input-inline">
-                                                <select name="BillType" id="BillType" lay-filter="BillType" style="width: 180px; ">
-                                                    <option style="color:blue;" selected="selected" value="1401">閿�鍞鍗�</option>
-                                                </select>
-                                            </div>
-                                        </div>
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label">婧愬崟鍙�</label>
-                                            <div class="layui-input-inline">
-                                                <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <input type="hidden" name="HMainSourceBillType" id="HMainSourceBillType" class="layui-input" value="" style="float:left;width:150px;">
-                                                <input type="text" name="HMainSourceBillNo" id="HMainSourceBillNo" class="layui-input" value="" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HMainSource" style="width:40px;">
-                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <div class="layui-row">
-                                        <div class="layui-inline" style="display:none;">
-                                            <label class="layui-form-label">杩愯緭鍏徃</label>
-                                            <div class="layui-input-inline">
-                                                <input type="text" name="HConveyCompName" id="HConveyCompName" class="layui-input" value="" style="float:left;width:150px;">
-                                                <input type="hidden" name="HConveyCompID" id="HConveyCompID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HConveyCompList" style="width:40px;">
-                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
-                                            </div>
-                                        </div>
-                                        <div class="layui-inline" style="display:none;">
-                                            <label class="layui-form-label">杩愯緭鏂瑰紡</label>
-                                            <div class="layui-input-inline">
-                                                <input type="text" name="HConveyTypeName" id="HConveyTypeName" class="layui-input" value="" style="float:left;width:150px;">
-                                                <input type="hidden" name="HConveyTypeID" id="HConveyTypeID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HConveyTypeList" style="width:40px;">
-                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
-                                            </div>
-                                        </div>
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label">鑱旂郴鐢佃瘽</label>
-                                            <div class="layui-input-inline">
-                                                <input class="layui-input" name="HLinkPhone" id="HLinkPhone" autocomplete="off">
-                                            </div>
-                                        </div>
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label">鑱旂郴浜�</label>
-                                            <div class="layui-input-inline">
-                                                <input class="layui-input" name="HLinkMan" id="HLinkMan" autocomplete="off">
-                                            </div>
-                                        </div>
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-inline">
@@ -216,19 +220,19 @@
                                         <div class="layui-inline">
                                             <label class="layui-form-label">瀹㈡埛浣欓</label>
                                             <div class="layui-input-inline">
-                                                <input class="layui-input" name="HCusBalance" id="HCusBalance" autocomplete="off" readonly>
+                                                <input class="layui-input" name="HCusBalance" id="HCusBalance" autocomplete="off" style="background-color: #efefef4d;" readonly>
                                             </div>
                                         </div>
                                         <div class="layui-inline">
                                             <label class="layui-form-label">淇$敤棰濆害</label>
                                             <div class="layui-input-inline">
-                                                <input class="layui-input" name="HCreditRating_Now" id="HCreditRating_Now" autocomplete="off" readonly>
+                                                <input class="layui-input" name="HCreditRating_Now" id="HCreditRating_Now" autocomplete="off" style="background-color: #efefef4d;" readonly>
                                             </div>
                                         </div>
                                         <div class="layui-inline">
                                             <label class="layui-form-label">鍙敤棰濆害</label>
                                             <div class="layui-input-inline">
-                                                <input class="layui-input" name="HAvailableBalance" id="HAvailableBalance" autocomplete="off" readonly>
+                                                <input class="layui-input" name="HAvailableBalance" id="HAvailableBalance" autocomplete="off" style="background-color: #efefef4d;" readonly>
                                             </div>
                                         </div>
                                     </div>
@@ -242,12 +246,63 @@
                                             </div>
                                         </div>
                                     </div>
+
                                     <!--闅愯棌瀛楁-->
                                     <div class="layui-row" style="display:none;">
                                         <div class="layui-inline">
+                                            <label class="layui-form-label">杩愯緭鍏徃</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HConveyCompName" id="HConveyCompName" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="hidden" name="HConveyCompID" id="HConveyCompID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HConveyCompList" style="width:40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩愯緭鏂瑰紡</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HConveyTypeName" id="HConveyTypeName" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="hidden" name="HConveyTypeID" id="HConveyTypeID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HConveyTypeList" style="width:40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label"></label>
+                                            <div class="layui-input-inline">
+                                                <input class="layui-input" name="HConveyMoney" id="HConveyMoney" autocomplete="off" value="0" >
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
                                             <label class="layui-form-label">杩愯垂</label>
                                             <div class="layui-input-inline">
-                                                <input class="layui-input" name="HCarriage" id="HCarriage" autocomplete="off" value="0" onfocus="this.select();">
+                                                <input class="layui-input" name="HCarriage" id="HCarriage" autocomplete="off" value="0">
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style="display:none;">
+                                        <div class="layui-inline">
+                                            <div class="layui-input-inline">
+                                                <input type="hidden" name="HSTOCKORGID" id="HSTOCKORGID" lay-verify="HSTOCKORGID" value="0">
+                                                <input type="hidden" name="HOWNERID" id="HOWNERID" lay-verify="HOWNERID" value="0">
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">璋冨嚭浠撳簱</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" name="HSCWHName" id="HSCWHName" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="hidden" name="HSCWHID" id="HSCWHID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HSCWHList" style="width:40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">鏍搁攢浜�</label>
+                                            <div class="layui-input-inline">
+                                                <input class="layui-input" name="HCheckStatusMan" id="HCheckStatusMan" autocomplete="off">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
@@ -257,35 +312,9 @@
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label">甯佸埆</label>
-                                            <div class="layui-input-inline">
-                                                <input type="text" name="HCurName" id="HCurName" class="layui-input" value="" style="float:left;width:150px;">
-                                                <input type="hidden" name="HCurID" id="HCurID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HCurList" style="width:40px;">
-                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
-                                            </div>
-                                        </div>
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label">閿�鍞鍗曞彿</label>
+                                            <label class="layui-form-label">鍐呴儴鍗曟嵁鍙�</label>
                                             <div class="layui-input-inline">
                                                 <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" autocomplete="off">
-                                            </div>
-                                        </div>
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label">涓荤</label>
-                                            <div class="layui-input-inline">
-                                                <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float:left;width:150px;">
-                                                <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value="0" style="float:left;width:150px;">
-                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HManagerList" style="width:40px;">
-                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                </button>
-                                            </div>
-                                        </div>
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label">鏍搁攢浜�</label>
-                                            <div class="layui-input-inline">
-                                                <input class="layui-input" name="HCheckStatusMan" id="HCheckStatusMan" autocomplete="off">
                                             </div>
                                         </div>
                                     </div>
@@ -439,13 +468,16 @@
 
             //#region 鍒ゆ柇鎿嶄綔绫诲瀷骞跺垵濮嬪寲鐣岄潰
             if (OperationType == 1) {                                                   //鏃犳簮鍗曟柊澧�
-                $("#HItemID").val(0);
-                $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
-
+               /* $("#HItemID").val(0);*/
+               
                 //鐢熸垚鍗曟嵁鍙峰拰鍐呯爜
                 get_MAXNum();
-
+                //鏍规嵁鐢ㄦ埛鑾峰彇瀵瑰簲鑱屽憳銆侀儴闂ㄣ�侀攢鍞富绠�
                 getCzyglByUser();
+                //鍒濆鍖栨棩鏈熴�佸垱寤轰汉銆佸垱寤烘椂闂�
+                $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+                $("#HMaker").val(sessionStorage["HUserName"]);
+                $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
             }
             else if (OperationType == 3) {                                              //缂栬緫
                 //淇敼鏃朵富琛↖D
@@ -454,21 +486,11 @@
                 //缂栬緫鐘舵�佹椂锛屾牴鎹唴鐮侊紝鑾峰彇淇℃伅骞跺啓鍏ョ晫闈�
                 RoadBillMain(linterid);
             }
-            else if (OperationType == 4) {                                              //娴忚
-                $("#HItemID").val(linterid);
-
-                //缂栬緫鐘舵�佹椂锛屾牴鎹唴鐮侊紝鑾峰彇淇℃伅骞跺啓鍏ョ晫闈�
-                RoadBillMain(linterid);
-                $('#set_SaveBill').addClass("layui-btn-disabled").attr("disabled", true);//淇濆瓨鍚庡姞杞芥暟鎹椂淇濆瓨鎸夐挳绂佺敤
-            }
             else {
                 layer.alert("鏈煡鎿嶄綔绫诲瀷锛�", { icon: 5 });
             }
             //#endregion
 
-
-            //璁剧疆缁勭粐
-            $("#HUSEORGID").val(sessionStorage["OrganizationID"]);
 
             DisPlay_HideColumn();
 
@@ -598,9 +620,64 @@
                     , data = checkStatus.data;
                 //鏂板琛岃〃鏍兼暟鎹�
                 var NewRow = {
-                    "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HWHID": $("#HWHID").val(), "鍙戣揣浠撳簱": $("#HWHName").val(), "HQtyMust": "0",
-                    "HQty": "0", "HQty_Full": "0", "HQty_Empty": "0", "HQty_Back": "0", "HPrice": "0", "HMoney": "0", "HCostPrice": "0", "HCostMoney": "0",
-                    "HSalePrice": "0", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", "HRemark": ""
+                    "HMaterID": "0"
+                    , "鐗╂枡浠g爜": ""
+                    , "鐗╂枡鍚嶇О": ""
+                    , "瑙勬牸鍨嬪彿": ""
+                    , "HUnitID": "0"
+                    , "璁¢噺鍗曚綅": ""
+                    , "HQtyMust": "0"
+                    , "HQty": "0"
+                    , "HPrice": "0"
+                    , "HTaxPrice": "0"
+                    , "HTaxRate": "0"
+                    , "HMoney": "0"
+                    , "HTaxMoney": "0"
+                    , "HWHID": $("#HWHID").val()
+                    , "鍙戣揣浠撳簱": $("#HWHName").val()
+                    , "HRemark": ""
+
+                    , "HQty_Full": "0"
+                    , "HQty_Empty": "0"
+                    , "HQty_Back": "0"
+                    , "HCostPrice": "0"
+                    , "HCostMoney": "0"
+                    , "HSalePrice": "0"
+
+                    , "HSeOrderInterID": 0
+                    , "HSeOrderEntryID": 0
+                    , "HSeOrderBillNo": ""
+
+                    , "HSourceInterID": "0"
+                    , "HSourceEntryID": "0"
+                    , "HSourceBillNo": ""
+                    , "HSourceBillType": ""
+                    , "HRelationQty": "0"
+                    , "HRelationMoney": "0"
+
+                    , 'HSPID': "0"
+                    , 'HSPName': ""
+                    , 'HSPGroupID': "0"
+                    , "HSPGroupName": ""
+                    , 'HSCWHID': "0"
+                    , 'HSCWHName': ""
+                    , 'HSCSPID': "0"
+                    , 'HSCSPName': ""
+                    , 'HBatchNo': ""
+                    , 'HPOOrderInterID': "0"
+                    , 'HPOOrderEntryID': "0"
+                    , 'HPOOrderBillNo': ""
+
+                    , 'HPropertyID': "0"
+                    , 'HPropertyName': ""
+                    , 'HSecUnitID': "0"
+                    , 'HSecUnitName': ""
+                    , 'HSecUnitRate': "0"
+
+
+                    , 'HEngineNum': ""
+                    , 'HUnderPanNum': ""
+                    , 'HLeaveFactCard': ""
                 };
 
                 switch (obj.event) {
@@ -672,7 +749,7 @@
                 //layer.msg('[ID: ' + data.id + '] ' + field + ' 瀛楁鏇存敼涓猴細' + value);
 
                 switch (field) {
-                    case "HQty":                                                       //瀹炲彂鏁伴噺
+                    case "HQty":                                                       //鏁伴噺
                         //鏁版嵁鏍煎紡鏍¢獙
                         temp = value + "";
                         if (!ref.test(temp) || temp == 0) {
@@ -682,23 +759,40 @@
                             });
                             table.render(option);
 
-                            layer.msg("瀹炲彂鏁伴噺璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
+                            layer.msg("鏁伴噺璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
                             return;
                         }
 
 
                         //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
-                        var HQty = value * 1;                           //瀹炲彂鏁伴噺
+                        var HQty = value * 1;                           //鏁伴噺
                         var HPrice = obj.data.HPrice * 1;               //鍗曚环
-                        var HMoney = HQty * HPrice;                     //閲戦=瀹炲彂鏁伴噺*鍗曚环
+                        var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼
+                        /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
+                        var HTaxPrice = HPrice * (1 + HTaxRate);        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                        /*var HRelTaxPrice = HTaxPrice * HDiscountRate;   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
+                        //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
+                        var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
+                        var HTaxMoney = HMoney * (1 + HTaxRate);            //浠风◣鍚堣=閲戦 * (1 + 绋庣巼)
+
+                        //璁剧疆鏁版嵁灏忔暟浣嶆暟
+                        HQty = dealDoubleToFixed(HQty, 1);
+                        HPrice = dealDoubleToFixed(HPrice, 3);
+                        HTaxRate = HTaxRate;
+                        HTaxPrice = dealDoubleToFixed(HTaxPrice, 3);
+                        HMoney = dealDoubleToFixed(HMoney, 2);
+                        HTaxMoney = dealDoubleToFixed(HTaxMoney, 2);
 
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
                             HQty: HQty
                             , HPrice: HPrice
+                            , HTaxRate: HTaxRate * 100
+                            , HTaxPrice: HTaxPrice
                             , HMoney: HMoney
+                            , HTaxMoney: HTaxMoney
                         });
-                        table.render(option);
+                        //table.render(option);
                         break;
                     case "HPrice":                                                       //鍗曚环
                         //鏁版嵁鏍煎紡鏍¢獙
@@ -714,18 +808,126 @@
                             return;
                         }
 
+
                         //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
-                        var HQty = obj.data.HQty * 1;                   //瀹炲彂鏁伴噺
+                        var HQty = obj.data.HQty * 1;                   //鏁伴噺
                         var HPrice = value * 1;                         //鍗曚环
-                        var HMoney = HQty * HPrice;                     //閲戦=瀹炲彂鏁伴噺*鍗曚环
+                        var HTaxRate = obj.data.HTaxRate * 0.01;           //绋庣巼
+                        /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
+                        var HTaxPrice = HPrice * (1 + HTaxRate);        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                        /*var HRelTaxPrice = HTaxPrice * HDiscountRate;   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
+                        //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
+                        var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
+                        var HTaxMoney = HMoney * (1 + HTaxRate);            //浠风◣鍚堣=閲戦 * (1 + 绋庣巼)
+
+                        //璁剧疆鏁版嵁灏忔暟浣嶆暟
+                        HQty = dealDoubleToFixed(HQty, 1);
+                        HPrice = dealDoubleToFixed(HPrice, 3);
+                        HTaxRate = HTaxRate;
+                        HTaxPrice = dealDoubleToFixed(HTaxPrice, 3);
+                        HMoney = dealDoubleToFixed(HMoney, 2);
+                        HTaxMoney = dealDoubleToFixed(HTaxMoney, 2);
 
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
                             HQty: HQty
                             , HPrice: HPrice
+                            , HTaxRate: HTaxRate * 100
+                            , HTaxPrice: HTaxPrice
                             , HMoney: HMoney
+                            , HTaxMoney: HTaxMoney
                         });
-                        table.render(option);
+                        //table.render(option);
+                        break;
+                    case "HTaxRate":                                                       //鏁伴噺
+                        //鏁版嵁鏍煎紡鏍¢獙
+                        temp = value + "";
+                        if (!ref.test(temp)) {
+                            //鎭㈠鏁版嵁鍒扮紪杈戝墠
+                            obj.update({
+                                HTaxRate: oldText
+                            });
+                            table.render(option);
+
+                            layer.msg("绋庣巼璇疯緭鍏ヤ笉灏忎簬0鐨勬暟瀛�!");
+                            return;
+                        }
+
+
+                        //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+                        var HQty = obj.data.HQty * 1;                   //鏁伴噺
+                        var HPrice = obj.data.HPrice * 1;               //鍗曚环
+                        var HTaxRate = value * 0.01;                       //绋庣巼
+                        /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
+                        var HTaxPrice = HPrice * (1 + HTaxRate);        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                        /*var HRelTaxPrice = HTaxPrice * HDiscountRate;   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
+                        //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
+                        var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
+                        var HTaxMoney = HMoney * (1 + HTaxRate);            //浠风◣鍚堣=閲戦 * (1 + 绋庣巼)
+
+                        //璁剧疆鏁版嵁灏忔暟浣嶆暟
+                        HQty = dealDoubleToFixed(HQty, 1);
+                        HPrice = dealDoubleToFixed(HPrice, 3);
+                        HTaxRate = HTaxRate;
+                        HTaxPrice = dealDoubleToFixed(HTaxPrice, 3);
+                        HMoney = dealDoubleToFixed(HMoney, 2);
+                        HTaxMoney = dealDoubleToFixed(HTaxMoney, 2);
+
+                        //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                        obj.update({
+                            HQty: HQty
+                            , HPrice: HPrice
+                            , HTaxRate: HTaxRate * 100
+                            , HTaxPrice: HTaxPrice
+                            , HMoney: HMoney
+                            , HTaxMoney: HTaxMoney
+                        });
+                        //table.render(option);
+                        break;
+                    case "HTaxPrice":                                                       //鏁伴噺
+                        //鏁版嵁鏍煎紡鏍¢獙
+                        temp = value + "";
+                        if (!ref.test(temp)) {
+                            //鎭㈠鏁版嵁鍒扮紪杈戝墠
+                            obj.update({
+                                HTaxPrice: oldText
+                            });
+                            table.render(option);
+
+                            layer.msg("鍚◣鍗曟嵁璇疯緭鍏ヤ笉灏忎簬0鐨勬暟瀛�!");
+                            return;
+                        }
+                        //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+                        var HQty = obj.data.HQty * 1;                   //鏁伴噺
+                        var HTaxRate = obj.data.HTaxRate * 0.01;        //绋庣巼
+                        var HTaxPrice = value * 1;                          //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                        var HPrice = HTaxPrice / (1 + HTaxRate);        //鍗曚环=鍚◣鍗曟嵁/(1+绋庣巼)
+
+                        /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
+
+                        /*var HRelTaxPrice = HTaxPrice * HDiscountRate;   //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
+                        //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
+                        var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
+                        var HTaxMoney = HMoney * (1 + HTaxRate);            //浠风◣鍚堣=閲戦 * (1 + 绋庣巼)
+
+                        //璁剧疆鏁版嵁灏忔暟浣嶆暟
+                        HQty = dealDoubleToFixed(HQty, 1);
+                        HPrice = dealDoubleToFixed(HPrice, 3);
+                        HTaxRate = HTaxRate;
+                        HTaxPrice = dealDoubleToFixed(HTaxPrice, 3);
+                        HMoney = dealDoubleToFixed(HMoney, 2);
+                        HTaxMoney = dealDoubleToFixed(HTaxMoney, 2);
+
+                        //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                        obj.update({
+                            HQty: HQty
+                            , HPrice: HPrice
+                            , HTaxRate: HTaxRate * 100
+                            , HTaxPrice: HTaxPrice
+                            , HMoney: HMoney
+                            , HTaxMoney: HTaxMoney
+                        });
+                        //table.render(option);
                         break;
                     default:
                 }
@@ -1111,39 +1313,130 @@
                     , cols: [[ //瀛愯〃
                         { type: 'checkbox', totalRowText: '鍚堣琛�' }
                         , { type: 'numbers', title: '搴忓彿', width: 100 }
-                        , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
+                        , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
                         , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
-                        , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 150, }
-                        , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100, }
-                        , { field: 'HUnitID', title: 'HUnitID', width: 100, hide: true }
-                        , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100, edit: 'text', event: "HUnitID" }//f7
+                        , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 150, style: 'background-color:#efefef4d;' }
+                        , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100, style: 'background-color:#efefef4d;' }
+                        , { field: 'HUnitID', title: 'HUnitID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100, edit: 'text', event: "HUnitID"}//f7
+                        , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 100, totalRow: true, style: 'background-color:#efefef4d;'}
                         , { field: 'HQty', title: '瀹炲彂鏁伴噺', width: 100, totalRow: true, edit: 'text', event: "HQty" }
                         , { field: 'HPrice', title: '鍗曚环', width: 100, edit: 'text', event: "HPrice" }
-                        , { field: 'HMoney', title: '閲戦', width: 100, totalRow: true }
-                        , { field: 'HWHID', title: 'HWHID', width: 100, edit: 'text', hide: true }
+                        , { field: 'HTaxPrice', title: '鍚◣鍗曚环', width: 100, edit: 'text', event: "HTaxPrice" }
+                        , { field: 'HTaxRate', title: '绋庣巼', width: 100, edit: 'text' }
+                        , { field: 'HMoney', title: '閲戦', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HTaxMoney', title: '浠风◣鍚堣', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HWHID', title: 'HWHID', width: 100, edit: 'text', hide: true, style: 'background-color:#efefef4d;' }
                         , { field: '鍙戣揣浠撳簱', title: '鍙戣揣浠撳簱', width: 100, edit: 'text', event: "HWHID" }
                         , { field: 'HRemark', title: '澶囨敞', width: 100, edit: 'text' }
 
-
-                        , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 100, edit: 'text', event: "HQtyMust", hide: true }
                         , { field: 'HQty_Full', title: '婊¤溅閲嶉噺', width: 100, edit: 'text', event: "HQty_Full", hide: true }
                         , { field: 'HQty_Empty', title: '绌鸿溅閲嶉噺', width: 100, edit: 'text', event: "HQty_Empty", hide: true }
                         , { field: 'HQty_Back', title: '鍥炶溅閲嶉噺', width: 100, edit: 'text', event: "HQty_Back", hide: true }
                         , { field: 'HCostPrice', title: '鎴愭湰鍗曚环', width: 100, edit: 'text', event: "HCostPrice", hide: true }
                         , { field: 'HCostMoney', title: '鎴愭湰閲戦', width: 100, edit: 'text', event: "HCostMoney", hide: true }
                         , { field: 'HSalePrice', title: '閿�鍞崟浠�', width: 100, edit: 'text', event: "HSalePrice", hide: true }
-                        , { field: 'HSeOrderInterID', title: 'HSeOrderInterID', width: 100, edit: 'text', hide: true }
-                        , { field: 'HSeOrderEntryID', title: 'HSeOrderEntryID', width: 100, edit: 'text', hide: true }
-                        , { field: 'HSeOrderBillNo', title: '閿�鍞鍗曞彿', width: 100, edit: 'text', event: "HSeOrderBillNo", hide: true }
+
+                        , { field: 'HSeOrderInterID', title: '閿�鍞鍗曞唴鐮�', width: 100, edit: 'text', hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSeOrderEntryID', title: '閿�鍞鍗曞瓙鍐呯爜', width: 100, edit: 'text', hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSeOrderBillNo', title: '閿�鍞鍗曞彿', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+
+                        , { field: 'HSourceInterID', title: '婧愬崟鍐呯爜', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HRelationQty', title: '鍏宠仈鏁伴噺', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HRelationMoney', title: '鍏宠仈閲戦', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+
+                        , { field: 'HSPID', title: 'HSPID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSPName', title: '浠撲綅', width: 100, hide: true }
+                        , { field: 'HSPGroupID', title: 'HSPGroupID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSPGroupName', title: '浠撲綅缁�', width: 100, hide: true }
+                        , { field: 'HSCWHID', title: 'HSCWHID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSCWHName', title: '璋冨嚭浠撳簱', width: 100, hide: true }
+                        , { field: 'HSCSPID', title: 'HSCSPID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSCSPName', title: '璋冨嚭浠撲綅', width: 100, hide: true }
+                        , { field: 'HBatchNo', title: '鎵规', width: 100, hide: true }
+                        , { field: 'HPOOrderInterID', title: '閲囪喘璁㈠崟鍐呯爜', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HPOOrderEntryID', title: '閲囪喘璁㈠崟瀛愬唴鐮�', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HPOOrderBillNo', title: '閲囪喘璁㈠崟鍙�', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+
+                        , { field: 'HPropertyID', title: 'HPropertyID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HPropertyName', title: '杈呭姪灞炴��', width: 100, hide: true }
+                        , { field: 'HSecUnitID', title: 'HSecUnitID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+                        , { field: 'HSecUnitName', title: '杈呭姪璁¢噺鍗曚綅', width: 100, hide: true }
+                        , { field: 'HSecUnitRate', title: '鎹㈢畻鐜�', width: 100, hide: true }
+
+
+                        , { field: 'HEngineNum', title: '鍙戝姩鏈哄彿', width: 100, hide: true }
+                        , { field: 'HUnderPanNum', title: '鍦扮洏鍙�', width: 100, hide: true }
+                        , { field: 'HLeaveFactCard', title: '鍑哄巶璇�', width: 100, hide: true }
 
                         , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
                     ]]
                 }
 
                 var rowdata = [{
-                    "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HWHID": $("#HWHID").val(), "鍙戣揣浠撳簱": $("#HWHName").val(), "HQtyMust": "0",
-                    "HQty": "0", "HQty_Full": "0", "HQty_Empty": "0", "HQty_Back": "0", "HPrice": "0", "HMoney": "0", "HCostPrice": "0", "HCostMoney": "0",
-                    "HSalePrice": "0", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", "HRemark": ""
+                    "HMaterID": "0"
+                    , "鐗╂枡浠g爜": ""
+                    , "鐗╂枡鍚嶇О": ""
+                    , "瑙勬牸鍨嬪彿": ""
+                    , "HUnitID": "0"
+                    , "璁¢噺鍗曚綅": ""
+                    , "HQtyMust": "0"
+                    , "HQty": "0"
+                    , "HPrice": "0"
+                    , "HTaxPrice": "0"
+                    , "HTaxRate": "0"
+                    , "HMoney": "0"
+                    , "HTaxMoney": "0"
+                    , "HWHID": $("#HWHID").val()
+                    , "鍙戣揣浠撳簱": $("#HWHName").val()
+                    , "HRemark": ""
+
+                    , "HQty_Full": "0"
+                    , "HQty_Empty": "0"
+                    , "HQty_Back": "0"
+                    , "HCostPrice": "0"
+                    , "HCostMoney": "0"
+                    , "HSalePrice": "0"
+
+                    , "HSeOrderInterID": "0"
+                    , "HSeOrderEntryID": "0"
+                    , "HSeOrderBillNo": ""
+
+                    , "HSourceInterID": "0"
+                    , "HSourceEntryID": "0"
+                    , "HSourceBillNo": ""
+                    , "HSourceBillType": ""
+                    , "HRelationQty": "0"
+                    , "HRelationMoney": "0"
+
+                    , 'HSPID': "0"
+                    , 'HSPName': ""
+                    , 'HSPGroupID': "0"
+                    , "HSPGroupName": ""
+                    , 'HSCWHID': "0"
+                    , 'HSCWHName': ""
+                    , 'HSCSPID': "0"
+                    , 'HSCSPName': ""
+                    , 'HBatchNo': ""
+                    , 'HPOOrderInterID': "0"
+                    , 'HPOOrderEntryID': "0"
+                    , 'HPOOrderBillNo': ""
+
+                    , 'HPropertyID': "0"
+                    , 'HPropertyName': ""
+                    , 'HSecUnitID': "0"
+                    , 'HSecUnitName': ""
+                    , 'HSecUnitRate': "0"
+
+
+                    , 'HEngineNum': ""
+                    , 'HUnderPanNum': ""
+                    , 'HLeaveFactCard': ""
+
+                    
                 }];
 
                 option.data = rowdata;
@@ -1173,37 +1466,50 @@
                             form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
                                 "HBillNo": data.鍗曟嵁鍙�
                                 , "HDate": formatDate(data.鏃ユ湡)
-                                , "HInnerBillNo": data.閿�鍞鍗曞彿
-                                , "HEmpID": data.HEmpID
-                                , "HEmpName": data.涓氬姟鍛�
-                                , "HSupID": data.hsupid
-                                , "HSupName": data.瀹㈡埛
-                                , "HWHID": data.HWHID_Main
-                                , "HWHName": data.浠撳簱
-                                , "HSellSID": data.HSellSID
-                                , "HSellSName": data.閿�鍞柟寮�
                                 , "HDeptID": data.HDeptID
                                 , "HDeptName": data.閮ㄩ棬
+                                , "HEmpID": data.HEmpID
+                                , "HEmpName": data.涓氬姟鍛�
+                                , "HManagerID": data.hmanagerid
+                                , "HManagerName": data.涓荤
+                                , "BillType": data.HSourceBillType
+                                , "HMainSourceInterID": data.HMainSourceInterID
+                                , "HMainSourceEntryID": data.HMainSourceEntryID
+                                , "HMainSourceBillNo": data.HMainSourceBillNo
+                                , "HMainSourceBillType": data.HMainSourceBillType
+                                , "HSupID": data.hsupid
+                                , "HSupName": data.瀹㈡埛
+                                , "HLinkMan": data.鑱旂郴浜�
+                                , "HLinkPhone": data.鑱旂郴鐢佃瘽
+                                , "HSellSID": data.HSellSID
+                                , "HSellSName": data.閿�鍞柟寮�
                                 , "HSecManagerID": data.hsecmanagerid
                                 , "HSecManagerName": data.鍙戣揣浜�
                                 , "HKeeperID": data.hkeeperid
                                 , "HKeeperName": data.淇濈鍛�
-                                , "HManagerID": data.hmanagerid
-                                , "HManagerName": data.涓荤
-                                , "HCheckStatusMan": data.鏍搁攢浜�
+                                , "HWHID": data.HWHID_Main
+                                , "HWHName": data.涓昏〃浠撳簱
+                                , "HRemark": data.琛ㄥご澶囨敞
+
+
                                 , "HConveyCompID": data.HConveyCompID
                                 , "HConveyCompName": data.杩愯緭鍏徃
                                 , "HConveyTypeID": data.HConveyTypeID
                                 , "HConveyTypeName": data.杩愯緭鏂瑰紡
+                                , "HConveyMoney": data.HConveyMoney
                                 , "HCarriage": data.杩愯垂
-                                , "HRemark": data.琛ㄥご澶囨敞
-                                , "HExplanation": data.鎽樿
-
+                                , "HSTOCKORGID": data.HSTOCKORGID
+                                , "HOWNERID": data.HOWNERID
                                 , "HCurID": data.HCurID
                                 , "HCurName": data.甯佸埆
-                                , "HSourceBillType": data.婧愬崟绫诲瀷
-                                , "HLinkMan": data.鑱旂郴浜�
-                                , "HLinkPhone": data.鑱旂郴鐢佃瘽
+                                , "HExRate": data.姹囩巼
+                                , "HSCWHID": data.HSCWHID_Main
+                                , "HSCWHName": data.涓昏〃璋冨嚭浠撳簱
+                                , "HCheckStatusMan": data.鏍搁攢浜�
+                                , "HExplanation": data.鎽樿
+                                , "HInnerBillNo": data.鍐呴儴鍗曟嵁鍙�
+
+                                
                                 , "HMaker": data.鍒跺崟浜�
                                 , "HMakeDate": data.鍒跺崟鏃ユ湡 == null ? "" : Format(new Date(data.鍒跺崟鏃ユ湡), "yyyy-MM-dd")
                                 , "HUpDater": data.淇敼浜�
@@ -1214,12 +1520,6 @@
                                 , "HCloseDate": data.鍏抽棴鏃ユ湡 == null ? "" : Format(new Date(data.鍏抽棴鏃ユ湡), "yyyy-MM-dd")
                                 , "HDeleteMan": data.浣滃簾浜�
                                 , "HDeleteDate": data.浣滃簾鏃ユ湡 == null ? "" : Format(new Date(data.浣滃簾鏃ユ湡), "yyyy-MM-dd")
-
-                                , "HMainSourceInterID": data.HSourceInterID
-                                , "HMainSourceEntryID": "0"
-                                , "HMainSourceBillNo": data.婧愬崟鍗曞彿
-                                , "HMainSourceBillType": data.HSourceBillType
-                                , "BillType": data.HSourceBillType
                             });
 
                             HOrgIDBar = data.HOrgID == null ? 0 : data.HOrgID;
@@ -1235,20 +1535,24 @@
                                         , "瑙勬牸鍨嬪彿": result.data[i].瑙勬牸鍨嬪彿
                                         , "HUnitID": result.data[i].hunitid
                                         , "璁¢噺鍗曚綅": result.data[i].璁¢噺鍗曚綅
-                                        , "HQty": result.data[i].鏁伴噺
-                                        , "HPrice": result.data[i].鍗曚环
-                                        , "HMoney": result.data[i].閲戦
+                                        , "HQtyMust": dealDoubleToFixed(result.data[i].搴斿彂鏁伴噺, 1)
+                                        , "HQty": dealDoubleToFixed(result.data[i].鏁伴噺, 1)
+                                        , "HPrice": dealDoubleToFixed(result.data[i].鍗曚环, 3)
+                                        , "HTaxPrice": dealDoubleToFixed(result.data[i].鍚◣鍗曚环, 3)
+                                        , "HTaxRate": result.data[i].绋庣巼
+                                        , "HMoney": dealDoubleToFixed(result.data[i].鏁伴噺 * result.data[i].鍗曚环, 2)
+                                        , "HTaxMoney": dealDoubleToFixed(result.data[i].鏁伴噺 * result.data[i].鍚◣鍗曚环, 2)
                                         , "HWHID": result.data[i].hwhid
                                         , "鍙戣揣浠撳簱": result.data[i].鍙戣揣浠撳簱
                                         , "HRemark": result.data[i].琛ㄤ綋澶囨敞
 
-                                        , "HQtyMust": result.data[i].搴斿彂鏁伴噺
                                         , "HQty_Full": result.data[i].婊¤溅閲嶉噺
                                         , "HQty_Empty": result.data[i].绌鸿溅閲嶉噺
                                         , "HQty_Back": result.data[i].鍥炶溅閲嶉噺
                                         , "HCostPrice": result.data[i].鎴愭湰鍗曚环
                                         , "HCostMoney": result.data[i].鎴愭湰閲戦
                                         , "HSalePrice": result.data[i].閿�鍞崟浠�
+
                                         , "HSeOrderInterID": result.data[i].HSeOrderInterID
                                         , "HSeOrderEntryID": result.data[i].HSeOrderEntryID
                                         , "HSeOrderBillNo": result.data[i].閿�鍞鍗曞彿
@@ -1257,6 +1561,32 @@
                                         , "HSourceEntryID": result.data[i].HSourceEntryID
                                         , "HSourceBillNo": result.data[i].婧愬崟鍗曞彿
                                         , "HSourceBillType": result.data[i].HSourceBillType
+                                        , "HRelationQty": result.data[i].鍏宠仈鏁伴噺
+                                        , "HRelationMoney": result.data[i].鍏宠仈閲戦
+
+                                        , 'HSPID': result.data[i].HSPID
+                                        , 'HSPName': result.data[i].浠撲綅
+                                        , 'HSPGroupID': result.data[i].HSPGroupID
+                                        , "HSPGroupName": result.data[i].浠撲綅缁�
+                                        , 'HSCWHID': result.data[i].HSCWHID
+                                        , 'HSCWHName': result.data[i].璋冨嚭浠撳簱
+                                        , 'HSCSPID': result.data[i].HSCSPID
+                                        , 'HSCSPName': result.data[i].璋冨嚭浠撲綅
+                                        , 'HBatchNo': result.data[i].鎵规
+                                        , 'HPOOrderInterID': result.data[i].閲囪喘璁㈠崟鍐呯爜
+                                        , 'HPOOrderEntryID': result.data[i].閲囪喘璁㈠崟瀛愬唴鐮�
+                                        , 'HPOOrderBillNo': result.data[i].閲囪喘璁㈠崟鍙�
+
+                                        , 'HPropertyID': result.data[i].HPropertyID
+                                        , 'HPropertyName': result.data[i].杈呭姪灞炴��
+                                        , 'HSecUnitID': result.data[i].HSecUnitID
+                                        , 'HSecUnitName': result.data[i].杈呭姪璁¢噺鍗曚綅
+                                        , 'HSecUnitRate': result.data[i].鎹㈢畻鐜�
+
+
+                                        , 'HEngineNum': result.data[i].鍙戝姩鏈哄彿
+                                        , 'HUnderPanNum': result.data[i].鍦扮洏鍙�
+                                        , 'HLeaveFactCard': result.data[i].鍑哄巶璇�
                                     }
                                 )
                             }
@@ -1642,36 +1972,36 @@
                                 }
                             })
                         }
-                        //閿�鍞鍗�
-                        if (obj.event == "HSeOrderBillNo") {
-                            layer.open({
-                                type: 2
-                                , skin: "layui-layer-rim" //鍔犱笂杈规
-                                , title: "閿�鍞鍗曞垪琛�"  //鏍囬
-                                , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
-                                , shift: 2 //寮瑰嚭鍔ㄧ敾
-                                , area: ["90%", "90%"] //绐椾綋澶у皬
-                                , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
-                                , content: ['../../閿�鍞鐞�/閿�鍞鍗�/Xs_SeOrderBillList.html', 'yes']
-                                , btn: ["纭畾", "鍙栨秷"]
-                                , btn1: function (index, laero) {
-                                    //鎸夐挳涓�  鐨勫洖璋�
-                                    var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
-                                    var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+                        ////閿�鍞鍗�
+                        //if (obj.event == "HSeOrderBillNo") {
+                        //    layer.open({
+                        //        type: 2
+                        //        , skin: "layui-layer-rim" //鍔犱笂杈规
+                        //        , title: "閿�鍞鍗曞垪琛�"  //鏍囬
+                        //        , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                        //        , shift: 2 //寮瑰嚭鍔ㄧ敾
+                        //        , area: ["90%", "90%"] //绐椾綋澶у皬
+                        //        , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                        //        , content: ['../../閿�鍞鐞�/閿�鍞鍗�/Xs_SeOrderBillList.html', 'yes']
+                        //        , btn: ["纭畾", "鍙栨秷"]
+                        //        , btn1: function (index, laero) {
+                        //            //鎸夐挳涓�  鐨勫洖璋�
+                        //            var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
+                        //            var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
 
-                                    if (checkStatus.data.length != 1) {
-                                        return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
-                                    }
-                                    //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
-                                    obj.update({
-                                        "HSeOrderInterID": checkStatus.data[0].hmainid
-                                        , "HSeOrderEntryID": checkStatus.data[0].hsubid
-                                        , "HSeOrderBillNo": checkStatus.data[0].鍗曟嵁鍙�
-                                    })
-                                    layer.close(index);//鍏抽棴寮圭獥
-                                }
-                            })
-                        }
+                        //            if (checkStatus.data.length != 1) {
+                        //                return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
+                        //            }
+                        //            //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                        //            obj.update({
+                        //                "HSeOrderInterID": checkStatus.data[0].hmainid
+                        //                , "HSeOrderEntryID": checkStatus.data[0].hsubid
+                        //                , "HSeOrderBillNo": checkStatus.data[0].鍗曟嵁鍙�
+                        //            })
+                        //            layer.close(index);//鍏抽棴寮圭獥
+                        //        }
+                        //    })
+                        //}
                         obj.event = "";
                         return false;
                     }
@@ -1858,7 +2188,7 @@
                     success: function (data1) {
                         if (data1.data.length != 0) {
                             var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
-                            var titleData = ["HMaterID", "HUnitID", "HWHID", "HSeOrderInterID", "HSeOrderEntryID", "搴斿彂鏁伴噺", "婊¤溅閲嶉噺", "绌鸿溅閲嶉噺", "鍥炶溅閲嶉噺", "鎴愭湰鍗曚环", "鎴愭湰閲戦", "閿�鍞崟浠�", "閿�鍞鍗曞彿"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+                            var titleData = ["HMaterID", "HUnitID", "HWHID", "婊¤溅閲嶉噺", "绌鸿溅閲嶉噺", "鍥炶溅閲嶉噺", "鎴愭湰鍗曚环", "鎴愭湰閲戦", "閿�鍞崟浠�", "閿�鍞鍗曞唴鐮�", "閿�鍞鍗曞瓙鍐呯爜", "閿�鍞鍗曞彿","婧愬崟鍐呯爜","婧愬崟瀛愬唴鐮�","婧愬崟鍙�","婧愬崟绫诲瀷","鍏宠仈鏁伴噺","鍏宠仈閲戦","HSPID","浠撲綅","HSPGroupID","浠撲綅缁�","HSCWHID","璋冨嚭浠撳簱","HSCSPID","璋冨嚭浠撲綅","鎵规","閲囪喘璁㈠崟鍐呯爜","閲囪喘璁㈠崟瀛愬唴鐮�","閲囪喘璁㈠崟鍙�","HPropertyID","杈呭姪灞炴��","HSecUnitID","杈呭姪璁¢噺鍗曚綅","鎹㈢畻鐜�","鍙戝姩鏈哄彿","鍦扮洏鍙�","鍑哄巶璇�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
                             //titleData = [];
 
                             dataCol = data1.data[0].HGridString.split(',');
@@ -1951,21 +2281,21 @@
                                 , "HDeptName": data.閮ㄩ棬
                                 , "HEmpID": data.HEmpID
                                 , "HEmpName": data.涓氬姟鍛�
-                                , "HSellSID": data.HSellSID
-                                , "HSellSName": data.閿�鍞柟寮�
-                                , "HSupID": data.HCusID
-                                , "HSupName": data.瀹㈡埛
-                                , "HLinkMan": data.鑱旂郴浜�
-                                , "HLinkPhone": data.鑱旂郴鐢佃瘽
-                                , "HCreditRating_Now": data.HCreditRating_Now
-
+                                , "HManagerID": data.HManagerID
+                                , "HManagerName": data.涓荤
                                 , "HMainSourceInterID": HMainSourceInterID
                                 , "HMainSourceEntryID": "0"
                                 , "HMainSourceBillNo": data.鍗曟嵁鍙�
                                 , "HMainSourceBillType": $("#BillType").val()
-
-                                //, "HCurID": data.HCurID
-                                //, "HCurName": data.甯佸埆
+                                , "HSupID": data.HCusID
+                                , "HSupName": data.瀹㈡埛
+                                , "HLinkMan": data.鑱旂郴浜�
+                                , "HLinkPhone": data.鑱旂郴鐢佃瘽
+                                , "HSellSID": data.HSellSID
+                                , "HSellSName": data.閿�鍞柟寮�
+                                , "HCurID": data.HCurID
+                                , "HCurName": data.甯佸埆
+                                , "HExRate": data.姹囩巼
                             });
 
                             //瀛愯〃  璧嬪��
@@ -1979,20 +2309,24 @@
                                         , "瑙勬牸鍨嬪彿": result.data[i].瑙勬牸鍨嬪彿
                                         , "HUnitID": result.data[i].HUnitID
                                         , "璁¢噺鍗曚綅": result.data[i].璁¢噺鍗曚綅
-                                        , "HQty": result.data[i].鏁伴噺
-                                        , "HPrice": result.data[i].鍗曚环
-                                        , "HMoney": result.data[i].閲戦
-                                        , "HWHID": $("#").val()
-                                        , "鍙戣揣浠撳簱": $("#").val()
+                                        , "HQtyMust": dealDoubleToFixed(result.data[i].鏁伴噺, 1)
+                                        , "HQty": dealDoubleToFixed(result.data[i].鏁伴噺, 1)
+                                        , "HPrice": dealDoubleToFixed(result.data[i].鍗曚环, 3)
+                                        , "HTaxPrice": dealDoubleToFixed(result.data[i].鍚◣鍗曚环, 3)
+                                        , "HTaxRate": result.data[i].绋庣巼
+                                        , "HMoney": dealDoubleToFixed(result.data[i].閲戦, 2)
+                                        , "HTaxMoney": dealDoubleToFixed(result.data[i].浠风◣鍚堣, 2)
+                                        , "HWHID": $("#HWHID").val()
+                                        , "鍙戣揣浠撳簱": $("#HWHName").val()
                                         , "HRemark": ""
 
-                                        , "HQtyMust": result.data[i].鏁伴噺
                                         , "HQty_Full": "0"
                                         , "HQty_Empty": "0"
                                         , "HQty_Back": "0"
                                         , "HCostPrice": "0"
                                         , "HCostMoney": "0"
                                         , "HSalePrice": "0"
+
                                         , "HSeOrderInterID": result.data[i].hmainid
                                         , "HSeOrderEntryID": result.data[i].hsubid
                                         , "HSeOrderBillNo": result.data[i].鍗曟嵁鍙�
@@ -2001,6 +2335,32 @@
                                         , "HSourceEntryID": result.data[i].hsubid
                                         , "HSourceBillNo": result.data[i].鍗曟嵁鍙�
                                         , "HSourceBillType": result.data[i].HBillType
+                                        , "HRelationQty": "0"
+                                        , "HRelationMoney": "0"
+
+                                        , 'HSPID': "0"
+                                        , 'HSPName': ""
+                                        , 'HSPGroupID': "0"
+                                        , "HSPGroupName": ""
+                                        , 'HSCWHID': "0"
+                                        , 'HSCWHName': ""
+                                        , 'HSCSPID': "0"
+                                        , 'HSCSPName': ""
+                                        , 'HBatchNo': ""
+                                        , 'HPOOrderInterID': "0"
+                                        , 'HPOOrderEntryID': "0"
+                                        , 'HPOOrderBillNo': ""
+
+                                        , 'HPropertyID': "0"
+                                        , 'HPropertyName': ""
+                                        , 'HSecUnitID': "0"
+                                        , 'HSecUnitName': ""
+                                        , 'HSecUnitRate': "0"
+
+
+                                        , 'HEngineNum': ""
+                                        , 'HUnderPanNum': ""
+                                        , 'HLeaveFactCard': ""
                                     }
                                 );
                             }
@@ -2015,7 +2375,6 @@
                 });
             }
             //#endregion
-
 
             //#region 鍙嶅鏍�/瀹℃牳鏁版嵁
             function set_CheckBill(num) {
@@ -2171,6 +2530,42 @@
             });
         }
         //#endregion
+
+        //#region 澶勭悊灏忔暟鏄剧ず浣嶆暟锛坉ata锛氶渶瑕佸鐞嗙殑鏁版嵁锛沶um锛氭暟鎹殑绫诲瀷(濡�1:鏁伴噺锛�2:閲戦锛�3:鍗曚环)锛�
+        function dealDoubleToFixed(data, num) {
+            //鐢ㄤ簬璁剧疆灏忔暟浣嶆暟
+            var dotLength = 0;
+
+            if (num == 1) {                                    //褰撴暟鎹负鏁伴噺鏃讹紝鏈�澶氫繚鐣�6浣嶅皬鏁�
+                //璁剧疆鏈�澶氫繚鐣�6浣嶅皬鏁�
+                dotLength = 6;
+            } else if (num == 2) {                             //褰撴暟鎹负閲戦鏃讹紝鏈�澶氫繚鐣�2浣嶅皬鏁�
+                //璁剧疆鏈�澶氫繚鐣�2浣嶅皬鏁�
+                dotLength = 2;
+            } else if (num == 3) {                             //褰撴暟鎹负鍗曚环鏃讹紝鏈�澶氫繚鐣�4浣嶅皬鏁�
+                //璁剧疆鏈�澶氫繚鐣�4浣嶅皬鏁�
+                dotLength = 4;
+            }
+
+            //鍒ゆ柇鏄惁瀛樺湪灏忔暟鐐瑰強鍏剁储寮曚綅缃�
+            data = data + "";
+            var index = data.indexOf(".");
+
+            //澶勭悊鏁版嵁骞惰繑鍥�
+            if (index < 0) {
+                return data * 1;
+            } else {
+                //鑾峰彇灏忔暟浣嶆暟
+                var length = data.length - index - 1;
+                if (length <= dotLength) {
+                    return data * 1;
+                } else {
+                    data = data * 1;
+                    return data.toFixed(dotLength);
+                }
+            }
+        }
+            //#endregion
     </script>
 </body>
 </html>
\ No newline at end of file

--
Gitblit v1.9.1