SettlementInfo.cs 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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.Variables;
  12. using PTMedicalInsurance.Business;
  13. namespace PTMedicalInsurance.Forms
  14. {
  15. public partial class SettlementInfo : Form
  16. {
  17. //1.声明自适应类实例
  18. AutoResizeForm asc = new AutoResizeForm();
  19. public DataTable dtSettlmentDetail;
  20. //险种
  21. public string insuType { get; set; }
  22. public SettlementInfo()
  23. {
  24. InitializeComponent();
  25. //this.StartPosition = FormStartPosition.CenterParent;
  26. asc.controllInitializeSize(this);
  27. asc.controlAutoSize(this);
  28. }
  29. public string DefutValue(string InValue)
  30. {
  31. string sRtn = "0";
  32. if (InValue == "")
  33. return sRtn;
  34. else
  35. return InValue;
  36. }
  37. public SettlementInfo(JObject jo)
  38. {
  39. InitializeComponent();
  40. JObject joSettlmentInfo = JObject.FromObject(jo["setlinfo"]);
  41. dtSettlmentDetail = (DataTable)jo["setldetail"].ToObject(typeof(DataTable));
  42. this.tbAdmCertType.Text = joSettlmentInfo["mdtrt_cert_type"].ToString();
  43. this.tbPsnCertType.Text = joSettlmentInfo["psn_cert_type"].ToString();
  44. this.tbPsnCertNO.Text = joSettlmentInfo["certno"].ToString();
  45. this.tbInsuType.Text = joSettlmentInfo["insutype"].ToString();
  46. this.tbPersonType.Text = joSettlmentInfo["psn_type"].ToString();
  47. this.tbMedType.Text = joSettlmentInfo["med_type"].ToString();
  48. this.tbSumamt.Text = joSettlmentInfo["medfee_sumamt"].ToString();
  49. this.tbFullOwnPay.Text = joSettlmentInfo["fulamt_ownpay_amt"].ToString();
  50. this.tbOverLimitOwnPay.Text = joSettlmentInfo["overlmt_selfpay"].ToString();
  51. this.tbPreSelfPay.Text = joSettlmentInfo["preselfpay_amt"].ToString();
  52. this.tbInScopyAmount.Text = joSettlmentInfo["inscp_scp_amt"].ToString();
  53. this.tbActualPayDeduLine.Text = joSettlmentInfo["act_pay_dedc"].ToString();
  54. this.tbInsuFundPay.Text = joSettlmentInfo["hifp_pay"].ToString();
  55. this.tbInsuFundPayRito.Text = joSettlmentInfo["pool_prop_selfpay"].ToString();
  56. this.tbCvlserv_pay.Text = joSettlmentInfo["cvlserv_pay"].ToString();
  57. this.tbHifes_pay.Text = joSettlmentInfo["hifes_pay"].ToString();
  58. this.tbHifmi_pay.Text = joSettlmentInfo["hifmi_pay"].ToString();
  59. this.tbWorkerLargeMedical.Text = joSettlmentInfo["hifob_pay"].ToString();
  60. this.tbAssian.Text = joSettlmentInfo["maf_pay"].ToString();
  61. this.tbOtherPay.Text = joSettlmentInfo["oth_pay"].ToString();
  62. this.tbFundPaySummat.Text = joSettlmentInfo["fund_pay_sumamt"].ToString();
  63. this.tbPsnSummat.Text = joSettlmentInfo["psn_part_amt"].ToString();
  64. this.tbPsnAccountPaySummat.Text = joSettlmentInfo["acct_pay"].ToString();
  65. this.tbPsnCashPay.Text = joSettlmentInfo["psn_cash_pay"].ToString();
  66. this.tbHospitalPartAmount.Text = joSettlmentInfo["hosp_part_amt"].ToString();
  67. this.tbBalc.Text = joSettlmentInfo["balc"].ToString();
  68. this.tbAccountMutualAidAmount.Text = joSettlmentInfo["acct_mulaid_pay"].ToString();
  69. this.tbClearingWay.Text = joSettlmentInfo["clr_way"].ToString();
  70. this.tbClearingType.Text = joSettlmentInfo["clr_type"].ToString();
  71. this.tbCommercialReimamt.Text = joSettlmentInfo["commercial_reimamt"].ToString();
  72. this.tbCommercialRenflag.Text = joSettlmentInfo["commercial_renflag"].ToString();
  73. Global.Set.acctPay = joSettlmentInfo["acct_pay"].ToString();
  74. setDgvSettlDetailHeader();
  75. dgvSetlDetail.DataSource = dtSettlmentDetail;
  76. }
  77. private void AddDGVColumn(DataGridView dgv, string headerText, string dataPropertyName, int width = 120)
  78. {
  79. DataGridViewColumn newColumn = new DataGridViewTextBoxColumn();
  80. newColumn.HeaderText = headerText;
  81. newColumn.Width = width;
  82. newColumn.DataPropertyName = dataPropertyName;
  83. newColumn.Name = dataPropertyName;
  84. dgv.Columns.Add(newColumn);
  85. }
  86. private void setDgvSettlDetailHeader()
  87. {
  88. AddDGVColumn(dgvSetlDetail, "基金支付类型", "fund_pay_type", 80);
  89. AddDGVColumn(dgvSetlDetail, "符合政策范围金额", "inscp_scp_amt");
  90. AddDGVColumn(dgvSetlDetail, "本次可支付限额金额", "crt_payb_lmt_amt");
  91. AddDGVColumn(dgvSetlDetail, "基金支付金额", "fund_payamt");
  92. AddDGVColumn(dgvSetlDetail, "基金支付类型名称", "fund_pay_type_name", 300);
  93. AddDGVColumn(dgvSetlDetail, "结算过程信息", "setl_proc_info", 200);
  94. dgvSetlDetail.ColumnHeadersDefaultCellStyle.Font = new Font("宋体", 9, FontStyle.Bold);
  95. dgvSetlDetail.ColumnHeadersHeight = 40;
  96. }
  97. private void uiButton1_Click(object sender, EventArgs e)
  98. {
  99. decimal fYBZFJE, fYYCDJE, fJJZFJE;
  100. fYYCDJE = decimal.Parse(DefutValue(tbHospitalPartAmount.Text));
  101. fJJZFJE = decimal.Parse(DefutValue(tbFundPaySummat.Text));
  102. Global.Set.fZFY = tbSumamt.Text;
  103. Global.Set.fZHZFJE = DefutValue(tbPsnAccountPaySummat.Text);
  104. Global.Set.fYBZFJE = (fYYCDJE + fJJZFJE).ToString();
  105. DialogResult = DialogResult.OK;
  106. }
  107. private void uiButton2_Click(object sender, EventArgs e)
  108. {
  109. DialogResult = DialogResult.Cancel;
  110. }
  111. }
  112. }