新单据支持预算

新单据支持预算

作者:


受控单据设置

表格中的选项由后端负责控制。说明文字中加新的单据类型名字,要在文件 apps/link/src/main/screens/projects/budget/budget-control/list/BudgetSourceBillList.tsx 的 490+行处添加。

表单中的预算项目

表单的中间件中加budgetEffect的中间件 trek/services/form-services/middlewares/entities/purchase-invoice/index.go

func GetMiddlewareCreators() []form_context.FormMiddlewareCreator {
	middlewareCreators := []form_context.FormMiddlewareCreator{
		budget_effects.NewBudgetEffectsMiddleware(),
	}

	return middlewareCreators
}

如果这个单据没有中间件,需要我们注册一个。 trek/services/form-services/middlewares/entities/index.go

func initMiddlewares() {
  entitiesMiddlewares[gen_en.EN_PurchaseInvoice] = purchase_invoice.GetMiddlewareCreators()
}

维度取值

apps/link/src/main/screens/projects/budget/budget-model/mapping/base/TreeData.ts