From 1f9494a496f6bae250a9d2f40ac3d7080c3e804c Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 31 五月 2024 14:52:03 +0800
Subject: [PATCH] 添加生产资源,模具字段
---
WebTM/views/基础资料/生产基础资料/Gy_SOPBillEdit.html | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 102 insertions(+), 17 deletions(-)
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillEdit.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillEdit.html"
index 3fd3744..52ab8cd 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillEdit.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillEdit.html"
@@ -323,7 +323,7 @@
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;;
var AddRow = table.cache['mainTable'];
- var NewRow = { "娴佹按鍙�": "", "HProcID": 0, "宸ュ簭浠g爜": "", "宸ュ簭": "", "HWorkStationID": 0, "宸ヤ綅": "", "宸ヤ綅浠g爜": "", "HCenterID": 0, "宸ヤ綔涓績浠g爜": "", "宸ヤ綔涓績": "", "HRemark": "" };
+ var NewRow = { "娴佹按鍙�": "", "HProcID": 0, "宸ュ簭浠g爜": "", "宸ュ簭": "", "HWorkStationID": 0, "宸ヤ綅": "", "宸ヤ綅浠g爜": "", "HCenterID": 0, "宸ヤ綔涓績浠g爜": "", "宸ヤ綔涓績": "", "HRemark": "", "HSourceID": 0, "HSourceName": '', "HMouldID": 0,"HMouldName":'' };
console.log(NewRow);
switch (obj.event) {
//鏂板涓�琛�
@@ -352,7 +352,7 @@
HRemark = obj.data.澶囨敞;
});
-
+
//鍒犻櫎鎸夐挳
form.on('submit(del)', function (data) {
console.log('aaa');
@@ -456,7 +456,7 @@
//淇濆瓨
form.on('submit(Saver)', function (data) {//淇濆瓨
-
+
var num = [];
for (var i = 0; i < table.cache["mainTable"].length; i++) {
if (table.cache["mainTable"][i] != "") {
@@ -464,7 +464,7 @@
num.push(table.cache["mainTable"][i])
}
}
-
+
var sMainStr = JSON.stringify(data.field);
var sSubStr = JSON.stringify(num);
var sMainSub = sMainStr + ';' + sSubStr + ';' + OperationType + ";" + sessionStorage["HUserName"];
@@ -552,7 +552,7 @@
// //layer.close(wait);
// $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
// $('#ChoseFile').removeClass("layui-btn-disabled").attr("disabled", false);
- // $('#delete').removeClass("layui-btn-disabled").attr("disabled", false);
+ // $('#delete').removeClass("layui-btn-disabled").attr("disabled", false);
// document.getElementById("ChoseFile").style.backgroundColor = 'white'
// layer.msg("鍗曟嵁瀛樼洏瀹屾瘯锛佸崟鎹彿锛�" + $("#HBillNo").val())
// } else {
@@ -581,14 +581,14 @@
$('#HUnitName').val("");
$('#HRemark').val("");
- option.data = [{ "娴佹按鍙�": "", "HProcID": 0, "宸ュ簭浠g爜": "", "宸ュ簭": "", "HWorkStationID": 0, "宸ヤ綅": "", "宸ヤ綅浠g爜": "", "HCenterID": 0, "宸ヤ綔涓績浠g爜": "", "宸ヤ綔涓績": "", "HRemark": "" }];
+ option.data = [{ "娴佹按鍙�": "", "HProcID": 0, "宸ュ簭浠g爜": "", "宸ュ簭": "", "HWorkStationID": 0, "宸ヤ綅": "", "宸ヤ綅浠g爜": "", "HCenterID": 0, "宸ヤ綔涓績浠g爜": "", "宸ヤ綔涓績": "", "HRemark": "", "HSourceID": 0, "HSourceName": '', "HMouldID": 0, "HMouldName": ''}];
table.render(option);
layer.close(index);
}
})
});
-
+
//浣跨敤
form.on('submit(Get_Use)', function (data) {//浣跨敤
$.ajax({
@@ -606,7 +606,7 @@
}
});
});
-
+
//鍙栨秷
form.on('submit(Cancel)', function (data) {//鍙栨秷
$.ajax({
@@ -664,8 +664,12 @@
, { field: 'HCenterID', title: 'HCenterID', width: 200, hide: true }
, { field: '宸ヤ綔涓績浠g爜', title: '宸ヤ綔涓績浠g爜', width: 110, event: '宸ヤ綔涓績浠g爜', edit: 'text' }
, { field: '宸ヤ綔涓績', title: '宸ヤ綔涓績', width: 110 }
+ , { field: 'HSourceID', title: '鐢熶骇璧勬簮ID', width: 110, hide: true }
+ , { field: 'HSourceName', title: '鐢熶骇璧勬簮', width: 110, event: 'HSourceName', edit: 'text' }
+ , { field: 'HMouldID', title: '妯″叿ID', width: 110, hide: true }
+ , { field: 'HMouldName', title: '妯″叿鍚嶇О', width: 110, event: 'HMouldName', edit: 'text'}
, { field: 'HRemark', title: '澶囨敞', width: 110, edit: 'text' }
- , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width:80 }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 80 }
]]
, limits: [50, 500, 5000, 20000]
, done: function (res, curr, count) {
@@ -684,7 +688,7 @@
, limit: 50
, cellMinWidth: 1000
, height: 'full-50'
- , width:300
+ , width: 300
, cols: [[
{ type: 'checkbox', fixed: 'left' }
, { field: '娆″簭鍙�', title: '娆″簭鍙�', width: 200, edit: 'text' }
@@ -702,7 +706,7 @@
}
//鏃犳簮鍗曟柊澧�
function set_AddFNew() {
- option.data = [{ "娴佹按鍙�": "", "HProcID": 0, "宸ュ簭浠g爜": "", "宸ュ簭": "", "HWorkStationID": 0, "宸ヤ綅": "", "宸ヤ綅浠g爜": "", "HCenterID": 0, "宸ヤ綔涓績浠g爜": "", "宸ヤ綔涓績": "", "HRemark": "" }];
+ option.data = [{ "娴佹按鍙�": "", "HProcID": 0, "宸ュ簭浠g爜": "", "宸ュ簭": "", "HWorkStationID": 0, "宸ヤ綅": "", "宸ヤ綅浠g爜": "", "HCenterID": 0, "宸ヤ綔涓績浠g爜": "", "宸ヤ綔涓績": "", "HRemark": "", "HSourceID": 0, "HSourceName": '', "HMouldID": 0, "HMouldName": '' }];
table.render(option);
}
function set_AddFNew2() {
@@ -772,9 +776,9 @@
return;
}
, choose: function (obj) {
-
+
// 娓呯┖鍘嗗彶涓婁紶鏂囦欢锛岃В鍐砪hoose鍙墽琛屼竴娆$殑闂锛侊紒锛�
- uploadListIns.config.elem.next()[0].value = '';
+ uploadListIns.config.elem.next()[0].value = '';
var files = this.files = obj.pushFile(); //灏嗘瘡娆¢�夋嫨鐨勬枃浠惰拷鍔犲埌鏂囦欢闃熷垪
console.log(files);
@@ -806,8 +810,8 @@
ProImgByList.append(tr);
});
- }
- , done: function (res, index, upload) {
+ }
+ , done: function (res, index, upload) {
if (res.code == 1) { //涓婁紶鎴愬姛
var tr = ProImgByList.find('tr#upload-' + index)
, tds = tr.children();
@@ -815,7 +819,7 @@
tds.eq(3).html(''); //娓呯┖鎿嶄綔
//tds.eq(3).find('.demo-reload').addClass('layui-hide'); //闅愯棌涓婁紶
return delete this.files[index]; //鍒犻櫎鏂囦欢闃熷垪宸茬粡涓婁紶鎴愬姛鐨勬枃浠�
- }
+ }
this.error(index, upload);
}
, error: function (index, upload) {
@@ -973,12 +977,93 @@
}
});
}
+
+ //鐢熶骇璧勬簮
+ if (obj.event === 'HSourceName') //鐢熶骇璧勬簮
+ {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鐢熶骇璧勬簮鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['80%', '80%'],
+ maxmin: true,
+ content: ['../../../views/鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Source.html', 'yes'],
+ btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {
+
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HSourceID: checkStatus.data[0].HItemID,
+ HSourceName: checkStatus.data[0].鐢熶骇璧勬簮鍚嶇О,
+ });
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+
+ }
+ });
+ }
+
+ //鍣ㄥ叿妗f
+ if (obj.event === 'HMouldName') //宸ヤ綔涓績
+ {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鍣ㄥ叿妗f鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['80%', '80%'],
+ maxmin: true,
+ content: ['../../../views/妯℃不鍏风鐞�/妯℃不鍏风鐞�/Gy_MouldFileList.html', 'yes'],
+ btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {
+
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HMouldID: checkStatus.data[0].hmainid,
+ HMouldName: checkStatus.data[0].妯″叿鍚嶇О,
+ });
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+
+ }
+ });
+ }
+
obj.event = "";
return false;
}
})
}
-
+
//澧炲姞涓�琛�
function btnAddLine(NewRow) {
table.cache["mainTable"].push(NewRow);
--
Gitblit v1.9.1