/// <summary> /// 菜单点击后处理事件,表单插件同样适用 /// </summary> /// <param name="e"></param> public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { switch (e.BarItemKey.ToUpperInvariant()) { case "TBBMYALL": //tbbMyAll 全部任务 Act_Task_tbbMyAll(); this.View.RefreshByFilter(); break; case "TBBMYRESP": //tbbMyResp 我负责的 Act_Task_tbbMyResp(); this.View.RefreshByFilter(); break; case "TBBMYPART": //tbbMyPart 我执行的 Act_Task_tbbMyPart(); this.View.RefreshByFilter(); break; case "TBBMYEXEC": //tbbMyExec 待执行的 Act_Task_tbbMyExec(); this.View.RefreshByFilter(); break; default: break; } }
/// <summary> /// 菜单 /// </summary> /// <param name="e"></param> public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { base.AfterBarItemClick(e); string _key = e.BarItemKey.ToUpperInvariant(); switch (_key) { case "FBTNDOSCH": //FBtnDoSch 查询数据 Act_ABIC_FBtnDoSch(e); break; case "FBTNBACKT": //FBtnBackT 返回勾选数据 Act_AEBIC_FBtnBack(e); break; case "TBCLOSE": //tbClose 退出 Val_IsReturn2PW = false; this.View.ReturnToParentWindow(null); this.View.Close(); break; default: break; } }
public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { if (e.BarItemKey.EqualsIgnoreCase("tbImportMaterial")) { this.ImportMaterial(); } }
/// <summary> /// 菜单点击后处理事件,表单插件同样适用 /// </summary> /// <param name="e"></param> public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { var x = CZ_GetSelectedRowsBillNo(); var ee = CZ_GetSelectedRowsFEntryID(); var zz = CZ_GetCurrentRowFID(); }
public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { base.AfterBarItemClick(e); if (e.BarItemKey.EqualsIgnoreCase("ora_tbSubmit")) { if (mLeaveFID == "-1") { this.View.ShowErrMessage("没有要提交的数据!"); return; } StringBuilder sbSql = new StringBuilder(); sbSql.Append("/*dialect*/"); var entity = this.Model.DataObject["FEntity"] as DynamicObjectCollection; if (entity.Count <= 0) { return; } foreach (var row in entity) { sbSql.Append($"update ora_t_Leave set FDAYNUM={row["FDayNum"]} where FEntryID={row["FEntryID"]};"); } DBUtils.Execute(Context, sbSql.ToString()); mLeaveFID = "-1"; // 打开生成的请假单 var para = new BillShowParameter(); para.FormId = "kbea624189d8e4d829b68340507eda196"; para.OpenStyle.ShowType = ShowType.InContainer; para.ParentPageId = this.View.PageId; para.Status = OperationStatus.VIEW; para.PKey = mLeaveFID; this.View.ShowForm(para); } }
/// <summary> /// 单据体 菜单按钮事件处理 返回数据 /// </summary> /// <param name="e"></param> private void Act_AEBIC_FBtnBack(AfterBarItemClickEventArgs e) { if (Val_OpenPrm == "") { return; } int _rowCnt = this.View.Model.GetEntryRowCount("FEntity"); string _rowFChk = ""; int _chkRows = 0; string _backStr = ""; string _rowStr = ""; for (int i = 0; i < _rowCnt; i++) { _rowFChk = this.CZ_GetRowValue_DF("FChk", i, "False").ToUpperInvariant(); if (_rowFChk == "FALSE") { continue; } _chkRows++; //将行信息加入返回队列 _rowStr = this.CZ_GetRowValue_DF("FOrderPlanID", i, "0"); _backStr = _backStr == "" ? _rowStr : _backStr + "," + _rowStr; } //返回值 Val_IsReturn2PW = true; this.View.ReturnToParentWindow(new Kingdee.BOS.Core.DynamicForm.FormResult(_backStr)); this.View.Close(); }
/// <summary> /// 菜单点击后处理事件,表单插件同样适用 /// </summary> /// <param name="e"></param> public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { switch (e.BarItemKey.ToUpperInvariant()) { case "TBBMYALL": //tbbMyAll 全部线索 Act_ABIC_tbbMyAll(); this.View.RefreshByFilter(); break; case "TBBMYCREATE": //tbbMyCreate 我创建的 Act_ABIC_tbbMyCreate(); this.View.RefreshByFilter(); break; case "TBBMYHOLD": //tbbMyHold 我持有的 Act_ABIC_tbbMyHold(); this.View.RefreshByFilter(); break; case "TBBMYCTRL": //tbbMyCtrl 我管理的 Act_ABIC_tbbMyCtrl(); this.View.RefreshByFilter(); break; default: break; } }
public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { base.AfterBarItemClick(e); DynamicObject billobj = this.Model.DataObject; string formID = this.View.BillBusinessInfo.GetForm().Id; //打印按钮事件 if (e.BarItemKey.EqualsIgnoreCase("SZXY_tbGridPrintNo")) { if (billobj["SaleOrgId"] is DynamicObject org && billobj["CustomerID"] is DynamicObject CustDo) { string Custid = Convert.ToString(CustDo["ID"]); this.Model.DataObject["FFormId"] = this.View.BusinessInfo.GetForm().Id; Utils.Save(View, new DynamicObject[] { this.Model.DataObject }, Kingdee.BOS.Orm.OperateOption.Create(), Context); string Fid = ""; string DyModel = ""; int V = 0; DataSet PrintModelDS = null; if (billobj["SAL_OUTSTOCKENTRY"] is DynamicObjectCollection entry) { foreach (var item in entry.Where(m => !Convert.ToString(m["MaterialID_Id"]).IsNullOrEmptyOrWhiteSpace() && Convert.ToString(m["F_SZXY_CheckBox"]).EqualsIgnoreCase("true"))) { Fid = this.Model.DataObject[0].ToString(); if (this.Model.DataObject["F_SZXY_DYMB"] is DynamicObject DymodelDo) { DyModel = DymodelDo["Id"].ToString(); } break; } } if (!DyModel.IsNullOrEmptyOrWhiteSpace() && DyModel != "") { DyModel = $" and T1.Fid={DyModel} "; } string MacInfo = Utils.GetMacAddress(); Logger.Debug("当前MAC地址", MacInfo); //Func < this.View,Context,DyModel,org["Id"].ToString(),MacInfo,Custid,PrintModelDS > (); PrintModelDS = getPrintModel(this.View, Context, DyModel, org["Id"].ToString(), MacInfo, Custid, ref V); if (PrintModelDS != null) { Print(PrintModelDS, V, Context, this.View, Fid); } // Utils.TYPrint(this.View, Context, Convert.ToInt64(org["Id"]),billobj[0].ToString()); } } }
public override void AfterEntryBarItemClick(AfterBarItemClickEventArgs e) { string str; if (((str = e.BarItemKey.ToUpperInvariant()) != null) && (str == "TBCLEARDIMENSION")) { this.ClearDimensionData(); } base.AfterEntryBarItemClick(e); }
public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { base.AfterBarItemClick(e); switch (e.BarItemKey.ToUpperInvariant()) { case "TBFZNCPT": //tbFznCpt Act_CptFrozen(); break; } }
public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { base.AfterBarItemClick(e); switch (e.BarItemKey.ToUpperInvariant()) { case "TBUPDATECPT": //tbUpdateCpt Act_CptTrans(); break; } }
public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { base.AfterBarItemClick(e); if (e.BarItemKey.Equals("tbLose")) { if (Convert.ToString(this.Model.GetValue("FWinReason")).Equals(" ")) { throw new KDBusinessException("", string.Format("商机输赢原因没填,输单操作失败!")); } } }
public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { base.AfterBarItemClick(e); /*因为上游单据下推收货通知、发货通知,生成的单据仅处于创建状态,未能自动提交及审核,后来在下游单据的保存操作列表中配了服务插件,实现了自动提交和审核; * 手工新增的收货、发货通知,因配置了服务插件,所以在点击保存后,也自动提交和审核了,而当前界面在保存后,审核状态等未做更新,导致操作人员不清楚当前单据状态, * 提交及审核按钮状态为激活状态,显示状态不对,所以增加了这个表单插件,保存后,自动刷新当前单据 */ if (e.BarItemKey == "tbSplitSave" || e.BarItemKey == "tbSave") { this.View.Refresh(); //this.View.Model.SetValue("FRemark", ((DynamicObject)this.View.Model.GetValue("FBillTypeId"))["Name"].ToString()) ; if (((DynamicObject)this.View.Model.GetValue("FBillTypeId"))["Name"].ToString() != "简单生产入库-收货") { return; } else { //Entity entity = this.View.BusinessInfo.GetEntity("FEntity"); int iRowCount = this.View.Model.GetEntryRowCount("FEntity"); String EnableCapacity; for (int iRowIndex = 0; iRowIndex < iRowCount; iRowIndex++) { DynamicObject FMaterialId = this.View.Model.GetValue("FMaterialId", iRowIndex) as DynamicObject; DynamicObjectCollection WarehouseSub = FMaterialId["WarehouseSub"] as DynamicObjectCollection; EnableCapacity = WarehouseSub.FirstOrDefault()["EnableCapacity"].ToString(); //生成条码信息 %单据编号%物料%跟踪号%数量% String sCodeInfo = "%" + this.View.Model.GetValue("FBillNo", iRowIndex).ToString() + "%" + ((DynamicObject)this.View.Model.GetValue("FMaterialId", iRowIndex))["Number"].ToString() + " %" + this.View.Model.GetValue("FTrackNo", iRowIndex).ToString() + "%"; if (EnableCapacity == "False") { //sCodeInfo += this.View.Model.GetValue("FMQty", iRowIndex).ToString() + "%"; sCodeInfo += string.Format("{0:######}", double.Parse(this.View.Model.GetValue("FMQty", iRowIndex).ToString())) + "%"; } else { //sCodeInfo += this.View.Model.GetValue("FCty", iRowIndex).ToString() + "%"; sCodeInfo += string.Format("{0:######}", double.Parse(this.View.Model.GetValue("FCty", iRowIndex).ToString())) + "%"; } this.View.Model.SetValue("FPHMXCodeInfo", sCodeInfo, iRowIndex); } this.View.UpdateView(); this.View.InvokeFormOperation(FormOperationEnum.Save); } } }
public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { base.AfterBarItemClick(e); string key = e.BarItemKey.ToUpperInvariant(); switch (key) { case "TBALLLEAVE": //tbAllLeave 集体请假 Act_ABIC_AllLeave(); break; } }
public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { base.AfterBarItemClick(e); if (this.Context.ClientType.ToString() != "Mobile") { switch (e.BarItemKey.ToUpperInvariant()) { case "TBCRYFWD": //tbCryFwd --预算结转 Act_CarryForward(); break; } } }
public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { base.AfterBarItemClick(e); switch (e.BarItemKey.ToUpperInvariant()) { case "TBDOANZBG": //tbDoAnzBG : 更新预算 if (!Check()) { Act_DoAnzBG(); } break; } }
public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { base.AfterBarItemClick(e); if (e.BarItemKey.ToUpperInvariant() == "TBWF") { string procInstId = WorkflowChartServiceHelper.GetProcInstIdByBillInst(this.Context, this.View.GetFormId(), CZ_GetFID()); List <ChartActivityInfo> routeCollection = WorkflowChartServiceHelper.GetProcessRouter(this.Context, procInstId); var WFNode = routeCollection[routeCollection.Count - 1]; //AssignmentServiceHelper. string name = this.Context.UserName; //GetApproveActions(this.View.GetFormId(), CZ_GetFID(), name); } }
/// <summary> /// 表单菜单按钮 更新材料组成 tbRLScheme tb ReadLoad Scheme /// </summary> /// <param name="e"></param> private void Act_AEBIC_TbRLScheme(AfterBarItemClickEventArgs e) { string _BillStatus = this.CZ_GetFormStatus(); if (_BillStatus == "C" || _BillStatus == "B") { this.View.ShowMessage("单据已提交或审核 不能执行"); return; } string _FSchemeNID = this.CZ_GetValue_DF("FScheme", "Id", "0"); Act_DcDo_FillEntityB(_FSchemeNID); }
public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { base.AfterBarItemClick(e); switch (e.BarItemKey.ToUpperInvariant()) { case "TBCLOSEONE": //tbCloseOne Act_CloseForm(); break; case "TBCLOSEALL": //tbCloseAll Act_CloseFormAll(); break; } }
public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { base.AfterBarItemClick(e); switch (e.BarItemKey.ToUpperInvariant()) { case "TBDOANZBG": //年度销售计划,生成预算 Act_GeneJanPlan(); break; case "TBDOANZBG1": //年度预算计划,生成预算 Act_GeneJanPlan1(); break; } }
/// <summary> /// 单据体 菜单按钮事件 订单收款计划 /// </summary> /// <param name="e"></param> private void Act_AfterEBIC_oraBtnChsOP(AfterBarItemClickEventArgs e) { string _FBillStatus = this.CZ_GetFormStatus(); string _FCdnSaleOrg = this.CZ_GetRowValue_DF("FReOrgID", "Id", 0, "0"); string _FCdnCust = this.CZ_GetRowValue_DF("FReCustID", "Id", 0, "0"); string _FSplitFlag = this.CZ_GetValue_DF("FSplitFlag", "0"); if (_FBillStatus == "C" || _FBillStatus == "B") { return; } if (_FCdnSaleOrg == "0" || _FCdnCust == "0") { return; } if (_FSplitFlag != "1") { return; } string _BspParamStr = "Flag=AddNew;FCdnSaleOrg=" + _FCdnSaleOrg + ";FCdnCust=" + _FCdnCust; //show Form new BillShowParameter _bsp = new BillShowParameter(); _bsp.FormId = "ora_dk_GetSOP4ReSplit"; _bsp.OpenStyle.ShowType = Kingdee.BOS.Core.DynamicForm.ShowType.MainNewTabPage; //_bsp.OpenStyle.ShowType = Kingdee.BOS.Core.DynamicForm.ShowType.Modal; _bsp.Status = Kingdee.BOS.Core.Metadata.OperationStatus.ADDNEW; _bsp.PKey = "0"; _bsp.CustomParams.Add("InitParam", _BspParamStr); //this.View.LockBill(); this.View.StyleManager.SetEnabled("F_ora_SpliteContainer", null, false); //打开基价计算单 有返回值则更新 无返回值则返回 this.View.ShowForm(_bsp, (Kingdee.BOS.Core.DynamicForm.FormResult frt) => { this.View.StyleManager.SetEnabled("F_ora_SpliteContainer", null, true); if (frt.ReturnData == null) { return; } string _value = frt.ReturnData.ToString(); //this.View.ShowMessage(_value); this.Act_Do_oraBtnChsOP(_value); }); }
public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { base.AfterBarItemClick(e); string key = e.BarItemKey.ToUpperInvariant(); switch (key) { case "ORA_TBGETYUNZHIJIADATA": //ora_tbGetYunZhiJiaData var param = new DynamicFormShowParameter(); param.FormId = "ora_HR_SignInSync"; param.OpenStyle.ShowType = ShowType.Modal; //打开方式 param.ParentPageId = this.View.PageId; this.View.ShowForm(param); break; } }
public override void AfterEntryBarItemClick(AfterBarItemClickEventArgs e) { base.AfterEntryBarItemClick(e); if (e.BarItemKey.EqualsIgnoreCase("tbViewVounter")) { string key = this.Model.GetEntryCurrentFieldKey("FEntity"); int currClickColIndex = 0; try { currClickColIndex = int.Parse(key.Split('_')[1]); } catch { } if (currClickColIndex < 3) { this.View.ShowWarnningMessage("请先选中费用项目列!"); return; } int colIndex = currClickColIndex - 3; //this.View.ShowMessage(key + " " + colIndex.ToString()); string FCostItemId = costItems.Rows[colIndex]["FEXPID"].ToString(); string FDeptName = ""; string FSDate = this.View.OpenParameter.GetCustomParameter("FSDate") == null ? "" : this.View.OpenParameter.GetCustomParameter("FSDate").ToString(); string FEDate = this.View.OpenParameter.GetCustomParameter("FEDate") == null ? "" : this.View.OpenParameter.GetCustomParameter("FEDate").ToString(); string FOrgId = this.View.OpenParameter.GetCustomParameter("FOrgId") == null ? "0" : this.View.OpenParameter.GetCustomParameter("FOrgId").ToString(); string FAccountId = this.View.OpenParameter.GetCustomParameter("FAccountId") == null ? "0" : this.View.OpenParameter.GetCustomParameter("FAccountId").ToString(); DynamicFormShowParameter param = new DynamicFormShowParameter(); param.ParentPageId = this.View.PageId; param.FormId = "ora_VounterDetail"; param.OpenStyle.ShowType = ShowType.Modal; param.CustomParams.Add("FSDate", FSDate); param.CustomParams.Add("FEDate", FEDate); param.CustomParams.Add("FOrgId", FOrgId); param.CustomParams.Add("FAccountId", FAccountId); param.CustomParams.Add("FDeptName", FDeptName); param.CustomParams.Add("FCostItemId", FCostItemId); this.View.ShowForm(param); } }
/// <summary> /// 单据体 菜单按钮事件 /// </summary> /// <param name="e"></param> public override void AfterEntryBarItemClick(AfterBarItemClickEventArgs e) { base.AfterEntryBarItemClick(e); string _key = e.BarItemKey.ToUpperInvariant(); switch (_key) { case "TBUPPRICE": //tbUpPrice BPR-按钮-更新本体单价 Act_AEBIC_TbUpPrice(e); break; default: break; } }
/// <summary> /// 单据体 菜单按钮事件 /// </summary> /// <param name="e"></param> public override void AfterEntryBarItemClick(AfterBarItemClickEventArgs e) { base.AfterEntryBarItemClick(e); string _key = e.BarItemKey.ToUpperInvariant(); switch (_key) { case "ORABTNCHSOP": //oraBtnChsOP 订单收款计划 Act_AfterEBIC_oraBtnChsOP(e); break; default: break; } }
/// <summary> /// 单据体 菜单按钮事件 /// </summary> /// <param name="e"></param> public override void AfterEntryBarItemClick(AfterBarItemClickEventArgs e) { base.AfterEntryBarItemClick(e); string _key = e.BarItemKey.ToUpperInvariant(); switch (_key) { case "FBTNBACK": //FBtnBack 返回勾选数据 //Act_AEBIC_FBtnBack(e); break; default: break; } }
public override void AfterEntryBarItemClick(AfterBarItemClickEventArgs e) { base.AfterEntryBarItemClick(e); switch (e.BarItemKey.ToUpperInvariant()) { case "TBSPLITBDG": //tbSplitBdg 预算拆分 Act_GeneAnzEntry(); break; case "TBSUMMONBDG": //tbSumMonBdg 每月预算汇总至明细 Act_SumMonthBudgetPlanEntry(); break; case "TBGENEROW": //tbGeneRow 生成每月预算表体 Act_GeneMonBdgSumEntry(); break; } }
public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { if (e.BarItemKey.Equals("tbsave")) { long entryid = 0; getTableName(); Entity entity = this.View.BusinessInfo.GetEntity("FEntity"); DynamicObjectCollection objs = this.View.Model.GetEntityDataObject(entity); DynamicObject[] lotMasters = null; if (!lotIds.IsEmpty() && !lotIds.Equals("0")) { string filter = string.Format("FLOTID IN ('{0}')", lotIds); OQLFilter of = OQLFilter.CreateHeadEntityFilter(filter); lotMasters = BusinessDataServiceHelper.Load(this.Context, "BD_BatchMainFile", null, of); } foreach (DynamicObject obj in objs) { value = obj["F_QANo"]; entryid = Convert.ToInt64(obj["F_BEM_billentryid"]); if (entryid == 0) { continue; } foreach (DynamicObject lotobj in lotMasters) { if (lotobj["id"].Equals(obj["FLOT_Id"])) { lotobj["F_QANo"] = obj["F_QANo"]; } } updateSqls.Add(string.Format(@"UPDATE {0} set F_QANo ='{1}' WHERE fentryid = {2} ", tableName, value, entryid)); } ISaveService service = Kingdee.BOS.App.ServiceHelper.GetService <ISaveService>(); service.Save(this.Context, lotMasters); DBUtils.ExecuteBatch(this.Context, updateSqls, updateSqls.Count); //返回值到父窗口 this.View.ReturnToParentWindow("true"); this.View.Close(); } base.AfterBarItemClick(e); }
/// <summary> /// BPR-按钮-更新本体单价 /// </summary> /// <param name="e"></param> private void Act_AEBIC_TbUpPrice(AfterBarItemClickEventArgs e) { string _BillStatus = this.CZ_GetFormStatus(); if (_BillStatus == "C" || _BillStatus == "B") { this.View.ShowMessage("单据已提交或审核 不能执行"); return; } int _maxRow = this.View.Model.GetEntryRowCount("FEntity"); int _maxRowB = this.View.Model.GetEntryRowCount("FEntityB"); if (_maxRow == 0 || _maxRowB == 0) { this.View.ShowErrMessage("产品组成 或 材料组成 没有行", "错误:产品组成 或 材料组成 没有行"); return; } double _FBGpAmt = Double.Parse(this.CZ_GetRowValue_DF("FBGpAmt", 0, "0")); string _rowFMtlItem = ""; bool _isUpdateErr = true; for (int i = 0; i < _maxRow; i++) { _rowFMtlItem = this.CZ_GetRowValue_DF("FMtlItem", "Name", i, ""); if (_rowFMtlItem == Val_FMtlItem_Base) { this.View.Model.SetValue("FBasePrice", _FBGpAmt, i); this.View.InvokeFieldUpdateService("FBasePrice", i); _isUpdateErr = false; break; } } if (_isUpdateErr) { this.View.ShowErrMessage("产品组成 可能没有本体行", "错误:未成功更新产品组成 本体 基本单价"); } else { this.View.ShowMessage("产品组成 本体 基本单价 已更新"); } }
public override void AfterEntryBarItemClick(AfterBarItemClickEventArgs e) { base.AfterEntryBarItemClick(e); string key = e.BarItemKey.ToUpperInvariant(); switch (key) { case "ORA_TBDELV": //ora_tbDelv DynamicObject rowData; int rowIndex = -1; this.Model.TryGetEntryCurrentRow("FEntity", out rowData, out rowIndex); if (rowIndex == -1) { this.View.ShowWarnningMessage("未选中明细表中的行!"); return; } Act_ShowDeliverForm(rowIndex); break; } }