SettlementInfo.cs 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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 string creditFlag;//信用授权标志
  20. public DataTable dtCreditInfo { get; set; }
  21. public string bankCode { get; set; }
  22. public string payFee { get; set; }
  23. public SettlementInfo()
  24. {
  25. InitializeComponent();
  26. //this.StartPosition = FormStartPosition.CenterParent;
  27. asc.controllInitializeSize(this);
  28. asc.controlAutoSize(this);
  29. }
  30. public SettlementInfo(JObject jo)
  31. {
  32. InitializeComponent();
  33. JObject joSettlmentInfo = JObject.FromObject(jo["setlinfo"]);
  34. dtSettlmentDetail = (DataTable)jo["setldetail"].ToObject(typeof(DataTable));
  35. this.tbAdmCertType.Text = joSettlmentInfo["mdtrt_cert_type"].ToString();
  36. this.tbPsnCertType.Text = joSettlmentInfo["psn_cert_type"].ToString();
  37. this.tbPsnCertNO.Text = joSettlmentInfo["certno"].ToString();
  38. this.tbInsuType.Text = joSettlmentInfo["insutype"].ToString();
  39. this.tbPersonType.Text = joSettlmentInfo["psn_type"].ToString();
  40. this.tbMedType.Text = joSettlmentInfo["med_type"].ToString();
  41. this.tbSumamt.Text = joSettlmentInfo["medfee_sumamt"].ToString();
  42. this.tbFullOwnPay.Text = joSettlmentInfo["fulamt_ownpay_amt"].ToString();
  43. this.tbOverLimitOwnPay.Text = joSettlmentInfo["overlmt_selfpay"].ToString();
  44. this.tbPreSelfPay.Text = joSettlmentInfo["preselfpay_amt"].ToString();
  45. this.tbInScopyAmount.Text = joSettlmentInfo["inscp_scp_amt"].ToString();
  46. this.tbActualPayDeduLine.Text = joSettlmentInfo["act_pay_dedc"].ToString();
  47. this.tbInsuFundPay.Text = joSettlmentInfo["hifp_pay"].ToString();
  48. this.tbInsuFundPayRito.Text = joSettlmentInfo["pool_prop_selfpay"].ToString();
  49. this.tbCvlserv_pay.Text = joSettlmentInfo["cvlserv_pay"].ToString();
  50. this.tbHifes_pay.Text = joSettlmentInfo["hifes_pay"].ToString();
  51. this.tbHifmi_pay.Text = joSettlmentInfo["hifmi_pay"].ToString();
  52. this.tbWorkerLargeMedical.Text = joSettlmentInfo["hifob_pay"].ToString();
  53. this.tbAssian.Text = joSettlmentInfo["maf_pay"].ToString();
  54. this.tbOtherPay.Text = joSettlmentInfo["oth_pay"].ToString();
  55. this.tbFundPaySummat.Text = joSettlmentInfo["fund_pay_sumamt"].ToString();
  56. this.tbPsnSummat.Text = joSettlmentInfo["psn_part_amt"].ToString();
  57. this.tbPsnAccountPaySummat.Text = joSettlmentInfo["acct_pay"].ToString();
  58. this.tbPsnCashPay.Text = joSettlmentInfo["psn_cash_pay"].ToString();
  59. this.tbHospitalPartAmount.Text = joSettlmentInfo["hosp_part_amt"].ToString();
  60. this.tbBalc.Text = joSettlmentInfo["balc"].ToString();
  61. this.tbAccountMutualAidAmount.Text = joSettlmentInfo["acct_mulaid_pay"].ToString();
  62. this.tbClearingWay.Text = joSettlmentInfo["clr_way"].ToString();
  63. this.tbClearingType.Text = joSettlmentInfo["clr_type"].ToString();
  64. Global.Set.acctPay = joSettlmentInfo["acct_pay"].ToString();
  65. if (joSettlmentInfo.TryGetValue("exp_content",out JToken joExpContent))
  66. {
  67. if (joExpContent is JObject)
  68. {
  69. if (((JObject)joExpContent).TryGetValue("credit_info", out JToken joCreditInfo))
  70. {
  71. this.tbBankCode.Text = joCreditInfo["bank_code"].ToString();
  72. this.tbCreditAgreeNO.Text = joCreditInfo["agreement_no"].ToString();
  73. this.tbBankOrderNO.Text = joCreditInfo["bank_order_no"].ToString();
  74. this.tbTransStatus.Text = joCreditInfo["trans_status"].ToString();
  75. this.tbCreditPayFee.Text = joCreditInfo["pay_fee"].ToString();
  76. this.tbCreditDate.Text = joCreditInfo["trans_date"].ToString();
  77. }
  78. }
  79. }
  80. setDgvSettlDetailHeader();
  81. dgvSetlDetail.DataSource = dtSettlmentDetail;
  82. }
  83. private void AddDGVColumn(DataGridView dgv, string headerText, string dataPropertyName, int width = 120)
  84. {
  85. DataGridViewColumn newColumn = new DataGridViewTextBoxColumn();
  86. newColumn.HeaderText = headerText;
  87. newColumn.Width = width;
  88. newColumn.DataPropertyName = dataPropertyName;
  89. newColumn.Name = dataPropertyName;
  90. dgv.Columns.Add(newColumn);
  91. }
  92. private void setDgvSettlDetailHeader()
  93. {
  94. AddDGVColumn(dgvSetlDetail, "基金支付类型", "fund_pay_type", 80);
  95. AddDGVColumn(dgvSetlDetail, "符合政策范围金额", "inscp_scp_amt");
  96. AddDGVColumn(dgvSetlDetail, "本次可支付限额金额", "crt_payb_lmt_amt");
  97. AddDGVColumn(dgvSetlDetail, "基金支付金额", "fund_payamt");
  98. AddDGVColumn(dgvSetlDetail, "基金支付类型名称", "fund_pay_type_name", 300);
  99. AddDGVColumn(dgvSetlDetail, "结算过程信息", "setl_proc_info", 200);
  100. dgvSetlDetail.ColumnHeadersDefaultCellStyle.Font = new Font("宋体", 9, FontStyle.Bold);
  101. dgvSetlDetail.ColumnHeadersHeight = 40;
  102. }
  103. public DataTable dtSettlmentDetail;
  104. //险种
  105. public string insuType { get; set; }
  106. private void pnlPayInfo_Click(object sender, EventArgs e)
  107. {
  108. }
  109. private void uiLabel29_Click(object sender, EventArgs e)
  110. {
  111. }
  112. private void uiButton1_Click(object sender, EventArgs e)
  113. {
  114. //涉及第三方标志
  115. if (Chk_Credit.Checked)
  116. {
  117. Global.Set.creditFlag = creditFlag = "1";
  118. }
  119. else
  120. {
  121. Global.Set.creditFlag = creditFlag = "0";
  122. }
  123. if (Chk_Credit.Checked)
  124. {
  125. bankCode = dgvCreditInfo.CurrentRow.Cells["bank_code"].Value.ToString();
  126. payFee = dgvCreditInfo.CurrentRow.Cells["pay_fee"].Value.ToString();
  127. }
  128. DialogResult = DialogResult.OK;
  129. }
  130. private void uiButton2_Click(object sender, EventArgs e)
  131. {
  132. DialogResult = DialogResult.Cancel;
  133. }
  134. private void SettlementInfo_Load(object sender, EventArgs e)
  135. {
  136. dgvCreditInfo.DataSource = dtCreditInfo;
  137. }
  138. private void btCreditPreSettlement_Click(object sender, EventArgs e)
  139. {
  140. }
  141. }
  142. }