Commit dad4000a authored by 刘学辉's avatar 刘学辉

品质异常单的调整

parent 5c167bcb
<%--采购申请--%>
<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="x" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<x:base include="layout,dialog,grid,tree,dateTime,combox,attachment,commonTree,comboDialog"/>
</head>
<body>
<div class="container-fluid">
<x:billTitle title="请选择异常报告单类型" needStatus="true" needPerson="true"/>
<form class="hg-form" method="post" action="" id="submitForm">
<div class="hg-form-cols">
<div class="hg-form-row">
<x:selectC name="billType" label="报告单类型" labelCol="4" fieldCol="8" required="true"/>
</div>
</div>
</form>
</div>
</body>
\ No newline at end of file
......@@ -13,6 +13,19 @@ function initialize() {
$('#exceptionStateInfoList').fileList({
bizId : $("#attbizId").val()
});
$("#dutyDeptName").orgTree({
filter: "dpt", excludePos: 0, param: {orgKindId: "ogn,dpt"},
back: {
text: "#dutyDeptName",
value : '#dutyDept'
},
//manageType: 'taskQuery',
onChange:function(value,data){
$('#dutyDept').val(data.id);
}
});
}
function initItemGrid() {
......
......@@ -72,7 +72,7 @@
<x:textareaC name="dealMethod" required="false" label="改善措施" maxLength="120" labelCol="1" fieldCol="11" rows="3"/>
</div>
<div class="hg-form-row">
<x:inputC name="dutyDeptName" label="责任部门" labelCol="1" fieldCol="2" required="false"/>
<x:inputC name="dutyDeptName" label="责任部门" labelCol="1" fieldCol="2" required="false" wrapper="tree"/>
<x:hidden name="dutyDept"/>
<x:inputC name="checkOperatorName" label="责任人" labelCol="1" fieldCol="2" required="false"/>
<x:hidden name="checkOperator"/>
......
......@@ -12,6 +12,60 @@ function initialize() {
$('#exceptionStateInfoList').fileList({
bizId : $("#attbizId").val()
});
hideBusiness();
var dealWay="";
for (var x=0;x<$("input[name='dealWay']").length;x++) {
if ($("input[name='dealWay']")[x].checked) {
showBusiness($("input[name='dealWay']")[x].value);
dealWay=$("input[name='dealWay']")[x].value;
}
}
$('input[name="dealWay"]').change(function () {
if ($(this).is(':checked')) {
showBusiness($(this).val());
}
});
if ((dealWay=="cash"&&"financial" === getSubProcUnitId())
||(dealWay=="pay"&&"buyer" === getSubProcUnitId())
){
UICtrl.setElRequiredFlag("#sapBillNo",true);
}
}
function showBusiness(val) {
if (val=='pay'){
$("#payDiv").show();
$("#cashDiv").hide();
$("#goodsDiv").hide();
$("#specialDiv").hide();
}
if (val=='cash'){
$("#payDiv").hide();
$("#cashDiv").show();
$("#goodsDiv").hide();
$("#specialDiv").hide();
}
if (val=='goods'){
$("#payDiv").hide();
$("#cashDiv").hide();
$("#goodsDiv").show();
$("#specialDiv").hide();
}
if (val=='special'){
$("#payDiv").hide();
$("#cashDiv").hide();
$("#goodsDiv").hide();
$("#specialDiv").show();
}
}
function hideBusiness() {
$("#payDiv").hide();
$("#cashDiv").hide();
$("#goodsDiv").hide();
$("#specialDiv").hide();
}
function initItemGrid() {
......@@ -69,22 +123,31 @@ function initItemGrid() {
// $('#bprmeName').val(data.MSEHL);
}
});
/*$('#customerName').searchbox({
type: "system", name: "sapCustomerOrderSelect",
getParam: function (item) {
if (Public.isBlank($('#werksName').val())){
Public.tip("请先选择工厂!")
return false
}
return {
werks: $('#werks').val(),
}
},
onChange: function (value, data) {
$('#customerName').val(data.NAME1);
$('#customerNo').val(data.KUNNR);
}
});*/
$('#customerOrderNo').searchbox({
type: "system", name: "dictionary",
getParam: function (item) {
return {fieldName: "EKKO"}
},
onChange: function (value, data) {
$('#customerOrderNo').val(data.EBELN);
}
});
/*$('#customerName').searchbox({
type: "system", name: "sapCustomerOrderSelect",
getParam: function (item) {
if (Public.isBlank($('#werksName').val())){
Public.tip("请先选择工厂!")
return false
}
return {
werks: $('#werks').val(),
}
},
onChange: function (value, data) {
$('#customerName').val(data.NAME1);
$('#customerNo').val(data.KUNNR);
}
});*/
var toolbarOptions1 = UICtrl.getDefaultToolbarOptions({
addHandler: function(){
......@@ -208,7 +271,21 @@ function getGridColumns1() {
var columns1 = [];
columns1 = [
{ display: "采购订单", name: "purchaseNo", width: "160", align: "left", type: "string",
editor: {required: true,type: 'text'}
// editor: {required: true,type: 'text'}
editor: {
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {fieldName: "EKKO"}
},
back: {
EBELN: "purchaseNo"
// MSEHL: "unitName"
}
}
}
},
{display: "金额", name: "money", width: "100", align: "left", type: "string"
,editor: {required: true,type: "text",mask: '9999999.999'}
......@@ -298,7 +375,6 @@ function getGridColumns3() {
}
},
{display: "物料编码", name: "productCode", width: "160", align: "left", type: "string",hide:"true"},
{display: "采购组", name: "ekgrp", width: "120", align: "left", type: "string",hide:"true"},
{display: "物料名称", name: "productName", width: "180", align: "left", type: "string"
,editor: {
required: true, type: "select",
......@@ -321,6 +397,22 @@ function getGridColumns3() {
}
}
},
{display: "采购组", name: "ekgrp", width: "120", align: "left", type: "string"
,editor: {
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {fieldName: "EKGRP"}
},
back: {
EKGRP: "ekgrp",
EKNAM: "ekgrpName",
}
}
}
},
{display: "数量", name: "number", width: "100", align: "left", type: "string"
,editor: {type: "text",mask: '9999999.999',required: true}
},
......@@ -398,9 +490,28 @@ function getExtendedData(processAction) {
if (processAction == ProcessAction.BACK
|| processAction == ProcessAction.REPLENISH
|| processAction == ProcessAction.TRANSMIT) {
//不验证
//不验证
$('#submitForm').attr('check', false);
}
var dealWay="0";
for (var x=0;x<$("input[name='dealWay']").length;x++) {
if ($("input[name='dealWay']")[x].checked) {
dealWay="1";
break;
}
}
if (dealWay=="0"){
Public.errorTip("处理方式必输!");
return false;
}
if (($("input[name='dealWay']")[x].value=="cash"&&"financial" === getSubProcUnitId())
||($("input[name='dealWay']")[x].value=="pay"&&"buyer" === getSubProcUnitId())
){
if ($('#sapBillNo').val()==""){
Public.errorTip("SAP单据编号必输!");
return false;
}
}
var extendedData = {};
var _grid = UICtrl.getGridManager('#maingrid1');
if (_grid) {
......
......@@ -26,7 +26,7 @@
<x:hidden name="positionName"/>
<x:hidden name="personMemberId"/>
<x:hidden name="personMemberName"/>
<x:hidden name="exceptionType" value="out"/>
<x:hidden name="frgdt"/>
<div class="hg-form-cols">
<c:if test="${statusId==3}">
......@@ -36,40 +36,58 @@
</button>
</div>
</c:if>
<div class="hg-form-row">
<x:inputC name="exceptionTitle" label="异常标题" labelCol="1" fieldCol="11" required="true"/>
</div>
<div class="hg-form-row">
<x:selectC name="exceptionType" label="异常类型" labelCol="1" fieldCol="2" required="true" dictionary="exceptionType"/>
<x:inputC name="reportDate" label="呈报日期" labelCol="1" fieldCol="2" required="true" wrapper="date"/>
<x:inputC name="exceptionTitle" label="异常标题" labelCol="1" fieldCol="2" required="true"/>
<!--x:selectC name="exceptionType" label="异常类型" labelCol="1" fieldCol="2" required="true" dictionary="exceptionType"/-->
<x:inputC name="exceptionDate" label="发现日期" labelCol="1" fieldCol="2" required="true" wrapper="date"/>
</div>
<div class="hg-form-row">
<x:inputC name="reportDate" label="呈报日期" labelCol="1" fieldCol="2" required="true" wrapper="date"/>
<x:selectC name="exceptionReasonType" label="异常原因分类" labelCol="1" fieldCol="2" required="true" dictionary="exceptionReasonType"/>
<x:hidden name="customerNo"/>
<x:inputC name="customerName" required="true" label="供应商名称" labelCol="1" wrapper="select" fieldCol="2"/>
</div>
<div class="hg-form-row">
<x:inputC name="matnr" label="材料编码" labelCol="1" fieldCol="2" required="false" readonly="true"/>
<x:inputC name="maktx" label="材料名称" labelCol="1" fieldCol="2" required="true" wrapper="select"/>
<x:inputC name="customerOrderNo" label="采购单号" labelCol="1" fieldCol="2" required="true"/>
<x:inputC name="customerOrderNo" label="采购单号" labelCol="1" fieldCol="2" required="true" wrapper="select"/>
<x:inputC name="loseMoney" label="损失金额" labelCol="1" fieldCol="2" required="true" mask="nnnnnn.nn" />
<x:selectC name="statusId" label="处理进度" labelCol="1" fieldCol="2" disabled="true" required="false" dictionary="bizBillStatus"/>
<x:inputC name="sapBillNo" label="SAP单据号" labelCol="1" fieldCol="2" required="false" readonly="true"/>
</div>
<div class="hg-form-row">
<x:textareaC name="exceptionState" required="false" label="异常描述" maxLength="120" labelCol="1" fieldCol="11" rows="3"/>
</div>
</div>
<x:title title="处理方式:货币结算(扣除应付款)" name="group" hideTable="#maingrid1" />
<div id="maingrid1"></div>
<div class="hg-form-cols" >
<div class="hg-form-row">
<x:radioC name="dealWay" label="处理方式" labelCol="1" fieldCol="11" required="true" dictionary="dealWay" disabled="false"/>
</div>
</div>
<div class="hg-form-cols" id="payDiv">
<x:title title="处理方式:货币结算(扣除应付款)" name="group" hideTable="#maingrid1" />
<div id="maingrid1"></div>
</div>
<div class="hg-form-cols" id="cashDiv">
<x:title title="处理方式:货币结算(现金/转账)" name="group" hideTable="#maingrid2" />
<div id="maingrid2"></div>
</div>
<div class="hg-form-cols" id="goodsDiv">
<x:title title="处理方式:商品结算" name="group" hideTable="#maingrid3" />
<div id="maingrid3"></div>
</div>
<div class="hg-form-cols" id="specialDiv">
<x:title title="处理方式:特殊处理" name="group"/>
<div class="hg-form-cols">
<div class="hg-form-row">
<x:textareaC name="dealMethod" required="false" label="特殊处理" maxLength="120" labelCol="1" fieldCol="11" rows="2" readonly="false"/>
</div>
</div>
</div>
<div class="hg-form-cols">
<div class="hg-form-row">
<x:textareaC name="dealResult" required="false" label="处理结果" maxLength="120" labelCol="1" fieldCol="11" rows="2" readonly="false"/>
</div>
......
......@@ -12,7 +12,8 @@ function initUI() {
function initGrid() {
var toolbarOptions = UICtrl.getDefaultToolbarOptions({
addProduceHandler: {id: 'produceException', text: '添加生产异常单', img: 'fa-music', className: 'btn-gray',
addHandler: addHandler
/*addProduceHandler: {id: 'produceException', text: '添加生产异常单', img: 'fa-music', className: 'btn-gray',
click: function () {
UICtrl.addTabItem({
tabid: 'addExceptionReportProduce',
......@@ -38,7 +39,7 @@ function initGrid() {
url: web_app.name + '/exceptionReport/addExceptionReportDetail.job?billType=supplier'
});
}
},
}*/
});
gridManager = UICtrl.grid('#maingrid', {
columns: [
......@@ -52,8 +53,10 @@ function initGrid() {
return "供应商";
} else if (item.billType=="purchase"){
return "采购";
} else if (item.billType=="outgoing"){
return " 外发";
} else {
return "生产";
return "生产";
}
}
}
......@@ -126,6 +129,34 @@ function viewHandler(id) {
});
}
//添加按钮
function addHandler() {
UICtrl.showAjaxDialog({
title: '新增',
width: 400,
url: web_app.name + '/exceptionReport/chooseExceptionDetail.load',
ok: insertHandler
});
}
function insertHandler() {
var _self = this;
var billType = $("#billType").val();
var title="采购/外发";
if (billType=="produce"){
title="生产";
}
if (billType==""){
Public.errorTip("请选择异常单类型!");
return false;
}
UICtrl.addTabItem({
tabid: 'addException'+billType,
text: '新增异常单('+title+")",
url: web_app.name + '/exceptionReport/addExceptionReportDetail.job?billType='+billType
});
_self.close();
}
function deleteHandler() {
var rows = DataUtil.getObjectBagData("maingrid");
......
......@@ -63,6 +63,10 @@ public class ExceptionReportController extends CommonController {
return toResult(map);
}
public String chooseExceptionDetail(){
return forward("chooseExceptionDetail");
}
/**
* 跳转到新增品质异常报告页面
* @return
......@@ -91,7 +95,7 @@ public class ExceptionReportController extends CommonController {
Operator operator = getOperator();
exceptionReport.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName()));
exceptionReport.setBillType(billType);
if ("purchase".equals(billType)) {
if ("purchase".equals(billType)||"outgoing".equals(billType)) {
return forward("exceptionReportDetailPurchase", exceptionReport);
} else if ("supplier".equals(billType)) {
return forward("exceptionReportDetailSupplier", exceptionReport);
......@@ -108,7 +112,7 @@ public class ExceptionReportController extends CommonController {
SDO sdo = this.getSDO();
String id = sdo.getBizId();
ExceptionReport exceptionReport = exceptionReportApplication.findById(id);
if ("purchase".equals(exceptionReport.getBillType())) {
if ("purchase".equals(exceptionReport.getBillType())||"outgoing".equals(exceptionReport.getBillType())) {
return forward("exceptionReportDetailPurchase", exceptionReport);
} else if ("supplier".equals(exceptionReport.getBillType())){
return forward("exceptionReportDetailSupplier", exceptionReport);
......
......@@ -100,6 +100,12 @@ public class ExceptionReport extends FlowBillAbstractEntity {
@Column(name = "deal_result")
private String dealResult;
/**
* 供应商的处理方式
*/
@Column(name = "deal_way")
private String dealWay;
/**
* 单位主管
*/
......@@ -140,6 +146,11 @@ public class ExceptionReport extends FlowBillAbstractEntity {
@Column(name = "bill_type")
private String billType;
//SAP单据编号
@Column(name = "sap_bill_no")
private String sapBillNo;
//材料编码
@Column(name = "matnr")
private String matnr;
......
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