Commit 31a93d57 authored by 李苏's avatar 李苏 💬

测试反馈

parent 6dd69f2e
<div id="kmesCsfkindex" class="gui-div">
<table class="toolbar-table" data-options="id: 'kmesCsfkindexTable',herf:'kzzx/gridset/query'"></table>
<!-- 表格工具栏开始 -->
<div id="kmesCsfkindexTable-toolbar" class="gui-toolbar" data-options="grid:{type:'datagrid',id:'kmesCsfkindexTable'}">
<div class="navbar-toolbar">
<a class="toolbar-print toolbar" href="javascript:void(0)"></a>
<a class="toolbar-export toolbar" href="javascript:void(0)"></a>
<a class="toolbar-reload toolbar" href="javascript:void(0)"></a>
<!--<a class="toolbar-add toolbar" href="javascript:void(0)"></a>-->
<!-- <a class="toolbar-cancelzp toolbar" href="javascript:void(0)"></a> -->
</div>
<div class="form-sub">
<form class="query-criteria">
<ul>
<li class="gui-form-row" >
<div class="gui-col-sm2">
<label class="gui-form-label">产品条码:</label>
<div class="gui-input-block">
<input type="text" name="wosnid" style="width: 100%" ></div>
</div>
<div class="gui-col-sm4">
<div class="gui-col-sm6">
<label class="gui-form-label">加工日期:</label>
<div class="gui-input-date-start">
<input type="text" name="start" style="width: 100%">
</div>
</div>
<div class="gui-col-sm6">
<div class="gui-input-date-end">
<input type="text" name="end" style="width: 100%">
</div>
</div>
</div>
<div class="gui-col-sm3">
<label class="gui-form-label">生产工单:</label>
<div class="gui-input-block">
<input type="text" name="wodjid" style="width: 100%" >
</div>
</div>
<div class="gui-col-sm3">
<label class="gui-form-label">工序:</label>
<div class="gui-input-block">
<input type="text" name="bzgxid" style="width: 100%" >
</div>
</div>
<!--<input type="hidden" name="bxid"/>-->
<input type="hidden" name="fkrid"/>
<input type="hidden" name="bzbzgxid"/>
</li>
</ul>
<span class="toolbar-search-span"><a class="toolbar-search1" style="color:white;" href="javascript:void(0)"></a></span>
</form>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$(function () {
/*js初始化*/
var $div=$('#kmesCsfkindex');
var $datagrid=$div.find(".toolbar-table");
var $datStart=$div.find("input[name='start']");
var $datEnd=$div.find("input[name='end']");
var $txtScgd=$div.find('input[name="wodjid"]');
var $txtWosnid=$div.find('input[name="wosnid"]');
var $bzgxid=$div.find('input[name="bzgxid"]');
var gxName='';var gzzxid="";
var gzzxname="";var fkrName="";
function paramsInit() {
}
function pageInit() {
$datStart.iDatebox();
$datEnd.iDatebox();
$txtScgd.iTextbox();
$txtWosnid.iTextbox();
var options = {
url: 'kmes/gpfk',
noRequest: true,
columns: [[
{title: "产品条码", field: "wosnid", fieldType: "ftString",width:160},
//{title: "工序编码", field: "bzgxCode", fieldType: "ftString",width:100},
{title: "标准工序", field: "bzgxName", fieldType: "ftString",width:100},
{title: "反馈工序", field: "fkgx", fieldType: "ftString",width:100,hidden:true},
//{title: "规格型号", field: "wlxxGg", fieldType: "ftString",width:200},
{title: "合格", field: "hgbz",align:"center", fieldType: "ftString",width:100, formatter:function(value,index,row){
var map={Y:"合格",N:"不合格"};
if(value=="Y"){
return "<span style='color: #216d4c'>"+map[value]+"</span>";
}else if(value=="N"){
return "<span style='color: indianred'>"+map[value]+"</span>";
}else{
return ''
}
}
},
{title: "合格数量", field: "hgsl",fieldType: "int",width:100},
{title: "不合格数量", field: "bhgsl", fieldType: "int",width:100},
{title: "反馈数量", field: "fksl", fieldType: "int",width:100},
{title: "反馈人", field: "fkr", fieldType: "ftString"},
{title: "反馈时间", field: "fksj", fieldType: "ftDateTime"},
{title: "生产工单", field: "woDjid", fieldType: "ftString",width:140},
{title: "物料编码", field: "wlxxCode", fieldType: "ftString",width:120},
{title: "物料名称", field: "wlxxName", fieldType: "ftString",width:160}
]],
dialog: {
footerIn: true,
href: 'kmes/gpfk/edit',
maximized:true,
width:1080,
height:640,
modal: true,
draggable:false,
onSaveCallback:function () {
},
onBeforeLoad:function () {
$(this).dialog("options").queryParams=$.extend({},DataBind.collectData($div),{
gxName:gxName,
gzzxid:gzzxid,
gzzxname:gzzxname,
fkrName:fkrName
})
},
messager:function () {
var flag=true;
if($div.find("input[name='bzgxid']").val()==""){
gas.confirm("您尚未选择工序,无法进行反馈操作。是否重新选择工序?",function () {
run();
flag=false;
},function () {
flag=true
});
}else{
flag=false
}
return flag
},
onDestroy:function () {
$datagrid.datagrid("load",DataBind.collectData($div));
}
}
};
$div.Holder(options);
$("#kmesCsfkindexTable-toolbar").find(".toolbar-cancelzp").iMenubutton({
event:'doAjax',
text:'取消装配',
onClick:function () {
var selectedRow=$div.find('.toolbar-table').datagrid('getSelected');
if(selectedRow==null){
$.messager.alert('提示','请选中一条数据进行操作');
return false;
}
gas.confirm("是否执行该操作",function () {
var index=$div.find('.toolbar-table').datagrid("getRowIndex",selectedRow);
HTTP.post('kmes/gphy/delGpzp',{gpfkid:selectedRow.id},function (result) {
if(result['success']){
$div.find('.toolbar-table').datagrid("deleteRow",index);
$.messager.alert('提示','取消装配成功!');
}else{
$.messager.alert('提示',result['message']||'取消装配失败,请重新操作!');
}
})
})
}
});
$("#kmesCsfkindexTable-toolbar").find(".toolbar-search1").iMenubutton({
text:'搜索',
iconCls:"fa fa-search",
btnCls:"",
onClick:function () {
if($div.find("input[name='bzgxid']").val()==""){
gas.confirm("您尚未选择工序,是否重新选择工序?",function () {
run();
});
}else{
$datagrid.datagrid("load",DataBind.collectData($div));
}
}
});
}
/*数据初始化*/
function dataInit(obj){
}
/*用户操作*/
function run(res){
$bzgxid.iCombobox({valueField: "id", textField: "name", allowNull:false,required:true,allowEdit:false, url: 'gygl/bzgx/queryCsBzgx',onSelect:function (a) {
// $dialog.find("input[name='gxName']").val(a.name);
// $dialog.find("input[name='gzzxid']").val(a.gzzxid||'');
// $dialog.find("input[name='gzzxname']").val(a.gzzxname||'')
gxName=a.name||""
gzzxid=a.gzzxid||""
gzzxname=a.gzzxname||""
},
loadFilter: function (a) {
var datas=a["data"]["records"];
$.each(datas,function (i,item) {
item["name"]=item["gzzxname"]+"-"+item["name"]
});
return datas
}
})
// gas.Dialog({
// title:"选择工序",
// width:480,
// height:280,
// minimizable:false,
// maximizable:false,
// href:"kmes/gphy/gx",
// onInit:function (element) {
// },
// regResultHandler:function (element) {
// if(!element.form("validate")){
// return false
// }
// var data=DataBind.collectData(element);
// $div.find("input[name='bxid']").val(data.bxid||"");
// $div.find("input[name='bzgxid']").val(data.gxid||"");
// $div.find("input[name='fkrid']").val(window.sessionStorage.getItem('userId'));
// fkrName=window.sessionStorage.getItem('userName');
// gxName=data.gxName||"";
// gzzxid=data.gzzxid||'';
// gzzxname=data.gzzxname||"";
// $datagrid.datagrid("options").url="kmes/gpfk/query";
// $datagrid.datagrid("load",DataBind.collectData($div))
// }
// })
}
gas.load(paramsInit,pageInit,dataInit,run);
})
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment