Commit e16c7363 authored by pete谢兆麟's avatar pete谢兆麟

签字逻辑修改

parent 2622bc9d
...@@ -313,7 +313,7 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD ...@@ -313,7 +313,7 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 { if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHGCDocumentPromptTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHGCDocumentPromptTableViewCell.self)
cell.type = self.viewModel.mainModel?.doc_type ?? 0 cell.type = self.viewModel.mainModel
cell.backgroundColor = .clear cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear cell.contentView.backgroundColor = .clear
return cell return cell
......
...@@ -16,7 +16,7 @@ class YHGCDocumentPromptTableViewCell: UITableViewCell { ...@@ -16,7 +16,7 @@ class YHGCDocumentPromptTableViewCell: UITableViewCell {
var titleLabel: UILabel! var titleLabel: UILabel!
var subTitleLabel: UILabel! var subTitleLabel: UILabel!
var link: String = "" var link: String = ""
var type: Int = 0 { var type: YHMySignatureDetailModel? {
didSet { didSet {
updatePrompt() updatePrompt()
} }
...@@ -92,8 +92,8 @@ class YHGCDocumentPromptTableViewCell: UITableViewCell { ...@@ -92,8 +92,8 @@ class YHGCDocumentPromptTableViewCell: UITableViewCell {
label.font = UIFont.PFSC_R(ofSize: 12) label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.labelTextColor2 label.textColor = UIColor.labelTextColor2
label.numberOfLines = 0 label.numberOfLines = 0
let a: ASAttributedString = .init("请如实填写,以下补充信息将使用于生成赴港同意书\n工作单位名称", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2)) let a: ASAttributedString = .init("请如实填写,以下补充信息将使用于生成赴港同意书\n单位名称", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
let aa: ASAttributedString = .init("需要与盖章公司名称一致", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor)) let aa: ASAttributedString = .init("需要与盖章单位名称一致", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
label.attributed.text = a + aa label.attributed.text = a + aa
return label return label
}() }()
...@@ -108,19 +108,51 @@ class YHGCDocumentPromptTableViewCell: UITableViewCell { ...@@ -108,19 +108,51 @@ class YHGCDocumentPromptTableViewCell: UITableViewCell {
func updatePrompt() { func updatePrompt() {
// 1000-代理委托书,1001-同意书,1002-声明书 // 1000-代理委托书,1001-同意书,1002-声明书
guard let dataSource = type else { return }
let type = dataSource.docType // 1000-代理委托书; 1001-赴港同意书; 1002-声明书
let state = dataSource.docStatus // 1003-待签署; 1004-已签署; 1005-待审核; 1006-已驳回; 1007-已完成
if type == 1000 { if type == 1000 {
let a: ASAttributedString = .init("请主申请人", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2)) if state == 1000 || state == 1001 || state == 1002 || state == 1003 {
let aa: ASAttributedString = .init("点击签署或上传已签章文件", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor)) let a: ASAttributedString = .init("请主申请人", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a + aa let aa: ASAttributedString = .init("点击签署或上传已签署文件", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
subTitleLabel.attributed.text = a + aa
} else if state == 1004 || state == 1005 || state == 1006 {
let a: ASAttributedString = .init("审核中,请您耐心等待~", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a
} else {
let a: ASAttributedString = .init("您已完成签署,预祝您早日获批!", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a
}
} else if type == 1001 { } else if type == 1001 {
let a: ASAttributedString = .init("请主申请人", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2)) if state == 1000 || state == 1001 || state == 1002 {
let aa: ASAttributedString = .init("点击签署或上传已签章文件", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor)) let a: ASAttributedString = .init("请主申请人", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a + aa let aa: ASAttributedString = .init("补充", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("信息以便进行后续签章", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a + aa + aaa
} else if state == 1003 {
let a: ASAttributedString = .init("请主申请人", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
let aa: ASAttributedString = .init("上传已签章文件", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
subTitleLabel.attributed.text = a + aa
} else if state == 1004 || state == 1005 || state == 1006 {
let a: ASAttributedString = .init("审核中,请您耐心等待~", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a
} else {
let a: ASAttributedString = .init("您已完成签章,预祝您早日获批!", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a
}
} else { } else {
let a: ASAttributedString = .init("请您尽快核对文本内容,如需修改,可进行在线编辑\n如内容无误,请主申请人", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2)) if state == 1000 || state == 1001 || state == 1002 || state == 1003{
let aa: ASAttributedString = .init("点击签署或上传已签署文件", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor)) let a: ASAttributedString = .init("请您尽快核对文本内容,如需修改,可进行在线编辑\n如内容无误,请主申请人", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a + aa let aa: ASAttributedString = .init("点击签署或上传已签署文件", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
subTitleLabel.attributed.text = a + aa
} else if state == 1004 || state == 1005 || state == 1006 {
let a: ASAttributedString = .init("审核中,请您耐心等待~", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a
} else {
let a: ASAttributedString = .init("您已完成签署,预祝您早日获批!", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
subTitleLabel.attributed.text = a
}
} }
} }
} }
......
...@@ -17,8 +17,8 @@ class YHGCSignatureAddViewModel: YHBaseViewModel { ...@@ -17,8 +17,8 @@ class YHGCSignatureAddViewModel: YHBaseViewModel {
func getBaseDataSource(_ isShowPrompt: Bool) -> [YHSectionWorkExperienceModel] { func getBaseDataSource(_ isShowPrompt: Bool) -> [YHSectionWorkExperienceModel] {
let item = YHWorkExperienceModel(id: .id1, isNeed: true, title: "档案所在单位", isUserKeyBoard: true, prompts: "请输入", message: position.archives_location, isShowPrompts: isShowPrompt, alertMessage:"请输入") let item = YHWorkExperienceModel(id: .id1, isNeed: true, title: "档案所在单位", isUserKeyBoard: true, prompts: "请输入", message: position.archives_location, isShowPrompts: isShowPrompt, alertMessage:"请输入")
let item1 = YHWorkExperienceModel(id: .id2, isNeed: true, title: "工作单位名称", isUserKeyBoard: true, prompts: "请选择", message: position.unit_name, isShowPrompts: isShowPrompt, alertMessage:"请选择") let item1 = YHWorkExperienceModel(id: .id2, isNeed: true, title: "单位名称", isUserKeyBoard: true, prompts: "请选择", message: position.unit_name, isShowPrompts: isShowPrompt, alertMessage:"请选择")
let item2 = YHWorkExperienceModel(id: .id3, isNeed: true, title: "工作单位地址", isUserKeyBoard: true, prompts: "请选择", message: position.unit_address, isShowPrompts: isShowPrompt, alertMessage:"请输入") let item2 = YHWorkExperienceModel(id: .id3, isNeed: true, title: "单位地址", isUserKeyBoard: true, prompts: "请选择", message: position.unit_address, isShowPrompts: isShowPrompt, alertMessage:"请输入")
let item3 = YHWorkExperienceModel(id: .id4, isNeed: true, title: "负责人电话", isUserKeyBoard: true, prompts: "请输入", message: position.phone, isShowPrompts: isShowPrompt, alertMessage:"请输入") let item3 = YHWorkExperienceModel(id: .id4, isNeed: true, title: "负责人电话", isUserKeyBoard: true, prompts: "请输入", message: position.phone, isShowPrompts: isShowPrompt, alertMessage:"请输入")
let item4 = YHWorkExperienceModel(id: .id5, isNeed: false, title: "公司邮箱", isUserKeyBoard: true, prompts: "请输入", message: position.email, isShowPrompts: isShowPrompt, alertMessage:"请输入") let item4 = YHWorkExperienceModel(id: .id5, isNeed: false, title: "公司邮箱", isUserKeyBoard: true, prompts: "请输入", message: position.email, isShowPrompts: isShowPrompt, alertMessage:"请输入")
......
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