From a853c96fb287ea5e9edaa39e0c63f6d9de04f9d1 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 15 十二月 2025 08:14:07 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/设备管理/Sb_EquipMaintainBill_PDA.html | 375 ++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 270 insertions(+), 105 deletions(-)
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainBill_PDA.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainBill_PDA.html"
index 9035f99..3d975dd 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainBill_PDA.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainBill_PDA.html"
@@ -70,7 +70,7 @@
}
/*鏄庣粏琛屽閫夋灞呬腑*/
.layui-table-cell .layui-form-checkbox[lay-skin="primary"] {
- margin-left: 35%;
+ margin-left: 15%;
}
</style>
</head>
@@ -86,7 +86,7 @@
<div class="layui-form-item" style="margin: 1% 2%;text-align: right;">
<button type="button" lay-submit="" lay-filter="Add" class="layui-btn layui-btn-radius">鏂板</button>
<!--<button type="button" lay-submit="" lay-filter="" class="layui-btn layui-btn-radius">娓呯┖</button>-->
- <button type="button" lay-submit="" lay-filter="Saver" class="layui-btn layui-btn-radius">淇濆瓨</button>
+ <button type="button" lay-submit="" lay-filter="Saver" id="Saver" class="layui-btn layui-btn-radius">淇濆瓨</button>
<button type="button" lay-submit="" lay-filter="Cancel" class="layui-btn layui-btn-radius layui-btn-danger">閫�鍑�</button>
</div>
<div class="layui-tab layui-tab-card" lay-filter="TabTest">
@@ -111,6 +111,13 @@
<th>淇濆吇缁撴潫</th>
<td class="bz_td">
<input type="datetime" name="HEndDate" class="layui-input LineHeight" id="HEndDate" placeholder="璇烽�夋嫨鏃ユ湡" style="border-radius: 50px;">
+ </td>
+ </tr>
+ <tr>
+ <th>鏈�缁堢粨璁�</th>
+ <td class="bz_td">
+ <input type="radio" name="HLastResult" value="OK" title="OK" checked="">
+ <input type="radio" name="HLastResult" value="NG" title="NG">
</td>
</tr>
<tr style="display:none;">
@@ -165,8 +172,43 @@
<input type="text" name="HBarModel" class="layui-input LineHeight" id="HBarModel" style="border-radius: 50px;background-color:#EDEDED;" readonly>
</td>
</tr>
+ <tr>
+ <th>淇濆吇璁″垝</th>
+ <td class="bz_td">
+ <input type="text" name="HPlanNo" class="layui-input LineHeight" id="HPlanNo" style="border-radius: 50px;background-color:#EDEDED;" readonly>
+ <input type="hidden" name="HEquipMaintainPlanInterID" class="layui-input LineHeight" id="HEquipMaintainPlanInterID" style="border-radius: 50px;background-color:#EDEDED;" value="0" readonly>
+ <input type="hidden" name="HEquipMaintainPlanEntryID" class="layui-input LineHeight" id="HEquipMaintainPlanEntryID" style="border-radius: 50px;background-color:#EDEDED;" value="0" readonly>
+ <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" lay-verify="HMainSourceInterID" value="0">
+ <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" lay-verify="HMainSourceEntryID" value="0">
+ <input type="hidden" name="HMainSourceBillNo" id="HMainSourceBillNo" lay-verify="HMainSourceBillNo" value="">
+ </td>
+ </tr>
</tbody>
</table>
+ </div>
+ <div class="layui-tab-item">
+ <div class="layui-inline" style="margin-bottom:5px;">
+ <label class="layui-form-label" style="width:100px;">璁惧淇濆吇瑙勭▼</label>
+ <div class="layui-input-inline">
+ <input type="hidden" name="HEquipMaintainRuleInterID" id="HEquipMaintainRuleInterID" class="layui-input" value="0" style="float:left;width:150px;">
+ <input type="text" name="HEquipMaintainRuleInterNo" id="HEquipMaintainRuleInterNo" class="layui-input" value="" style="float:left;width:180px;" readonly="readonly">
+ <button type="button" lay-submit="" class="layui-btn layui-btn-primary" lay-filter="HEquipDotCheckRuleInterList" style="width:40px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+ </button>
+ </div>
+ </div>
+ <table class="" id="mainTable" lay-filter="mainTable"></table>
+ <script type="text/html" id="toolbarDemo">
+ <div class="layui-btn-container">
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炶</button>
+ </div>
+ </script>
+ <script type="text/html" id="xuhao">
+ {{d.LAY_TABLE_INDEX+1}}
+ </script>
+ <script type="text/html" id="barDemo">
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+ </script>
</div>
<div class="layui-tab-item">
<table style="width:80%;">
@@ -222,35 +264,34 @@
</tbody>
</table>
</div>
+ <!--闄勪欢淇℃伅-->
<div class="layui-tab-item">
- <div class="layui-inline" style="margin-bottom:5px;">
- <label class="layui-form-label" style="width:100px;">璁惧淇濆吇瑙勭▼</label>
- <div class="layui-input-inline">
- <input type="hidden" name="HEquipMaintainRuleInterID" id="HEquipMaintainRuleInterID" class="layui-input" value="" style="float:left;width:150px;">
- <input type="text" name="HEquipMaintainRuleInterNo" id="HEquipMaintainRuleInterNo" class="layui-input" value="" style="float:left;width:150px;" readonly="readonly">
- <button type="button" lay-submit="" class="layui-btn layui-btn-primary" lay-filter="HEquipDotCheckRuleInterList" style="width:40px;">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
- </button>
+ <div class="layui-form-item" style="padding-top: 10px;min-height:calc(50vh);">
+ <div class="layui-upload">
+ <button type="button" class="layui-btn" id="testList"><i class="layui-icon">顧�</i>閫夋嫨鏂囦欢</button>
+ <div class="layui-upload-list">
+ <table class="layui-table">
+ <thead>
+ <tr>
+ <th>鏂囦欢鍚�</th>
+ <th>澶у皬</th>
+ <th>鐘舵��</th>
+ <th>鎿嶄綔</th>
+ </tr>
+ </thead>
+ <tbody id="ProImgByList">
+ </tbody>
+ </table>
+ </div>
</div>
</div>
- <table class="" id="mainTable" lay-filter="mainTable"></table>
- <script type="text/html" id="toolbarDemo">
- <div class="layui-btn-container">
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炶</button>
- </div>
- </script>
- <script type="text/html" id="xuhao">
- {{d.LAY_TABLE_INDEX+1}}
- </script>
- <script type="text/html" id="barDemo">
- <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
- </script>
</div>
</div>
<ul class="layui-tab-title">
<li class="layui-this">鍩烘湰淇℃伅</li>
- <li>鍏朵粬淇℃伅</li>
<li>鏄庣粏淇℃伅</li>
+ <li>鍏朵粬淇℃伅</li>
+ <li>闄勪欢淇℃伅</li>
</ul>
</div>
<!--闅愯棌瀛楁-->
@@ -276,13 +317,14 @@
base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index' //涓诲叆鍙fā鍧�
- }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+ }).use(['index', 'form', 'laydate', 'table', 'element', 'upload'], function () {
var $ = layui.$
, admin = layui.admin
, layer = layui.layer
, table = layui.table
, form = layui.form
, laydate = layui.laydate
+ , upload = layui.upload
, element = layui.element;
var option = [];
@@ -326,15 +368,23 @@
//console.log(d.data);
$("#HInterID").val("0");
$("#HBillNo").val(d.data[0].HBillNo);
+ PicUpload(); //鏂囦欢涓婁紶
}
});
+
+ //褰撳墠鎵�鍦ㄩ〉绛�
+ var cur_title = "鍩烘湰淇℃伅";
+ //鐩戝惉褰撳墠澶勪簬鍝竴涓〉绛撅紝浼� HModName 鍊�
+ element.on('tab(TabTest)', function (data) {
+ cur_title = data.elem.context.innerText;
+ })
//#endregion
//澶村伐鍏锋爮浜嬩欢
table.on('toolbar(mainTable)', function (obj) {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
- var NewRow = { "HMaintainResult": false, "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": 0, "HManagerNumber": "", "HManagerName": "", "HRemark": "" };
+ var NewRow = { "HMaintainResult": false, "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": 0, "HManagerNumber": "", "HManagerName": "", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "" };
switch (obj.event) {
//鏂板涓�琛�
case 'btn-AddLine': btnAddLine(NewRow);
@@ -404,17 +454,19 @@
//閫�鍑�-鍏抽棴椤甸潰鏂规硶
$('#Cancel').on('click', function () {
layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
- parent.layui.admin.events.closeThisTabs(); //鍏抽棴椤电
+ parent.location.href = "../../views/index_Mobile.html";
});
})
//鎻愪氦
- form.on('submit(Saver)', function (data) {//鎻愪氦
+ form.on('submit(Saver)', function (data) {//鎻愪氦
data.field.HMaker = sessionStorage["HUserName"];//鍒跺崟浜�
var oMain = JSON.stringify(data.field);
var sSubStr = JSON.stringify(table.cache['mainTable']);
var sMainSub = oMain + ';' + sSubStr;
if (AllowLoadData(sSubStr)) {
+ $('#Saver').addClass("layui-btn-disabled").attr("disabled", true);//淇濆瓨鎸夐挳绂佺敤
+
$.ajax({
type: "POST",
url: GetWEBURL() + "/Sb_PDA_EquipMaintainBill/SaveGetEquipMaintainBillList",
@@ -428,12 +480,12 @@
$('#Saver').addClass("layui-btn-disabled").attr("disabled", true);
}
else {
- layer.close(index);
+ $('#Saver').removeClass("layui-btn-disabled").attr("disabled", false);//淇濆瓨鎸夐挳鍚敤
layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
}
},
error: function (err) {
- layer.close(index);
+ $('#Saver').removeClass("layui-btn-disabled").attr("disabled", false);//淇濆瓨鎸夐挳鍚敤
layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
}
});
@@ -443,40 +495,44 @@
//鏂板
form.on('submit(Add)', function (data) {
- $('#Saver').addClass("buttom_box_little");
- $('#Saver').addClass("layui-btn-disabled").attr("disabled", false);
- $("#HBarCode").removeAttr("readonly");//鏉″舰鐮佹竻闄ゅ彧璇�
- $("#HBarCode").removeAttr("background-color");//鏉″舰鐮佹竻闄よ儗鏅壊
+ layer.confirm('鏂板鍚庨〉闈㈡暟鎹皢娑堝け锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
+ $('#Saver').addClass("buttom_box_little");
+ $('#Saver').addClass("layui-btn-disabled").attr("disabled", false);
+ $("#HBarCode").removeAttr("readonly");//鏉″舰鐮佹竻闄ゅ彧璇�
+ $("#HBarCode").removeAttr("background-color");//鏉″舰鐮佹竻闄よ儗鏅壊
- // 娓呯┖琛ㄥ崟 锛堚�渇ormData鈥濇槸琛ㄥ崟鐨刬d锛�
- $("#formData")[0].reset();
- layui.form.render();
- option.data = [{ "HMaintainResult": false, "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": 0, "HManagerNumber": "", "HManagerName": "", "HRemark": "" }];
- table.render(option);
+ // 娓呯┖琛ㄥ崟 锛堚�渇ormData鈥濇槸琛ㄥ崟鐨刬d锛�
+ $("#formData")[0].reset();
+ layui.form.render();
+ option.data = [{ "HMaintainResult": false, "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": 0, "HManagerNumber": "", "HManagerName": "", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "" }];
+ table.render(option);
- $("#HBarCode").focus();
- //鑾峰彇鏈�澶у崟鎹彿
- $.ajax({
- url: GetWEBURL() + "/Web/GetMAXNum",
- type: "GET",
- data: { "HBillType": '3901' },
- success: function (d) {
- //console.log(d.data);
- $("#HInterID").val("0");
- $("#HBillNo").val(d.data[0].HBillNo);
- }
- });
- $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //淇濆吇寮�濮嬫椂闂�
- $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //淇濆吇缁撴潫鏃堕棿
- $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //鍗曟嵁鏃ユ湡
- $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //鍒涘缓鏃ユ湡
- $("#HMaker").val(sessionStorage["HUserName"]); //鍒涘缓浜�
+ $("#HBarCode").focus();
+ //鑾峰彇鏈�澶у崟鎹彿
+ $.ajax({
+ url: GetWEBURL() + "/Web/GetMAXNum",
+ type: "GET",
+ data: { "HBillType": '3901' },
+ success: function (d) {
+ //console.log(d.data);
+ $("#HInterID").val("0");
+ $("#HBillNo").val(d.data[0].HBillNo);
+ }
+ });
+ $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //淇濆吇寮�濮嬫椂闂�
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //淇濆吇缁撴潫鏃堕棿
+ $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //鍗曟嵁鏃ユ湡
+ $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //鍒涘缓鏃ユ湡
+ $("#HMaker").val(sessionStorage["HUserName"]); //鍒涘缓浜�
+
+ layer.close(index);
+ });
})
//#region 閫�鍑烘寜閽�
form.on('submit(Cancel)', function () {
layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
- Pub_Close(2);
+ parent.location.href = "../../views/index_Mobile.html";
});
})
//#endregion
@@ -520,6 +576,10 @@
//琛ㄥご淇℃伅璁惧淇濆吇瑙勭▼
form.on('submit(HEquipDotCheckRuleInterList)', function () {
+ if ($("#HEquipID").val() == 0 || $("#HEquipID").val() == null || $("#HEquipID").val() == "") {
+ layer.alert("璇峰厛鎵弿璁惧浜岀淮鐮佸甫鍑鸿澶囦俊鎭�");
+ return;
+ }
//椤甸潰灞�-鑷畾涔�
layer.open({
type: 2,
@@ -529,7 +589,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../璁惧绠$悊/璁惧瑙勭▼鍗�/Sb_EquipMaintainRuleList_PDA.html', 'yes'],
+ content: ['../璁惧绠$悊/璁惧瑙勭▼鍗�/Sb_EquipMaintainRuleList_PDA.html? HEquipID =' + $("#HEquipID").val(), 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
@@ -540,6 +600,12 @@
}
$("#HEquipMaintainRuleInterNo").val(checkStatus.data[0].鍗曟嵁鍙�);
$("#HEquipMaintainRuleInterID").val(checkStatus.data[0].hmainid);
+ $("#HPlanNo").val(checkStatus.data[0].淇濆吇璁″垝鍗�);
+ $("#HEquipMaintainPlanInterID").val(checkStatus.data[0].淇濆吇璁″垝ID);
+ $("#HEquipMaintainPlanEntryID").val(checkStatus.data[0].淇濆吇璁″垝瀛怚D);
+ $("#HMainSourceInterID").val(checkStatus.data[0].淇濆吇璁″垝ID);
+ $("#HMainSourceEntryID").val(checkStatus.data[0].淇濆吇璁″垝瀛怚D);
+ $("#HMainSourceBillNo").val(checkStatus.data[0].淇濆吇璁″垝鍗�);
get_DocCheckItem2();
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
@@ -555,27 +621,22 @@
});
function get_DocCheckItem2() {
$.ajax({
- url: GetWEBURL() + "/Web/GetDotCheckRuleItemByDotCheckRuleID",
+ url: GetWEBURL() + "/Web/GetMaintainItemByMaintainRuleID",
type: "GET",
- data: { "HDotCheckRuleInterID": $("#HEquipMaintainRuleInterID").val() },
+ data: { "HEquipMaintainRuleInterID": $("#HEquipMaintainRuleInterID").val() },
success: function (result) {
if (result != null) {
- if (result.count == 1) {
- var BYData = result;//
- var rowdate1 = layui.table.cache["mainTable"];
+ if (result.count == 1) {
+
var data = result.data;
- option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "" }];
+ option.data = [{ "HMaintainResult": false, "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": 0, "HManagerNumber": "", "HManagerName": "", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "" }];
table.render(option);
- if (BYData.data.length != 0) //琛ㄤ綋鏁版嵁涓虹┖鏃�
+ if (data.length != 0) //琛ㄤ綋鏁版嵁涓虹┖鏃�
{
buttonArr = [];//娓呯┖鏁扮粍
- for (var i = 0; i < BYData.data.length; i++) {
- var checkrow = {
- "HDotCheckItemID": data[i].HDotCheckItemID, "HDotCheckCode": data[i].HDotCheckCode, "HDotCheckItem": data[i].HDotCheckItem,
- "HDotCheckPart": data[i].HDotCheckPart, "HClaim": rowdate1[i].HClaim, "HManagerID": data[i].HManagerID, "HManagerCode": data[i].HManagerCode,
- "HManagerName": data[i].HManagerName
- };
+ for (var i = 0; i < data.length; i++) {
+ var checkrow = { "HMaintainResult": data[i].榛樿缁撹 == 1 ? true : false, "HMaintainItemID": data[i].HMaintainItemID, "HMaintainNumber": data[i].淇濆吇椤圭洰浠g爜, "HMaintainItem": data[i].淇濆吇椤圭洰, "HMaintainPart": data[i].淇濆吇閮ㄤ綅, "HClaim": data[i].鍏蜂綋瑕佹眰, "HManagerID": data[i].璐熻矗浜篒D, "HManagerNumber": data[i].璐熻矗浜轰唬鐮�, "HManagerName": data[i].璐熻矗浜哄悕绉�, "HRemark": data[i].琛ㄤ綋澶囨敞, "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "" };
buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
}
table.reload("mainTable", {
@@ -584,7 +645,7 @@
}
}
else {
- option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "" }];
+ option.data = [{ "HMaintainResult": false, "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": 0, "HManagerNumber": "", "HManagerName": "", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "" }];
table.render(option);
layer.alert("璇ヨ澶囨殏鏃犻粯璁や繚鍏昏褰�", { icon: 5 });
}
@@ -598,9 +659,9 @@
function set_InitGrid() {
//琛ㄥご
columns = [
- { type: 'checkbox' }
- , { templet: '#xuhao', title: '搴忓彿', sort: true, event: "qwe", width: 80 }
- , { field: 'HMaintainResult', title: '淇濆吇缁撴灉', templet: '#HMaintainResult' }
+ //{ type: 'checkbox' }
+ { templet: '#xuhao', title: '搴忓彿', event: "qwe", width: 45 }
+ , { field: 'HMaintainResult', title: '缁撴灉', templet: '#HMaintainResult', width:55 }
, { field: 'HMaintainItemID', title: '淇濆吇椤圭洰ID', edit: 'text', hide: true }
, { field: 'HMaintainNumber', title: '淇濆吇椤圭洰浠g爜', edit: 'text', event: "HDotCheckCode", width: 115, hide: true }
, { field: 'HMaintainItem', title: '淇濆吇椤圭洰', edit: 'text', event: "" }
@@ -610,22 +671,38 @@
, { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', edit: 'text', event: 'HManagerCode', width: 150, hide: true }
, { field: 'HManagerName', title: '璐熻矗浜哄悕绉�', edit: 'text' }
, { field: 'HRemark', title: '澶囨敞', edit: 'text' }
+ , { field: 'HSourceInterID', title: '婧愬崟鍐呯爜', edit: 'text', hide: true }
+ , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', edit: 'text', hide: true }
+ , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', edit: 'text', hide: true }
, { title: '鎿嶄綔', toolbar: '#barDemo', width: 80 }
];
option = {
id: 'mainTable'
, elem: '#mainTable'
- , toolbar: '#toolbarDemo'
- , page: true
+ //, toolbar: '#toolbarDemo'
+ , page: false
, cellMinWidth: 100
- , height: 500
+ , limit: 100
+ , height: 'full-205'
, cols: [columns]
, done: function (res, curr, count) {
-
+ option.data = res.data;
+ //鍘绘帀涓嬫媺妗嗗け鐒︿簨浠跺惁鍒欏湪涓嬫媺妗嗛噷杈撳叆鍊�
+ $('.layui-form-select').find('input').unbind("blur");
+ //琛ㄦ牸閲嶈浇鍥炴樉涓嬫媺妗嗛噷鐨勬暟鎹�
+ $('tr').each(function (e) {
+ var $cr = $(this);
+ var dataIndex = $cr.attr("data-index");
+ $.each(option.data, function (index, value) {
+ if (value.LAY_TNDEX == dataIndex) {
+ //$cr.find('input').val(value.HResult);
+ }
+ });
+ });
}
};
- option.data = [{ "HMaintainResult": false, "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": 0, "HManagerNumber": "", "HManagerName": "", "HRemark": "" }];
+ option.data = [{ "HMaintainResult": false, "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": 0, "HManagerNumber": "", "HManagerName": "", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "" }];
table.render(option);
}
//澧炲姞涓�琛�
@@ -663,19 +740,30 @@
}
//鏁版嵁楠岃瘉
function AllowLoadData(sSubStr) {
- if ($("#HEquipName").val() == '') {
+ if (cur_title != '鏄庣粏淇℃伅') {
+ layer.msg("璇烽�夋嫨鍒� 鏄庣粏淇℃伅 椤电锛屾牳瀵逛繚鍏讳俊鎭悗锛屽湪鏄庣粏淇℃伅椤电涓偣鍑讳繚瀛樻寜閽�", { icon: 5, btn: ['纭'], time: 10000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return false;
+ }
+
+ if ($("#HBarName").val() == '') {
layer.msg("璁惧娌℃湁閫夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return false;
}
+
+ if ($("#HEquipMaintainRuleInterID").val() == 0 || $("#HEquipMaintainRuleInterNo").val() == '') {
+ layer.msg("淇濆吇瑙勭▼涓虹┖", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return false;
+ }
+
//鍒ゆ柇鐗╂枡鏄庣粏椤�
if (typeof (sSubStr) == "undefined" || sSubStr == "" || sSubStr == "[]") {
- layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ layer.msg("娌℃湁淇濆吇椤圭洰鏄庣粏璁板綍", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return false;
}
if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") {
sSubStr = JSON.parse(sSubStr);
for (var i = 0; i < sSubStr.length; i++) {
- if (sSubStr[i].HDotCheckCode == "" || sSubStr[i].HDotCheckItemID == "") {
+ if (sSubStr[i].HMaintainNumber == "" || sSubStr[i].HMaintainItemID == "") {
layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,淇濆吇椤圭洰浠g爜淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return false;
}
@@ -701,16 +789,16 @@
}
var index = layer.load();
$.ajax({
- url: GetWEBURL() + "/Sb_PDA_EquipDotCheckBill/txtHBarCode_KeyDown",
+ url: GetWEBURL() + "/Gy_EquipFileBill/txtHBarCode_KeyDown",
type: "GET",
- data: { "HBarCode": HBarCode },
+ data: { "HBarCode": HBarCode, "user": sessionStorage["HUserName"] },
success: function (result) {
if (result.data.length == 1) {
var data = result.data[0];
$("#HEquipID").val(data.HInterID);
- $("#HBarName").val(data.HName);
- $("#HBarSpec").val(data.HModel);
- $("#HBarModel").val(data.HModel2);
+ $("#HBarName").val(data.璁惧鍚嶇О);
+ $("#HBarSpec").val(data.璁惧瑙勬牸);
+ $("#HBarModel").val(data.璁惧鍨嬪彿);
$("#HQty").val(1);
$("#HBarCode").attr("readonly", "readonly");//鏉″舰鐮佸彧璇�
$("#HBarCode").css("background-color", "#efefef4d");
@@ -719,13 +807,15 @@
layer.close(index);
}
else {
+ $("#HBarCode").val("");
layer.close(index);
- layer.msg("鏈煡鎵惧埌鏁版嵁", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
}
},
error: function (err) {
+ $("#HBarCode").val("");
layer.close(index);
- layer.msg("鎺ュ彛璇锋眰澶辫触锛�" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
}
});
}
@@ -733,27 +823,102 @@
$.ajax({
url: GetWEBURL() + "/Web/GetItemByEquipFile",
type: "GET",
- data: { "EquipProjectID": $("#HEquipID").val(), "Type": "BY" },
+ data: { "EquipProjectID": $("#HEquipID").val(), "Type": "BY", "HDate": $("#HBeginDate").val() },
success: function (result) {
- var data = result.data;
- $("#HEquipMaintainRuleInterID").val(data[0].淇濆吇瑙勭▼ID);
- $("#HEquipMaintainRuleInterNo").val(data[0].淇濆吇瑙勭▼鍗曞彿);
- var rowdata = [];
- for (let i = 0; i < data.length; i++) {
- rowdata.push(
- {
- "HMaintainResult": data[i].榛樿缁撹, "HMaintainItemID": data[i].淇濆吇椤圭洰ID, "HMaintainNumber": data[i].淇濆吇椤圭洰浠g爜, "HMaintainItem": data[i].淇濆吇椤圭洰鍚嶇О,
- "HMaintainPart": data[i].淇濆吇閮ㄤ綅, "HClaim": data[i].鍏蜂綋瑕佹眰, "HManagerID": data[i].璐熻矗浜篒D, "HManagerNumber": data[i].璐熻矗浜轰唬鐮�,
- "HManagerName": data[i].璐熻矗浜哄悕绉�, "HRemark": ""
- }
- );
- }
+ if (result.count == 1) {
+ var data = result.data;
+ $("#HEquipMaintainRuleInterID").val(data[0].淇濆吇瑙勭▼ID);
+ $("#HEquipMaintainRuleInterNo").val(data[0].淇濆吇瑙勭▼鍗曞彿);
+ $("#HPlanNo").val(data[0].淇濆吇璁″垝鍗�);
+ $("#HEquipMaintainPlanInterID").val((data[0].淇濆吇璁″垝ID == null ? 0 : data[0].淇濆吇璁″垝ID) == "" ? 0 : data[0].淇濆吇璁″垝ID);
+ $("#HEquipMaintainPlanEntryID").val((data[0].淇濆吇璁″垝瀛怚D == null ? 0 : data[0].淇濆吇璁″垝瀛怚D) == "" ? 0 : data[0].淇濆吇璁″垝瀛怚D);
+ $("#HMainSourceBillNo").val(data[0].淇濆吇璁″垝鍗�);
+ $("#HMainSourceInterID").val((data[0].淇濆吇璁″垝ID == null ? 0 : data[0].淇濆吇璁″垝ID) == "" ? 0 : data[0].淇濆吇璁″垝ID);
+ $("#HMainSourceEntryID").val((data[0].淇濆吇璁″垝瀛怚D == null ? 0 : data[0].淇濆吇璁″垝瀛怚D) == "" ? 0 : data[0].淇濆吇璁″垝瀛怚D);
+ var rowdata = [];
+ for (let i = 0; i < data.length; i++) {
+ rowdata.push(
+ {
+ "HMaintainResult": data[i].榛樿缁撹 == 1 ? true : false, "HMaintainItemID": data[i].淇濆吇椤圭洰ID, "HMaintainNumber": data[i].淇濆吇椤圭洰浠g爜, "HMaintainItem": data[i].淇濆吇椤圭洰鍚嶇О,
+ "HMaintainPart": data[i].淇濆吇閮ㄤ綅, "HClaim": data[i].鍏蜂綋瑕佹眰, "HManagerID": data[i].璐熻矗浜篒D, "HManagerNumber": data[i].璐熻矗浜轰唬鐮�,
+ "HManagerName": data[i].璐熻矗浜哄悕绉�, "HRemark": "", "HSourceInterID": data[i].淇濆吇璁″垝ID, "HSourceEntryID": data[i].淇濆吇璁″垝瀛怚D, "HSourceBillNo": data[i].淇濆吇璁″垝鍗�
+ }
+ );
+ }
- option.data = rowdata;
- table.render(option);
+ option.data = rowdata;
+ table.render(option);
+ } else {
+ layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
}
})
}
+
+ //鏂囦欢涓婁紶
+ function PicUpload() {
+ //澶氬浘鐗囦笂浼�
+ //澶氭枃浠跺垪琛ㄧず渚�
+ var ProImgByList = $('#ProImgByList')
+ , uploadListIns = upload.render({
+ elem: '#testList'
+ , url: GetWEBURL() + "/Sb_EquipMaintainBill/UploadFile"
+ , accept: 'file'
+ , multiple: true
+ , auto: false
+ , acceptMime: 'image/*'
+ //, bindAction: '#testListAction' //鎸夋壄缁戝畾
+ , data: { "HBillNo": $("#HBillNo").val(), "HRemark": $("#HRemark").val(), "HUserName": sessionStorage["HUserName"] }
+ , choose: function (obj) {
+ var files = this.files = obj.pushFile(); //灏嗘瘡娆¢�夋嫨鐨勬枃浠惰拷鍔犲埌鏂囦欢闃熷垪
+ //璇诲彇鏈湴鏂囦欢
+ obj.preview(function (index, file, result) {
+ var tr = $(['<tr id="upload-' + index + '">'
+ , '<td>' + file.name + '</td>'
+ , '<td>' + (file.size / 1014).toFixed(1) + 'kb</td>'
+ , '<td>绛夊緟涓婁紶</td>'
+ , '<td>'
+ , '<button class="layui-btn layui-btn-xs demo-reload ">涓婁紶</button>'
+ , '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">鍒犻櫎</button>'
+ , '</td>'
+ , '</tr>'].join(''));
+
+ //鍗曚釜閲嶄紶
+ tr.find('.demo-reload').on('click', function () {
+ obj.upload(index, file);
+ return false;
+ });
+
+ //鍒犻櫎
+ tr.find('.demo-delete').on('click', function () {
+ delete files[index]; //鍒犻櫎瀵瑰簲鐨勬枃浠�
+ tr.remove();
+ uploadListIns.config.elem.next()[0].value = ''; //娓呯┖ input file 鍊硷紝浠ュ厤鍒犻櫎鍚庡嚭鐜板悓鍚嶆枃浠朵笉鍙��
+ });
+
+ ProImgByList.append(tr);
+ });
+ }
+ , done: function (res, index, upload) {
+ if (res.code == 1) { //涓婁紶鎴愬姛
+ var tr = ProImgByList.find('tr#upload-' + index)
+ , tds = tr.children();
+ tds.eq(2).html('<span style="color: #5FB878;">涓婁紶鎴愬姛</span>');
+ 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) {
+ var tr = ProImgByList.find('tr#upload-' + index)
+ , tds = tr.children();
+ tds.eq(2).html('<span style="color: #FF5722;">涓婁紶澶辫触[妫�鏌ユ枃浠跺悕鍙婃枃浠舵牸寮廬</span>');
+ tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //鏄剧ず涓婁紶
+ }
+ });
+ }
+
//浠ヤ笂涓簂ayui妯″潡
});
</script>
--
Gitblit v1.9.1