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