更新密码找回uniapp

This commit is contained in:
hero920103 committed 2026-11-16 17:22:50 +08:00
1 parent 7f9a66da0f
commit 3fdda89833
1304 files changed
+3503 -26132

No files matched your search

+3 -22
View File
@@ -15,20 +15,10 @@ import (
"server/pkg/identity"
)
// =============================================================
// CRM 招投标管理 - 招标方(Tender)
// =============================================================
//
// 状态机:0草稿 -> 1公告中 -> 2报名中 -> 3投标中 -> 4开标中 -> 5评标中 -> 6已定标 -> 7已归档
// 关联:定标 -> 中标供应商 -> 转合同
// =============================================================
// BackendCrmBiddingTenderController 招标方
type BackendCrmBiddingTenderController struct {
beego.Controller
}
// tenderPayload 创建/更新请求体
type tenderPayload struct {
TenderNo string `json:"tender_no"`
Title string `json:"title"`
@@ -57,7 +47,6 @@ type tenderPayload struct {
Remark string `json:"remark"`
}
// List GET /backend/crm/bidding/tender/list
func (c *BackendCrmBiddingTenderController) List() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
@@ -109,7 +98,6 @@ func (c *BackendCrmBiddingTenderController) List() {
})
}
// Detail GET /backend/crm/bidding/tender/detail/:id
func (c *BackendCrmBiddingTenderController) Detail() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
@@ -133,7 +121,6 @@ func (c *BackendCrmBiddingTenderController) Detail() {
pipelineOk(&c.Controller, row)
}
// Create POST /backend/crm/bidding/tender
func (c *BackendCrmBiddingTenderController) Create() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
@@ -202,7 +189,6 @@ func (c *BackendCrmBiddingTenderController) Create() {
pipelineOk(&c.Controller, map[string]interface{}{"id": id})
}
// Update PUT /backend/crm/bidding/tender/:id
func (c *BackendCrmBiddingTenderController) Update() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
@@ -285,7 +271,6 @@ func (c *BackendCrmBiddingTenderController) Update() {
pipelineOk(&c.Controller, map[string]interface{}{"id": row.ID})
}
// Delete DELETE /backend/crm/bidding/tender/:id
func (c *BackendCrmBiddingTenderController) Delete() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
@@ -329,7 +314,6 @@ func (c *BackendCrmBiddingTenderController) Delete() {
pipelineOk(&c.Controller, nil)
}
// Award POST /backend/crm/bidding/tender/:id/award 定标
func (c *BackendCrmBiddingTenderController) Award() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
@@ -347,7 +331,7 @@ func (c *BackendCrmBiddingTenderController) Award() {
WinnerSupplierName string `json:"winner_supplier_name"`
WinnerAmount float64 `json:"winner_amount"`
Announcement string `json:"announcement"`
ResultType int8 `json:"result_type"` // 1定标 2流标 3废标
ResultType int8 `json:"result_type"`
}
raw, _ := io.ReadAll(c.Ctx.Request.Body)
if err := json.Unmarshal(raw, &p); err != nil {
@@ -378,7 +362,6 @@ func (c *BackendCrmBiddingTenderController) Award() {
resultType = 1
}
// 写定标结果
result := models.TenantCrmBiddingTenderResult{
TenantID: tenantID,
TenderID: row.ID,
@@ -398,7 +381,6 @@ func (c *BackendCrmBiddingTenderController) Award() {
return
}
// 更新招标主表:状态 6已定标 + 锁定
row.Status = 6
row.Locked = 1
row.WinnerSupplierID = nilOrID(p.WinnerSupplierID)
@@ -417,7 +399,6 @@ func (c *BackendCrmBiddingTenderController) Award() {
pipelineOk(&c.Controller, map[string]interface{}{"result_id": result.ID})
}
// AwardToContract POST /backend/crm/bidding/tender/:id/contract 定标转合同
func (c *BackendCrmBiddingTenderController) AwardToContract() {
claims, err := pipelineClaims(&c.Controller)
if err != nil {
@@ -466,7 +447,7 @@ func (c *BackendCrmBiddingTenderController) AwardToContract() {
}
category := strings.TrimSpace(p.ContractCategory)
if category == "" {
category = "2" // 服务类
category = "2"
}
now := time.Now()
tenderID := row.ID
@@ -476,7 +457,7 @@ func (c *BackendCrmBiddingTenderController) AwardToContract() {
ContractNo: strings.TrimSpace(p.ContractNo),
ContractName: contractName,
ContractCategory: category,
OurRole: 1, // 我方为甲方
OurRole: 1,
PartyCount: 2,
OwnerUserID: row.OwnerUserID,
OwnerUserName: row.OwnerUserName,