| | |
| | | <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> |
| | |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | PicUpload(); |
| | | PicUploads(); |
| | | } |
| | | }); |
| | | } |
| | |
| | | |
| | | //éåº |
| | | 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 () { |
| | |
| | | if (HBadQty == "") { |
| | | HBadQty = 0; |
| | | } |
| | | if (HRightQty == "") { |
| | | HRightQty = 0; |
| | | } |
| | | if (HSPID == "") { |
| | | HSPID = 0; |
| | | } |
| | |
| | | , "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) { |
| | |
| | | $("#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); |
| | |
| | | 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() { |