Commit 4b53e064 authored by 刘学辉's avatar 刘学辉

Merge remote-tracking branch 'origin/dev' into dev

parents 84393494 aa19b3ba
...@@ -233,7 +233,7 @@ function initializeGrid() { ...@@ -233,7 +233,7 @@ function initializeGrid() {
updateHandler: showUpdateDialog, updateHandler: showUpdateDialog,
moveHandler: moveHandler, moveHandler: moveHandler,
deleteHandler: deleteHandler, deleteHandler: deleteHandler,
saveSortIDHandler: updateSequence, //saveSortIDHandler: updateSequence,
importProcUnit: { importProcUnit: {
id: 'importProcUnit', id: 'importProcUnit',
text: '导入流程环节', text: '导入流程环节',
...@@ -272,13 +272,13 @@ function initializeGrid() { ...@@ -272,13 +272,13 @@ function initializeGrid() {
type: "string", type: "string",
align: "left" align: "left"
}, },
{ // {
display: "排序号", name: "sequence", width: 60, minWidth: 60, type: "int", align: "left", // display: "排序号", name: "sequence", width: 60, minWidth: 60, type: "int", align: "left",
render: function (item) { // render: function (item) {
item.id = item.id; //只为了能够更新sequence // item.id = item.id; //只为了能够更新sequence
return UICtrl.sequenceRender(item); // return UICtrl.sequenceRender(item);
} // }
}, // },
{ {
display: "状态", name: "status", width: 60, minWidth: 60, type: "string", align: "left", display: "状态", name: "status", width: 60, minWidth: 60, type: "string", align: "left",
render: function (item) { render: function (item) {
...@@ -292,9 +292,9 @@ function initializeGrid() { ...@@ -292,9 +292,9 @@ function initializeGrid() {
parms: { parms: {
parentId: 1, inculdeProcUnit: 1 parentId: 1, inculdeProcUnit: 1
}, },
usePager: false, usePager: true,
sortName: "sequence", sortName: "sequence",
SortOrder: "asc", sortOrder: "asc",
toolbar: toolbarOptions, toolbar: toolbarOptions,
width: '99.8%', width: '99.8%',
height: '100%', height: '100%',
......
...@@ -80,7 +80,13 @@ $(function () { ...@@ -80,7 +80,13 @@ $(function () {
var params = {}; var params = {};
params.personId = personData.personId; params.personId = personData.personId;
params.personMemberId = mainOrgData.id; params.personMemberId = mainOrgData.id;
Public.ajax(web_app.name + "/org/changePersonMainOrg.ajax", params); Public.ajax(web_app.name + "/org/changePersonMainOrg.ajax", params,function () {
Public.ajax(web_app.name + "/syncOrg/updatePersonToSap.ajax",
{personIds:personData.personId},
function () {
})
});
return true; return true;
} }
}); });
...@@ -614,9 +620,12 @@ function doSavePerson() { ...@@ -614,9 +620,12 @@ function doSavePerson() {
var url = web_app.name + (id ? '/org/updatePerson.ajax' : '/org/insertPerson.ajax'); var url = web_app.name + (id ? '/org/updatePerson.ajax' : '/org/insertPerson.ajax');
$('#submitForm').ajaxSubmit({ url: url, param: param, success: function () { $('#submitForm').ajaxSubmit({ url: url, param: param, success: function () {
if (isSapPerson=="1"){ if (isSapPerson=="1"){
Public.ajax(web_app.name + "/syncOrg/insertOrUpdatePersonToSap.ajax",{code:$("#code").val(),flag:type=='S'?"U":"I"},function () { Public.ajax(web_app.name + "/syncOrg/insertOrUpdatePersonToSap.ajax",
{code:$("#code").val(),flag:type=='S'?"U":"I"},
function () {
})} })
}
refreshFlag = true; refreshFlag = true;
_self.close(); _self.close();
} }
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<x:inputC name="storeName" required="false" label="库存地点" labelCol="1" wrapper="select" fieldCol="2"/> <x:inputC name="storeName" required="false" label="库存地点" labelCol="1" wrapper="select" fieldCol="2"/>
<!--x:inputC name="supplier" required="true" label="供应商" labelCol="1" fieldCol="2"/--> <!--x:inputC name="supplier" required="true" label="供应商" labelCol="1" fieldCol="2"/-->
<x:hidden name="supplier"/> <x:hidden name="supplier"/>
<x:inputC name="supplierName" required="true" label="供应商名称" labelCol="1" fieldCol="2" wrapper="select"/> <x:inputC name="supplierName" label="供应商名称" labelCol="1" fieldCol="2" wrapper="select"/>
<x:inputC name="amount" required="false" label="总价值" labelCol="1" fieldCol="2" mask="positiveMoney"/> <x:inputC name="amount" required="false" label="总价值" labelCol="1" fieldCol="2" mask="positiveMoney"/>
</div> </div>
<div class="hg-form-row"> <div class="hg-form-row">
......
...@@ -39,7 +39,9 @@ function initAufnr(knttp){ ...@@ -39,7 +39,9 @@ function initAufnr(knttp){
columns.some(column => { columns.some(column => {
if (column.name == "aufnr"){ if (column.name == "aufnr"){
column.hide = knttp == 'F'? false:true; column.hide = knttp == 'F'? false:true;
if (typeof(getSubProcUnitId) =='function'&&"financeNode" == getSubProcUnitId()){
column.editor.required = knttp == 'F'? true:false; column.editor.required = knttp == 'F'? true:false;
}
return true; return true;
} }
return false; return false;
...@@ -77,7 +79,9 @@ function initItemGrid() { ...@@ -77,7 +79,9 @@ function initItemGrid() {
pstyp: pstyp, pstyp: pstyp,
badat: fillinDate, badat: fillinDate,
erdat: fillinDate, erdat: fillinDate,
knttp: $("#knttp").val() knttp: $("#knttp").val(),
ernam: $("#personMemberName").val(),
afnam: $("#personMemberName").val(),
}); });
} }
}, },
...@@ -93,6 +97,19 @@ function initItemGrid() { ...@@ -93,6 +97,19 @@ function initItemGrid() {
} }
}); });
}, },
copyHandler: {
id: 'copyHandler', text: '复制', img: 'fa-copy', click: function () {
var row = itemGridManager.getSelectedRow();
if (!row) {
Public.tip("请勾选一条数据");
return;
}
var newRow = JSON.parse(JSON.stringify(row));
newRow.bnfpo = (itemGridManager.getData().length + 1) * 10;
newRow.id = null;
UICtrl.addGridRow(itemGridManager, newRow);
}
}
}) })
itemGridManager = UICtrl.grid('#maingrid', { itemGridManager = UICtrl.grid('#maingrid', {
columns: getGridColumns(), columns: getGridColumns(),
...@@ -150,6 +167,126 @@ function initItemGrid() { ...@@ -150,6 +167,126 @@ function initItemGrid() {
function getGridColumns() { function getGridColumns() {
var columns = []; var columns = [];
if (typeof(getSubProcUnitId) =='function'&&"financeNode" == getSubProcUnitId()){
columns.push({
display: "申购项次号", name: "bnfpo", width: "80", align: "left", type: "string",
},);
columns.push({display: "项次类别", name: "pstyp", width: "100", align: "left", type: "string", hide: true},);
columns.push({
display: "工厂", name: "werks", width: "100", align: "left", type: "string"
},);
columns.push({
display: "工厂名称", name: "name1", width: "200", align: "left", type: "string",
});
// columns.push({
// display: "物料编号", name: "matnr", width: "300", align: "left", type: "string",
// editor: {
// required: false, type: "select",
// data: {
// type: 'system',
// name: "sapMaterialSelect",
// getParam: function (item) {
// return {
// filterValue: item.werks
// }
// },
// back: {
// MATNR: "matnr",
// MAKTX: "txz01",
// MATKL: "matkl",
// WGBEZ: "matklName",
// EKGRP: "ekgrp",
// EKNAM: "ekgrpName",
// PEINH: "peinh",
// MEINS: "meins",
// MSEHL: "meinsName",
// LGFSB: "lgort",
// LGOBE: "lgobe"
// }
// },
// }
// });
columns.push({
display: "库存地点", name: "lgort", width: "100", align: "left", type: "string",
},);
columns.push({
display: "库存地点名称", name: "lgobe", width: "200", align: "left", type: "string",
},);
columns.push({
display: "短文本", name: "txz01", width: "200", align: "left", type: "string",
},);
columns.push({
display: "物料组", name: "matklName", width: "100", align: "left", type: "string",
},);
columns.push({
display: "申购数量", name: "menge", width: 150, minWidth: 60, type: "string", align: "center",
},);
columns.push({
display: "申购数量单位", name: "meinsName", width: 150, minWidth: 60, type: "string", align: "center",
},);
columns.push({
display: "采购组", name: "ekgrpName", width: 150, minWidth: 60, type: "string", align: "center",
},);
columns.push({
display: "批准日期", name: "frgdt", width: "100", align: "left", type: "string",
},);
columns.push({
display: "要求交货日期", name: "lfdat", width: "100", align: "left", type: "string",
},);
columns.push({display: "创建者", name: "ernam", width: "200", align: "left", type: "string"},);
columns.push({
display: "申请人", name: "afnam", width: "90", align: "left", type: "string",
},);
columns.push({
display: "预估单价", name: "preis", width: "100", align: "left", type: "string",
},);
columns.push({
display: "价格基数", name: "ebanPeinh", width: "100", align: "left", type: "string",
},);
columns.push({
display: "币种", name: "waersName", width: "100", align: "left", type: "string",
},);
columns.push({
display: "评估金额", name: "ebanNetwr", width: "100", align: "left", type: "string",
},);
columns.push({
display: "成本中心", name: "kostlName", width: "200", align: "left", type: "string",
},);
columns.push({
display: "订单号", name: "aufnr", width: "200", align: "left", type: "string",
editor: {type: 'text',required: true}
});
// columns.push({
// display: "审批处理状态", name: "banpr", width: "100", align: "left", type: "string",
// editor: {type: 'text'}
// },);
columns.push({
display: "总账科目", name: "sakto", width: "100", align: "left", type: "string",
editor: {
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {
fieldName: "SAKTO",
filterValue:'6600'
}
},
back: {
SAKNR:'sakto',
}
},
}
},);
columns.push({
display: "申请日期", name: "badat", width: "100", align: "left", type: "string",
},);
columns.push({
display: "创建日期", name: "erdat", width: "100", align: "left", type: "string",
},);
}else {
columns.push({ columns.push({
display: "申购项次号", name: "bnfpo", width: "80", align: "left", type: "string", display: "申购项次号", name: "bnfpo", width: "80", align: "left", type: "string",
//editor: {type: 'spinner', min: 10, max: 200, mask: 'nnn'} //editor: {type: 'spinner', min: 10, max: 200, mask: 'nnn'}
...@@ -375,7 +512,6 @@ function getGridColumns() { ...@@ -375,7 +512,6 @@ function getGridColumns() {
},); },);
columns.push({ columns.push({
display: "订单号", name: "aufnr", width: "200", align: "left", type: "string", display: "订单号", name: "aufnr", width: "200", align: "left", type: "string",
editor: {type: 'text',required: false,}
// editor: { // editor: {
// required: false, type: "select", // required: false, type: "select",
// data: { // data: {
...@@ -397,6 +533,25 @@ function getGridColumns() { ...@@ -397,6 +533,25 @@ function getGridColumns() {
// display: "审批处理状态", name: "banpr", width: "100", align: "left", type: "string", // display: "审批处理状态", name: "banpr", width: "100", align: "left", type: "string",
// editor: {type: 'text'} // editor: {type: 'text'}
// },); // },);
columns.push({
display: "总账科目", name: "sakto", width: "100", align: "left", type: "string",
// editor: {
// required: true, type: "select",
// data: {
// type: 'system',
// name: "dictionary",
// getParam: function (item) {
// return {
// fieldName: "SAKTO",
// filterValue:'6600'
// }
// },
// back: {
// SAKNR:'sakto',
// }
// },
// }
},);
columns.push({ columns.push({
display: "申请日期", name: "badat", width: "100", align: "left", type: "string", display: "申请日期", name: "badat", width: "100", align: "left", type: "string",
editor: {required: false, type: "date"} editor: {required: false, type: "date"}
...@@ -405,6 +560,8 @@ function getGridColumns() { ...@@ -405,6 +560,8 @@ function getGridColumns() {
display: "创建日期", name: "erdat", width: "100", align: "left", type: "string", display: "创建日期", name: "erdat", width: "100", align: "left", type: "string",
//editor: {required: false, type: "date"} //editor: {required: false, type: "date"}
},); },);
}
return columns; return columns;
} }
...@@ -427,16 +584,20 @@ function getExtendedData(processAction) { ...@@ -427,16 +584,20 @@ function getExtendedData(processAction) {
if (!datas) { if (!datas) {
return false; return false;
} }
if (datas.length == 0 ){
Public.tip("采购项次不能为空");
return false;
}
var checked6 = false; var checked6 = false;
datas.forEach(data => { datas.forEach(data => {
if ("F" == data.knttp && Public.isBlank(data.aufnr)){ if ("F" == data.knttp && Public.isBlank(data.aufnr)){
checked6 = true; checked6 = true;
} }
}) })
if (checked6) { // if (checked6) {
Public.tip("订单号不能为空") // Public.tip("订单号不能为空")
return false; // return false;
} // }
extendedData.sapPurchaseItems = Public.encodeJSONURI(datas); extendedData.sapPurchaseItems = Public.encodeJSONURI(datas);
} }
return extendedData; return extendedData;
...@@ -465,4 +626,21 @@ function getGridData() { ...@@ -465,4 +626,21 @@ function getGridData() {
return datas; return datas;
} }
//UICtrl中校验是否允许编辑
function businessJudgmentUnit() {
var isApply = isApplyProcUnit();
if (isApply) {
return true;
}else {
//财务节点
if (typeof(getSubProcUnitId) =='function'&&"financeNode" === getSubProcUnitId()){
UICtrl.disable("#knttp");
return true;
}
return false;
}
return true;
}
...@@ -17,6 +17,24 @@ ...@@ -17,6 +17,24 @@
<form class="hg-form ui-show" method="post" action="" id="queryMainForm"> <form class="hg-form ui-show" method="post" action="" id="queryMainForm">
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="billCode" label="需求跟踪编号" labelCol="1"/> <x:inputC name="billCode" label="需求跟踪编号" labelCol="1"/>
<x:inputC name="banfn" label="采购申请编号" labelCol="1"/>
</div>
<div class="hg-form-row">
<div class="col-xs-4 col-sm-1">
<label class="hg-form-label">申请日期起&nbsp;:</label>
</div>
<div class="col-xs-4 col-sm-2 col-white-bg">
<x:input name="fillinBeginDate" required="false" wrapper="date" />
</div>
<div class="col-xs-4 col-sm-1">
<label class="hg-form-label">申请日期止&nbsp;:</label>
</div>
<div class="col-xs-4 col-sm-2 col-white-bg">
<x:input name="fillinEndDate" label="至" required="false" wrapper="date" />
</div>
</div>
<div class="hg-form-row">
<x:checkboxListC name="statusKind" label="common.field.status" list="statusKindsList" labelCol="1" fieldCol="3"/>
</div> </div>
<x:searchButtons/> <x:searchButtons/>
</form> </form>
......
...@@ -54,6 +54,19 @@ function initItemGrid() { ...@@ -54,6 +54,19 @@ function initItemGrid() {
} }
}); });
}, },
copyHandler: {
id: 'copyHandler', text: '复制', img: 'fa-copy', click: function () {
var row = itemGridManager.getSelectedRow();
if (!row) {
Public.tip("请勾选一条数据");
return;
}
var newRow = JSON.parse(JSON.stringify(row));
newRow.bnfpo = (itemGridManager.getData().length + 1) * 10;
newRow.id = null;
UICtrl.addGridRow(itemGridManager, newRow);
}
}
}) })
itemGridManager = UICtrl.grid('#maingrid', { itemGridManager = UICtrl.grid('#maingrid', {
columns: getGridColumns(), columns: getGridColumns(),
...@@ -321,6 +334,10 @@ function getExtendedData(processAction) { ...@@ -321,6 +334,10 @@ function getExtendedData(processAction) {
if (!datas) { if (!datas) {
return false; return false;
} }
if (datas.length == 0 ){
Public.tip("采购项次不能为空");
return false;
}
extendedData.sapPurchaseItems = Public.encodeJSONURI(datas); extendedData.sapPurchaseItems = Public.encodeJSONURI(datas);
} }
return extendedData; return extendedData;
......
...@@ -36,16 +36,18 @@ function initAufnr(knttp){ ...@@ -36,16 +36,18 @@ function initAufnr(knttp){
knttp = $('#knttp').val(); knttp = $('#knttp').val();
} }
var columns = itemGridManager.columns; var columns = itemGridManager.columns;
//内部订单
columns.some(column => { columns.some(column => {
if (column.name == "aufnr"){ if (column.name == "aufnr"){
column.hide = knttp == 'F'? false:true; column.hide = knttp == 'F'? false:true;
if (isApplyProcUnit()){ if (typeof(getSubProcUnitId) =='function'&&"financeNode" == getSubProcUnitId()){
column.editor.required = knttp == 'F'? true:false; column.editor.required = knttp == 'F'? true:false;
} }
return true; return true;
} }
return false; return false;
}) })
//成本中心
columns.some(column => { columns.some(column => {
if (column.name == "kostlName"){ if (column.name == "kostlName"){
//column.hide = knttp == 'F'? false:true; //column.hide = knttp == 'F'? false:true;
...@@ -91,7 +93,9 @@ function initItemGrid() { ...@@ -91,7 +93,9 @@ function initItemGrid() {
pstyp: pstyp, pstyp: pstyp,
badat: fillinDate, badat: fillinDate,
erdat: fillinDate, erdat: fillinDate,
knttp: $("#knttp").val() knttp: $("#knttp").val(),
ernam: $("#personMemberName").val(),
afnam: $("#personMemberName").val(),
}); });
} }
}, },
...@@ -107,6 +111,19 @@ function initItemGrid() { ...@@ -107,6 +111,19 @@ function initItemGrid() {
} }
}); });
}, },
copyHandler: {
id: 'copyHandler', text: '复制', img: 'fa-copy', click: function () {
var row = itemGridManager.getSelectedRow();
if (!row) {
Public.tip("请勾选一条数据");
return;
}
var newRow = JSON.parse(JSON.stringify(row));
newRow.bnfpo = (itemGridManager.getData().length + 1) * 10;
newRow.id = null;
UICtrl.addGridRow(itemGridManager, newRow);
}
}
}) })
itemGridManager = UICtrl.grid('#maingrid', { itemGridManager = UICtrl.grid('#maingrid', {
columns: getGridColumns(), columns: getGridColumns(),
...@@ -227,6 +244,7 @@ function getGridColumns() { ...@@ -227,6 +244,7 @@ function getGridColumns() {
//填订单类型是Z01或者Z02的 //填订单类型是Z01或者Z02的
columns.push({ columns.push({
display: "订单号", name: "aufnr", width: "200", align: "left", type: "string", display: "订单号", name: "aufnr", width: "200", align: "left", type: "string",
editor: {type: 'text', required: true,}
}); });
columns.push({ columns.push({
display: "总账科目", name: "sakto", width: "100", align: "left", type: "string", display: "总账科目", name: "sakto", width: "100", align: "left", type: "string",
...@@ -463,42 +481,25 @@ function getGridColumns() { ...@@ -463,42 +481,25 @@ function getGridColumns() {
},); },);
columns.push({ columns.push({
display: "订单号", name: "aufnr", width: "200", align: "left", type: "string", display: "订单号", name: "aufnr", width: "200", align: "left", type: "string",
editor: {type: 'text', required: false,} });
columns.push({
display: "总账科目", name: "sakto", width: "100", align: "left", type: "string",
// editor: { // editor: {
// required: false, type: "select", // required: true, type: "select",
// data: { // data: {
// type: 'system', // type: 'system',
// name: "getCompanyOrders", // name: "dictionary",
// getParam: function (item) { // getParam: function (item) {
// return { // return {
// BUKRS: '1000' // fieldName: "SAKTO",
// filterValue:'6600'
// } // }
// }, // },
// back: { // back: {
// AUFNR: "aufnr", // SAKNR:'sakto',
// KTEXT: "ktext"
// } // }
// }, // },
// } // }
});
columns.push({
display: "总账科目", name: "sakto", width: "100", align: "left", type: "string",
editor: {
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {
fieldName: "SAKTO",
filterValue:'6600'
}
},
back: {
SAKNR:'sakto',
}
},
}
},); },);
columns.push({ columns.push({
display: "申请日期", name: "badat", width: "100", align: "left", type: "string", display: "申请日期", name: "badat", width: "100", align: "left", type: "string",
...@@ -531,16 +532,20 @@ function getExtendedData(processAction) { ...@@ -531,16 +532,20 @@ function getExtendedData(processAction) {
if (!datas) { if (!datas) {
return false; return false;
} }
if (datas.length == 0 ){
Public.tip("采购项次不能为空");
return false;
}
var checked6 = false; var checked6 = false;
datas.forEach(data => { datas.forEach(data => {
if ("F" == data.knttp && Public.isBlank(data.aufnr)){ if ("F" == data.knttp && Public.isBlank(data.aufnr)){
checked6 = true; checked6 = true;
} }
}) })
if (checked6) { // if (checked6) {
Public.tip("订单号不能为空") // Public.tip("订单号不能为空")
return false; // return false;
} // }
extendedData.sapPurchaseItems = Public.encodeJSONURI(datas); extendedData.sapPurchaseItems = Public.encodeJSONURI(datas);
} }
return extendedData; return extendedData;
......
...@@ -22,6 +22,9 @@ function initItemGrid() { ...@@ -22,6 +22,9 @@ function initItemGrid() {
usePager: true, usePager: true,
rownumbers: true, rownumbers: true,
// fixedCellHeight: true, // fixedCellHeight: true,
onAfterShowData: function (){
initTotalMoney();
}
} }
); );
UICtrl.setSearchAreaToggle(itemGridManager); UICtrl.setSearchAreaToggle(itemGridManager);
...@@ -60,6 +63,19 @@ function getGridColumns() { ...@@ -60,6 +63,19 @@ function getGridColumns() {
} }
function initTotalMoney(){
var _grid = UICtrl.getGridManager('#maingrid');
if (_grid != null){
var data = _grid.currentData.Rows;
var totalMoney = 0;
$.each(data, function (i, o) {
var _netwr = o['netwr'] + '';
totalMoney = MathUtil.add(totalMoney, _netwr);
$('#totalMoney').val(totalMoney);
});
}
}
function getId() { function getId() {
return $('#id').val(); return $('#id').val();
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
<x:inputC name="waers" label="币种" readonly="true" labelCol="1" fieldCol="2" required="false"/> <x:inputC name="waers" label="币种" readonly="true" labelCol="1" fieldCol="2" required="false"/>
<x:inputC name="fillinDate" label="创建日期" readonly="true" wrapper="date" labelCol="1" fieldCol="2" <x:inputC name="fillinDate" label="创建日期" readonly="true" wrapper="date" labelCol="1" fieldCol="2"
required="false"/> required="false"/>
<x:inputC name="totalMoney" label="订单总金额" readonly="true" labelCol="1" fieldCol="2"
required="false"/>
</div> </div>
</div> </div>
<x:title title="sap回执" name="group"/> <x:title title="sap回执" name="group"/>
......
...@@ -19,6 +19,23 @@ ...@@ -19,6 +19,23 @@
<x:inputC name="billCode" label="需求跟踪编号" labelCol="1"/> <x:inputC name="billCode" label="需求跟踪编号" labelCol="1"/>
<x:inputC name="ebeln" label="采购订单号码" labelCol="1"/> <x:inputC name="ebeln" label="采购订单号码" labelCol="1"/>
</div> </div>
<div class="hg-form-row">
<div class="col-xs-4 col-sm-1">
<label class="hg-form-label">申请日期起&nbsp;:</label>
</div>
<div class="col-xs-4 col-sm-2 col-white-bg">
<x:input name="fillinBeginDate" required="false" wrapper="date" />
</div>
<div class="col-xs-4 col-sm-1">
<label class="hg-form-label">申请日期止&nbsp;:</label>
</div>
<div class="col-xs-4 col-sm-2 col-white-bg">
<x:input name="fillinEndDate" label="至" required="false" wrapper="date" />
</div>
</div>
<div class="hg-form-row">
<x:checkboxListC name="statusKind" label="common.field.status" list="statusKindsList" labelCol="1" fieldCol="3"/>
</div>
<x:searchButtons/> <x:searchButtons/>
</form> </form>
<x:title title="" hideTable="#purchaseOrderGrid" name="list"/> <x:title title="" hideTable="#purchaseOrderGrid" name="list"/>
......
...@@ -86,14 +86,14 @@ ...@@ -86,14 +86,14 @@
<!--x:selectC name="ktokk" label="供应商帐户组" labelCol="1" fieldCol="2" required="true" dictionary="buGroup"/--> <!--x:selectC name="ktokk" label="供应商帐户组" labelCol="1" fieldCol="2" required="true" dictionary="buGroup"/-->
<x:inputC name="kunnr" label="客户编号" labelCol="1" fieldCol="2"/> <x:inputC name="kunnr" label="客户编号" labelCol="1" fieldCol="2"/>
<%--<x:inputC name="vbund" label="贸易伙伴" labelCol="1" fieldCol="2"/>--%> <%--<x:inputC name="vbund" label="贸易伙伴" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="stenr" label="责任税务部门的税收编号" labelCol="2" fieldCol="2" required="true"/> <x:inputC name="stenr" label="税号" labelCol="1" fieldCol="2" required="true" maxLength="18"/>
<x:selectC name="sperr" label="中心记帐冻结" labelCol="1" fieldCol="1" dictionary="sperr"/> <x:selectC name="sperr" label="中心记帐冻结" labelCol="1" fieldCol="2" dictionary="sperr"/>
<x:selectC name="sperm" label="集中设置的采购冻结" labelCol="2" fieldCol="1" dictionary="sperrB"/> <x:selectC name="sperm" label="集中设置的采购冻结" labelCol="2" fieldCol="1" dictionary="sperrB"/>
</div> </div>
</div> </div>
<div style="padding-top: 15px;"> <div style="padding-top: 15px;">
<x:fileList bizCode="supplier" bizId="attbizId" id="supplierList" title="供应商资料" /> <x:fileList bizCode="supplier" bizId="attbizId" id="supplierList" title="营业执照/开票资料" />
</div> </div>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<div id="sapSuppliersBuyerGrid" style="margin: 2px;"></div> <div id="sapSuppliersBuyerGrid" style="margin: 2px;"></div>
......
...@@ -15,7 +15,9 @@ function loadSuppliersDataListGrid() { ...@@ -15,7 +15,9 @@ function loadSuppliersDataListGrid() {
addHandler() addHandler()
}, },
updateHandler: showUpdateDialog, updateHandler: showUpdateDialog,
deleteHandler: deleteHandler extendHandler: {id: 'extendHandler', text: '扩展', img: 'fa-music', className: 'btn-gray',click: function () {
extendHandler();
}}
/* testHandler: {id: 'basicInfoMaintenance', text: '基本信息维护', img: 'fa-music', className: 'btn-gray', /* testHandler: {id: 'basicInfoMaintenance', text: '基本信息维护', img: 'fa-music', className: 'btn-gray',
click: function () { click: function () {
...@@ -38,16 +40,16 @@ function loadSuppliersDataListGrid() { ...@@ -38,16 +40,16 @@ function loadSuppliersDataListGrid() {
{display: "申请单编号", name: "billCode", width: 120, minWidth: 60, type: "string", align: "left"}, {display: "申请单编号", name: "billCode", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "申请状态", name: "statusTextView", width: 60, minWidth: 60, type: "string", align: "left"}, {display: "申请状态", name: "statusTextView", width: 60, minWidth: 60, type: "string", align: "left"},
{display: "申请日期", name: "fillinDate", width: 120, minWidth: 60, type: "string", align: "left"}, {display: "申请日期", name: "fillinDate", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "操作类型", name: "applyType", width: 80, minWidth: 60, type: "string", align: "left" {display: "操作类型", name: "applyTypeTextView", width: 80, minWidth: 60, type: "string", align: "left"
,render : function (record, rowindex, value, column) { // ,render : function (record, rowindex, value, column) {
if (value!=null&&value=="0") { // if (value!=null&&value=="0") {
return "新增"; // return "新增";
}else if (value!=null&&value=="1"){ // }else if (value!=null&&value=="1"){
return "修改"; // return "修改";
} else { // } else if (){
return "删除"; // return "删除";
} // }
} // }
}, },
{display: "业务伙伴分组", name: "buGroup", width: 120, minWidth: 60, type: "string", align: "left"}, {display: "业务伙伴分组", name: "buGroup", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "业务伙伴编号", name: "partner", width: 120, minWidth: 60, type: "string", align: "left"}, {display: "业务伙伴编号", name: "partner", width: 120, minWidth: 60, type: "string", align: "left"},
...@@ -202,7 +204,7 @@ function showUpdateDialog(id) { ...@@ -202,7 +204,7 @@ function showUpdateDialog(id) {
UICtrl.addTabItem({ UICtrl.addTabItem({
tabid: 'suppliersDataModi'+id, tabid: 'suppliersDataModi'+id,
text: "供应商主数据修改详情", text: "供应商主数据修改详情",
url: web_app.name + '/sapSuppliersData/forwardSuppliersDataApply.job?bizId='+result.id url: web_app.name + '/sapSuppliersData/forwardSuppliersDataApply.job?bizId='+result.id+ '&flag='+'update'
}); });
} }
...@@ -215,6 +217,24 @@ function showUpdateDialog(id) { ...@@ -215,6 +217,24 @@ function showUpdateDialog(id) {
// }); // });
// } // }
function extendHandler(){
let result=DataUtil.getUpdateRow(gridManager);
if (result.applyType=="-1"){
Public.tip("已经删除的不能再扩展!")
return false;
}
if(result.status!==3){
Public.tip("请选择一条审核完成后数据!")
return false;
}
UICtrl.addTabItem({
tabid: 'suppliersDataModi'+result.id,
text: "供应商主数据扩展详情",
url: web_app.name + '/sapSuppliersData/forwardSuppliersDataApply.job?bizId='+result.id + '&flag='+'extend'
});
}
// 关闭对话框 // 关闭对话框
function onDialogCloseHandler() { function onDialogCloseHandler() {
if (refreshFlag) { if (refreshFlag) {
......
<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@taglib uri="/WEB-INF/taglib.tld" prefix="x" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<script type="text/javascript">
var applyType ="${applyType}";
</script>
<x:base include="layout,dialog,grid,tree,combox,commonTree,date,attachment"/>
<x:script src='/biz/topsun/sap/suppliers/suppliersExtendDataDetail.js'/>
</head>
<body>
<x:billTitle title="供应商主数据扩展申请表" needStatus="false" needPerson="true"/>
<form class="hg-form" method="post" action="" id="submitForm">
<x:hidden name="id"/>
<x:hidden name="sId"/>
<x:hidden name="applyType"/>
<%-- <x:hidden name="billCode"/>--%>
<%-- <x:hidden name="fillinDate" type="datetime"/>--%>
<x:hidden name="fullId"/>
<x:hidden name="organId"/>
<x:hidden name="organName"/>
<x:hidden name="deptId"/>
<%-- <x:hidden name="deptName"/>--%>
<x:hidden name="positionId"/>
<x:hidden name="positionName"/>
<x:hidden name="personMemberId"/>
<x:hidden name="statusId"/>
<%-- <x:hidden name="personMemberName"/>--%>
<x:title title="申请人填写区域" name="group"/>
<div class="hg-form-cols">
<div class="hg-form-row">
<x:inputC name="billCode" label="申请单编号" labelCol="1" readonly="true" fieldCol="2"/>
<x:inputC name="personMemberName" label="申请人" readonly="true" labelCol="1" fieldCol="2"/>
<x:inputC name="deptName" label="申请部门" readonly="true" labelCol="1" fieldCol="2"/>
<x:inputC name="fillinDate" label="申请日期" readonly="true" wrapper="date" labelCol="1" fieldCol="2"/>
</div>
</div>
<x:title title="供应商主数据" name="group"/>
<div class="hg-form-cols">
<div class="hg-form-row">
<x:inputC name="rltgr" label="业务伙伴角色" labelCol="1" fieldCol="2" required="true" readonly="true"/>
<x:selectC name="buGroup" label="业务伙伴分组" labelCol="1" fieldCol="2" required="true" dictionary="buGroup" disabled="true"/>
<x:inputC name="partner" label="供应商编码" labelCol="1" fieldCol="2" required="false" readonly="true"/>
<x:selectC name="title" label="称谓代码" labelCol="1" fieldCol="2" dictionary="title" disabled="true"/>
<x:inputC name="nameOrg1" label="供应商名称1" labelCol="1" fieldCol="2" required="true" readonly="true"/>
<x:inputC name="nameOrg2" label="供应商名称2" labelCol="1" fieldCol="2" readonly="true"/>
<%--<x:inputC name="nameOrg3" label="组织名称3" labelCol="1" fieldCol="2"/>
<x:inputC name="nameOrg4" label="组织名称4" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="buSort1" label="搜索词1" labelCol="1" fieldCol="2" required="true" readonly="true"/>
<x:inputC name="buSort2" label="搜索词2" labelCol="1" fieldCol="2" readonly="true"/>
<%--<x:inputC name="strSuppl1" label="街道2" labelCol="1" fieldCol="2"/>
<x:inputC name="strSuppl2" label="街道3" labelCol="1" fieldCol="2"/>
<x:inputC name="strSuppl3" label="街道4" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="land1Name" label="国家" labelCol="1" fieldCol="2" required="true" wrapper="select" readonly="true"/>
<x:hidden name="land1"/>
<x:inputC name="regionName" label="地区" labelCol="1" fieldCol="2" required="true" wrapper="select" readonly="true"/>
<x:hidden name="region"/>
<x:inputC name="city1" label="城市" labelCol="1" fieldCol="2" required="true" readonly="true"/>
<x:inputC name="street" label="街道地址" labelCol="1" fieldCol="2" maxLength="35" readonly="true"/>
<x:inputC name="strSuppl1" label="街道2" labelCol="1" fieldCol="2" maxLength="35" readonly="true"/>
<x:inputC name="strSuppl2" label="街道3" labelCol="1" fieldCol="2" maxLength="35" readonly="true"/>
<x:inputC name="strSuppl3" label="街道4" labelCol="1" fieldCol="2" maxLength="35" readonly="true"/>
<x:inputC name="strSuppl4" label="街道5" labelCol="1" fieldCol="2" maxLength="35" readonly="true"/>
<x:selectC name="langu" label="语言" labelCol="1" fieldCol="2" required="true" dictionary="langu" disabled="true"/>
<x:inputC name="smtpAddr" label="电子邮件地址" labelCol="1" fieldCol="2" maxLength="30" readonly="true"/>
<x:inputC name="postCode1" label="城市邮政编码" labelCol="1" fieldCol="2" required="true" maxLength="6" readonly="true"/>
<x:inputC name="telNumber" label="电话" labelCol="1" fieldCol="2" readonly="true"/>
<%--<x:inputC name="telExtens" label="第一个电话号码分机" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="mobNumber" label="移动电话" labelCol="1" fieldCol="2" readonly="true"/>
<%--<x:inputC name="mobExtens" label="第一个移动电话号码分机" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="faxNumber" label="传真" labelCol="1" fieldCol="2" maxLength="30" readonly="true"/>
<%--<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="kunnr" label="客户编号" labelCol="1" fieldCol="2" readonly="true"/>
<%--<x:inputC name="vbund" label="贸易伙伴" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="stenr" label="税号" labelCol="1" fieldCol="2" required="true" maxLength="18" readonly="true"/>
<x:selectC name="sperr" label="中心记帐冻结" labelCol="1" fieldCol="2" dictionary="sperr" disabled="true"/>
<x:selectC name="sperm" label="集中设置的采购冻结" labelCol="2" fieldCol="1" dictionary="sperrB" disabled="true"/>
</div>
</div>
<div style="padding-top: 15px;">
<x:fileList bizCode="supplier" bizId="attbizId" id="supplierList" title="营业执照/开票资料" />
</div>
<div class="blank_div clearfix"></div>
<div id="sapSuppliersBuyerGrid" style="margin: 2px;"></div>
<div id="cashierGrid">
<div class="blank_div clearfix"></div>
<div id="sapSuppliersPayGrid" style="margin: 2px;"></div>
<div class="blank_div clearfix"></div>
<div id="sapSuppliersBankGrid" style="margin: 2px;"></div>
</div>
</form>
</body>
</html>
...@@ -409,8 +409,18 @@ public class ResourceSearchController { ...@@ -409,8 +409,18 @@ public class ResourceSearchController {
public Map<String, Object> getBankInfo(SDO sdo) throws IOException { public Map<String, Object> getBankInfo(SDO sdo) throws IOException {
String param = sdo.getString("paramValue"); String param = sdo.getString("paramValue");
String BANKS = sdo.getString("BANKS"); String BANKS = sdo.getString("BANKS");
String noContain = sdo.getString("noContain");
List<Map<String, String>> mapList = new ArrayList<>(); List<Map<String, String>> mapList = new ArrayList<>();
mapList = sapBankInfoApplication.getBankInfo(BANKS); mapList = sapBankInfoApplication.getBankInfo(BANKS);
if (StringUtil.isNotBlank(noContain)){//固定条件过滤,不包含
String[] split = noContain.split(",");
for (String s : split) {
mapList = mapList
.stream()
.filter(map -> map.values().stream().noneMatch(value->value.contains(s)))
.collect(Collectors.toList());
}
}
return sapDictionaryApplication.initEasySearchModel( mapList, param, sdo); return sapDictionaryApplication.initEasySearchModel( mapList, param, sdo);
} }
......
...@@ -23,6 +23,7 @@ import com.huigou.topsun.sap.purchase.domain.vo.SapPurchaseVo; ...@@ -23,6 +23,7 @@ import com.huigou.topsun.sap.purchase.domain.vo.SapPurchaseVo;
import com.huigou.topsun.sap.purchase.repository.SapPurchaseRepository; import com.huigou.topsun.sap.purchase.repository.SapPurchaseRepository;
import com.huigou.topsun.sap.common.domain.SapResult; import com.huigou.topsun.sap.common.domain.SapResult;
import com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrder; import com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrder;
import com.huigou.topsun.sap.suppliers.domain.SuppliersInfo;
import com.huigou.uasp.bmp.common.BizBillStatus; import com.huigou.uasp.bmp.common.BizBillStatus;
import com.huigou.uasp.bmp.fn.CodeGenerator; import com.huigou.uasp.bmp.fn.CodeGenerator;
import com.huigou.uasp.bmp.operator.OperatorApplication; import com.huigou.uasp.bmp.operator.OperatorApplication;
...@@ -32,6 +33,7 @@ import com.huigou.uasp.bpm.ProcessStartModel; ...@@ -32,6 +33,7 @@ import com.huigou.uasp.bpm.ProcessStartModel;
import com.huigou.uasp.bpm.engine.application.WorkflowApplication; import com.huigou.uasp.bpm.engine.application.WorkflowApplication;
import com.huigou.util.ClassHelper; import com.huigou.util.ClassHelper;
import com.huigou.util.Constants; import com.huigou.util.Constants;
import com.huigou.util.DateUtil;
import com.huigou.util.SDO; import com.huigou.util.SDO;
import org.activiti.engine.delegate.DelegateExecution; import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.DelegateTask; import org.activiti.engine.delegate.DelegateTask;
...@@ -91,6 +93,36 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas ...@@ -91,6 +93,36 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
} }
/**
* 设置任务名称
*/
@Override
protected void setTaskDescription(DelegateTask delegateTask) {
String bizId = delegateTask.getExecution().getProcessBusinessKey();
delegateTask.setDescription(this.getApprovalSubjectName(bizId));
}
/**
* 获取任务标题
*
* @param bizId
* @return
*/
private String getApprovalSubjectName(String bizId) {
SapPurchase sapPurchase = this.sapPurchaseRepository.findOne(bizId);
//查询 单据日期
String fillinDateStr = DateUtil.getDateFormat("yyyy-MM-dd HH:mm:ss", sapPurchase.getFillinDate());
//设置标题
switch (sapPurchase.getBsart()){
case "ZNE1"://固定资产采购申请
return String.format("%s-%s(%s)", "固定资产采购申请", "", fillinDateStr);
case "ZFW"://服务类采购申请
return String.format("%s-%s(%s)", "服务类采购申请", "", fillinDateStr);
case "ZNE2"://非资产类消耗性采购申请
return String.format("%s-%s(%s)", "非资产类消耗性采购申请", "", fillinDateStr);
}
return null;
}
@Override @Override
protected Map<String, Object> getProcessBizParams(String bizId) { protected Map<String, Object> getProcessBizParams(String bizId) {
......
...@@ -2,6 +2,7 @@ package com.huigou.topsun.sap.purchase.controller; ...@@ -2,6 +2,7 @@ package com.huigou.topsun.sap.purchase.controller;
import com.huigou.context.Operator; import com.huigou.context.Operator;
import com.huigou.context.OrgUnit; import com.huigou.context.OrgUnit;
import com.huigou.topsun.common.BillStatus;
import com.huigou.topsun.demo.application.LeaveApplication; import com.huigou.topsun.demo.application.LeaveApplication;
import com.huigou.topsun.demo.domain.model.Leave; import com.huigou.topsun.demo.domain.model.Leave;
import com.huigou.topsun.sap.purchase.application.SapPurchaseApplication; import com.huigou.topsun.sap.purchase.application.SapPurchaseApplication;
...@@ -33,6 +34,7 @@ public class SapPurchaseController extends CommonController { ...@@ -33,6 +34,7 @@ public class SapPurchaseController extends CommonController {
private SapPurchaseApplication sapPurchaseApplication; private SapPurchaseApplication sapPurchaseApplication;
public String forwardSapPurchaseList(){ public String forwardSapPurchaseList(){
this.putAttribute("statusKindsList", BillStatus.getValidMap());
return forward("sapPurchaseList"); return forward("sapPurchaseList");
} }
......
...@@ -3,6 +3,8 @@ package com.huigou.topsun.sap.purchase.domain.query; ...@@ -3,6 +3,8 @@ package com.huigou.topsun.sap.purchase.domain.query;
import com.huigou.data.domain.query.QueryAbstractRequest; import com.huigou.data.domain.query.QueryAbstractRequest;
import lombok.Data; import lombok.Data;
import java.util.Date;
/** /**
* @Auther: xin.lu * @Auther: xin.lu
* @Date: 2023/12/27/10:45 * @Date: 2023/12/27/10:45
...@@ -23,4 +25,10 @@ public class SapPurchaseQueryRequest extends QueryAbstractRequest { ...@@ -23,4 +25,10 @@ public class SapPurchaseQueryRequest extends QueryAbstractRequest {
* 采购申请编号 * 采购申请编号
*/ */
private String banfn; private String banfn;
protected Date fillinBeginDate;
protected Date fillinEndDate;
private String statusKind;
} }
...@@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil; ...@@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.huigou.cache.DictUtil;
import com.huigou.cache.SystemCache; import com.huigou.cache.SystemCache;
import com.huigou.context.Operator; import com.huigou.context.Operator;
import com.huigou.context.OrgUnit; import com.huigou.context.OrgUnit;
...@@ -92,7 +93,25 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa ...@@ -92,7 +93,25 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
return sapPurchaseApproval.getId(); return sapPurchaseApproval.getId();
} }
@Override
protected void setTaskDescription(DelegateTask delegateTask) {
String bizId = delegateTask.getExecution().getProcessBusinessKey();
delegateTask.setDescription(this.getApprovalSubjectName(bizId));
}
/**
* 获取任务标题
*
* @param bizId
* @return
*/
private String getApprovalSubjectName(String bizId) {
SapPurchaseApproval sapPurchaseApproval = this.sapPurchaseApprovalRepository.findOne(bizId);
//查询 单据日期
String fillinDateStr = DateUtil.getDateFormat("yyyy-MM-dd HH:mm:ss", sapPurchaseApproval.getFillinDate());
//设置标题
return String.format("%s-%s(%s)", sapPurchaseApproval.getBatxt(), sapPurchaseApproval.getBanfn(), fillinDateStr);
}
@Override @Override
protected Map<String, Object> getProcessBizParams(String bizId) { protected Map<String, Object> getProcessBizParams(String bizId) {
......
...@@ -92,6 +92,25 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu ...@@ -92,6 +92,25 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
return sapPurchaseOrder.getId(); return sapPurchaseOrder.getId();
} }
@Override
protected void setTaskDescription(DelegateTask delegateTask) {
String bizId = delegateTask.getExecution().getProcessBusinessKey();
delegateTask.setDescription(this.getApprovalSubjectName(bizId));
}
/**
* 获取任务标题
*
* @param bizId
* @return
*/
private String getApprovalSubjectName(String bizId) {
SapPurchaseOrder sapPurchaseOrder = this.sapPurchaseOrderRepository.findOne(bizId);
//查询 单据日期
String fillinDateStr = DateUtil.getDateFormat("yyyy-MM-dd HH:mm:ss", sapPurchaseOrder.getFillinDate());
//设置标题
return String.format("%s-%s(%s)", sapPurchaseOrder.getBatxt(), sapPurchaseOrder.getEbeln(), fillinDateStr);
}
@Override @Override
protected Map<String, Object> getProcessBizParams(String bizId) { protected Map<String, Object> getProcessBizParams(String bizId) {
......
package com.huigou.topsun.sap.purchaseOrder.controller; package com.huigou.topsun.sap.purchaseOrder.controller;
import com.huigou.topsun.common.BillStatus;
import com.huigou.topsun.sap.purchaseOrder.application.SapPurchaseOrderApplication; import com.huigou.topsun.sap.purchaseOrder.application.SapPurchaseOrderApplication;
import com.huigou.topsun.sap.purchaseOrder.application.SapPurchaseOrderItemApplication; import com.huigou.topsun.sap.purchaseOrder.application.SapPurchaseOrderItemApplication;
import com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrder; import com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrder;
...@@ -62,6 +63,7 @@ public class SapPurchaseOrderController extends CommonController { ...@@ -62,6 +63,7 @@ public class SapPurchaseOrderController extends CommonController {
public String forwardSapPurchaseOrderList(){ public String forwardSapPurchaseOrderList(){
this.putAttribute("statusKindsList", BillStatus.getValidMap());
return forward("sapPurchaseOrderList"); return forward("sapPurchaseOrderList");
} }
......
...@@ -6,6 +6,7 @@ import lombok.Data; ...@@ -6,6 +6,7 @@ import lombok.Data;
import javax.persistence.*; import javax.persistence.*;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
...@@ -53,6 +54,12 @@ public class SapPurchaseOrder extends FlowBillAbstractEntity { ...@@ -53,6 +54,12 @@ public class SapPurchaseOrder extends FlowBillAbstractEntity {
@Column(name = "WAERS") @Column(name = "WAERS")
private String waers; private String waers;
/**
* 订单总金额
*/
@Column(name = "total_money")
private BigDecimal totalMoney;
// /** // /**
// * 创建日期 // * 创建日期
// */ // */
......
...@@ -4,6 +4,7 @@ import com.huigou.data.domain.query.QueryAbstractRequest; ...@@ -4,6 +4,7 @@ import com.huigou.data.domain.query.QueryAbstractRequest;
import lombok.Data; import lombok.Data;
import javax.persistence.Column; import javax.persistence.Column;
import java.util.Date;
/** /**
* @Auther: xin.lu * @Auther: xin.lu
...@@ -28,4 +29,10 @@ public class SapPurchaseOrderQueryRequest extends QueryAbstractRequest { ...@@ -28,4 +29,10 @@ public class SapPurchaseOrderQueryRequest extends QueryAbstractRequest {
* 采购订单类型描述 * 采购订单类型描述
*/ */
private String batxt; private String batxt;
protected Date fillinBeginDate;
protected Date fillinEndDate;
private String statusKind;
} }
...@@ -21,6 +21,7 @@ public interface SuppliersDataApplication { ...@@ -21,6 +21,7 @@ public interface SuppliersDataApplication {
String PROCESS_DEFINITION_KEY = "sapSuppliersDataProc"; String PROCESS_DEFINITION_KEY = "sapSuppliersDataProc";
String PROCESS_DEFINITION_KEY2 = "sapSuppliersDataModiProc"; String PROCESS_DEFINITION_KEY2 = "sapSuppliersDataModiProc";
String PROCESS_DEFINITION_KEY3 = "sapSuppliersDataDeleProc"; String PROCESS_DEFINITION_KEY3 = "sapSuppliersDataDeleProc";
String PROCESS_DEFINITION_KEY4 = "sapSuppliersDataExteProc";
String QUERY_XML_FILE_PATH= "config/topsun/sap/sapSuppliersData/suppliersData.xml"; String QUERY_XML_FILE_PATH= "config/topsun/sap/sapSuppliersData/suppliersData.xml";
...@@ -46,4 +47,8 @@ public interface SuppliersDataApplication { ...@@ -46,4 +47,8 @@ public interface SuppliersDataApplication {
void deleteSuppliersBankByIds( List<String> ids); void deleteSuppliersBankByIds( List<String> ids);
List<Map<String, String>> selectSuppliersDatas(String types); List<Map<String, String>> selectSuppliersDatas(String types);
String checkApprovalStatus(String partner);
Map<String, String> getSupplierNowItemList(String partner);
} }
...@@ -70,9 +70,11 @@ public class SuppliersDataController extends CommonController { ...@@ -70,9 +70,11 @@ public class SuppliersDataController extends CommonController {
this.putAttribute("applyType","0"); this.putAttribute("applyType","0");
SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
String bizId=sdo.getString("bizId"); String bizId=sdo.getString("bizId");
String flag=sdo.getString("flag");
SuppliersInfo suppliersInfo = new SuppliersInfo(); SuppliersInfo suppliersInfo = new SuppliersInfo();
suppliersInfo.setApplyType("0"); suppliersInfo.setApplyType("0");
String isDel=sdo.getString("isDel"); String isDel=sdo.getString("isDel");
String page = "suppliersDataDetail";
if (StringUtil.isNotBlank(isDel)){ //删除流程 if (StringUtil.isNotBlank(isDel)){ //删除流程
suppliersInfo = suppliersDataApplication.loadSuppliersDataById(bizId); suppliersInfo = suppliersDataApplication.loadSuppliersDataById(bizId);
this.putAttribute("processDefinitionKey", SuppliersDataApplication.PROCESS_DEFINITION_KEY3); this.putAttribute("processDefinitionKey", SuppliersDataApplication.PROCESS_DEFINITION_KEY3);
...@@ -98,9 +100,17 @@ public class SuppliersDataController extends CommonController { ...@@ -98,9 +100,17 @@ public class SuppliersDataController extends CommonController {
if (deletedList.size()>0){ if (deletedList.size()>0){
throw new RuntimeException("该供应商已经执行删除,不能再次修改了!"); throw new RuntimeException("该供应商已经执行删除,不能再次修改了!");
} }
if ("update".equals(flag)){
this.putAttribute("processDefinitionKey", SuppliersDataApplication.PROCESS_DEFINITION_KEY2); this.putAttribute("processDefinitionKey", SuppliersDataApplication.PROCESS_DEFINITION_KEY2);
this.putAttribute("applyType", "1"); this.putAttribute("applyType", "1");
suppliersInfo.setApplyType("1"); suppliersInfo.setApplyType("1");
} else if ("extend".equals(flag)) {
this.putAttribute("processDefinitionKey", SuppliersDataApplication.PROCESS_DEFINITION_KEY4);
this.putAttribute("applyType", "2");//扩展
suppliersInfo.setApplyType("2");
page = "suppliersExtendDataDetail";
}
suppliersInfo.setBillCode(""); suppliersInfo.setBillCode("");
suppliersInfo.setId(""); suppliersInfo.setId("");
// suppliersInfo.setSId(bizId); // suppliersInfo.setSId(bizId);
...@@ -117,7 +127,7 @@ public class SuppliersDataController extends CommonController { ...@@ -117,7 +127,7 @@ public class SuppliersDataController extends CommonController {
Operator operator = getOperator();//获取当前操作员的详情信息 Operator operator = getOperator();//获取当前操作员的详情信息
suppliersInfo.setDefaultValues(new OrgUnit(operator.getFullId(),operator.getFullName())); suppliersInfo.setDefaultValues(new OrgUnit(operator.getFullId(),operator.getFullName()));
return forward("suppliersDataDetail",suppliersInfo); return forward(page,suppliersInfo);
} }
public String showSuppliersData() { public String showSuppliersData() {
...@@ -130,6 +140,9 @@ public class SuppliersDataController extends CommonController { ...@@ -130,6 +140,9 @@ public class SuppliersDataController extends CommonController {
if (!(suppliersInfo.getApplyType().equals("0"))){ if (!(suppliersInfo.getApplyType().equals("0"))){
this.putAttribute("sId", id); this.putAttribute("sId", id);
this.putAttribute("applyType",suppliersInfo.getApplyType()); this.putAttribute("applyType",suppliersInfo.getApplyType());
if ("2".equals(suppliersInfo.getApplyType())){
return forward("suppliersExtendDataDetail", suppliersInfo);
}
} }
return forward("suppliersDataDetail", suppliersInfo); return forward("suppliersDataDetail", suppliersInfo);
} }
...@@ -190,4 +203,18 @@ public class SuppliersDataController extends CommonController { ...@@ -190,4 +203,18 @@ public class SuppliersDataController extends CommonController {
impDataFromXLS.readFile(); impDataFromXLS.readFile();
return success(); return success();
} }
public String checkApprovalStatus(){
SDO sdo = this.getSDO();
String partner = sdo.getString("partner");
suppliersDataApplication.checkApprovalStatus(partner);
return success();
}
public String getSupplierNowItemList(){
SDO sdo = this.getSDO();
String partner = sdo.getString("partner");
Map<String, String> map = suppliersDataApplication.getSupplierNowItemList(partner);
return toResult(map);
}
} }
...@@ -72,4 +72,6 @@ public interface OrgSyncApplication { ...@@ -72,4 +72,6 @@ public interface OrgSyncApplication {
List<SapPersonVo> querySapPersonVoByFullId(String fullId); List<SapPersonVo> querySapPersonVoByFullId(String fullId);
void syncAllPersonToSap(); void syncAllPersonToSap();
List<String> getCodeById(List<String> personIds);
} }
...@@ -282,6 +282,17 @@ public class OrgSyncApplicationImpl extends BaseApplication implements OrgSyncAp ...@@ -282,6 +282,17 @@ public class OrgSyncApplicationImpl extends BaseApplication implements OrgSyncAp
this.buildSapPerson("I",sapPersonVos); this.buildSapPerson("I",sapPersonVos);
} }
@Override
public List<String> getCodeById(List<String> personIds) {
List<Person> personList = personRepository.findAll(personIds);
List<String> list = personList
.stream()
.filter(person -> "1".equals(person.getIsSapPerson()))
.map(Person::getCode)
.collect(Collectors.toList());
return list;
}
/** /**
* 字符串转hashcode * 字符串转hashcode
* @param value * @param value
......
...@@ -53,6 +53,14 @@ public class SyncOrgController extends CommonController { ...@@ -53,6 +53,14 @@ public class SyncOrgController extends CommonController {
return success(); return success();
} }
public String updatePersonToSap(){
SDO sdo = this.getSDO();
List<String> personIds = sdo.getStringList("personIds");
List<String> codes = orgSyncApplication.getCodeById(personIds);
orgSyncApplication.syncPersonToSap("U",codes);
return success();
}
public String initAllPersonToSap(){ public String initAllPersonToSap(){
SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
orgSyncApplication.syncAllPersonToSap(); orgSyncApplication.syncAllPersonToSap();
......
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsd="http://www.w3.org/2001/XMLSchema" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<process id="sapSuppliersDataExteProc" name="供应商主数据扩展" isExecutable="true">
<extensionElements>
<activiti:executionListener event="start" delegateExpression="#{suppliersDataApplication}"></activiti:executionListener>
<activiti:executionListener event="end" delegateExpression="#{suppliersDataApplication}"></activiti:executionListener>
</extensionElements>
<startEvent id="startevent1" name="Start"></startEvent>
<endEvent id="endevent1" name="End"></endEvent>
<userTask id="Apply" name="供应商主数据扩展申请" activiti:formKey="sapSuppliersData/showSuppliersData.job">
<extensionElements>
<activiti:taskListener event="all" delegateExpression="#{suppliersDataApplication}"></activiti:taskListener>
<activiti:taskListener event="saveBizData" delegateExpression="#{suppliersDataApplication}"></activiti:taskListener>
</extensionElements>
</userTask>
<userTask id="Approve" name="供应商主数据扩展审批" activiti:assignee="${assignee} " activiti:formKey="sapSuppliersData/showSuppliersData.job">
<extensionElements>
<activiti:taskListener event="all" delegateExpression="#{suppliersDataApplication}"></activiti:taskListener>
<activiti:taskListener event="saveBizData" delegateExpression="#{suppliersDataApplication}"></activiti:taskListener>
</extensionElements>
<multiInstanceLoopCharacteristics isSequential="false" activiti:collection="handlerList" activiti:elementVariable="assignee">
<completionCondition>${chiefApprovePassed}</completionCondition>
</multiInstanceLoopCharacteristics>
</userTask>
<sequenceFlow id="flow1" sourceRef="startevent1" targetRef="Apply"></sequenceFlow>
<sequenceFlow id="flow2" sourceRef="Apply" targetRef="Approve"></sequenceFlow>
<exclusiveGateway id="ApproveFinished" name="审批结束"></exclusiveGateway>
<sequenceFlow id="flow3" name="审批通过" sourceRef="ApprovePassed" targetRef="ApproveFinished">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${approvePassed}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow4" name="审批结束" sourceRef="ApproveFinished" targetRef="endevent1">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${approveFinished}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow5" name="审批未结束" sourceRef="ApproveFinished" targetRef="Approve">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${!approveFinished}]]></conditionExpression>
</sequenceFlow>
<exclusiveGateway id="ApprovePassed" name="审批通过"></exclusiveGateway>
<sequenceFlow id="flow6" sourceRef="Approve" targetRef="ApprovePassed"></sequenceFlow>
<sequenceFlow id="flow9" name="审批未通过" sourceRef="ApprovePassed" targetRef="Apply">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${!approvePassed}]]></conditionExpression>
</sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_sapSuppliersDataProc">
<bpmndi:BPMNPlane bpmnElement="sapSuppliersDataProc" id="BPMNPlane_sapSuppliersDataProc">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35.0" width="35.0" x="355.0" y="50.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="355.0" y="550.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="Apply" id="BPMNShape_Apply">
<omgdc:Bounds height="55.0" width="161.0" x="292.0" y="140.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="Approve" id="BPMNShape_Approve">
<omgdc:Bounds height="55.0" width="161.0" x="292.0" y="240.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="ApproveFinished" id="BPMNShape_ApproveFinished">
<omgdc:Bounds height="40.0" width="40.0" x="352.0" y="440.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="ApprovePassed" id="BPMNShape_ApprovePassed">
<omgdc:Bounds height="40.0" width="40.0" x="352.0" y="349.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="372.0" y="85.0"></omgdi:waypoint>
<omgdi:waypoint x="372.0" y="140.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="372.0" y="195.0"></omgdi:waypoint>
<omgdi:waypoint x="372.0" y="240.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="372.0" y="389.0"></omgdi:waypoint>
<omgdi:waypoint x="372.0" y="440.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14.0" width="48.0" x="320.0" y="396.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
<omgdi:waypoint x="372.0" y="480.0"></omgdi:waypoint>
<omgdi:waypoint x="372.0" y="550.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14.0" width="48.0" x="382.0" y="489.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
<omgdi:waypoint x="392.0" y="460.0"></omgdi:waypoint>
<omgdi:waypoint x="519.0" y="459.0"></omgdi:waypoint>
<omgdi:waypoint x="519.0" y="317.0"></omgdi:waypoint>
<omgdi:waypoint x="519.0" y="267.0"></omgdi:waypoint>
<omgdi:waypoint x="489.0" y="267.0"></omgdi:waypoint>
<omgdi:waypoint x="453.0" y="267.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14.0" width="60.0" x="459.0" y="411.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
<omgdi:waypoint x="372.0" y="295.0"></omgdi:waypoint>
<omgdi:waypoint x="372.0" y="349.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
<omgdi:waypoint x="352.0" y="369.0"></omgdi:waypoint>
<omgdi:waypoint x="231.0" y="369.0"></omgdi:waypoint>
<omgdi:waypoint x="231.0" y="167.0"></omgdi:waypoint>
<omgdi:waypoint x="292.0" y="167.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14.0" width="60.0" x="257.0" y="376.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
\ No newline at end of file
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
select t.* from sap_purchase t select t.* from sap_purchase t
</sql-query> </sql-query>
<condition column="bill_code" name="billCode" type="java.lang.String" symbol="like" alias="t"/> <condition column="bill_code" name="billCode" type="java.lang.String" symbol="like" alias="t"/>
<condition column="banfn" name="banfn" type="java.lang.String" symbol="like" alias="t"/>
<condition column="status" name="statusKind" type="java.lang.Integer" symbol="in" alias="t"/>
<condition column="fillin_date" name="fillinBeginDate" type="java.util.Date" symbol="&gt;=" alias="t"/>
<condition column="fillin_date" name="fillinEndDate" type="java.util.Date" symbol="&lt;=" alias="t"/>
</query> </query>
</query-mappings> </query-mappings>
\ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<query name="sapPurchaseInfoRecordItemByIds" label="根据id查询" table="sap_purchase_info_record_item"> <query name="sapPurchaseInfoRecordItemByIds" label="根据id查询" table="sap_purchase_info_record_item">
<sql-query> <sql-query>
select select
t.id, '' as id,
'' as sap_purchase_info_record_id, '' as sap_purchase_info_record_id,
t.ZYY, t.ZYY,
t.LIFNR, t.LIFNR,
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
select t.* from sap_purchase_order t select t.* from sap_purchase_order t
</sql-query> </sql-query>
<condition column="bill_code" name="billCode" type="java.lang.String" symbol="like" alias="t"/> <condition column="bill_code" name="billCode" type="java.lang.String" symbol="like" alias="t"/>
<condition column="ebeln" name="ebeln" type="java.lang.String" symbol="like" alias="t"/>
<condition column="status" name="statusKind" type="java.lang.Integer" symbol="in" alias="t"/>
<condition column="fillin_date" name="fillinBeginDate" type="java.util.Date" symbol="&gt;=" alias="t"/>
<condition column="fillin_date" name="fillinEndDate" type="java.util.Date" symbol="&lt;=" alias="t"/>
</query> </query>
</query-mappings> </query-mappings>
\ No newline at end of file
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