|
|
@@ -171,6 +171,11 @@ func (s CtrContractInvoiceService) Add(ctx context.Context, req *model.CtrContra
|
|
|
InvoiceCode: req.InvoiceCode,
|
|
|
ActualInvoiceDate: req.ActualInvoiceDate,
|
|
|
CourierCode: req.CourierCode,
|
|
|
+ TaxNo: req.TaxNo,
|
|
|
+ Address: req.Address,
|
|
|
+ Phone: req.Phone,
|
|
|
+ Bank: req.Bank,
|
|
|
+ AccountNo: req.AccountNo,
|
|
|
Remark: req.Remark,
|
|
|
CreatedBy: int(s.userInfo.Id),
|
|
|
CreatedName: s.userInfo.NickName,
|
|
|
@@ -273,8 +278,23 @@ func (s CtrContractInvoiceService) Update(ctx context.Context, req *model.CtrCon
|
|
|
if req.CourierCode != "" {
|
|
|
toupdate["courier_code"] = req.CourierCode
|
|
|
}
|
|
|
+ if req.TaxNo != "" {
|
|
|
+ toupdate["tax_no"] = req.TaxNo
|
|
|
+ }
|
|
|
+ if req.Address != "" {
|
|
|
+ toupdate["address"] = req.Address
|
|
|
+ }
|
|
|
+ if req.Phone != "" {
|
|
|
+ toupdate["phone"] = req.Phone
|
|
|
+ }
|
|
|
+ if req.Bank != "" {
|
|
|
+ toupdate["bank"] = req.Bank
|
|
|
+ }
|
|
|
+ if req.AccountNo != "" {
|
|
|
+ toupdate["account_no"] = req.AccountNo
|
|
|
+ }
|
|
|
if req.Remark != nil {
|
|
|
- toupdate["remark"] = *req.Remark
|
|
|
+ toupdate["phone"] = *req.Remark
|
|
|
}
|
|
|
if len(toupdate) != 0 {
|
|
|
toupdate["updated_by"] = int(s.userInfo.Id)
|
|
|
@@ -393,6 +413,14 @@ func (s CtrContractInvoiceService) InvoiceApply(ctx context.Context, req *model.
|
|
|
strconv.Itoa(invoice.Id),
|
|
|
strconv.Itoa(s.userInfo.Id),
|
|
|
}, ":")
|
|
|
+ bankAndAccount := invoice.Bank
|
|
|
+ if invoice.AccountNo != "" {
|
|
|
+ if bankAndAccount == "" {
|
|
|
+ bankAndAccount += invoice.AccountNo
|
|
|
+ } else {
|
|
|
+ bankAndAccount += "、" + invoice.AccountNo
|
|
|
+ }
|
|
|
+ }
|
|
|
_, err = workflowSrv.StartProcessInstance(bizCode, "31", "", &workflow.StartProcessInstanceRequest{
|
|
|
ProcessCode: &InvoiceApplyProcessCode,
|
|
|
FormComponentValues: []*workflow.StartProcessInstanceRequestFormComponentValues{
|
|
|
@@ -437,6 +465,26 @@ func (s CtrContractInvoiceService) InvoiceApply(ctx context.Context, req *model.
|
|
|
Name: utils.String("开票金额(元)"),
|
|
|
Value: utils.String(strconv.FormatFloat(invoice.InvoiceAmount, 'f', 2, 64)),
|
|
|
},
|
|
|
+ {
|
|
|
+ Id: utils.String("TextField_1Z4M0MOV8T9C0"),
|
|
|
+ Name: utils.String("税号"),
|
|
|
+ Value: utils.String(invoice.TaxNo),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ Id: utils.String("TextField_Z1KCAYC186O0"),
|
|
|
+ Name: utils.String("地址、电话"),
|
|
|
+ Value: utils.String(invoice.Address + "、" + invoice.Phone),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ Id: utils.String("TextField_212KJ2MPKX340"),
|
|
|
+ Name: utils.String("开户行、账号"),
|
|
|
+ Value: utils.String(bankAndAccount),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ Id: utils.String("TextField_7OR3HRJCW100"),
|
|
|
+ Name: utils.String("备注"),
|
|
|
+ Value: utils.String(invoice.Remark),
|
|
|
+ },
|
|
|
},
|
|
|
})
|
|
|
if err != nil {
|