From 857df57b20649178d0ddf971d8f2622e9e9f2b65 Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期五, 16 八月 2024 14:21:08 +0800 Subject: [PATCH] 物料添加新字段 --- WebTM/layuiadmin/Scripts/webConfig.js | 4 +- WebTM/views/基础资料/公用基础资料/Add_Edit_Gy_Material.html | 59 ++++++++++++++++++++++++++--- WebTM/views/基础资料/公用基础资料/Gy_Material.html | 3 + 3 files changed, 56 insertions(+), 10 deletions(-) diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js index a809ac0..ece0025 100644 --- a/WebTM/layuiadmin/Scripts/webConfig.js +++ b/WebTM/layuiadmin/Scripts/webConfig.js @@ -5,14 +5,14 @@ //var WEBURL = "http://61.164.86.218:8099/ABAPI/"; /*var WEBURL = "http://localhost/API/"; */ //棰滄檽鍐涙湰鍦伴厤缃� //var WEBURL = "http://localhost:8082/LuBaoAPI/"; //鏉ㄤ箰鏈湴閰嶇疆 - var WEBURL = "http://localhost:8082/API/"; //鏉滆春鏈湴閰嶇疆 + /*var WEBURL = "http://localhost:8082/API/"; //鏉滆春鏈湴閰嶇疆*/ /*var WEBURL = "http://localhost/API/";*/ //娼樻禉娓告湰鍦伴厤缃� /*var WEBURL = "http://localhost:8082/API/"; //鏉滆春鏈湴閰嶇疆*/ //var WEBURL = "http://localhost:81/API/"; //鐜嬪浆鏈湴閰嶇疆 /*var WEBURL = "http://localhost:8083/API/"; //闄堥洴闈欐湰鍦伴厤缃�*/ /* var WEBURL = "http://localhost:81/API/" //缈佹稕娑涙湰鍦伴厤缃�*/ /*var WEBURL = "http://localhost:8082/API/"; //寮犵憺骞挎湰鍦伴厤缃�*/ - //var WEBURL = "http://localhost:81/API/" //缈佹稕娑涙湰鍦伴厤缃� + var WEBURL = "http://localhost:81/API/" //缈佹稕娑涙湰鍦伴厤缃� /*var WEBURL = "http://localhost:8082/API/"; */ //寮犵憺骞挎湰鍦伴厤缃� //var WEBURL = "http://localhost:8082/LuBaoAPI/"; //浣欐�濇澃鏈湴閰嶇疆 //var WEBURL = "http://localhost:8088/ARAPI/"; //浣欐�濇澃鏈湴閰嶇疆(瀹夌憺) diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_Material.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_Material.html" index aa46c20..142b3ce 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_Material.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_Material.html" @@ -605,13 +605,24 @@ <input type="checkbox" name="HCommonUseFlag" id="HCommonUseFlag" lay-skin="primary" lay-filter="checkbox" value="true" title="鏄惁甯哥敤鏉愭枡"> </div> </div> - - </div> - <div class="layui-row"> <div class="layui-inline"> <label class="layui-form-label"> 鍔犳潈骞冲潎浠凤細</label> <div class="layui-input-inline"> <input class="layui-input" name="HAvgStockPrice" lay-verify="HAvgStockPrice" id="HAvgStockPrice" autocomplete="off" value="0"> + </div> + </div> + </div> + <div class="layui-row"> + <div class="layui-inline"> + <label class="layui-form-label">榛樿绋庣巼</label> + <div class="layui-input-inline" style="margin-top:10px"> + <input class="layui-input" name="HTaxRate" lay-verify="HTaxRate" id="HTaxRate" autocomplete="off" value="13"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">榛樿鍒╂鼎鐜�</label> + <div class="layui-input-inline" style="margin-top:10px"> + <input class="layui-input" name="HProfitRate" lay-verify="HProfitRate" id="HProfitRate" autocomplete="off" value="0"> </div> </div> <div class="layui-inline"> @@ -620,7 +631,6 @@ <input class="layui-input" name="HFootPrice" lay-verify="HFootPrice" id="HFootPrice" autocomplete="off" value="0"> </div> </div> - <div class="layui-inline"> <label class="layui-form-label"> 鍚◣鎴愭湰浠�</label> <div class="layui-input-inline" style="margin-top:10px"> @@ -876,6 +886,39 @@ } }); + //鐩戝惉涓嶅惈绋庢垚鏈环 + $("#HNoTaxCost").blur(function (data) { + // 鑾峰彇杈撳叆妗嗙殑鍊� + var value = $("#HNoTaxCost").val(); + if (!ref.test(value)) { + layer.msg("涓嶅惈绋庢垚鏈环姝g‘鏁板��", { time: 3000, }); + $("#HNoTaxCost").val("0"); + } else { + var TaxRate = $("#HTaxRate").val(); + var HProfitRate = $("#HProfitRate").val(); + var HTaxCost = Number((value * (100 + TaxRate*1) / 100).toFixed(4)) //鍚◣鎴愭湰浠� = 涓嶅惈绋庢垚鏈� * 锛�100 + 绋庣巼锛�/100 + var HFootPrice = Number((HTaxCost * (100 + HProfitRate*1) / 100).toFixed(4))// 缁撶畻浠� = 鍚◣鎴愭湰浠� * 锛�100+ 鍒╂鼎鐜囷級/100 + $("#HTaxCost").val(HTaxCost); + $("#HFootPrice").val(HFootPrice); + } + }); + //鐩戝惉鍚◣鎴愭湰浠� + $("#HTaxCost").blur(function (data) { + // 鑾峰彇杈撳叆妗嗙殑鍊� + var value = $("#HTaxCost").val(); + if (!ref.test(value)) { + layer.msg("涓嶅惈绋庢垚鏈环姝g‘鏁板��", { time: 3000, }); + $("#HTaxCost").val("0"); + } else { + var TaxRate = $("#HTaxRate").val(); + var HProfitRate = $("#HProfitRate").val(); + var HNoTaxCost = Number((value / (100 + TaxRate*1) * 100).toFixed(4))//涓嶅惈绋庢垚鏈环 = 鍚◣鎴愭湰/ 锛�100 + 绋庣巼锛�/100 缁撶畻浠� + var HFootPrice = Number((value * (100 + HProfitRate*1) / 100).toFixed(4)) + $("#HNoTaxCost").val(HNoTaxCost); + $("#HFootPrice").val(HFootPrice); + } + }); + //閫夋嫨棰滆壊 colorpicker.render({ elem: '#HColorNoName' @@ -1008,9 +1051,11 @@ , "HTaxCost": data.鍚◣鎴愭湰浠� , "HNoTaxCost": data.涓嶅惈绋庢垚鏈环 , "HOnceRightRate": data.涓�娆″悎鏍肩巼鏍囧噯鍊� - , "HQtyDec": data.鏁伴噺绮惧害 == null ? "0" : data.鏁伴噺绮惧害 - , "HPriceDec": data.鍗曚环绮惧害 == null ? "0" : data.鍗曚环绮惧害 - , "HMoneyDec": data.閲戦绮惧害 == null ? "0" : data.閲戦绮惧害 + , "HQtyDec": data.鏁伴噺绮惧害 == null ? "4" : data.鏁伴噺绮惧害 + , "HPriceDec": data.鍗曚环绮惧害 == null ? "4" : data.鍗曚环绮惧害 + , "HMoneyDec": data.閲戦绮惧害 == null ? "2" : data.閲戦绮惧害 + , "HTaxRate": data.榛樿绋庣巼 == null ? "13" : data.榛樿绋庣巼 + , "HProfitRate": data.榛樿鍒╂鼎鐜� == null ? "0" : data.榛樿鍒╂鼎鐜� , "HHeight_M": data.姣涢珮 , "HInches_M": data.瀵告暟缁勭粐 diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Material.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Material.html" index 32258ed..00ab894 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Material.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Material.html" @@ -417,6 +417,7 @@ function set_ClearBill() { //鍒濆鍖栬〃鏍� set_InitGrid(); + //鏌ヨ //鏍规嵁椤甸潰鐨勬墦寮�鏂瑰紡锛屽垽鏂繃婊ゆ潯浠秙Where鏄惁闇�瑕佽繘琛岄澶栫殑娣诲姞 //鑾峰彇鍙傛暟 @@ -935,7 +936,7 @@ //#region 鑾峰彇椤圭洰鍙� function Get_HProject() { //鑾峰彇椤圭洰鍙� - var HProjectList = '<option value="0" style="color:red;" selected></option>'; + var HProjectList = '<option value="" style="color:red;" selected></option>'; $.ajax({ type: "get", url: GetWEBURL() + "/Gy_Material/Get_HProject", -- Gitblit v1.9.1