From 74c8d63210e3a968f18167a7cc5a0b6122e6fc4f Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期五, 27 二月 2026 17:23:04 +0800
Subject: [PATCH] 1

---
 WebTM/views/WMS扫码模块/生产领料/Kf_MateOutBill_PDA.html   |   20 +++++
 WebTM/views/基础资料/成本基础资料/CB_Wip_excelImport.html    |   83 ++++++++++++++++++++
 WebTM/views/成本管理/费用单引入/CB_CostAccounting.html      |    2 
 WebTM/views/基础资料/生产基础资料/Add_Edit_Gy_BadReason.html |   44 ++++++++++
 WebTM/views/成本管理/费用单引入/CB_ItemMoneyBill_Excel.html |   80 +++++++++++++++++++
 5 files changed, 224 insertions(+), 5 deletions(-)

diff --git "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_MateOutBill_PDA.html" "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_MateOutBill_PDA.html"
index 781c1ac..72569ec 100644
--- "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_MateOutBill_PDA.html"
+++ "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_MateOutBill_PDA.html"
@@ -100,6 +100,7 @@
                                                     <option value="3721">鐢熶骇澶囨枡鍗�</option>
                                                     <option value="1214">鐢熶骇鍙戞枡閫氱煡鍗�</option>
                                                     <option value="3710">鐢熶骇璁㈠崟</option>
+                                                    <option value="1256">鐢熶骇棰嗘枡鐢宠鍗�</option>
                                                     <option value="-1">鎵嬪伐褰曞叆</option>
                                                 </select>
                                             </div>
@@ -694,6 +695,14 @@
                             $("#HMainSourceBillType").empty();
                             var optionHtml = '';
                             optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '鐢熶骇璁㈠崟' + "</option>";
+                            $("#HMainSourceBillType").append(optionHtml);
+                            layui.form.render('select');
+                            $("#HMainSourceBillType").attr("disabled", "disabled");
+                        }
+                        else if (d.data[0].HSourceBillType == "1256") {
+                            $("#HMainSourceBillType").empty();
+                            var optionHtml = '';
+                            optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '鐢熶骇棰嗘枡鐢宠鍗�' + "</option>";
                             $("#HMainSourceBillType").append(optionHtml);
                             layui.form.render('select');
                             $("#HMainSourceBillType").attr("disabled", "disabled");
@@ -1388,6 +1397,9 @@
                 else if (HSourceBillType == '3710') {
                     HSourceTitle = "鐢熶骇璁㈠崟";
                 }
+                else if (HSourceBillType == '1256') {
+                    HSourceTitle = "鐢熶骇棰嗘枡鐢宠鍗�";
+                }
 
                 layer.open({
                     type: 2
@@ -1706,6 +1718,14 @@
                                         layui.form.render('select');
                                         $("#HMainSourceBillType").attr("disabled", "disabled");
                                     }
+                                    else if (result.data.hSourceBillTypeField == "1256") {
+                                        $("#HMainSourceBillType").empty();
+                                        var optionHtml = '';
+                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鐢熶骇棰嗘枡鐢宠鍗�' + "</option>";
+                                        $("#HMainSourceBillType").append(optionHtml);
+                                        layui.form.render('select');
+                                        $("#HMainSourceBillType").attr("disabled", "disabled");
+                                    }
                                     else {
                                         $("#HMainSourceBillType").empty();
                                         var optionHtml = '';
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\346\210\220\346\234\254\345\237\272\347\241\200\350\265\204\346\226\231/CB_Wip_excelImport.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\346\210\220\346\234\254\345\237\272\347\241\200\350\265\204\346\226\231/CB_Wip_excelImport.html"
index 821d9df..c150c16 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\346\210\220\346\234\254\345\237\272\347\241\200\350\265\204\346\226\231/CB_Wip_excelImport.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\346\210\220\346\234\254\345\237\272\347\241\200\350\265\204\346\226\231/CB_Wip_excelImport.html"
@@ -32,6 +32,48 @@
                                 </div>
                             </div>
                         </div>
+                        <div class="layui-inline">
+                            <label class="layui-form-label" style="width: 85px;">骞�</label>
+                            <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+
+                                <select name="HYear" id="HYear" lay-verify="HYear">
+                                    <option value="2023">2023骞�</option>
+                                    <option value="2024">2024骞�</option>
+                                    <option value="2025">2025骞�</option>
+                                    <option value="2026" selected="selected">2026骞�</option>
+                                    <option value="2027">2027骞�</option>
+                                    <option value="2028">2028骞�</option>
+                                    <option value="2029">2029骞�</option>
+                                    <option value="2030">2030骞�</option>
+                                    <option value="2031">2031骞�</option>
+                                    <option value="2032">2032骞�</option>
+                                    <option value="2033">2033骞�</option>
+                                    <option value="2034">2034骞�</option>
+                                    <option value="2035">2035骞�</option>
+                                    <option value="2036">2036骞�</option>
+                                </select>
+                            </div>
+                        </div>
+                        <div class="layui-inline">
+                            <label class="layui-form-label" style="width: 85px;">鏈�</label>
+                            <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+                                <select name="HMonth" id="HMonth" lay-verify="HMonth">
+                                    <option value="1">1鏈�</option>
+                                    <option value="2">2鏈�</option>
+                                    <option value="3">3鏈�</option>
+                                    <option value="4">4鏈�</option>
+                                    <option value="5">5鏈�</option>
+                                    <option value="6">6鏈�</option>
+                                    <option value="7">7鏈�</option>
+                                    <option value="8">8鏈�</option>
+                                    <option value="9">9鏈�</option>
+                                    <option value="10">10鏈�</option>
+                                    <option value="11">11鏈�</option>
+                                    <option value="12">12鏈�</option>
+                                </select>
+
+                            </div>
+                        </div>
                     </div>
 
                     <table class="" id="mainTable" lay-filter="mainTable"></table>
@@ -133,6 +175,22 @@
         function set_ClearBill() {
             //鍒濆鍖栬〃鏍�
             set_InitGrid();
+            // 鑾峰彇褰撳墠鏃ユ湡
+            var currentDate = new Date();
+            var currentYear = currentDate.getFullYear();
+            var currentMonth = currentDate.getMonth() + 1; // 鏈堜唤浠�0寮�濮嬶紝鎵�浠ヨ+1
+
+            // 璁剧疆榛樿閫変腑褰撳墠骞翠唤
+            var yearSelect = document.getElementById('HYear');
+            if (yearSelect) {
+                yearSelect.value = currentYear;
+            }
+
+            // 璁剧疆榛樿閫変腑褰撳墠鏈堜唤
+            var monthSelect = document.getElementById('HMonth');
+            if (monthSelect) {
+                monthSelect.value = currentMonth;
+            }
         }
         //#endregion
 
@@ -205,12 +263,35 @@
 
         //瀵煎叆(淇濆瓨)
         function set_AddNew(data) {
+            // 鑾峰彇閫変腑鐨勫勾浠藉拰鏈堜唤
+            var year = $("#HYear").val();
+            var month = $("#HMonth").val();
+            if (!year || !month) {
+                layer.msg("璇烽�夋嫨骞翠唤鍜屾湀浠斤紒");
+                return;
+            }
+
+            if (!option.data || option.data.length === 0) {
+                layer.msg("鏃犳暟鎹紝璇峰厛瀵煎叆鏁版嵁锛�");
+                return;
+            }
+
             var num = [];
             for (var i = 0; i < option.data.length; i++) {
                 if (option.data[i] != "") {
-                    num.push(option.data[i])
+                    var item = option.data[i];
+                    // 涓烘瘡鏉¤褰曡缃勾浠藉拰鏈堜唤锛堣鐩栧師鏈夊�硷級
+                    item["骞翠唤"] = year;
+                    item["鏈堜唤"] = month;
+                    num.push(item);
                 }
             }
+            //var num = [];
+            //for (var i = 0; i < option.data.length; i++) {
+            //    if (option.data[i] != "") {
+            //        num.push(option.data[i])
+            //    }
+            //}
 
             var sSubStr = JSON.stringify(num);
             var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"] + '&鍜�' + sessionStorage["OrganizationID"];
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_BadReason.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_BadReason.html"
index 283f2fc..ab42dc1 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_BadReason.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_BadReason.html"
@@ -106,6 +106,16 @@
                                                 </div>
                                             </div>
                                             <div class="layui-inline">
+                                                <label class="layui-form-label" style="width: 120px">鐗╂枡绫诲瀷锛�</label>
+                                                <div class="layui-input-inline">
+                                                    <input type="text" name="HMaterTypeName" id="HMaterTypeName" lay-verify="HMaterTypeName" readonly="readonly" autocomplete="off" class="layui-input" style="float:left;width:150px;">
+                                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="HMaterType-BT" style="width:40px;">
+                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn " style="margin-left:-9px"></i>
+                                                    </button>
+                                                    <input id="HMaterTypeID" name="HMaterTypeID" type="hidden" value="0" />
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
                                                 <label class="layui-form-label">浣跨敤鐘舵�侊細</label>
                                                 <div class="layui-input-inline">
                                                     <select name="HUseFlag" id="HUseFlag" lay-verify="HUseFlag">
@@ -264,6 +274,7 @@
                 var isEndCheck = document.getElementById("HStopflag").checked;
                 isEndCheck == true ? data.field.HStopflag = 'true' : data.field.HStopflag = 'false';//灏嗘暟缁勫悎骞舵垚瀛楃涓�
                 var sMainStr = JSON.stringify(data.field) + ";" + sessionStorage["HUserName"];
+               
                 if (AllowLoadData()) {
                     $.ajax(
                         {
@@ -359,7 +370,7 @@
                 })
             });
 
-            //閫夋嫨榛樿涓嶈壇绫诲瀷
+            //閫夋嫨榛樿涓嶈壇绫诲瀷HMaterType-BT
             form.on('submit(HBadType-BT)', function () {//閫夋嫨閮ㄩ棬
                 layer.open({
                     type: 2
@@ -389,7 +400,36 @@
                    }
                 })
             });
+            //閫夋嫨榛樿涓嶈壇绫诲瀷HMaterType-BT
+            form.on('submit(HMaterType-BT)', function () {//閫夋嫨閮ㄩ棬
+                layer.open({
+                    type: 2
+                    , area: ['80%', '80%']
+                    , title: '涓嶈壇绫诲瀷鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_MaterType.html?', 'yes'],
+                    btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {
 
+                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HMaterTypeName").val(checkStatus.data[0].鐗╂枡鍒嗙被鍚嶇О);
+                        $("#HMaterTypeID").val(checkStatus.data[0].HItemID);
+                        //$("#HBadTypeNumber").val(checkStatus.data[0].涓嶈壇绫诲瀷浠g爜);
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) {
+                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                    }
+                })
+            });
             //閫夋嫨榛樿宸ュ簭
             form.on('submit(HProc-BT)', function () {//閫夋嫨宸ュ簭
                 layer.open({
@@ -488,6 +528,8 @@
                             $("#HProcNumber").val(data.宸ュ簭浠g爜);//宸ュ簭浠g爜
                             $("#HBadTypeName").val(data.涓嶈壇绫诲瀷);//榛樿涓嶈壇绫诲瀷
                             $("#HBadTypeID").val(data.HBadTypeID == null ? '0' : data.HBadTypeID);//涓嶈壇绫诲瀷ID
+                            $("#HMaterTypeName").val(data.鐗╂枡鍒嗙被);//榛樿涓嶈壇绫诲瀷
+                            $("#HMaterTypeID").val(data.HMaterTypeID == null ? '0' : data.HMaterTypeID);//涓嶈壇绫诲瀷ID
                             $("#HBadTypeNumber").val(data.涓嶈壇绫诲瀷浠g爜);//涓嶈壇绫诲瀷浠g爜
                             $("#HRemark").val(data.澶囨敞);//澶囨敞
                             $("input[name='HStopflag']").attr("checked", data.绂佺敤鏍囪);//true:閫変腑 false:涓嶉�変腑
diff --git "a/WebTM/views/\346\210\220\346\234\254\347\256\241\347\220\206/\350\264\271\347\224\250\345\215\225\345\274\225\345\205\245/CB_CostAccounting.html" "b/WebTM/views/\346\210\220\346\234\254\347\256\241\347\220\206/\350\264\271\347\224\250\345\215\225\345\274\225\345\205\245/CB_CostAccounting.html"
index b27c59c..784c9b4 100644
--- "a/WebTM/views/\346\210\220\346\234\254\347\256\241\347\220\206/\350\264\271\347\224\250\345\215\225\345\274\225\345\205\245/CB_CostAccounting.html"
+++ "b/WebTM/views/\346\210\220\346\234\254\347\256\241\347\220\206/\350\264\271\347\224\250\345\215\225\345\274\225\345\205\245/CB_CostAccounting.html"
@@ -273,7 +273,7 @@
                 var Type = $("#HType").val();
                 //娆犳枡杩愮畻
                 
-                var sql = `exec h_p_CB_ItemMoneyBillImport ${HYear},${HMonth},${Type},'${HMaker}',${HStockOrgID}`;
+                var sql = `exec h_p_CB_CostAccounting ${HYear},${HMonth},${Type},'${HMaker}',${HStockOrgID}`;
                 var startTime = new Date().getTime();
                 $.ajax({
                     url: GetWEBURL() + '/Gy_SOPBillList/WindowPrintList',
diff --git "a/WebTM/views/\346\210\220\346\234\254\347\256\241\347\220\206/\350\264\271\347\224\250\345\215\225\345\274\225\345\205\245/CB_ItemMoneyBill_Excel.html" "b/WebTM/views/\346\210\220\346\234\254\347\256\241\347\220\206/\350\264\271\347\224\250\345\215\225\345\274\225\345\205\245/CB_ItemMoneyBill_Excel.html"
index aef0c1d..884cd43 100644
--- "a/WebTM/views/\346\210\220\346\234\254\347\256\241\347\220\206/\350\264\271\347\224\250\345\215\225\345\274\225\345\205\245/CB_ItemMoneyBill_Excel.html"
+++ "b/WebTM/views/\346\210\220\346\234\254\347\256\241\347\220\206/\350\264\271\347\224\250\345\215\225\345\274\225\345\205\245/CB_ItemMoneyBill_Excel.html"
@@ -32,6 +32,48 @@
                                 </div>
                             </div>
                         </div>
+                        <div class="layui-inline">
+                            <label class="layui-form-label" style="width: 85px;">骞�</label>
+                            <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+
+                                <select name="HYear" id="HYear" lay-verify="HYear">
+                                    <option value="2023">2023骞�</option>
+                                    <option value="2024">2024骞�</option>
+                                    <option value="2025">2025骞�</option>
+                                    <option value="2026" selected="selected">2026骞�</option>
+                                    <option value="2027">2027骞�</option>
+                                    <option value="2028">2028骞�</option>
+                                    <option value="2029">2029骞�</option>
+                                    <option value="2030">2030骞�</option>
+                                    <option value="2031">2031骞�</option>
+                                    <option value="2032">2032骞�</option>
+                                    <option value="2033">2033骞�</option>
+                                    <option value="2034">2034骞�</option>
+                                    <option value="2035">2035骞�</option>
+                                    <option value="2036">2036骞�</option>
+                                </select>
+                            </div>
+                        </div>
+                        <div class="layui-inline">
+                            <label class="layui-form-label" style="width: 85px;">鏈�</label>
+                            <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+                                <select name="HMonth" id="HMonth" lay-verify="HMonth">
+                                    <option value="1">1鏈�</option>
+                                    <option value="2">2鏈�</option>
+                                    <option value="3">3鏈�</option>
+                                    <option value="4">4鏈�</option>
+                                    <option value="5">5鏈�</option>
+                                    <option value="6">6鏈�</option>
+                                    <option value="7">7鏈�</option>
+                                    <option value="8">8鏈�</option>
+                                    <option value="9">9鏈�</option>
+                                    <option value="10">10鏈�</option>
+                                    <option value="11">11鏈�</option>
+                                    <option value="12">12鏈�</option>
+                                </select>
+
+                            </div>
+                        </div>
                     </div>
 
                     <table class="" id="mainTable" lay-filter="mainTable"></table>
@@ -133,6 +175,21 @@
         function set_ClearBill() {
             //鍒濆鍖栬〃鏍�
             set_InitGrid();
+            var currentDate = new Date();
+            var currentYear = currentDate.getFullYear();
+            var currentMonth = currentDate.getMonth() + 1; // 鏈堜唤浠�0寮�濮嬶紝鎵�浠ヨ+1
+
+            // 璁剧疆榛樿閫変腑褰撳墠骞翠唤
+            var yearSelect = document.getElementById('HYear');
+            if (yearSelect) {
+                yearSelect.value = currentYear;
+            }
+
+            // 璁剧疆榛樿閫変腑褰撳墠鏈堜唤
+            var monthSelect = document.getElementById('HMonth');
+            if (monthSelect) {
+                monthSelect.value = currentMonth;
+            }
         }
         //#endregion
 
@@ -155,7 +212,8 @@
                     , { field: 'HDeptID', title: 'HDeptID', hide: true }
                     , { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 150 }
                     , { field: '閮ㄩ棬', title: '閮ㄩ棬', width: 150 }
-
+                    , { field: '骞翠唤', title: '骞翠唤', width: 200, hide: true }
+                    , { field: '鏈堜唤', title: '鏈堜唤', hide: true }
                     , { field: 'HEmpID', title: 'HEmpID', hide: true }
                     , { field: '鑱屽憳浠g爜', title: '鑱屽憳浠g爜', width: 150 }
                     , { field: '鑱屽憳', title: '鑱屽憳', width: 150 }
@@ -219,12 +277,30 @@
 
         //瀵煎叆(淇濆瓨)
         function set_AddNew(data) {
+            // 鑾峰彇閫変腑鐨勫勾浠藉拰鏈堜唤
+            var year = $("#HYear").val();
+            var month = $("#HMonth").val();
+            if (!year || !month) {
+                layer.msg("璇烽�夋嫨骞翠唤鍜屾湀浠斤紒");
+                return;
+            }
+
+            if (!option.data || option.data.length === 0) {
+                layer.msg("鏃犳暟鎹紝璇峰厛瀵煎叆鏁版嵁锛�");
+                return;
+            }
+
             var num = [];
             for (var i = 0; i < option.data.length; i++) {
                 if (option.data[i] != "") {
-                    num.push(option.data[i])
+                    var item = option.data[i];
+                    // 涓烘瘡鏉¤褰曡缃勾浠藉拰鏈堜唤锛堣鐩栧師鏈夊�硷級
+                    item["骞翠唤"] = year;
+                    item["鏈堜唤"] = month;
+                    num.push(item);
                 }
             }
+            
 
             var sSubStr = JSON.stringify(num);
             var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"] + '&鍜�' + sessionStorage["OrganizationID"];

--
Gitblit v1.9.1