SettlementInfo.cs 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using Newtonsoft.Json.Linq;
  11. using PTMedicalInsurance.Helper;
  12. namespace PTMedicalInsurance.Forms
  13. {
  14. public partial class SettlementInfo : Form
  15. {
  16. public SettlementInfo()
  17. {
  18. InitializeComponent();
  19. }
  20. public SettlementInfo(JObject jo)
  21. {
  22. InitializeComponent();
  23. JObject joSettlmentInfo = JObject.FromObject(jo["setlinfo"]);
  24. dtSettlmentDetail = (DataTable)jo["setldetail"].ToObject(typeof(DataTable));
  25. this.tbAdmCertType.Text = joSettlmentInfo["mdtrt_cert_type"].ToString();
  26. this.tbPsnCertType.Text = joSettlmentInfo["psn_cert_type"].ToString();
  27. this.tbPsnCertNO.Text = joSettlmentInfo["certno"].ToString();
  28. this.tbInsuType.Text = joSettlmentInfo["insutype"].ToString();
  29. this.tbPersonType.Text = joSettlmentInfo["psn_type"].ToString();
  30. this.tbMedType.Text = joSettlmentInfo["med_type"].ToString();
  31. this.tbSumamt.Text = joSettlmentInfo["medfee_sumamt"].ToString();
  32. this.tbFullOwnPay.Text = joSettlmentInfo["fulamt_ownpay_amt"].ToString();
  33. this.tbOverLimitOwnPay.Text = joSettlmentInfo["overlmt_selfpay"].ToString();
  34. this.tbPreSelfPay.Text = joSettlmentInfo["preselfpay_amt"].ToString();
  35. this.tbInScopyAmount.Text = joSettlmentInfo["inscp_scp_amt"].ToString();
  36. this.tbActualPayDeduLine.Text = joSettlmentInfo["act_pay_dedc"].ToString();
  37. this.tbInsuFundPay.Text = joSettlmentInfo["hifp_pay"].ToString();
  38. this.tbInsuFundPayRito.Text = joSettlmentInfo["pool_prop_selfpay"].ToString();
  39. this.tbCvlserv_pay.Text = joSettlmentInfo["cvlserv_pay"].ToString();
  40. this.tbHifes_pay.Text = joSettlmentInfo["hifes_pay"].ToString();
  41. this.tbHifmi_pay.Text = joSettlmentInfo["hifmi_pay"].ToString();
  42. this.tbWorkerLargeMedical.Text = joSettlmentInfo["hifob_pay"].ToString();
  43. this.tbAssian.Text = joSettlmentInfo["maf_pay"].ToString();
  44. this.tbOtherPay.Text = joSettlmentInfo["oth_pay"].ToString();
  45. this.tbFundPaySummat.Text = joSettlmentInfo["fund_pay_sumamt"].ToString();
  46. this.tbPsnSummat.Text = joSettlmentInfo["psn_part_amt"].ToString();
  47. this.tbPsnAccountPaySummat.Text = joSettlmentInfo["acct_pay"].ToString();
  48. this.tbPsnCashPay.Text = joSettlmentInfo["psn_cash_pay"].ToString();
  49. this.tbHospitalPartAmount.Text = joSettlmentInfo["hosp_part_amt"].ToString();
  50. this.tbBalc.Text = joSettlmentInfo["balc"].ToString();
  51. this.tbAccountMutualAidAmount.Text = joSettlmentInfo["acct_mulaid_pay"].ToString();
  52. this.tbClearingWay.Text = joSettlmentInfo["clr_way"].ToString();
  53. this.tbClearingType.Text = joSettlmentInfo["clr_type"].ToString();
  54. if (joSettlmentInfo.ContainsKey("exp_content"))
  55. {
  56. JToken jtExp = joSettlmentInfo["exp_content"];
  57. if ((jtExp.HasValues) && (jtExp is JObject))
  58. {
  59. JObject joExp = JObject.Parse(JsonHelper.getDestValue(joSettlmentInfo, "exp_content"));
  60. tbMedInsWalletBalance.Text = JsonHelper.getDestValue(joExp, "wlt_balance");
  61. tbMedInsWalletPay.Text = JsonHelper.getDestValue(joExp, "wlt_pay");
  62. }
  63. }
  64. setDgvSettlDetailHeader();
  65. dgvSetlDetail.DataSource = dtSettlmentDetail;
  66. }
  67. private void AddDGVColumn(DataGridView dgv, string headerText, string dataPropertyName, int width = 120)
  68. {
  69. DataGridViewColumn newColumn = new DataGridViewTextBoxColumn();
  70. newColumn.HeaderText = headerText;
  71. newColumn.Width = width;
  72. newColumn.DataPropertyName = dataPropertyName;
  73. newColumn.Name = dataPropertyName;
  74. dgv.Columns.Add(newColumn);
  75. }
  76. private void setDgvSettlDetailHeader()
  77. {
  78. AddDGVColumn(dgvSetlDetail, "基金支付类型", "fund_pay_type", 80);
  79. AddDGVColumn(dgvSetlDetail, "符合政策范围金额", "inscp_scp_amt");
  80. AddDGVColumn(dgvSetlDetail, "本次可支付限额金额", "crt_payb_lmt_amt");
  81. AddDGVColumn(dgvSetlDetail, "基金支付金额", "fund_payamt");
  82. AddDGVColumn(dgvSetlDetail, "基金支付类型名称", "fund_pay_type_name", 300);
  83. AddDGVColumn(dgvSetlDetail, "结算过程信息", "setl_proc_info", 200);
  84. dgvSetlDetail.ColumnHeadersDefaultCellStyle.Font = new Font("宋体", 9, FontStyle.Bold);
  85. dgvSetlDetail.ColumnHeadersHeight = 40;
  86. }
  87. public DataTable dtSettlmentDetail;
  88. //险种
  89. public string insuType { get; set; }
  90. private void pnlPayInfo_Click(object sender, EventArgs e)
  91. {
  92. }
  93. private void uiLabel29_Click(object sender, EventArgs e)
  94. {
  95. }
  96. private void uiButton1_Click(object sender, EventArgs e)
  97. {
  98. DialogResult = DialogResult.OK;
  99. }
  100. private void uiButton2_Click(object sender, EventArgs e)
  101. {
  102. DialogResult = DialogResult.Cancel;
  103. }
  104. }
  105. }