fix:
1.订单产品需求单整机外购计划财务组织和库存组织默认锐科,业务类型默认普通采购
This commit is contained in:
parent
d62d767f6e
commit
3c27d895e3
@ -44,7 +44,7 @@ public class orderproreqbillFromEdit extends AbstractFormPlugin implements Befor
|
|||||||
FormShowParameter fsp = e.getFormShowParameter();
|
FormShowParameter fsp = e.getFormShowParameter();
|
||||||
String billtype = fsp.getFormConfig().getEntityTypeId();
|
String billtype = fsp.getFormConfig().getEntityTypeId();
|
||||||
String FormId = fsp.getFormId();
|
String FormId = fsp.getFormId();
|
||||||
if(FormId.equals("yem_orderproreqbill")){
|
if (FormId.equals("yem_orderproreqbill")) {
|
||||||
fsp.setFormId("yem_orderproreqbill_zz");
|
fsp.setFormId("yem_orderproreqbill_zz");
|
||||||
fsp.setCaption("订单产品需求单");//_配件自制计划
|
fsp.setCaption("订单产品需求单");//_配件自制计划
|
||||||
}
|
}
|
||||||
@ -102,10 +102,24 @@ public class orderproreqbillFromEdit extends AbstractFormPlugin implements Befor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
setTechnicalSupport();
|
setTechnicalSupport();
|
||||||
|
DynamicObject yemBilltype = (DynamicObject) this.getModel().getValue("yem_billtype");
|
||||||
|
if (yemBilltype!=null) {
|
||||||
|
String yemBilltypeString = yemBilltype.getString("number");
|
||||||
|
if ("yem_orderproreqbill_WG".equals(yemBilltypeString)){
|
||||||
|
DynamicObject loadSingle = BusinessDataServiceHelper.loadSingle("bos_org", "id,number"
|
||||||
|
, new QFilter[]{new QFilter("number", QCP.equals, "130")});
|
||||||
|
this.getModel().setValue("yem_dept",loadSingle.getLong("id"));
|
||||||
|
this.getModel().setValue("yem_applyinventoryorg",loadSingle.getLong("id"));
|
||||||
|
DynamicObject loaded = BusinessDataServiceHelper.loadSingle("yem_bd_biztype", "id,number"
|
||||||
|
, new QFilter[]{new QFilter("number", QCP.equals, "110")});
|
||||||
|
this.getModel().setValue("yem_biztype",loaded.getLong("id"));
|
||||||
}
|
}
|
||||||
public void setbilltype(String number){
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setbilltype(String number) {
|
||||||
OperationStatus status = this.getView().getFormShowParameter().getStatus();
|
OperationStatus status = this.getView().getFormShowParameter().getStatus();
|
||||||
if(OperationStatus.ADDNEW == status) {
|
if (OperationStatus.ADDNEW == status) {
|
||||||
QFilter qFilter = new QFilter("number", QCP.equals, number);
|
QFilter qFilter = new QFilter("number", QCP.equals, number);
|
||||||
DynamicObject billType = BusinessDataServiceHelper.loadSingle("bos_billtype", "id", qFilter.toArray());
|
DynamicObject billType = BusinessDataServiceHelper.loadSingle("bos_billtype", "id", qFilter.toArray());
|
||||||
this.getModel().setValue("yem_billtype", billType);
|
this.getModel().setValue("yem_billtype", billType);
|
||||||
@ -127,9 +141,9 @@ public class orderproreqbillFromEdit extends AbstractFormPlugin implements Befor
|
|||||||
@Override
|
@Override
|
||||||
public void beforeF7Select(BeforeF7SelectEvent e) {
|
public void beforeF7Select(BeforeF7SelectEvent e) {
|
||||||
String name = e.getProperty().getName();
|
String name = e.getProperty().getName();
|
||||||
switch (name){
|
switch (name) {
|
||||||
case "yem_dept" :
|
case "yem_dept":
|
||||||
case "yem_applyinventoryorg" :
|
case "yem_applyinventoryorg":
|
||||||
case "yem_depcode":
|
case "yem_depcode":
|
||||||
selectDept(e);
|
selectDept(e);
|
||||||
break;
|
break;
|
||||||
@ -144,10 +158,10 @@ public class orderproreqbillFromEdit extends AbstractFormPlugin implements Befor
|
|||||||
* @time 2023/10/19 10:53
|
* @time 2023/10/19 10:53
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void selectDept(BeforeF7SelectEvent e){
|
public void selectDept(BeforeF7SelectEvent e) {
|
||||||
IDataModel model = this.getModel();
|
IDataModel model = this.getModel();
|
||||||
DynamicObject org = (DynamicObject)model.getValue("org");
|
DynamicObject org = (DynamicObject) model.getValue("org");
|
||||||
if(YEM.isNotEmpty(org)){
|
if (YEM.isNotEmpty(org)) {
|
||||||
long id = org.getLong("id");
|
long id = org.getLong("id");
|
||||||
Set orgUserDeps = FunctionalCommon.getOrgUserDeps(id);
|
Set orgUserDeps = FunctionalCommon.getOrgUserDeps(id);
|
||||||
e.addCustomQFilter(new QFilter("id", QCP.in, orgUserDeps));
|
e.addCustomQFilter(new QFilter("id", QCP.in, orgUserDeps));
|
||||||
@ -158,13 +172,12 @@ public class orderproreqbillFromEdit extends AbstractFormPlugin implements Befor
|
|||||||
* 批量新增行
|
* 批量新增行
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void afterDoOperation(AfterDoOperationEventArgs args)
|
public void afterDoOperation(AfterDoOperationEventArgs args) {
|
||||||
{
|
|
||||||
super.afterDoOperation(args);
|
super.afterDoOperation(args);
|
||||||
String operateKey = args.getOperateKey();
|
String operateKey = args.getOperateKey();
|
||||||
OperationResult operationResult = args.getOperationResult();
|
OperationResult operationResult = args.getOperationResult();
|
||||||
if ("batchcreate".equals(operateKey) && operationResult.isSuccess()) {
|
if ("batchcreate".equals(operateKey) && operationResult.isSuccess()) {
|
||||||
this.getModel().batchCreateNewEntryRow("yem_es_materialinfo",10);
|
this.getModel().batchCreateNewEntryRow("yem_es_materialinfo", 10);
|
||||||
}
|
}
|
||||||
IFormView view = this.getView();
|
IFormView view = this.getView();
|
||||||
IDataModel model = this.getModel();
|
IDataModel model = this.getModel();
|
||||||
@ -209,12 +222,12 @@ public class orderproreqbillFromEdit extends AbstractFormPlugin implements Befor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if("audit".equals(operateKey)){
|
if ("audit".equals(operateKey)) {
|
||||||
if (YEM.isNotEmpty(operationResult)) {
|
if (YEM.isNotEmpty(operationResult)) {
|
||||||
view.invokeOperation("refresh");
|
view.invokeOperation("refresh");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if("unaudit".equals(operateKey)){
|
if ("unaudit".equals(operateKey)) {
|
||||||
if (YEM.isNotEmpty(operationResult)) {
|
if (YEM.isNotEmpty(operationResult)) {
|
||||||
view.invokeOperation("refresh");
|
view.invokeOperation("refresh");
|
||||||
}
|
}
|
||||||
@ -222,8 +235,7 @@ public class orderproreqbillFromEdit extends AbstractFormPlugin implements Befor
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void beforeDoOperation(BeforeDoOperationEventArgs args)
|
public void beforeDoOperation(BeforeDoOperationEventArgs args) {
|
||||||
{
|
|
||||||
super.beforeDoOperation(args);
|
super.beforeDoOperation(args);
|
||||||
FormOperate formOperate = (FormOperate) args.getSource();
|
FormOperate formOperate = (FormOperate) args.getSource();
|
||||||
String operateKey = formOperate.getOperateKey();
|
String operateKey = formOperate.getOperateKey();
|
||||||
@ -270,8 +282,7 @@ public class orderproreqbillFromEdit extends AbstractFormPlugin implements Befor
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void propertyChanged(PropertyChangedArgs e)
|
public void propertyChanged(PropertyChangedArgs e) {
|
||||||
{
|
|
||||||
super.propertyChanged(e);
|
super.propertyChanged(e);
|
||||||
String name = e.getProperty().getName();
|
String name = e.getProperty().getName();
|
||||||
IDataModel model = this.getModel();
|
IDataModel model = this.getModel();
|
||||||
@ -299,8 +310,7 @@ public class orderproreqbillFromEdit extends AbstractFormPlugin implements Befor
|
|||||||
/**
|
/**
|
||||||
* 如果分录中存在一行是否技术支持 为是,保存时,表头置为是;
|
* 如果分录中存在一行是否技术支持 为是,保存时,表头置为是;
|
||||||
*/
|
*/
|
||||||
private void setTechnicalSupport()
|
private void setTechnicalSupport() {
|
||||||
{
|
|
||||||
IDataModel model = this.getModel();
|
IDataModel model = this.getModel();
|
||||||
DynamicObject dataEntity = model.getDataEntity(true);
|
DynamicObject dataEntity = model.getDataEntity(true);
|
||||||
Set<String> set = new HashSet<>();
|
Set<String> set = new HashSet<>();
|
||||||
@ -321,8 +331,7 @@ public class orderproreqbillFromEdit extends AbstractFormPlugin implements Befor
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void closedCallBack(ClosedCallBackEvent e)
|
public void closedCallBack(ClosedCallBackEvent e) {
|
||||||
{
|
|
||||||
super.closedCallBack(e);
|
super.closedCallBack(e);
|
||||||
String actionId = e.getActionId();
|
String actionId = e.getActionId();
|
||||||
Object returnData = e.getReturnData();
|
Object returnData = e.getReturnData();
|
||||||
@ -375,12 +384,12 @@ public class orderproreqbillFromEdit extends AbstractFormPlugin implements Befor
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 需要将关闭数量更新到对应跟单任务控制台-备料信息-关闭数量字段
|
* 需要将关闭数量更新到对应跟单任务控制台-备料信息-关闭数量字段
|
||||||
|
*
|
||||||
* @param isSum
|
* @param isSum
|
||||||
* @param currRow
|
* @param currRow
|
||||||
* @param closeQuantity
|
* @param closeQuantity
|
||||||
*/
|
*/
|
||||||
private void writeBackCloseQuantity(boolean isSum, int currRow, BigDecimal closeQuantity)
|
private void writeBackCloseQuantity(boolean isSum, int currRow, BigDecimal closeQuantity) {
|
||||||
{
|
|
||||||
IDataModel model = this.getModel();
|
IDataModel model = this.getModel();
|
||||||
DynamicObject dataEntity = model.getDataEntity(true);
|
DynamicObject dataEntity = model.getDataEntity(true);
|
||||||
DynamicObjectCollection collection = dataEntity.getDynamicObjectCollection("yem_es_materialinfo");
|
DynamicObjectCollection collection = dataEntity.getDynamicObjectCollection("yem_es_materialinfo");
|
||||||
|
Loading…
Reference in New Issue
Block a user