|  |  |  | 
|---|
|  |  |  | ,{field: 'packageType', align: 'center',title: '包装类型',edit:true} | 
|---|
|  |  |  | ,{field: 'zpalletType', align: 'center',title: '托盘类型',edit:true} | 
|---|
|  |  |  | ,{field: 'filmWrap', align: 'center',title: '缠膜',edit:true,hide:true} | 
|---|
|  |  |  | ,{field: 'fingerMelting', align: 'center',title: '熔指,g/10min',edit:true} | 
|---|
|  |  |  | ,{field: 'water', align: 'center',title: '水分,ppm', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'fusingPoint', align: 'center',title: '熔点,℃',edit:true} | 
|---|
|  |  |  | ,{field: 'vadf1', align: 'center',title: '挥发段,%', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'vadf2', align: 'center',title: '分解段,%', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'fingerMelting', align: 'center',title: '熔指,g/10min',edit:true} | 
|---|
|  |  |  | ,{field: 'water', align: 'center',title: '水分,ppm', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'fusingPoint', align: 'center',title: '熔点,℃',edit:true} | 
|---|
|  |  |  | ,{field: 'vadf1', align: 'center',title: '挥发段,%', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'vadf2', align: 'center',title: '分解段,%', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'yellowness', align: 'center',title: '黄度',edit:true} | 
|---|
|  |  |  | ,{field: 'opacity', align: 'center',title: '不透明度,%',edit:true} | 
|---|
|  |  |  | ,{field: 'opacity', align: 'center',title: '不透明度,%',edit:true} | 
|---|
|  |  |  | ,{field: 'l', align: 'center',title: 'L*', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'a', align: 'center',title: 'a*', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'b', align: 'center',title: 'b*', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'fillIn', align: 'center',title: '填充,%',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str1', align: 'center',title: '拉伸强度,MPa',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str2', align: 'center',title: '断裂伸长率,%',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str3', align: 'center',title: '缺口冲击,KJ/m2',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str4', align: 'center',title: '维卡,℃',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str5', align: 'center',title: '半结晶时间,min',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str6', align: 'center',title: '结晶度.%',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'fillIn', align: 'center',title: '填充,%',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str1', align: 'center',title: '拉伸强度,MPa',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str2', align: 'center',title: '断裂伸长率,%',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str3', align: 'center',title: '缺口冲击,KJ/m2',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str4', align: 'center',title: '维卡,℃',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str5', align: 'center',title: '半结晶时间,min',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str6', align: 'center',title: '结晶度,%',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'massState', align: 'center',title: '质量状态',edit:true} | 
|---|
|  |  |  | ,{field: 'problem', align: 'center',title: '备注',edit:true,hide:true} | 
|---|
|  |  |  | ,{field: 'direction', align: 'center',title: '应用方向',edit:true,hide:true} | 
|---|
|  |  |  | 
|---|
|  |  |  | ,{field: 'packageType', align: 'center',title: '包装类型',edit:true} | 
|---|
|  |  |  | ,{field: 'zpalletType', align: 'center',title: '托盘类型',edit:true} | 
|---|
|  |  |  | ,{field: 'filmWrap', align: 'center',title: '缠膜',edit:true,hide:true} | 
|---|
|  |  |  | ,{field: 'fingerMelting', align: 'center',title: '熔指,g/10min',edit:true} | 
|---|
|  |  |  | ,{field: 'water', align: 'center',title: '水分,ppm', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'fusingPoint', align: 'center',title: '熔点,℃',edit:true} | 
|---|
|  |  |  | ,{field: 'vadf1', align: 'center',title: '挥发段,%', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'vadf2', align: 'center',title: '分解段,%', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'fingerMelting', align: 'center',title: '熔指,g/10min',edit:true} | 
|---|
|  |  |  | ,{field: 'water', align: 'center',title: '水分,ppm', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'fusingPoint', align: 'center',title: '熔点,℃',edit:true} | 
|---|
|  |  |  | ,{field: 'vadf1', align: 'center',title: '挥发段,%', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'vadf2', align: 'center',title: '分解段,%', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'yellowness', align: 'center',title: '黄度',edit:true} | 
|---|
|  |  |  | ,{field: 'opacity', align: 'center',title: '不透明度,%',edit:true} | 
|---|
|  |  |  | ,{field: 'opacity', align: 'center',title: '不透明度,%',edit:true} | 
|---|
|  |  |  | ,{field: 'l', align: 'center',title: 'L*', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'a', align: 'center',title: 'a*', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'b', align: 'center',title: 'b*', hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'fillIn', align: 'center',title: '填充,%',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str1', align: 'center',title: '拉伸强度,MPa',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str2', align: 'center',title: '断裂伸长率,%',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str3', align: 'center',title: '缺口冲击,KJ/m2',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str4', align: 'center',title: '维卡,℃',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str5', align: 'center',title: '半结晶时间,min',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str6', align: 'center',title: '结晶度.%',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'fillIn', align: 'center',title: '填充,%',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str1', align: 'center',title: '拉伸强度,MPa',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str2', align: 'center',title: '断裂伸长率,%',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str3', align: 'center',title: '缺口冲击,KJ/m2',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str4', align: 'center',title: '维卡,℃',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str5', align: 'center',title: '半结晶时间,min',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'str6', align: 'center',title: '结晶度,%',hide:true,edit:true} | 
|---|
|  |  |  | ,{field: 'massState', align: 'center',title: '质量状态',edit:true} | 
|---|
|  |  |  | ,{field: 'problem', align: 'center',title: '备注',edit:true,hide:true} | 
|---|
|  |  |  | ,{field: 'direction', align: 'center',title: '应用方向',edit:true,hide:true} | 
|---|
|  |  |  | 
|---|
|  |  |  | totalRow: true, // 开启合计行 | 
|---|
|  |  |  | limit: 15, | 
|---|
|  |  |  | limits: [15, 30, 50, 100, 200, 500], | 
|---|
|  |  |  | // toolbar: '#toolbar', | 
|---|
|  |  |  | toolbar: '#toolbar', | 
|---|
|  |  |  | cellMinWidth: 50, | 
|---|
|  |  |  | height: 'full-120', | 
|---|
|  |  |  | cols: [[ | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | <!DOCTYPE html> | 
|---|
|  |  |  | <html lang="en"> | 
|---|
|  |  |  | <head> | 
|---|
|  |  |  | <meta 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="../../static/layui/css/layui.css" media="all"> | 
|---|
|  |  |  | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> | 
|---|
|  |  |  | <link rel="stylesheet" href="../../static/css/common.css" media="all"> | 
|---|
|  |  |  | </head> | 
|---|
|  |  |  | <body> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 详情 --> | 
|---|
|  |  |  | <div id="data-detail" class="layer_self_wrap"> | 
|---|
|  |  |  | <form id="detail" class="layui-form" style="text-align: center"> | 
|---|
|  |  |  | <div class="layui-form layui-card-header"> | 
|---|
|  |  |  | <div class="layui-inline"  style="width:83%;margin-top: 0px;margin-bottom: 5px;"> | 
|---|
|  |  |  | <label class="layui-form-label"><span class="not-null">*</span>订单 号:</label> | 
|---|
|  |  |  | <div class="layui-input-inline cool-auto-complete"> | 
|---|
|  |  |  | <input id="orderNo" class="layui-input" type="text" style="display: none" lay-verify="required"> | 
|---|
|  |  |  | <input id="orderNoV" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" onfocus=this.blur()> | 
|---|
|  |  |  | <div class="cool-auto-complete-window"> | 
|---|
|  |  |  | <input class="cool-auto-complete-window-input" data-key="orderQueryByorderId" onkeyup="autoLoad(this.getAttribute('data-key'))"> | 
|---|
|  |  |  | <select class="cool-auto-complete-window-select" data-key="orderQueryByorderIdSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-inline"  style="width:40%;margin-top: 0px;margin-bottom: 5px;"> | 
|---|
|  |  |  | <label class="layui-form-label"><span class="not-null">*</span>牌  号:</label> | 
|---|
|  |  |  | <div class="layui-input-inline cool-auto-complete"> | 
|---|
|  |  |  | <input id="maktx" class="layui-input" type="text" style="display: none" lay-verify="required"> | 
|---|
|  |  |  | <input id="maktxV" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" onfocus=this.blur()> | 
|---|
|  |  |  | <div class="cool-auto-complete-window"> | 
|---|
|  |  |  | <input class="cool-auto-complete-window-input" data-key="orderDetlQueryByMaktx" onkeyup="autoLoad(this.getAttribute('data-key'))"> | 
|---|
|  |  |  | <select class="cool-auto-complete-window-select" data-key="orderDetlQueryByMaktxSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-inline"  style="width:40%; margin-bottom: 5px;"> | 
|---|
|  |  |  | <label class="layui-form-label"><span class="not-null">*</span>订单重量:</label> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <input id="weight" class="layui-input" type="text" lay-verify="required" readonly="readonly"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-inline"  style="width:40%;margin-top: 0px;margin-bottom: 5px;"> | 
|---|
|  |  |  | <label class="layui-form-label">客户名称:</label> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <input id="customer" class="layui-input" type="text" readonly="readonly"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-inline"  style="width:40%;margin-top: 0px;margin-bottom: 5px;"> | 
|---|
|  |  |  | <label class="layui-form-label">客户电话:</label> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <input id="phone" class="layui-input" type="text" readonly="readonly"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-inline"  style="width:83%; margin-bottom: 5px;"> | 
|---|
|  |  |  | <label class="layui-form-label">客户地址:</label> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <input id="addr" class="layui-input" type="text" readonly="readonly"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-inline"  style="width:83%; margin-bottom: 5px;"> | 
|---|
|  |  |  | <label class="layui-form-label"><span class="not-null">*</span>发货重量:</label> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <input id="qtyWeight" class="layui-input" type="text" lay-verify="required" readonly="readonly"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-form layui-card-header"> | 
|---|
|  |  |  | <div class="layui-inline"  style="width:83%; margin-bottom: 5px;"> | 
|---|
|  |  |  | <label class="layui-form-label">调拨 到:</label> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <input id="allocate" class="layui-input" type="text" readonly="readonly"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-inline"  style="width:83%; margin-bottom: 5px;"> | 
|---|
|  |  |  | <label class="layui-form-label"></span>备  注:</label> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <input id="memo" class="layui-input" type="text"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div class="layui-form layui-card-header" > | 
|---|
|  |  |  | <label class="layui-form-label"><span class="not-null">*</span>选择发货时间:</label> </br> | 
|---|
|  |  |  | <i class="layui-icon layui-icon-date" style="font-size: 30px; color: #3F3F3F;"></i> | 
|---|
|  |  |  | <div class="layui-form-item"> | 
|---|
|  |  |  | <button id="btn-day1-am" type="button" class="delivery layui-btn layui-btn-radius layui-btn-primary">今天下午 80 ✔</button> | 
|---|
|  |  |  | <button id="btn-day2-am" type="button" class="delivery layui-btn layui-btn-radius layui-btn-primary">明天下午</button> | 
|---|
|  |  |  | <button id="btn-day3-am" type="button" class="delivery layui-btn layui-btn-radius layui-btn-primary">后天下午</button> | 
|---|
|  |  |  | <button id="btn-day4-am" type="button" class="delivery layui-btn layui-btn-radius layui-btn-primary">后天下午</button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-form-item "> | 
|---|
|  |  |  | <button id="btn-day1-pm" type="button" class="delivery layui-btn layui-btn-radius layui-btn-primary">今天下午</button> | 
|---|
|  |  |  | <button id="btn-day2-pm" type="button" class="delivery layui-btn layui-btn-radius layui-btn-primary">明天下午</button> | 
|---|
|  |  |  | <button id="btn-day3-pm" type="button" class="delivery layui-btn layui-btn-radius layui-btn-primary">后天下午</button> | 
|---|
|  |  |  | <button id="btn-day4-pm" type="button" class="delivery layui-btn layui-btn-radius layui-btn-primary">后天下午</button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div id="data-detail-btn" class="layui-btn-container layui-form-item"> | 
|---|
|  |  |  | <div id="data-detail-submit-save" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="save">保存</div> | 
|---|
|  |  |  | <div id="data-detail-submit-edit" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="edit">修改</div> | 
|---|
|  |  |  | <div id="data-detail-close" type="button" class="layui-btn" lay-submit lay-filter="close">关闭</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </form> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </body> | 
|---|
|  |  |  | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> | 
|---|
|  |  |  | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> | 
|---|
|  |  |  | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> | 
|---|
|  |  |  | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> | 
|---|
|  |  |  | <script type="text/javascript" src="../../static/js/pla/plaDetl.js" charset="utf-8"></script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 表单弹窗 --> | 
|---|
|  |  |  | <script type="text/html" id="editDialog"> | 
|---|
|  |  |  | <form id="editForm" lay-filter="editForm" class="layui-form" style="text-align: center"> | 
|---|
|  |  |  | <table class="layui-table" id="detailTable" lay-filter="detailTable"></table> | 
|---|
|  |  |  | <div class="layui-btn-container layui-form-item"> | 
|---|
|  |  |  | <button class="layui-btn layui-btn-normal" type="button" lay-submit ew-event="closeDialog">取消</button> | 
|---|
|  |  |  | <button class="layui-btn layui-btn-normal" type="button" lay-submit lay-filter="detailEditSubmit" lay-submit>保存</button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </form> | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </html> | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $('body').keydown(function () { | 
|---|
|  |  |  | if (event.keyCode === 13) { | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var checkData = []; | 
|---|
|  |  |  | var detailData = []; | 
|---|
|  |  |  | var deliveryTime; | 
|---|
|  |  |  | function child(data){ | 
|---|
|  |  |  | checkData = data; | 
|---|
|  |  |  | var allWeight = 0; | 
|---|
|  |  |  | for (var i in checkData){ | 
|---|
|  |  |  | allWeight += (checkData[i].weightAnfme - checkData[i].qtyAnfme) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | $('#qtyWeight').val(allWeight); | 
|---|
|  |  |  | delivery(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //显示4天内预约出库的时间 | 
|---|
|  |  |  | function delivery(){ | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | url: baseUrl+"/plaQty/delivery/auth", | 
|---|
|  |  |  | headers: {'token': localStorage.getItem('token')}, | 
|---|
|  |  |  | contentType:'application/json;charset=UTF-8', | 
|---|
|  |  |  | method: 'POST', | 
|---|
|  |  |  | async: false, | 
|---|
|  |  |  | success: function (res) { | 
|---|
|  |  |  | if (res.code === 200){ | 
|---|
|  |  |  | $('#btn-day1-am').text(res.data[0].text); | 
|---|
|  |  |  | $('#btn-day1-pm').text(res.data[1].text); | 
|---|
|  |  |  | $('#btn-day2-am').text(res.data[2].text); | 
|---|
|  |  |  | $('#btn-day2-pm').text(res.data[3].text); | 
|---|
|  |  |  | $('#btn-day3-am').text(res.data[4].text); | 
|---|
|  |  |  | $('#btn-day3-pm').text(res.data[5].text); | 
|---|
|  |  |  | $('#btn-day4-am').text(res.data[6].text); | 
|---|
|  |  |  | $('#btn-day4-pm').text(res.data[7].text); | 
|---|
|  |  |  | $("#btn-day1-am").hover(function(){ | 
|---|
|  |  |  | $(this).attr("title", res.data[0].user); | 
|---|
|  |  |  | }, function(){ | 
|---|
|  |  |  | $(this).removeAttr("title"); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } else if (res.code === 403){ | 
|---|
|  |  |  | layer.msg(res.msg, {icon: 2}) | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | layer.msg(res.msg, {icon: 2}) | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $('.delivery').click(function (){ | 
|---|
|  |  |  | delivery(); | 
|---|
|  |  |  | deliveryTime = this.textContent; | 
|---|
|  |  |  | this.append(' ✔'); | 
|---|
|  |  |  | $('.delivery').addClass('layui-btn-primary'); | 
|---|
|  |  |  | this.classList.remove('layui-btn-primary'); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | layui.use(['table','laydate', 'form'], function(){ | 
|---|
|  |  |  | var form = layui.form; | 
|---|
|  |  |  | var layer = layui.layer; | 
|---|
|  |  |  | var table = layui.table; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | form.on('submit(edit)', function () { | 
|---|
|  |  |  | var dataList = []; | 
|---|
|  |  |  | for (var i in checkData){ | 
|---|
|  |  |  | var data = { | 
|---|
|  |  |  | "batch" : checkData[i].batch, | 
|---|
|  |  |  | "packageNo" : checkData[i].packageNo, | 
|---|
|  |  |  | "weight" : checkData[i].weightAnfme - checkData[i].qtyAnfme, | 
|---|
|  |  |  | } | 
|---|
|  |  |  | dataList.push(data); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(detailData.length > 0){ | 
|---|
|  |  |  | dataList = detailData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | layer.open({ | 
|---|
|  |  |  | type: 1, | 
|---|
|  |  |  | title: "数量修改", | 
|---|
|  |  |  | content: $('#editDialog').html(), | 
|---|
|  |  |  | area: '700px', | 
|---|
|  |  |  | success: function (layero, dIndex) { | 
|---|
|  |  |  | // 明细表格 | 
|---|
|  |  |  | tableIns = table.render({ | 
|---|
|  |  |  | elem: '#detailTable', | 
|---|
|  |  |  | data: dataList, | 
|---|
|  |  |  | limit: 100, | 
|---|
|  |  |  | even: true, | 
|---|
|  |  |  | cellMinWidth: 50, | 
|---|
|  |  |  | cols: [[ | 
|---|
|  |  |  | {field: 'batch', title: '批号', width: 160}, | 
|---|
|  |  |  | {field: 'packageNo', title: '包号', width: 200}, | 
|---|
|  |  |  | {field: 'weight', title: '数量',edit: true}, | 
|---|
|  |  |  | ]], | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 数据提交动作 | 
|---|
|  |  |  | form.on('submit(save)', function () { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if($('#maktxV').val() != checkData[0].brand){ | 
|---|
|  |  |  | layer.msg("选中的库存牌号与订单牌号不一致,请重新选择订单"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | for (var i in checkData){ | 
|---|
|  |  |  | checkData[i].orderNo = $('#orderNoV').val(); | 
|---|
|  |  |  | checkData[i].customer = $('#customer').val(); | 
|---|
|  |  |  | checkData[i].phone = $('#phone').val(); | 
|---|
|  |  |  | checkData[i].addr = $('#addr').val(); | 
|---|
|  |  |  | checkData[i].orderWeight = detailData[i] ? detailData[i].weight : checkData[i].weightAnfme; | 
|---|
|  |  |  | checkData[i].allocate = $('#allocate').val(); | 
|---|
|  |  |  | checkData[i].memo = $('#memo').val(); | 
|---|
|  |  |  | checkData[i].pakoutTime = deliveryTime; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(!deliveryTime){ | 
|---|
|  |  |  | layer.msg("请选择发货时间"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | url: baseUrl+"/pla/sellout/auth", | 
|---|
|  |  |  | headers: {'token': localStorage.getItem('token')}, | 
|---|
|  |  |  | data: JSON.stringify(checkData), | 
|---|
|  |  |  | contentType:'application/json;charset=UTF-8', | 
|---|
|  |  |  | method: 'POST', | 
|---|
|  |  |  | async: false, | 
|---|
|  |  |  | success: function (res) { | 
|---|
|  |  |  | if (res.code === 200){ | 
|---|
|  |  |  | layer.msg("修改成功"); | 
|---|
|  |  |  | tableReload(true); | 
|---|
|  |  |  | parent.clearTable(); | 
|---|
|  |  |  | } else if (res.code === 403){ | 
|---|
|  |  |  | layer.msg(res.msg, {icon: 2}) | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | layer.msg(res.msg, {icon: 2}) | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | parent.layer.closeAll(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | form.on('submit(detailEditSubmit)', function () { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | detailData = table.cache.detailTable; | 
|---|
|  |  |  | var allWeight = +0; | 
|---|
|  |  |  | for (var i in checkData){ | 
|---|
|  |  |  | //检测修改的数量是否小于等于最大可出库数量 | 
|---|
|  |  |  | if(detailData[i].weight <= checkData[i].weightAnfme - checkData[i].qtyAnfme){ | 
|---|
|  |  |  | checkData[i].orderWeight = detailData[i].weight; | 
|---|
|  |  |  | allWeight = allWeight + Number(detailData[i].weight); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | layer.msg("批号:" + detailData[i].batch + ",包号:" + detailData[i].packageNo + "可出库重量小于修改后的数量,请重新填写"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | $('#qtyWeight').val(allWeight); | 
|---|
|  |  |  | layer.closeAll(); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function tableReload(child) { | 
|---|
|  |  |  | var searchData = {}; | 
|---|
|  |  |  | $.each($('#search-box [name]').serializeArray(), function() { | 
|---|
|  |  |  | searchData[this.name] = this.value; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | (child ? parent.tableIns : tableIns).reload({ | 
|---|
|  |  |  | where: searchData, | 
|---|
|  |  |  | page: { | 
|---|
|  |  |  | curr: 1 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | done: function (res, curr, count) { | 
|---|
|  |  |  | if (res.code === 403) { | 
|---|
|  |  |  | top.location.href = baseUrl+"/"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | pageCurr=curr; | 
|---|
|  |  |  | if (res.data.length === 0 && count !== 0) { | 
|---|
|  |  |  | tableIns.reload({ | 
|---|
|  |  |  | where: searchData, | 
|---|
|  |  |  | page: { | 
|---|
|  |  |  | curr: pageCurr-1 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | pageCurr -= 1; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | limit(child); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|