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 | 43 ++++++++++++++++++++++++++-----------------
1 files changed, 26 insertions(+), 17 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 5b79b83..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>
@@ -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();
@@ -1769,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;
+ //}
}
}
@@ -2163,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 != "") {
@@ -2447,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++) {
@@ -3310,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();
@@ -3371,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
@@ -3443,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