| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@include file="/context/mytags.jsp"%>
- <!DOCTYPE html >
- <html>
- <head>
- <title>根据当前登录用户id查询项目名称列表Part</title>
- <t:base type="jquery,easyui,tools"></t:base>
- </head>
- <body style="overflow-y: hidden" scroll="no">
- <input id="ids" type="hidden" value=${ids} >
- <input id="row" type="hidden" value=${row} >
- <t:datagrid name="goodsInfoList" checkbox="false" pagination="false" fitColumns="true" title="" actionUrl="tBMaterialController.do?goodsdatagrid" idField="id" fit="true" queryMode="group" onLoadSuccess="initCheck">
- <t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
-
- <t:dgCol title="货品分类" query="false" field="belongCategory" queryMode="single" width="50"></t:dgCol>
- <t:dgCol title="货品名称" query="false" field="goodsName" queryMode="single" width="50"></t:dgCol>
- <t:dgCol title="计量单位" query="false" field="salesUnit" queryMode="single" width="50"></t:dgCol>
- <t:dgCol title="规格型号" query="false" field="specification" queryMode="single" width="50"></t:dgCol>
-
-
-
- </t:datagrid>
- <script>
- $(function() {
-
-
- datagrid.prepend($("#pinjie1 div[name='pinjie2']").html());
- $("#pinjie1").html('');
-
-
- datagrid.children(".datagrid-toolbar").children("span:first").after($("#pinjiechaxun1 div[name='pinjiechaxun2']").html());
- $("#pinjiechaxun1").html('');
-
- });
- </script>
- </body>
- </html>
- <div>
- <div id="pinjie1">
- <div name="pinjie2" style="padding:3px; height: auto;height:70px" class="datagrid-toolbar">
- <table style="height:40px;padding:0px" cellpadding="0" cellspacing="1" >
- <tbody>
-
- <tr>
- <td align="right">
- <label class="Validform_label">
- 货品分类:
- </label>
- </td>
- <td class="value">
- <t:dictSelect id="salesUnit" field="salesUnit" type="list" extendJson="{class:'form-control',style:'width:150px'}"
- typeGroupCode="goodsCategory" hasLabel="false" title="货品分类" datatype="*"></t:dictSelect>
-
- </td>
- <td align="right">
- <label class="goodsName">
- 货品名称:
- </label>
- </td>
- <td class="value">
- <input id="goodsName" name="goodsName" type="text" style="width: 157px; " class="inputxt" placeholder="">
- </td>
- <td align="right" style="width: 74px;">
- <label class="Validform_label">
- 规格型号:
- </label>
- </td>
- <td class="value">
- <input id="specification" name="specification" type="text" style="width: 157px; " class="inputxt" placeholder="">
- </td>
- </tr>
- </tbody>
- </table>
- <div style="float: right;height:20px;">
- <span>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-search" onclick="goodsInfoListsearch()">查询</a>
- </span>
- <span>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-reload" onclick="searchReset('goodsInfoList')">重置</a>
- </span>
- </div>
- </div>
- </div>
-
-
- </div>
- <script type="text/javascript">
- //默认选中
- function initCheck(data){
- var ids = "${ids}";
- var idArr = ids.split(",");
- for(var i=0;i<idArr.length;i++){
- if(idArr[i]!=""){
- $("#goodsInfoList").datagrid("selectRecord",idArr[i]);
- }
- }
- }
-
- //编写自定义JS代码获得输入框中的值等父级页面调用取值
- function getReason(){
- var strId="";
- var strBelongCategory="";
- var strGoodsName="";
- var strSalesUnit="";
- var strSpecification="";
- var selectRows = $("#goodsInfoList").datagrid('getSelections');
- for(var i=0;i<selectRows.length;i++){
- for(var key in selectRows[i]){
-
- if(key=="id"){
- if(strId.length>0){
- strId+=","+selectRows[i][key];
- }else{
- strId=selectRows[i][key];
- }
- }
- if(key=="belongCategory"){
- if(strBelongCategory.length>0){
- strBelongCategory+=","+selectRows[i][key];
- }else{
- strBelongCategory=selectRows[i][key];
- }
- }
- if(key=="goodsName"){
- if(strGoodsName.length>0){
- strGoodsName+=","+selectRows[i][key];
- }else{
- strGoodsName=selectRows[i][key];
- }
- }
- if(key=="salesUnit"){
- if(strSalesUnit.length>0){
- strSalesUnit+=","+selectRows[i][key];
- }else{
- strSalesUnit=selectRows[i][key];
- }
- }
- if(key=="specification"){
- if(strSpecification.length>0){
- strSpecification+=","+selectRows[i][key];
- }else{
- strSpecification=selectRows[i][key];
- }
- }
-
-
-
- }
- }
- //var strData='[{"strShiftid":"'+strShiftid+'","strShiftName":"'+strShiftName+'","strShiftType":"'+strShiftType+'"}]';
- var strData='[{"strId":"'+strId+'","strBelongCategory":"'+strBelongCategory+'","strGoodsName":"'+strGoodsName+'","strSalesUnit":"'+strSalesUnit+'","strSpecification":"'+strSpecification+'","row":"${row}"}]';
- return strData;
- }
- function getSelectedRow(){
- var selectRows = $("#goodsInfoList").datagrid('getSelections');
- return selectRows;
- }
-
- </script>
|