From b4206e1ee58fbd674ede4e8ff01795d6ac7165d0 Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期六, 19 六月 2021 08:39:08 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI

---
 WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBill.html |  125 ++++++++++++++++++++---------------------
 1 files changed, 60 insertions(+), 65 deletions(-)

diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
index f15393c..cb0452f 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
@@ -436,14 +436,6 @@
                                 </table>
                             </div>
                         </div>
-                        <!--<div class="layui-upload">
-                            <button type="button" class="layui-btn" id="UploadPic">澶氬浘鐗囦笂浼�</button>
-                            <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
-                                棰勮鍥撅細
-                                <div class="layui-upload-list" id="PicName"></div>
-                                <div class="layui-upload-list" id="PicName2"></div>
-                            </blockquote>
-                        </div>-->
                     </div>
                     <div class="layer-footer" style="text-align: center;">
                         <button type="button" lay-submit="" class="buttom_box_little" lay-filter="Saver" id="Saver">鎻愪氦</button>
@@ -503,6 +495,7 @@
                         //console.log(d.data);
                         $("#HInterID").val(d.data[0].HInterID);
                         $("#HBillNo").val(d.data[0].HBillNo);
+                        PicUpload();
                     }
                 });
             }
@@ -550,6 +543,7 @@
                             "HEmpName5": data.HEmpName5,
                             "HRemark": data.HRemark
                         });
+                        PicUpload();
                     }
                 })
             }
@@ -886,68 +880,68 @@
                 layer.msg('绂佹閫夋嫨');
             });
 
+            //鏂囦欢涓婁紶
+            function PicUpload() {
+                //澶氬浘鐗囦笂浼�
+                //澶氭枃浠跺垪琛ㄧず渚�
+                var ProImgByList = $('#ProImgByList')
+                    , uploadListIns = upload.render({
+                        elem: '#testList'
+                        , url: GetWEBURL() + "/Cj_StationOutBill/UploadFile1"
+                        , accept: 'file'
+                        , multiple: true
+                        , auto: false
+                        //, 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 鍊硷紝浠ュ厤鍒犻櫎鍚庡嚭鐜板悓鍚嶆枃浠朵笉鍙��
+                                });
 
-            //澶氬浘鐗囦笂浼�
-            //澶氭枃浠跺垪琛ㄧず渚�
-            var ProImgByList = $('#ProImgByList')
-                , uploadListIns = upload.render({
-                    elem: '#testList'
-                    , url: GetWEBURL() + "/Cj_StationOutBill/UploadFile1"
-                    , accept: 'file'
-                    , multiple: true
-                    , auto: false
-                    //, bindAction: '#testListAction' //鎸夋壄缁戝畾
-                    , data: { "HBillNo": "123456", "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;
+                                ProImgByList.append(tr);
                             });
-
-                            //鍒犻櫎
-                            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) { //涓婁紶鎴愬姛
+                        }
+                        , 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: #5FB878;">涓婁紶鎴愬姛</span>');
-                            tds.eq(3).html(''); //娓呯┖鎿嶄綔
-                            //tds.eq(3).find('.demo-reload').addClass('layui-hide'); //闅愯棌涓婁紶
-                            return delete this.files[index]; //鍒犻櫎鏂囦欢闃熷垪宸茬粡涓婁紶鎴愬姛鐨勬枃浠�
+                            tds.eq(2).html('<span style="color: #FF5722;">涓婁紶澶辫触[妫�鏌ユ枃浠跺悕鍙婃枃浠舵牸寮廬</span>');
+                            tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //鏄剧ず涓婁紶
                         }
-                        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'); //鏄剧ず涓婁紶
-                    }
-                });
+                    });
+            }
 
             //鑾峰彇缂栬緫鏃�,宸蹭笂浼犵殑鏂囦欢鍒楄〃
             if (HBillNo != null || HBillNo != undefined)
@@ -959,7 +953,6 @@
                     data: { "HBillNo": HBillNo },
                     success: function (data1) {
                         if (data1.count == 1) {
-                            console.log(data1.data);    
                             var index = 0;
                             for (var i = 0; i < data1.data.length; i++) {
                                 var tr = $(['<tr id="upload-' + i + '">'
@@ -989,7 +982,8 @@
 
             //浠ヤ笂涓簂ayui妯″潡
         });
-      
+
+        //鍒犻櫎鏂囦欢
         function toManager(r) {
             //寰楀埌褰撳墠鎵�鍦ㄨ
             var rows = r.parentNode.parentNode.rowIndex;
@@ -1021,6 +1015,7 @@
             })
         }
 
+        //涓嬭浇鏂囦欢
         function dowload(r)  {
             //寰楀埌褰撳墠鎵�鍦ㄨ
             var rows = r.parentNode.parentNode.rowIndex;

--
Gitblit v1.9.1