提交 30427d81 authored 作者: chengye's avatar chengye

调整字段自动填充

上级 de529dfe
...@@ -9,6 +9,7 @@ function initbodys(){ ...@@ -9,6 +9,7 @@ function initbodys(){
$('input[name="buydate"]').val(ret.buydt); $('input[name="buydate"]').val(ret.buydt);
$('input[name="price"]').val(ret.price); $('input[name="price"]').val(ret.price);
$('textarea[name="info"]').text(ret.info); $('textarea[name="info"]').text(ret.info);
$('input[name="assetm_id"]').val(ret.assetm_id);
},'post,json'); },'post,json');
}; };
} }
\ No newline at end of file
...@@ -24,15 +24,18 @@ class mode_assetmuseClassAction extends inputAction{ ...@@ -24,15 +24,18 @@ class mode_assetmuseClassAction extends inputAction{
* $addbo Boolean 是否添加时 * $addbo Boolean 是否添加时
*/ */
protected function saveafter($table, $arr, $id, $addbo){ protected function saveafter($table, $arr, $id, $addbo){
// $mArr = []; $mArr = [];
// $mArr['usename'] = $arr['user']; $mArr['usename'] = $arr['user'];
// $mArr['deptname'] = $arr['dept']; $mArr['deptname'] = $arr['dept'];
// m('assetm')->update(); $where = ' id = '.$arr['assetm_id'];
unset($arr['assetm_id']);
m('assetm')->update($mArr,$where);
} }
public function getassetmnumbAjax(){ public function getassetmnumbAjax(){
$sql = 'id = '.$this->post('num'); $sql = 'id = '.$this->post('num');
$data = m('assetm')->getone($sql,"title,price,buydt,CONCAT('型号:',`model_type`,' 机器编号:',`model_id`,' 处理器(CPU):',`model_cpu`,' 内存:',`model_ram`,' 硬盘:',`model_hdd`,' 显卡:',`model_vc`,' 操作系统:',`model_os`) as info"); $data = m('assetm')->getone($sql,"title,price,buydt,CONCAT('型号:',`model_type`,' 机器编号:',`model_id`,' 处理器(CPU):',`model_cpu`,' 内存:',`model_ram`,' 硬盘:',`model_hdd`,' 显卡:',`model_vc`,' 操作系统:',`model_os`) as info");
$data['asset_id'] = $id;
$this->returnjson($data); $this->returnjson($data);
} }
} }
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
*申领人 *申领人
</td> </td>
<td class="ys2" width="35%"> <td class="ys2" width="35%">
{user} {user}{assetm_id}
</td> </td>
<td class="ys1" align="right" width="15%" style="text-align:center;width:15%;background-color:#CCCCCC;"> <td class="ys1" align="right" width="15%" style="text-align:center;width:15%;background-color:#CCCCCC;">
*申领人部门 *申领人部门
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论