支出合同结算跳转
This commit is contained in:
parent
cd0de0c717
commit
15907b477d
|
@ -0,0 +1,76 @@
|
|||
package zcgj.zcdev.zcdev.pr.plugin.form;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import kd.bos.bill.BillShowParameter;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.LocaleString;
|
||||
import kd.bos.entity.datamodel.ListSelectedRow;
|
||||
import kd.bos.entity.datamodel.ListSelectedRowCollection;
|
||||
import kd.bos.form.FormMetadataCache;
|
||||
import kd.bos.form.IPageCache;
|
||||
import kd.bos.form.ShowType;
|
||||
import kd.bos.form.container.Tab;
|
||||
import kd.bos.form.control.events.ItemClickEvent;
|
||||
import kd.bos.list.BillList;
|
||||
import kd.bos.list.ListShowParameter;
|
||||
import kd.bos.list.plugin.AbstractListPlugin;
|
||||
import kd.bos.logging.Log;
|
||||
import kd.bos.logging.LogFactory;
|
||||
import kd.bos.openapi.common.result.OpenApiResult;
|
||||
import kd.bos.openapi.common.util.OpenApiSdkUtil;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 支出合同结算财务确认单
|
||||
*/
|
||||
public class OutContractFinaceConfirmePlugin extends AbstractListPlugin implements Plugin {
|
||||
private static final Log log = LogFactory.getLog(OutContractFinaceConfirmePlugin.class);
|
||||
|
||||
|
||||
@Override
|
||||
public void itemClick(ItemClickEvent evt) {
|
||||
super.itemClick(evt);
|
||||
String itemKey = evt.getItemKey();
|
||||
if("zcgj_finaceconfirme".equals(itemKey)) {
|
||||
BillList billList = this.getView().getControl(AbstractListPlugin.BILLLISTID);
|
||||
//获取到选中行的数据
|
||||
ListSelectedRowCollection selectedRows = billList.getSelectedRows();
|
||||
if(selectedRows.isEmpty()){
|
||||
this.getView().showTipNotification(String.format("请选择要确认的数据。"));
|
||||
return;
|
||||
}
|
||||
if(selectedRows.size() > 1){
|
||||
this.getView().showTipNotification(String.format("请选择单个数据进行确认操作。。"));
|
||||
return;
|
||||
}
|
||||
for (ListSelectedRow selectedRow : selectedRows) {
|
||||
BillShowParameter showParameter = new BillShowParameter();
|
||||
Long pk = (Long) selectedRow.getPrimaryKeyValue();
|
||||
// DynamicObject taskobj = BusinessDataServiceHelper.loadSingle(pk, "task_task");
|
||||
String billNo = selectedRow.getBillNo();
|
||||
QFilter accountTableFilter = new QFilter("zcgj_ec_out_contract_id", QCP.equals,billNo);
|
||||
|
||||
DynamicObject data = BusinessDataServiceHelper.loadSingle("zcgj_ec_out_finaceconfirm", "id,number", new QFilter[]{accountTableFilter});
|
||||
if(data != null){
|
||||
long id = data.getLong("id");
|
||||
showParameter.setPkId(id);
|
||||
}
|
||||
showParameter.setFormId("zcgj_ec_out_finaceconfirm");
|
||||
showParameter.getOpenStyle().setShowType(ShowType.MainNewTabPage); //打开方式
|
||||
getView().showForm(showParameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue