From ed2699d12f0a9cc298558e10f93c205f9697a106 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期四, 18 七月 2024 11:36:43 +0800
Subject: [PATCH] 发货通知单(部门列表添加判断是否有返回值);设备点检计划添加主表字段(组织,部门)
---
WebTM/views/设备管理/Sb_EquipDotCheckPlanBillEdit.html | 100 ++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 89 insertions(+), 11 deletions(-)
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillEdit.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillEdit.html"
index ad1a87d..08ff3eb 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillEdit.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillEdit.html"
@@ -122,6 +122,27 @@
</div>
</div>
</div>
+ <div class="layui-row" style="margin-top:10px;">
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">浣跨敤缁勭粐</label>
+ <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+ <input type="hidden" class="layui-input" lay-verify="HCREATEORGID" name="HCREATEORGID" id="HCREATEORGID" value="0">
+ <select name="HUSEORGID" id="HUSEORGID" lay-verify="HUSEORGID">
+ <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">閮ㄩ棬</label>
+ <div class="layui-input-block" style="margin-left: 77px;">
+ <input type="text" class="layui-input" lay-verify="HDeptName" name="HDeptName" id="HDeptName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <input type="hidden" name="HDeptID" id="HDeptID" lay-verify="HDeptID" value="0">
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHDept" id="btnHDept" style="padding: 0 10px;float: right;margin-right: 3px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
+ </div>
+ </div>
+ </div>
</div>
</div>
</div>
@@ -208,11 +229,16 @@
set_InitFrom();
//鍒濆鍖栬〃鏍�
set_InitGrid();
+ //鍔ㄦ�佸姞杞界粍缁�
+ Organ();
+ $("#HCREATEORGID").val(sessionStorage["OrganizationID"]);
//鍒ゆ柇鎿嶄綔绫诲瀷
if (OperationType == 1) {//鏃犳簮鍗�
set_AddFNew();
}
else if (OperationType == 3) {//缂栬緫
+ //绂佺敤缁勭粐閫夐」
+ //$("#HUSEORGID").attr("disabled", true);
set_EditFromGrid();
}
else {
@@ -225,7 +251,7 @@
table.on('toolbar(mainTable)', function (obj) {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
- var NewRow = { "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": sessionStorage["HEmpID"], "HManagerCode": sessionStorage["HEmpNumber"], "HManagerName": sessionStorage["HEmpName"], "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" };
+ var NewRow = { "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": sessionStorage["HEmpID"], "HManagerCode": sessionStorage["HEmpNumber"], "HManagerName": sessionStorage["HEmpName"], "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" };
switch (obj.event) {
//澧炲姞涓�琛�
case 'btn-AddLine': set_AddLine(NewRow);
@@ -305,7 +331,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true
- ,content: ['../璁惧绠$悊/璁惧妗f/Gy_EquipFileMainList.html', 'yes']
+ , content: ['../璁惧绠$悊/璁惧妗f/Gy_EquipFileMainList.html', 'yes']
, btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -366,6 +392,33 @@
});
});
+ //琛ㄥご璁惧鐐规瑙勭▼淇℃伅
+ form.on('submit(btnHDept)', function () {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '閮ㄩ棬鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['80%', '80%'],
+ maxmin: true,
+ content: ['../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.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('璇烽�夋嫨鏁版嵁');
+ }
+ $("#HDeptID").val(checkStatus.data[0].HItemID);
+ $("#HDeptName").val(checkStatus.data[0].閮ㄩ棬鍚嶇О);
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ });
+ });
+
//#endregion
@@ -421,7 +474,7 @@
//鐐规璁″垝
columns_plan = [
- { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�'}
+ { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�' }
, { templet: '#xuhao', title: '搴忓彿', sort: true, event: "qwe" }
, { field: 'HPlanDate', title: '璁″垝鏃ユ湡' }
, { field: 'HPlanBeginTime', title: '璁″垝寮�濮嬫椂闂寸偣' }
@@ -436,7 +489,7 @@
, page: true
, totalRow: true
, limit: 500
- , limits:[50,200,500,1000,3000]
+ , limits: [50, 200, 500, 1000, 3000]
, cellMinWidth: 120
, height: 500
, cols: [columns_plan]
@@ -449,7 +502,7 @@
function set_AddFNew() {
//鑾峰彇鏈�澶у崟鎹彿
get_MAXNum();
- option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": sessionStorage["HEmpID"], "HManagerCode": sessionStorage["HEmpNumber"], "HManagerName": sessionStorage["HEmpName"], "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
+ option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": sessionStorage["HEmpID"], "HManagerCode": sessionStorage["HEmpNumber"], "HManagerName": sessionStorage["HEmpName"], "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
table.render(option);
}
//鑾峰彇鏈�澶у崟鎹彿鍙婇粯璁ゅ�艰祴鍊�
@@ -472,16 +525,37 @@
}
});
}
+ //鑾峰彇缁勭粐
+ function Organ() {
+ //鑾峰彇鐧诲綍椤电粍缁囧垪
+ var Organization = '';
+ $.ajax({
+ type: "get",
+ url: GetWEBURL() + "/Web/GetOrganizations",
+ success: function (result) {
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
+ }
+ $("#HUSEORGID").append(Organization);
+ $("#HUSEORGID").val(sessionStorage["OrganizationID"])
+ form.render('select');
+ }
+ layer.closeAll("loading");
+ }
+ })
+ }
//缂栬緫
function set_EditFromGrid() {
set_EditForm(linterid); //缂栬緫鑾峰彇琛ㄥご
set_EditGrid(linterid); //缂栬緫鑾峰彇琛ㄤ綋
- option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
+ option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
table.render(option);
set_EditGrid_Plan(linterid); //缂栬緫鑾峰彇琛ㄤ綋--鐐规璁″垝
- option.data = [{ "HPlanDate": "", "HPlanBeginTime": "", "HPlanEndTime": "", "HRelationFlag": "鏈偣妫�","DiffDate":0 }];
+ option.data = [{ "HPlanDate": "", "HPlanBeginTime": "", "HPlanEndTime": "", "HRelationFlag": "鏈偣妫�", "DiffDate": 0 }];
table.render(option_plan);
}
@@ -497,7 +571,7 @@
if (result.count == 1) {
var DJData = result.data;//鐐规
var rowdate1 = layui.table.cache["mainTable"];
- option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
+ option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
table.render(option);
if (DJData.length != 0) //琛ㄤ綋鏁版嵁涓嶄负绌烘椂
@@ -507,7 +581,7 @@
var checkrow = {
"HDotCheckItemID": DJData[i].鐐规椤圭洰ID, "HDotCheckCode": DJData[i].鐐规椤圭洰浠g爜, "HDotCheckItem": DJData[i].鐐规椤圭洰, "HDotCheckPart": DJData[i].鐐规閮ㄤ綅,
"HClaim": DJData[i].鍏蜂綋瑕佹眰, "HManagerID": DJData[i].璐熻矗浜篒D, "HManagerCode": DJData[i].璐熻矗浜轰唬鐮�,
- "HManagerName": DJData[i].璐熻矗浜�, "HRemark": DJData[i].瀛愬娉�, "HDotCheckItemClassID": DJData[i].HDotCheckItemClassID, "HDotCheckItemClassName": DJData[i].鐐规椤圭洰鍒嗙被鍚嶇О, "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": ""
+ "HManagerName": DJData[i].璐熻矗浜�, "HRemark": DJData[i].瀛愬娉�, "HDotCheckItemClassID": DJData[i].HDotCheckItemClassID, "HDotCheckItemClassName": DJData[i].鐐规椤圭洰鍒嗙被鍚嶇О, "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": ""
};
buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
}
@@ -552,6 +626,10 @@
, "HRemark": data.琛ㄥご澶囨敞
, "HMouldDotCheckRuleID": data.HMouldDotCheckRuleID
, "HMouldDotCheckRuleName": data.璁惧鐐规瑙勭▼
+ , "HCREATEORGID": data.HCREATEORGID
+ , "HUSEORGID": data.HUSEORGID
+ , "HDeptID": data.HDeptID
+ , "HDeptName": data.閮ㄩ棬鍚嶇О
});
} else {
@@ -570,7 +648,7 @@
url: GetWEBURL() + 'Sb_EquipDotCheckPlanBill/Sb_EquipDotCheckPlanBillListProjectDetai',
type: "GET",
data: { "sqlWhere": "and hmainid=" + linterid },
- success: function (result) {
+ success: function (result) {
if (result.count == 1) {
var data = result.data;
var subarr = [];
@@ -741,7 +819,7 @@
})
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
- }
+ }
}
, btn2: function (index, layero) {
//鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
--
Gitblit v1.9.1