Commit 0e305d37 authored by 刘学辉's avatar 刘学辉

物料主数据状态切换的调整

parent 2efa6cf6
......@@ -24,7 +24,6 @@ function initializate() {
$("#auditForm").show();
} else {
$("#buttonBox").show();
$("#showChart").remove();
}
break;
case '1'://完成/审核
......@@ -36,7 +35,6 @@ function initializate() {
case '3'://被驳回
showRejectCauseBox();
$("#buttonBox").show();
$("#showChart").remove();
break;
default://其他/详情
$("#buttonBox").show();
......@@ -175,13 +173,13 @@ function loadGrid() {
* @returns {boolean}
*/
function saveForm(status) {
$("#active").val(status)
// $("#active").val(status)
//alert($("#businessCode").val());
let extendedData = getExtendedData();
if (!extendedData) return false;
var _self = this;
$('#submitForm').ajaxSubmit({
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax',
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax?opstatus='+status,
param: extendedData,
success: function (data) {
$("#applyDeptId").val(data.applyDeptId);
......
......@@ -26,9 +26,7 @@
<button id="back" title="" type="button" onclick="clearForm()" class="btn btn-gray"><i
class="fa fa-reply"></i>撤销
</button>
<button id="showChart" title="" type="button" onclick="distributeForm()" class="btn btn-gray"><i
class="fa fa-sitemap"></i>分发
</button>
</div>
<br/>
......
......@@ -5,6 +5,13 @@ $(document).ready(function () {
bindEvent();
});
function initialize(){
var mainFileTable = $('#nonProApplyInfoList').fileList();
mainFileTable.find('table').css({
borderTopWidth : 0
});
$('#nonProApplyInfoList').fileList({
bizId : $("#attbizId").val()
});
let isDetailPage = ($("#isDetailPage").val() === "true");
if (isDetailPage) {
$("#jobPageTop").hide();
......@@ -43,6 +50,9 @@ function initialize(){
*/
function setId(id) {
$("#id").val(id);
$('#nonProApplyInfoList').fileList({
bizId : id
});
}
/**
......
......@@ -6,7 +6,7 @@
<script type="text/javascript">
var applyType ="${applyType}";
</script>
<x:base include="layout,dialog,grid,tree,combox,commonTree,date"/>
<x:base include="layout,dialog,grid,tree,combox,commonTree,date,attachment"/>
<x:script src='/biz/topsun/sap/nonProdApply/nonProdApplyDetail.js'/>
</head>
<body>
......@@ -24,6 +24,7 @@
<x:hidden name="id"/>
<%-- <x:hidden name="billCode"/>--%>
<%-- <x:hidden name="fillinDate" type="datetime"/>--%>
<x:hidden name="attbizId"/>
<x:hidden name="sourceId"/>
<x:hidden name="kind"/>
<x:hidden name="applyType"/>
......@@ -88,6 +89,9 @@
<div class="hg-form-row">
<x:textareaC rows="3" name="textDescription" label="文本说明" labelCol="1" fieldCol="11"/>
</div>
<div style="padding-top: 15px;">
<x:fileList bizCode="nonProApplyInfo" bizId="attbizId" id="nonProApplyInfoList" title="上传附件" />
</div>
</div>
......
......@@ -28,7 +28,6 @@ function initializate() {
$("#auditForm").show();
} else {
$("#buttonBox").show();
$("#showChart").remove();
}
break;
case '1'://完成/审核
......@@ -40,7 +39,6 @@ function initializate() {
case '3'://被驳回
showRejectCauseBox();
$("#buttonBox").show();
$("#showChart").remove();
break;
default://其他/详情
$("#buttonBox").show();
......@@ -191,13 +189,13 @@ function bindEvent(){
* @returns {boolean}
*/
function saveForm(status) {
$("#active").val(status)
//$("#active").val(status)
// alert($("#businessCode").val());
let extendedData = getExtendedData();
if (!extendedData) return false;
var _self = this;
$('#submitForm').ajaxSubmit({
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax',
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax?opstatus='+status,
param: extendedData,
success: function (data) {
$("#applyDeptId").val(data.applyDeptId);
......
......@@ -26,9 +26,7 @@
<button id="back" title="" type="button" onclick="clearForm()" class="btn btn-gray"><i
class="fa fa-reply"></i>撤销
</button>
<button id="showChart" title="" type="button" onclick="distributeForm()" class="btn btn-gray"><i
class="fa fa-sitemap"></i>分发
</button>
</div>
<br/>
......
......@@ -87,7 +87,21 @@ function loadNonProdApplyListGrid() {
}
},
{display: "物料/产品编码", name: "matnr", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "维护类型", name: "maintenanceTypeTextView", width: 100, minWidth: 60, type: "string", align: "left"},
{display: "维护类型", name: "maintenanceTypeTextView", width: 130, minWidth: 60, type: "string", align: "left",
render:function(item){
var result = item.maintenanceTypeTextView+"-待处理基本信息";
if (item.distribute == "1"){
result=item.maintenanceTypeTextView+"-待分发";
}
if (item.distribute == "2"){
result=item.maintenanceTypeTextView+"-待业务处理";
}
if (item.distribute == "3"){
result=item.maintenanceTypeTextView+"-已办结";
}
return result;
}
},
{display: "批准人", name: "approver", width: 100, minWidth: 60, type: "string", align: "left"},
{display: "批准日期", name: "approvalDate", width: 140, minWidth: 60, type: "date", align: "left"},
{display: "通用品名", name: "genericName", width: 200, minWidth: 60, type: "string", align: "left"},
......@@ -102,15 +116,21 @@ function loadNonProdApplyListGrid() {
{display: "物品属性", name: "itemAttributesTextView", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "业务用途", name: "businessUsageTextView", width: 300, minWidth: 60, type: "string", align: "left"},
{display: "文本说明", name: "textDescription", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "是否分发", name: "distribute", width: 80, minWidth: 60, type: "string", align: "left",
/* {display: "是否分发", name: "distribute", width: 80, minWidth: 60, type: "string", align: "left",
render:function(item){
var result = "未分发";
var result = "待处理";
if (item.distribute == "1"){
result="待分发";
}
if (item.distribute == "2"){
result="已分发";
}
if (item.distribute == "3"){
result="已办结";
}
return result;
}
},
},*/
],
dataAction: "server",
url: web_app.name + '/sapNonProdApply/slicedNonProdApplyList.ajax',
......
......@@ -23,7 +23,6 @@ function initializate() {
$("#auditForm").show();
} else {
$("#buttonBox").show();
$("#showChart").remove();
}
break;
case '1'://完成/审核
......@@ -35,7 +34,6 @@ function initializate() {
case '3'://被驳回
showRejectCauseBox();
$("#buttonBox").show();
$("#showChart").remove();
break;
default://其他/详情
$("#buttonBox").show();
......@@ -228,12 +226,12 @@ function bindEvent(){
*/
function saveForm(status) {
// alert($("#businessCode").val());
$("#active").val(status)
//$("#active").val(status)
let extendedData = getExtendedData();
if (!extendedData) return false;
var _self = this;
$('#submitForm').ajaxSubmit({
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax',
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax?opstatus='+status,
param: extendedData,
success: function (data) {
$("#applyDeptId").val(data.applyDeptId);
......
......@@ -27,9 +27,6 @@
<button id="back" title="" type="button" onclick="clearForm()" class="btn btn-gray"><i
class="fa fa-reply"></i>撤销
</button>
<button id="showChart" title="" type="button" onclick="distributeForm()" class="btn btn-gray"><i
class="fa fa-sitemap"></i>分发
</button>
</div>
<br/>
......
......@@ -23,7 +23,6 @@ function initializate() {
$("#auditForm").show();
} else {
$("#buttonBox").show();
$("#showChart").remove();
}
break;
case '1'://完成/审核
......@@ -35,7 +34,6 @@ function initializate() {
case '3'://被驳回
showRejectCauseBox();
$("#buttonBox").show();
$("#showChart").remove();
break;
default://其他/详情
$("#buttonBox").show();
......@@ -173,13 +171,13 @@ function loadGrid() {
* @returns {boolean}
*/
function saveForm(status) {
$("#active").val(status)
// $("#active").val(status)
//alert($("#businessCode").val());
let extendedData = getExtendedData();
if (!extendedData) return false;
var _self = this;
$('#submitForm').ajaxSubmit({
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax',
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax?opstatus='+status,
param: extendedData,
success: function (data) {
$("#applyDeptId").val(data.applyDeptId);
......
......@@ -27,9 +27,6 @@
<button id="back" title="" type="button" onclick="clearForm()" class="btn btn-gray"><i
class="fa fa-reply"></i>撤销
</button>
<button id="showChart" title="" type="button" onclick="distributeForm()" class="btn btn-gray"><i
class="fa fa-sitemap"></i>分发
</button>
</div>
<br/>
......
......@@ -23,89 +23,65 @@ function initializate() {
UICtrl.enable($("#businessUsage"));
UICtrl.enable($("#matklName"));
switch ($("#active").val()) {
case '0'://已分发未完成
$("#businessUsageDiv").hide(); // alert($("#deptCode").val())
case '0'://待处理
$("#businessUsageDiv").hide();
if ($("#deptCode").val() === "system") {
$("#auditForm").show();
} else {
$("#buttonBox").show();
// $("#showChart").remove(); //去掉 lxh
$("#showChart").remove();
$("#distributeDiv").hide()
$("#businessPersonnelListGrid").hide()
// $("#werksName").removeAttribute("required");
// UICtrl.setDisable("#distributeDiv");
}
break;
case '1'://已分发
case '1'://待分发 从首页进入填写基本数据
$("#buttonBox").show(); //alert();
$("#submit").remove();
$("#save").remove();
$("#back").remove();
UICtrl.setDisable("#basicInfoDiv");
$("#distributeDiv").show();
break;
case '2'://已分发
// $("#auditForm").show();
$("#buttonBox").remove();
// UICtrl.setDisable("#basicInfoDiv")
UICtrl.setDisable("#basicInfoDiv");
UICtrl.setDisable("#distributeDiv");
break;
case '2'://已分发 从首页进入填写基本数据
$("#buttonBox").show(); //alert();
$("#showChart").remove();
// UICtrl.setEnable("#basicInfoDiv")
break;
case '3'://被驳回
showRejectCauseBox();
$("#buttonBox").show();
$("#showChart").remove();
case '3'://已办结
// showRejectCauseBox();
$("#buttonBox").remove();
break;
default://其他/详情
$("#buttonBox").show();
break;
}
// let isInitiator = ($("#isInitiator").val() === "true");
// if (isInitiator) {
// //创建或审核人
// $("#buttonBox").remove();
// }else{
// //审核人
// $("#auditForm").remove();
// }
// $('input[name="maintenanceType"]').change(function () {
// if ($(this).is(':checked')) {
// console.log($(this).val()); // 输出选中的值
// switch ($(this).val()) {
// case 'new':
// if ($("#mtart").val() == "ZMPN") {
// UICtrl.enable($("#matnr"));
// } else {
// UICtrl.disable($("#matnr"));
// }
// UICtrl.disable($("#lvorm"));
// UICtrl.enable($("#mtart"));
// UICtrl.enable($("#matkl"));
// UICtrl.enable($("#spart"));
// break;
// case 'modify':
// UICtrl.enable($("#lvorm"))
// UICtrl.disable($("#mtart"));
// UICtrl.disable($("#matkl"));
// UICtrl.disable($("#spart"));
// break;
// case 'extend':
// UICtrl.enable($("#lvorm"))
// UICtrl.disable($("#mtart"));
// UICtrl.disable($("#matkl"));
// UICtrl.disable($("#spart"));
// break;
// }
// }
// });
//
// $('input[name="businessUsage"]').change(function () {
// if ($(this).is(":checked")) {
// console.log($(this).val()); // 输出选中的值
// }
// });
$('input[name="isAll"]').change(function () {
//alert($(this).is(':checked'));
if ($(this).is(':checked')) { alert(1);
$("input[name='businessUsage']").each(function(){
$(this).attr("checked",true);
})
} else {
alert(2);
$("input[name='businessUsage']").each(function(){
$(this).attr("checked",false);
})
}
});
var dictUsage=dictUsages.split(";");
$('input[name="businessUsage"]').change(function () {
//alert($(this).is(':checked'));
if ($(this).is(':checked')) {
console.log($(this).val()); // 输出选中的值
debugger
// console.log($(this).val()); // 输出选中的值
// debugger
var name="",deptCode="";
for (var u=0;u<dictUsage.length;u++){
if ($(this).val()==dictUsage[u].split(",")[0]){
......@@ -191,11 +167,11 @@ function loadGrid() {
enabledEdit: true,
width: "100%",
height:coRowNum * 37.5,
heightDiff: -8,
heightDiff: -2,
fixedCellHeight: true,
onBeforeEdit: function (editParm) {
var cols = editParm.column, data = editParm.record;
if ($("#active").val()==1){
if ($("#active").val()==2){
return false;
}
},
......@@ -211,7 +187,7 @@ function loadGrid() {
*/
function saveForm(status) {
// alert($("#businessCode").val());
$("#active").val(status)
$("#active").val(status);
let extendedData = getExtendedData();
if (!extendedData) return false;
var _self = this;
......@@ -268,15 +244,35 @@ function clearForm() {
* 分发表单到各个部门
*/
function distributeForm() {
$("#status").val(1)
$("#status").val(2);
if (control.isDistribute) {
Public.successTip("已分发");
return false;
}
if ($("#werks").val()==""){
Public.tip("工厂必输!");
return false;
}
if ($("#lgort").val()==""){
Public.tip("库存地点必输!");
return false;
}
if ($("#vkorg").val()==""){
Public.tip("销售组织必输!");
return false;
}
if ($("#vtweg").val()==""){
Public.tip("分销渠道必输!");
return false;
}
if ($("#lgnum").val()==""){
Public.tip("仓库号必输!");
return false;
}
let extendedData = getExtendedData();
if (!extendedData) return false;
$('#submitForm').ajaxSubmit({
url: web_app.name + '/sapNonProdApplyNext/distributeSapNonProdApplyDept.ajax?distribute=1',
url: web_app.name + '/sapNonProdApplyNext/distributeSapNonProdApplyDept.ajax?distribute=2',
param: extendedData,
success: function (data) {
Public.successTip("分发成功!");
......@@ -398,7 +394,7 @@ function bindEvent() {
function getExtendedData() {
let msg = "[";
let isUndefined = false
let isUndefined = false;
/* let deptStaffResult = DataUtil.getGridData({
gridManager: gridManager,
isAllData: true,
......
......@@ -16,7 +16,7 @@
<x:hidden name="deptCode" value="false"/> <!--是否是详情页-->
<div class="container-fluid" style="padding: 10px;">
<c:if test="${applyType==0}">
<c:if test="${applyType==0||applyType==3}">
<x:billTitle title="非产品/非本成品类物料基本信息维护" needStatus="false" needPerson="true"/>
</c:if>
<c:if test="${applyType==1}">
......@@ -34,18 +34,20 @@
<button id="save" title="" type="button" onclick="saveForm(0)" class="btn btn-gray"><i
class="fa fa-save"></i>保存
</button>
<c:if test="${active==2}">
<button id="submit" hidden="true" title="" type="button" onclick="saveForm(1)" class="btn btn-gray"><i
class="fa fa-check-circle-o"></i>提交
</button>
</c:if>
<button id="back" title="" type="button" onclick="clearForm()" class="btn btn-gray"><i
class="fa fa-reply"></i>撤销
</button>
<c:if test="${active==1}">
<button id="showChart" title="" type="button" onclick="distributeForm()" class="btn btn-gray"><i
class="fa fa-sitemap"></i>分发
</button>
</c:if>
</div>
<br/>
......@@ -121,26 +123,30 @@
<x:inputC name="mhdrz" label="最小货架寿命" labelCol="1" fieldCol="2"/>
<x:inputC name="normt" label="适用标准" labelCol="1" fieldCol="2"/>
<div class="hg-form-row">
<x:inputC name="werksName" label="工厂" required="true" labelCol="1" fieldCol="2" wrapper="select"/>
<x:hidden name="werks"/>
<x:inputC name="lgortName" label="库存地点" required="true" labelCol="1" fieldCol="2" wrapper="select"/>
<x:hidden name="lgort"/>
<x:inputC name="vkorgName" required="true" label="销售组织" labelCol="1" wrapper="select" fieldCol="2"/>
<x:hidden name="vkorg"/>
<x:inputC name="vtwegName" required="true" label="分销渠道" labelCol="1" wrapper="select" fieldCol="2"/>
<x:hidden name="vtweg"/>
<x:inputC name="lgnumName" label="仓库号" required="true" labelCol="1" fieldCol="2" wrapper="select"/>
<x:hidden name="lgnum"/>
<x:inputC name="lgtypName" label="存储类型" labelCol="1" fieldCol="2" wrapper="select"/>
<x:hidden name="lgtyp"/>
</div>
<div class="hg-form-row">
<x:inputC name="klart" label="类型" labelCol="1" fieldCol="2" readonly="true"/>
<x:inputC name="classify" label="分类" labelCol="1" fieldCol="2" readonly="true"/>
</div>
</div>
</div>
<div class="hg-form-cols" id="distributeDiv">
<div class="hg-form-row">
<x:inputC name="werksName" label="*工厂" required="false" labelCol="1" fieldCol="2" wrapper="select"/>
<x:hidden name="werks"/>
<x:inputC name="lgortName" label="*库存地点" required="false" labelCol="1" fieldCol="2" wrapper="select"/>
<x:hidden name="lgort"/>
<x:inputC name="vkorgName" label="*销售组织" required="false" labelCol="1" wrapper="select" fieldCol="2"/>
<x:hidden name="vkorg"/>
<x:inputC name="vtwegName" label="*分销渠道" required="false" labelCol="1" wrapper="select" fieldCol="2"/>
<x:hidden name="vtweg"/>
<x:inputC name="lgnumName" label="*仓库号" required="false" labelCol="1" fieldCol="2" wrapper="select"/>
<x:hidden name="lgnum"/>
<x:inputC name="lgtypName" label="存储类型" labelCol="1" fieldCol="2" wrapper="select"/>
<x:hidden name="lgtyp"/>
</div>
</div>
<div class="hg-form-cols">
<!--x:checkboxListC name="businessUsageSeled" label="扩展前业务用途" list="businessUsageSeledList" labelCol="1"
......@@ -153,16 +159,17 @@
fieldCol="11"/>
</div>
</c:if>
<c:if test="${applyType==1||active==1||active==2}">
<c:if test="${applyType==1||active==2}">
<div class="hg-form-row">
<x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="11" disabled="true"/>
</div>
</c:if>
<c:if test="${applyType==0&&active!=1}">
<c:if test="${applyType==0&&active==1}">
<div class="hg-form-row">
<x:checkbox name="isAll" label="是否全选" />
<x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="11"/>
fieldCol="8"/>
</div>
</c:if>
......
......@@ -24,7 +24,6 @@ function initializate() {
$("#auditForm").show();
} else {
$("#buttonBox").show();
$("#showChart").remove();
}
break;
case '1'://完成/审核
......@@ -36,7 +35,6 @@ function initializate() {
case '3'://被驳回
showRejectCauseBox();
$("#buttonBox").show();
$("#showChart").remove();
break;
default://其他/详情
$("#buttonBox").show();
......@@ -185,14 +183,14 @@ function bindEvent(){
* @returns {boolean}
*/
function saveForm(status) {
$("#active").val(status)
//$("#active").val(status)
//alert($("#businessCode").val());
let extendedData = getExtendedData();
if (!extendedData) return false;
var _self = this;
$('#submitForm').ajaxSubmit({
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax',
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax?opstatus='+status,
param: extendedData,
success: function (data) {
$("#applyDeptId").val(data.applyDeptId);
......
......@@ -76,9 +76,9 @@
<div class="hg-form-row">
<x:inputC name="ausmeName" label="投料计量单位" labelCol="1" fieldCol="2" wrapper="select"/>
<x:hidden name="ausme"/>
<x:inputC name="umrenProd" label="转换分母" labelCol="1" fieldCol="2"/>
<x:inputC name="umrezProd" label="转换分子" labelCol="1" fieldCol="2"/>
<x:selectC name="sfcpf" label="生产计划参数文件" labelCol="1" fieldCol="2" dictionary="sfcpf"/>
<x:inputC name="umrenProd" label="转换分母" labelCol="1" fieldCol="3"/>
<x:inputC name="umrezProd" label="转换分子" labelCol="1" fieldCol="3"/>
<x:selectC name="sfcpf" label="生产计划参数文件" labelCol="2" fieldCol="2" dictionary="sfcpf"/>
<x:selectC name="insmk" label="过账到质检" labelCol="1" fieldCol="2" dictionary="insmk"/>
</div>
......
......@@ -23,7 +23,6 @@ function initializate() {
$("#auditForm").show();
} else {
$("#buttonBox").show();
$("#showChart").remove();
}
break;
case '1'://完成/审核
......@@ -35,7 +34,6 @@ function initializate() {
case '3'://被驳回
showRejectCauseBox();
$("#buttonBox").show();
$("#showChart").remove();
break;
default://其他/详情
$("#buttonBox").show();
......@@ -175,18 +173,17 @@ function loadGrid() {
* @returns {boolean}
*/
function saveForm(status) {
if ($("#baseUnit").val()==$("#bstme").val()){
if ($("#bstme").val()!=""&&$("#baseUnit").val()==$("#bstme").val()){
Public.tip("采购计量单位不能和基本计量单位一致!");
return false;
}
$("#active").val(status)
// $("#active").val(status)
// alert($("#businessCode").val());
let extendedData = getExtendedData();
if (!extendedData) return false;
var _self = this;
$('#submitForm').ajaxSubmit({
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax',
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax?opstatus='+status,
param: extendedData,
success: function (data) {
$("#applyDeptId").val(data.applyDeptId);
......
......@@ -27,9 +27,6 @@
<button id="back" title="" type="button" onclick="clearForm()" class="btn btn-gray"><i
class="fa fa-reply"></i>撤销
</button>
<button id="showChart" title="" type="button" onclick="distributeForm()" class="btn btn-gray"><i
class="fa fa-sitemap"></i>分发
</button>
</div>
<br/>
......
......@@ -24,14 +24,12 @@ function initializate() {
$("#auditForm").show();
} else {
$("#buttonBox").show();
$("#showChart").remove();
}
break;
case '1'://已分发
// $("#auditForm").show();
// alert($("#deptCode").val());
$("#buttonBox").show();
$("#showChart").remove();
break;
case '2'://保存未分发
$("#buttonBox").show();
......@@ -39,7 +37,7 @@ function initializate() {
case '3'://被驳回
showRejectCauseBox();
$("#buttonBox").show();
$("#showChart").remove();
break;
default://其他/详情
$("#buttonBox").show();
......@@ -205,13 +203,13 @@ function clearForm(){
* @returns {boolean}
*/
function saveForm(status) {
$("#active").val(status)
// $("#active").val(status)
//alert($("#businessCode").val());
let extendedData = getExtendedData();
if (!extendedData) return false;
var _self = this;
$('#submitForm').ajaxSubmit({
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax',
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax?opstatus='+status,
param: extendedData,
success: function (data) {
$("#applyDeptId").val(data.applyDeptId);
......
......@@ -28,9 +28,6 @@
<button id="back" title="" type="button" onclick="clearForm()" class="btn btn-gray"><i
class="fa fa-reply"></i>撤销
</button>
<button id="showChart" title="" type="button" onclick="distributeForm()" class="btn btn-gray"><i
class="fa fa-sitemap"></i>分发
</button>
</div>
<br/>
......
......@@ -24,8 +24,7 @@ function initializate() {
$("#auditForm").show();
} else {
$("#buttonBox").show();
$("#showChart").remove();
}
}
break;
case '1'://完成/审核
// $("#auditForm").show();
......@@ -36,7 +35,6 @@ function initializate() {
case '3'://被驳回
showRejectCauseBox();
$("#buttonBox").show();
$("#showChart").remove();
break;
default://其他/详情
$("#buttonBox").show();
......@@ -201,12 +199,12 @@ function bindEvent(){
*/
function saveForm(status) {
// alert($("#businessCode").val());
$("#active").val(status)
//$("#active").val(status)
let extendedData = getExtendedData();
if (!extendedData) return false;
var _self = this;
$('#submitForm').ajaxSubmit({
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax',
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax?opstatus='+status,
param: extendedData,
success: function (data) {
$("#applyDeptId").val(data.applyDeptId);
......
......@@ -27,9 +27,6 @@
<button id="back" title="" type="button" onclick="clearForm()" class="btn btn-gray"><i
class="fa fa-reply"></i>撤销
</button>
<button id="showChart" title="" type="button" onclick="distributeForm()" class="btn btn-gray"><i
class="fa fa-sitemap"></i>分发
</button>
</div>
<br/>
......
......@@ -24,8 +24,7 @@ function initializate() {
$("#auditForm").show();
} else {
$("#buttonBox").show();
$("#showChart").remove();
}
}
break;
case '1'://完成/审核
// $("#auditForm").show();
......@@ -36,8 +35,7 @@ function initializate() {
case '3'://被驳回
showRejectCauseBox();
$("#buttonBox").show();
$("#showChart").remove();
break;
break;
default://其他/详情
$("#buttonBox").show();
break;
......@@ -108,6 +106,7 @@ function loadGrid() {
$("#specifications").attr("disabled",true);
$("#materialUsage").attr("disabled",true);
$("#lety1").val("TP");
//UICtrl.disable($("#werks"));
UICtrl.disable($("#lgort"));
//UICtrl.disable($("#lgnum"));
......@@ -180,12 +179,12 @@ function loadGrid() {
*/
function saveForm(status) {
//alert($("#businessCode").val());
$("#active").val(status)
// $("#active").val(status)
let extendedData = getExtendedData();
if (!extendedData) return false;
var _self = this;
$('#submitForm').ajaxSubmit({
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax',
url: web_app.name + '/sapNonProdApplyNext/saveSapNonProdApplyDept.ajax?opstatus='+status,
param: extendedData,
success: function (data) {
$("#applyDeptId").val(data.applyDeptId);
......@@ -210,6 +209,7 @@ function bindEvent(){
$('#werksName').val(data.NAME1);
}
});
//库存地点
$('#lgortName').searchbox({
type: "system", name: "dictionary",
getParam: function (item) {
......@@ -218,14 +218,17 @@ function bindEvent(){
onChange: function (value, data) {
$('#lgort').val(data.LGORT);
$('#lgortName').val(data.LGOBE);
// $('#ltkza').val("001");
// $('#ltkzaName').val("高架仓库");
}
});
//存储类型
$('#lgtypName').searchbox({
type: "system", name: "dictionary",
getParam: function (item) {
return {
fieldName: "LGTYP",
filterValue:$('#lgnum').val()
filterValue:$('#lgnum').val(),
}
},
onChange: function (value, data) {
......@@ -233,6 +236,7 @@ function bindEvent(){
$('#lgtypName').val(data.LTYPT);
}
});
//存货下架存储类型
$('#ltkzaName').searchbox({
type: "system", name: "dictionary",
getParam: function (item) {
......@@ -246,6 +250,7 @@ function bindEvent(){
$('#ltkzaName').val(data.LTYPT);
}
});
//存货上架存储类型
$('#ltkzeName').searchbox({
type: "system", name: "dictionary",
getParam: function (item) {
......@@ -259,6 +264,7 @@ function bindEvent(){
$('#ltkzeName').val(data.LTYPT);
}
});
//存储分区标识
$('#lgbkzName').searchbox({
type: "system", name: "dictionary",
getParam: function (item) {
......
......@@ -27,9 +27,6 @@
<button id="back" title="" type="button" onclick="clearForm()" class="btn btn-gray"><i
class="fa fa-reply"></i>撤销
</button>
<button id="showChart" title="" type="button" onclick="distributeForm()" class="btn btn-gray"><i
class="fa fa-sitemap"></i>分发
</button>
</div>
<br/>
......@@ -85,16 +82,16 @@
<x:selectC name="lgnum" label="仓库号" labelCol="1" fieldCol="2" dictionary="lgnum"/>
<x:inputC name="lgtypName" label="存储类型" labelCol="1" fieldCol="2" wrapper="select"/>
<x:hidden name="lgtyp"/>
<x:inputC name="ltkzaName" label="存货下架存储类型" labelCol="1" fieldCol="2" required="true" wrapper="select"/>
<x:inputC name="ltkzaName" label="存货下架存储类型" labelCol="2" fieldCol="2" required="true" wrapper="select"/>
<x:hidden name="ltkza"/>
<x:inputC name="ltkzeName" label="存货上架存储类型" labelCol="1" fieldCol="2" required="true" wrapper="select"/>
<x:inputC name="ltkzeName" label="存货上架存储类型" labelCol="2" fieldCol="2" required="true" wrapper="select"/>
<x:hidden name="ltkze"/>
<x:inputC name="lgbkzName" label="存储分区标识" labelCol="1" fieldCol="2" required="true" wrapper="select"/>
<x:hidden name="lgbkz"/>
<x:inputC name="lhmg1" label="仓库设施1存储数量" labelCol="1" fieldCol="2" required="false"/>
<x:inputC name="lhme1Name" label="仓库设施1存储单位" labelCol="1" fieldCol="2" required="false" wrapper="select"/>
<x:inputC name="lhmg1" label="仓库设施1存储数量" labelCol="2" fieldCol="2" required="false"/>
<x:inputC name="lhme1Name" label="仓库设施1存储单位" labelCol="2" fieldCol="2" required="false" wrapper="select"/>
<x:hidden name="lhme1"/>
<x:inputC name="lety1" label="仓库设施1类型" labelCol="1" fieldCol="2" required="false"/>
<x:inputC name="lety1" label="仓库设施1类型" labelCol="1" fieldCol="2" required="false" readonly="true"/>
</div>
</div>
......
......@@ -166,12 +166,30 @@ function loadSuppliersPayListGrid() {
//editor: {type: 'text', required: true}
},
{
display: "中心记帐冻结", name: "sperr", width: 100, minWidth: 60, type: "String", align: "left",
editor: {type: 'text', required: false}
display: "中心记帐冻结", name: "sperrTextView", width: 100, minWidth: 60, type: "String", align: "left",
editor: {
type: 'dictionary',
data: {name: 'insmk'},
textField: 'sperrTextView',
valueField: 'sperr',
required: false,
render: function (item) {
return item.sperrTextView;
}
}
},
{
display: "对公司代码过帐冻结", name: "sperrB", width: 140, minWidth: 60, type: "String", align: "left",
editor: {type: 'text', required: false}
display: "对公司代码过帐冻结", name: "sperrBTextView", width: 140, minWidth: 60, type: "String", align: "left",
editor: {
type: 'dictionary',
data: {name: 'insmk'},
textField: 'insmkTextView',
valueField: 'sperrB',
required: false,
render: function (item) {
return item.sperrBTextView;
}
}
},
],
......
......@@ -83,11 +83,14 @@
<x:inputC name="faxNumber" label="传真" labelCol="1" fieldCol="2"/>
<%--<x:inputC name="faxExtens" label="第一个传真号分机号" labelCol="1" fieldCol="2"/>--%>
<x:selectC name="ktokk" label="供应商帐户组" labelCol="1" fieldCol="2" required="true" dictionary="buGroup"/>
<x:inputC name="sperm" label="集中设置的采购冻结" labelCol="1" fieldCol="2"/>
<x:inputC name="sperr" label="中心记帐冻结" labelCol="1" fieldCol="2"/>
<x:inputC name="vbund" label="贸易伙伴" labelCol="1" fieldCol="2"/>
<x:inputC name="kunnr" label="客户编号" labelCol="1" fieldCol="2"/>
<x:inputC name="stenr" label="责任税务部门的税收编号" labelCol="1" fieldCol="2" required="true"/>
<x:inputC name="vbund" label="贸易伙伴" labelCol="1" fieldCol="2"/>
<x:inputC name="stenr" label="责任税务部门的税收编号" labelCol="2" fieldCol="2" required="true"/>
<x:selectC name="sperr" label="中心记帐冻结" labelCol="1" fieldCol="1" dictionary="insmk"/>
<x:selectC name="sperm" label="集中设置的采购冻结" labelCol="2" fieldCol="1" dictionary="insmk"/>
</div>
......
......@@ -329,6 +329,10 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void deleteNonProdApplyBaseInfoById(String id) {
NonProdApplyBaseInfo baseInfo=this.nonProdApplyBaseInfoRepository.findOne(id);
if (baseInfo.getStatusId()!=0){
throw new RuntimeException("审批中和已完成状态的,不能删除!");
}
nonProdApplyBaseInfoRepository.delete(id);
}
......
......@@ -60,11 +60,14 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
String genericName=sdo.getString("genericName");
Integer active=sdo.getInteger("active");
String meId=sdo.getString("meId");
String opstatus=sdo.getString("opstatus"); //操作状态
NonProdApplyBaseInfo nonProdApplyBaseInfo=nonProdApplyBaseInfoRepository.findOne(sdo.getString("id"));
nonProdApplyBaseInfo.setBusinessUsage(sdo.getString("businessUsage"));
if (StringUtil.isNotBlank(sdo.getString("distribute"))){ //是否已分发
nonProdApplyBaseInfo.setDistribute(1);
nonProdApplyBaseInfo.setDistribute(2);
} else {
nonProdApplyBaseInfo.setDistribute(sdo.getInteger("active"));
}
if ("K".equals(businessCode)){ //首页进入的基本信息维护
nonProdApplyBaseInfo.setGenericName(sdo.getString("genericName"));
......@@ -131,7 +134,7 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
nonProdApplyDept = this.save(nonProdApplyDept);
String applyDeptId=sdo.getString("applyDeptId");
if (StringUtil.isBlank(businessCode)) { //业务类型为空 ,表示是基本信息进入的 才保存分发信息
if ((StringUtil.isBlank(businessCode)||"INIT_DPT".equals(businessCode))&&"2".equals(sdo.getString("distribute"))) { //业务类型为空 ,表示是基本信息进入的 才保存分发信息
//保存部门分发任务
//获取分发的部门与人员信息
ObjectMapper objectMapper = new ObjectMapper();
......@@ -148,7 +151,7 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
}
saveDeptStaff(deptStaffList, nonProdApplyDept.getApplyDeptId(),genericName);
}
if (active!=null&&active == 1){//各部门提交后,隐藏消息
if (active!=null&&active == 2&&opstatus.equals("1")){//各部门都提交后,隐藏消息
bsnMessageApplication.submitTask(meId);
//如果所有的业务部门处理完 ,则推送SAP
BsnMessageSponsor bsnMessageSponsor=bsnMessageSponsorRepository.findByBusinessId(nonProdApplyDept.getApplyDeptId());
......@@ -245,7 +248,9 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
}
@Override
public void deleteSapNonProdApplyDept(SapNonProdApplyDept sapNonProdApplyDept){
nonProdApplyDeptRepository.delete(sapNonProdApplyDept);
if (sapNonProdApplyDept!=null){
nonProdApplyDeptRepository.delete(sapNonProdApplyDept);
}
}
@Override
......@@ -313,9 +318,11 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
applyDept.setMatnr((String) backMap.get("MESSAGE_V1"));
}
this.nonProdApplyDeptRepository.save(applyDept);
baseInfo.setDistribute(3);
nonProdApplyBaseInfoRepository.save(baseInfo);
} else {
//更改分发状态
baseInfo.setDistribute(0);
baseInfo.setDistribute(1);
nonProdApplyBaseInfoRepository.save(baseInfo);
throw new RuntimeException("数据传输失败,请稍后手动重试!" + backMap.get("MESSAGE"));
}
......
......@@ -19,6 +19,7 @@ import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.annotation.SkipAuth;
import com.huigou.uasp.bmp.common.BizBillStatus;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.CommonUtil;
import com.huigou.util.SDO;
import com.huigou.util.StringUtil;
import org.slf4j.Logger;
......@@ -144,7 +145,7 @@ public class NonProdApplyController extends CommonController {
this.putAttribute("id", "");
}
}
nonProdApplyBaseInfo.setAttbizId(CommonUtil.createGUID()); // 自动生成附件id
nonProdApplyBaseInfo.setStatusId(BizBillStatus.APPLYING.getId());
Operator operator = getOperator();//获取当前操作员的详情信息
nonProdApplyBaseInfo.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName()));
......
......@@ -126,8 +126,10 @@ public class NonProdApplyNextController extends CommonController {
this.putAttribute("busiLens",slen);
if (nonProdApplyDept != null) {
getBaseInfoAttrs(nonProdApplyBaseInfo, nonProdApplyDept);
if (nonProdApplyBaseInfo.getDistribute()!=null&&nonProdApplyBaseInfo.getDistribute()==1){
this.putAttribute("active",1);
if (nonProdApplyBaseInfo.getDistribute()!=null){
this.putAttribute("active",nonProdApplyBaseInfo.getDistribute());
} else { // 未分发
this.putAttribute("active",0);
}
if ("product".equals(nonProdApplyDept.getKind())){
this.putAttribute("kind","product");
......@@ -235,6 +237,7 @@ public class NonProdApplyNextController extends CommonController {
slen=baseInfo.getBusinessUsage().split(",").length+1;
}
this.putAttribute("busiLens",slen);
this.putAttribute("active",baseInfo.getDistribute());
String businessCode=circulate.get("deptCode").toString();
switch (businessCode) {
case "INIT_DPT": //推送SAP错误 产生的待办消息
......@@ -245,10 +248,18 @@ public class NonProdApplyNextController extends CommonController {
baseInfo.setApplyType("2");
}
this.putAttribute("applyType",baseInfo.getApplyType());
this.putAttribute("active",0);
this.putAttribute("active",baseInfo.getDistribute());
Map <String,String>dictMapUsage=DictUtil.getDictionary("serviceusage");
String dictMapUsages="";
for (Map.Entry<String, String> entry: dictMapUsage.entrySet()) {
// String key = entry.getKey().toUpperCase();
dictMapUsages+=entry.getKey().toUpperCase()+","+entry.getValue()+";";
}
this.putAttribute("dictUsages",dictMapUsages);
return forward("nonProdApplyNext", nonProdApplyDept);
case "K":
this.putAttribute("active",2); //已经分发的 填写基本数据
this.putAttribute("applyType",3);
return forward("nonProdApplyNext", nonProdApplyDept);
case "C":
return forward("nonProdApplyClass", nonProdApplyDept);
......
......@@ -120,10 +120,14 @@ public class NonProdApplyBaseInfo extends FlowBillAbstractEntity {
@Column(name = "kind")
private String kind;
//是否分发 1表示已分发
//处理状态: 0 待分发 1 基本信息填写 2 已分发 3 已办结
@Column(name = "distribute")
private Integer distribute;
@Column(name = "attbiz_id")
private String attbizId;
@Transient
private String applyType;
......
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