| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@include file="/context/mytags.jsp"%>
- <!DOCTYPE html >
- <html>
- <head>
- <title>所有项目列表</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="userid" type="hidden" value=${userid} >
- <t:datagrid name="selectList" checkbox="false" pagination="true" fitColumns="true" title="服装档案" actionUrl="clothingOnhandController.do?datagrid&userid=${userid}" idField="id" fit="true" queryMode="group">
- <t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="领料点名称" field="warehousename" query="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="领料点id" field="warehouseid" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="服装id" field="clothingid" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="服装名称" field="clothingname" query="true" queryMode="single" dictionary="t_b_clothing,id,name,clothingid,clothingname" popup="true" width="120"></t:dgCol>
- <t:dgCol title="款式" field="type" queryMode="single" dictionary="clothingtype" width="120"></t:dgCol>
- <t:dgCol title="单位" field="unit" queryMode="single" dictionary="metering_calcu_unit" width="120"></t:dgCol>
- <t:dgCol title="数量" field="quantity" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="使用状态" field="usingstatus" queryMode="single" dictionary="usingstatus" width="120"></t:dgCol>
- <t:dgCol title="启用日期" field="startdate" formatter="yyyy-MM-dd" width="120"></t:dgCol>
- <t:dgCol title="预计更换日期" field="exchangedate" formatter="yyyy-MM-dd" queryMode="single" width="120"></t:dgCol>
- </t:datagrid>
- </body>
- </html>
- <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]!=""){
- $("#selectList").datagrid("selectRecord",idArr[i]);
- }
- }
- } */
-
- //编写自定义JS代码获得输入框中的值等父级页面调用取值
- function getReason(){
- var strId="";
- var strName="";
- var strType="";
- var strUnit="";
- var strStartdate="";
- var strWid="";
- var strWname="";
- var selectRows = $("#selectList").datagrid('getSelections');
- for(var i=0;i<selectRows.length;i++){
- for(var key in selectRows[i]){
- //console.log(key+"======="+selectRows[i][key]);
- if(key=="clothingid"){
- if(strId.length>0){
- strId+=","+selectRows[i][key];
- }else{
- strId=selectRows[i][key];
- }
- }
-
- if(key=="clothingname"){
- if(strName.length>0){
- strName+=","+selectRows[i][key];
- }else{
- strName=selectRows[i][key];
- }
- }
-
- if(key=="type"){
- if(strType.length>0){
- strType+=","+selectRows[i][key];
- }else{
- strType=selectRows[i][key];
- }
- }
-
- if(key=="unit"){
- if(strUnit.length>0){
- strUnit+=","+selectRows[i][key];
- }else{
- strUnit=selectRows[i][key];
- }
- }
- if(key=="startdate"){
- if(strStartdate.length>0){
- strStartdate+=","+selectRows[i][key];
- }else{
- strStartdate=selectRows[i][key];
- }
- }
-
- if(key=="warehouseid"){
- if(strWid.length>0){
- strWid+=","+selectRows[i][key];
- }else{
- strWid=selectRows[i][key];
- }
- }
-
- if(key=="warehousename"){
- if(strWname.length>0){
- strWname+=","+selectRows[i][key];
- }else{
- strWname=selectRows[i][key];
- }
- }
- }
- }
- //var strData='[{"strShiftid":"'+strShiftid+'","strShiftName":"'+strShiftName+'","strShiftType":"'+strShiftType+'"}]';
- var strData='[{"strId":"'+strId+'","strName":"'+strName+'","strType":"'+strType+'","strUnit":"'+strUnit+'","strStartdate":"'+strStartdate+'","strWid":"'+strWid+'","strWname":"'+strWname+'"}]';
- return strData;
- }
-
-
- </script>
|