From 8a36bbee40f5e1069b15a98b1e64ac9719ee8a46 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期二, 23 四月 2024 17:17:13 +0800
Subject: [PATCH] 1.销售出库单 增加 反写源单 销售订单和发货通知单   超出 关联数量  关闭源单 2.应收单 增加  反写源单 销售出库单 和 销售订单  超出关联数量  关闭源单 3.动态获取源单增加参数 Num 0蓝单   1红单  2全部 4.销售流程的测试并完善功能; 销售订单-》发货通知单-》销售出库单-》应收单 (注意: 源单类型的下拉框 需要 根据数据库 表动态加载, 关联数量 要准确 , 审核 且 未关闭 未行关闭的行 才能下推 ,关联数量超额后,要 反写 关闭 源单 )

---
 WebTM/views/生产管理/生产任务单/Sc_ICMOBillEdit.html |  249 +++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 197 insertions(+), 52 deletions(-)

diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillEdit.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillEdit.html"
index 6b50c28..1a46bef 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillEdit.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillEdit.html"
@@ -14,6 +14,7 @@
     <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
     <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
     <script src="../../../layuiadmin/PubCustom.js"></script>
+    <script src="../../../layuiadmin/PageTitle.js"></script>
     <style>
         .main-btn { /*澶撮儴涓绘寜閽�*/
             padding: 0 2px; /*璋冩暣鎸夐挳宸﹀彸绌洪殭澶у皬*/
@@ -57,6 +58,7 @@
                         <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnEdit" id="btnEdit">閫�鍑�</button>
                     </div>
                     <div class="layui-tab" lay-filter="tab-POStockInBill">
+                        <h1 style="text-align: center; padding: 10px 0;"><b>鐢熶骇璁㈠崟</b></h1>
                         <ul class="layui-tab-title" lay-filter="tab-all">
                             <li lay-id="1" style="padding:1px;" class="layui-this">鍩烘湰淇℃伅</li>
                             <li lay-id="2" style="padding:1px;">鍏朵粬淇℃伅</li>
@@ -112,15 +114,15 @@
                                             </div>
                                         </div>
                                         <!--<div class="layui-inline">
-                    <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">瀹㈡埛</label>
-                    <div class="layui-input-block" style="margin-left: 77px;">
-                        <input type="text" class="layui-input" lay-verify="HCusName" name="HCusName" id="HCusName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
-                        <input type="hidden" name="HCusID" id="HCusID" lay-verify="HCusID" value="0">
-                        <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHCus" id="btnHCus" style="padding: 0 10px;float: right;margin-right: 3px;">
-                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
-                        </button>
-                    </div>
-                </div>-->
+                        <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">瀹㈡埛</label>
+                        <div class="layui-input-block" style="margin-left: 77px;">
+                            <input type="text" class="layui-input" lay-verify="HCusName" name="HCusName" id="HCusName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+                            <input type="hidden" name="HCusID" id="HCusID" lay-verify="HCusID" value="0">
+                            <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHCus" id="btnHCus" style="padding: 0 10px;float: right;margin-right: 3px;">
+                                <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                            </button>
+                        </div>
+                    </div>-->
                                         <div class="layui-inline">
                                             <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">宸ヤ綔涓績</label>
                                             <div class="layui-input-block" style="margin-left: 77px;">
@@ -267,7 +269,7 @@
     </script>
 
     <script>
-
+        var OptionData = [];
         layui.config({
             base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
         }).extend({
@@ -290,10 +292,17 @@
 
             //#region 杩涘叆椤甸潰鍗冲姞杞�
 
+            //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+            var HModuleType = "3710";
+            //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+            var HPageTitle = get_PageTitle(HModuleType) == "" ? $("h1").html() : get_PageTitle(HModuleType);
+            $("h1").html('<b>' + HPageTitle + '</b>');
+            //#endregion
+
             var rowdata = [{
                 "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HModel": "", "HSourceID": 0
                 , "HSourceName": "", "HDeptID": 0, "HDeptName": "", "HUnitID": 0, "HUnitName": ""
-                , "HQty": "", "HSTATUS": "1", "HPlanBeginDate": "", "HPlanEndDate": ""
+                , "HQty": "", "HSTATUS": "1", "HPlanBeginDate": "", "HPlanEndDate": "", "HOrderLevID": "0", "璁㈠崟绛夌骇浠g爜": "", "璁㈠崟绛夌骇鍚嶇О": "",
             }];
             //鍒濆鍖�
             set_ClearBill();
@@ -314,7 +323,21 @@
                     }
                 });
             }
-            else {//濡傛灉淇敼鍒欒蛋涓嬮潰
+            else if (OperationType == 2)
+            {
+                RoadBillMain(linterid);
+                $.ajax({
+                    url: GetWEBURL() + "/Web/GetMAXNum",
+                    type: "GET",
+                    data: { "HBillType": '3710' },
+                    success: function (d) {
+                        $("#HInterID").val(d.data[0].HInterID);
+                        $("#HBillNo").val(d.data[0].HBillNo);
+                    }
+                });
+            }
+            else if(OperationType == 3)
+            {//濡傛灉淇敼鍒欒蛋涓嬮潰
                 //绂佺敤缁勭粐閫夐」
                 $("#HPRDORGID").attr("disabled", true);
                 $("#HDate").attr("disabled", true);
@@ -335,7 +358,7 @@
                 var NewRow = {
                     "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HModel": "", "HSourceID": 0
                     , "HSourceName": "", "HDeptID": 0, "HDeptName": "", "HUnitID": 0, "HUnitName": ""
-                    , "HQty": "", "HSTATUS": "1", "HPlanBeginDate": "", "HPlanEndDate": ""
+                    , "HQty": "", "HSTATUS": "1", "HPlanBeginDate": "", "HPlanEndDate": "", "HOrderLevID": "0", "璁㈠崟绛夌骇浠g爜": "", "璁㈠崟绛夌骇鍚嶇О": ""
                 };
                 switch (obj.event) {
                     case 'btn-AddLine':
@@ -515,6 +538,7 @@
                     , toolbar: '#toolbarDemo'
                     , limit: 500
                     , height: 500
+                    , totalRow: true
                     , loading: false
                     , cols: [[ //琛ㄥご
                         { type: 'checkbox', totalRowText: '鍚堣琛�' }
@@ -523,13 +547,16 @@
                         , { field: 'HMaterNumber', title: '鐗╂枡缂栫爜', edit: 'text', event: "HMaterID" }
                         , { field: 'HMaterName', title: '鐗╂枡鍚嶇О' }
                         , { field: 'HModel', title: '瑙勬牸鍨嬪彿' }
+                        , { field: 'HOrderLevID', title: 'HOrderLevID', hide: true }
+                        , { field: '璁㈠崟绛夌骇浠g爜', title: '璁㈠崟绛夌骇浠g爜', edit: 'text', event: "HOrderLevID" }
+                        , { field: '璁㈠崟绛夌骇鍚嶇О', title: '璁㈠崟绛夌骇鍚嶇О' }
                         , { field: 'HSourceID', title: 'HSourceID', hide: true }
                         , { field: 'HSourceName', title: '鐢熶骇璧勬簮', edit: 'text', event: "HSourceID" }//f7
                         , { field: 'HDeptID', title: 'HDeptID', hide: true }
                         , { field: 'HDeptName', title: '鐢熶骇杞﹂棿', edit: 'text', event: "HDeptID" }//f7
                         , { field: 'HUnitID', title: 'HUnitID', hide: true }
                         , { field: 'HUnitName', title: '璁¢噺鍗曚綅', edit: 'text', event: "HUnitID" }//f7
-                        , { field: 'HQty', title: '鏁伴噺', edit: 'text' }
+                        , { field: 'HQty', title: '鏁伴噺', edit: 'text', totalRow: true }
                         , { field: 'HSTATUS', title: '涓氬姟鐘舵��', templet: "#HSTATUS" }
                         , { field: 'HPlanBeginDate', title: '璁″垝寮�宸ユ棩鏈�', event: 'HPlanBeginDate' }
                         , { field: 'HPlanEndDate', title: '璁″垝瀹屽伐鏃ユ湡', event: 'HPlanEndDate' }
@@ -576,7 +603,7 @@
                     , area: ['90%', '90%']//澶у皬
                     , title: '涓氬姟鍛�'//鏍囬
                     , shift: 2//寮瑰嚭鍔ㄧ敾
-                    , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html', 'yes']
+                    , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?type=HEmp', 'yes']
                     , btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
                         var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
@@ -602,7 +629,7 @@
                     , area: ['90%', '90%']//澶у皬
                     , title: '瀹㈡埛'//鏍囬
                     , shift: 2//寮瑰嚭鍔ㄧ敾
-                    , content: ['../../Baseset/鍩虹璧勬枡/Gy_CustomerList.html', 'yes']
+                    , content: ['../../鍩虹璧勬枡/閿�鍞熀纭�璧勬枡/Gy_Customer.html', 'yes']
                     , btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
                         var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
@@ -612,7 +639,7 @@
                         }
                         //鑾峰彇鏁版嵁
                         $("#HCusID").val(checkStatus.data[0].HItemID);
-                        $("#HCusName").val(checkStatus.data[0].HName);
+                        $("#HCusName").val(checkStatus.data[0].瀹㈡埛鍚嶇О);
 
                         layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
@@ -628,7 +655,7 @@
                     , area: ['90%', '90%']//澶у皬
                     , title: '宸ヤ綔涓績'//鏍囬
                     , shift: 2//寮瑰嚭鍔ㄧ敾
-                    , content: ['../../Baseset/鍩虹璧勬枡/Gy_WorkCenterList.html', 'yes']
+                    , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_WorkCenter.html', 'yes']
                     , btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
                         var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
@@ -638,7 +665,7 @@
                         }
                         //鑾峰彇鏁版嵁
                         $("#HCenterID").val(checkStatus.data[0].HItemID);
-                        $("#HCenterName").val(checkStatus.data[0].宸ヤ綔涓績);
+                        $("#HCenterName").val(checkStatus.data[0].宸ヤ綔涓績鍚嶇О);
 
                         layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
@@ -679,7 +706,7 @@
                                 , shift: 2 //寮瑰嚭鍔ㄧ敾
                                 , area: ["90%", "90%"] //绐椾綋澶у皬
                                 , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
-                                , content: ['../../Baseset/鍩虹璧勬枡/Gy_MaterialList.html', 'yes']
+                                , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html', 'yes']
                                 , btn: ["纭畾", "鍙栨秷"]
                                 , btn1: function (index, laero) {
                                     //鎸夐挳涓�  鐨勫洖璋�
@@ -693,11 +720,23 @@
                                     //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
                                     obj.update({
                                         "HMaterID": checkStatus.data[0].HItemID
-                                        , "HMaterNumber": checkStatus.data[0].HNumber
-                                        , "HMaterName": checkStatus.data[0].HName
-                                        , "HModel": checkStatus.data[0].HModel
+                                        , "HMaterNumber": checkStatus.data[0].鐗╂枡浠g爜
+                                        , "HMaterName": checkStatus.data[0].鐗╂枡鍚嶇О
+                                        , "HModel": checkStatus.data[0].瑙勬牸鍨嬪彿
                                     })
                                     layer.close(index);//鍏抽棴寮圭獥
+                                }
+                                , end: function () {
+                                    if (OptionData.length > 0) {
+                                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                                        obj.update({
+                                            "HMaterID": OptionData[0].HItemID
+                                            , "HMaterNumber": OptionData[0].鐗╂枡浠g爜
+                                            , "HMaterName": OptionData[0].鐗╂枡鍚嶇О
+                                            , "HModel": OptionData[0].瑙勬牸鍨嬪彿
+                                        })
+                                        OptionData = [];
+                                    }
                                 }
                             })
                         }
@@ -712,7 +751,7 @@
                                 , shift: 2 //寮瑰嚭鍔ㄧ敾
                                 , area: ["90%", "90%"] //绐椾綋澶у皬
                                 , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
-                                , content: ["../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Source.html", "yes"]
+                                , content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Source.html', 'yes']
                                 , btn: ["纭畾", "鍙栨秷"]
                                 , btn1: function (index, laero) {
                                     //鎸夐挳涓�  鐨勫洖璋�
@@ -729,6 +768,16 @@
                                     })
                                     layer.close(index);//鍏抽棴寮圭獥
                                 }
+                                , end: function () {
+                                    if (OptionData.length > 0) {
+                                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                                        obj.update({
+                                            "HSourceID": OptionData[0].HItemID
+                                            , "HSourceName": OptionData[0].鐢熶骇璧勬簮鍚嶇О
+                                        })
+                                        OptionData = [];
+                                    }
+                                }
                             })
                         }
                         //鐢熶骇杞﹂棿
@@ -742,7 +791,7 @@
                                 , shift: 2 //寮瑰嚭鍔ㄧ敾
                                 , area: ["90%", "90%"] //绐椾綋澶у皬
                                 , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
-                                , content: ['../../Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
+                                , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
                                 , btn: ["纭畾", "鍙栨秷"]
                                 , btn1: function (index, laero) {
                                     //鎸夐挳涓�  鐨勫洖璋�
@@ -755,9 +804,19 @@
                                     //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
                                     obj.update({
                                         "HDeptID": checkStatus.data[0].HItemID
-                                        , "HDeptName": checkStatus.data[0].HName
+                                        , "HDeptName": checkStatus.data[0].閮ㄩ棬鍚嶇О
                                     })
                                     layer.close(index);//鍏抽棴寮圭獥
+                                }
+                                , end: function () {
+                                    if (OptionData.length > 0) {
+                                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                                        obj.update({
+                                            "HDeptID": OptionData[0].HItemID
+                                            , "HDeptName": OptionData[0].閮ㄩ棬鍚嶇О
+                                        })
+                                        OptionData = [];
+                                    }
                                 }
                             })
                         }
@@ -771,7 +830,7 @@
                                 , shift: 2 //寮瑰嚭鍔ㄧ敾
                                 , area: ["90%", "90%"] //绐椾綋澶у皬
                                 , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
-                                , content: ['../../Baseset/鍩虹璧勬枡/Gy_UnitList.html', 'yes']
+                                , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Unit.html', 'yes']
                                 , btn: ["纭畾", "鍙栨秷"]
                                 , btn1: function (index, laero) {
                                     //鎸夐挳涓�  鐨勫洖璋�
@@ -783,10 +842,61 @@
                                     }
                                     //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
                                     obj.update({
-                                        "HUnitName": checkStatus.data[0].HName
+                                        "HUnitName": checkStatus.data[0].璁¢噺鍗曚綅鍚嶇О
                                         , "HUnitID": checkStatus.data[0].HItemID
                                     })
                                     layer.close(index);//鍏抽棴寮圭獥
+                                }
+                                , end: function () {
+                                    if (OptionData.length > 0) {
+                                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                                        obj.update({
+                                            "HUnitName": OptionData[0].璁¢噺鍗曚綅鍚嶇О
+                                            , "HUnitID": OptionData[0].HItemID
+                                        })
+                                        OptionData = [];
+                                    }
+                                }
+                            })
+                        }
+                        //璁㈠崟绛夌骇
+                        if (obj.event == "HOrderLevID") {
+                            layer.open({
+                                type: 2
+                                , skin: "layui-layer-rim" //鍔犱笂杈规
+                                , title: "璁㈠崟绛夌骇鍒楄〃"  //鏍囬
+                                , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                                , shift: 2 //寮瑰嚭鍔ㄧ敾
+                                , area: ["90%", "90%"] //绐椾綋澶у皬
+                                , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                                , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_OrderLev.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({
+                                        "璁㈠崟绛夌骇鍚嶇О": checkStatus.data[0].璁㈠崟绛夌骇
+                                        ,"璁㈠崟绛夌骇浠g爜": checkStatus.data[0].璁㈠崟绛夌骇浠g爜
+                                        ,"HOrderLevID": checkStatus.data[0].HItemID
+                                    })
+                                    layer.close(index);//鍏抽棴寮圭獥
+                                }
+                                , end: function () {
+                                    if (OptionData.length > 0) {
+                                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                                        obj.update({
+                                            "璁㈠崟绛夌骇鍚嶇О": OptionData[0].璁㈠崟绛夌骇
+                                            , "璁㈠崟绛夌骇浠g爜": OptionData[0].璁㈠崟绛夌骇浠g爜
+                                            , "HOrderLevID": OptionData[0].HItemID
+                                        })
+                                        OptionData = [];
+                                    }
                                 }
                             })
                         }
@@ -865,30 +975,30 @@
                     success: function (d) {
 
                         //$("#HPRDORGID").val(d.data[0].HPRDORGID);
-                        //涓昏〃
-                        form.val("formData", { 
-                            "HBillNo": d.data[0].鍗曟嵁鍙�
-                            , "HInterID":d.data[0].hmainid
-                            , "HDate": Format(new Date(d.data[0].鏃ユ湡), "yyyy-MM-dd")
-                            , "HSeOrderBillNo": d.data[0].婧愬崟鍗曞彿
-                            , "HSeOrderInterID": d.data[0].婧愬崟涓诲唴鐮�
-                            , "HSeOrderEntryID": d.data[0].婧愬崟瀛愬唴鐮�
-                            , "HEmpID": d.data[0].HEmpID
-                            , "HEmpName": d.data[0].涓氬姟鍛�
-                            , "HCenterID": d.data[0].HCenterID
-                            , "HCenterName": d.data[0].宸ヤ綔涓績
-                            , "HRemark": d.data[0].琛ㄥご澶囨敞
-                            , "HPlanQty": d.data[0].璁″垝鐢熶骇鏁伴噺
-                            , "HPRDORGID": d.data[0].HPRDORGID
-                            //鍏朵粬淇℃伅
-                            , "hmakers": d.data[0].鍒跺崟浜�
-                            , "hmakedate": d.data[0].鍒跺崟鏃ユ湡 == null ? "" : Format(new Date(d.data[0].鍒跺崟鏃ユ湡), "yyyy-MM-dd")
-                            , "hchecker": d.data[0].瀹℃牳浜�
-                            , "hcheckdate": d.data[0].瀹℃牳鏃ユ湡 == null ? "" : Format(new Date(d.data[0].瀹℃牳鏃ユ湡), "yyyy-MM-dd")
-                            , "hupdater": d.data[0].淇敼浜�
-                            , "hupdatedate": d.data[0].淇敼鏃ユ湡 == null ? "" : Format(new Date(d.data[0].淇敼鏃ユ湡), "yyyy-MM-dd")
-                            , "hdeleteman": d.data[0].浣滃簾浜�
-                            , "hdeletedate": d.data[0].浣滃簾鏃ユ湡 == null ? "" : Format(new Date(d.data[0].浣滃簾鏃ユ湡), "yyyy-MM-dd")
+                            //涓昏〃
+                            form.val("formData", { 
+                                "HBillNo": d.data[0].鍗曟嵁鍙�
+                                , "HInterID":d.data[0].hmainid
+                                , "HDate": Format(new Date(d.data[0].鏃ユ湡), "yyyy-MM-dd")
+                                , "HSeOrderBillNo": d.data[0].婧愬崟鍗曞彿
+                                , "HSeOrderInterID": d.data[0].婧愬崟涓诲唴鐮�
+                                , "HSeOrderEntryID": d.data[0].婧愬崟瀛愬唴鐮�
+                                , "HEmpID": d.data[0].HEmpID
+                                , "HEmpName": d.data[0].涓氬姟鍛�
+                                , "HCenterID": d.data[0].HCenterID
+                                , "HCenterName": d.data[0].宸ヤ綔涓績
+                                , "HRemark": d.data[0].琛ㄥご澶囨敞
+                                , "HPlanQty": d.data[0].璁″垝鐢熶骇鏁伴噺
+                                , "HPRDORGID": d.data[0].HPRDORGID
+                                //鍏朵粬淇℃伅
+                                , "hmakers": OperationType == 2 ? "" :d.data[0].鍒跺崟浜�
+                                , "hmakedate": OperationType == 2 ? "" :d.data[0].鍒跺崟鏃ユ湡 == null ? "" : Format(new Date(d.data[0].鍒跺崟鏃ユ湡), "yyyy-MM-dd")
+                                , "hchecker": OperationType==2?"":d.data[0].瀹℃牳浜�
+                                , "hcheckdate": OperationType == 2 ? "" :d.data[0].瀹℃牳鏃ユ湡 == null ? "" : Format(new Date(d.data[0].瀹℃牳鏃ユ湡), "yyyy-MM-dd")
+                                , "hupdater": OperationType == 2 ? "" : d.data[0].淇敼浜�
+                                , "hupdatedate": OperationType == 2 ? "" : d.data[0].淇敼鏃ユ湡 == null ? "" : Format(new Date(d.data[0].淇敼鏃ユ湡), "yyyy-MM-dd")
+                                , "hdeleteman": OperationType == 2 ? "" :d.data[0].浣滃簾浜�
+                                , "hdeletedate": OperationType == 2 ? "" : d.data[0].浣滃簾鏃ユ湡 == null ? "" : Format(new Date(d.data[0].浣滃簾鏃ユ湡), "yyyy-MM-dd")
                         });
 
                         //瀛愯〃  璧嬪��
@@ -922,6 +1032,7 @@
                                     , "HDeptID": d.data[i].HDeptID, "HDeptName": d.data[i].鐢熶骇杞﹂棿, "HUnitID": d.data[i].HUnitID
                                     , "HUnitName": d.data[i].璁¢噺鍗曚綅, "HQty": d.data[i].鐢熶骇浠诲姟鍗曟暟閲�, "HSTATUS": HSTATUS
                                     , "HPlanBeginDate": Format(new Date(d.data[i].璁″垝寮�宸ユ棩鏈�), "yyyy-MM-dd"), "HPlanEndDate": Format(new Date(d.data[i].璁″垝瀹屽伐鏃ユ湡), "yyyy-MM-dd")
+                                    , "HOrderLevID": d.data[i]["HOrderLevID"], "璁㈠崟绛夌骇浠g爜": d.data[i]["璁㈠崟绛夌骇浠g爜"], "璁㈠崟绛夌骇鍚嶇О": d.data[i]["璁㈠崟绛夌骇"],
                                 }
                             )
                         }
@@ -973,6 +1084,40 @@
 
         });
 
+        //涓氬姟鍛�
+        function GetHEmpValue(obj) {
+            $("#HEmpID").val(obj[0].HItemID);
+            $("#HEmpName").val(obj[0].鑱屽憳鍚嶇О);
+        }
+        //宸ヤ綔涓績
+        function GetWorkCenterValue(obj) {
+            $("#HCenterID").val(obj[0].HItemID);
+            $("#HCenterName").val(obj[0].宸ヤ綔涓績鍚嶇О);
+        }
+        //鐗╂枡
+        function GetMaterValue(obj) {
+            OptionData = obj;
+        }
+        //璁¢噺鍗曚綅
+        function GetUnitValue(obj) {
+            OptionData = obj;
+        }
+        //瀹㈡埛
+        function GetHCusNameValue(obj) {
+            OptionData = obj;
+        }
+        //鐢熶骇杞﹂棿
+        function GetHDeptNameValue(obj) {
+            OptionData = obj;
+        }
+        //鐢熶骇璧勬簮
+        function GetGySource(obj) {
+            OptionData[0] = obj;
+        }
+        //璁㈠崟绛夌骇
+        function GetOrderLevValue(obj) {
+            OptionData = obj;
+        }
 
     </script>
 </body>

--
Gitblit v1.9.1