|
@@ -110,24 +110,39 @@ func (rg *ContractController) SearchList(c *gin.Context) {
|
|
|
contractTypeKey = fms.ContractTypeAgentPay
|
|
|
}
|
|
|
|
|
|
- respList = append(respList, &crm.ContractSearchListResp{
|
|
|
- ContractId: list[i].ContractId,
|
|
|
- ContractCode: list[i].ContractCode,
|
|
|
- ProductId: list[i].ProductId,
|
|
|
- CompanyName: list[i].CompanyName,
|
|
|
- RelateContractCode: payContractCodeMap[list[i].ContractId],
|
|
|
- ActualCompanyName: payCompanyMap[list[i].ContractId],
|
|
|
- SellerId: list[i].SellerId,
|
|
|
- SellerName: list[i].SellerName,
|
|
|
- ContractTypeKey: contractTypeKey,
|
|
|
- ContractType: contractType,
|
|
|
- Price: list[i].Price,
|
|
|
- StartDate: utils.TimeTransferString(utils.FormatDate, list[i].StartDate),
|
|
|
- EndDate: utils.TimeTransferString(utils.FormatDate, list[i].EndDate),
|
|
|
+ respItem := &crm.ContractSearchListResp{
|
|
|
+ ContractId: list[i].ContractId,
|
|
|
+ ContractCode: list[i].ContractCode,
|
|
|
+ ProductId: list[i].ProductId,
|
|
|
+ CompanyName: list[i].CompanyName,
|
|
|
+ RelateContractCode: payContractCodeMap[list[i].ContractId],
|
|
|
+ ActualCompanyName: payCompanyMap[list[i].ContractId],
|
|
|
+ SellerId: list[i].SellerId,
|
|
|
+ SellerName: list[i].SellerName,
|
|
|
+ ContractTypeKey: contractTypeKey,
|
|
|
+ ContractType: contractType,
|
|
|
+ ContractBusinessTypeInt: 0,
|
|
|
+ Price: list[i].Price,
|
|
|
+ StartDate: utils.TimeTransferString(utils.FormatDate, list[i].StartDate),
|
|
|
+ EndDate: utils.TimeTransferString(utils.FormatDate, list[i].EndDate),
|
|
|
ActualPayCompanies: businessPayMap[list[i].ContractId],
|
|
|
- })
|
|
|
- }
|
|
|
+ }
|
|
|
+ if list[i].ContractBusinessType == crm.ContractTypePayment {
|
|
|
+ respItem.ContractBusinessTypeInt = 2
|
|
|
+ }else {
|
|
|
+ respItem.ContractBusinessTypeInt = 1
|
|
|
+ }
|
|
|
+ if list[i].ContractType == "新签合同"{
|
|
|
+ respItem.ContractTypeInt = 1
|
|
|
+ } else if list[i].ContractType == "续约合同"{
|
|
|
+ respItem.ContractTypeInt = 2
|
|
|
+ } else if list[i].ContractType == "补充协议"{
|
|
|
+ respItem.ContractTypeInt = 3
|
|
|
+ }
|
|
|
+ respList = append(respList, respItem)
|
|
|
|
|
|
+ }
|
|
|
+
|
|
|
page.SetTotal(total)
|
|
|
baseData := new(base.BaseData)
|
|
|
baseData.SetPage(page)
|