| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link href="../css/init.css" rel="stylesheet" />
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link rel="stylesheet" href="../css/WorkOrder/jquery.editable-select.css" />
- <!-- <link rel="stylesheet" href="../js/comboSelect/combo.select.css" /> -->
- <link rel="stylesheet" href="../css/init.css" />
- <link rel="stylesheet" href="../css/WorkOrder/NewAddWorkOrder.css" />
- <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
- <link href="../css/WorkOrder/Search.css" rel="stylesheet">
- <!-- <link rel="stylesheet" href="../js/comboSelect/combo.select.css" /> -->
- <link href="../css/init.css" rel="stylesheet" />
- <title></title>
- <style>
- ul li {
- float: initial;
- list-style: none;
- }
- .repeat-btn{
- width: 100%;
- margin: 30px 0 0 0;
- text-align: center;
- }
- .ckxq .gdxq ul li{
- width: 100%;
- overflow: hidden;
- }
- .ckxq .gdxq ul li .left{
- width: 40%;
- float: left;
- }
- .ckxq .gdxq ul li .right{
- width: 60%;
- float: left;
- }
- </style>
- </head>
- <body class="gray-bg">
- <div class="ckxq">
- <div class="gdxq">
- <div style="width: 100%;">
- <ul>
- <li>
- <div class="left">项目:</div>
- <div class="right"><input id="Gzlrbxm" type="text" value=""></input></div>
- </li>
- <li>
- <div class="left">分类:</div>
- <div class="right"><input id="Gztype" type="text" value=""></input></div>
- </li>
- <li>
- <div class="left">人次:</div>
- <div class="right"><input id="Gzrc" type="text" value=""></input></div>
- </li>
- <li>
- <div class="left">备注:</div>
- <div class="right"><input id="Gzmemo" type="text" value=""></input></div>
- </li>
- </ul>
- </div>
- </div>
-
- </div>
- <div class="repeat-btn">
- <button class="btns" id="HY_save">提 交</button>
- </div>
- <script src="../js/download/download.js"></script>
- <script>
- $(document).ready(function() {
- var ajaxUrl;
- var ids = helper.request.queryString("edit_id");
- if (ids) {
- ajaxUrl = "testusertypeapi/api/TestUserType/upGzlrbs";
- getValue(ids);
- } else {
- ajaxUrl = "testusertypeapi/api/TestUserType/AddGzlrbs";
- }
-
-
- //保存
- $("#HY_save").click(function() {
- // if(!$("#projectid").val()) {
- // layer.confirm('请选择设备状态!', {
- // icon: 2,
- // btn: ['确定'] //按钮
- // });
- // return;
- // }
- // if(!$("#equipname").val()) {
- // layer.confirm('请输入设备名称!', {
- // icon: 2,
- // btn: ['确定'] //按钮
- // });
- // return;
- // }
- addValue(ajaxUrl, ids);
- })
- })
-
- //获取详情
- function getValue(ids) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/GetGzlrbsbyid",
- async: true,
- dataType: 'json',
- data: {
- id: ids
- },
- success: function(data) {
- if (data.state.toLowerCase() == 'success') {
- $('#Gzlrbxm').val(data.data[0].Gzlrbxm); //
- $('#Gztype').val(data.data[0].Gztype); //
-
- $('#Gzrc').val(data.data[0].Gzrc); //
- $('#Gzmemo').val(data.data[0].Gzmemo); //
-
- }
-
- }
- });
-
- }
-
- //添加
- function addValue(ajaxUrl, ids) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + ajaxUrl,
- // url: "http://192.168.1.21:28230/api/Equipment/update",
- async: true,
- dataType: 'json',
- data: {
- id: ids,
- Gzlrbxm: $('#Gzlrbxm').val(), //项目
- Gztype: $('#Gztype').val(), //分类
- Gzrc: $('#Gzrc').val(), //人次
- Gzmemo: $('#Gzmemo').val(), //备注
-
- },
- success: function(data) {
- console.log(1)
- if (data.state.toLowerCase() == 'success') {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- layer.msg(data.message);
- parent.initTable();
- }
- }
- });
- }
- </script>
-
- </body>
-
- </html>
- </body>
- </html>
|