ziwen 1 年之前
父节点
当前提交
1ad474f4ab
共有 2 个文件被更改,包括 21 次插入1 次删除
  1. 19 0
      controller/contract/pre_register.go
  2. 2 1
      controller/contract/register.go

+ 19 - 0
controller/contract/pre_register.go

@@ -330,6 +330,13 @@ func (rg *PreRegisterController) Add(c *gin.Context) {
 			pp.SellerGroupName = sellerItem.GroupName
 			pp.SellerTeamId = sellerItem.TeamId
 			pp.SellerTeamName = sellerItem.TeamName
+
+			pp.PaymentSellerId = sellerItem.SellerId
+			pp.PaymentSellerName = sellerItem.SellerName
+			pp.PaymentSellerGroupId = sellerItem.GroupId
+			pp.PaymentSellerGroupName = sellerItem.GroupName
+			pp.PaymentSellerTeamId = sellerItem.TeamId
+			pp.PaymentSellerTeamName = sellerItem.TeamName
 		} else {
 			//到款
 			pp.ArriveId = v.ContractInvoiceId
@@ -338,6 +345,18 @@ func (rg *PreRegisterController) Add(c *gin.Context) {
 			a, _ := strconv.ParseFloat(fmt.Sprintf("%.2f", pp.ArriveOriginAmount/rate), 64)
 			pp.ArriveAmount = a
 			pp.ArriveRemark = r.Remark
+
+			sellerItem := sellerMap[r.SellerId]
+			if sellerItem == nil {
+				resp.Fail("销售信息异常", c)
+				return
+			}
+			pp.PaymentSellerId = sellerItem.SellerId
+			pp.PaymentSellerName = sellerItem.SellerName
+			pp.PaymentSellerGroupId = sellerItem.GroupId
+			pp.PaymentSellerGroupName = sellerItem.GroupName
+			pp.PaymentSellerTeamId = sellerItem.TeamId
+			pp.PaymentSellerTeamName = sellerItem.TeamName
 		}
 
 		// 新增开票到款记录

+ 2 - 1
controller/contract/register.go

@@ -1767,7 +1767,7 @@ func (rg *RegisterController) Export(c *gin.Context) {
 			row3Title = append(row3Title, t)
 		}
 	}
-	paymentTitle := []string{"到款日", "到款金额", "套餐类型", "备注"}
+	paymentTitle := []string{"到款日", "到款金额", "套餐类型", "销售", "备注"}
 	for i := 0; i < maxPayment; i++ {
 		n := i + 1
 		for ii := range paymentTitle {
@@ -1939,6 +1939,7 @@ func (rg *RegisterController) Export(c *gin.Context) {
 					dataRow.AddCell().SetString(utils.TimeTransferString("2006/01/02", pyList[ib].InvoiceDate)) // 收款日
 					dataRow.AddCell().SetString(fmt.Sprint(pyList[ib].OriginAmount))                            // 收款金额
 					dataRow.AddCell().SetString(serviceProductIdMap[pyList[ib].ServiceProductId])               // 套餐类型
+					dataRow.AddCell().SetString(ivList[ib].SellerName)                                          // 销售名称
 					dataRow.AddCell().SetString(pyList[ib].Remark)                                              // 收款备注
 					continue
 				}