采购订单携带合同明细
This commit is contained in:
parent
eac91bdfc2
commit
86410b7d79
|
@ -0,0 +1,106 @@
|
||||||
|
package shkd.repc.repe.formplugin;
|
||||||
|
|
||||||
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
|
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||||
|
import kd.bos.form.control.AttachmentPanel;
|
||||||
|
import kd.bos.form.control.Button;
|
||||||
|
import kd.bos.form.control.EntryGrid;
|
||||||
|
import kd.bos.form.control.events.UploadListener;
|
||||||
|
import kd.bos.form.events.HyperLinkClickEvent;
|
||||||
|
import kd.bos.form.events.HyperLinkClickListener;
|
||||||
|
import kd.bos.form.field.BasedataEdit;
|
||||||
|
import kd.bos.form.field.RefBillEdit;
|
||||||
|
import kd.bos.form.field.events.BeforeF7SelectListener;
|
||||||
|
import kd.bos.form.plugin.AbstractFormPlugin;
|
||||||
|
import kd.bos.orm.query.QCP;
|
||||||
|
import kd.bos.orm.query.QFilter;
|
||||||
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
|
|
||||||
|
import java.util.EventObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采购订单
|
||||||
|
* qeug_repe_orderform_ext
|
||||||
|
*/
|
||||||
|
public class RepeOrderFormPlugin extends AbstractFormPlugin {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerListener(EventObject e) {
|
||||||
|
super.registerListener(e);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void propertyChanged(PropertyChangedArgs e) {
|
||||||
|
super.propertyChanged(e);
|
||||||
|
String propertyname = e.getProperty().getName();
|
||||||
|
switch (propertyname) {
|
||||||
|
//采购合同(外)
|
||||||
|
case "cqcontract":
|
||||||
|
// String contractname = (String)this.getModel().getDataEntity(true).get("contractname");//suppliercontact supplier cqcontract
|
||||||
|
//采购订单--订单明细
|
||||||
|
DynamicObjectCollection orderformentrys = this.getModel().getDataEntity(true).getDynamicObjectCollection("orderformentry");
|
||||||
|
orderformentrys.clear();
|
||||||
|
|
||||||
|
String number = "";
|
||||||
|
String name = "";
|
||||||
|
DynamicObject cqcontract = (DynamicObject) this.getModel().getValue(propertyname);
|
||||||
|
if (null != cqcontract) {
|
||||||
|
number = cqcontract.getString("number");
|
||||||
|
name = cqcontract.getString("name");
|
||||||
|
}
|
||||||
|
QFilter q1 = new QFilter("billno", QCP.equals, number);
|
||||||
|
QFilter q2 = new QFilter("billname", QCP.equals, name);
|
||||||
|
DynamicObject recon_contractbill = BusinessDataServiceHelper.loadSingle("recon_contractbill", new QFilter[]{q1,q2});
|
||||||
|
|
||||||
|
if (null != recon_contractbill) {
|
||||||
|
int j = 0;
|
||||||
|
DynamicObjectCollection qeugOrderformentrys = recon_contractbill.getDynamicObjectCollection("qeug_orderformentry");
|
||||||
|
for (DynamicObject qeugOrderformentry : qeugOrderformentrys) {
|
||||||
|
int row1 = this.getModel().insertEntryRow("orderformentry", j);
|
||||||
|
DynamicObject object = qeugOrderformentrys.get(row1);
|
||||||
|
object.set("seq", row1);
|
||||||
|
this.getModel().setValue("material", qeugOrderformentry.get("qeug_material"), row1);//物料编码
|
||||||
|
this.getModel().setValue("brand", qeugOrderformentry.get("qeug_brand"), row1);//品牌
|
||||||
|
this.getModel().setValue("model", qeugOrderformentry.get("qeug_model"), row1);//型号
|
||||||
|
this.getModel().setValue("contractnum", qeugOrderformentry.get("qeug_contractnum"), row1);//合同数量
|
||||||
|
this.getModel().setValue("contractremainnum", qeugOrderformentry.get("qeug_contractremainnum"), row1);//合同剩余数量
|
||||||
|
this.getModel().setValue("ordercount", qeugOrderformentry.get("qeug_ordercount"), row1);//本次订货数量
|
||||||
|
this.getModel().setValue("entryenterdate", qeugOrderformentry.get("qeug_entryenterdate"), row1);//要求进场日期
|
||||||
|
this.getModel().setValue("unitprice", qeugOrderformentry.get("qeug_unitprice"), row1);//材料单价
|
||||||
|
this.getModel().setValue("originalprice", qeugOrderformentry.get("qeug_originalprice"), row1);//原始单价
|
||||||
|
this.getModel().setValue("transportprice", qeugOrderformentry.get("qeug_transportprice"), row1);//运费单价
|
||||||
|
this.getModel().setValue("installprice", qeugOrderformentry.get("qeug_installprice"), row1);//安装单价
|
||||||
|
this.getModel().setValue("totalprice", qeugOrderformentry.get("qeug_totalprice"), row1);//综合单价
|
||||||
|
this.getModel().setValue("totaloriginalprice", qeugOrderformentry.get("qeug_totaloriginalprice"), row1);//综合原始单价
|
||||||
|
this.getModel().setValue("taxprice", qeugOrderformentry.get("qeug_taxprice"), row1);//含税单价
|
||||||
|
this.getModel().setValue("taxrate", qeugOrderformentry.get("qeug_taxrate"), row1);//税率
|
||||||
|
this.getModel().setValue("taxamount", qeugOrderformentry.get("qeug_taxamount"), row1);//税额
|
||||||
|
this.getModel().setValue("notaxtotalprice", qeugOrderformentry.get("qeug_notaxtotalprice"), row1);//不含税总价
|
||||||
|
this.getModel().setValue("taxtotalprice", qeugOrderformentry.get("qeug_taxtotalprice"), row1);//含税总价
|
||||||
|
this.getModel().setValue("totaldeliverycount", qeugOrderformentry.get("qeug_totaldeliverycount"), row1);//累计发货数量
|
||||||
|
this.getModel().setValue("totalreceivecount", qeugOrderformentry.get("qeug_totalreceivecount"), row1);//累计收货数量
|
||||||
|
this.getModel().setValue("totalrefundcount", qeugOrderformentry.get("qeug_totalrefundcount"), row1);//累计退货数量
|
||||||
|
this.getModel().setValue("total_accept_count", qeugOrderformentry.get("qeug_total_accept_count"), row1);//累计验收数量
|
||||||
|
this.getModel().setValue("goodsinfo", qeugOrderformentry.get("qeug_goodsinfo"), row1);//商品信息
|
||||||
|
this.getModel().setValue("description", qeugOrderformentry.get("qeug_description"), row1);//备注
|
||||||
|
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.getView().updateView("orderformentry");
|
||||||
|
break;
|
||||||
|
case "contract":
|
||||||
|
System.out.println();
|
||||||
|
break;
|
||||||
|
case "npcontract":
|
||||||
|
System.out.println();
|
||||||
|
break;
|
||||||
|
case "eccontract":
|
||||||
|
System.out.println();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue