From e57b2edbffff5a653ba9eda65eae100ceb2e7822 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 01 九月 2025 16:16:41 +0800
Subject: [PATCH] 乔一:客户物料即时库存报表、客户手工抄包报表
---
WebTM/views/生产管理/生产汇报单/Sc_Add_ICMOReportBillList.html | 213 +++++++++++++++++++++++++++++++++++------------------
1 files changed, 141 insertions(+), 72 deletions(-)
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\261\207\346\212\245\345\215\225/Sc_Add_ICMOReportBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\261\207\346\212\245\345\215\225/Sc_Add_ICMOReportBillList.html"
index 5cf3f13..a3177bc 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\261\207\346\212\245\345\215\225/Sc_Add_ICMOReportBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\261\207\346\212\245\345\215\225/Sc_Add_ICMOReportBillList.html"
@@ -351,6 +351,23 @@
else if (OperationType == 4) {//涓嬫帹
setInit_PushBill();
}
+ else if (OperationType == 5) {//澶嶅埗
+ set_EditFromGrid();
+ //鑾峰彇鏈�澶у崟鎹彿
+ get_MAXNum();
+ //鍒濆鍖栧埗鍗曚汉鍜屽埗鍗曟椂闂�
+ $("#HMaker").val(sessionStorage["HUserName"]);
+ $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
+ $("#HUpDater").val();
+ $("#HUpDateDate").val();
+ $("#HChecker").val();
+ $("#HCheckDate").val();
+ $("#HCloseMan").val();
+ $("#HCloseDate").val();
+ $("#HDeleteMan").val();
+ $("#HDeleteDate").val();
+ //get_file();
+ }
else {
layer.alert("鏈煡鎿嶄綔绫诲瀷锛�", { icon: 5 });
}
@@ -389,6 +406,26 @@
table.on('tool(mainTable)', function (obj) {
set_GridDelete(obj); //琛屽唴鍒犻櫎
set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
+
+ //#region 淇敼琛� 鏃堕棿
+ var data = obj.data;
+ //鐢熶骇鏃ユ湡
+ if (obj.event == 'HProduceDate') {
+ var field = $(this).data('field');
+ laydate.render({
+ elem: this.firstChild
+ , show: true //鐩存帴鏄剧ず
+ , closeStop: this
+ , done: function (nowDate) {
+ //鏃堕棿閫夋嫨瀹屾垚锛岃鏁版嵁鏇存柊
+ data[field] = nowDate;
+ obj.update(data);
+ //鍒锋柊澶嶉�夋
+ //checkRefresh();
+ }
+ });
+ }
+ //#endregion
});
//#endregion
@@ -455,13 +492,6 @@
content: ['../../PublicPage/ProductionOrder.html', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
- option.data = [{
- "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "",
- "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0,
- "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "",
- "HSourceBillType": 0, "HICMOTempID": 0
- }];
- table.render(option);
//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
@@ -483,30 +513,22 @@
if (isAllEqual(list)) //鐩稿悓鍗曞彿
{
//console.log(checkStatus.data);
- if (checkStatus.data.length > 1) {
- for (var i = 0; i < checkStatus.data.length - 1; i++) //琛ヨ
- {
- //var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HRemark": "" };
- table.cache["mainTable"].push({
- "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "",
- "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0, "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "",
- "HSourceBillType": 0, "HICMOTempID": 0
- });
- option.data = table.cache["mainTable"];
- table.render(option);
- }
+ var optionData = [];
+ for (var i = 0; i < checkStatus.data.length; i++) //琛ヨ
+ {
+ var NewRow = {
+ "HMaterID": checkStatus.data[0].HMaterID, "HMaterCode": checkStatus.data[0].HMaterCode, "HMaterName": checkStatus.data[0].HMaterName, "HMaterSpec": checkStatus.data[0].HMaterSpec, "HUnitID": checkStatus.data[0].HUnitID, "HUnitCode": checkStatus.data[0].HUnitCode, "HUnitName": checkStatus.data[0].HUnitName,
+ "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0,
+ "HICMOBillNo": checkStatus.data[0].鍗曟嵁鍙�, "HICMOInterID": checkStatus.data[0].hmainid, "HICMOEntryID": checkStatus.data[0].HEntryID, "HRemark": "", "HSourceInterID": checkStatus.data[0].hmainid, "HSourceEntryID": checkStatus.data[0].HEntryID, "HSourceBillNo": checkStatus.data[0].鍗曟嵁鍙�,
+ "HSourceBillType": 3710
+ };
+ optionData.push(NewRow);
}
- option.data = checkStatus.data;
- table.render(option);
- //for (var i = 0; i < checkStatus.data.length; i++) {
- // $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HMaterID"] .layui-table-cell').text(checkStatus.data[i].HMaterID);
- // $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HMaterCode"] .layui-table-cell').text(checkStatus.data[i].HMaterCode);
- // $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HMaterName"] .layui-table-cell').text(checkStatus.data[i].HMaterName);
- // $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HMaterSpec"] .layui-table-cell').text(checkStatus.data[i].HMaterSpec);
- // $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HUnitID"] .layui-table-cell').text(checkStatus.data[i].HUnitID);
- // $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HUnitCode"] .layui-table-cell').text(checkStatus.data[i].HUnitCode);
- // $('.layui-table-view[lay-id="mainTable"]').children('.layui-table-box').children('.layui-table-body').find('table tbody tr[data-index="' + i + '"]').find('td[data-field="HUnitName"] .layui-table-cell').text(checkStatus.data[i].HUnitName);
- //}
+
+ table.reload("mainTable", {
+ data: optionData //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ })
+
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
else {
@@ -538,7 +560,7 @@
//#region 鎻愪氦淇濆瓨
form.on('submit(Saver)', function (data) {//淇濆瓨
var refSav = "";
- if (OperationType == 1 || OperationType == 2 || OperationType == 4) {
+ if (OperationType == 1 || OperationType == 2 || OperationType == 4 || OperationType == 5) {
refSav = "Add";
}
if (OperationType == 3) {
@@ -761,26 +783,65 @@
if (checkStatus.data.length === 0) {
return layer.msg('璇烽�夋嫨鏁版嵁');
}
- //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
- obj.update({
- HMaterID: checkStatus.data[0].HItemID,
- HMaterCode: checkStatus.data[0].鐗╂枡浠g爜,
- HMaterName: checkStatus.data[0].鐗╂枡鍚嶇О,
- HMaterSpec: checkStatus.data[0].瑙勬牸鍨嬪彿,
- });
+
+ //閫変腑澶氳鏃�
+ if (checkStatus.data.length > 1) {
+ var rowIndex = $(obj.tr).attr("data-index") * 1; //attr("data-index")鐢ㄤ簬鑾峰彇璇r鍏冪礌涓奷ata-index灞炴�х殑鍊�*1杞崲绫诲瀷鐒跺悗璧嬪�肩粰rowIndex
+ for (var i = 0; i < checkStatus.data.length; i++) { //鍒ゆ柇閫変腑鐨勬暟鎹殑闀垮害 鐢ㄤ簬閬嶅巻checkStatus.data鏁扮粍涓殑姣忎釜鍏冪礌
+ if (rowIndex + i >= option.data.length) { //鍒ゆ柇rowIndex + i鐨勭储寮曡秴鍑轰簡option.data鏁扮粍鐨勯暱搴︼紝璇存槑option.data鏁扮粍闇�瑕佹墿灞曚互鍖呭惈鏇村琛�
+ var NewRow = {
+ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "",
+ "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0,
+ "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "",
+ "HSourceBillType": 0
+ };
+
+ table.cache["mainTable"].push(NewRow); //鍒涘缓鏂扮殑鍖呭惈鏁扮粍 浼犲叆table.cache["mainTable"]鏁扮粍
+ option.data = table.cache["mainTable"]; //鎶婁紶鍏� table.cache["mainTable"]鏁扮粍鐨勫�艰祴鍊肩粰option.data 鐨勫睘鎬�
+
+ table.render(option);//娓叉煋鐣岄潰
+ }
+ option.data[rowIndex + i].HMaterID = checkStatus.data[i].HItemID; //灏唎ption.data鏁扮粍涓搴旇鐨凥MaterID灞炴�ф洿鏂颁负浠巖esultData瀵硅薄涓幏鍙栫殑鐗╂枡ID
+ option.data[rowIndex + i].HMaterCode = checkStatus.data[i].鐗╂枡浠g爜; //灏唎ption.data鏁扮粍涓搴旇鐨� 鐗╂枡浠g爜 灞炴�ф洿鏂颁负浠巖esultData瀵硅薄涓幏鍙栫殑鐗╂枡ID
+ option.data[rowIndex + i].HMaterName = checkStatus.data[i].鐗╂枡鍚嶇О; //灏唎ption.data鏁扮粍涓搴旇鐨� 鐗╂枡鍚嶇О 灞炴�ф洿鏂颁负浠巖esultData瀵硅薄涓幏鍙栫殑鐗╂枡ID
+ option.data[rowIndex + i].HMaterSpec = checkStatus.data[i].瑙勬牸鍨嬪彿; //灏唎ption.data鏁扮粍涓搴旇鐨� 瑙勬牸鍨嬪彿 灞炴�ф洿鏂颁负浠巖esultData瀵硅薄涓幏鍙栫殑鐗╂枡ID
+ option.data[rowIndex + i].HUnitID = checkStatus.data[i].HUnitID; //灏唎ption.data鏁扮粍涓搴旇鐨� HUnitID 灞炴�ф洿鏂颁负浠巖esultData瀵硅薄涓幏鍙栫殑鐗╂枡ID
+ option.data[rowIndex + i].HUnitCode = checkStatus.data[i].璁¢噺鍗曚綅浠g爜;
+ option.data[rowIndex + i].HUnitName = checkStatus.data[i].璁¢噺鍗曚綅鍚嶇О; //灏唎ption.data鏁扮粍涓搴旇鐨� 璁¢噺鍗曚綅 灞炴�ф洿鏂颁负浠巖esultData瀵硅薄涓幏鍙栫殑鐗╂枡ID 鏇存柊璁¢噺鍗曚綅灞炴��
+ }
+ table.render(option); //閲嶆柊娓叉煋琛ㄦ牸浠ユ樉绀烘洿鏂板悗鐨勬暟鎹�
+ } else {
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HMaterID: checkStatus.data[0].HItemID,
+ HMaterCode: checkStatus.data[0].鐗╂枡浠g爜,
+ HMaterName: checkStatus.data[0].鐗╂枡鍚嶇О,
+ HMaterSpec: checkStatus.data[0].瑙勬牸鍨嬪彿,
+ HUnitID: checkStatus.data[0].HUnitID,
+ HUnitCode: checkStatus.data[0].璁¢噺鍗曚綅浠g爜,
+ HUnitName: checkStatus.data[0].璁¢噺鍗曚綅鍚嶇О,
+ });
+ }
+
+
+
+
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
, btn2: function (index, layero) {
//鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
//return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
}, end: function () {
- if (OptionData.length > 0) {
+ if (OptionData != "" && OptionData != []) {
//鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
obj.update({
- HMaterID: OptionData[0].HItemID,
- HMaterCode: OptionData[0].鐗╂枡浠g爜,
- HMaterName: OptionData[0].鐗╂枡鍚嶇О,
- HMaterSpec: OptionData[0].瑙勬牸鍨嬪彿,
+ HMaterID: OptionData.HItemID,
+ HMaterCode: OptionData.鐗╂枡浠g爜,
+ HMaterName: OptionData.鐗╂枡鍚嶇О,
+ HMaterSpec: OptionData.瑙勬牸鍨嬪彿,
+ HUnitID: OptionData.HUnitID,
+ HUnitCode: OptionData.璁¢噺鍗曚綅浠g爜,
+ HUnitName: OptionData.璁¢噺鍗曚綅鍚嶇О,
});
OptionData = [];
}
@@ -799,7 +860,7 @@
shift: 2,
area: ['90%', '90%'],
maxmin: true,
- content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Unit.html?Type=HUnitList&openType=2', 'yes'],
+ content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Unit.html?Type=HUnitList', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -823,12 +884,12 @@
//鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
//return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
}, end: function () {
- if (OptionData.length > 0) {
+ if (OptionData != "" && OptionData != []) {
//鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
obj.update({
- HUnitID: OptionData[0].HItemID,
- HUnitCode: OptionData[0].璁¢噺鍗曚綅浠g爜,
- HUnitName: OptionData[0].璁¢噺鍗曚綅鍚嶇О
+ HUnitID: OptionData.HItemID,
+ HUnitCode: OptionData.璁¢噺鍗曚綅浠g爜,
+ HUnitName: OptionData.璁¢噺鍗曚綅鍚嶇О
});
OptionData = [];
}
@@ -874,9 +935,9 @@
if (OptionData.length > 0) {
//鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
obj.update({
- HSourceID: OptionData[0].HItemID,
- HSourceCode: OptionData[0].鐢熶骇璧勬簮浠g爜,
- HSourceName: OptionData[0].鐢熶骇璧勬簮鍚嶇О
+ HSourceID: OptionData[0][0].HItemID,
+ HSourceCode: OptionData[0][0].鐢熶骇璧勬簮浠g爜,
+ HSourceName: OptionData[0][0].鐢熶骇璧勬簮鍚嶇О
});
OptionData = [];
}
@@ -895,7 +956,7 @@
shift: 2,
area: ['90%', '90%'],
maxmin: true,
- content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?type=HManager&openType=2', 'yes'],
+ content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?type=HManager', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -946,23 +1007,24 @@
, { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 100 }
, { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true }
, { field: 'HMaterCode', title: '鐗╂枡浠g爜', edit: 'text', event: 'HMaterCode', width: 100 }
- , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', edit: 'text', width: 100 }
- , { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', edit: 'text', width: 100 }
+ , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', style: 'background-color:#efefef4d;', width: 100 }
+ , { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', style: 'background-color:#efefef4d;', width: 100 }
, { field: 'HUnitID', title: 'HUnitID', edit: 'text', width: 100, hide: true }
, { field: 'HUnitCode', title: '鍗曚綅浠g爜', edit: 'text', event: 'HUnitCode', width: 100 }
- , { field: 'HUnitName', title: '鍗曚綅鍚嶇О', edit: 'text', width: 100 }
+ , { field: 'HUnitName', title: '鍗曚綅鍚嶇О', style: 'background-color:#efefef4d;', width: 100 }
, { field: 'HSourceID', title: 'HSourceID', edit: 'text', width: 100, hide: true }
, { field: 'HSourceCode', title: '璧勬簮浠g爜', edit: 'text', event: 'HSourceCode', width: 100 }
- , { field: 'HSourceName', title: '璧勬簮鍚嶇О', edit: 'text', width: 100 }
+ , { field: 'HSourceName', title: '璧勬簮鍚嶇О', style: 'background-color:#efefef4d;', width: 100 }
, { field: 'HWorkerid', title: 'HWorkerid', edit: 'text', width: 100, hide: true }
, { field: 'HWorkerCode', title: '鎿嶄綔鍛樹唬鐮�', edit: 'text', event: 'HWorkerCode', width: 100 }
- , { field: 'HWorkerName', title: '鎿嶄綔鍛樺悕绉�', edit: 'text', width: 100 }
+ , { field: 'HWorkerName', title: '鎿嶄綔鍛樺悕绉�', style: 'background-color:#efefef4d;', width: 100 }
, { field: 'HQty', title: '鐢熶骇鏁伴噺', edit: 'text', width: 100, totalRow: true }
, { field: 'HBadQty', title: '涓嶈壇鏁伴噺', edit: 'text', width: 100, totalRow: true }
- , { field: 'HICMOBillNo', title: '鐢熶骇璁㈠崟', edit: 'text', width: 100 }
- , { field: 'HICMOInterID', title: '鐢熶骇璁㈠崟鍐呯爜', edit: 'text', width: 100, hide: true }
- , { field: 'HICMOEntryID', title: '鐢熶骇璁㈠崟瀛愬唴鐮�', edit: 'text', width: 100, hide: true }
-
+ , { field: 'HICMOBillNo', title: '鐢熶骇璁㈠崟', style: 'background-color:#efefef4d;', width: 100 }
+ , { field: 'HICMOInterID', title: '鐢熶骇璁㈠崟鍐呯爜', style: 'background-color:#efefef4d;', width: 100, hide: true }
+ , { field: 'HICMOEntryID', title: '鐢熶骇璁㈠崟瀛愬唴鐮�', style: 'background-color:#efefef4d;', width: 100, hide: true }
+ , { field: 'HPRODUCEDATE', title: '鐢熶骇鏃ユ湡', event: 'HProduceDate', width: 100 }
+
, { field: 'HSourceInterID', title: '婧愬崟鍐呯爜', edit: 'text', width: 100, hide: true }
, { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', edit: 'text', width: 100, hide: true }
, { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', edit: 'text', width: 100, hide: true }
@@ -1095,7 +1157,7 @@
"HSourceName": data[i].鐢熶骇璧勬簮鍚嶇О, "HWorkerid": data[i].鎿嶄綔鍛業D, "HWorkerCode": data[i].鎿嶄綔鍛樹唬鐮�,
"HWorkerName": data[i].鎿嶄綔鍛樺悕绉�, "HQty": data[i].浜ч噺, "HBadQty": data[i].涓嶈壇鏁伴噺 == '' ? 0 : data[i].涓嶈壇鏁伴噺, "HICMOBillNo": data[i].鐢熶骇璁㈠崟鍙�,
"HICMOInterID": data[i].HICMOInterID, "HICMOEntryID": data[i].HICMOEntryID, "HRemark": "", "HSourceInterID": data[i].HICMOInterID, "HSourceEntryID": data[i].HICMOEntryID, "HSourceBillNo": data[i].鐢熶骇璁㈠崟鍙�,
- "HSourceBillType": 3710, "HICMOTempID": data[i].HICMOTempID
+ "HSourceBillType": 3710, "HICMOTempID": data[i].HICMOTempID,"HPRODUCEDATE": data[i].鐢熶骇鏃ユ湡
});
}
@@ -1139,12 +1201,12 @@
function set_EditFromGrid() {
set_EditForm(linterid); //缂栬緫鑾峰彇琛ㄥご
set_EditGrid(linterid); //缂栬緫鑾峰彇琛ㄤ綋
- option.data = [{
- "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "",
- "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0,
- "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "",
- "HSourceBillType": 0, "HICMOTempID": 0
- }];
+ //option.data = [{
+ // "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "",
+ // "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0,
+ // "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "",
+ // "HSourceBillType": 0, "HICMOTempID": 0
+ //}];
table.render(option);
}
//#endregion
@@ -1155,6 +1217,7 @@
$.ajax({
url: GetWEBURL() + "Sc_ICMOReportBill/Sc_GetICMOReportBillListCheckDetai",
type: "GET",
+ async: false,
data: {
"HID": linterid
},
@@ -1173,8 +1236,8 @@
$("#HEmpID").val(data.HEmpID);
$("#HEmpName").val(data.缁熻鍛�);
$("#HMainSourceBillNo").val(data.HMainSourceBillNo);
- $("#HMainSourceInterID").val(data.HMainSourceInterID);
- $("#HMainSourceEntryID").val(data.HMainSourceEntryID);
+ $("#HMainSourceInterID").val(data.HMainSourceInterID == null ? 0 : data.HMainSourceInterID);
+ $("#HMainSourceEntryID").val(data.HMainSourceEntryID == null ? 0 : data.HMainSourceEntryID);
$("#HExplanation").val("");
$("#HRemark").val(data.琛ㄥご澶囨敞);
PicUpload();
@@ -1196,6 +1259,7 @@
$.ajax({
url: GetWEBURL() + 'Sc_ICMOReportBill/Sc_ICMOReportBillListProjectDetai',
type: "GET",
+ async: false,
data: { "sqlWhere": "and hmainid=" + linterid },
success: function (result) {
if (result.count == 1) {
@@ -1309,6 +1373,10 @@
layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,鐢熶骇鏁伴噺涓嶈兘涓虹┖鎴�0鎴栬�呭皬浜�0!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return Result = false;
}
+ //if (sSubStr[i].HPRODUCEDATE == "" || sSubStr[i].HPRODUCEDATE == null || sSubStr[i].HPRODUCEDATE == "undefined") {
+ // layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,鐢熶骇鏃ユ湡涓嶅厑璁镐负绌�!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ // return Result = false;
+ //}
}
}
else {
@@ -1336,7 +1404,7 @@
, area: ['90%', '90%']//澶у皬
, title: '鑱屽憳鍒楄〃'//鏍囬
, shift: 2//寮瑰嚭鍔ㄧ敾
- , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?type=HEmp&openType=2', 'yes']
+ , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?type=HEmp', 'yes']
, btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
@@ -1552,6 +1620,7 @@
, "HSourceBillType": dataArray[i].鍗曟嵁绫诲瀷
, 'HICMOTempID': "0"
, 'HRemark': ""
+ , 'HPRODUCEDATE': dataArray[i].鐢熶骇鏃ユ湡
}
);
}
@@ -1666,7 +1735,7 @@
$("#HEmpID").val(obj[0].HItemID);
}
//鐗╂枡
- function GetMaterValue(obj) {
+ function GetGyMaterial(obj) {
OptionData = obj;
}
//鍗曚綅
--
Gitblit v1.9.1