凯云水利水电工程造价管理系统 技术解释(十二) 中间单价(三)

来源:互联网 发布:卖家卖假货淘宝介入 编辑:程序博客网 时间:2024/05/16 02:04
中间单间
功能实现

中间单价包含三个部分:一个是中间单价列表,一个是中间单价定额组成表,一个是中间单价定额人材机组成表,中间单价列表,你可以对其进行新增,删除和修改。当点击时,点击添加会在datagrid里面增加一行数据,而数据里面的代号是自动增加,增加完一行数据,你就可以对他进行相应的修改,而修改是在datagrid里面操作的。

    中间单价定额组成表数据处理包括添加定额、新建定额、删除 。

 

   点击一下中间单价的添加定额、会弹出一个窗体,里面有数据的我们·可以通过多条件查询把数据给查询出来,然后双击把数据添加到定额表,而定额里面的数据,我们也可以通过新建定额来进行添加。我们如果觉得数据不好还可以把它给删除。

中间人材机的功能有添加,删去,替换,复制、粘贴,上移,下移:复制现有的数据,复制后的数据代号后会有”复制“两字,整数进行区分。然后进行粘贴到最后一行。



下面就是生成这个界面的html代码

 <table>     <tr>          <td ">     <div style="padding-top:0px">      <table >        <tr>           <td><a onclick="AddAmongGetPrice()" ><input type="submit" value="添加" /></a></td>           <td> <a  ><input type="submit" onclick="deleteRow()"  value="删去" /></a></td>         <td> <a onclick="Price_analysis()" ><input type="submit" value="单价分析" /></a></td>              <td> <a onclick="XiuGaiYiHan()" ><input type="submit"  value="修改一行" /></a></td>        @*   <td style="width:1000px"></td>*@           @*<td><a><input style="width:170px;padding:0px;border:0px;margin:0px" value="."/></a></td>*@        @*   <td> <a onclick="addwindowopen()" ><input type="submit"  value="添加定额"/></a></td>           <td><a onclick="NewToDecide()" ><input  type="submit" value="新建定额" /></a></td>           <td><a onclick="Deleteconstitute()" ><input  type="submit" value="删去" /></a></td>*@        @*   <td><a onclick="" ><input type="submit"value="子单价分析" /></a></td>*@        </tr>            </table>        </div>        </td>    <td>      <table >        <tr>                      <td> <a onclick="addwindowopen()" ><input type="submit"  value="添加定额"/></a></td>           <td><a onclick="NewToDecide()" ><input  type="submit" value="新建定额" /></a></td>           <td><a onclick="Deleteconstitute()" ><input  type="submit" value="删去" /></a></td>           <td><a onclick="son_price()" ><input type="submit"value="子单价分析" /></a></td>         </tr>            </table>    </td>    </tr>     <tr>    <td style="padding-top:0px;width:442px;">    <div style="padding-top:0px;">    <div>     <table id="centreGetPrice" title="中间单价列表" class="easyui-datagrid" style="width:440px;height:300px" data-options="onClickRow:onClickRowCentrelisting,singleSelect:true, onAfterEdit:onAfterModification" >     <thead>      <tr>               <th data-options="field:'BuildProjectID' ,width:60,hidden:true" >建立项目ID</th>         <th data-options="field:'CenterPriceID' ,width:60,hidden:true" >中间单价列表ID</th>         <th data-options="field:'Code' ,width:60" >代号</th>         <th data-options="field:'Name' ,width:80,editor:'text'" > 名称</th>                    <th data-options="field:'Utit',align:'center',width:80,                  formatter:formatterUnit,          editor:{type:'combobox',options:{                                valueField:'NatureGatherDetailID',textField:'NatureGatherDetailName',                                                              url:'/ZhongJianDanJia/UnitBinDing/' }}         "> 单位</th>         <th data-options="field:'BudgetPrice' ,width:60" >预算单价</th>                   <th data-options="field:'GetPriceClassify',align:'center',width:80,                formatter:formatterGetPriceClassify,          editor:{type:'combobox',options:{                                valueField:'GetPriceClassifyID',textField:'GetPriceClassifyName',                                                              url:'/ZhongJianDanJia/getPriceBinDing/' }}         "> 取费类别</th>         <th data-options="field:'Remark' ,width:60,editor:'text'" >备注</th>      </tr>          </thead>          </table>            </div>    取费类别:<br />    <input class="easyui-combobox" style="width:440px" /> <br />    施工方法:<br />    <input style="width:440px;height:130px"  />    </td>     <td>            <div>             <table id="CentreConstitute" title="定额组成" class="easyui-datagrid" style="width:900px;height:260px" data-options="onDblClickRow:setadjustfactor,onClickRow:onClickRowCentreConstitute,singleSelect:true,onAfterEdit:onAfterCentreConstitute">       <thead>                  <tr>          <th data-options="field:'CenterPriceQuoteComeposeID' ,width:60,hidden:true" >中间单价定额组成ID</th>          <th data-options="field:'CenterPriceID' ,width:60,hidden:true" >中间单价列表ID</th>          <th data-options="field:'Code' ,width:100" >编号</th>          <th data-options="field:'Name' ,width:100" > 名称</th>          <th data-options="field:'Unit' ,width:100" >单位</th>          <th data-options="field:'Counts' ,width:100" >数量</th>           <th data-options="field:'BudgetPrice' ,width:100" >人材机总价</th>          <th data-options="field:'ManpowerFactor' ,width:100" > 人工系数</th>          <th data-options="field:'MaterialFacto' ,width:100" >材料系数</th>          <th data-options="field:'MachineFactor' ,width:100" > 机械系数</th>          <th data-options="field:'CombineGetprice' ,width:100" >合价</th>                </tr>        </thead>       </table>                <table>         <tr>         <td><a onclick="openAdd()" ><input type="submit"  value="添加人材机"/></a></td>         <td><a onclick="deleteRowtalents()" ><input  type="submit" value="删去" /></a></td>         <td><a  onclick="replacewindow()" ><input type="submit"value="替换" /></a></td>         <td><a onclick="Copy()" ><input type="submit"  value="复制"/></a></td>         <td><a onclick="patse()" ><input  type="submit" value="粘贴" /></a></td>         <td><a onclick="UpMove()" ><input  type="submit" value="上移" /></a></td>         <td><a onclick="below()" ><input type="submit"value="下移" /></a></td>           <td><a onclick="finish_formation()" ><input type="submit"value="修改一行" /></a></td>         </tr>                </table>                  <table id="AmongConstitute" title="中间定额人材机组成" class="easyui-datagrid" style="width:900px;height:200px"data-options="onClickRow:click1,singleSelect:true, onAfterEdit:onAfterConstitute,onBeforeEdit:onBeforeEdit">          <thead>           <tr>           <th data-options="field:'CenterPriceQuoteMachineID' ,width:60,hidden:true" >中间定额人材机组成ID</th>          <th data-options="field:'CenterPriceQuoteComeposeID' ,width:60,hidden:true" >中间单价定额组成ID</th>          <th data-options="field:'Code' ,width:100" >代号</th>          <th data-options="field:'Name' ,width:100" > 名称</th>          <th data-options="field:'Unit' ,width:100" >单位</th>          <th data-options="field:'BudgetPrice' ,width:100,editor:'text'" >预算单价</th>          <th data-options="field:'QuoteAmout' ,width:100,editor:'text'" > 定额数量</th>          <th data-options="field:'CombineGetprice' ,width:100" >合价</th>          <th data-options="field:'CountNumber' ,width:100,editor:'text'" > 计算数量</th>          <th data-options="field:'Remark' ,width:100" >备注</th>           <th data-options="field:'Type1' ,width:60" >人才机类型</th>                              </tr>                    </thead>                  </table>      </div>            </td>       </tr>        </table>

//下面就是定额组成里面的删去

第一步:删去定额组成,存储过程

第二步:删去定额组层。逻辑层
  public int Deleteconstitute(int Int_CenterPriceQuoteComeposeID)        {            SqlParameter[] mySQL = {                                   new SqlParameter("@type",SqlDbType.Char),                                                                                                                                                                                                    new SqlParameter("@CenterPriceQuoteComeposeID",SqlDbType.Char),                                                                                                                                                               };            mySQL[0].Value = "Deleteconstitute";            mySQL[1].Value = Int_CenterPriceQuoteComeposeID;            int i = Centre.DAL_OPTableDB_Par("CenterPrice", mySQL);//这是把所有参数mySQL传回数据库查询数据            return i;        }

第三步:删去组成:控制器

  public ContentResult Deleteconstitute(string Int_CenterPriceQuoteComeposeID)        {            int i = Centre.Deleteconstitute(Convert.ToInt32(Int_CenterPriceQuoteComeposeID));//这是调用逻辑层的方法            string k = i.ToString();            return Content(k);        }

第四步:删去组成:界面层

 Var centreGetPrice=0;     function  Deleteconstitute(){                        $.getJSON("/ZhongJianDanJia/Deleteconstitute?Int_CenterPriceQuoteComeposeID="+$('#CentreConstitute').datagrid('getSelected').CenterPriceQuoteComeposeID,                                                function(data){                                                alert("删去成功");                                   //点击查询中间组成                                $.getJSON("/ZhongJianDanJia/InquireMiddleConstitute?Int_CenterPriceID="+  $('#centreGetPrice').datagrid('getSelected').CenterPriceID,                                     function (data) {                                     $('#CentreConstitute').datagrid('loadData',data);//这是把查出来的数据绑定给相应的datagrid                                        $('#AmongConstitute').datagrid('loadData',{total:0,rows:[]});   //这是清空数据                                        for(var i=0;i< $('#CentreConstitute').datagrid('getData').rows.length;i++){//这是遍历定额组成里面的所有价格,把它们的合价全部加起来                                                                                                                                                                            centreGetPrice =centreGetPrice +   $('#CentreConstitute').datagrid('getData').rows[i]["CombineGetprice"]*1                                                                                                                                                                        }                                                                              sum_centreGetPrice();//这是调用了下面计算中间单价列表里面的价格的方法                                                              });                                                  });              }

//计算中间单价列表里面的价格

第一步:计算中间单价列表的价格、存储过程


第二步:计算中间单价列表的价格、逻辑层

public int sum_centreGetPrice(string Str_BudgetPrice, int Int_CenterPriceID)        {            SqlParameter[] mySQL = {                                                                           new SqlParameter("@type",SqlDbType.Char),                                                                                                                                                                                                    new SqlParameter("@BudgetPrice",SqlDbType.Char),                                                                             new SqlParameter("@CenterPriceID",SqlDbType.Int),                                                                                 };            mySQL[0].Value = "sum_centreGetPrice";            mySQL[1].Value = Str_BudgetPrice;            mySQL[2].Value = Int_CenterPriceID;            int i = Centre.DAL_OPTableDB_Par("CenterPrice", mySQL);//这是把参数传给数据库mySQL            return i;        }

第三步:计算中间单间加列表里面的价格、控制器

  public ContentResult sum_centreGetPrice(string Str_BudgetPrice, string Int_CenterPriceID)        {            int i = Centre.sum_centreGetPrice(Str_BudgetPrice, Convert.ToInt32(Int_CenterPriceID));//这是调用逻辑层的方法            string k = i.ToString();            return Content(k);        }

第四步:计算中间列表价格,界面层:

  function sum_centreGetPrice(){                                $('#centreGetPrice').datagrid('getData').rows[sum_Index]["BudgetPrice"]=centreGetPrice;//这是把值赋给中间单价列表里面的价格                     centreGetPrice=0;//赋完值就清零                                                                  $.getJSON("/ZhongJianDanJia/sum_centreGetPrice?Str_BudgetPrice=" +$('#centreGetPrice').datagrid('getData').rows[sum_Index]["BudgetPrice"]+ "&"                                                                        +"Int_CenterPriceID="+$('#centreGetPrice').datagrid('getSelected').CenterPriceID+"&",                               function (data) { //这是新增那个价格进数据库                               UnitMingCheng="";GetPriceClassifyMingCheng="";                                         $.getJSON("/ZhongJianDanJia/inquire?Int_BuildProjectID=" + @Session["项目ID"]+ "&",                                        function (data) {                                         $('#centreGetPrice').datagrid('loadData',data);//这是把查出来的数据赋值给相应的datagrid                                        circulate=0;//查一遍就清零,用于判断中间单价列表两个下拉框的绑定判断                                         $('#centreGetPrice').datagrid('selectRow',sum_Index);//这是选中中间列表一行                                       });                                                              });                                  $('#CentreConstitute').datagrid('selectRow',indexdecide);//这也是选中定额组成里面的一行                            }

接下来就到了添加人材机

下面就是打开人材机的窗体



下面就是打开这个窗体的html代码

  <div id="w添加人材机"  title="人材机的组成"  class="easyui-dialog" style="left:100px;top:30px">      <div class="easyui-tabs" style="width:600px;height:300px">      <div title="机械列表"style="padding:10px" >       <table id="MachineryListing" class="easyui-datagrid" style="width:570px;height:230px"  data-options="onDblClickRow:onClickMachineryListing,singleSelect:true">       <thead>                   <tr>                <th field="Code" width="60" align="center">代号</th>                <th field="Name" width="160" align="center">名称</th><th field="Unit" width="80" align="center">单位</th><th field="BudgetPrice" width="100" align="center">预算价格</th><th field="Remark" width="130" align="center">备注</th>        </tr>        </thead>       </table>                  </div>      <div title="人工列表" style="padding:10px" >           <table id="PopleListing" class="easyui-datagrid" style="width:570px;height:230px" data-options="onDblClickRow:onClickPopleListing,singleSelect:true">       <thead>        <tr>                       <th field="Number" width="60" align="center">代号</th>                <th field="Name" width="160" align="center">名称</th><th field="Unit" width="80" align="center">单位</th><th field="BudgetPrice" width="100" align="center">预算价格</th><th field="Remark" width="130" align="center">备注</th>        </tr>        </thead>       </table>                  </div>      <div  title="材料单价" style="padding:10px" @*data-options="iconCls:'icon-help'"*@>             <table id="MaterialListing" class="easyui-datagrid" style="width:570px;height:230px" data-options="onDblClickRow:onClickMaterialListing,singleSelect:true">       <thead>               <tr>                <th field="Code" width="60" align="center">代号</th>                <th field="Name" width="160" align="center">名称</th><th field="Unit" width="80" align="center">单位</th><th field="BudgetPrice" width="100" align="center">预算价格</th><th field="beizhu" width="130" align="center">备注</th>        </tr>        </thead>       </table>                 </div>      <div title="配合比单价" style="padding:10px"  >      <table id="CoordinateGetprice" class="easyui-datagrid" style="width:570px;height:230px" data-options="onDblClickRow:onClickCoordinateGetprice,singleSelect:true">       <thead>        <tr>                         <th field="Code" width="60" align="center">代号</th>                <th field="MixProportionPriceName" width="160" align="center">名称</th><th field="Unit" width="80" align="center">单位</th><th field="BudgetPrice" width="100" align="center">预算价格</th><th field="Remark" width="130" align="center">备注</th>        </tr>        </thead>       </table>                                           </div>              </div>       <table>       <tr>       <td>      <table id="Addconfirmcount" class="easyui-datagrid" style="width:448px;height:200px"  data-options="onClickRow:editor">      <thead>      <tr>                <th field="daihao" width="60" align="center">代号</th>                <th field="mingcheng" width="160" align="center">名称</th><th field="danwei" width="80" align="center">单位</th><th field="yusuanjiage" width="80" align="center">预算价格</th><th field="shuliang" width="70" align="center" editor="text">数量</th>                <th field="leixing" width="90" align="center" editor="text">类型</th>                   <th field="Remark" width="90" align="center"editor="text">备注</th>        </tr>          </thead>            </table>      </td>      <td>            <a onclick="YiChu1()" ><input type="submit" value="移除" /></a>      </td>      </tr>      </table>       <center>      <table>         <tr>      <td style="left:1930px">                                                                                       <a onclick="confirmaddtAlentsChance()" ><input type="submit" value="确定" /></a>        <a onclick="" ><input type="submit" value="取消" /></a>       </td>       </tr>          </table>        </center>        </div>   

//下面就是点击人材机按钮的方法

   function openAdd(){             CoordinateGetprice();//查询配合比                       MaterialListing();   //查询材料列表                       PopleListing();  //查询人工列表                      MachineryListing();   //机械列表查询       if($('#CentreConstitute').datagrid('getSelected')){//这是判断是否选中定额组成          closeWindow();//这是启动一遍窗体的方法,在你关闭下一次关闭窗体的时候就会自动执行        $('#w添加人材机').window('open')//这是打开人材机的窗体       }else{         alert("请选择定额组成")              }     }    function closeWindow(){       $('#w添加人材机').window({                                      onBeforeClose: function () {//这是关闭窗体是触发的方法                     machinery=0; manpower=0;  material=0; coordinate=0;//这些都是下面判断延迟下一次执行的变量                     $('#Addconfirmcount').datagrid('loadData',{total:0,rows:[]});    //这是清空datagrid                 }              });          }

//下面就是查询机械单价、人工列表、材料单价、配合比单价

第一步:查询机械单价、存储过程

第一步:查询人工列表:存储过程


第一步:查询材料单价·、存储过程


第一步:查询配合比单价、存储过程



第二步:查询机械单价、逻辑层

  public DataTable MachineryListing(int Int_BuildProjectID)        {            SqlParameter[] mySQL = {                                   new SqlParameter("@type",SqlDbType.Char),                                     new SqlParameter("@BuildProjectID",SqlDbType.Int),                                                                };            mySQL[0].Value = "MachineryListing";            mySQL[1].Value = Int_BuildProjectID;            DataTable dt = Centre.DAL_SelectDB_Par("CenterPrice", mySQL);            return dt;        }

第二步:查询人工列表、逻辑层

  public DataTable PopleListing(int Int_BuildProjectID)        {            SqlParameter[] mySQL = {                                   new SqlParameter("@type",SqlDbType.Char),                                     new SqlParameter("@BuildProjectID",SqlDbType.Int),                                                                };            mySQL[0].Value = "PopleListing";            mySQL[1].Value = Int_BuildProjectID;            DataTable dt = Centre.DAL_SelectDB_Par("CenterPrice", mySQL);            return dt;        }

第二步:查询材料单价、逻辑层

  public DataTable MaterialListing(int Int_BuildProjectID)        {            SqlParameter[] mySQL = {                                   new SqlParameter("@type",SqlDbType.Char),                                     new SqlParameter("@BuildProjectID",SqlDbType.Int),                                                                };            mySQL[0].Value = "MaterialListing";            mySQL[1].Value = Int_BuildProjectID;            DataTable dt = Centre.DAL_SelectDB_Par("CenterPrice", mySQL);            return dt;        }

第二步:查询配合比单价、逻辑层

public DataTable CoordinateGetprice(int Int_BuildProjectID)        {            SqlParameter[] mySQL = {                                   new SqlParameter("@type",SqlDbType.Char),                                     new SqlParameter("@BuildProjectID",SqlDbType.Int),                                                                };            mySQL[0].Value = "CoordinateGetprice";            mySQL[1].Value = Int_BuildProjectID;            DataTable dt = Centre.DAL_SelectDB_Par("CenterPrice", mySQL);            return dt;        }

第三步:查询机械单价、控制器

public ActionResult MachineryListing(string Int_BuildProjectID)        {            DataTable dt = Centre.MachineryListing(Convert.ToInt32(Int_BuildProjectID));            List<Dictionary<string, object>> listReturn = ConvertHelper.DtToList(dt);            return Json(listReturn, JsonRequestBehavior.AllowGet);        }

第三步:查询人工列表、控制器

  public ActionResult PopleListing(string Int_BuildProjectID)        {            DataTable dt = Centre.PopleListing(Convert.ToInt32(Int_BuildProjectID));            List<Dictionary<string, object>> listReturn = ConvertHelper.DtToList(dt);            return Json(listReturn, JsonRequestBehavior.AllowGet);        }

第三步:查询材料单价、控制器

 public ActionResult MaterialListing(string Int_BuildProjectID)        {            DataTable dt = Centre.MaterialListing(Convert.ToInt32(Int_BuildProjectID));            List<Dictionary<string, object>> listReturn = ConvertHelper.DtToList(dt);            return Json(listReturn, JsonRequestBehavior.AllowGet);        }

第三步:查询配合比单价:控制器

  public ActionResult CoordinateGetprice(string Int_BuildProjectID)        {            DataTable dt = Centre.CoordinateGetprice(Convert.ToInt32(Int_BuildProjectID));            List<Dictionary<string, object>> listReturn = ConvertHelper.DtToList(dt);            return Json(listReturn, JsonRequestBehavior.AllowGet);        }

第四步:查询机械单价、界面层

  function MachineryListing(){            $.getJSON("/ZhongJianDanJia/MachineryListing?Int_BuildProjectID=" + @Session["项目ID"]+ "&",                                    function(data){                                                                           $('#MachineryListing').datagrid('loadData',data);                                     $('#MachineryListingreplace').datagrid('loadData',data);                                    });            }

第四步:查询人工列表、界面层

    function PopleListing(){                   $.getJSON("/ZhongJianDanJia/PopleListing?Int_BuildProjectID=" + @Session["项目ID"]+ "&",                                    function(data){                                                                           $('#PopleListing').datagrid('loadData',data);                                     $('#PopleListingreplace1').datagrid('loadData',data);                                    });      }

第四步:查询材料单价、界面层

function MaterialListing(){                   $.getJSON("/ZhongJianDanJia/MaterialListing?Int_BuildProjectID=" + @Session["项目ID"]+ "&",                                    function(data){                                                                           $('#MaterialListing').datagrid('loadData',data);                                     $('#MaterialListingreplace').datagrid('loadData',data);                                    });      }

第四步:查询配合比单价,界面层

 function CoordinateGetprice(){                   $.getJSON("/ZhongJianDanJia/CoordinateGetprice?Int_BuildProjectID=" + @Session["项目ID"]+ "&",                                    function(data){                                                                           $('#CoordinateGetprice').datagrid('loadData',data);                                     $('#CoordinateGetpricereplace').datagrid('loadData',data);                                    });      }

查询完就到了双击机械单价给下面datagrid赋值的方法,就以双击机械单价为例



下面就是双击给下面的下拉树赋值的方法

          //双击添加机械                           var uuu=0;//这个也是为了用来判断它是否有相等            var machinery=0;//这个是用来让他下一次再执行里面的方法          function onClickMachineryListing(){                for(var i=0;i<  $('#AmongConstitute').datagrid('getData').rows.length;i++){//这是遍历所有中间定额人材机数据                    if($('#AmongConstitute').datagrid('getData').rows[i]["Code"]==$('#MachineryListing').datagrid('getSelected').Code&$('#AmongConstitute').datagrid('getData').rows[i]["Name"]==$('#MachineryListing').datagrid('getSelected').Name){//这是用选中的机械单价来和中间定额人材机来判断是否有重复                          tt=1;                    } else{                    }                    }            if(tt==1){            alert("已有相同");            tt=0;            } else{                 if(machinery=1){//这是延迟让它下一次执行               for(var j=0;j<$('#Addconfirmcount').datagrid('getData').rows.length;j++){//这是遍历机械单价给它赋值的那个datagrid                  if( $('#Addconfirmcount').datagrid('getData').rows[j]["daihao"]== $('#MachineryListing').datagrid('getSelected').Code&$('#Addconfirmcount').datagrid('getData').rows[j]["mingcheng"]==$('#MachineryListing').datagrid('getSelected').Name){//这是那机械单价和下面那个datagrid来判断是否有重复                                           uuu=1;                  }else{}               }               }               machinery=1;                 if(uuu==1){                 alert("已1有相同");                 uuu=0;                 }else{                     var f= $('#Addconfirmcount').datagrid('getData');//这是获取所有数据                 $('#Addconfirmcount').datagrid("insertRow", {//这是新增一行                index: f.rows.length,                 row: {}                });              $('#Addconfirmcount').datagrid('getData').rows[f.rows.length-1]["daihao"]=  $('#MachineryListing').datagrid('getSelected').Code;             $('#Addconfirmcount').datagrid('getData').rows[f.rows.length-1]["mingcheng"]=  $('#MachineryListing').datagrid('getSelected').Name;             $('#Addconfirmcount').datagrid('getData').rows[f.rows.length-1]["danwei"]=  $('#MachineryListing').datagrid('getSelected').Unit;               $('#Addconfirmcount').datagrid('getData').rows[f.rows.length-1]["shuliang"]= 100 ;              $('#Addconfirmcount').datagrid('getData').rows[f.rows.length-1]["yusuanjiage"]=  $('#MachineryListing').datagrid('getSelected').BudgetPrice;                $('#Addconfirmcount').datagrid('getData').rows[f.rows.length-1]["leixing"]= "机械";                  $('#Addconfirmcount').datagrid('getData').rows[f.rows.length-1]["Remark"]= $('#MachineryListing').datagrid('getSelected').Remark;               $('#Addconfirmcount').datagrid('refreshRow',  f.rows.length-1);//这是刷新一行显示数据                             tt=0;                uuu=0;                 yy=0;                 }       }   }

移除选错的数据;

  var editIn=undefined;         var YiChu=undefined;         function editor(dd,data){          YiChu =dd                  $('#Addconfirmcount').datagrid('beginEdit', dd);//开始编制                   if (editIn != index) {                                $('#Addconfirmcount').datagrid('beginEdit', dd);//开始编制                                       $('#Addconfirmcount').datagrid('endEdit', editIn);//结束编制                                      editIn = dd;                            }         }         //移除          function YiChu1(){                                      $('#Addconfirmcount').datagrid('deleteRow',YiChu);//这就是移除选中哪一行          }




仅供学习,禁止用于商业用途







0 0
原创粉丝点击