From 7df042662e1929abdd667cfd7b037f4e10e8c2ad Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期四, 14 三月 2024 11:27:56 +0800
Subject: [PATCH] 其他应付单 增加子表保存,目录放到采购管理,其他入库单编辑模块 并完善 其他出库单 列表功能;( 常规 功能, 新增,修改,删除,审核,作废,关闭,自定义过滤,源单类型列表(源单 手工录入), 合计行,保存控制,审核控制,删除控制,关联数回填 等等 ) (注: 基础资料选择, 均用 基础资料列表 的方式)
---
WebTM/views/验收入库/外购入库/Add_Edit_Kf_POStockInBillList.html | 332 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 315 insertions(+), 17 deletions(-)
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Add_Edit_Kf_POStockInBillList.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Add_Edit_Kf_POStockInBillList.html"
index dc61b11..b63fddf 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Add_Edit_Kf_POStockInBillList.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Add_Edit_Kf_POStockInBillList.html"
@@ -15,6 +15,7 @@
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
<script src="../../../layuiadmin/PubCustom.js"></script>
<script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <script src="../../../layuiadmin/PageTitle.js"></script>
<style type="text/css">
/*begin 姝ゆ牱寮忕敤浜庢秷闄よ鍏冪礌涓竷灞�瀹藉害涓嶅鐨勯棶棰�*/
.layui-form-item .layui-inline {
@@ -156,14 +157,24 @@
<div class="layui-col-xs4 layui-inline">
<label class="layui-form-label">婧愬崟绫诲瀷</label>
<div class="layui-input-inline">
- <input class="layui-input" name="HSourceBillType" id="HSourceBillType" value="0">
+ <select name="HSourceBillType" id="HSourceBillType" lay-verify="HSourceBillType">
+ <!--鍔ㄦ�佹覆鏌撴簮鍗曠被鍨�-->
+ </select>
</div>
</div>
<div class="layui-col-xs4 layui-inline">
<label class="layui-form-label">閫夊崟鍙�</label>
<div class="layui-input-inline">
- <input class="layui-input" name="Box2" id="Box2" autocomplete="off">
+ <input type="text" name="" id="" class="layui-input" value="" style="float:left;width:150px;">
+
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="XDHList" id="XDHList" style="width:40px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+ </button>
</div>
+ <!--<label class="layui-form-label">閫夊崟鍙�</label>
+ <div class="layui-input-inline">
+ <input class="layui-input" name="Box2" id="Box2" autocomplete="off">
+ </div>-->
</div>
<div class="layui-col-xs4 layui-inline">
<label class="layui-form-label">璐熻矗浜�</label>
@@ -249,7 +260,7 @@
<input type="text" class="layui-input" name="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly>
</div>
</div>
- <div class="layui-inline">
+ <div class="layui-inline" >
<label class="layui-form-label" style="width: 85px;">鍏抽棴鏃ユ湡</label>
<div class="layui-input-block" style="margin-left: 120px;">
<input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
@@ -324,7 +335,17 @@
//鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
get_LoginIs();
+
+ //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+ var HModuleType = "1201";
+ //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+ var HPageTitle = get_PageTitle(HModuleType) == "" ? $("h1").html() : get_PageTitle(HModuleType);
+ $("h1").html('<b>' + HPageTitle + '</b>');
+ //#endregion
+
Organ();//鏄剧ず缁勭粐
+ //鑾峰彇婧愬崟绫诲瀷
+ HSourceBillType();
//鑾峰彇椤甸潰璺宠浆鍙傛暟
var params = get_UrlVars();
var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷 1娣诲姞 淇濆瓨 2澶嶅埗 3 缂栬緫
@@ -394,7 +415,8 @@
"HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HAuxPropID": 0, "鐗╂枡杈呭姪灞炴��": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQtyMust": "", "HQty": "", "HRemark": "",
"HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
"HSPID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
- "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": ""
+ "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
+ "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
}];
// 鍒濆鍖栫晫
set_InitGrid();
@@ -408,7 +430,8 @@
"HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HAuxPropID": 0, "鐗╂枡杈呭姪灞炴��": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQtyMust": "", "HQty": "", "HRemark": "",
"HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
"HSPID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
- "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": ""
+ "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
+ "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
};
switch (obj.event) {
case 'btn-AddLine':
@@ -515,6 +538,112 @@
//#endregion
+ //#region 鐩戝惉鍗曞厓鏍肩紪杈� 鍗曞厓鏍肩紪杈戝悗 鍙樻洿
+ table.on('edit(mainTable)', function (obj) {
+ //鏁板�兼牸寮忔牎楠屽伐鍏�
+ var ref = /^\d+(\.\d+)?$/; //闈炶礋鏁版鍒欒〃杈惧紡
+ var temp = "";
+
+ // 鍗曞厓鏍肩紪杈戜箣鍓嶇殑鍊�
+ var oldText = $(this).prev().text();
+ var value = obj.value //寰楀埌淇敼鍚庣殑鍊�
+ , data = obj.data //寰楀埌鎵�鍦ㄨ鎵�鏈夐敭鍊�
+ , field = obj.field; //寰楀埌瀛楁
+
+ switch (field) {
+ case "HQty": //鏁伴噺
+ //鏁版嵁鏍煎紡鏍¢獙
+ temp = value + "";
+ if (!ref.test(temp) || temp == 0) {
+ //鎭㈠鏁版嵁鍒扮紪杈戝墠
+ obj.update({
+ HQty: oldText
+ });
+ table.render(option);
+
+ layer.msg("鏁伴噺璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
+ return;
+ }
+
+
+ //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+ var HQty = value * 1; //鏁伴噺
+ var HPrice = obj.data.HPrice * 1; //鍗曚环
+ var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
+
+
+
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HQty: HQty
+ , HPrice: HPrice
+ , HMoney: HMoney
+ });
+ /* table.render(option);*/
+ break;
+ case "HPrice": //鍗曚环
+ //鏁版嵁鏍煎紡鏍¢獙
+ temp = value + "";
+ if (!ref.test(temp) || temp == 0) {
+ //鎭㈠鏁版嵁鍒扮紪杈戝墠
+ obj.update({
+ HPrice: oldText
+ });
+ /* table.render(option);*/
+
+ layer.msg("鍗曚环璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
+ return;
+ }
+
+ //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+ var HQty = obj.data.HQty * 1; //鏁伴噺
+ var HPrice = value * 1;
+ var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
+
+
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HQty: HQty
+ , HPrice: HPrice
+ , HMoney: HMoney
+ });
+ break;
+ case "HMoney": //閲戦
+ //鏁版嵁鏍煎紡鏍¢獙
+ temp = value + "";
+ if (!ref.test(temp) || temp == 0) {
+ //鎭㈠鏁版嵁鍒扮紪杈戝墠
+ obj.update({
+ HMoney: oldText
+ });
+ /* table.render(option);*/
+
+ layer.msg("閲戦璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
+ return;
+ }
+
+ //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+ var HQty = obj.data.HQty * 1; //鏁伴噺
+ var HMoney = value * 1;
+ var HPrice = (HMoney / HQty).toFixed(2); //鍗曚环=閲戦/鏁伴噺
+
+
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HQty: HQty
+ , HPrice: HPrice
+ , HMoney: HMoney
+ });
+ break;
+ table.render(option);
+ default:
+ }
+ });
+ //#endregion
+ //#endregion
+ //#endregion
+
+
//#region 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉�
//#region 鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
@@ -564,7 +693,7 @@
}
-
+ //瀛愯〃
function set_InitGrid() {
option = {
@@ -573,9 +702,14 @@
, limit: 500
, height: 500
, loading: false
+ , totalRow: true
, cols: [[ //瀛愯〃
{ type: 'checkbox', totalRowText: '鍚堣琛�' }
- , { type: 'numbers', title: '搴忓彿', width: 100, totalRow: true }
+ , { type: 'numbers', title: '搴忓彿', width: 100 }
+ , { type: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true }//婧愬崟鍙�
+ , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100, hide: true }//婧愬崟绫诲瀷
+ , { type: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }//婧愬崟涓诲唴鐮�
+ , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100, hide: true }//婧愬崟瀛愬唴鐮�
, { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
, { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
, { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 150, }
@@ -584,11 +718,11 @@
, { field: '鐗╂枡杈呭姪灞炴��', title: '鐗╂枡杈呭姪灞炴��', width: 150, edit: 'text'}//f7
, { field: 'HUnitID', title: 'HUnitID', width: 100, hide: true }
, { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100, edit: 'text', event: "HUnitID" }//f7
- , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, edit: 'text'}
- , { field: 'HQty', title: '瀹炴敹鏁伴噺', width: 150, edit: 'text'}
+ , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, edit: 'text', totalRow: true}
+ , { field: 'HQty', title: '瀹炴敹鏁伴噺', width: 150, edit: 'text', totalRow: true}
, { field: 'HPrice', title: '鍗曚环', width: 100, edit: 'text' }
- , { field: 'HMoney', title: '閲戦', width: 100, edit: 'text' }
- , { field: 'HOrderPrice', title: '閲囪喘閲戦', width: 100, edit: 'text' }
+ , { field: 'HMoney', title: '閲戦', width: 100, edit: 'text', totalRow: true }
+ , { field: 'HOrderPrice', title: '閲囪喘閲戦', width: 100, edit: 'text', totalRow: true}
, { field: 'HWHID ', title: 'HWHID ', width: 100, hide: true }
, { field: '鏀舵枡浠撳簱', title: '鏀舵枡浠撳簱', width: 100, edit: 'text', event: "HWHID" }//f7
, { field: 'HSPID', title: 'HSPID', width: 100, hide: true }
@@ -598,8 +732,8 @@
, { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
]]
}
-
- option.data = rowdata;
+
+ option.data = [];
table.render(option);
}
@@ -637,7 +771,7 @@
, "HManagerID": data.HManagerID
, "HManagerName": data.璐熻矗浜�
, "HExRate": data.姹囩巼
- , "Box2": ""
+ //, "Box2": ""
, "HRemark": data.琛ㄥご澶囨敞
, "HMaker": data.鍒跺崟浜�
, "HChecker": data.瀹℃牳浜�
@@ -657,7 +791,11 @@
{
"HMaterID": subdata[i].HMaterID, "鐗╂枡浠g爜": subdata[i].鐗╂枡浠g爜, "鐗╂枡鍚嶇О": subdata[i].鐗╂枡鍚嶇О, "瑙勬牸鍨嬪彿": subdata[i].瑙勬牸鍨嬪彿, "HAuxPropID": subdata[i].HAuxPropID, "鐗╂枡杈呭姪灞炴��": subdata[i].鐗╂枡杈呭姪灞炴��, "HUnitID": subdata[i].HUnitID, "璁¢噺鍗曚綅": subdata[i].璁¢噺鍗曚綅,
"HQtyMust": subdata[i].搴旀敹鏁伴噺, "HQty": subdata[i].瀹炴敹鏁伴噺, "HRemark": subdata[i].琛ㄤ綋澶囨敞, "HPrice": subdata[i].鍗曚环, "HMoney": subdata[i].閲戦, "HOrderPrice": subdata[i].閲囪喘閲戦, "HWHID": subdata[i].HWHID, "鏀舵枡浠撳簱": subdata[i].鏀舵枡浠撳簱, "HSPID": subdata[i].HSPID, "浠撲綅鍚嶇О": subdata[i].浠撲綅鍚嶇О,
- "HBatchNo": subdata[i].鎵规
+ "HBatchNo": subdata[i].鎵规,
+ "HSourceBillNo": subdata[i].婧愬崟鍗曞彿, //婧愬崟鍙�
+ "HSourceBillType": subdata[i].婧愬崟绫诲瀷, //婧愬崟绫诲瀷
+ "HSourceInterID": subdata[i].婧愬崟涓诲唴鐮�, //婧愬崟涓诲唴鐮�
+ "HSourceEntryID": subdata[i].婧愬崟瀛愬唴鐮� //婧愬崟瀛愬唴鐮�
}
)
}
@@ -720,6 +858,7 @@
return;
}
+
var num = [];
for (var i = 0; i < table.cache["mainTable"].length; i++) {
if (table.cache["mainTable"][i] != "") {
@@ -727,6 +866,25 @@
num.push(table.cache["mainTable"][i])
}
}
+
+ checkDuplicateData(num);
+ const duplicateRows = checkDuplicateData(num);
+ if (duplicateRows.length > 0) {
+ let message = '琛ㄦ牸涓瓨鍦ㄩ噸澶嶆暟鎹紝閲嶅琛屾暟涓猴細';
+
+ for (let i = 0; i < duplicateRows.length; i++) {
+ const { row1, row2 } = duplicateRows[i];
+ message += `绗�${row1}琛屼笌绗�${row2}琛岀浉鍚宍;
+
+ if (i !== duplicateRows.length - 1) {
+ message += '锛�';
+ }
+ }
+
+ message += '锛岃鍒犻櫎鍏朵腑涓�琛�';
+ layer.alert(message);
+ }
+
var sMainStr = JSON.stringify(data.field);
var sSubStr = JSON.stringify(num);
@@ -953,7 +1111,8 @@
"HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HAuxPropID": 0, "鐗╂枡杈呭姪灞炴��": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQtyMust": "", "HQty": "", "HRemark": "",
"HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
"HSPID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
- "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": ""
+ "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
+ "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
};
table.cache["mainTable"].push(NewRow);
@@ -1085,8 +1244,123 @@
}
})
}
-
+ //琛屽唴浜嬩欢
+ table.on('tool(mainTable)', function (obj) {
+ set_GridDelete(obj); //琛屽唴鍒犻櫎
+ set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
+
+ });
+
+ //鍔ㄦ�佸脊鍑洪〉闈�
+ function getSupType() {
+ var type = $("#HSourceBillType").val();
+ switch (type) {
+ case '1102':
+ return { url: "../../閲囪喘绠$悊/閲囪喘璁㈠崟/Cg_POOrderBillList.html", name: "閲囪喘璁㈠崟" };
+ break;
+ case '1103':
+ return { url: "../../閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Cg_POInStockBillList.html", name: "鏀舵枡閫氱煡鍗�" };
+ break;
+ }
+ }
+
+ //琛ㄥご淇℃伅閫夋嫨鍗曟嵁寮圭獥
+ form.on('submit(XDHList)', function () {
+
+ if ($("#HSourceBillType").val() == 0 || $("#HSourceBillType").val() == null) {
+ return layer.msg('璇烽�夋嫨鍗曟嵁绫诲瀷');
+ }
+ var url = getSupType().url;
+ url = encodeURI(url);
+
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: '' + getSupType().name + '鍒楄〃' //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["90%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: [url, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鎸夐挳涓� 鐨勫洖璋�
+ var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+
+ if (checkStatus.data.length == 0) {
+ return layer.msg("璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�!");
+ }
+ layer.alert("浣犲凡閫夋嫨" + checkStatus.data.length + "鏉℃暟鎹�");
+ //鑾峰彇鏀舵枡閫氱煡鍗曚唬鐮�
+ var ProcessNumber = [];
+ for (var i = 0; i < checkStatus.data.length; i++) {
+ ProcessNumber.push(checkStatus.data[i]);
+ }
+
+ //鑾峰彇褰撳墠浣嶇疆鎵�鍦ㄨ鏁�
+ var NowNum = 0;
+ NowNum = option.data.length;
+
+ if (getSupType().name == "閲囪喘璁㈠崟") {
+ var j = 0;
+ for (var i = 0; i < checkStatus.data.length; i++) {
+ option.data.push({
+ "HMaterID": checkStatus.data[j].HMaterID, "鐗╂枡浠g爜": checkStatus.data[j].鐗╂枡浠g爜, "鐗╂枡鍚嶇О": checkStatus.data[j].鐗╂枡鍚嶇О, "瑙勬牸鍨嬪彿": checkStatus.data[j].瑙勬牸鍨嬪彿,
+ "HUnitID": checkStatus.data[j].HUnitID, "璁¢噺鍗曚綅": checkStatus.data[j].璁¢噺鍗曚綅,
+ "HQty": checkStatus.data[j].鏁伴噺, "HPrice": checkStatus.data[j].鍗曚环,
+ "HMoney": checkStatus.data[j].閲戦,
+ "HSourceBillNo": checkStatus.data[j].鍗曟嵁鍙�, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid,
+ })
+ j++;
+ }
+ table.render(option);
+ layer.close(index);
+ } else if (getSupType().name =="鏀舵枡閫氱煡鍗�") {
+ var j = 0;
+ for (var i = 0; i < ProcessNumber.length; i++) {
+ option.data.push({
+ "HMaterID": checkStatus.data[j].HMaterID, "鐗╂枡浠g爜": checkStatus.data[j].鐗╂枡浠g爜, "鐗╂枡鍚嶇О": checkStatus.data[j].鐗╂枡鍚嶇О, "瑙勬牸鍨嬪彿": checkStatus.data[j].瑙勬牸鍨嬪彿,
+ " ": 0, "鐗╂枡杈呭姪灞炴��": "", "HUnitID": checkStatus.data[j].HUnitID, "璁¢噺鍗曚綅": checkStatus.data[j].璁¢噺鍗曚綅, "HQtyMust": "", "HQty": checkStatus.data[j].鏁伴噺, "HRemark": "",
+ "HPrice": checkStatus.data[j].鍗曚环, "HMoney": checkStatus.data[j].閲戦, "HOrderPrice": "0", "HWHID": checkStatus.data[j].HWHID, "鏀舵枡浠撳簱": checkStatus.data[j].鏀舵枡浠撳簱,
+ "HSPID": checkStatus.data[j].HSPID, "浠撲綅鍚嶇О": checkStatus.data[j].浠撲綅鍚嶇О, "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
+ "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
+ "HSourceBillNo": checkStatus.data[j].鍗曟嵁鍙�, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid,
+ })
+ j++;
+ }
+ table.render(option);
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+
+ }
+
+ });
+ });
+ //鍒ゆ柇鎵�閫夌潃涓庤〃鏍兼槸鍚︽湁閲嶅鏁版嵁
+ function checkDuplicateData(data) {
+ const duplicates = [];
+
+ for (let i = 0; i < data.length; i++) {
+ const currentItem = data[i];
+ let isDuplicate = false;
+
+ for (let j = i + 1; j < data.length; j++) {
+ const compareItem = data[j];
+
+ if (currentItem.HSourceInterID === compareItem.HSourceInterID && currentItem.HSourceEntryID === compareItem.HSourceEntryID) {
+ isDuplicate = true;
+ duplicates.push({ row1: i + 1, row2: j + 1 }); // 璁板綍閲嶅鏁版嵁鎵�鍦ㄨ鏁�
+ }
+ }
+ if (isDuplicate && !duplicates.some(item => item.row1 === i + 1)) {
+ duplicates.push({ row1: i + 1, row2: -1 }); // 璁板綍閲嶅鏁版嵁鎵�鍦ㄨ鏁帮紝-1 琛ㄧず鏈壘鍒颁笌褰撳墠琛岄噸澶嶇殑琛�
+ }
+ }
+ return duplicates;
+ }
//琛屽唴鍒犻櫎
function set_GridDelete(obj) {
var data = obj.data;
@@ -1138,6 +1412,30 @@
}
//#endregion
+ //#region 鑾峰彇婧愬崟绫诲瀷
+ function HSourceBillType() {
+ var HName = '閲囪喘鍏ュ簱鍗�';
+ //鑾峰彇鐧诲綍椤电粍缁囧垪
+ $.ajax({
+ type: "get",
+ async: false,
+ data: { "HName": HName },
+ url: GetWEBURL() + "/Web/GetHSourceBillType",
+ success: function (result) {
+ var HSourceBillTypes = "";
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ HSourceBillTypes += '<option style="color:blue;" value="' + data[i].HSourceBillType + '">' + data[i].HSourceBillTypeName + '</option>';
+ }
+ $("#HSourceBillType").append(HSourceBillTypes);
+ form.render('select');
+ }
+ }
+ })
+ }
+ //#endregion
+
//#endregion
--
Gitblit v1.9.1