parent
e694124d66
commit
e52bf8a5f1
|
|
@ -203,7 +203,7 @@ public class WMSPurInController {
|
||||||
String licenceCode = detail1.getString("licenceCode");//生产许可证
|
String licenceCode = detail1.getString("licenceCode");//生产许可证
|
||||||
String producer = detail1.getString("producer");//生产厂商
|
String producer = detail1.getString("producer");//生产厂商
|
||||||
if (StringUtils.isNotBlank(producer)) {
|
if (StringUtils.isNotBlank(producer)) {
|
||||||
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, producer).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("name", QCP.equals, producer).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
||||||
if (tqq9_proxyandfactory == null) {
|
if (tqq9_proxyandfactory == null) {
|
||||||
if (!producer.contains("#")) {
|
if (!producer.contains("#")) {
|
||||||
errormsg = "没有找到有效的生产商:" + producer;
|
errormsg = "没有找到有效的生产商:" + producer;
|
||||||
|
|
@ -211,7 +211,7 @@ public class WMSPurInController {
|
||||||
} else {
|
} else {
|
||||||
String[] split = producer.split("#");
|
String[] split = producer.split("#");
|
||||||
for (int i = 0; i < split.length; i++) {
|
for (int i = 0; i < split.length; i++) {
|
||||||
DynamicObject tqq9_proxyandfactory1 = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, split[i]).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
DynamicObject tqq9_proxyandfactory1 = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("name", QCP.equals, split[i]).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
||||||
if (tqq9_proxyandfactory1 == null) {
|
if (tqq9_proxyandfactory1 == null) {
|
||||||
errormsg = "没有找到有效的生产商:" + split[i];
|
errormsg = "没有找到有效的生产商:" + split[i];
|
||||||
resultExt = ApiResultExt.errorRetrun(entityType, errormsg, error, resultExt);
|
resultExt = ApiResultExt.errorRetrun(entityType, errormsg, error, resultExt);
|
||||||
|
|
@ -499,7 +499,7 @@ public class WMSPurInController {
|
||||||
String licenceCode = detail1.getString("licenceCode");//生产许可证
|
String licenceCode = detail1.getString("licenceCode");//生产许可证
|
||||||
String producer = detail1.getString("producer");//生产厂商
|
String producer = detail1.getString("producer");//生产厂商
|
||||||
if (StringUtils.isNotBlank(producer)) {
|
if (StringUtils.isNotBlank(producer)) {
|
||||||
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, producer).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("name", QCP.equals, producer).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
||||||
if (tqq9_proxyandfactory == null) {
|
if (tqq9_proxyandfactory == null) {
|
||||||
if (!producer.contains("#")) {
|
if (!producer.contains("#")) {
|
||||||
errormsg = "没有找到有效的生产商:" + producer;
|
errormsg = "没有找到有效的生产商:" + producer;
|
||||||
|
|
@ -507,7 +507,7 @@ public class WMSPurInController {
|
||||||
} else {
|
} else {
|
||||||
String[] split = producer.split("#");
|
String[] split = producer.split("#");
|
||||||
for (int i = 0; i < split.length; i++) {
|
for (int i = 0; i < split.length; i++) {
|
||||||
DynamicObject tqq9_proxyandfactory1 = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, split[i]).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
DynamicObject tqq9_proxyandfactory1 = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("name", QCP.equals, split[i]).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
||||||
if (tqq9_proxyandfactory1 == null) {
|
if (tqq9_proxyandfactory1 == null) {
|
||||||
errormsg = "没有找到有效的生产商:" + split[i];
|
errormsg = "没有找到有效的生产商:" + split[i];
|
||||||
resultExt = ApiResultExt.errorRetrun(entityType, errormsg, error, resultExt);
|
resultExt = ApiResultExt.errorRetrun(entityType, errormsg, error, resultExt);
|
||||||
|
|
@ -830,7 +830,7 @@ public class WMSPurInController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(key2)) {
|
if (StringUtils.isNotBlank(key2)) {
|
||||||
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, key2).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("name", QCP.equals, key2).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
||||||
if (tqq9_proxyandfactory == null) {
|
if (tqq9_proxyandfactory == null) {
|
||||||
if (!key2.contains("#")) {
|
if (!key2.contains("#")) {
|
||||||
errormsg = errormsg.append(";").append("没有找到有效的生产商:" + key2);
|
errormsg = errormsg.append(";").append("没有找到有效的生产商:" + key2);
|
||||||
|
|
@ -841,7 +841,7 @@ public class WMSPurInController {
|
||||||
} else {
|
} else {
|
||||||
String[] split = key2.split("#");
|
String[] split = key2.split("#");
|
||||||
for (int i = 0; i < split.length; i++) {
|
for (int i = 0; i < split.length; i++) {
|
||||||
DynamicObject tqq9_proxyandfactory1 = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, split[i]).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
DynamicObject tqq9_proxyandfactory1 = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("name", QCP.equals, split[i]).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
||||||
if (tqq9_proxyandfactory1 == null) {
|
if (tqq9_proxyandfactory1 == null) {
|
||||||
errormsg = errormsg.append(";").append("没有找到有效的生产商:" + split[i]);
|
errormsg = errormsg.append(";").append("没有找到有效的生产商:" + split[i]);
|
||||||
response.setMessage(errormsg.substring(1));
|
response.setMessage(errormsg.substring(1));
|
||||||
|
|
@ -980,7 +980,7 @@ public class WMSPurInController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(key2)) {
|
if (StringUtils.isNotBlank(key2)) {
|
||||||
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, key2).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("name", QCP.equals, key2).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
||||||
if (tqq9_proxyandfactory == null) {
|
if (tqq9_proxyandfactory == null) {
|
||||||
if (!key2.contains("#")) {
|
if (!key2.contains("#")) {
|
||||||
errormsg = errormsg.append(";").append("没有找到有效的生产商:" + key2);
|
errormsg = errormsg.append(";").append("没有找到有效的生产商:" + key2);
|
||||||
|
|
@ -991,7 +991,7 @@ public class WMSPurInController {
|
||||||
} else {
|
} else {
|
||||||
String[] split = key2.split("#");
|
String[] split = key2.split("#");
|
||||||
for (int i = 0; i < split.length; i++) {
|
for (int i = 0; i < split.length; i++) {
|
||||||
DynamicObject tqq9_proxyandfactory1 = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, split[i]).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
DynamicObject tqq9_proxyandfactory1 = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("name", QCP.equals, split[i]).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
||||||
if (tqq9_proxyandfactory1 == null) {
|
if (tqq9_proxyandfactory1 == null) {
|
||||||
errormsg = errormsg.append(";").append("没有找到有效的生产商:" + split[i]);
|
errormsg = errormsg.append(";").append("没有找到有效的生产商:" + split[i]);
|
||||||
response.setMessage(errormsg.substring(1));
|
response.setMessage(errormsg.substring(1));
|
||||||
|
|
@ -1388,7 +1388,7 @@ public class WMSPurInController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(key2)) {
|
if (StringUtils.isNotBlank(key2)) {
|
||||||
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, key2).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("name", QCP.equals, key2).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
||||||
if (tqq9_proxyandfactory == null) {
|
if (tqq9_proxyandfactory == null) {
|
||||||
if (!key2.contains("#")) {
|
if (!key2.contains("#")) {
|
||||||
errormsg = errormsg.append(";").append("没有找到有效的生产商:" + key2);
|
errormsg = errormsg.append(";").append("没有找到有效的生产商:" + key2);
|
||||||
|
|
@ -1399,7 +1399,7 @@ public class WMSPurInController {
|
||||||
} else {
|
} else {
|
||||||
String[] split = key2.split("#");
|
String[] split = key2.split("#");
|
||||||
for (int i = 0; i < split.length; i++) {
|
for (int i = 0; i < split.length; i++) {
|
||||||
DynamicObject tqq9_proxyandfactory1 = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, split[i]).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
DynamicObject tqq9_proxyandfactory1 = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("name", QCP.equals, split[i]).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
||||||
if (tqq9_proxyandfactory1 == null) {
|
if (tqq9_proxyandfactory1 == null) {
|
||||||
errormsg = errormsg.append(";").append("没有找到有效的生产商:" + split[i]);
|
errormsg = errormsg.append(";").append("没有找到有效的生产商:" + split[i]);
|
||||||
response.setMessage(errormsg.substring(1));
|
response.setMessage(errormsg.substring(1));
|
||||||
|
|
@ -1537,7 +1537,7 @@ public class WMSPurInController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(key2)) {
|
if (StringUtils.isNotBlank(key2)) {
|
||||||
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, key2).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
DynamicObject tqq9_proxyandfactory = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("name", QCP.equals, key2).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
||||||
if (tqq9_proxyandfactory == null) {
|
if (tqq9_proxyandfactory == null) {
|
||||||
if (!key2.contains("#")) {
|
if (!key2.contains("#")) {
|
||||||
errormsg = errormsg.append(";").append("没有找到有效的生产商:" + key2);
|
errormsg = errormsg.append(";").append("没有找到有效的生产商:" + key2);
|
||||||
|
|
@ -1548,7 +1548,7 @@ public class WMSPurInController {
|
||||||
} else {
|
} else {
|
||||||
String[] split = key2.split("#");
|
String[] split = key2.split("#");
|
||||||
for (int i = 0; i < split.length; i++) {
|
for (int i = 0; i < split.length; i++) {
|
||||||
DynamicObject tqq9_proxyandfactory1 = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("number", QCP.equals, split[i]).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
DynamicObject tqq9_proxyandfactory1 = BusinessDataServiceHelper.loadSingle("tqq9_proxyandfactory", new QFilter[]{new QFilter("name", QCP.equals, split[i]).and("status", QCP.equals, "C").and("enable", QCP.equals, "1")});
|
||||||
if (tqq9_proxyandfactory1 == null) {
|
if (tqq9_proxyandfactory1 == null) {
|
||||||
errormsg = errormsg.append(";").append("没有找到有效的生产商:" + split[i]);
|
errormsg = errormsg.append(";").append("没有找到有效的生产商:" + split[i]);
|
||||||
response.setMessage(errormsg.substring(1));
|
response.setMessage(errormsg.substring(1));
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,16 @@
|
||||||
package tqq9.lc123.cloud.app.plugin.form.im;
|
package tqq9.lc123.cloud.app.plugin.form.im;
|
||||||
|
|
||||||
|
import com.alibaba.nacos.common.utils.StringUtils;
|
||||||
import kd.bos.bill.AbstractBillPlugIn;
|
import kd.bos.bill.AbstractBillPlugIn;
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
import kd.bos.dataentity.utils.StringUtils;
|
|
||||||
import kd.bos.entity.datamodel.IDataModel;
|
import kd.bos.entity.datamodel.IDataModel;
|
||||||
import kd.bos.entity.datamodel.events.ChangeData;
|
import kd.bos.entity.datamodel.events.ChangeData;
|
||||||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||||
import kd.bos.form.field.BasedataEdit;
|
import kd.bos.form.field.BasedataEdit;
|
||||||
|
import kd.bos.form.field.events.BeforeF7SelectEvent;
|
||||||
|
import kd.bos.form.field.events.BeforeF7SelectListener;
|
||||||
|
import kd.bos.list.ListShowParameter;
|
||||||
import kd.bos.orm.query.QCP;
|
import kd.bos.orm.query.QCP;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
|
|
@ -15,49 +18,57 @@ import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.EventObject;
|
import java.util.EventObject;
|
||||||
|
import java.util.HashSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 其他出库申请界面插件
|
* 其他出库申请界面插件
|
||||||
*/
|
*/
|
||||||
public class OtherOutApplyBillPlugin extends AbstractBillPlugIn {
|
public class OtherOutApplyBillPlugin extends AbstractBillPlugIn implements BeforeF7SelectListener {
|
||||||
@Override
|
@Override
|
||||||
public void registerListener(EventObject e) {
|
public void registerListener(EventObject e) {
|
||||||
super.registerListener(e);
|
super.registerListener(e);
|
||||||
this.addItemClickListeners("tbmain");
|
this.addItemClickListeners("tbmain");
|
||||||
BasedataEdit control = this.getControl("tqq9_lot");
|
BasedataEdit tqq9_materiel = this.getView().getControl("tqq9_materiel");
|
||||||
// control.addBeforeF7SelectListener(this);
|
tqq9_materiel.addBeforeF7SelectListener(this);
|
||||||
// this.addClickListeners("tqq9_xsddh");
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * 出库批号根据了做筛选
|
* 物料根据所选仓库,组织,是否有库存筛选
|
||||||
// */
|
*/
|
||||||
|
|
||||||
// @Override
|
@Override
|
||||||
// public void beforeF7Select(BeforeF7SelectEvent beforeF7SelectEvent) {
|
public void beforeF7Select(BeforeF7SelectEvent beforeF7SelectEvent) {
|
||||||
// int index = this.getModel().getEntryCurrentRowIndex("entryentity");
|
String name = beforeF7SelectEvent.getProperty().getName();
|
||||||
// DynamicObjectCollection entryentity = this.getModel().getDataEntity(true).getDynamicObjectCollection("entryentity");
|
if (StringUtils.equals("tqq9_materiel", name)) {
|
||||||
// DynamicObject dynamicObject = entryentity.get(index);
|
IDataModel model = this.getModel();
|
||||||
// DynamicObject tqq9_materiel = dynamicObject.getDynamicObject("tqq9_materiel");
|
int index = model.getEntryCurrentRowIndex("entryentity");
|
||||||
// if (tqq9_materiel == null) {
|
DynamicObjectCollection entryentity = model.getDataEntity(true).getDynamicObjectCollection("entryentity");
|
||||||
// beforeF7SelectEvent.setCancel(true);
|
DynamicObject dynamicObject = entryentity.get(index);
|
||||||
// this.getView().showMessage("请先填物料信息");
|
DynamicObject tqq9_dcck = dynamicObject.getDynamicObject("tqq9_dcck");
|
||||||
// } else {
|
if (tqq9_dcck != null) {
|
||||||
// DynamicObject materiel = tqq9_materiel.getDynamicObject("masterid");//物料
|
DynamicObject dataEntity = model.getDataEntity();
|
||||||
// Boolean enablelot = tqq9_materiel.getBoolean("enablelot");//是否启用批号管理
|
DynamicObject org = dataEntity.getDynamicObject("org");
|
||||||
// if (enablelot) {
|
QFilter qFilter = new QFilter("org.number", QCP.equals, org.getString("number"));
|
||||||
// ListShowParameter param = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter();
|
qFilter.and("warehouse.number", QCP.equals, tqq9_dcck.getString("number"));
|
||||||
// QFilter qF1 = new QFilter("material.number", QCP.equals, materiel.getString("number"));
|
qFilter.and("qty", QCP.not_equals2, 0);
|
||||||
// param.getListFilterParameter().getQFilters().add(qF1);
|
DynamicObject[] t_im_inv_realbalances = BusinessDataServiceHelper.load("im_inv_realbalance", "id,warehouse,org,material", qFilter.toArray());
|
||||||
// } else {
|
HashSet<Long> ids = new HashSet<>();
|
||||||
// beforeF7SelectEvent.setCancel(true);
|
for (DynamicObject t_im_inv_realbalance : t_im_inv_realbalances) {
|
||||||
// this.getView().showMessage("该物料未启用批号管理");
|
DynamicObject material = t_im_inv_realbalance.getDynamicObject("material");
|
||||||
// }
|
if (material != null) {
|
||||||
//
|
ids.add(material.getLong("id"));
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
ListShowParameter param = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter();
|
||||||
|
QFilter qF1 = new QFilter("masterid", QCP.in, ids);
|
||||||
|
param.getListFilterParameter().getQFilters().add(qF1);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -169,115 +180,4 @@ public class OtherOutApplyBillPlugin extends AbstractBillPlugIn {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 点击退出回传其他出库单编号
|
|
||||||
// *
|
|
||||||
// * @param afterDoOperationEventArgs
|
|
||||||
// */
|
|
||||||
// @Override
|
|
||||||
// public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) {
|
|
||||||
// super.afterDoOperation(afterDoOperationEventArgs);
|
|
||||||
// String itemKey = afterDoOperationEventArgs.getOperateKey();
|
|
||||||
// if (StringUtils.equals("donothing", itemKey)) {
|
|
||||||
// Object billno = this.getModel().getValue("billno");
|
|
||||||
// HashMap<String, Object> map = new HashMap<>();
|
|
||||||
// map.put("billno", billno);
|
|
||||||
// this.getView().returnDataToParent(map);
|
|
||||||
// this.getView().close();
|
|
||||||
// }else if(StringUtils.equals("submit", itemKey)){
|
|
||||||
// DynamicObject dataEntity = this.getModel().getDataEntity(true);
|
|
||||||
// DynamicObjectCollection entryentity = dataEntity.getDynamicObjectCollection("entryentity");
|
|
||||||
// for (DynamicObject dynamicObject : entryentity) {
|
|
||||||
// String tqq9_lotnumber = dynamicObject.getString("tqq9_lotnumber");//批号
|
|
||||||
// DynamicObject bd_lot= BusinessDataServiceHelper.loadSingle("bd_lot", new QFilter[]{new QFilter("number", QCP.equals, tqq9_lotnumber)});
|
|
||||||
// dynamicObject.set("tqq9_lot",bd_lot);
|
|
||||||
// SaveServiceHelper.save(new DynamicObject[]{dataEntity});
|
|
||||||
// this.getView().updateView();
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 采购退货未异地退货保存跳转到其他出库申请
|
|
||||||
// */
|
|
||||||
// @Override
|
|
||||||
// public void afterCreateNewData(EventObject e) {
|
|
||||||
// super.afterCreateNewData(e);
|
|
||||||
// FormShowParameter formShowParameter = this.getView().getFormShowParameter();
|
|
||||||
// String billno = formShowParameter.getCustomParam("tqq9_otheroutapplybillno");
|
|
||||||
// if (StringUtils.isNotBlank(billno)) {
|
|
||||||
// DynamicObject pm_purrefundapplybill = BusinessDataServiceHelper.loadSingle("pm_purrefundapplybill", new QFilter[]{new QFilter("billno", QCP.equals, billno)});
|
|
||||||
// DynamicObject org = pm_purrefundapplybill.getDynamicObject("org");//采购组织
|
|
||||||
// DynamicObjectCollection billentry = pm_purrefundapplybill.getDynamicObjectCollection("billentry");//采购退货分录
|
|
||||||
// DynamicObject dataEntity = this.getModel().getDataEntity(true);
|
|
||||||
// //业务类型
|
|
||||||
// DynamicObject bd_biztype = BusinessDataServiceHelper.loadSingle("bd_biztype", new QFilter[]{new QFilter("number", QCP.equals, "612")});
|
|
||||||
// dataEntity.set("tqq9_biztype", bd_biztype);
|
|
||||||
// //库存事务
|
|
||||||
// DynamicObject im_invscheme = BusinessDataServiceHelper.loadSingle("im_invscheme", new QFilter[]{new QFilter("number", QCP.equals, "612.1")});
|
|
||||||
// dataEntity.set("tqq9_kcsw", im_invscheme);
|
|
||||||
// //业务日期
|
|
||||||
// Date date = new Date();
|
|
||||||
// dataEntity.set("tqq9_bizdate", date);
|
|
||||||
// dataEntity.set("tqq9_dblx", "A");//调拨类型
|
|
||||||
// dataEntity.set("tqq9_dbckfl", "G");//调拨出库分类
|
|
||||||
// dataEntity.set("org", org);//组织
|
|
||||||
// dataEntity.set("tqq9_dczz1", org);//调出组织
|
|
||||||
// dataEntity.set("tqq9_drck2", org);//调入组织
|
|
||||||
// DynamicObjectCollection entryentity = dataEntity.getDynamicObjectCollection("entryentity");
|
|
||||||
// entryentity.clear();
|
|
||||||
//
|
|
||||||
// //库存类型-普通
|
|
||||||
// DynamicObject bd_invtype = BusinessDataServiceHelper.loadSingle("bd_invtype", new QFilter[]{new QFilter("number", QCP.equals, "110")});
|
|
||||||
// //库存类型-普通
|
|
||||||
// DynamicObject bd_invstatus = BusinessDataServiceHelper.loadSingle("bd_invstatus", new QFilter[]{new QFilter("number", QCP.equals, "110")});
|
|
||||||
// //出库货主类型
|
|
||||||
// String tqq9_outownertype = "bos_org";
|
|
||||||
// //出库保管者类型
|
|
||||||
// String tqq9_outkeepertype = "bos_org";
|
|
||||||
// for (DynamicObject entry : billentry) {
|
|
||||||
// DynamicObject dynamicObject = entryentity.addNew();
|
|
||||||
// dynamicObject.set("tqq9_linetype", entry.getDynamicObject("linetype"));//行类型
|
|
||||||
// DynamicObject material = entry.getDynamicObject("material");//物料采购信息
|
|
||||||
// if (material != null) {
|
|
||||||
// DynamicObject masterid = material.getDynamicObject("masterid");//物料信息
|
|
||||||
// //物料库存信息
|
|
||||||
// DynamicObject bd_materialinventoryinfo = BusinessDataServiceHelper.loadSingle("bd_materialinventoryinfo", new QFilter[]{new QFilter("masterid", QCP.equals, masterid.getLong("id"))});
|
|
||||||
// //商城商品
|
|
||||||
// DynamicObject tqq9_goodspackage = BusinessDataServiceHelper.loadSingle("tqq9_goodspackage", new QFilter[]{new QFilter("tqq9_mater.id", QCP.equals, masterid.getLong("id"))});
|
|
||||||
// dynamicObject.set("tqq9_materiel", bd_materialinventoryinfo);//物料库存信息
|
|
||||||
// dynamicObject.set("tqq9_goods", tqq9_goodspackage);//商城商品
|
|
||||||
// dynamicObject.set("tqq9_materialname", masterid.getString("name"));//物料名称
|
|
||||||
// dynamicObject.set("tqq9_unit", masterid.getDynamicObject("baseunit"));//计量单位
|
|
||||||
// dynamicObject.set("tqq9_baseunit", masterid.getDynamicObject("baseunit"));//基本单位
|
|
||||||
// }
|
|
||||||
// dynamicObject.set("tqq9_dczz", org);//调出组织
|
|
||||||
// dynamicObject.set("tqq9_drzz", org);//调入组织
|
|
||||||
// dynamicObject.set("tqq9_zczh", entry.getDynamicObject("tqq9_registration"));//注册证号
|
|
||||||
// dynamicObject.set("tqq9_licenseno", entry.getString("tqq9_licenseno"));//许可证号
|
|
||||||
// dynamicObject.set("tqq9_producedate", entry.getDate("tqq9_createdate"));//生产日期
|
|
||||||
// dynamicObject.set("tqq9_expirydate", entry.getDate("tqq9_deadline"));//到期日期
|
|
||||||
// dynamicObject.set("tqq9_drck", entry.getDynamicObject("tqq9_thck"));//退货仓库
|
|
||||||
// dataEntity.set("tqq9_basedatafield1", entry.getDynamicObject("tqq9_thck"));//退货仓库
|
|
||||||
// dynamicObject.set("tqq9_lot", entry.getDynamicObject("tqq9_ph"));//批号
|
|
||||||
// dynamicObject.set("tqq9_qty", entry.getBigDecimal("qty"));//数量
|
|
||||||
// dynamicObject.set("tqq9_baseqty", entry.getBigDecimal("qty"));//数量
|
|
||||||
// dynamicObject.set("tqq9_price", entry.getBigDecimal("price"));//单价
|
|
||||||
// dynamicObject.set("tqq9_amount", entry.getBigDecimal("amount"));//金额
|
|
||||||
// dynamicObject.set("tqq9_outinvtype", bd_invtype);//出库库存类型
|
|
||||||
// dynamicObject.set("tqq9_outinvstatus", bd_invstatus);//出库库存状态
|
|
||||||
// dynamicObject.set("tqq9_outownertype", tqq9_outownertype);//出库货主类型
|
|
||||||
// dynamicObject.set("tqq9_outkeepertype", tqq9_outkeepertype);//出库保管者类型
|
|
||||||
// dynamicObject.set("tqq9_outowner", org);//出库货主
|
|
||||||
// dynamicObject.set("tqq9_outkeeper", org);//出库保管者
|
|
||||||
// }
|
|
||||||
// this.getView().setVisible(true, "tqq9_confirm");
|
|
||||||
// this.getView().setVisible(false, "bar_close");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -444,15 +444,18 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
|
||||||
this.getView().showErrorNotification("物料明细分录行" + seq + "含税单价超过最高采购限价,请修改");
|
this.getView().showErrorNotification("物料明细分录行" + seq + "含税单价超过最高采购限价,请修改");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(StringUtils.equals("tqq9_amount",name)){
|
if(StringUtils.equals("tqq9_amount",name)||StringUtils.equals("tqq9_disamount",name)){
|
||||||
DynamicObjectCollection billentries = dataEntity.getDynamicObjectCollection("billentry");
|
DynamicObjectCollection billentries = dataEntity.getDynamicObjectCollection("billentry");
|
||||||
for (int i = 0; i < billentries.size(); i++) {
|
for (int i = 0; i < billentries.size(); i++) {
|
||||||
DynamicObject billentry = billentries.get(i);
|
DynamicObject billentry = billentries.get(i);
|
||||||
BigDecimal tqq9_amount = billentry.getBigDecimal("tqq9_amount");//折扣前价税合计
|
BigDecimal tqq9_amount = billentry.getBigDecimal("tqq9_amount");//折扣前价税合计
|
||||||
BigDecimal tqq9_disamount = billentry.getBigDecimal("tqq9_disamount");//优惠(折扣)金额
|
BigDecimal tqq9_disamount = billentry.getBigDecimal("tqq9_disamount");//优惠(折扣)金额
|
||||||
BigDecimal amountandtax = tqq9_amount.subtract(tqq9_disamount);//折扣后价税合计
|
BigDecimal tqq9_xfamount = billentry.getBigDecimal("tqq9_xfamount");//现返使用金额
|
||||||
|
BigDecimal tqq9_hfamount = billentry.getBigDecimal("tqq9_hfamount");//优惠(折扣)金额
|
||||||
|
BigDecimal amountandtax = tqq9_amount.subtract(tqq9_disamount).subtract(tqq9_xfamount).subtract(tqq9_hfamount);//折扣后价税合计
|
||||||
getModel().setValue("amountandtax", amountandtax,i);
|
getModel().setValue("amountandtax", amountandtax,i);
|
||||||
}
|
}
|
||||||
|
getView().updateView();
|
||||||
|
|
||||||
}
|
}
|
||||||
if (StringUtils.equals("supplier", name)) {
|
if (StringUtils.equals("supplier", name)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue