WebTM/views/ÖÊÁ¿¹ÜÀí/À´ÁϼìÑéµ¥/Kf_QCStockInCheckBill_Fast.html
@@ -339,7 +339,9 @@
                            <div class="layui-tab-item">
                                <div class="layui-form-item" style="padding-top: 10px;">
                                    <div class="layui-upload">
                                        <button type="button" class="layui-btn" id="testList">选择文件</button><input class="layui-upload-file" type="file" accept="" name="file" multiple="">
                                        <button type="button" class="layui-btn" id="testList">选择文件</button>
                                        <!--<input class="layui-upload-file" type="file" accept="" name="file" multiple="">-->
                                        <button type="button" class="layui-btn" id="camera" capture="user"><i class="layui-icon"></i>拍照上传</button>
                                        <div class="layui-upload-list">
                                            <table class="layui-table">
                                                <thead>
@@ -548,6 +550,7 @@
                        $("#HInterID").val(d.data[0].HInterID);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        PicUpload();
                        PicUploads();
                    }
                });
            }
@@ -688,7 +691,9 @@
            //退出
            form.on('submit(Cancel)', function () {
                parent.location.href = "../../../views/index.html"
                layer.confirm('您确定要退出吗?', { icon: 3, title: '提示' }, function (index) {
                    parent.location.href = "../../../views/index_Mobile.html";
                });
            })
            //编辑
            form.on('submit(cmdModify)', function () {
@@ -808,6 +813,9 @@
                if (HBadQty == "") {
                    HBadQty = 0;
                }
                if (HRightQty == "") {
                    HRightQty = 0;
                }
                if (HSPID == "") {
                    HSPID = 0;
                }
@@ -842,7 +850,7 @@
                                , "HBadQty": HBadQty, "HCheckResult": HCheckResult, "HSupNumber": HSupNumber
                                , "HUseResult": HUseResult, "HSeQ": HSeQ, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo
                                , "user": sessionStorage["HUserName"], "HWHID": HWHID, "HSPID": HSPID, "HSupID": HSupID, "HKeeperID": HKeeperID
                                , "HMaterID": HMaterID, "HSourceBillType": HSourceBillType, "HSLInterID": HSLInterID, "HSLEntryID": HSLEntryID, "HSLBillNo": HSLBillNo, "HSLSeQ": HSLSeQ, "HBillNo": HBillNo, "HInterID": HInterID
                                , "HMaterID": HMaterID, "HSourceBillType": HSourceBillType, "HSLInterID": HSLInterID, "HSLEntryID": HSLEntryID, "HSLBillNo": HSLBillNo, "HSLSeQ": HSLSeQ, "HBillNo": HBillNo, "HInterID": HInterID, "HBatchNo": HBatchNo
                            },
                            dataType: "json",
                            success: function (data) {
@@ -1029,7 +1037,7 @@
                                $("#HUnitName").val(result.data[0].HUnitName);
                                $("#HWHName_B").val(result.data[0].HWHName_B);
                                $("#HSPName_B").val(result.data[0].HSPName_B);
                                $("#HBatchNo").val(result.data[0].HBatchNo);
                                $("#HBatchNo").val(result.data[0].HBatChNo);
                                $("#HZJOrgName").val(result.data[0].HZJOrgName);
                                $("#HZJOrgNumber").val(result.data[0].HZJOrgNumber);
                                $("#HSupName").val(result.data[0].HSupName);
@@ -1142,6 +1150,69 @@
                audio.play();
            }
            //拍照上传
            function PicUploads() {
                var ProImgByList = $('#ProImgByList')
                    , uploadListIns = upload.render({
                        elem: '#camera'
                        , url: GetWEBURL() + "/Cj_StationOutBill/UploadFile2"
                        , accept: 'file'
                        , multiple: true
                        , acceptMime: 'image/*'
                        , 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 å€¼ï¼Œä»¥å…åˆ é™¤åŽå‡ºçŽ°åŒåæ–‡ä»¶ä¸å¯é€‰
                                });
                                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'); //显示上传
                        }
                    });
            }
            //文件上传
            function PicUpload() {