| | |
| | | ,{field: 'vadf2', align: 'center',title: '分解段,%', hide:true,edit:true} |
| | | ,{field: 'yellowness', align: 'center',title: '黄度',edit:true} |
| | | ,{field: 'opacity', align: 'center',title: '不透明度,%',edit:true} |
| | | ,{field: 'lactideContent', 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} |
| | |
| | | }, |
| | | //height: 'full', |
| | | limit: 500, |
| | | limits: [16, 50, 100, 200, 500,], |
| | | limits: [16, 50, 100, 200, 500,2000,5000,10000], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | |
| | | layer.confirm('确定修改'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/pla/update/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(data), |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | traditional:true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | break; |
| | | case 'updateDataByAdmin': |
| | | var data = checkStatus.data; |
| | | if (data.length === 0){ |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定修改'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/pla/updateByAdmin/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(data), |
| | | contentType:'application/json;charset=UTF-8', |
| | |
| | | |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | iframe.child(dataSave) |
| | | }, |
| | | end: function() { |
| | | // ✅ 子页面关闭时刷新表格 |
| | | tableReload(false); // 或根据实际情况传 true/false |
| | | } |
| | | }); |
| | | }) |