| | |
| | | ) |
| | | cols.push.apply(cols, locNormalCols); |
| | | cols.push( |
| | | {field: 'warehouse', align: 'center', title: '库区'} |
| | | {field: 'warehouse$', align: 'center', title: '库区'} |
| | | , {field: 'state', align: 'center', title: '出入库状态', templet: '#locNormalState'} |
| | | , {field: 'modiUser$', align: 'center', title: '修改人员', hide: true} |
| | | , {field: 'modiTime$', align: 'center', title: '修改时间', hide: true} |
| | |
| | | |
| | | // 获取仓库下拉 |
| | | $.ajax({ |
| | | url: baseUrl+"/locArea/queryAll/auth", |
| | | url: baseUrl + "/locArea/queryAll/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | // data: top.reObject(data), |
| | | method: 'POST', |
| | |
| | | var html = ""; |
| | | if (res.data && res.data.length > 0) { |
| | | html += res.data.map(function (item) { |
| | | return "<Option value=" + item.id + ">" + item.name + "</Option>"; |
| | | return "<Option value=" + item.uuid + ">" + item.name + "</Option>"; |
| | | }); |
| | | } |
| | | $('#putSiteSelect').append(html); |
| | | form.render('select'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | |
| | | var records = res.data.records; |
| | | records.map(function (item) { |
| | | locArea.map(function (d) { |
| | | if (d.id == item.warehouse) { |
| | | item.warehouse = d.name; |
| | | if (d.uuid == item.warehouse) { |
| | | item.warehouse$ = d.name; |
| | | } |
| | | }) |
| | | }); |
| | |
| | | matnr: matnr, |
| | | anfme: count, |
| | | id: id, |
| | | warehouse: obj.data.warehouse, |
| | | supplier: obj.data.supplier, |
| | | mnemonic: obj.data.mnemonic, |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl + "/locNormal/update/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(param), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | }, |
| | | layer.confirm("确定修改" + obj.data.maktx + "的数量吗", { |
| | | btn: ['确定', '取消'] |
| | | }, function () { |
| | | // 按钮1的事件 |
| | | $.ajax({ |
| | | url: baseUrl + "/locNormal/update/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(param), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.msg("") |
| | | }, |
| | | }); |
| | | }, function () { |
| | | // 按钮2的事件 |
| | | tableIns.reload(); |
| | | }); |
| | | }); |
| | | |
| | |
| | | } |
| | | switch (obj.event) { |
| | | case 'outLocNormal': |
| | | layer.confirm('确定要出库['+data.matnr+']吗?', { |
| | | layer.confirm('确定要出库[' + data.matnr + ']吗?', { |
| | | btn: ['确定', '取消'] //可以无限个按钮 |
| | | }, function(index, layero){ |
| | | }, function (index, layero) { |
| | | //确定回调-出库 |
| | | $.ajax({ |
| | | url: baseUrl + "/locNormal/outLoc/auth", |
| | |
| | | layer.msg("出库成功"); |
| | | }, |
| | | }); |
| | | }, function(index){ |
| | | }, function (index) { |
| | | //按钮【按钮二】的回调 |
| | | }); |
| | | break; |
| | | case 'removeLocNormal': |
| | | // 移除 |
| | | layer.confirm('确定要移除['+data.matnr+']吗?', { |
| | | layer.confirm('确定要移除[' + data.matnr + ']吗?', { |
| | | btn: ['确定', '取消'] //可以无限个按钮 |
| | | }, function(index, layero){ |
| | | }, function (index, layero) { |
| | | //确定回调-移除 |
| | | $.ajax({ |
| | | url: baseUrl + "/locNormal/removeLoc/auth", |
| | |
| | | layer.msg("移除成功"); |
| | | }, |
| | | }); |
| | | }, function(index){ |
| | | }, function (index) { |
| | | //按钮【按钮二】的回调 |
| | | }); |
| | | break; |