From d02de03ffe76ccb7ebfc777af85b40dd5372cf02 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期六, 11 十月 2025 08:59:10 +0800
Subject: [PATCH] 乔一 生产领料单 修改
---
WebTM/views/领料发货/领料出库/Kf_MateOutBillEdit_YangMao.html | 59 ++++++++++++++++-------------
WebTM/views/领料发货/领料出库/Kf_MateOutBillList.html | 17 +++++++-
WebTM/views/计划管理/工艺路线/Gy_RoutingBillList.html | 2
3 files changed, 48 insertions(+), 30 deletions(-)
diff --git "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html" "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
index 833dd3b..4cbe021 100644
--- "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
+++ "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
@@ -104,7 +104,7 @@
</select>
</div>
</div>
- <button class="layui-btn layuiadmin-btn-order" style="" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding: 0 5px;">閲嶇疆</button>
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBillEdit_YangMao.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBillEdit_YangMao.html"
index 54996b2..3efb5da 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBillEdit_YangMao.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBillEdit_YangMao.html"
@@ -997,11 +997,11 @@
var HMaterRuleType = option.data[i].HMaterRuleType;
var HMaterRuleExternType = option.data[i].HMaterRuleExternType;
if (HMaterRuleExternType == "鏌撴枡") {
- option.data[i].HQty = dealDoubleToFixed(option.data[i].HRate * HWeight);
+ option.data[i].HQty = roundNumber(dealDoubleToFixed(option.data[i].HRate * HWeight), 3).toFixed(3);
} else if (HMaterRuleExternType == "鍔╁墏") {
- option.data[i].HQty = dealDoubleToFixed(option.data[i].HRate * HWaterQty * 0.001);
+ option.data[i].HQty = roundNumber(dealDoubleToFixed(option.data[i].HRate * HWaterQty * 0.001), 3).toFixed(3);
} else if (HMaterRuleExternType == "鍔╁墏锛堟寜甯冪畻锛�") {
- option.data[i].HQty = dealDoubleToFixed(option.data[i].HRate * HWeight * 0.001);
+ option.data[i].HQty = roundNumber(dealDoubleToFixed(option.data[i].HRate * HWeight * 0.001), 3).toFixed(3);
}
//if (HMaterRuleExternType == '缇婃瘺') {
// option.data[i].HQty = dealDoubleToFixed(option.data[i].HRate * HWeight * 0.001);
@@ -1022,11 +1022,11 @@
var HMaterRuleType = option.data[i].HMaterRuleType;
var HMaterRuleExternType = option.data[i].HMaterRuleExternType;
if (HMaterRuleExternType == "鏌撴枡") {
- option.data[i].HQty = dealDoubleToFixed(option.data[i].HRate * HWeight);
+ option.data[i].HQty = roundNumber(dealDoubleToFixed(option.data[i].HRate * HWeight), 3).toFixed(3);
} else if (HMaterRuleExternType == "鍔╁墏") {
- option.data[i].HQty = dealDoubleToFixed(option.data[i].HRate * HWaterQty * 0.001);
+ option.data[i].HQty = roundNumber(dealDoubleToFixed(option.data[i].HRate * HWaterQty * 0.001), 3).toFixed(3);
} else if (HMaterRuleExternType == "鍔╁墏锛堟寜甯冪畻锛�") {
- option.data[i].HQty = dealDoubleToFixed(option.data[i].HRate * HWeight * 0.001);
+ option.data[i].HQty = roundNumber(dealDoubleToFixed(option.data[i].HRate * HWeight * 0.001), 3).toFixed(3);
}
//if (HMaterRuleExternType == '缇婃瘺') {
// option.data[i].HQty = dealDoubleToFixed(option.data[i].HRate * HWeight * 0.001);
@@ -1233,11 +1233,11 @@
var HMaterRuleType = obj.data.HMaterRuleType;
var HMaterRuleExternType = obj.data.HMaterRuleExternType;
if (HMaterRuleExternType == "鏌撴枡") {
- HQty = dealDoubleToFixed(HRate * HWeight);
+ HQty = roundNumber(dealDoubleToFixed(HRate * HWeight), 3).toFixed(3);
} else if (HMaterRuleExternType == "鍔╁墏") {
- HQty = dealDoubleToFixed(HRate * HWaterQty * 0.001);
+ HQty = roundNumber(dealDoubleToFixed(HRate * HWaterQty * 0.001), 3).toFixed(3);
} else if (HMaterRuleExternType == "鍔╁墏锛堟寜甯冪畻锛�") {
- HQty = dealDoubleToFixed(HRate * HWeight * 0.001);
+ HQty = roundNumber(dealDoubleToFixed(HRate * HWeight * 0.001), 3).toFixed(3);
}
//if (HMaterRuleExternType == '缇婃瘺') {
// HQty = dealDoubleToFixed(HRate * HWeight * 0.001);
@@ -1256,11 +1256,11 @@
var HQty = 0;
var HMaterRuleType = value;
if (HMaterRuleType == "鏌撴枡") {
- HQty = dealDoubleToFixed(HRate * HWeight);
+ HQty = roundNumber(dealDoubleToFixed(HRate * HWeight), 3).toFixed(3);
} else if (HMaterRuleType == "鍔╁墏") {
- HQty = dealDoubleToFixed(HRate * HWaterQty * 0.001);
+ HQty = roundNumber(dealDoubleToFixed(HRate * HWaterQty * 0.001), 3).toFixed(3);
} else if (HMaterRuleType == "鍔╁墏锛堟寜甯冪畻锛�") {
- HQty = dealDoubleToFixed(HRate * HWeight * 0.001);
+ HQty = roundNumber(dealDoubleToFixed(HRate * HWeight * 0.001), 3).toFixed(3);
}
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
@@ -1438,7 +1438,7 @@
, { field: 'HUnitName', title: '璁¢噺鍗曚綅', width: 100 }
, { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 100, hide: true }
, { field: 'HRate', title: '鐢ㄩ噺鈥�', edit: 'text', width: 100 }
- , { field: 'HQty', title: '閲嶉噺', edit: 'text', width: 100 }
+ , { field: 'HQty', title: '閲嶉噺', edit: 'text', width: 100, }
, { field: 'HWeight', title: '瀹為檯绉伴噸', width: 100 }
, { field: 'HPrice', title: '鍗曚环', width: 100, hide: true }
, { field: 'HMoney', title: '閲戦', width: 100, hide: true }
@@ -1627,6 +1627,7 @@
option.data = result.list[0];
for (var i = 0; i < option.data.length; i++) {
option.data[i]["HRate"] = (option.data[i]["HRate"] * 1).toFixed(6);
+ option.data[i]["HQty"] = roundNumber((option.data[i]["HQty"] * 1), 3).toFixed(3);
}
table.render(option);
//option1.data = result.list[1];
@@ -1838,11 +1839,11 @@
var HWeight = $("#HWeight").val();
var HWaterQty = $("#HWaterQty").val();
if (option.data[rowIndex + i].HMaterRuleExternType == "鏌撴枡") {
- option.data[rowIndex + i].HQty = dealDoubleToFixed(option.data[rowIndex + i].HRate * HWeight);
+ option.data[rowIndex + i].HQty = roundNumber(dealDoubleToFixed(option.data[rowIndex + i].HRate * HWeight), 3).toFixed(3);
} else if (option.data[rowIndex + i].HMaterRuleExternType == "鍔╁墏") {
- option.data[rowIndex + i].HQty = dealDoubleToFixed(option.data[rowIndex + i].HRate * HWaterQty * 0.001);
+ option.data[rowIndex + i].HQty = roundNumber(dealDoubleToFixed(option.data[rowIndex + i].HRate * HWaterQty * 0.001), 3).toFixed(3);
} else if (option.data[rowIndex + i].HMaterRuleExternType == "鍔╁墏锛堟寜甯冪畻锛�") {
- option.data[rowIndex + i].HQty = dealDoubleToFixed(option.data[rowIndex + i].HRate * HWeight * 0.001);
+ option.data[rowIndex + i].HQty = roundNumber(dealDoubleToFixed(option.data[rowIndex + i].HRate * HWeight * 0.001), 3).toFixed(3);
}
//if (option.data[rowIndex + i].HMaterRuleExternType == "缇婃瘺") {
// option.data[rowIndex + i].HQty = dealDoubleToFixed(option.data[rowIndex + i].HRate * HWeight * 0.001);
@@ -2283,22 +2284,28 @@
//#region 瀛愯〃鍏抽敭瀛楁閲嶅妫�楠�
- var num = [];
- for (var i = 0; i < option.data.length; i++) {
- temp = option.data[i]["HMaterID"];
- if ($.inArray(temp, num) != -1) {
- layer.msg("绗�" + (i + 1) + "琛岋細鐗╂枡閲嶅锛岃閲嶆柊閫夋嫨锛�");
- console.log(option);
- return Result = false;
- }
- num.push(temp);
- }
+ // var num = [];
+ // for (var i = 0; i < option.data.length; i++) {
+ // temp = option.data[i]["HMaterID"];
+ // if ($.inArray(temp, num) != -1) {
+ // layer.msg("绗�" + (i + 1) + "琛岋細鐗╂枡閲嶅锛岃閲嶆柊閫夋嫨锛�");
+ // console.log(option);
+ // return Result = false;
+ // }
+ // num.push(temp);
+ // }
//#endregion
return Result;
}
//#endregion
+ // 鍥涜垗浜斿叆鏂规硶
+ function roundNumber(num, decimalPlaces) {
+ var factor = Math.pow(10, decimalPlaces);
+ return Math.round((num + Math.pow(2, -52)) * factor) / factor;
+ }
+
//#region 鏍规嵁宸ヨ壓鍗曞彿鑾峰彇琛ㄥご淇℃伅
function getMainInfoByHProcExchBillNo() {
var HProcExchBillNo = $("#HProcExchBillNo").val();
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBillList.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBillList.html"
index 4eec288..5e7a846 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBillList.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBillList.html"
@@ -909,7 +909,7 @@
DisPlay_HideColumn()
ins = table.render(option);
- if($("#ColName option").length < 1){
+ if ($("#ColName option").length < 1) {
ColFilter()
}
@@ -1311,15 +1311,26 @@
});
var linterid = obj.data["hmainid"];
+
+ var title = '缂栬緫鐢熶骇棰嗘枡鍗�'
+ var content = '../棰嗘枡鍑哄簱/Kf_MateOutBillLEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
+ if (subType) {
+ if (subType == '缇婃瘺鏌撹壊') {
+ content = '../棰嗘枡鍑哄簱/Kf_MateOutBillEdit_YangMao.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
+ } else if (subType == '姣涘皷') {
+ content = '../棰嗘枡鍑哄簱/Kf_MateOutBillEdit_MaoJian.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
+ }
+ }
+
layer.open({
type: 2
, area: ['100%', '100%']
- , title: '缂栬緫鐢熶骇棰嗘枡鍗�'
+ , title: title
, closeBtn: 1
, shade: 0.6 //閬僵閫忔槑搴�
, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
, anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: '../棰嗘枡鍑哄簱/Kf_MateOutBillLEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
+ , content: content
, resize: false,
end: function () {
//get_FastQuery(table, option);
--
Gitblit v1.9.1