...
|
...
|
@@ -110,7 +110,7 @@ |
|
|
<!--{$vo.key}-->
|
|
|
<!--</td>-->
|
|
|
<td>
|
|
|
<a href="{:url('AdminEquipment/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
|
|
|
<a onclick="doEdit(Number('{$vo.id}'))">{:lang('EDIT')}</a>
|
|
|
<a href="{:url('AdminEquipment/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
|
|
|
</td>
|
|
|
</tr>
|
...
|
...
|
@@ -195,7 +195,44 @@ |
|
|
});
|
|
|
}
|
|
|
|
|
|
function doEdit(id) {
|
|
|
openIframeLayer("{:url('AdminEquipment/edit')}?id="+id, '请选择分类', {
|
|
|
area: ['1000px', '800px'],
|
|
|
btn: ['确定', '取消'],
|
|
|
yes: function (index, layero) {
|
|
|
//do something
|
|
|
var iframeWin = window[layero.find('iframe')[0]['name']];
|
|
|
var data = iframeWin.confirm();
|
|
|
$.ajax({
|
|
|
url:"{:url('AdminEquipment/addPost')}",
|
|
|
type:"POST",
|
|
|
data:{
|
|
|
serial_number:data.serial_number,
|
|
|
mac_address:data.mac_address,
|
|
|
name:data.name,
|
|
|
hospital:data.hospital,
|
|
|
note:data.note,
|
|
|
create_time:data.create_time
|
|
|
},
|
|
|
dataType:"JSON",
|
|
|
success:function (data) {
|
|
|
if (data.code===200){
|
|
|
alert('添加成功');
|
|
|
window.location.reload();
|
|
|
}
|
|
|
},
|
|
|
error:function () {
|
|
|
alert('接口异常')
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
console.log(data);
|
|
|
|
|
|
layer.close(index); //如果设定了yes回调,需进行手工关闭
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
function reloadPage(win) {
|
|
|
win.location.reload();
|
|
|
}
|
...
|
...
|
|