| | |
| | | var upload = layui.upload; |
| | | var form = layui.form; |
| | | |
| | | // 获取仓库下拉 |
| | | $.ajax({ |
| | | url: baseUrl+"/locArea/queryAll/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | // data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | var html = ""; |
| | | if (res.data && res.data.length > 0) { |
| | | html += res.data.map(function (item) { |
| | | return "<Option value="+item.id+">"+item.name+"</Option>"; |
| | | }); |
| | | } |
| | | $('#warehouse').append(html); |
| | | form.render('select'); |
| | | }, |
| | | }); |
| | | |
| | | // 数据保存动作 |
| | | form.on('submit(save)', function () { |
| | | if (banMsg != null) { |
| | |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | parent.layer.closeAll(); |
| | | parent.tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | |
| | | layer.close(loadingIndex); |
| | | }, |
| | | }); |
| | | |
| | | }); |
| | | }); |