From d4e2d5e93bdee0dd3538714b83745fd16dc4a07e Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期三, 20 八月 2025 16:26:33 +0800
Subject: [PATCH] PDA 条码查询页面 添加 条码出库日期 客户 销售出库单号 查询条件
---
WebTM/views/销售管理/销售订单/Add_Edit_Xs_SeOrderBillList.html | 768 +++++++++++++++++++++++++++++++++--------------------------
1 files changed, 429 insertions(+), 339 deletions(-)
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html"
index ccf9c76..4815da7 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html"
@@ -77,7 +77,7 @@
<div class="layui-inline">
<label class="layui-form-label">鍗曟嵁缂栧彿<label style="color:red"> * </label></label>
<div class="layui-input-inline">
- <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
+ <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;">
<input type="hidden" name="HInterID" id="HInterID" value="0">
<input type="hidden" name="HSTOCKORGID" id="HSTOCKORGID" lay-verify="HSTOCKORGID">
</div>
@@ -153,6 +153,15 @@
<select name="HBillSubType" id="HBillSubType" lay-filter="HBillSubType" style="width: 180px; ">
<option style="color:blue;" selected="selected" value="0">鏅�氬崟鎹�</option>
<option style="color:blue;" value="1">杩斾慨鍗曟嵁</option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">浜у搧绫诲瀷</label>
+ <div class="layui-input-inline">
+ <select name="HProductType" id="HProductType" lay-filter="HProductType" style="width: 180px; ">
+ <option style="color:blue;" selected="selected" value="闈炴牱鍝�">闈炴牱鍝�</option>
+ <option style="color:blue;" value="鏍峰搧">鏍峰搧</option>
</select>
</div>
</div>
@@ -453,7 +462,7 @@
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index' //涓诲叆鍙fā鍧�
- }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+ }).use(['index', 'form', 'laydate', 'table', 'element', 'tableSelect'], function () {
//#region 鍏敤鍙橀噺
var $ = layui.$
@@ -462,11 +471,12 @@
, table = layui.table
, form = layui.form
, laydate = layui.laydate
- , element = layui.element;
+ , element = layui.element
+ , tableSelect = layui.tableSelect;
//瀛愯〃娓叉煋鍙傛暟
window.option = {};
-
+ var topScroll = 0;//璁板綍婊氬姩鏉$殑浣嶇疆
var titleData = ["HMaterID", "HUnitID", "鎶樻墸鐜�", "瀹為檯鍚◣鍗曚环", "绋庨", "鏈綅甯佷环绋庡悎璁�", "鍑哄簱鏁伴噺", "寮�绁ㄦ暟閲�", "HOrderLevID", "璁㈠崟绛夌骇浠g爜", "閿�鍞嚭搴撴暟閲�", "閿�鍞嚭搴撳鏍告暟閲�", "閿�鍞嚭搴撳鏍搁噾棰�", "鐢熶骇鏁伴噺", "閿�鍞��搴撴暟閲�", "閿�鍞��搴撳鏍告暟閲�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
//璁板綍缁勭粐鐨勫��
@@ -856,6 +866,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 //寰楀埌淇敼鍚庣殑鍊�
@@ -883,23 +894,21 @@
//鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
- var HQty = value * 1; //鏁伴噺
- var HPrice = obj.data.HPrice * 1; //鍗曚环
- var HTaxRate = obj.data.HTaxRate * 0.01; //绋庣巼
- /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
- var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
- /*var HRelTaxPrice = HTaxPrice * HDiscountRate; //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
- //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
- var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
- var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
- var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
-
- //鏁板瓧绮惧害
+ var HQty = value * 1; //鏁伴噺
HQty = Number(HQty.toFixed(HQtyDec));
+ var HPrice = obj.data.HPrice * 1; //鍗曚环
HPrice = Number(HPrice.toFixed(HPriceDec));
+ var HTaxRate = obj.data.HTaxRate * 0.01; //绋庣巼
+ /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
+ var HTaxPrice = obj.data.HTaxPrice * 1; //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+ HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+ /*var HRelTaxPrice = HTaxPrice * HDiscountRate; //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
+ //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
+ var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
HMoney = Number(HMoney.toFixed(HMoneyDec));
+ var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
+ var HlineTotal = HQty * HTaxPrice; //浠风◣鍚堣=鏁伴噺*鍚◣鍗曚环
HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
- HTaxPrice = Number(HPrice.toFixed(HPriceDec));
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
@@ -966,24 +975,23 @@
}
//鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
- var HQty = obj.data.HQty * 1; //鏁伴噺
- var HPrice = value * 1; //鍗曚环
- var HTaxRate = obj.data.HTaxRate * 0.01; //绋庣巼
- /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
- var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
- /*var HRelTaxPrice = HTaxPrice * HDiscountRate; //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
+ var HQty = obj.data.HQty * 1; //鏁伴噺
+ HQty = Number(HQty.toFixed(HQtyDec));
+ var HPrice = value * 1; //鍗曚环
+ HPrice = Number(HPrice.toFixed(HPriceDec));
+ var HTaxRate = obj.data.HTaxRate * 0.01; //绋庣巼
+ /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
+ var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+ HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+ /*var HRelTaxPrice = HTaxPrice * HDiscountRate; //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
//鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
- var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
- var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
- var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
+ var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
+ var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
+ var HlineTotal = HQty * HTaxPrice; //浠风◣鍚堣=鏁伴噺*鍚◣鍗曚环
+ HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
//鏁板瓧绮惧害
- HQty = Number(HQty.toFixed(HQtyDec));
- HPrice = Number(HPrice.toFixed(HPriceDec));
- HMoney = Number(HMoney.toFixed(HMoneyDec));
- HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
- HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
-
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
HQty: HQty
@@ -1018,25 +1026,19 @@
return;
}
-
//鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
- var HQty = obj.data.HQty * 1; //鏁伴噺
- var HPrice = obj.data.HPrice * 1; //鍗曚环
- var HTaxRate = value * 0.01; //绋庣巼
- /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
- var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
- /*var HRelTaxPrice = HTaxPrice * HDiscountRate; //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
- //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
- var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
- var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
- var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
-
- //鏁板瓧绮惧害
+ var HQty = obj.data.HQty * 1; //鏁伴噺
HQty = Number(HQty.toFixed(HQtyDec));
+ var HTaxRate = value * 0.01; //绋庣巼
+ var HPrice = obj.data.HPrice * 1; //鍗曚环
HPrice = Number(HPrice.toFixed(HPriceDec));
- HMoney = Number(HMoney.toFixed(HMoneyDec));
- HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+ var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环
HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+ var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
+ var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
+ var HlineTotal = HQty * HTaxPrice; //浠风◣鍚堣=鏁伴噺*鍚◣鍗曚环
+ HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
@@ -1102,26 +1104,21 @@
}
}
//鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
- var HQty = obj.data.HQty * 1; //鏁伴噺
- var HTaxRate = obj.data.HTaxRate * 0.01; //绋庣巼
- var HTaxPrice = value * 1; //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
- var HPrice = HTaxPrice / (1 + HTaxRate); //鍗曚环=鍚◣鍗曟嵁/(1+绋庣巼)
-
- /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
-
- /*var HRelTaxPrice = HTaxPrice * HDiscountRate; //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
- //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
- var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
- var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
- var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
+ var HQty = obj.data.HQty * 1; //鏁伴噺
+ HQty = Number(HQty.toFixed(HQtyDec));
+ var HTaxRate = obj.data.HTaxRate * 0.01; //绋庣巼
+ var HTaxPrice = value * 1; //鍚◣鍗曚环
+ HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+ var HPrice = HTaxPrice / (1 + HTaxRate); //鍗曚环
+ HPrice = Number(HPrice.toFixed(HPriceDec));
+
+ var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
+ var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
+ var HlineTotal = HQty * HTaxPrice; //浠风◣鍚堣=鏁伴噺*鍚◣鍗曚环
+ HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
//鏁板瓧绮惧害
- HQty = Number(HQty.toFixed(HQtyDec));
- HPrice = Number(HPrice.toFixed(HPriceDec));
- HMoney = Number(HMoney.toFixed(HMoneyDec));
- HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
- HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
-
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
HQty: HQty
@@ -1388,6 +1385,7 @@
}
});
});
+ $(".layui-table-main").scrollTop(topScroll);
}
}
@@ -1516,6 +1514,7 @@
, "HProjectName": data.椤圭洰鍚嶇О
, "HWHID": data.涓讳粨搴搃d
, "HWHName": data.涓讳粨搴�
+ , "HProductType": data.浜у搧绫诲瀷
, "HCreditRating_Now": data.HCreditRating_Now
, "HRemark": data.琛ㄥご澶囨敞
, "HMaker": data.鍒跺崟浜�
@@ -1540,6 +1539,11 @@
//瀛愯〃 璧嬪��
var rowdata = [];
for (var i = 0; i < result.data.length; i++) {
+ var HTaxPrice_Temp = result.data[i]["鍚◣鍗曚环"];
+ if (typeof (HTaxPrice_Temp) == "undefined") {
+ HTaxPrice_Temp = result.data[i]["HTaxPrice"];
+ }
+
rowdata.push(
{
"HMaterID": result.data[i]["HMaterID"],
@@ -1555,7 +1559,7 @@
"浠撳簱": result.data[i]["瀛愪粨搴�"],
"HQty": dealDoubleToFixed(result.data[i]["鏁伴噺"], 1),
"HPrice": dealDoubleToFixed(result.data[i]["鍗曚环"], 3),
- "HTaxPrice": dealDoubleToFixed(result.data[i]["鍚◣鍗曚环"], 3),
+ "HTaxPrice": dealDoubleToFixed(HTaxPrice_Temp, 3),
"HMoney": dealDoubleToFixed(result.data[i]["閲戦"],2),
"HDiscountRate": result.data[i]["鎶樻墸鐜�"],
"HRelTaxPrice": result.data[i]["瀹為檯鍚◣鍗曚环"],
@@ -2615,7 +2619,7 @@
if (obj.event === 'del') {
layer.confirm('鐪熺殑鍒犻櫎琛屼箞', function (index) {
console.log("绱㈠紩涓�:" + rowIndex);
- if (rowIndex === '0') {
+ if (rowIndex === '0' && table.cache["mainTable"].length == 1) {
layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
} else {
//obj.del();
@@ -2672,199 +2676,199 @@
function set_GridCellCheck(obj) {
$(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
//#region 瀛愯〃鏂囨湰妗嗚緭鍏ュ悗妫�绱㈡暟鎹�
- if (event.key != "F7") {
- var errKeys = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter"];
- if (obj.event == "HMaterID") { //瀹氫綅褰撳墠姝e湪杈撳叆鐨勬枃鏈鐨勫垪鍚�
- if ($.inArray(event.key, errKeys) == -1) { //濡傛灉鎸変笅鐨勯敭浣嶄笉鏄� 鏂瑰悜閿紝鍒欏埛鏂板脊绐椾腑鐨勬暟鎹�
- if (childPage == null) { //鍒ゆ柇褰撳墠瀛愮獥鍙f槸鍚﹀凡缁忔墦寮�锛岃嫢鏈墦鍗★紝鍒欐墦寮�椤甸潰锛屽苟鑾峰彇瀛愮獥鍙g殑瀵硅薄
- var offset = $(this).offset(); //鑾峰彇瑙﹀彂浜嬩欢鐨勫厓绱犵殑浣嶇疆锛岀敤浜庡畾浣嶅瓙绐楀彛鎵撳紑鐨勪綅缃�
- var innerHeight = window.innerHeight;
- var top = offset.top + 0.05 * innerHeight;
- var left = offset.left;
- if (top + 0.05 * innerHeight + 0.3 * innerHeight > innerHeight) {
- top = top - 0.3 * innerHeight - 0.05 * innerHeight;
- }
- layer.open({
- type: 2 //寮圭獥绫诲瀷
- , skin: 'layui-layer-rim' //鍔犱笂杈规
- , area: ['25%', '30%'] //澶у皬
- , shadeClose: true //鐐瑰嚮閬僵鏃跺叧闂脊绐�
- , offset: [top, left]
- , title: false //涓嶆樉绀烘爣棰樻爮
- //, title: '椤圭洰璐圭敤鍒楄〃' //鏍囬
- , shift: 2 //寮瑰嚭鍔ㄧ敾
- , closeBtn: 0 //绂佺敤鍏抽棴鎸夐挳
- , content: ["../../鍩虹璧勬枡/閫氱敤鍩虹璧勬枡/Gy_CommonBaseData.html?OperationType=2", "yes"]
- , success: function (layero, index) {
- setTimeout(function () {
- var value = $(e.currentTarget).val().replace("'", ""); //鑾峰彇鏂囨湰妗嗘渶鏂板��
- currRowIndex = 0;
- var tableView = "h_v_Gy_MaterialList";
- var childSWhere = "select top(10) HItemID,鐗╂枡浠g爜,鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,HUnitID,璁¢噺鍗曚綅鍚嶇О from " + tableView + " where 1=1 and 缁勭粐鍚嶇О = '" + sessionStorage["Organization"] + "' and (鐗╂枡浠g爜 like '%" + value + "%' or 鐗╂枡鍚嶇О like '%" + value + "%') order by 鐗╂枡浠g爜 desc";
- childPage.getData(childSWhere, tableView);
- }, 200);
- }
- , end: function () {
- obj.event = "";
- childPage = null;
- currRowIndex = 0;
- if (childData != null) {
- var rowIndex = $(obj.tr).attr("data-index") * 1;
- var Dec = getDecByMaterID(childData.HItemID) //鑾峰彇绮惧害
- 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"]; //閲戦绮惧害
- //鏁板�兼牸寮忔牎楠屽伐鍏�
- var ref = /^\d+(\.\d+)?$/; //闈炶礋鏁版鍒欒〃杈惧紡
- var temp = "";
- //鑾峰彇閫夋嫨鐗╂枡鍓嶅悗鐨勭◣鐜�
- var value_TaxRate = subHTaxRate; //閫夋嫨鐗╂枡鍚庢牴鎹鎴峰緱鍒扮殑绋庣巼
- var oldText = option.data[rowIndex].HTaxRate; //璇ヨ褰曚腑鍘熸湁鐨勭◣鐜�
+ //if (event.key != "F7") {
+ // var errKeys = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter"];
+ // if (obj.event == "HMaterID") { //瀹氫綅褰撳墠姝e湪杈撳叆鐨勬枃鏈鐨勫垪鍚�
+ // if ($.inArray(event.key, errKeys) == -1) { //濡傛灉鎸変笅鐨勯敭浣嶄笉鏄� 鏂瑰悜閿紝鍒欏埛鏂板脊绐椾腑鐨勬暟鎹�
+ // if (childPage == null) { //鍒ゆ柇褰撳墠瀛愮獥鍙f槸鍚﹀凡缁忔墦寮�锛岃嫢鏈墦鍗★紝鍒欐墦寮�椤甸潰锛屽苟鑾峰彇瀛愮獥鍙g殑瀵硅薄
+ // var offset = $(this).offset(); //鑾峰彇瑙﹀彂浜嬩欢鐨勫厓绱犵殑浣嶇疆锛岀敤浜庡畾浣嶅瓙绐楀彛鎵撳紑鐨勪綅缃�
+ // var innerHeight = window.innerHeight;
+ // var top = offset.top + 0.05 * innerHeight;
+ // var left = offset.left;
+ // if (top + 0.05 * innerHeight + 0.3 * innerHeight > innerHeight) {
+ // top = top - 0.3 * innerHeight - 0.05 * innerHeight;
+ // }
+ // layer.open({
+ // type: 2 //寮圭獥绫诲瀷
+ // , skin: 'layui-layer-rim' //鍔犱笂杈规
+ // , area: ['25%', '30%'] //澶у皬
+ // , shadeClose: true //鐐瑰嚮閬僵鏃跺叧闂脊绐�
+ // , offset: [top, left]
+ // , title: false //涓嶆樉绀烘爣棰樻爮
+ // //, title: '椤圭洰璐圭敤鍒楄〃' //鏍囬
+ // , shift: 2 //寮瑰嚭鍔ㄧ敾
+ // , closeBtn: 0 //绂佺敤鍏抽棴鎸夐挳
+ // , content: ["../../鍩虹璧勬枡/閫氱敤鍩虹璧勬枡/Gy_CommonBaseData.html?OperationType=2", "yes"]
+ // , success: function (layero, index) {
+ // setTimeout(function () {
+ // var value = $(e.currentTarget).val().replace("'", ""); //鑾峰彇鏂囨湰妗嗘渶鏂板��
+ // currRowIndex = 0;
+ // var tableView = "h_v_Gy_MaterialList";
+ // var childSWhere = "select top(10) HItemID,鐗╂枡浠g爜,鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,HUnitID,璁¢噺鍗曚綅鍚嶇О from " + tableView + " where 1=1 and 缁勭粐鍚嶇О = '" + sessionStorage["Organization"] + "' and (鐗╂枡浠g爜 like '%" + value + "%' or 鐗╂枡鍚嶇О like '%" + value + "%') order by 鐗╂枡浠g爜 desc";
+ // childPage.getData(childSWhere, tableView);
+ // }, 200);
+ // }
+ // , end: function () {
+ // obj.event = "";
+ // childPage = null;
+ // currRowIndex = 0;
+ // if (childData != null) {
+ // var rowIndex = $(obj.tr).attr("data-index") * 1;
+ // var Dec = getDecByMaterID(childData.HItemID) //鑾峰彇绮惧害
+ // 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"]; //閲戦绮惧害
+ // //鏁板�兼牸寮忔牎楠屽伐鍏�
+ // var ref = /^\d+(\.\d+)?$/; //闈炶礋鏁版鍒欒〃杈惧紡
+ // var temp = "";
+ // //鑾峰彇閫夋嫨鐗╂枡鍓嶅悗鐨勭◣鐜�
+ // var value_TaxRate = subHTaxRate; //閫夋嫨鐗╂枡鍚庢牴鎹鎴峰緱鍒扮殑绋庣巼
+ // var oldText = option.data[rowIndex].HTaxRate; //璇ヨ褰曚腑鍘熸湁鐨勭◣鐜�
- //绋庣巼鏁版嵁鏍煎紡鏍¢獙锛岃嫢鏍规嵁瀹㈡埛鑾峰彇鐨勭◣鐜囦笉鍚堟硶锛屽垯浣跨敤璁板綍涓師鏈夌殑绋庣巼锛屽苟鎻愮ず
- temp = value_TaxRate + "";
- if (!ref.test(temp)) {
- value_TaxRate = oldText;
- layer.msg("鑾峰彇鍒扮殑绋庣巼涓嶅悎娉曪紝宸茶嚜鍔ㄥ彉鏇翠负鍘熸湁绋庣巼!");
- }
+ // //绋庣巼鏁版嵁鏍煎紡鏍¢獙锛岃嫢鏍规嵁瀹㈡埛鑾峰彇鐨勭◣鐜囦笉鍚堟硶锛屽垯浣跨敤璁板綍涓師鏈夌殑绋庣巼锛屽苟鎻愮ず
+ // temp = value_TaxRate + "";
+ // if (!ref.test(temp)) {
+ // value_TaxRate = oldText;
+ // layer.msg("鑾峰彇鍒扮殑绋庣巼涓嶅悎娉曪紝宸茶嚜鍔ㄥ彉鏇翠负鍘熸湁绋庣巼!");
+ // }
- //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
- var HQty = option.data[rowIndex].HQty * 1; //鏁伴噺
- var HPrice = option.data[rowIndex].HPrice * 1; //鍗曚环
- var HTaxRate = value_TaxRate * 0.01; //绋庣巼
- /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
- var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
- /*var HRelTaxPrice = HTaxPrice * HDiscountRate; //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
- //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
- var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
- var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
- var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
- //鏁板瓧绮惧害
- HQty = Number(HQty.toFixed(HQtyDec));
- HPrice = Number(HPrice.toFixed(HPriceDec));
- HMoney = Number(HMoney.toFixed(HMoneyDec));
- HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
- HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
- HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+ // //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+ // var HQty = option.data[rowIndex].HQty * 1; //鏁伴噺
+ // var HPrice = option.data[rowIndex].HPrice * 1; //鍗曚环
+ // var HTaxRate = value_TaxRate * 0.01; //绋庣巼
+ // /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
+ // var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+ // /*var HRelTaxPrice = HTaxPrice * HDiscountRate; //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
+ // //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
+ // var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
+ // var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
+ // var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
+ // //鏁板瓧绮惧害
+ // HQty = Number(HQty.toFixed(HQtyDec));
+ // HPrice = Number(HPrice.toFixed(HPriceDec));
+ // HMoney = Number(HMoney.toFixed(HMoneyDec));
+ // HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+ // HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+ // HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
- option.data[rowIndex].HMaterID = childData.HItemID;
- option.data[rowIndex].鐗╂枡浠g爜 = childData.鐗╂枡浠g爜;
- option.data[rowIndex].鐗╂枡鍚嶇О = childData.鐗╂枡鍚嶇О;
- option.data[rowIndex].瑙勬牸鍨嬪彿 = childData.瑙勬牸鍨嬪彿;
- option.data[rowIndex].HUnitID = childData.HUnitID;
- option.data[rowIndex].璁¢噺鍗曚綅 = childData.璁¢噺鍗曚綅鍚嶇О;
+ // option.data[rowIndex].HMaterID = childData.HItemID;
+ // option.data[rowIndex].鐗╂枡浠g爜 = childData.鐗╂枡浠g爜;
+ // option.data[rowIndex].鐗╂枡鍚嶇О = childData.鐗╂枡鍚嶇О;
+ // option.data[rowIndex].瑙勬牸鍨嬪彿 = childData.瑙勬牸鍨嬪彿;
+ // option.data[rowIndex].HUnitID = childData.HUnitID;
+ // option.data[rowIndex].璁¢噺鍗曚綅 = childData.璁¢噺鍗曚綅鍚嶇О;
- option.data[rowIndex].HQty = HQty;
- option.data[rowIndex].HPrice = HPrice;
- option.data[rowIndex].HTaxRate = HTaxRate * 100;
- option.data[rowIndex].HTaxPrice = HTaxPrice;
- option.data[rowIndex].HMoney = HMoney;
- option.data[rowIndex].HlineTotal = HlineTotal;
+ // option.data[rowIndex].HQty = HQty;
+ // option.data[rowIndex].HPrice = HPrice;
+ // option.data[rowIndex].HTaxRate = HTaxRate * 100;
+ // option.data[rowIndex].HTaxPrice = HTaxPrice;
+ // option.data[rowIndex].HMoney = HMoney;
+ // option.data[rowIndex].HlineTotal = HlineTotal;
- table.render(option);
+ // table.render(option);
- //鍒锋柊琛ㄦ牸鍚屾椂鏍规嵁option涓璈isStockGoods鍊艰缃笅鎷夊垪琛�
- setSelectHisStockGoodsByTableRender();
+ // //鍒锋柊琛ㄦ牸鍚屾椂鏍规嵁option涓璈isStockGoods鍊艰缃笅鎷夊垪琛�
+ // setSelectHisStockGoodsByTableRender();
- //璁剧疆琛ㄥご鎵�闇�閲戦
- set_HBillMoney($("#HEarnestRate").val() * 1);
+ // //璁剧疆琛ㄥご鎵�闇�閲戦
+ // set_HBillMoney($("#HEarnestRate").val() * 1);
- childData = null;
- }
- }
- });
- } else {
- setTimeout(function () {
- var value = $(e.currentTarget).val().replace("'", ""); //鑾峰彇鏂囨湰妗嗘渶鏂板��
- currRowIndex = 0;
- var tableView = "h_v_Gy_MaterialList";
- var childSWhere = "select top(10) HItemID,鐗╂枡浠g爜,鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,HUnitID,璁¢噺鍗曚綅鍚嶇О from " + tableView + " where 1=1 and 缁勭粐鍚嶇О = '" + sessionStorage["Organization"] + "' and (鐗╂枡浠g爜 like '%" + value + "%' or 鐗╂枡鍚嶇О like '%" + value + "%') order by 鐗╂枡浠g爜 desc";
- childPage.getData(childSWhere, tableView);
- }, 200);
- }
- } else { //濡傛灉鎸変笅鐨勯敭浣嶆槸 鏂瑰悜閿紝鍒欒皟鏁寸獥鍙d腑 閫変腑琛� 鐨勪綅缃�
- if (event.key == "ArrowUp") {
- currRowIndex--;
- childPage.setSelectedRow(currRowIndex);
- } else if (event.key == "ArrowDown") {
- currRowIndex++;
- childPage.setSelectedRow(currRowIndex);
- } else if (event.key == "Enter") {
- //鎵嬪姩澶辩劍
- var element = document.getElementById("HBillNo");
- element.focus();
+ // childData = null;
+ // }
+ // }
+ // });
+ // } else {
+ // setTimeout(function () {
+ // var value = $(e.currentTarget).val().replace("'", ""); //鑾峰彇鏂囨湰妗嗘渶鏂板��
+ // currRowIndex = 0;
+ // var tableView = "h_v_Gy_MaterialList";
+ // var childSWhere = "select top(10) HItemID,鐗╂枡浠g爜,鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,HUnitID,璁¢噺鍗曚綅鍚嶇О from " + tableView + " where 1=1 and 缁勭粐鍚嶇О = '" + sessionStorage["Organization"] + "' and (鐗╂枡浠g爜 like '%" + value + "%' or 鐗╂枡鍚嶇О like '%" + value + "%') order by 鐗╂枡浠g爜 desc";
+ // childPage.getData(childSWhere, tableView);
+ // }, 200);
+ // }
+ // } else { //濡傛灉鎸変笅鐨勯敭浣嶆槸 鏂瑰悜閿紝鍒欒皟鏁寸獥鍙d腑 閫変腑琛� 鐨勪綅缃�
+ // if (event.key == "ArrowUp") {
+ // currRowIndex--;
+ // childPage.setSelectedRow(currRowIndex);
+ // } else if (event.key == "ArrowDown") {
+ // currRowIndex++;
+ // childPage.setSelectedRow(currRowIndex);
+ // } else if (event.key == "Enter") {
+ // //鎵嬪姩澶辩劍
+ // var element = document.getElementById("HBillNo");
+ // element.focus();
- childPage.getSelectedData(currRowIndex);
+ // childPage.getSelectedData(currRowIndex);
- var Dec = getDecByMaterID(childData.HItemID) //鑾峰彇绮惧害
- 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"]; //閲戦绮惧害
- //鏁板�兼牸寮忔牎楠屽伐鍏�
- var ref = /^\d+(\.\d+)?$/; //闈炶礋鏁版鍒欒〃杈惧紡
- var temp = "";
- //鑾峰彇閫夋嫨鐗╂枡鍓嶅悗鐨勭◣鐜�
- var value_TaxRate = subHTaxRate; //閫夋嫨鐗╂枡鍚庢牴鎹鎴峰緱鍒扮殑绋庣巼
- var oldText = option.data[rowIndex].HTaxRate; //璇ヨ褰曚腑鍘熸湁鐨勭◣鐜�
+ // var Dec = getDecByMaterID(childData.HItemID) //鑾峰彇绮惧害
+ // 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"]; //閲戦绮惧害
+ // //鏁板�兼牸寮忔牎楠屽伐鍏�
+ // var ref = /^\d+(\.\d+)?$/; //闈炶礋鏁版鍒欒〃杈惧紡
+ // var temp = "";
+ // //鑾峰彇閫夋嫨鐗╂枡鍓嶅悗鐨勭◣鐜�
+ // var value_TaxRate = subHTaxRate; //閫夋嫨鐗╂枡鍚庢牴鎹鎴峰緱鍒扮殑绋庣巼
+ // var oldText = option.data[rowIndex].HTaxRate; //璇ヨ褰曚腑鍘熸湁鐨勭◣鐜�
- //绋庣巼鏁版嵁鏍煎紡鏍¢獙锛岃嫢鏍规嵁瀹㈡埛鑾峰彇鐨勭◣鐜囦笉鍚堟硶锛屽垯浣跨敤璁板綍涓師鏈夌殑绋庣巼锛屽苟鎻愮ず
- temp = value_TaxRate + "";
- if (!ref.test(temp)) {
- value_TaxRate = oldText;
- layer.msg("鑾峰彇鍒扮殑绋庣巼涓嶅悎娉曪紝宸茶嚜鍔ㄥ彉鏇翠负鍘熸湁绋庣巼!");
- }
+ // //绋庣巼鏁版嵁鏍煎紡鏍¢獙锛岃嫢鏍规嵁瀹㈡埛鑾峰彇鐨勭◣鐜囦笉鍚堟硶锛屽垯浣跨敤璁板綍涓師鏈夌殑绋庣巼锛屽苟鎻愮ず
+ // temp = value_TaxRate + "";
+ // if (!ref.test(temp)) {
+ // value_TaxRate = oldText;
+ // layer.msg("鑾峰彇鍒扮殑绋庣巼涓嶅悎娉曪紝宸茶嚜鍔ㄥ彉鏇翠负鍘熸湁绋庣巼!");
+ // }
- //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
- var HQty = option.data[rowIndex].HQty * 1; //鏁伴噺
- var HPrice = option.data[rowIndex].HPrice * 1; //鍗曚环
- var HTaxRate = value_TaxRate * 0.01; //绋庣巼
- /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
- var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
- /*var HRelTaxPrice = HTaxPrice * HDiscountRate; //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
- //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
- var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
- var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
- var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
- //鏁板瓧绮惧害
- HQty = Number(HQty.toFixed(HQtyDec));
- HPrice = Number(HPrice.toFixed(HPriceDec));
- HMoney = Number(HMoney.toFixed(HMoneyDec));
- HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
- HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
- HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+ // //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+ // var HQty = option.data[rowIndex].HQty * 1; //鏁伴噺
+ // var HPrice = option.data[rowIndex].HPrice * 1; //鍗曚环
+ // var HTaxRate = value_TaxRate * 0.01; //绋庣巼
+ // /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
+ // var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+ // /*var HRelTaxPrice = HTaxPrice * HDiscountRate; //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
+ // //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
+ // var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
+ // var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
+ // var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
+ // //鏁板瓧绮惧害
+ // HQty = Number(HQty.toFixed(HQtyDec));
+ // HPrice = Number(HPrice.toFixed(HPriceDec));
+ // HMoney = Number(HMoney.toFixed(HMoneyDec));
+ // HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+ // HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+ // HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
- option.data[rowIndex].HMaterID = childData.HItemID;
- option.data[rowIndex].鐗╂枡浠g爜 = childData.鐗╂枡浠g爜;
- option.data[rowIndex].鐗╂枡鍚嶇О = childData.鐗╂枡鍚嶇О;
- option.data[rowIndex].瑙勬牸鍨嬪彿 = childData.瑙勬牸鍨嬪彿;
- option.data[rowIndex].HUnitID = childData.HUnitID;
- option.data[rowIndex].璁¢噺鍗曚綅 = childData.璁¢噺鍗曚綅鍚嶇О;
+ // option.data[rowIndex].HMaterID = childData.HItemID;
+ // option.data[rowIndex].鐗╂枡浠g爜 = childData.鐗╂枡浠g爜;
+ // option.data[rowIndex].鐗╂枡鍚嶇О = childData.鐗╂枡鍚嶇О;
+ // option.data[rowIndex].瑙勬牸鍨嬪彿 = childData.瑙勬牸鍨嬪彿;
+ // option.data[rowIndex].HUnitID = childData.HUnitID;
+ // option.data[rowIndex].璁¢噺鍗曚綅 = childData.璁¢噺鍗曚綅鍚嶇О;
- option.data[rowIndex].HQty = HQty;
- option.data[rowIndex].HPrice = HPrice;
- option.data[rowIndex].HTaxRate = HTaxRate * 100;
- option.data[rowIndex].HTaxPrice = HTaxPrice;
- option.data[rowIndex].HMoney = HMoney;
- option.data[rowIndex].HlineTotal = HlineTotal;
+ // option.data[rowIndex].HQty = HQty;
+ // option.data[rowIndex].HPrice = HPrice;
+ // option.data[rowIndex].HTaxRate = HTaxRate * 100;
+ // option.data[rowIndex].HTaxPrice = HTaxPrice;
+ // option.data[rowIndex].HMoney = HMoney;
+ // option.data[rowIndex].HlineTotal = HlineTotal;
- table.render(option);
+ // table.render(option);
- //鍒锋柊琛ㄦ牸鍚屾椂鏍规嵁option涓璈isStockGoods鍊艰缃笅鎷夊垪琛�
- setSelectHisStockGoodsByTableRender();
+ // //鍒锋柊琛ㄦ牸鍚屾椂鏍规嵁option涓璈isStockGoods鍊艰缃笅鎷夊垪琛�
+ // setSelectHisStockGoodsByTableRender();
- //璁剧疆琛ㄥご鎵�闇�閲戦
- set_HBillMoney($("#HEarnestRate").val() * 1);
+ // //璁剧疆琛ㄥご鎵�闇�閲戦
+ // set_HBillMoney($("#HEarnestRate").val() * 1);
- childPage = null;
- currRowIndex = 0;
- childData = null;
- obj.event = "";
- }
- }
- }
+ // childPage = null;
+ // currRowIndex = 0;
+ // childData = null;
+ // obj.event = "";
+ // }
+ // }
+ // }
- }
+ //}
//#endregion
@@ -2881,7 +2885,7 @@
, shift: 2 //寮瑰嚭鍔ㄧ敾
, area: ["90%", "90%"] //绐椾綋澶у皬
, maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
- , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html?openType=2&HOrgID=' + HOrgID, 'yes']
+ , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html?openType=2&HOrgID=' + HOrgID + '&openType2=SeOrder', 'yes']
, btn: ["纭畾", "鍙栨秷"]
, btn1: function (index, laero) {
//鎸夐挳涓� 鐨勫洖璋�
@@ -2922,24 +2926,21 @@
}
//鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
- var HQty = option.data[rowIndex + i].HQty * 1; //鏁伴噺
- var HPrice = option.data[rowIndex + i].HPrice * 1; //鍗曚环
- var HTaxRate = value * 0.01; //绋庣巼
- /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
- var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
- /*var HRelTaxPrice = HTaxPrice * HDiscountRate; //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
- //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
- var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
- var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
- var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
- //鏁板瓧绮惧害
+ var HQty = option.data[rowIndex + i].HQty * 1; //鏁伴噺
HQty = Number(HQty.toFixed(HQtyDec));
+ var HTaxRate = value * 0.01; //绋庣巼
+ var HPrice = option.data[rowIndex + i].HPrice * 1; //鍗曚环
HPrice = Number(HPrice.toFixed(HPriceDec));
- HMoney = Number(HMoney.toFixed(HMoneyDec));
- HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
- HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+ var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
-
+ var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
+ var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
+ HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+ var HlineTotal = HQty * HTaxPrice; //浠风◣鍚堣=閲戦+绋庨
+ HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+ //鏁板瓧绮惧害
+
option.data[rowIndex + i].HMaterID = resultData.HItemID;
option.data[rowIndex + i].鐗╂枡浠g爜 = resultData.鐗╂枡浠g爜;
option.data[rowIndex + i].鐗╂枡鍚嶇О = resultData.鐗╂枡鍚嶇О;
@@ -2980,20 +2981,19 @@
var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"]; //閲戦绮惧害
//鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
var HQty = obj.data.HQty * 1; //鏁伴噺
- var HPrice = obj.data.HPrice * 1; //鍗曚环
- var HTaxRate = value * 0.01; //绋庣巼
- var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+ HQty = Number(HQty.toFixed(HQtyDec));
+ var HTaxRate = value * 0.01; //绋庣巼
+ var HPrice = obj.data.HPrice * 1; //鍗曚环
+ HPrice = Number(HPrice.toFixed(HPriceDec));
+ var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+ HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
- var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
+ var HlineTotal = HQty * HTaxPrice; //浠风◣鍚堣=閲戦+绋庨
+ HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
//鏁板瓧绮惧害
- HQty = Number(HQty.toFixed(HQtyDec));
- HPrice = Number(HPrice.toFixed(HPriceDec));
- HMoney = Number(HMoney.toFixed(HMoneyDec));
- HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
- HTaxPrice = Number(HPrice.toFixed(HPriceDec));
-
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
HQty: HQty
@@ -3174,25 +3174,22 @@
for (var i = rowIndex * 1; i < option.data.length; i++) {
//鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
- var HQty = value * 1; //鏁伴噺
- var HPrice = option.data[i].HPrice * 1; //鍗曚环
- var HTaxRate = option.data[i].HTaxRate * 0.01; //绋庣巼
- /*var HDiscountRate = option.data[i].HDiscountRate * 1; //鎶樻墸鐜�*/
- var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
- /*var HRelTaxPrice = HTaxPrice * HDiscountRate; //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
- //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
- var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
- var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
- var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
-
- //璁剧疆鏁版嵁灏忔暟浣嶆暟
+ var HQty = value * 1; //鏁伴噺
HQty = dealDoubleToFixed(HQty, 1);
- HPrice = dealDoubleToFixed(HPrice, 3);
+ var HTaxRate = option.data[i].HTaxRate * 0.01; //绋庣巼
HTaxRate = HTaxRate;
+ var HPrice = option.data[i].HPrice * 1; //鍗曚环
+ HPrice = dealDoubleToFixed(HPrice, 3);
+ var HTaxPrice = HPrice * (1 + HTaxRate) //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
HTaxPrice = dealDoubleToFixed(HTaxPrice, 3);
+ var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
HMoney = dealDoubleToFixed(HMoney, 2);
+ var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
+ var HlineTotal = HQty * HTaxPrice; //浠风◣鍚堣=閲戦+绋庨
HlineTotal = dealDoubleToFixed(HlineTotal, 2);
+ //璁剧疆鏁版嵁灏忔暟浣嶆暟
+
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
option.data[i].HQty = HQty;
option.data[i].HPrice = HPrice;
@@ -3260,24 +3257,23 @@
for (var i = rowIndex * 1; i < option.data.length; i++) {
//鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
var HQty = option.data[i].HQty * 1; //鏁伴噺
+ HQty = dealDoubleToFixed(HQty, 1);
var HPrice = value * 1; //鍗曚环
+ HPrice = dealDoubleToFixed(HPrice, 3);
var HTaxRate = option.data[i].HTaxRate * 0.01; //绋庣巼
+ HTaxRate = HTaxRate;
/*var HDiscountRate = option.data[i].HDiscountRate * 1; //鎶樻墸鐜�*/
var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+ HTaxPrice = dealDoubleToFixed(HTaxPrice, 3);
/*var HRelTaxPrice = HTaxPrice * HDiscountRate; //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
//鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
- var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
- var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
-
- //璁剧疆鏁版嵁灏忔暟浣嶆暟
- HQty = dealDoubleToFixed(HQty, 1);
- HPrice = dealDoubleToFixed(HPrice, 3);
- HTaxRate = HTaxRate;
- HTaxPrice = dealDoubleToFixed(HTaxPrice, 3);
HMoney = dealDoubleToFixed(HMoney, 2);
+ var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
+ var HlineTotal = HQty * HTaxPrice; //浠风◣鍚堣=閲戦+绋庨
HlineTotal = dealDoubleToFixed(HlineTotal, 2);
+ //璁剧疆鏁版嵁灏忔暟浣嶆暟
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
option.data[i].HQty = HQty;
option.data[i].HPrice = HPrice;
@@ -3318,25 +3314,22 @@
for (var i = rowIndex * 1; i < option.data.length; i++) {
//鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
- var HQty = option.data[i].HQty * 1; //鏁伴噺
- var HPrice = option.data[i].HPrice * 1; //鍗曚环
- var HTaxRate = value * 1 * 0.01; //绋庣巼
- /*var HDiscountRate = option.data[i].HDiscountRate * 1; //鎶樻墸鐜�*/
- var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
- /*var HRelTaxPrice = HTaxPrice * HDiscountRate; //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
- //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
- var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
- var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
- var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
-
- //璁剧疆鏁版嵁灏忔暟浣嶆暟
+ var HQty = option.data[i].HQty * 1;
HQty = dealDoubleToFixed(HQty, 1);
- HPrice = dealDoubleToFixed(HPrice, 3);
+ var HTaxRate = value * 1 * 0.01; //绋庣巼
HTaxRate = HTaxRate;
+ var HPrice = option.data[i].HPrice * 1; //鍗曚环
+ HPrice = dealDoubleToFixed(HPrice, 3);
+ var HTaxPrice = HPrice * (1 + HTaxRate) //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
HTaxPrice = dealDoubleToFixed(HTaxPrice, 3);
+ var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
HMoney = dealDoubleToFixed(HMoney, 2);
+ var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
+ var HlineTotal = HQty * HTaxPrice; //浠风◣鍚堣=閲戦+绋庨
HlineTotal = dealDoubleToFixed(HlineTotal, 2);
+ //璁剧疆鏁版嵁灏忔暟浣嶆暟
+
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
option.data[i].HQty = HQty;
option.data[i].HPrice = HPrice;
@@ -3403,26 +3396,21 @@
//鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
for (var i = rowIndex * 1; i < option.data.length; i++) {
//鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
- var HQty = option.data[i].HQty * 1; //鏁伴噺
- var HTaxRate = option.data[i].HTaxRate * 0.01; //绋庣巼
- /*var HDiscountRate = option.data[i].HDiscountRate * 1; //鎶樻墸鐜�*/
- var HTaxPrice = value * 1;; //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
- var HPrice = HTaxPrice / (1 + HTaxRate); //鍗曚环=鍚◣鍗曟嵁/(1+绋庣巼)
-
- /*var HRelTaxPrice = HTaxPrice * HDiscountRate; //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
- //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
- var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
- var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
- var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
-
- //璁剧疆鏁版嵁灏忔暟浣嶆暟
+ var HQty = option.data[i].HQty * 1;
HQty = dealDoubleToFixed(HQty, 1);
- HPrice = dealDoubleToFixed(HPrice, 3);
+ var HTaxRate = option.data[i].HTaxRate * 0.01; //绋庣巼
HTaxRate = HTaxRate;
+ var HTaxPrice = value * 1;; //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
HTaxPrice = dealDoubleToFixed(HTaxPrice, 3);
+ var HPrice = HTaxPrice / (1 + HTaxRate); //鍗曚环
+ HPrice = dealDoubleToFixed(HPrice, 3);
+ var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
HMoney = dealDoubleToFixed(HMoney, 2);
+ var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
+ var HlineTotal = HQty * HTaxPrice; //浠风◣鍚堣=閲戦+绋庨
HlineTotal = dealDoubleToFixed(HlineTotal, 2);
+
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
option.data[i].HQty = HQty;
option.data[i].HPrice = HPrice;
@@ -3508,6 +3496,10 @@
//鍙屽嚮
$('.layui-table-box tbody td[data-field="鐗╂枡浠g爜"]').off('dblclick').on('dblclick', function () {
+ //鎵嬪姩澶辩劍
+ var element = document.getElementById("HBillNo");
+ element.focus();
+
var HOrgID = $("#HOrgID").val();
layer.open({
@@ -3518,7 +3510,7 @@
, shift: 2 //寮瑰嚭鍔ㄧ敾
, area: ["90%", "90%"] //绐椾綋澶у皬
, maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
- , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html?openType=2&HOrgID=' + HOrgID, 'yes']
+ , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html?openType=2&HOrgID=' + HOrgID + '&openType2=SeOrder', 'yes']
, btn: ["纭畾", "鍙栨秷"]
, btn1: function (index, laero) {
//鎸夐挳涓� 鐨勫洖璋�
@@ -3560,23 +3552,20 @@
//鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
var HQty = option.data[rowIndex + i].HQty * 1; //鏁伴噺
- var HPrice = option.data[rowIndex + i].HPrice * 1; //鍗曚环
- var HTaxRate = value * 0.01; //绋庣巼
- /*var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�*/
- var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
- /*var HRelTaxPrice = HTaxPrice * HDiscountRate; //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�*/
- //鎶樻墸棰� = 鍚◣鍗曚环 * (1 - 鎶樻墸鐜�) * 鏁伴噺
- var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
- var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
- var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
- //鏁板瓧绮惧害
HQty = Number(HQty.toFixed(HQtyDec));
+ var HTaxRate = value * 0.01;
+ var HPrice = option.data[rowIndex + i].HPrice * 1; //鍗曚环
HPrice = Number(HPrice.toFixed(HPriceDec));
- HMoney = Number(HMoney.toFixed(HMoneyDec));
- HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
- HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+ var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
-
+ var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
+ var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
+ HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+ var HlineTotal = HQty * HTaxPrice; //浠风◣鍚堣=閲戦+绋庨
+ HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+ //鏁板瓧绮惧害
+
option.data[rowIndex + i].HMaterID = resultData.HItemID;
option.data[rowIndex + i].鐗╂枡浠g爜 = resultData.鐗╂枡浠g爜;
option.data[rowIndex + i].鐗╂枡鍚嶇О = resultData.鐗╂枡鍚嶇О;
@@ -3615,22 +3604,22 @@
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"]; //閲戦绮惧害
+
//鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
var HQty = obj.data.HQty * 1; //鏁伴噺
- var HPrice = obj.data.HPrice * 1; //鍗曚环
- var HTaxRate = value * 0.01; //绋庣巼
- var HTaxPrice = HPrice * (1 + HTaxRate); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+ HQty = Number(HQty.toFixed(HQtyDec));
+ var HTaxRate = value * 0.01; //绋庣巼
+ var HPrice = obj.data.HPrice * 1; //鍗曚环
+ HPrice = Number(HPrice.toFixed(HPriceDec));
+ var HTaxPrice = HPrice * (1 + HTaxRate) //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+ HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
- var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
+ var HlineTotal = HQty * HTaxPrice; //浠风◣鍚堣=閲戦+绋庨
+ HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
//鏁板瓧绮惧害
- HQty = Number(HQty.toFixed(HQtyDec));
- HPrice = Number(HPrice.toFixed(HPriceDec));
- HMoney = Number(HMoney.toFixed(HMoneyDec));
- HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
- HTaxPrice = Number(HPrice.toFixed(HPriceDec));
-
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
HQty: HQty
@@ -3654,7 +3643,108 @@
}
}
})
+
+ obj.event = "";
});
+
+ //鐗╂枡琛ㄦ牸涓嬫媺鎼滅储妗�
+ tableSelect.render({
+ elem: 'td[data-field="鐗╂枡浠g爜"] .layui-table-edit',
+ checkedKey: 'HItemID',
+ searchKey: '鐗╂枡浠g爜,鐗╂枡鍚嶇О',
+ sWhere: " and 鐗╂枡灞炴��='鑷埗'",//table鎼滅储sWhere鏉′欢
+ table: {
+ url: GetWEBURL() + 'Gy_Material/page',
+ where: { user: sessionStorage["HUserName"], Organization: sessionStorage["Organization"] },
+ cols: [[
+ { type: 'checkbox', fixed: 'left' },
+ { field: 'HItemID', title: 'HItemID' },
+ { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜' },
+ { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О' },
+ ]],
+ page: true,
+ limit: 5,
+ limits: [5]
+ },
+ done: function (elem, data) {
+ if (data != []) {
+ checkStatus = data;
+ var rowIndex = $(obj.tr).attr("data-index") * 1;
+ var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+ 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"]; //閲戦绮惧害
+ for (var i = 0; i < checkStatus.data.length; i++) {
+ if (rowIndex + i >= option.data.length) {
+ var NewRow = {
+ "HMaterID": "0", "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": "0", "璁¢噺鍗曚綅": "", "HQty": "0", "HPrice": "0", "HTaxPrice": "0"
+ , "HMoney": "0", "HDiscountRate": "0", "HRelTaxPrice": "0", "HTaxRate": "0", "HTaxMoney": "0", "HlineTotal": "0", "HlineTotalBB": "0"
+ , "HDate": Format(new Date(), 'yyyy-MM-dd'), "HOutStockQty": "0", "HInvoiceQty": "0", "HRemark": "", "HCusMaterNumber": "",
+ "HCusModel": "", "HCusMaterName": ""
+ }
+ btnAddLine(NewRow);
+ }
+
+ //鑾峰彇閫変腑鐨勭墿鏂欎俊鎭�
+ var resultData = checkStatus.data[i];
+
+ //鏁板�兼牸寮忔牎楠屽伐鍏�
+ var ref = /^\d+(\.\d+)?$/; //闈炶礋鏁版鍒欒〃杈惧紡
+ var temp = "";
+ //鑾峰彇閫夋嫨鐗╂枡鍓嶅悗鐨勭◣鐜�
+ var value = subHTaxRate; //閫夋嫨鐗╂枡鍚庢牴鎹鎴峰緱鍒扮殑绋庣巼
+ var oldText = option.data[rowIndex + i].HTaxRate; //璇ヨ褰曚腑鍘熸湁鐨勭◣鐜�
+
+ //绋庣巼鏁版嵁鏍煎紡鏍¢獙锛岃嫢鏍规嵁瀹㈡埛鑾峰彇鐨勭◣鐜囦笉鍚堟硶锛屽垯浣跨敤璁板綍涓師鏈夌殑绋庣巼锛屽苟鎻愮ず
+ temp = value + "";
+ if (!ref.test(temp)) {
+ value = oldText;
+ layer.msg("鑾峰彇鍒扮殑绋庣巼涓嶅悎娉曪紝宸茶嚜鍔ㄥ彉鏇翠负鍘熸湁绋庣巼!");
+ }
+
+ //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+ var HQty = option.data[rowIndex + i].HQty * 1; //鏁伴噺
+ HQty = Number(HQty.toFixed(HQtyDec));
+ var HTaxRate = value * 0.01; //绋庣巼
+ var HPrice = option.data[rowIndex + i].HPrice * 1; //鍗曚环
+ HPrice = Number(HPrice.toFixed(HPriceDec));
+ var HTaxPrice = HPrice * (1 + HTaxRate) //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+ HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+ var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
+ var HTaxMoney = HMoney * HTaxRate; //绋庨=閲戦*绋庣巼
+ HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+ var HlineTotal = HQty * HTaxPrice; //浠风◣鍚堣=閲戦+绋庨
+ HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+ //鏁板瓧绮惧害
+
+ option.data[rowIndex + i].HMaterID = resultData.HItemID;
+ option.data[rowIndex + i].鐗╂枡浠g爜 = resultData.鐗╂枡浠g爜;
+ option.data[rowIndex + i].鐗╂枡鍚嶇О = resultData.鐗╂枡鍚嶇О;
+ option.data[rowIndex + i].瑙勬牸鍨嬪彿 = resultData.瑙勬牸鍨嬪彿;
+ option.data[rowIndex + i].HUnitID = resultData.HUnitID;
+ option.data[rowIndex + i].璁¢噺鍗曚綅 = resultData.璁¢噺鍗曚綅鍚嶇О;
+
+ option.data[rowIndex + i].HQty = HQty;
+ option.data[rowIndex + i].HPrice = HPrice;
+ option.data[rowIndex + i].HTaxRate = HTaxRate * 100;
+ option.data[rowIndex + i].HTaxPrice = HTaxPrice;
+ option.data[rowIndex + i].HMoney = HMoney;
+ option.data[rowIndex + i].HlineTotal = HlineTotal;
+
+
+ }
+ table.render(option);
+
+ //鍒锋柊琛ㄦ牸鍚屾椂鏍规嵁option涓璈isStockGoods鍊艰缃笅鎷夊垪琛�
+ setSelectHisStockGoodsByTableRender();
+
+ //璁剧疆琛ㄥご鎵�闇�閲戦
+ set_HBillMoney($("#HEarnestRate").val() * 1);
+ }
+
+ }
+ })
}
//#endregion
--
Gitblit v1.9.1