From fc69a1e9655df3e8a01dc36ea2742c99f4a651ed Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 17 一月 2024 13:22:08 +0800
Subject: [PATCH] 特批申请单:数据校验 销售订单:维护页面增加字段 销售出库关联数量、销售出库未关联数量、生产关联数量、生产未关联数量
---
WebTM/views/销售管理/销售订单/Add_Edit_Xs_SeOrderBillList.html | 322 +++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 272 insertions(+), 50 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 8082f6d..74a32ce 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"
@@ -98,6 +98,16 @@
</div>
<div class="layui-row">
<div class="layui-inline">
+ <label class="layui-form-label">瀹㈡埛<label style="color:red"> * </label></label>
+ <div class="layui-input-inline">
+ <input type="text" name="HCusName" id="HCusName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;">
+ <input type="hidden" name="HCusID" id="HCusID" class="layui-input" value="0" style="float:left;width:150px;">
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="HCusList" style="width:40px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+ </button>
+ </div>
+ </div>
+ <div class="layui-inline">
<label class="layui-form-label">閿�鍞竵鍒�<label style="color:red"> * </label></label>
<div class="layui-input-inline">
<input type="text" name="HCurName" id="HCurName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;">
@@ -111,16 +121,6 @@
<label class="layui-form-label">姹囩巼<label style="color:red"> * </label></label>
<div class="layui-input-inline">
<input class="layui-input" name="HExRate" id="HExRate" autocomplete="off" value="0" style="background-color: #efefef4d;" readonly>
- </div>
- </div>
- <div class="layui-inline" style="width:900px;">
- <label class="layui-form-label">瀹㈡埛<label style="color:red"> * </label></label>
- <div class="layui-input-inline" style="width:700px;">
- <input type="text" name="HCusName" id="HCusName" class="layui-input" value="" style="float: left; width: 465px; background-color: #efefef4d;" readonly>
- <input type="hidden" name="HCusID" id="HCusID" class="layui-input" value="0" style="float:left;width:150px;">
- <button type="button" lay-submit="" class="layui-btn" lay-filter="HCusList" style="width:40px;">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
- </button>
</div>
</div>
</div>
@@ -146,24 +146,6 @@
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">鎽樿</label>
- <div class="layui-input-inline">
- <input class="layui-input" name="HExplanation" id="HExplanation" autocomplete="off" style="width: 501px;">
- </div>
- </div>
- </div>
- <div class="layui-row">
- <div class="layui-inline">
- <label class="layui-form-label">閿�鍞富绠�</label>
- <div class="layui-input-inline">
- <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly>
- <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value="0" style="float:left;width:150px;">
- <button type="button" lay-submit="" class="layui-btn" lay-filter="HManagerList" style="width:40px;">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
- </button>
- </div>
- </div>
- <div class="layui-inline">
<label class="layui-form-label">鑱旂郴浜�</label>
<div class="layui-input-inline">
<input class="layui-input" name="HLinkMan" id="HLinkMan" autocomplete="off" value="">
@@ -173,12 +155,6 @@
<label class="layui-form-label">鑱旂郴鐢佃瘽</label>
<div class="layui-input-inline">
<input class="layui-input" name="HLinkPhone" id="HLinkPhone" autocomplete="off" value="">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">鍐呴儴璁㈠崟鍙�</label>
- <div class="layui-input-inline">
- <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" style="background-color: #efefef4d;" autocomplete="off" readonly>
</div>
</div>
</div>
@@ -192,7 +168,7 @@
</div>
<div class="layui-row">
<div class="layui-inline">
- <label class="layui-form-label">瀹㈡埛浣欓</label>
+ <label class="layui-form-label">瀹㈡埛浣欓<i class="layui-icon layui-icon-tips" id="tips-HCusBalance"></i></label>
<div class="layui-input-inline">
<input class="layui-input" name="HCusBalance" id="HCusBalance" autocomplete="off" readonly>
</div>
@@ -204,9 +180,15 @@
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">鍙敤棰濆害</label>
+ <label class="layui-form-label">鍙敤棰濆害<i class="layui-icon layui-icon-tips" id="tips-HAvailableBalance"></i></label>
<div class="layui-input-inline">
<input class="layui-input" name="HAvailableBalance" id="HAvailableBalance" autocomplete="off" readonly>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">闇�姹傞噾棰�<i class="layui-icon layui-icon-tips" id="tips-HBillMoney"></i></label>
+ <div class="layui-input-inline">
+ <input class="layui-input" name="HBillMoney" id="HBillMoney" autocomplete="off" readonly>
</div>
</div>
</div>
@@ -222,6 +204,30 @@
</div>
<!--闅愯棌瀛楁锛氭殏鏃舵病鏈夌敤澶�-->
+ <div class="layui-row" style="display:none;">
+ <div class="layui-inline">
+ <label class="layui-form-label">閿�鍞富绠�</label>
+ <div class="layui-input-inline">
+ <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly>
+ <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value="0" style="float:left;width:150px;">
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="HManagerList" style="width:40px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+ </button>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鍐呴儴璁㈠崟鍙�</label>
+ <div class="layui-input-inline">
+ <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" style="background-color: #efefef4d;" autocomplete="off" readonly>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鎽樿</label>
+ <div class="layui-input-inline">
+ <input class="layui-input" name="HExplanation" id="HExplanation" autocomplete="off" style="width: 501px;">
+ </div>
+ </div>
+ </div>
<div class="layui-row" style="display:none;">
<div class="layui-inline">
<label class="layui-form-label">缁撶畻鏃ユ湡</label>
@@ -538,6 +544,9 @@
"HMaterID": "0",
"鐗╂枡浠g爜": "",
"鐗╂枡鍚嶇О": "",
+ "HItemID": "0",
+ "璁㈠崟绛夌骇浠g爜": "",
+ "璁㈠崟绛夌骇鍚嶇О": "",
"瑙勬牸鍨嬪彿": "",
"HUnitID": "0",
"璁¢噺鍗曚綅": "",
@@ -643,7 +652,13 @@
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);
+ HlineTotal = dealDoubleToFixed(HlineTotal, 2);
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
@@ -655,6 +670,8 @@
, HlineTotal: HlineTotal
});
table.render(option);
+ //璁剧疆琛ㄥご鎵�闇�閲戦
+ set_HBillMoney();
break;
case "HPrice": //鍗曚环
//鏁版嵁鏍煎紡鏍¢獙
@@ -683,7 +700,13 @@
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);
+ HlineTotal = dealDoubleToFixed(HlineTotal, 2);
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
@@ -695,6 +718,8 @@
, HlineTotal: HlineTotal
});
table.render(option);
+ //璁剧疆琛ㄥご鎵�闇�閲戦
+ set_HBillMoney();
break;
case "HTaxRate": //鏁伴噺
//鏁版嵁鏍煎紡鏍¢獙
@@ -723,7 +748,13 @@
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);
+ HlineTotal = dealDoubleToFixed(HlineTotal, 2);
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
@@ -735,6 +766,8 @@
, HlineTotal: HlineTotal
});
table.render(option);
+ //璁剧疆琛ㄥご鎵�闇�閲戦
+ set_HBillMoney();
break;
case "HTaxPrice": //鏁伴噺
//鏁版嵁鏍煎紡鏍¢獙
@@ -763,7 +796,13 @@
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);
+ HlineTotal = dealDoubleToFixed(HlineTotal, 2);
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
@@ -775,11 +814,38 @@
, HlineTotal: HlineTotal
});
table.render(option);
+ //璁剧疆琛ㄥご鎵�闇�閲戦
+ set_HBillMoney();
break;
default:
}
});
//#endregion
+ //#endregion
+
+ //#region 鏂囨湰妗嗙洃鍚�
+ $(document).ready(function () {
+ //#region 瀹㈡埛浣欓鎻愮ず淇℃伅
+ $("#tips-HCusBalance").on('click', function (data) {
+ var tips_Message = "瀹㈡埛浣欓 = 鏈熷垵+鏈湡鏀舵锛堝凡瀹℃牳锛�-鏈湡閫�娆撅紙宸插鏍革級-鏈湡鍑哄簱锛堝凡瀹℃牳锛�+鏈湡閫�璐э紙宸插鏍革級";
+ layer.alert(tips_Message, { icon: 0, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ });
+ //#endregion
+
+ //#region 鍙敤浣欓鎻愮ず淇℃伅
+ $("#tips-HAvailableBalance").on('click', function (data) {
+ var tips_Message = "鍙敤棰濆害 = 瀹㈡埛浣欓 + 淇$敤棰濆害 - 锛堟湰鏈熼攢鍞鍗曟�婚噾棰� * 0.5锛�";
+ layer.alert(tips_Message, { icon: 0, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ });
+ //#endregion
+
+ //#region 闇�姹傞噾棰�
+ $("#tips-HBillMoney").on('click', function (data) {
+ var tips_Message = "闇�姹傞噾棰� = 浠风◣鍚堣 * 0.5";
+ layer.alert(tips_Message, { icon: 0, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ });
+ //#endregion
+ });
//#endregion
//#endregion
@@ -889,24 +955,28 @@
option = {
elem: '#mainTable'
, toolbar: '#toolbarDemo'
+ , totalRow: true
, limit: 500
, height: 500
, loading: false
, cols: [[ //瀛愯〃
{ type: 'checkbox', totalRowText: '鍚堣琛�', style: 'background-color:#efefef4d;' }
- , { type: 'numbers', title: '搴忓彿', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
+ , { type: 'numbers', title: '搴忓彿', width: 100, style: 'background-color:#efefef4d;' }
, { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
, { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
, { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 150, style: 'background-color:#efefef4d;' }
+ , { field: 'HOrderLevID', title: 'HOrderLevID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
+ , { field: '璁㈠崟绛夌骇浠g爜', title: '璁㈠崟绛夌骇浠g爜', width: 150, edit: 'text', event: "HOrderLevID" }//f7
+ , { field: '璁㈠崟绛夌骇鍚嶇О', title: '璁㈠崟绛夌骇鍚嶇О', width: 150, style: 'background-color:#efefef4d;' }
, { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100, style: 'background-color:#efefef4d;' }
, { field: 'HUnitID', title: 'HUnitID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
, { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100, style: 'background-color:#efefef4d;' }//f7
- , { field: 'HQty', title: '鏁伴噺', width: 100, edit: 'text' }
+ , { field: 'HQty', title: '鏁伴噺', width: 100, totalRow: true, edit: 'text' }
, { field: 'HPrice', title: '鍗曚环', width: 100, edit: 'text' }
, { field: 'HTaxRate', title: '绋庣巼', width: 100, edit: 'text' }
, { field: 'HTaxPrice', title: '鍚◣鍗曚环', width: 100, edit: 'text' }
- , { field: 'HMoney', title: '閲戦', width: 100, style: 'background-color:#efefef4d;' }
- , { field: 'HlineTotal', title: '浠风◣鍚堣', width: 100, style: 'background-color:#efefef4d;' }
+ , { field: 'HMoney', title: '閲戦', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
+ , { field: 'HlineTotal', title: '浠风◣鍚堣', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
, { field: 'HDate', title: '浜よ揣鏃ユ湡', event: "HDate", width: 120 }
, { field: 'HRemark', title: '澶囨敞', width: 100, edit: 'text' }
@@ -925,6 +995,9 @@
"HMaterID": "0",
"鐗╂枡浠g爜": "",
"鐗╂枡鍚嶇О": "",
+ "HOrderLevID": "0",
+ "璁㈠崟绛夌骇浠g爜": "",
+ "璁㈠崟绛夌骇鍚嶇О": "",
"瑙勬牸鍨嬪彿": "",
"HUnitID": "0",
"璁¢噺鍗曚綅": "",
@@ -946,6 +1019,9 @@
option.data = rowdata;
table.render(option);
+
+ //璁剧疆琛ㄥご鎵�闇�閲戦
+ set_HBillMoney();
}
//#endregion
@@ -1042,18 +1118,21 @@
"HMaterID": result.data[i]["HMaterID"],
"鐗╂枡浠g爜": result.data[i]["鐗╂枡浠g爜"],
"鐗╂枡鍚嶇О": result.data[i]["鐗╂枡鍚嶇О"],
+ "HOrderLevID": result.data[i]["HOrderLevID"],
+ "璁㈠崟绛夌骇浠g爜": result.data[i]["璁㈠崟绛夌骇浠g爜"],
+ "璁㈠崟绛夌骇鍚嶇О": result.data[i]["璁㈠崟绛夌骇鍚嶇О"],
"瑙勬牸鍨嬪彿": result.data[i]["瑙勬牸鍨嬪彿"],
"HUnitID": result.data[i]["HUnitID"],
"璁¢噺鍗曚綅": result.data[i]["璁¢噺鍗曚綅"],
- "HQty": result.data[i]["鏁伴噺"],
- "HPrice": result.data[i]["鍗曚环"],
- "HTaxPrice": result.data[i]["鍚◣鍗曚环"],
- "HMoney": result.data[i]["閲戦"],
+ "HQty": dealDoubleToFixed(result.data[i]["鏁伴噺"], 1),
+ "HPrice": dealDoubleToFixed(result.data[i]["鍗曚环"], 3),
+ "HTaxPrice": dealDoubleToFixed(result.data[i]["鍚◣鍗曚环"], 3),
+ "HMoney": dealDoubleToFixed(result.data[i]["閲戦"],2),
"HDiscountRate": result.data[i]["鎶樻墸鐜�"],
"HRelTaxPrice": result.data[i]["瀹為檯鍚◣鍗曚环"],
"HTaxRate": result.data[i]["绋庣巼"],
"HTaxMoney": result.data[i]["绋庨"],
- "HlineTotal": result.data[i]["浠风◣鍚堣"],
+ "HlineTotal": dealDoubleToFixed(result.data[i]["浠风◣鍚堣"],2),
"HlineTotalBB": result.data[i]["鏈綅甯佷环绋庡悎璁�"],
"HDate": formatDate(result.data[i]["浜よ揣鏃ユ湡"]),
"HOutStockQty": result.data[i]["鍑哄簱鏁伴噺"],
@@ -1069,6 +1148,9 @@
option.cols[0][20].edit = null;
table.render(option);
+
+ //璁剧疆琛ㄥご鎵�闇�閲戦
+ set_HBillMoney();
layer.close(ajaxLoad);
} else {
layer.close(ajaxLoad);
@@ -1573,6 +1655,8 @@
table.cache["mainTable"].push(NewRow);
option.data = table.cache["mainTable"];
table.render(option);
+ //璁剧疆琛ㄥご鎵�闇�閲戦
+ set_HBillMoney();
//rows++;
layer.msg('澧炲姞涓�琛屾寜閽紒')
}
@@ -1594,6 +1678,8 @@
}
option.data = tables;
table.render(option);
+ //璁剧疆琛ㄥご鎵�闇�閲戦
+ set_HBillMoney();
} else {
layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
}
@@ -1618,6 +1704,8 @@
option.data[option.data.length - 1].HWeight = "0";
table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
+ //璁剧疆琛ㄥご鎵�闇�閲戦
+ set_HBillMoney();
}
}
//#endregion
@@ -1642,6 +1730,8 @@
option.data[i - 1] = data[0];
option.data[i] = tables[0];
table.render(option);
+ //璁剧疆琛ㄥご鎵�闇�閲戦
+ set_HBillMoney();
break;
}
}
@@ -1673,6 +1763,8 @@
option.data[i + 1] = data[0];
option.data[i] = tables[0];
table.render(option);
+ //璁剧疆琛ㄥご鎵�闇�閲戦
+ set_HBillMoney();
break;
}
}
@@ -1698,6 +1790,8 @@
oldData.splice(obj.tr.data('index'), 1);
option.data = oldData;
table.render(option);
+ //璁剧疆琛ㄥご鎵�闇�閲戦
+ set_HBillMoney();
layer.close(index);
}
});
@@ -1711,6 +1805,8 @@
if (event.key == "F7") {
//鐗╂枡
if (obj.event == "HMaterID") {
+ var HOrgID = $("#HOrgID").val();
+
layer.open({
type: 2
, skin: "layui-layer-rim" //鍔犱笂杈规
@@ -1719,7 +1815,7 @@
, shift: 2 //寮瑰嚭鍔ㄧ敾
, area: ["90%", "90%"] //绐椾綋澶у皬
, maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
- , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html', 'yes']
+ , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html?openType=2&HOrgID=' + HOrgID, 'yes']
, btn: ["纭畾", "鍙栨秷"]
, btn1: function (index, laero) {
//鎸夐挳涓� 鐨勫洖璋�
@@ -1788,6 +1884,8 @@
}
table.render(option);
+ //璁剧疆琛ㄥご鎵�闇�閲戦
+ set_HBillMoney();
layer.close(index);//鍏抽棴寮圭獥
}
@@ -1822,6 +1920,37 @@
}
})
}
+ //璁㈠崟绛夌骇
+ if (obj.event == "HOrderLevID") {
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "璁㈠崟绛夌骇鍒楄〃" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["90%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_OrderLev.html', 'yes']
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鎸夐挳涓� 鐨勫洖璋�
+ var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+
+ if (checkStatus.data.length != 1) {
+ return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
+ }
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ "璁㈠崟绛夌骇鍚嶇О": checkStatus.data[0].璁㈠崟绛夌骇
+ , "璁㈠崟绛夌骇浠g爜": checkStatus.data[0].璁㈠崟绛夌骇浠g爜
+ , "HOrderLevID": checkStatus.data[0].HItemID
+ })
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
obj.event = "";
return false;
}
@@ -1986,6 +2115,24 @@
//#region 鎵撳嵃
function get_PrintReport() {
+ //#region 鍒ゆ柇婧愬崟鐘舵��
+ var HSourceBillData = "";
+ var HSourceBillData = getSourceBillStatus_SeOrderBill(); //鑾峰彇婧愬崟鏁版嵁
+ if (HSourceBillData != "none") {
+ if (HSourceBillData.length == 0) {
+ layer.alert("鎵撳嵃澶辫触!鏈煡璇㈠埌鍗曟嵁淇℃伅!", { icon: 5 });
+ return;
+ } else if (HSourceBillData[0]["鐘舵��"] != "宸插鏍�") {
+ layer.alert("鎵撳嵃澶辫触!鍗曟嵁鐘舵�佹湭涓�'宸插鏍�'鐘舵��!", { icon: 5 });
+ return;
+ }
+ } else {
+ return;
+ }
+ //#endregion
+
+
+
var InterID = $("#HInterID").val();
$.ajax({
type: "GET",
@@ -2010,6 +2157,39 @@
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
});
+ }
+ //#endregion
+
+ //#region 璁剧疆琛ㄥご鎵�闇�閲戦
+ function set_HBillMoney() {
+ var HBillMoney = 0;
+ for (var i = 0; i < option.data.length; i++) {
+ HBillMoney += option.data[i]["HlineTotal"] * 1;
+ }
+ $("#HBillMoney").val(HBillMoney * 0.5);
+ }
+ //#endregion
+
+ //#region 鑾峰彇婧愬崟-閿�鍞鍗曞崟鎹姸鎬�
+ function getSourceBillStatus_SeOrderBill() {
+ var HSourceBillData = "none";
+ var sWhere = " and hmainid = " + $("#HInterID").val();
+ $.ajax({
+ url: GetWEBURL() + '/Xs_SeOrderBill/list',
+ async: false,
+ type: "GET",
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ HSourceBillData = data1.data;
+ } else {
+ layer.alert(data1.code + "鍗曟嵁鐘舵�佸垽鏂け璐ワ紒", { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ return HSourceBillData;
}
//#endregion
//#endregion
@@ -2053,6 +2233,12 @@
{
$("#HSSName").val(obj[0].HName);
$("#HSSID").val(obj[0].HItemID);
+ }
+
+ function GetSellStyleValue(obj) //杩斿洖閿�鍞柟寮�
+ {
+ $("#HSellSName").val(obj[0].HName);
+ $("#HSellSID").val(obj[0].HItemID);
}
//#region 鏍规嵁瀹㈡埛鑾峰彇甯佸埆銆佹眹鐜囥�佺粨绠楁柟寮忋�佸鎴蜂俊鐢ㄩ搴︺�佽仈绯讳汉銆佽仈绯荤數璇�
@@ -2140,6 +2326,42 @@
});
}
//#endregion
+
+ //#region 澶勭悊灏忔暟鏄剧ず浣嶆暟锛坉ata锛氶渶瑕佸鐞嗙殑鏁版嵁锛沶um锛氭暟鎹殑绫诲瀷(濡�1:鏁伴噺锛�2:閲戦锛�3:鍗曚环)锛�
+ function dealDoubleToFixed(data, num) {
+ //鐢ㄤ簬璁剧疆灏忔暟浣嶆暟
+ var dotLength = 0;
+
+ if (num == 1) { //褰撴暟鎹负鏁伴噺鏃讹紝鏈�澶氫繚鐣�6浣嶅皬鏁�
+ //璁剧疆鏈�澶氫繚鐣�6浣嶅皬鏁�
+ dotLength = 6;
+ } else if (num == 2) { //褰撴暟鎹负閲戦鏃讹紝鏈�澶氫繚鐣�2浣嶅皬鏁�
+ //璁剧疆鏈�澶氫繚鐣�2浣嶅皬鏁�
+ dotLength = 2;
+ } else if (num == 3) { //褰撴暟鎹负鍗曚环鏃讹紝鏈�澶氫繚鐣�4浣嶅皬鏁�
+ //璁剧疆鏈�澶氫繚鐣�4浣嶅皬鏁�
+ dotLength = 4;
+ }
+
+ //鍒ゆ柇鏄惁瀛樺湪灏忔暟鐐瑰強鍏剁储寮曚綅缃�
+ data = data + "";
+ var index = data.indexOf(".");
+
+ //澶勭悊鏁版嵁骞惰繑鍥�
+ if (index < 0) {
+ return data * 1;
+ } else {
+ //鑾峰彇灏忔暟浣嶆暟
+ var length = data.length - index - 1;
+ if (length <= dotLength) {
+ return data * 1;
+ } else {
+ data = data * 1;
+ return data.toFixed(dotLength);
+ }
+ }
+ }
+ //#endregion
</script>
</body>
</html>
\ No newline at end of file
--
Gitblit v1.9.1