Example #1
0
        static void RegisterProductInStoreForm()
        {
            var model = new FormModel
            {
                Title         = "成品入库",
                MainObject    = "/MainSystem/B3Butchery/BO/ProductInStore",
                DisplayFields = new[] {
                    new FieldDesc {
                        Name = "AccountingUnit_ID", Title = "会计单位", DataKind = B3FrameworksConsts.DataSources.授权会计单位, DisplayField = "AccountingUnit_Name"
                    },
                    new FieldDesc {
                        Name = "Department_ID", Title = "部门", DataKind = B3FrameworksConsts.DataSources.授权部门, DisplayField = "Department_Name"
                    },
                    new FieldDesc {
                        Name = "Employee_ID", Title = "经办人", DataKind = B3FrameworksConsts.DataSources.授权员工, DisplayField = "Employee_Name"
                    },
                    new FieldDesc {
                        Name = "Store_ID", Title = "仓库", DataKind = B3FrameworksConsts.DataSources.授权仓库, DisplayField = "Store_Name"
                    },
                    new FieldDesc {
                        Name = "InStoreType_ID", Title = "入库类型", DataKind = B3ButcheryDataSource.屠宰分割入库类型, DisplayField = "InStoreType_Name"
                    },
                    new FieldDesc {
                        Name = "InStoreDate", Title = "入库日期", Widget = "datetime"
                    },
                    new FieldDesc {
                        Name = "CheckEmployee_ID", Title = "验收人", DataKind = B3FrameworksConsts.DataSources.授权员工, DisplayField = "CheckEmployee_Name"
                    },
                    new FieldDesc {
                        Name = "CheckDate", Title = "验收日期"
                    },
                    new FieldDesc {
                        Name = "ProductInStoreTemplate_ID", Title = "成品入库模板", DisplayField = "ProductInStoreTemplate_Name", DataKind = B3ButcheryDataSource.成品入库模板
                    },
                },
                ActionRpc = CUSASK + "/Actions_/ProductInStoreAction/FormActions",
                ActionBar = "Save SaveAndNew Prev Next LoadDetail ReferToCreate"
            };
            var loadDetail = new ActionDesc {
                Flags = FormModel.ActionFlags.Save, Name = "LoadDetail", Title = "加载明细"
            };
            var referToCreate = new ActionDesc {
                Flags = "", Name = "ReferToCreate", Title = "参照新建"
            };

            model.Actions.Add(loadDetail);
            model.Actions.Add(referToCreate);
            var detail = new CollectionModel
            {            /*:{生产日期}、{生产计划号}、{存货名称}、{存货编码}、{规格}、{主数量}、{辅数量}和{备注};*/
                Title         = "明细清单",
                PropertyName  = "Details",
                ItemType      = "/MainSystem/B3Butchery/BO/ProductInStore_Detail",
                DisplayFields = new[] {
                    new FieldDesc {
                        Name = "ProductionDate", Title = "生产日期"
                    },
                    new FieldDesc {
                        Name = "Goods_ID", Title = "存货名称", DisplayField = "Goods_Name", DataKind = B3UnitedInfosConsts.DataSources.存货
                    },
                    new FieldDesc {
                        Name = "Goods_Code", Title = "存货编码"
                    },
                    new FieldDesc {
                        Name = "Goods_Spec", Title = "规格"
                    },
                    new FieldDesc {
                        Name = "Number", Title = "主数量"
                    },
                    new FieldDesc {
                        Name = "SecondNumber", Title = "辅数量"
                    },
                    new FieldDesc {
                        Name = "Remark", Title = "备注"
                    }
                },
                ItemFormat = "存货名称: [Goods_Name]\n存货编码: [Goods_Code]\n规格: [Goods_Spec]\n生产计划号: [ProductPlan_ID]\n主数量: [Number]\n辅数量: [SecondNumber]\n备注: [Remark]",
                ActionBar  = "New"
            };

            model.Collections.Add(detail);

            FormModel.Register(CUSASK + "/ProductInStoreAction/ProductInStoreEdit", model);
        }
Example #2
0
        static void RegisterProductNoticeForm()
        {
            var model = new FormModel
            {
                Title         = "生产通知单",
                MainObject    = "/MainSystem/B3Butchery/BO/ProductNotice",
                DisplayFields = new[] {
                    new FieldDesc {
                        Name = "AccountingUnit_ID", Title = "会计单位", DataKind = B3FrameworksConsts.DataSources.授权会计单位, DisplayField = "AccountingUnit_Name"
                    },
                    new FieldDesc {
                        Name = "Department_ID", Title = "部门", DataKind = B3FrameworksConsts.DataSources.授权部门, DisplayField = "Department_Name"
                    },
                    new FieldDesc {
                        Name = "Employee_ID", Title = "业务员", DataKind = B3FrameworksConsts.DataSources.授权员工, DisplayField = "Employee_Name"
                    },
                    new FieldDesc {
                        Name = "ProductionUnit_ID", Title = "生产单位", DataKind = B3ProduceUnitedInfosDataSources.生产单位全部, DisplayField = "ProductionUnit_Name"
                    },
                    new FieldDesc {
                        Name = "Customer_ID", Title = "客户", DataKind = "B3Sale_客户", DisplayField = "Customer_Name"
                    },
                    new FieldDesc {
                        Name = "CustomerAddress", Title = "地址"
                    },
                    new FieldDesc {
                        Name = "Date", Title = "日期"
                    },
                },
                ActionRpc = CUSASK + "/Actions_/ProductNoticeAction/FormActions",
                ActionBar = "Save Prev Next LoadDetail Predict ReferToCreate Check"
            };
            var loadDetail = new ActionDesc {
                Flags = FormModel.ActionFlags.Save, Name = "LoadDetail", Title = "加载明细"
            };
            var referToCreate = new ActionDesc {
                Flags = "", Name = "ReferToCreate", Title = "参照新建"
            };
            var predict = new ActionDesc {
                Flags = "", Name = "Predict", Title = "载入预报"
            };
            var check = new ActionDesc {
                Flags = "", Name = FormActionNames.Check, Title = "审核"
            };

            model.Actions.Add(loadDetail);
            model.Actions.Add(referToCreate);
            model.Actions.Add(predict);
            model.Actions.Add(check);

            var detail = new CollectionModel
            {
                Title         = "单据明细",
                PropertyName  = "Details",
                ItemType      = "/MainSystem/B3Butchery/BO/ProductNotice_Detail",
                DisplayFields = new[] {
                    new FieldDesc {
                        Name = "DmoID", Title = "来源单据号"
                    },
                    new FieldDesc {
                        Name = "Goods_ID", Title = "存货名称", DisplayField = "Goods_Name", DataKind = B3UnitedInfosConsts.DataSources.存货
                    },
                    new FieldDesc {
                        Name = "Goods_Code", Title = "存货编码"
                    },
                    new FieldDesc {
                        Name = "Goods_Spec", Title = "规格"
                    },
                    new FieldDesc {
                        Name = "Number", Title = "主数量"
                    },
                    new FieldDesc {
                        Name = "SecondNumber", Title = "辅数量"
                    },
                    new FieldDesc {
                        Name = "Remark", Title = "备注"
                    }
                },
                ItemFormat = "来源单据号:[DmoID]\n存货名称: [Goods_Name]\n存货编码: [Goods_Code] 规格: [Goods_Spec]\n主数量: [Number]\n辅数量: [SecondNumber]\n备注: [Remark]",
                ActionBar  = "New"
            };

            model.Collections.Add(detail);
            FormModel.Register(CUSASK + "/ProductNoticeAction/ProductNoticeEdit", model);
        }
Example #3
0
        static void RegisterProduceOutputForm()
        {
            var model = new FormModel
            {
                Title         = "产出单",
                MainObject    = "/MainSystem/B3Butchery/BO/ProduceOutput",
                DisplayFields = new[] {
                    new FieldDesc {
                        Name = "Time", Title = "时间"
                    },
                    new FieldDesc {
                        Name = "PlanNumber_ID", Title = "计划号", DataKind = B3ButcheryDataSource.计划号, DisplayField = "PlanNumber_Name"
                    },
                    new FieldDesc {
                        Name = "AccountingUnit_ID", Title = "会计单位", DataKind = B3FrameworksConsts.DataSources.授权会计单位, DisplayField = "AccountingUnit_Name"
                    },
                    new FieldDesc {
                        Name = "Department_ID", Title = "部门", DataKind = B3FrameworksConsts.DataSources.授权部门, DisplayField = "Department_Name"
                    },
                    new FieldDesc {
                        Name = "Employee_ID", Title = "经办人", DataKind = B3FrameworksConsts.DataSources.授权员工, DisplayField = "Employee_Name"
                    },
                    new FieldDesc {
                        Name = "ProductLinkTemplate_ID", Title = "生产环节模板", DataKind = B3ButcheryDataSource.生产环节模板, DisplayField = "ProductLinkTemplate_Name"
                    },
                },
                ActionRpc = CUSASK + "/Actions_/ProduceOutputAction/FormActions",
                ActionBar = "Save SaveAndNew Prev Next LoadDetail ReferToCreate"
            };
            var loadDetail = new ActionDesc {
                Flags = FormModel.ActionFlags.Save, Name = "LoadDetail", Title = "加载明细"
            };
            var referToCreate = new ActionDesc {
                Flags = "", Name = "ReferToCreate", Title = "参照新建"
            };

            model.Actions.Add(loadDetail);
            model.Actions.Add(referToCreate);
            var detail = new CollectionModel
            {            /*{存货名称}、{存货编码}、{规格}、{主数量}、{辅数量}和{备注}*/
                Title         = "明细清单",
                PropertyName  = "Details",
                ItemType      = "/MainSystem/B3Butchery/BO/ProduceOutput_Detail",
                DisplayFields = new[] {
                    new FieldDesc {
                        Name = "Goods_ID", Title = "存货名称", DisplayField = "Goods_Name", DataKind = B3UnitedInfosConsts.DataSources.存货
                    },
                    new FieldDesc {
                        Name = "Goods_Code", Title = "存货编码"
                    },
                    new FieldDesc {
                        Name = "Goods_Spec", Title = "规格"
                    },
                    new FieldDesc {
                        Name = "Number", Title = "主数量"
                    },
                    new FieldDesc {
                        Name = "SecondNumber2", Title = "辅单位数量Ⅱ"
                    },
                    new FieldDesc {
                        Name = "Remark", Title = "备注"
                    }
                },
                ItemFormat = "存货名称: [Goods_Name]\n存货编码: [Goods_Code]\n规格: [Goods_Spec]\n主数量: [Number]\n辅单位数量Ⅱ: [SecondNumber2]\n备注: [Remark]",
                ActionBar  = "New"
            };

            model.Collections.Add(detail);
            //detail.DynamicUpdates.Add("$Number $Goods_SecondUnitRatio * $Goods_MainUnitRatio / $SecondNumber2 = ");
            //$Number=$SecondNumber2*$Goods_SecondUnitII_MainUnitRatio/$Goods_SecondUnitII_SecondUnitRatio
            detail.DynamicUpdates.Add("$SecondNumber2 $Goods_SecondUnitII_MainUnitRatio * $Goods_SecondUnitII_SecondUnitRatio / $Number = ");
            FormModel.Register(CUSASK + "/ProduceOutputAction/ProduceOutputEdit", model);
        }