Commit 0236b79c authored by zhoumaotao's avatar zhoumaotao

检验反馈pc页面

parent bc897b50
......@@ -133,7 +133,7 @@ public class GphyController extends BaseController {
setReturnMessage("请选择一条工票信息进行操作!");
return returnData();
}
gpfkService.delGpzpById(gpfkid);
gpfkService.delGpfkById(gpfkid);
return ThreadContext.getReturnData();
}
......
package com.gavel.kwell.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext;
import com.gavel.kwell.service.GpfkService;
import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkVO;
import com.gavel.persistence.sql.RecordSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("kmes/gpjy")
public class GpjyController extends BaseController {
@Autowired
private GpfkService gpfkService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "kmes/gpjy/index";
}
@ResourcePermissions()
@RequestMapping("/jyindex")
public String jyindex() {
return "kmes/gpjy/jyindex";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add")
public String add() {
......@@ -28,6 +53,39 @@ public class GpjyController extends BaseController {
return "kmes/gpjy/edit";
}
@RequestMapping("/gx")
public String gx() {
return "kmes/gpjy/gx";
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody GpfkCondition condition) {
RecordSet<GpfkVO> records = gpfkService.query(condition);
return buildReturnData(records, GpfkVO.class);
}
@ResourcePermissions({"21"})
@RequestMapping(value = "/delGpjy", method = RequestMethod.POST)
@ResponseBody
public Object delGpjy(@RequestBody JSONObject param) {
String gpfkid = param.getString("gpfkid");
if(StringUtils.isEmpty(gpfkid)){
setReturnMessage("请选择一条工票信息进行操作!");
return returnData();
}
gpfkService.delGpfkById(gpfkid);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request, HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpfkCondition condition = DataConvert.getCondition(param.getJSONObject("condition"), GpfkCondition.class);
RecordSet<GpfkVO> records = gpfkService.query(condition);
doExport(request, response, param, records.getRecords());
}
}
......@@ -10,12 +10,12 @@
<print entity="com.gavel.kwell.vo.GpfkVO"/>
<mkcz czid = "21" czmc = "取消装配" value="Y"/>
</menu>
<menu mkid="901000400" mkmc="检验反馈" url="kmes/gpjy/index">
<menu mkid="901000400" mkmc="检验反馈" url="kmes/gpjy/jyindex">
<print entity="com.gavel.kwell.vo.GpfkVO"/>
<mkcz czid = "21" czmc = "取消检验" value="Y"/>
</menu>
<menu mkid="901000600" mkmc="维修反馈" url="kmes/gpwx/index" >
<menu mkid="901000600" mkmc="维修反馈" url="kmes/gpwx/wxindex">
<print entity="com.gavel.kwell.vo.GpfkVO"/>
<mkcz czid = "21" czmc = "取消维修" value="Y"/>
</menu>
......
......@@ -5,6 +5,7 @@
<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>
......@@ -56,7 +57,6 @@
var $datEnd=$div.find("input[name='end']");
var $txtScgd=$div.find('input[name="wodjid"]');
var $txtWosnid=$div.find('input[name="wosnid"]');
var jzcs=0;
var gxName='';var gzzxid="";
var gzzxname="";var fkrName="";
......@@ -78,8 +78,7 @@
{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){
{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>";
......@@ -89,15 +88,17 @@
return ''
}
}},
}
},
{title: "合格数量", field: "hgsl",fieldType: "int",width:100},
{title: "不合格数量", field: "bhgsl", fieldType: "int",width:100},
{title: "反馈数量", field: "fksl", fieldType: "int"},
{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},
{title: "生产工单", field: "woDjid", fieldType: "ftString",width:140}
{title: "物料名称", field: "wlxxName", fieldType: "ftString",width:160}
]],
dialog: {
footerIn: true,
......
<div class="e-dialog-container" data-options="width:480,height:280" id="gpjyGx">
<div class="e-dialog-container" data-options="width:480,height:260" id="gpjyGx">
<div class="gui-fluid editTable">
<input type="hidden" name="gxName">
<input type="hidden" name="gzzxid">
......@@ -11,14 +11,14 @@
</div>
</div>
</div>
<div class="gui-row">
<!-- <div class="gui-row">
<div class="gui-col-sm12">
<label class="gui-form-label">班型:</label>
<div class="gui-input-block">
<input type="text" name="bxid" style="width: 100%;" data-options="required:true">
</div>
</div>
</div>
</div>-->
</div>
</div>
......@@ -33,12 +33,12 @@
function pageInit() {
$inputGxid.iCombobox({valueField: "id", textField: "name", allowNull:false, required:true,allowEdit:false, url: 'gygl/bzgx/queryJyBzgx',onSelect:function (a) {
$dialog.find("input[name='gxName']").val(a.name)
$dialog.find("input[name='gzzxid']").val(a.gzzxid||'')
$dialog.find("input[name='gxName']").val(a.name);
$dialog.find("input[name='gzzxid']").val(a.gzzxid||'');
$dialog.find("input[name='gzzxname']").val(a.gzzxname||'')
},
loadFilter: function (a) {
var datas=a["data"]["records"]
var datas=a["data"]["records"];
$.each(datas,function (i,item) {
item["name"]=item["gzzxname"]+"-"+item["name"]
});
......
<div id="kmesGpjyindex" class="gui-div">
<table class="toolbar-table" data-options="id: 'kmesGpjyindexTable',herf:'kzzx/gridset/query'"></table>
<!-- 表格工具栏开始 -->
<div id="kmesGpjyindexTable-toolbar" class="gui-toolbar" data-options="grid:{type:'datagrid',id:'kmesGpjyindexTable'}">
<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-add toolbar" href="javascript:void(0)"></a>-->
<a class="toolbar-reload toolbar" href="javascript:void(0)"></a>
<a class="toolbar-canceljy 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-sm3">
<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>
<!--<input type="hidden" name="bxid"/>-->
<input type="hidden" name="fkrid"/>
<input type="hidden" name="gxid"/>
</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>
/*js初始化*/
$(function () {
var $div=$('#kmesGpjyindex');
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 jzcs=0;
var gxName='';var gzzxid="";
var gzzxname="";var fkrName="";
function paramsInit() {
gpjy_hgsl=0;
gpjy_jysl=0;
}
function pageInit() {
$datStart.iDatebox();
$datEnd.iDatebox();
$txtScgd.iTextbox();
$txtWosnid.iTextbox();
var options = {
url: 'kmes/gpjy',
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,
maximized:true,
width:960,
height:640,
modal: true,
href: 'kmes/gpjy/edit',
draggable:false,
onSaveCallback: function (opt, data) {
},
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='gxid']").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);
/*取消检验*/
$("#kmesGpjyindexTable-toolbar").find(".toolbar-canceljy").iMenubutton({
event:'doAjax',
text:'取消检验',
onClick:function () {
var selectedRow=$div.find('.toolbar-table').datagrid('getSelected');
if(selectedRow==null){
$.messager.alert('提示','请选中一条数据进行操作');
return false;
}
gas.confirm("是否执行该操作",function () {
HTTP.post('kmes/gpjy/delGpjy', {gpfkid: selectedRow.id}, function (result) {
if (result['success']) {
var index = $div.find('.toolbar-table').datagrid("getRowIndex", selectedRow);
$div.find('.toolbar-table').datagrid("deleteRow", index);
$.messager.alert('提示', '取消检验成功!');
} else {
$.messager.alert('提示', result['message'] || '取消检验失败,请重新操作!');
}
})
})
}
});
$("#kmesGpjyindexTable-toolbar").find(".toolbar-search1").iMenubutton({
text:'搜索',
iconCls:"fa fa-search",
btnCls:"",
onClick:function () {
if($div.find("input[name='gxid']").val()==""){
gas.confirm("您尚未选择工序。是否重新选择工序?",function () {
run();
});
}else{
$datagrid.datagrid("load",DataBind.collectData($div));
}
}
});
}
/*数据初始化*/
function dataInit(obj){
}
/*用户操作*/
function run(res){
gas.Dialog({
title:"选择工序",
width:480,
height:280,
minimizable:false,
maximizable:false,
href:"kmes/gpjy/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='gxid']").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/gpjy/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