123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- package dto
- import (
- models "ERP_storage/models/ContractReview"
- )
- // ContractReviewPageReq 列表或者搜索使用结构体
- type ContractReviewPageReq struct {
- Pagination `search:"-"`
- T_name string `form:"T_name" search:"type:contains;column:t_name;table:contract_review"` // 名称
- T_submit string `form:"T_submit" search:"type:exact;column:t_submit;table:contract_review"` // 负责人
- T_audit string `form:"T_audit" search:"type:exact;column:t_audit;table:contract_review"` // 审核状态
- ContractReviewOrder
- }
- type ContractReviewOrder struct {
- IdOrder string `search:"type:order;column:id;table:contract_review" form:"T_id" default:"desc"`
- }
- func (m *ContractReviewPageReq) GetNeedSearch() interface{} {
- return *m
- }
- type ContractReviewSubmitUserPageReq struct {
- T_type string `form:"T_type" search:"-"` // 类型 财务Finance 总经理Manager
- }
- type ContractReviewSubmitUserPageRes struct {
- T_submit string
- T_name string
- }
- // ContractReviewInsertReq 增使用的结构体
- type ContractReviewInsertReq struct {
- T_name string `form:"T_name" vd:"len($)>0;msg:'项目名称不能为空'"` // 项目名称
- T_address string `form:"T_address"` // 项目地址
- T_submit string `json:"T_submit"` // 合同负责人
- T_predict_sign_time string `form:"T_predict_sign_time"` // 预计签约时间
- T_money float64 `form:"T_money"` // 总金额
- T_have_brokerage_fee bool `form:"T_have_brokerage_fee"` // 是否有居间费
- T_brokerage_fee_money float64 `form:"T_brokerage_fee_money"` // 是否有居间费
- T_discount_money float64 `form:"T_discount_money"` // 最终优惠金额
- ServiceItems string `json:"ServiceItems"` // 服务内容
- ServiceItemList []models.ContractReviewServiceItem `json:"ServiceItemList"` // 服务内容
- }
- func (s *ContractReviewInsertReq) Generate(model *models.ContractReview) {
- model.T_name = s.T_name
- model.T_address = s.T_address
- model.T_submit = s.T_submit
- model.T_predict_sign_time = s.T_predict_sign_time
- model.T_money = s.T_money
- model.T_have_brokerage_fee = s.T_have_brokerage_fee
- model.T_brokerage_fee_money = s.T_brokerage_fee_money
- model.T_discount_money = s.T_discount_money
- model.T_audit = 1
- model.T_State = 1
- }
- // ContractReviewUpdateReq 改使用的结构体
- type ContractReviewUpdateReq struct {
- T_id int `form:"T_id" example:"1"`
- T_name string `form:"T_name" vd:"len($)>0;msg:'项目名称不能为空'"` // 项目名称
- T_address string `form:"T_address"` // 项目地址
- T_predict_sign_time string `form:"T_predict_sign_time"` // 预计签约时间
- T_money float64 `form:"T_money"` // 总金额
- T_have_brokerage_fee bool `form:"T_have_brokerage_fee"` // 是否有居间费
- T_brokerage_fee_money float64 `form:"T_brokerage_fee_money"` // 居间费金额
- T_discount_money float64 `form:"T_discount_money"` // 最终优惠金额
- ServiceItems string `json:"ServiceItems"` // 服务内容
- ServiceItemList []models.ContractReviewServiceItem `json:"ServiceItemList"` // 服务内容
- }
- func (s *ContractReviewUpdateReq) Generate(model *models.ContractReview) {
- model.Id = s.T_id
- model.T_name = s.T_name
- model.T_address = s.T_address
- model.T_predict_sign_time = s.T_predict_sign_time
- model.T_money = s.T_money
- model.T_have_brokerage_fee = s.T_have_brokerage_fee
- model.T_brokerage_fee_money = s.T_brokerage_fee_money
- model.T_discount_money = s.T_discount_money
- }
- func (s *ContractReviewUpdateReq) GetId() interface{} {
- return s.T_id
- }
- // ContractReviewGetReq 获取单个的结构体
- type ContractReviewGetReq struct {
- T_id int `form:"T_id"`
- }
- func (s *ContractReviewGetReq) GetId() interface{} {
- return s.T_id
- }
- // ContractReviewDeleteReq 删除的结构体
- type ContractReviewDeleteReq struct {
- T_id int `form:"T_id"`
- }
- func (s *ContractReviewDeleteReq) GetId() interface{} {
- return s.T_id
- }
- type ContractReviewAuditReq struct {
- T_id int `form:"T_id" example:"1"`
- T_audit int `form:"T_audit" vd:"$>0;msg:'项目名称不能为空'"` // 审核 财务通过3 财务驳回4 总经理通过5 总经理驳回6
- T_approval_opinion string `form:"T_approval_opinion"` // 审批意见
- }
- func (s *ContractReviewAuditReq) GetId() interface{} {
- return s.T_id
- }
|