Commit def2decc authored by 鲁鑫's avatar 鲁鑫

工序外协节点字段控制

parent 59c9b4d4
...@@ -69,11 +69,31 @@ function loadOrderItemGrid() { ...@@ -69,11 +69,31 @@ function loadOrderItemGrid() {
}); });
// 表格 // 表格
orderItemGridManager = UICtrl.grid("#orderItemGrid", { orderItemGridManager = UICtrl.grid("#orderItemGrid", {
columns: [ columns: getOrderColumns(),
{display: "采购订单", name: "ebeln", width: 120, minWidth: 60, type: "string", align: "left"}, dataAction: "server",
{display: "订单行项目号", name: "ebelp", width: 120, minWidth: 60, type: "string", align: "left"}, url: web_app.name + '/processOutsource/queryProcessOutsourceOrderItems.ajax',
{display: "序号", name: "sequence", width: 140, minWidth: 60, type: "string", align: "left"}, parms: {processOutsourceId: getId()},
{display: "原工单", name: "aufnr", width: 200, minWidth: 60, type: "string", align: "left", pageSize: 20,
usePager: true,
toolbar: toolbarOptions,
enabledEdit: true,
width: "98%",
height: "300px",
heightDiff: -8,
checkbox: true,
fixedCellHeight: true,
selectRowButtonOnly: true,
});
UICtrl.setSearchAreaToggle(orderItemGridManager);
}
function getOrderColumns(){
var columns = [];
columns.push({display: "采购订单", name: "ebeln", width: 120, minWidth: 60, type: "string", align: "left"});
columns.push({display: "订单行项目号", name: "ebelp", width: 120, minWidth: 60, type: "string", align: "left"});
columns.push({display: "序号", name: "sequence", width: 140, minWidth: 60, type: "string", align: "left"},);
columns.push({
display: "原工单", name: "aufnr", width: 200, minWidth: 60, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: true, type: "select",
data: { data: {
...@@ -87,74 +107,105 @@ function loadOrderItemGrid() { ...@@ -87,74 +107,105 @@ function loadOrderItemGrid() {
} }
} }
} }
}, });
{display: "工序号", name: "wempf", width: 140, minWidth: 60, type: "string", align: "left", columns.push({
editor:{ display: "工序号", name: "wempf", width: 140, minWidth: 60, type: "string", align: "left",
type:"text",required: true editor: {
type: "text", required: true
} }
}, },);
{display: "工序描述", name: "txz01", width: 140, minWidth: 60, type: "string", align: "left", columns.push({
editor:{ display: "工序描述", name: "txz01", width: 140, minWidth: 60, type: "string", align: "left",
type:"text",required: true editor: {
type: "text", required: true
} }
}, },);
{display: "补数工单", name: "ablad", width: 140, minWidth: 60, type: "string", align: "left", columns.push({
editor:{ display: "补数工单", name: "ablad", width: 140, minWidth: 60, type: "string", align: "left",
type:"text",required: false editor: {
type: "text", required: false
} }
}, },);
{display: "数量", name: "menge", width: 140, minWidth: 60, type: "string", align: "left", columns.push({
editor:{ display: "数量", name: "menge", width: 140, minWidth: 60, type: "string", align: "left",
type:"text",mask: '9999999.999',required: true editor: {
type: "text", mask: '9999999.999', required: true
} }
},);
columns.push({
display: "单位", name: "meinsName", width: 140, minWidth: 60, type: "string", align: "left",
editor: {
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {fieldName: "MEINS"}
}, },
{display: "单价", name: "kbetr", width: 140, minWidth: 60, type: "string", align: "left", back: {
editor:{ MSEHI: "meins",
type:"text",mask: '9999999.999',required: true MSEHL: "meinsName",
} }
},
{display: "定价基数", name: "kpein", width: 140, minWidth: 60, type: "string", align: "left",
editor:{
type:"text",mask: '9999999.999',required: true
} }
},
{display: "需求日期", name: "eeind", width: 140, minWidth: 60, type: "date", align: "left",
editor:{
type:"date",required: true
} }
}, },);
{display: "供应商", name: "lifnrName", width: 200, minWidth: 60, type: "string", align: "left", columns.push({
display: "需求日期", name: "eeind", width: 140, minWidth: 60, type: "date", align: "left",
editor: { editor: {
required: true, type: "select", type: "date", required: true
}
},);
columns.push({
display: "存储地点", name: "lgortName", width: 200, minWidth: 60, type: "string", align: "left",
editor: {
required: false, type: "select",
data: { data: {
type: 'suppliers', type: 'system',
name: "selectSuppliers", name: "dictionary",
getParam: function (item) { getParam: function (item) {
return {
fieldName: "LGORT",
filterValue: $("#werks").val()
}
}, },
back: { back: {
partner: "lifnr", LGORT: "lgort",
nameOrg1: "lifnrName", LGOBE: "lgortName"
} }
},
} }
},);
if (typeof(getSubProcUnitId) =='function'&&"outer" == getSubProcUnitId()){
columns.push({
display: "单价", name: "kbetr", width: 140, minWidth: 60, type: "string", align: "left",
editor: {
type: "text", mask: '9999999.999', required: true
} }
}, },);
{display: "单位", name: "meinsName", width: 140, minWidth: 60, type: "string", align: "left", columns.push({
display: "定价基数", name: "kpein", width: 140, minWidth: 60, type: "string", align: "left",
editor: {
type: "text", mask: '9999999.999', required: true
}
},);
columns.push({
display: "供应商", name: "lifnrName", width: 200, minWidth: 60, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: true, type: "select",
data: { data: {
type: 'system', type: 'suppliers',
name: "dictionary", name: "selectSuppliers",
getParam: function (item) { getParam: function (item) {
return {fieldName: "MEINS"}
}, },
back: { back: {
MSEHI: "meins", partner: "lifnr",
MSEHL: "meinsName", nameOrg1: "lifnrName",
} }
} }
} }
}, },);
{display: "币别", name: "waersTextView", width: 140, minWidth: 60, type: "string", align: "left", columns.push({
display: "币别", name: "waersTextView", width: 140, minWidth: 60, type: "string", align: "left",
editor: { editor: {
type: 'dictionary', type: 'dictionary',
data: {name: 'waers'}, data: {name: 'waers'},
...@@ -165,8 +216,9 @@ function loadOrderItemGrid() { ...@@ -165,8 +216,9 @@ function loadOrderItemGrid() {
return item.waersTextView; return item.waersTextView;
} }
}, },
}, },);
{display: "税码", name: "purchaseMwskzTextView", width: 140, minWidth: 60, type: "string", align: "left", columns.push({
display: "税码", name: "purchaseMwskzTextView", width: 140, minWidth: 60, type: "string", align: "left",
editor: { editor: {
type: 'dictionary', type: 'dictionary',
data: {name: 'purchaseMwskz'}, data: {name: 'purchaseMwskz'},
...@@ -177,23 +229,25 @@ function loadOrderItemGrid() { ...@@ -177,23 +229,25 @@ function loadOrderItemGrid() {
return item.purchaseMwskzTextView; return item.purchaseMwskzTextView;
} }
}, },
}
],
dataAction: "server",
url: web_app.name + '/processOutsource/queryProcessOutsourceOrderItems.ajax',
parms: {processOutsourceId: getId()},
pageSize: 20,
usePager: true,
toolbar: toolbarOptions,
enabledEdit: true,
width: "98%",
height: "300px",
heightDiff: -8,
checkbox: true,
fixedCellHeight: true,
selectRowButtonOnly: true,
}); });
UICtrl.setSearchAreaToggle(orderItemGridManager); }else {
columns.push({
display: "单价", name: "kbetr", width: 140, minWidth: 60, type: "string", align: "left",
},);
columns.push({
display: "定价基数", name: "kpein", width: 140, minWidth: 60, type: "string", align: "left",
},);
columns.push({
display: "供应商", name: "lifnrName", width: 200, minWidth: 60, type: "string", align: "left",
},);
columns.push({
display: "币别", name: "waersTextView", width: 140, minWidth: 60, type: "string", align: "left",
},);
columns.push({
display: "税码", name: "purchaseMwskzTextView", width: 140, minWidth: 60, type: "string", align: "left",
});
}
return columns;
} }
// 加载组件信息表格 // 加载组件信息表格
......
...@@ -34,6 +34,7 @@ import com.huigou.util.StringUtil; ...@@ -34,6 +34,7 @@ import com.huigou.util.StringUtil;
import org.activiti.engine.delegate.DelegateExecution; import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.DelegateTask; import org.activiti.engine.delegate.DelegateTask;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.task.TaskExecutor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert; import org.springframework.util.Assert;
...@@ -64,6 +65,8 @@ public class ProcessOutsourceApplicationImpl extends FlowBroker implements Proce ...@@ -64,6 +65,8 @@ public class ProcessOutsourceApplicationImpl extends FlowBroker implements Proce
private ProcessOutsourceOrderItemRepository processOutsourceOrderItemRepository; private ProcessOutsourceOrderItemRepository processOutsourceOrderItemRepository;
@Autowired @Autowired
private SapPermitApplication sapPermitApplication; private SapPermitApplication sapPermitApplication;
@Autowired
private TaskExecutor asyncWriteExecutor;
@Override @Override
protected String saveBizAndApprovalData() { protected String saveBizAndApprovalData() {
...@@ -166,7 +169,10 @@ public class ProcessOutsourceApplicationImpl extends FlowBroker implements Proce ...@@ -166,7 +169,10 @@ public class ProcessOutsourceApplicationImpl extends FlowBroker implements Proce
//推送到SAP //推送到SAP
this.sendData(processOutsource); this.sendData(processOutsource);
//创建放行条 //创建放行条
this.startSapPermit(processOutsource); asyncWriteExecutor.execute(()->
//创建放行条
this.startSapPermit(processOutsource)
);
processOutsourceRepository.save(processOutsource); processOutsourceRepository.save(processOutsource);
} }
......
...@@ -83,6 +83,18 @@ public class ProcessOutsourceOrderItem extends AbstractEntity { ...@@ -83,6 +83,18 @@ public class ProcessOutsourceOrderItem extends AbstractEntity {
@Column(name = "MEINS_NAME") @Column(name = "MEINS_NAME")
private String meinsName; private String meinsName;
/**
* 存储地点
*/
@Column(name = "LGORT")
private String lgort;
/**
* 存储地点
*/
@Column(name = "LGORT_NAME")
private String lgortName;
/** /**
* 需求到货日期 * 需求到货日期
*/ */
......
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