From 7ae052d141e69fe9e19392172fc2960134a03232 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 01 十二月 2025 15:54:52 +0800
Subject: [PATCH] 1.采购入库单列表、直接调拨单列表、其他出库单列表、生产入库列表、销售出库单列表:layui中开发 查看包装明细
---
WebTM/views/设备管理/Sb_EquipDotCheckBill_PDA.html | 282 +++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 259 insertions(+), 23 deletions(-)
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckBill_PDA.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckBill_PDA.html"
index eb517d5..5dcd1a5 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckBill_PDA.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckBill_PDA.html"
@@ -287,11 +287,36 @@
</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>
+ <!--<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>
+ <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>
<!--闅愯棌瀛楁-->
@@ -315,23 +340,31 @@
<!--琛屼笅鎷夐�夋嫨(鐐规缁撴灉)-->
<!--<script type="text/html" id="HDotCheckResult">
<select name="HDotCheckResult" lay-filter="HDotCheckResult" id="HDotCheckResult{{d.LAY_TABLE_INDEX+1}}">-->
- <!--<option value="">璇烽�夋嫨</option>-->
- <!--<option value="Y" selected>Y</option>
+ <!--<option value="">璇烽�夋嫨</option>-->
+ <!--<option value="Y" selected>Y</option>
<option value="X">X</option>
</select>
</script>-->
+ <script>
+ var u = navigator.userAgent, app = navigator.appVersion;
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android缁堢鎴栬�卽c娴忚鍣�
+ if (isAndroid) {
+ $(":file").attr('capture', 'camera');
+ }
+ </script>
<script>
layui.config({
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 = [];
@@ -375,6 +408,8 @@
//console.log(d.data);
$("#HInterID").val("0");
$("#HBillNo").val(d.data[0].HBillNo);
+ PicUpload(); //鏂囦欢涓婁紶
+ PicUploads(); //鎷嶇収涓婁紶
}
});
@@ -395,7 +430,7 @@
table.on('toolbar(mainTable)', function (obj) {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
- var NewRow = { "HDotCheckResult": false,"HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": ""};
+ var NewRow = { "HDotCheckResult": false, "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" };
switch (obj.event) {
//鏂板涓�琛�
@@ -466,7 +501,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";
});
})
@@ -483,7 +518,7 @@
$.ajax({
type: "POST",
url: GetWEBURL() + "/Sb_PDA_EquipDotCheckBill/SaveGetEquipDotCheckBillList",
- async: true,
+ async: false,
data: { "msg": sMainSub },
dataType: "json",
success: function (data) {
@@ -491,6 +526,7 @@
layer.msg("鎻愪氦鎴愬姛");
$('#Saver').removeClass("buttom_box_little");
$('#Saver').addClass("layui-btn-disabled").attr("disabled", true);
+ GetEquipDotCheck_Result();
}
else {
$('#Saver').removeClass("layui-btn-disabled").attr("disabled", false);//淇濆瓨鎸夐挳鍚敤
@@ -498,6 +534,7 @@
}
},
error: function (err) {
+ $('#Saver').removeClass("layui-btn-disabled").attr("disabled", false);//淇濆瓨鎸夐挳鍚敤
layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
}
});
@@ -516,7 +553,7 @@
// 娓呯┖琛ㄥ崟 锛堚�渇ormData鈥濇槸琛ㄥ崟鐨刬d锛�
$("#formData")[0].reset();
layui.form.render();
- option.data = [{ "HDotCheckResult": false,"HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": ""}];
+ option.data = [{ "HDotCheckResult": false, "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
table.render(option);
$("#HBarCode").focus();
@@ -538,13 +575,13 @@
$("#HMaker").val(sessionStorage["HUserName"]); //鍒涘缓浜�
layer.close(index);
- });
+ });
})
//#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
@@ -585,7 +622,7 @@
}
});
});
-
+
//琛ㄥご淇℃伅鐢熶骇鐝寮圭獥
form.on('submit(btnShifts)', function () {
//椤甸潰灞�-鑷畾涔�
@@ -597,7 +634,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true
- , content: ['../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_ShiftsList.html', 'yes']
+ , content: ['../Baseset/鍩虹璧勬枡/Gy_Shifts.html', 'yes']
, btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
@@ -623,6 +660,10 @@
//琛ㄥご淇℃伅璁惧淇濆吇瑙勭▼
form.on('submit(HEquipDotCheckRuleInterist)', function () {
+ if ($("#HEquipID").val() == 0 || $("#HEquipID").val() == null || $("#HEquipID").val() == "") {
+ layer.alert("璇峰厛鎵弿璁惧浜岀淮鐮佸甫鍑鸿澶囦俊鎭�");
+ return;
+ }
//椤甸潰灞�-鑷畾涔�
layer.open({
type: 2,
@@ -632,7 +673,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../璁惧绠$悊/璁惧瑙勭▼鍗�/Sb_EquipDotCheckRuleList_PDA.html', 'yes'],
+ content: ['../璁惧绠$悊/璁惧瑙勭▼鍗�/Sb_EquipDotCheckRuleList_PDA.html?HEquipID=' + $("#HEquipID").val(), 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
@@ -665,7 +706,7 @@
if (result != null) {
if (result.count == 1) {
var data = result.data;
- option.data = [{ "HDotCheckResult": false,"HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": ""}];
+ option.data = [{ "HDotCheckResult": false, "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
table.render(option);
if (data.length != 0) //琛ㄤ綋鏁版嵁涓虹┖鏃�
@@ -676,7 +717,7 @@
var checkrow = {
"HDotCheckItemID": data[i].HDotCheckItemID, "HDotCheckCode": data[i].鐐规椤圭洰浠g爜, "HDotCheckItem": data[i].鐐规椤圭洰,
"HDotCheckPart": data[i].鐐规閮ㄤ綅, "HClaim": data[i].鍏蜂綋瑕佹眰, "HManagerID": data[i].璐熻矗浜篒D, "HManagerCode": data[i].璐熻矗浜轰唬鐮�,
- "HManagerName": data[i].璐熻矗浜哄悕绉�, "HSourceInterID": data[i].鐐规璁″垝ID == null ? 0 : data[i].鐐规璁″垝ID, "HSourceEntryID": data[i].鐐规璁″垝瀛怚D == null ? 0 : data[i].鐐规璁″垝瀛怚D, "HSourceBillNo": data[i].鐐规璁″垝鍗�, "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "", "HDotCheckResult": data[i].榛樿缁撹
+ "HManagerName": data[i].璐熻矗浜哄悕绉�, "HSourceInterID": data[i].鐐规璁″垝ID == null ? 0 : data[i].鐐规璁″垝ID, "HSourceEntryID": data[i].鐐规璁″垝瀛怚D == null ? 0 : data[i].鐐规璁″垝瀛怚D, "HSourceBillNo": data[i].鐐规璁″垝鍗�, "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "", "HDotCheckResult": data[i].榛樿缁撹 == 1 ? true : false
};
buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
}
@@ -686,7 +727,7 @@
}
}
else {
- option.data = [{ "HDotCheckResult": false,"HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": ""}];
+ option.data = [{ "HDotCheckResult": false, "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
table.render(option);
layer.alert("璇ヨ澶囨殏鏃犻粯璁ょ偣妫�璁板綍", { icon: 5 });
}
@@ -702,7 +743,7 @@
columns = [
//{ type: 'checkbox' }
{ templet: '#xuhao', title: '搴忓彿', event: "qwe", width: 45 }
- , { field: 'HDotCheckResult', title: '缁撴灉', templet: '#HDotCheckResult', width: 55 }
+ , { field: 'HDotCheckResult', title: '缁撴灉', templet: '#HDotCheckResult', width: 55, unresize: false }
, { field: 'HDotCheckItemID', title: '鐐规椤圭洰ID', edit: 'text', hide: true }
, { field: 'HDotCheckCode', title: '鐐规椤圭洰浠g爜', edit: 'text', event: "HDotCheckCode", width: 115, hide: true }
, { field: 'HDotCheckItem', title: '鐐规椤圭洰', edit: 'text', event: "" }
@@ -732,11 +773,23 @@
, 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 = [{ "HDotCheckResult": false, "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": ""}];
+ option.data = [{ "HDotCheckResult": false, "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
table.render(option);
}
//澧炲姞涓�琛�
@@ -772,6 +825,7 @@
});
}
}
+
//鏁版嵁楠岃瘉
function AllowLoadData(sSubStr) {
if (HCheckNum < 1) {
@@ -804,15 +858,18 @@
layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,璐熻矗浜轰唬鐮佷俊鎭负绌�!", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return false;
}
- else {
- return true;
- }
+ //if (sSubStr[i].HDotCheckResult != true) {
+ // layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,缁撴灉淇℃伅涓哄嬀閫�!", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ // return false;
+ //}
}
+ return true;
}
else {
return true;
}
}
+
//鎵潯鐮�
function GetMeesageByBarCode(obj) { //杩斿洖宸ヤ綔涓績
var HBarCode = $('#HBarCode').val();//鏉″舰鐮侊紙娴佽浆鍗″彿锛夛紙鏁版嵁搴撲腑涓哄崟鎹彿锛�
@@ -852,6 +909,7 @@
}
});
}
+
function get_DocCheckItem() {
$.ajax({
url: GetWEBURL() + "/Web/GetItemByEquipFile",
@@ -869,7 +927,7 @@
for (let i = 0; i < data.length; i++) {
rowdata.push(
{
- "HDotCheckResult": data[i].榛樿缁撹, "HDotCheckItemID": data[i].鐐规椤圭洰ID, "HDotCheckCode": data[i].鐐规椤圭洰浠g爜, "HDotCheckItem": data[i].鐐规椤圭洰鍚嶇О,
+ "HDotCheckResult": data[i].榛樿缁撹 == 1 ? true : false, "HDotCheckItemID": data[i].鐐规椤圭洰ID, "HDotCheckCode": data[i].鐐规椤圭洰浠g爜, "HDotCheckItem": data[i].鐐规椤圭洰鍚嶇О,
"HDotCheckPart": data[i].鐐规閮ㄤ綅, "HClaim": data[i].鍏蜂綋瑕佹眰, "HManagerID": data[i].璐熻矗浜篒D, "HManagerCode": data[i].璐熻矗浜轰唬鐮�,
"HManagerName": data[i].璐熻矗浜哄悕绉�, "HSourceInterID": data[i].鐐规璁″垝ID, "HSourceEntryID": data[i].鐐规璁″垝瀛怚D, "HSourceBillNo": data[i].鐐规璁″垝鍗�, "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": ""
}
@@ -878,6 +936,9 @@
option.data = rowdata;
table.render(option);
}
+ else {
+ layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
}
})
}
@@ -885,7 +946,7 @@
//琛ㄦ牸琛屽唴浜嬩欢蹇嵎閿瓫閫�
function set_GridCellCheck(obj) {
$(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
- if (event.key == "F7") {
+ if (event.key == "F7") {
if (obj.event === 'HDotCheckItemClassName') //鐐规椤圭洰鍒嗙被
{
//椤甸潰灞�-鑷畾涔�
@@ -960,6 +1021,181 @@
})
}
+
+ upload.render({
+ elem: '#cameraBtn', // 缁戝畾鍏冪礌
+ url: GetWEBURL() + "/Sb_EquipDotCheckBill/UploadFile",
+ accept: 'images', // 鎸囧畾鍏佽涓婁紶鐨勬枃浠剁被鍨�
+ type: 'camera', // 璁剧疆绫诲瀷涓篶amera锛岃皟鐢ㄧ浉鏈�
+ done: function (res) {
+ // 涓婁紶瀹屾瘯鍥炶皟
+ if (res.status === 200) {
+ // 鍋囪鍚庣杩斿洖鐨勬槸鍥剧墖鍦板潃
+ $('#cameraImg').append('<img src="' + res.data.src + '" alt=""/>');
+ }
+ },
+ error: function () {
+ // 涓婁紶鍑洪敊鐨勫洖璋�
+ console.log('涓婁紶鍑洪敊');
+ }
+ });
+
+ //鏂囦欢涓婁紶
+ function PicUpload() {
+ //澶氬浘鐗囦笂浼�
+ //澶氭枃浠跺垪琛ㄧず渚�
+ var ProImgByList = $('#ProImgByList')
+ , uploadListIns = upload.render({
+ elem: '#testList'
+ , url: GetWEBURL() + "/Sb_EquipDotCheckBill/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'); //鏄剧ず涓婁紶
+ }
+ });
+ }
+
+ //鎷嶇収涓婁紶
+ function PicUploads() {
+ var ProImgByList = $('#ProImgByList')
+ , uploadListIns = upload.render({
+ elem: '#camera'
+ , url: GetWEBURL() + "/Sb_EquipDotCheckBill/UploadFile"
+ , accept: 'file'
+ , multiple: true
+ , acceptMime: 'image/*'
+ , auto: false
+ , 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 GetEquipDotCheck_Result() {
+ $.ajax({
+ url: GetWEBURL() + "/Sb_EquipDotCheckBill/getbSB_EquipDotCheckBill_Result",
+ type: "GET",
+ data: { "HBillNO": $("#HBillNo").val(), "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.code == 1) {
+ var HLastResult = data1.data[0].鏈�缁堢粨璁�;
+ if (HLastResult=="涓嶅悎鏍�") {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '寮傚父鍙嶉鍗�',
+ closeBtn: 1,
+ shift: 2,
+ area: ['100%', '100%'],
+ maxmin: true,
+ content: ['../璐ㄩ噺绠$悊/寮傚父鍙嶉/OA_ErrMsgBackBill_PDA.html?OperationType =4&linterid=' + $("#HEquipID").val() +'&HSouceBillType=&HBillNo=&closeType=2' , 'yes'],
+ end: function () {
+ },
+ success: function (layero, index) {
+ }
+ });
+ }
+ }
+ }
+ });
+ }
+
//浠ヤ笂涓簂ayui妯″潡
});
</script>
--
Gitblit v1.9.1