From 4d4bdee1f5f80055867aef26ae691bd62d2eec50 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期三, 10 十二月 2025 16:59:02 +0800
Subject: [PATCH] 1

---
 WebTM/views/设备管理/Sb_EquipMaintainBill_PDA.html |  119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 115 insertions(+), 4 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 d0df943..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"
@@ -113,6 +113,13 @@
                                                 <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;">
                                             <th>鏁�&ensp;&ensp;&ensp;&ensp;閲�</th>
                                             <td class="bz_td">
@@ -171,6 +178,9 @@
                                                 <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>
@@ -254,11 +264,34 @@
                                     </tbody>
                                 </table>
                             </div>
+                            <!--闄勪欢淇℃伅-->
+                            <div class="layui-tab-item">
+                                <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>
+                            </div>
                         </div>
                         <ul class="layui-tab-title">
                             <li class="layui-this">鍩烘湰淇℃伅</li>
                             <li>鏄庣粏淇℃伅</li>
                             <li>鍏朵粬淇℃伅</li>
+                            <li>闄勪欢淇℃伅</li>
                         </ul>
                     </div>
                     <!--闅愯棌瀛楁-->
@@ -284,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 = [];
 
@@ -334,6 +368,7 @@
                     //console.log(d.data);
                     $("#HInterID").val("0");
                     $("#HBillNo").val(d.data[0].HBillNo);
+                    PicUpload(); //鏂囦欢涓婁紶
                 }
             });
 
@@ -419,7 +454,7 @@
             //閫�鍑�-鍏抽棴椤甸潰鏂规硶
             $('#Cancel').on('click', function () {
                 layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
-                    parent.location.href = "../../../views/index_Mobile.html";
+                    parent.location.href = "../../views/index_Mobile.html";
                 });
             })
 
@@ -497,7 +532,7 @@
             //#region 閫�鍑烘寜閽�
             form.on('submit(Cancel)', function () {
                 layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
-                    parent.location.href = "../../../views/index_Mobile.html";
+                    parent.location.href = "../../views/index_Mobile.html";
                 });
             })
             //#endregion
@@ -565,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鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
@@ -791,6 +832,9 @@
                             $("#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(
@@ -804,10 +848,77 @@
 
                             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