Commit d732cb47 authored by Alex朱枝文's avatar Alex朱枝文

续签缴费申请-出生日期-裁剪成短的

parent efbe5719
...@@ -125,7 +125,8 @@ extension YHHKVisaRenewalApplicationVC { ...@@ -125,7 +125,8 @@ extension YHHKVisaRenewalApplicationVC {
} }
self.copyToPasteBoard(person.file_num, message: "已复制临时档案号") self.copyToPasteBoard(person.file_num, message: "已复制临时档案号")
})) }))
paymentMembers.append(.subInfo("申请人出生日期:", "\(person.birthday)", nil)) let dateString = self.getShortDate(person.birthday)
paymentMembers.append(.subInfo("申请人出生日期:", "\(dateString)", nil))
paymentMembers.append(.subInfo("缴费金额:", "\(person.fee_money)", nil, .bottom)) paymentMembers.append(.subInfo("缴费金额:", "\(person.fee_money)", nil, .bottom))
} }
...@@ -154,6 +155,18 @@ extension YHHKVisaRenewalApplicationVC { ...@@ -154,6 +155,18 @@ extension YHHKVisaRenewalApplicationVC {
} }
} }
private func getShortDate(_ originalDate: String) -> String {
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
if let date = formatter.date(from: originalDate) {
formatter.dateFormat = "yyyy-MM-dd"
let result = formatter.string(from: date)
return result
} else {
return originalDate
}
}
private func showAlertView(confirmBlock: (() -> Void)?) { private func showAlertView(confirmBlock: (() -> Void)?) {
let alert = YHVisaRenewalPayConfirmingPresenceAlertView.alertView() let alert = YHVisaRenewalPayConfirmingPresenceAlertView.alertView()
alert.confirmBlock = { alert.confirmBlock = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment