ziwen 2 years ago
parent
commit
d7586c602a
1 changed files with 17 additions and 0 deletions
  1. 17 0
      controller/contract/register.go

+ 17 - 0
controller/contract/register.go

@@ -421,6 +421,23 @@ func (rg *RegisterController) Add(c *gin.Context) {
 			resp.FailMsg("删除预到款记录失败", "Err:"+e.Error(), c)
 			return
 		}
+
+		for i := 0; i < len(serviceAmountList); i++ {
+			// 合同服务
+			t := serviceAmountList[i]
+			tmp := &fms.ContractServiceAmount{
+				ContractRegisterId: ob.ContractRegisterId,
+				ProductId:          t.ProductId,
+				ServiceAmount:      t.ServiceAmount,
+				CurrencyUnit:       t.CurrencyUnit,
+			}
+
+			if e := tmp.Create(); e != nil {
+				resp.FailData("日期格式有误", "Err:"+e.Error(), c)
+				return
+			}
+		}
+
 		// 校验金额-是否修改状态
 		go fmsService.CheckContractRegisterAmount(ob.ContractRegisterId)