<!DOCTYPE html>
|
<html xmlns="http://www.w3.org/1999/xhtml" style="background-color:white;">
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<title>产线组托单</title>
|
<meta name="renderer" content="webkit">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
<link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
|
<link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
|
<script src="../../../layuiadmin/layui/layui.js"></script>
|
<script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script>
|
<script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
|
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
|
<script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
|
<script src="../../../layuiadmin/MESLanguage.js"></script>
|
<style>
|
.layui-form-label {
|
font-size: 14px;
|
width: 85px;
|
text-align: inherit;
|
}
|
</style>
|
</head>
|
<body>
|
<div class="layui-fluid">
|
<div class="layui-card">
|
<div class="layui-card-body" style="padding: 15px;">
|
<form class="layui-form" action="" lay-filter="component-form-group">
|
<div class="layui-form-item" style="margin-bottom: 20px;">
|
<button type="button" lay-submit="" lay-filter="HAddBT" class="layui-btn layui-btn-radius">新增</button>
|
<button type="button" id="Saver-btn" lay-submit="" lay-filter="Saver" class="layui-btn layui-btn-radius">保存</button>
|
<button type="button" lay-submit="" lay-filter="Close" class="layui-btn layui-btn-radius layui-btn-danger">退出</button>
|
<div class="layui-inline">
|
<div class="layui-input-block">
|
<select name="dymb" id="dymb">
|
<option value="ZTDPrint">组托单物料标识卡(网页版)</option>
|
</select>
|
</div>
|
</div>
|
<button type="button" lay-submit="" lay-filter="Print" id="Print" class="layui-btn layui-btn-radius">打印</button>
|
</div>
|
<div class="layui-form-item">
|
<div class="layui-row" style="padding:10px 0">
|
<div class="layui-col-xs3 layui-inline">
|
<fieldset class="layui-elem-field layui-field-title" style="text-align:center;">
|
<legend id="BT_CXZTD">产线组托单</legend>
|
</fieldset>
|
</div>
|
<div class="layui-col-xs1 layui-inline">
|
<img src="222.jpg" style="width:70%;height:50%;" />
|
</div>
|
<div class="layui-col-xs4 layui-inline">
|
<div>
|
<label class="layui-inline" style="width:70px;" id="BT_HBarCode_Pack">装箱条码</label>
|
<div class="layui-inline">
|
<input type="text" style="border-radius: 50px;width: 140%;" name="HBarCode_Pack" id="HBarCode_Pack" placeholder="请输入装箱条码" autocomplete="off" class="layui-input">
|
</div>
|
</div>
|
<div>
|
<label class="layui-inline" style="width:70px;" id="BT_HBatchNo"><span style="color:red">*</span>入库批次</label>
|
<div class="layui-inline">
|
<input type="text" style="border-radius: 50px;width: 140%;" name="HBatchNo" id="HBatchNo" placeholder="请输入入库批次" autocomplete="off" class="layui-input" lay-verify="required">
|
</div>
|
</div>
|
<div>
|
<label class="layui-inline" style="width:70px;" id="BT_HBarCode_Cus">黑标号</label>
|
<div class="layui-inline">
|
<input type="text" style="border-radius: 50px;width: 140%;" name="HBarCode_Cus" id="HBarCode_Cus" autocomplete="off" class="layui-input">
|
</div>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<div class="">
|
<label class="layui-inline" style="width:60px;" id="BT_zxQty">装箱数量</label>
|
<div class="layui-inline">
|
<input type="text" style="border-radius: 50px;" name="" id="zxQty" placeholder="请输入装箱数量" autocomplete="off" class="layui-input">
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<!--待接收工单&今日进站-->
|
<div class="layui-card layui-form-item">
|
<div class="layui-card-body">
|
<div class="layui-tab">
|
<ul class="layui-tab-title" lay-filter="tab-all">
|
<li data-status="" class="layui-this">扫码记录</li>
|
</ul>
|
<div class="layui-tab-content">
|
<div class="layui-tab-item layui-show">
|
<div class="layui-row">
|
<div class="layui-col-xs12">
|
<table class="layui-hide" id="ztd-table" lay-filter="ztd-table"></table>
|
<script type="text/html" id="smjl-toolbar">
|
<div class="layui-btn-container">
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>删行</button>
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>编辑</button>
|
</div>
|
</script>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<!--当前工单&其他信息-->
|
<div class="layui-form-item">
|
<div class="layui-col-md8 layui-card-body layui-inline">
|
<div class="layui-tab">
|
<ul class="layui-tab-title" lay-filter="tab-all">
|
<li data-status="" class="layui-this">包装信息</li>
|
<li data-status="2">其他信息</li>
|
</ul>
|
<div class="layui-tab-content">
|
<div class="layui-tab-item layui-show" style="height:250px;">
|
<table>
|
<tbody>
|
<tr>
|
<th style="width:80px;padding:10px" id="BT_LZKH">流转卡号</th>
|
<td>
|
<input type="text" name="流转卡号" id="" lay-verify="" autocomplete="off" placeholder="流转卡号" class="layui-input" style="background-color:#efefef4d" readonly>
|
<input type="hidden" name="流转卡ID" id="HFbarcodeID">
|
<input type="hidden" name="HOrgID" id="HOrgID">
|
</td>
|
<th style="width:80px;padding:10px" id="BT_HDateNow">组装时间</th>
|
<td>
|
<input type="text" name="组装时间" class="layui-input" id="HDateNow" placeholder="组装时间" style="background-color:#efefef4d;" readonly>
|
</td>
|
</tr>
|
<tr>
|
<th style="width:80px;padding:10px" id="BT_HSourceBillNo">生产订单号</th>
|
<td>
|
<input type="text" name="生产订单号" id="HSourceBillNo" lay-verify="" autocomplete="off" placeholder="生产订单号" class="layui-input" style="background-color:#efefef4d" readonly>
|
</td>
|
<th style="width:80px;padding:10px" id="BT_HNumber">产品代码</th>
|
<td>
|
<input type="text" name="产品代码" class="layui-input" id="HNumber" placeholder="产品代码" style="background-color:#efefef4d;" readonly>
|
<input type="hidden" name="物料内码" id="HMaterID">
|
</td>
|
</tr>
|
<tr>
|
<th style="width:80px;padding:10px" id="BT_HMaterName">产品名称</th>
|
<td>
|
<input type="text" name="产品名称" id="HMaterName" lay-verify="" autocomplete="off" placeholder="产品名称" class="layui-input" style="background-color:#efefef4d" readonly>
|
</td>
|
<th style="width:80px;padding:10px" id="BT_HModel">规格型号</th>
|
<td>
|
<input type="text" name="规格型号" class="layui-input" id="HModel" placeholder="规格型号" style="background-color:#efefef4d;" readonly>
|
</td>
|
</tr>
|
<tr>
|
<th style="width:80px;padding:10px" id="BT_HUntil">计量单位</th>
|
<td>
|
<input type="text" name="计量单位" id="" lay-verify="" autocomplete="off" placeholder="计量单位" class="layui-input" style="background-color:#efefef4d" readonly>
|
</td>
|
<th style="width:80px;padding:10px" id="BT_HLZHSL">流转卡数量</th>
|
<td>
|
<input type="text" name="流转卡数量" class="layui-input" id="" placeholder="流转卡数量" style="background-color:#efefef4d;" readonly>
|
</td>
|
</tr>
|
<tr>
|
<th style="width:80px;padding:10px" id="BT_HSCDDSL">生产订单数量</th>
|
<td>
|
<input type="text" name="生产订单数量" id="" lay-verify="" autocomplete="off" placeholder="生产订单数量" class="layui-input" style="background-color:#efefef4d" readonly>
|
</td>
|
<th style="width:80px;padding:10px" id="BT_HBillNo">单据号</th>
|
<td>
|
<input type="text" name="HBillNo" class="layui-input" id="HBillNo" placeholder="单据号" style="background-color:#efefef4d;" readonly>
|
<input type="hidden" name="HInterID" id="HInterID">
|
</td>
|
</tr>
|
<tr>
|
<th style="width:80px;padding:10px" id="BT_HDDGZH">订单跟踪号</th>
|
<td>
|
<input type="text" name="订单跟踪号" id="" lay-verify="" autocomplete="off" placeholder="订单跟踪号" class="layui-input" style="background-color:#efefef4d" readonly>
|
</td>
|
<th style="width:80px;padding:10px" id="BT_HBarCode_wym">托条码</th>
|
<td>
|
<input type="text" name="托条码" class="layui-input" id="HBarCode_wym" placeholder="托条码" style="background-color:#efefef4d;" readonly>
|
<!--隐藏字段-->
|
<input type="hidden" name="HUnitID" id="HUnitID">
|
</td>
|
</tr>
|
<tr>
|
<th style="width:80px;padding:10px" id="BT_HProjectNum">项目号</th>
|
<td>
|
<input type="text" name="项目号" id="HProjectNum" lay-verify="" autocomplete="off" placeholder="项目号" class="layui-input" style="background-color:#efefef4d" readonly>
|
</td>
|
</tr>
|
</tbody>
|
</table>
|
</div>
|
<div class="layui-tab-item" style="height:250px;">
|
<table>
|
<tbody>
|
<tr>
|
<th style="width:80px;padding:10px" id="BT_HMaker">制单人</th>
|
<td>
|
<input type="text" name="HMaker" id="HMaker" lay-verify="" autocomplete="off" placeholder="制单人" class="layui-input" style="background-color:#efefef4d" readonly>
|
</td>
|
<th style="width:80px;padding:10px" id="BT_HMakeDate">制单日期</th>
|
<td>
|
<input type="text" name="HMakeDate" class="layui-input" id="HMakeDate" placeholder="制单日期" style="background-color:#efefef4d;" readonly>
|
</td>
|
</tr>
|
<tr>
|
<th style="width:80px;padding:10px" id="BT_HUpdateMan">修改人</th>
|
<td>
|
<input type="text" name="修改人" id="" lay-verify="" autocomplete="off" placeholder="修改人" class="layui-input" style="background-color:#efefef4d" readonly>
|
</td>
|
<th style="width:80px;padding:10px" id="BT_HUpdate">修改日期</th>
|
<td>
|
<input type="text" name="修改日期" class="layui-input" id="" placeholder="修改日期" style="background-color:#efefef4d;" readonly>
|
</td>
|
</tr>
|
<tr>
|
<th style="width:80px;padding:10px" id="BT_HCheckMan">审核人</th>
|
<td>
|
<input type="text" name="审核人" id="" lay-verify="" autocomplete="off" placeholder="审核人" class="layui-input" style="background-color:#efefef4d" readonly>
|
</td>
|
<th style="width:80px;padding:10px" id="BT_HCheckDate">审核日期</th>
|
<td>
|
<input type="text" name="审核日期" class="layui-input" id="" placeholder="审核日期" style="background-color:#efefef4d;" readonly>
|
</td>
|
</tr>
|
</tbody>
|
</table>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</form>
|
</div>
|
</div>
|
</div>
|
|
<script type="text/html" id="toolBar">
|
<a class="layui-btn layui-btn-xs" lay-event="del" style="background-color: red;">删除</a>
|
</script>
|
|
<script>
|
|
layui.config({
|
base: '../../../layuiadmin/' //静态资源所在路径
|
}).extend({
|
index: 'lib/index' //主入口模块
|
}).use(['index', 'form', 'laydate', 'table', 'element'], function () {
|
var $ = layui.$
|
, admin = layui.admin
|
, element = layui.element
|
, layer = layui.layer
|
, laydate = layui.laydate
|
, table = layui.table
|
, form = layui.form
|
, util = layui.util;
|
|
var zxQty;//输入的装箱数量
|
var zxQtyFlag = 0;
|
|
|
|
//判断是否登录 未登录则跳到登录页
|
if (sessionStorage.login != "login") {
|
layer.confirm(get_MessageError("[0000-2-041]登录失效,请重新登录!", sessionStorage["HTranSlate"]), {
|
icon: 4, skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]温馨提示", sessionStorage["HTranSlate"]), closeBtn: 0, btn: [get_MessageError('[0000-2-042]重新登录', sessionStorage["HTranSlate"])]
|
}, function () { parent.location.href = "../user/login.html"; });
|
return;
|
}
|
//单据类型
|
var HBillTyp = '2601';
|
$('#HMaker').val(sessionStorage["HMaker"]);
|
$("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
|
$("#HOrgID").val(sessionStorage["OrganizationID"]);
|
//进入页面默认装箱码不能填
|
$("#HBarCode_Pack").attr("readonly", "readonly");//数量只读
|
$("#HBarCode_Pack").css("background-color", "#efefef4d");
|
//进入页面默认光标在装箱数量上
|
$("#zxQty").focus();
|
$("#zxQty").css("box-shadow", "0 0 0 1px #00ff00");
|
|
//页面初始化赋值
|
//获取单据号
|
layer.load(3);
|
$.ajax({
|
url: GetWEBURL() + "/Web/GetMAXNum",
|
type: "GET",
|
async: false,
|
data: { "HBillType": '3783' },
|
success: function (d) {
|
$("#HInterID").val(d.data[0].HInterID);
|
$("#HBillNo").val(d.data[0].HBillNo);
|
layer.closeAll("loading");
|
}, error: function () {
|
layer.closeAll("loading");
|
layer.alert(get_MessageError("[0000-2-004]获取单据号失败!", sessionStorage["HTranSlate"]), { icon: 5 });
|
}
|
});
|
|
//主表列表
|
var option = {
|
elem: '#ztd-table'
|
//, toolbar: '#toolbarDemo'
|
//, page: true
|
//, height: 256
|
, cellMinWidth: 90
|
, limit: 500
|
, cols: [[
|
{ type: 'numbers', title: '序号', hide: true }
|
, { field: 'HInterID', title: '单据ID', hide: true }
|
, {
|
field: 'HDate', title: '制单日期', width: 110, templet: function (d) {
|
if (d.HDate == null) {
|
return "";
|
}
|
return util.toDateString(d.HDate, "yyyy-MM-dd");
|
}
|
}
|
, { field: 'HBillNo', title: '包装单号' }
|
, { field: 'HRemark', title: '不满箱标识' }
|
, { field: 'HMaker', title: '制单人' }
|
, { field: 'HICMOBillNo', title: '流转卡号' }
|
, { field: 'HBarCode_Pack', title: '装箱码' }
|
, { toolbar: '#toolBar', width: 65, fixed: 'right' }
|
//, { field: 'HBillType', title: 'HBillType', hide: true }
|
]]
|
, text: {
|
none: '暂无相关数据,请先扫描装箱条码!' //默认:无数据。注:该属性为 layui 2.2.5 开始新增
|
}
|
};
|
|
//初始加载表格
|
option.data = [];
|
table.render(option);
|
var HModName = "Sc_GroupOrderBill";
|
initFunction(1, HModName, sessionStorage["HTranSlate"]);
|
|
//填写装箱数量后光标跳走
|
$('#zxQty').on('keydown', function (event) {
|
zxQty = $("#zxQty").val();
|
if (event.keyCode == 13) {
|
if (!(/(^[1-9]\d*$)/.test(zxQty))) {
|
layer.msg(get_MessageError("[0000-2-043]请输入正确的整数!", sessionStorage["HTranSlate"]));
|
return;
|
}
|
|
if (zxQty == "" || zxQty <= 0) {
|
layer.msg(get_MessageError("[0000-2-044]请输入正确的数量!", sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-035]退出', sessionStorage["HTranSlate"])], time: 100000, offset: 't' });
|
return;
|
} else {
|
$("#zxQty").val("" + zxQtyFlag + "/" + zxQty + "");
|
$("#zxQty").attr("readonly", "readonly");//数量只读
|
$("#zxQty").css("background-color", "#efefef4d");
|
$("#zxQty").css("box-shadow", "none");
|
//光标跳转到装箱码上
|
$("#HBarCode_Pack").removeAttr("readonly");//移除子件条码只读
|
$("#HBarCode_Pack").css("background-color", "white");
|
$("#HBarCode_Pack").focus();
|
$("#HBarCode_Pack").css("box-shadow", "0 0 0 1px #00ff00");
|
}
|
}
|
});
|
|
|
//扫装箱码
|
$('#HBarCode_Pack').on('keydown', function (event) {
|
if (sessionStorage.login != "login") {
|
layer.confirm(get_MessageError("[0000-2-041]登录失效,请重新登录!", sessionStorage["HTranSlate"]), {
|
icon: 4, skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]温馨提示", sessionStorage["HTranSlate"]), closeBtn: 0, btn: [get_MessageError('[0000-2-042]重新登录', sessionStorage["HTranSlate"])]
|
}, function () { parent.location.href = "../user/login.html"; });
|
}
|
|
if (event.keyCode == 13) {
|
if (zxQty == zxQtyFlag) {
|
layer.alert(get_MessageError("[3783-2-002]装箱数量已扫完,请点击保存!", sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-035]退出', sessionStorage["HTranSlate"])], time: 100000, offset: 't' });
|
return;
|
}
|
}
|
|
var HInterID = $('#HInterID').val();
|
var HBillNo = $('#HBillNo').val();
|
var HMaker = $('#HMaker').val();
|
var HBarCode_Pack = $('#HBarCode_Pack').val();
|
if (event.keyCode == 13) {
|
var index = layer.load();
|
$.ajax({
|
url: GetWEBURL() + "/GroupOrderBill/GetPackBarCode",
|
type: "GET",
|
async: false,
|
data: {
|
"HInterID": HInterID
|
, "HBillNo": HBillNo
|
, "HBillTyp": HBillTyp
|
, "HMaker": HMaker
|
, "HBarCode_Pack": HBarCode_Pack
|
, "HOrgID": $("#HOrgID").val()
|
},
|
success: function (result) {
|
if (result.count == 1) { // 说明验证成功了,
|
var sSubStr = result.data;
|
//var tableStr = table.cache['ztd-table'];
|
//for (var i = 0; i < tableStr.length; i++) {
|
// if (tableStr[i].HBarCode_Pack == sSubStr[0].HBarCode_Pack) {
|
// layer.close(index);
|
// $('#HBarCode_Pack').val("");
|
// layer.msg("该装箱码已扫描,请勿重复扫码", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
// return;
|
// }
|
//}
|
zxQtyFlag++;
|
$("#zxQty").val("" + zxQtyFlag + "/" + zxQty + "");
|
var datas = table.cache["ztd-table"];
|
option.data = datas;
|
option.data.push(sSubStr[0]);
|
table.render(option);
|
layer.close(index);
|
$('#HBarCode_Pack').val("");
|
layer.msg(get_MessageError("[0000-2-045]扫码成功!", sessionStorage["HTranSlate"]), { icon: 1, time: 1000 });
|
}
|
else {
|
layer.close(index);
|
layer.msg(get_MessageError(result.Message, sessionStorage["HTranSlate"]), { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]温馨提示", sessionStorage["HTranSlate"]) });
|
}
|
},
|
error: function (err) {
|
layer.close(index);
|
layer.msg(get_MessageError("[0000-1-002]接口请求失败!", sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-008]确认', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]温馨提示", sessionStorage["HTranSlate"]) });
|
}
|
});
|
}
|
});
|
|
//保存提交
|
form.on('submit(Saver)', function (data) {//提交
|
|
if (parseInt(zxQty) > zxQtyFlag) {
|
layer.alert(msgget_MessageError("[3783-2-005]装箱数量未扫完,请扫完装箱数量!", sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-035]退出', sessionStorage["HTranSlate"])], time: 100000, offset: 't' });
|
return;
|
}
|
|
//var tableData = data.field;
|
var oMain = data.field;
|
var index = layer.load();
|
$.ajax({
|
type: "POST",
|
url: GetWEBURL() + "/GroupOrderBill/AddBill",
|
async: false,
|
data: { "oMain": oMain },
|
dataType: "json",
|
success: function (data) {
|
if (data.count == 1) {
|
layer.close(index);
|
$('#Saver-btn').addClass("layui-btn-disabled").attr("disabled", true);
|
//$("#Print").click();
|
layer.confirm(
|
get_MessageError('[3783-2-006]保存成功!请继续选择操作!', sessionStorage["HTranSlate"]),
|
{
|
skin: 'layui-layer-lan',
|
closeBtn: 0,
|
btn: [get_MessageError('[0000-2-046]新增', sessionStorage["HTranSlate"]), get_MessageError('[0000-2-047]关闭', sessionStorage["HTranSlate"])],
|
btn2: function () {//新增
|
parent.layui.admin.events.closeThisTabs();
|
}
|
}, function () {//关闭
|
window.location.reload();
|
}
|
);
|
}
|
else {
|
layer.close(index);
|
layer.msg(get_MessageError(data.Message, sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-008]确认', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]温馨提示", sessionStorage["HTranSlate"]) });
|
}
|
},
|
error: function (err) {
|
layer.close(index);
|
layer.msg("错误:" + err, { icon: 5, btn: [get_MessageError('[0000-2-008]确认', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]温馨提示", sessionStorage["HTranSlate"]) });
|
}
|
});
|
|
});
|
|
//退出按钮
|
form.on('submit(Close)', function (data) {//退出
|
layer.confirm(get_MessageError('[0000-1-031]您确定要关闭本页吗?', sessionStorage["HTranSlate"]), { icon: 3, title: get_MessageError("[0000-2-009]温馨提示", sessionStorage["HTranSlate"])}, function (index) {
|
parent.layui.admin.events.closeThisTabs();
|
});
|
});
|
|
//新增按钮
|
form.on('submit(HAddBT)', function (data) {//退出
|
layer.confirm(get_MessageError('[0000-2-048]您确定要新增吗?', sessionStorage["HTranSlate"]), { icon: 3, title: get_MessageError("[0000-2-009]温馨提示", sessionStorage["HTranSlate"]) }, function (index) {
|
window.location.reload();
|
});
|
});
|
|
//打印按钮
|
form.on('submit(Print)', function (data) {//退出
|
//打开打印模板
|
var linterid = $("#HInterID").val();
|
//var linterid = "28973";dymb
|
var Type = $("#dymb").val();
|
var OpenTmp = $("#dymb").text().trim();
|
//var ReportViewer = document.getElementById("ReportViewer");
|
window.open("../../views/BaseSet/HBarPlanPrint.html?linterid=" + linterid.toString() + "&Type=" + Type.toString() + "&OpenTmp=" + OpenTmp.toString());
|
});
|
|
//监听表格中行工具事件
|
table.on('tool(ztd-table)', function (obj) { //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
|
var data = obj.data //获得当前行数据
|
, layEvent = obj.event; //获得 lay-event 对应的值
|
if (layEvent === 'detail') {
|
layer.msg('查看操作');
|
} else if (layEvent === 'del') {
|
layer.confirm(get_MessageError('[0000-1-003]真的删除行么', sessionStorage["HTranSlate"]), function (index) {
|
$.ajax({
|
url: GetWEBURL() + '/GroupOrderBill/DelCacheListByBarCode',
|
type: "GET",
|
async: false,
|
data: { "BarCode": obj.data.HBarCode_Pack },
|
success: function (data) {
|
if (data.count == 1) {
|
zxQtyFlag--;
|
if (zxQtyFlag == 0) {
|
$("#zxQty").val(zxQty);
|
//移除只读属性
|
$("#zxQty").removeAttr("readonly");//移除子件条码只读
|
$("#zxQty").css("background-color", "white");
|
$("#zxQty").css("box-shadow", "0 0 0 1px #00ff00");
|
$("#HBarCode_Pack").css("box-shadow", "none");
|
$("#zxQty").focus();
|
} else {
|
$("#zxQty").val("" + zxQtyFlag + "/" + zxQty + "");
|
}
|
layer.close(index);
|
obj.del(); //删除对应行(tr)的DOM结构
|
layer.msg(get_MessageError('[0000-1-008]删除成功', sessionStorage["HTranSlate"]));
|
} else {
|
layer.alert(get_MessageError(data.code + data.msg, sessionStorage["HTranSlate"]), { icon: 5 });
|
}
|
}, error: function () {
|
layer.msg(get_MessageError("[0000-1-002]接口请求失败!", sessionStorage["HTranSlate"]), {
|
icon: 5, btn: [get_MessageError('[0000-2-008]确认', sessionStorage["HTranSlate"])], time: 100000, offset: 't',
|
skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]温馨提示", sessionStorage["HTranSlate"])
|
});
|
}
|
});
|
});
|
} else if (layEvent === 'edit') {
|
layer.msg('编辑操作');
|
}
|
});
|
|
|
//以上为layui模块
|
});
|
|
</script>
|
</body>
|
</html>
|