入库单添加/编辑页生产日期和过期日期改为日期框选择
| | |
| | | <table id="LAY-app-content-list" name="LAY-app-content-list" lay-filter="LAY-app-content-list"> |
| | | </table> |
| | | <!-- #region 自定义表头 --> |
| | | <div class="headerSetIcon"> |
| | | <!-- <div class="headerSetIcon"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols"> |
| | | <i class="layui-icon"></i> |
| | | </button> |
| | | </div> |
| | | </div> --> |
| | | <!-- #endregion --> |
| | | |
| | | <!-- #region 自定义表头--> |
| | |
| | | } |
| | | }} |
| | | {{ GetBtn(d) }} |
| | | </script> |
| | | |
| | | <script type="text/html" id="templetProductionTime"> |
| | | {{# function GetBtn12(d){ |
| | | return formatDate2(d.Lot1); |
| | | } |
| | | }} |
| | | {{ GetBtn12(d) }} |
| | | </script> |
| | | |
| | | <script type="text/html" id="templetExpirationTime"> |
| | | {{# function GetBtn13(d){ |
| | | return formatDate2(d.Lot2); |
| | | } |
| | | }} |
| | | {{ GetBtn13(d) }} |
| | | </script> |
| | | |
| | | |
| | |
| | | var $ = layui.$, form = layui.form, laydate = layui.laydate, |
| | | table = layui.table, layer = layui.layer; |
| | | laydate.render({ |
| | | elem: '#ProductionDate' |
| | | elem: '#Lot1' |
| | | , format: 'yyyy-MM-dd' //可任意组合 |
| | | }); |
| | | laydate.render({ |
| | | elem: '#ExpirationDate' |
| | | elem: '#Lot2' |
| | | , format: 'yyyy-MM-dd' //可任意组合 |
| | | }); |
| | | var arr = []; |
| | |
| | | { field: 'UnitName', title: '计量单位', align: 'center', width: 70 }, |
| | | { field: 'Standard', title: '规格', width: 160, align: 'center' }, |
| | | { field: 'LotText', title: '批次描述', align: 'center', edit: 'text', width: 160 }, |
| | | { field: 'PackagNo', title: '包装名称', width: 160, templet: "#table-content-Packlist" }, |
| | | { field: 'Lot1', title: '生产日期', align: 'center', edit: 'text', width: 140 }, |
| | | { field: 'Lot2', title: '过期日期', align: 'center', edit: 'text', width: 140 }, |
| | | { field: 'PackagNo', title: '包装名称', templet: "#table-content-Packlist" }, |
| | | { field: 'Lot1', title: '生产日期', align: 'center', event: 'DateC', edit: 'text', width: 140, templet: '#templetProductionTime' }, |
| | | { field: 'Lot2', title: '过期日期', align: 'center', event: 'DateC', edit: 'text', width: 140, templet: '#templetExpirationTime' }, |
| | | |
| | | // { field: 'Price', title: '单价', align: 'center', width: 80 }, |
| | | // { field: 'Money', title: '金额', align: 'center', width: 100 }, |
| | |
| | | }); |
| | | form.render(); |
| | | //自定义列宽 |
| | | SetTableColW('LAY-app-content-list', 'BllAsn/GetArrivalNoticeDetailList2', TotalColsSysArr); |
| | | //SetTableColW('LAY-app-content-list', 'BllAsn/GetArrivalNoticeDetailList2', TotalColsSysArr); |
| | | }, |
| | | cols: colsJson |
| | | }; |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //生产日期和到期日期 |
| | | var data = obj.data; |
| | | if (obj.event == "DateC") { |
| | | var field = $(this).data('field'); |
| | | laydate.render({ |
| | | elem: this.firstChild, |
| | | show: true, |
| | | //type:'datetime', |
| | | format: 'yyyy-MM-dd', |
| | | closeStop: this, |
| | | done: function (value, date) { |
| | | data[field] = value; |
| | | obj.update(data); |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | |
| | | // 保存入库单 |
| | |
| | | if (isHave) { |
| | | continue; |
| | | } |
| | | data[i].Lot1=''; |
| | | data[i].Lot2=''; |
| | | arr.push(data[i]); //属性 |
| | | } |
| | | |