换行前:
换行后
本人是计算机小白,不太懂,不知道是不是因为整出来的代码格式不对导致的,希望大佬们帮忙看看。下面的代码是根据 JeffreyChen 大佬提供的代码整的,感谢大佬!
.action{ $type := index . "类型" } .action{ $invoiceDate := index . "开发票日期" } .action{ if $invoiceDate } .action{ if eq $type "合约80%" } .action{ $newInvoiceDate := ($invoiceDate).AddDate 0 2 0 } .action{ $newInvoiceDateString := $newInvoiceDate.Format "2006-01-02" } 合约80%: .action{ $newInvoiceDateString } .action{ else if eq $type "合约100%" } .action{ $newInvoiceDate := ($invoiceDate).AddDate 0 2 0 } .action{ $newInvoiceDateString := $newInvoiceDate.Format "2006-01-02" } 合约100%: .action{ $newInvoiceDateString } .action{ else if eq $type "零星" } .action{ $newInvoiceDate := ($invoiceDate).AddDate 0 0 120 } .action{ $newInvoiceDateString := $newInvoiceDate.Format "2006-01-02" } 零星: .action{ $newInvoiceDateString } .action{ else } 类型不匹配。 .action{ end } .action{ else } 未开发票 .action{ end }
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于