| | |
| | | //{field: 'manu', title: '行号'}, |
| | | {field: 'threeCode', title: '销售单号'}, |
| | | {field: 'deadTime', title: '自由项'}, |
| | | //{field: 'itemNum', title: '行唯一标识'} |
| | | {field: 'processSts$', title: '工序'} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | type: 1, |
| | | title: (expTpe ? '修改' : '添加') + '单据', |
| | | content: $('#editDialog').html(), |
| | | area: '1300px', |
| | | area: '1600px', |
| | | success: function (layero, dIndex) { |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | var isExpAdd = !expTpe; |
| | |
| | | page: true, |
| | | height: '350px;', |
| | | cellMinWidth: 100, |
| | | |
| | | css: [ // 设置单元格样式 |
| | | // 取消默认的溢出隐藏,并设置适当高度 |
| | | '.layui-table-cell{height: 50px; line-height: 40px;}', |
| | | '.layui-table-cell .layui-colorpicker{width: 38px; height: 38px;}', |
| | | '.layui-table-cell select{height: 36px; padding: 0 5px;}' |
| | | ].join(''), |
| | | cols: [[ |
| | | {type: 'numbers', title: '#'}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | |
| | | {field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | {field: 'threeCode', title: '销售订单号(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | {field: 'deadTime', title: '销售订单行号(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | {field: 'processSts', title: '工序', templet: function (d) { |
| | | console.log(d) |
| | | var select = `<select class="layui-select" name="processSts" lay-filter="processStsSelect" data-value=${d.processSts} id=${d.id}> |
| | | <option value="">选择状态</option> |
| | | <option value="1">待加工</option> |
| | | <option value="2">已加工</option> |
| | | <option value="3">无需加工</option> |
| | | </select>`; |
| | | return select; |
| | | }}, |
| | | // {field: 'inQty', title: '已入库量', minWidth: 100, width: 100}, |
| | | // {field: 'unit', title: '单位', width: 80}, |
| | | {field: 'memo', title: '备注' , edit: true}, |
| | | {align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'} |
| | | ]], |
| | | done: function (res) { |
| | | done: function (res,curr, count) { |
| | | console.log(res) |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | | $(".layui-table-body").css('overflow','visible'); |
| | | $(".layui-table-box").css('overflow','visible'); |
| | | $(".layui-table-view").css('overflow','visible'); |
| | | |
| | | var tableElem = this.elem.next('.layui-table-view'); |
| | | count || tableElem.find('.layui-table-header').css('overflow', 'auto'); |
| | | layui.each(tableElem.find('select[name="processSts"]'), function (index, item) { |
| | | var elem = $(item); |
| | | elem.val(elem.data('state')).parents('div.layui-table-cell').css('overflow', 'visible'); |
| | | }); |
| | | form.render();//刷新表单 |
| | | }, |
| | | size: '' |
| | | }; |
| | |
| | | }); |
| | | } |
| | | }); |
| | | // 工具条点击事件 |
| | | form.on('select(processStsSelect)', function (obj) { |
| | | console.log(obj) |
| | | var id = obj.elem.id |
| | | var val = obj.value |
| | | for (let item of xxDataList) { |
| | | if (item.id == id) { |
| | | item.processSts = val |
| | | } |
| | | } |
| | | }); |
| | | // 明细数据修改 |
| | | table.on('edit(formSSXMTable)', function (obj) { |
| | | let index = obj.tr.attr("data-index"); |