From ebef191888d9d2c2a2e7a7f677189164e4eef0b3 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期二, 05 八月 2025 19:04:33 +0800
Subject: [PATCH] 车间委外接收单列表bug处理
---
WebTM/views/采购管理/应付单/Cg_PayableBill.html | 62 +++++++++++++++++++------------
1 files changed, 38 insertions(+), 24 deletions(-)
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html"
index c9e0b46..86d5f62 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html"
@@ -67,7 +67,7 @@
<div class="layui-inline">
<label class="layui-form-label">鍗曟嵁缂栧彿</label>
<div class="layui-input-inline">
- <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;">
+ <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
<input type="hidden" name="HInterID" id="HInterID" value="0">
</div>
</div>
@@ -95,7 +95,7 @@
<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; ">
+ <input type="text" name="HMainSourceBillNo" id="HMainSourceBillNo" class="layui-input" value="" style="float: left; width: 150px; " 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>
@@ -399,7 +399,7 @@
var allVal;
var HModName = "Cg_PayableBill";
-
+ var topScroll = 0;//璁板綍婊氬姩鏉$殑浣嶇疆
//璁板綍缁勭粐鐨勫��
var HOrgIDBar = 0;
@@ -726,7 +726,9 @@
for (var j = i + 1; j < rowdataEntry.length; j++) {
if (rowdataEntry[j].HMaterID == item.HMaterID) {
rowdataEntry[i].HQty += rowdataEntry[j].HQty;//鏁伴噺
- rowdataEntry[i].HMoney = rowdataEntry[i].HQty * rowdataEntry[i].HPrice//閲戦=鏁伴噺*鍗曚环
+ rowdataEntry[i].HMoney += rowdataEntry[j].HMoney;//閲戦
+ rowdataEntry[i].HPrice = rowdataEntry[i].HMoney / rowdataEntry[i].HQty;//鍗曚环
+ //rowdataEntry[i].HMoney = rowdataEntry[i].HQty * rowdataEntry[i].HPrice//閲戦=鏁伴噺*鍗曚环
rowdataEntry[i].HTaxMoney = Number((rowdataEntry[i].HMoney * rowdataEntry[i].HTaxRate).toFixed(4))//绋庨
rowdataEntry[i].HlineTotal = rowdataEntry[i].HMoney + rowdataEntry[i].HTaxMoney //浠风◣鍚堣
var HExRate = $("#HExRate").val();
@@ -826,7 +828,8 @@
for (var j = i + 1; j < rowdataEntry.length; j++) {
if (rowdataEntry[j].HMaterID == item.HMaterID) {
rowdataEntry[i].HQty += rowdataEntry[j].HQty;
- rowdataEntry[i].HMoney = rowdataEntry[i].HQty * rowdataEntry[i].HPrice//閲戦=鏁伴噺*鍗曚环
+ rowdataEntry[i].HMoney += rowdataEntry[j].HMoney;//閲戦
+ rowdataEntry[i].HPrice = rowdataEntry[i].HMoney / rowdataEntry[i].HQty;//鍗曚环
rowdataEntry[i].HTaxMoney = Number((rowdataEntry[i].HMoney * rowdataEntry[i].HTaxRate).toFixed(4))//绋庨
rowdataEntry[i].HlineTotal = rowdataEntry[i].HMoney + rowdataEntry[i].HTaxMoney //浠风◣鍚堣
var HExRate = $("#HExRate").val();
@@ -1466,7 +1469,8 @@
for (var j = i + 1; j < rowdataEntry.length; j++) {
if (rowdataEntry[j].HMaterID == item.HMaterID) {
rowdataEntry[i].HQty += rowdataEntry[j].HQty;//鏁伴噺
- rowdataEntry[i].HMoney = rowdataEntry[i].HQty * rowdataEntry[i].HPrice//閲戦=鏁伴噺*鍗曚环
+ rowdataEntry[i].HMoney += rowdataEntry[j].HMoney;//閲戦
+ rowdataEntry[i].HPrice = rowdataEntry[i].HMoney / rowdataEntry[i].HQty;//鍗曚环
rowdataEntry[i].HTaxMoney = Number((rowdataEntry[i].HMoney * rowdataEntry[i].HTaxRate).toFixed(4))//绋庨
rowdataEntry[i].HlineTotal = rowdataEntry[i].HMoney + rowdataEntry[i].HTaxMoney //浠风◣鍚堣
var HExRate = $("#HExRate").val();
@@ -1588,7 +1592,8 @@
for (var j = i + 1; j < rowdataEntry.length; j++) {
if (rowdataEntry[j].HMaterID == item.HMaterID) {
rowdataEntry[i].HQty += rowdataEntry[j].HQty;
- rowdataEntry[i].HMoney = rowdataEntry[i].HQty * rowdataEntry[i].HPrice//閲戦=鏁伴噺*鍗曚环
+ rowdataEntry[i].HMoney += rowdataEntry[j].HMoney;//閲戦
+ rowdataEntry[i].HPrice = rowdataEntry[i].HMoney / rowdataEntry[i].HQty;//鍗曚环
rowdataEntry[i].HTaxMoney = Number((rowdataEntry[i].HMoney * rowdataEntry[i].HTaxRate).toFixed(4))//绋庨
rowdataEntry[i].HlineTotal = rowdataEntry[i].HMoney + rowdataEntry[i].HTaxMoney //浠风◣鍚堣
var HExRate = $("#HExRate").val();
@@ -1671,6 +1676,10 @@
, { field: 'HSeOrderBillNo', title: '閿�鍞鍗曞彿', width: 100, hide: true, style: 'background-color:#efefef4d;' }
, { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
]]
+ , done: function (res, curr, count) {
+ $(".layui-table-main").scrollTop(topScroll);
+ }
+
}
optionEntry = {
elem: '#mainTableEntry'
@@ -1765,6 +1774,9 @@
if (option.cols[0][i]["field"] == "HQty") {
option.cols[0][i]["edit"] = false;
}
+ //if (option.cols[0][i]["field"] == "HMoney") {
+ // option.cols[0][i]["edit"] = false;
+ //}
}
}
@@ -1781,6 +1793,7 @@
var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"]; //鏁伴噺绮惧害
var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"]; //鍗曚环绮惧害
var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"]; //閲戦绮惧害
+ topScroll = $('#mainTable').next('.layui-table-view').find('.layui-table-body').scrollTop();//鑾峰彇婊氬姩鏉′綅缃�
// 鍗曞厓鏍肩紪杈戜箣鍓嶇殑鍊�
var oldText = $(this).prev().text();
var value = obj.value //寰楀埌淇敼鍚庣殑鍊�
@@ -1841,7 +1854,7 @@
, HlineTotalBB: HlineTotalBB
, HMoneyBB: HMoneyBB
});
- //table.render(option);
+ table.render(option);
break;
case "HPrice": //鍗曚环
//鏁版嵁鏍煎紡鏍¢獙
@@ -1891,7 +1904,7 @@
, HlineTotalBB: HlineTotalBB
, HMoneyBB: HMoneyBB
});
- //table.render(option);
+ table.render(option);
break;
case "HTaxRate": //鏁伴噺
//鏁版嵁鏍煎紡鏍¢獙
@@ -1945,7 +1958,7 @@
, HlineTotalBB: HlineTotalBB
, HMoneyBB: HMoneyBB
});
- //table.render(option);
+ table.render(option);
break;
case "HDiscountRate": //鏁伴噺
//鏁版嵁鏍煎紡鏍¢獙
@@ -1989,7 +2002,7 @@
, HDiscountRate: HDiscountRate
, HRelTaxPrice: HRelTaxPrice
});
- //table.render(option);
+ table.render(option);
break;
case "HTaxPrice": //鍗曚环
//鏁版嵁鏍煎紡鏍¢獙
@@ -2040,7 +2053,7 @@
, HlineTotalBB: HlineTotalBB //鏇存柊HlineTotalBB瀛楁锛屽叾鍊兼潵鑷彉閲廐lineTotalBB
, HMoneyBB: HMoneyBB
});
- //table.render(option);
+ table.render(option);
break;
case "HMoney": //閲戦
//鏁版嵁鏍煎紡鏍¢獙
@@ -2098,7 +2111,7 @@
, HlineTotalBB: HlineTotalBB
, HMoneyBB: HMoneyBB
});
- //table.render(option);
+ table.render(option);
break;
default:
}
@@ -2158,15 +2171,15 @@
, "HInvoiceBillNo": data.鍙戠エ缂栧彿
, "HMaker": data.鍒跺崟浜�
- , "HMakeDate": data.鍒跺崟鏃ユ湡 == null ? "" : Format(new Date(data.鍒跺崟鏃ユ湡), "yyyy-MM-dd HH:mm:ss")
+ , "HMakeDate": data.鍒跺崟鏃ユ湡 == null ? "" : Format(new Date(data.鍒跺崟鏃ユ湡), "yyyy-MM-dd hh:mm:ss")
, "HUpDater": data.淇敼浜�
- , "HUpDateDate": data.淇敼鏃ユ湡 == null ? "" : Format(new Date(data.淇敼鏃ユ湡), "yyyy-MM-dd HH:mm:ss")
+ , "HUpDateDate": data.淇敼鏃ユ湡 == null ? "" : Format(new Date(data.淇敼鏃ユ湡), "yyyy-MM-dd hh:mm:ss")
, "HChecker": data.瀹℃牳浜�
- , "HCheckDate": data.瀹℃牳鏃ユ湡 == null ? "" : Format(new Date(data.瀹℃牳鏃ユ湡), "yyyy-MM-dd HH:mm:ss")
+ , "HCheckDate": data.瀹℃牳鏃ユ湡 == null ? "" : Format(new Date(data.瀹℃牳鏃ユ湡), "yyyy-MM-dd hh:mm:ss")
, "HCloseMan": data.鍏抽棴浜�
- , "HCloseDate": data.鍏抽棴鏃ユ湡 == null ? "" : Format(new Date(data.鍏抽棴鏃ユ湡), "yyyy-MM-dd HH:mm:ss")
+ , "HCloseDate": data.鍏抽棴鏃ユ湡 == null ? "" : Format(new Date(data.鍏抽棴鏃ユ湡), "yyyy-MM-dd hh:mm:ss")
, "HDeleteMan": data.浣滃簾浜�
- , "HDeleteDate": data.浣滃簾鏃ユ湡 == null ? "" : Format(new Date(data.浣滃簾鏃ユ湡), "yyyy-MM-dd HH:mm:ss")
+ , "HDeleteDate": data.浣滃簾鏃ユ湡 == null ? "" : Format(new Date(data.浣滃簾鏃ユ湡), "yyyy-MM-dd hh:mm:ss")
});
if (data.HMainSourceBillType != "") {
@@ -2442,7 +2455,6 @@
$("#HUpDateDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));
}
var sMainStr = JSON.stringify(data.field);
- debugger
//鑾峰彇瀛愯〃鏁版嵁
var num = [];
for (var i = 0; i < table.cache["mainTable"].length; i++) {
@@ -3305,7 +3317,8 @@
for (var j = i + 1; j < rowdataEntry.length; j++) {
if (rowdataEntry[j].HMaterID == item.HMaterID) {
rowdataEntry[i].HQty += rowdataEntry[j].HQty;//鏁伴噺
- rowdataEntry[i].HMoney = rowdataEntry[i].HQty * rowdataEntry[i].HPrice//閲戦=鏁伴噺*鍗曚环
+ rowdataEntry[i].HMoney += rowdataEntry[j].HMoney;//閲戦
+ rowdataEntry[i].HPrice = rowdataEntry[i].HMoney / rowdataEntry[i].HQty;//鍗曚环
rowdataEntry[i].HTaxMoney = Number((rowdataEntry[i].HMoney * rowdataEntry[i].HTaxRate).toFixed(4))//绋庨
rowdataEntry[i].HlineTotal = rowdataEntry[i].HMoney + rowdataEntry[i].HTaxMoney //浠风◣鍚堣
var HExRate = $("#HExRate").val();
@@ -3366,9 +3379,9 @@
, "HEmpName": dataArray[0].涓氬姟鍛�
, "HSupID": dataArray[0].HSupID
, "HSupName": dataArray[0].渚涘簲鍟�
- //, "HCurID": dataArray[0].HCurID
- //, "HCurName": dataArray[0].甯佸埆
- //, "HExRate": dataArray[0].姹囩巼
+ , "HCurID": dataArray[0].HCurID
+ , "HCurName": dataArray[0].甯佸埆
+ , "HExRate": dataArray[0].姹囩巼
, "HSSID": "0"
, "HSSName": ""
, "HPSStyleID": dataArray[0].HPSStyleID
@@ -3438,7 +3451,8 @@
for (var j = i + 1; j < rowdataEntry.length; j++) {
if (rowdataEntry[j].HMaterID == item.HMaterID) {
rowdataEntry[i].HQty += rowdataEntry[j].HQty;
- rowdataEntry[i].HMoney = rowdataEntry[i].HQty * rowdataEntry[i].HPrice//閲戦=鏁伴噺*鍗曚环
+ rowdataEntry[i].HMoney += rowdataEntry[j].HMoney;//閲戦
+ rowdataEntry[i].HPrice = rowdataEntry[i].HMoney / rowdataEntry[i].HQty;//鍗曚环
rowdataEntry[i].HTaxMoney = Number((rowdataEntry[i].HMoney * rowdataEntry[i].HTaxRate).toFixed(4))//绋庨
rowdataEntry[i].HlineTotal = rowdataEntry[i].HMoney + rowdataEntry[i].HTaxMoney //浠风◣鍚堣
var HExRate = $("#HExRate").val();
--
Gitblit v1.9.1