formConfig.js 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. // 渠道类型
  2. const channelType = [
  3. {
  4. name: "银行卡",
  5. value: "Bank",
  6. tip: "为了保障您预交金的资金安全,线上转账退款登记完成后,医院会进行基本信息审核,校验无误后为您办理退款,办理时间约7个工作日,请您耐心等待。",
  7. },
  8. {
  9. name: "微信",
  10. value: "Wechat",
  11. tip: "微信零钱转账将在3~7个工作日内直接转账至您当前的微信账户上。请您注意微信的到账通知!",
  12. },
  13. {
  14. name: "支付宝",
  15. value: "Zfb",
  16. tip: "支付宝转账将在3~7个工作日内直接转账至您当前的支付宝账户上。请您注意支付宝的到账通知!",
  17. },
  18. ];
  19. // 办理人类型(与患者关系)
  20. const relationType = [
  21. {
  22. name: "本人",
  23. value: "1",
  24. },
  25. {
  26. name: "代办",
  27. value: "2",
  28. },
  29. ];
  30. // 基础表单配置
  31. const form_basic = [
  32. {
  33. key: 'MemberName',
  34. type: 'input',
  35. label: '就诊人姓名',
  36. readOnly: true,
  37. placeholder: '请输入就诊人姓名',
  38. required: true,
  39. enabled: true,
  40. visible: true,
  41. validate: (value) => {
  42. const reg = /^([\u4e00-\u9fa5\·\s]{1,25}|[a-zA-Z\.\s]{1,25})$/g;
  43. return reg.test(value);
  44. },
  45. errorMsg: '输入姓名为空或不合法'
  46. },
  47. {
  48. key: 'IdCardNo',
  49. type: 'input',
  50. label: '身份证号码',
  51. readOnly: true,
  52. placeholder: '请输入身份证号码',
  53. required: true,
  54. enabled: true,
  55. visible: true,
  56. validate: (value) => true,
  57. errorMsg: '证件号码为空或不合法'
  58. },
  59. {
  60. key: 'CardNo',
  61. type: 'input',
  62. label: '退款就诊卡',
  63. readOnly: true,
  64. placeholder: '',
  65. required: false,
  66. enabled: true,
  67. visible: true,
  68. validate: (value) => true,
  69. errorMsg: ''
  70. },
  71. {
  72. key: 'RefundMoney',
  73. type: 'input',
  74. label: '退款金额',
  75. readOnly: true,
  76. placeholder: '',
  77. required: true,
  78. enabled: true,
  79. visible: true,
  80. validate: (value) => true,
  81. errorMsg: ''
  82. },
  83. {
  84. key: 'HandlerMobile',
  85. type: 'smsCode',
  86. label: '申请人联系电话',
  87. phoneLabel: '申请人联系电话',
  88. codeLabel: '验证码',
  89. sendCodeText: '发送验证码',
  90. countdownText: '重新发送(%s)s',
  91. readOnly: false,
  92. required: true,
  93. enabled: true,
  94. visible: true,
  95. validatePhone: (value) => /^1[3-9]\d{9}$/.test(value),
  96. validateCode: (value) => true,
  97. errorMsg: '请输入正确的手机号及验证码',
  98. sendCodeApi: function (phone) {
  99. return new Promise((resolve, reject) => {
  100. // 这里模拟发送验证码的接口调用
  101. setTimeout(() => {
  102. const success = Math.random() > 0.2;
  103. if (success) {
  104. resolve({ message: '验证码发送成功' });
  105. } else {
  106. reject(new Error('验证码发送失败'));
  107. }
  108. }, 1000);
  109. });
  110. }
  111. },
  112. {
  113. key: 'TransferType',
  114. type: 'radio',
  115. label: '转账方式',
  116. options: [
  117. {
  118. name: "银行卡",
  119. value: "Bank",
  120. }, {
  121. name: "微信",
  122. value: "Wechat",
  123. }, {
  124. name: "支付宝",
  125. value: "Zfb",
  126. },
  127. ],
  128. inline: false,
  129. readOnly: false,
  130. required: true,
  131. enabled: true,
  132. visible: true,
  133. validate: (value) => true,
  134. errorMsg: '请选择转账方式'
  135. },
  136. ]
  137. // 银行表单配置
  138. const form_bank = [
  139. {
  140. key: 'HandlerReName',
  141. type: 'input',
  142. label: '收款户名',
  143. readOnly: false,
  144. placeholder: '请输入收款户名',
  145. required: true,
  146. enabled: true,
  147. visible: true,
  148. validate: (value) => {
  149. const reg = /^([\u4e00-\u9fa5\·\s]{1,25}|[a-zA-Z\.\s]{1,25})$/g;
  150. return reg.test(value);
  151. },
  152. errorMsg: '收款户名为空或不合法(请检查输入的内容是否有空格、数字等特殊字符)'
  153. },
  154. {
  155. key: 'RecAccNo',
  156. type: 'input',
  157. label: '收款银行卡号',
  158. readOnly: false,
  159. placeholder: '请输入收款银行卡卡号',
  160. required: true,
  161. enabled: true,
  162. visible: true,
  163. validate: (value) => {
  164. const reg = /^\d*$/g;
  165. return reg.test(value) && value.length <= 20;
  166. },
  167. errorMsg: '收款银行卡号为空或不合法(长度不超过20位)'
  168. },
  169. {
  170. key: 'HanderReBankName',
  171. type: 'input',
  172. label: '收款银行',
  173. readOnly: false,
  174. placeholder: '请输入收款银行名称',
  175. required: true,
  176. enabled: true,
  177. visible: true,
  178. validate: (value) => true,
  179. errorMsg: '收款银行为空或不合法'
  180. },
  181. // {
  182. // key: 'HandlerBankAddr',
  183. // type: 'regionPicker',
  184. // label: '开户行所在地',
  185. // currentBindKey: "value", // 变量回写关键字(code/postcode/value(默认))
  186. // level: "city",
  187. // readOnly: false,
  188. // placeholder: '请选择',
  189. // required: true,
  190. // enabled: true,
  191. // visible: true,
  192. // validate: (value) => true,
  193. // errorMsg: '请选择开户行所在地'
  194. // },
  195. {
  196. key: 'HandlerBankName',
  197. type: 'input',
  198. label: '开户行',
  199. readOnly: false,
  200. placeholder: '输入收款银行的开户行',
  201. required: true,
  202. enabled: true,
  203. visible: true,
  204. validate: (value) => true,
  205. errorMsg: '开户行为空或不合法'
  206. },
  207. ]
  208. // 微信表单配置
  209. const form_wechat = [
  210. {
  211. key: 'HandlerReName',
  212. type: 'input',
  213. label: '收款人姓名',
  214. readOnly: false,
  215. placeholder: '请输入收款人姓名',
  216. required: true,
  217. enabled: true,
  218. visible: true,
  219. validate: (value) => {
  220. const reg = /^([\u4e00-\u9fa5\·\s]{1,25}|[a-zA-Z\.\s]{1,25})$/g;
  221. return reg.test(value);
  222. },
  223. errorMsg: '收款人姓名为空或不合法(请检查输入的内容是否有空格、数字等特殊字符)'
  224. },
  225. { // 自动获取openid
  226. key: 'RecAccNo',
  227. type: 'input',
  228. label: '收款账号',
  229. readOnly: true,
  230. placeholder: '请输入收款账号',
  231. required: true,
  232. enabled: true,
  233. visible: false,
  234. validate: (value) => true,
  235. errorMsg: '收款账号为空或不合法'
  236. },
  237. ]
  238. // 支付宝表单配置
  239. const form_zfb = [
  240. {
  241. key: 'HandlerReName',
  242. type: 'input',
  243. label: '收款人姓名',
  244. readOnly: false,
  245. placeholder: '请输入收款人姓名',
  246. required: true,
  247. enabled: true,
  248. visible: true,
  249. validate: (value) => {
  250. const reg = /^([\u4e00-\u9fa5\·\s]{1,25}|[a-zA-Z\.\s]{1,25})$/g;
  251. return reg.test(value);
  252. },
  253. errorMsg: '收款人姓名为空或不合法(请检查输入的内容是否有空格、数字等特殊字符)'
  254. },
  255. { // 支付宝登录号邮箱或手机号
  256. key: 'RecAccNo',
  257. type: 'input',
  258. label: '收款账号',
  259. readOnly: false,
  260. placeholder: '支付宝登录号邮箱或手机号',
  261. required: true,
  262. enabled: true,
  263. visible: true,
  264. validate: (value) => true,
  265. errorMsg: '收款账号为空或不合法'
  266. },
  267. ]
  268. export {
  269. channelType,
  270. relationType,
  271. form_basic,
  272. form_bank,
  273. form_wechat,
  274. form_zfb,
  275. }