centerW.jsx 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  1. //eslint-disable
  2. import React from 'react';
  3. import { Spin, Select, Input, Upload, Button, Checkbox, Form,Tooltip } from 'antd';
  4. import { UploadOutlined } from '@ant-design/icons';
  5. import axios from "axios";
  6. import select_data from '../../common/ssq';
  7. import styleData from '../moduleCss/style.module.scss';
  8. export default class centerW extends React.Component {
  9. constructor(props) {
  10. super(props)
  11. this.state = {
  12. selectData: select_data,
  13. rightArray: select_data.rightArray,
  14. fileList: [[], [], [], [], [], [], [], [], [], [], [], []],
  15. fileList_t: null,
  16. headerProps: {
  17. progress: {
  18. strokeColor: {
  19. '0%': '#108ee9',
  20. '100%': '#87d068',
  21. },
  22. strokeWidth: 3,
  23. format: percent => `${parseFloat(percent.toFixed(2))}%`,
  24. }
  25. },
  26. imgType: null,
  27. Params: this.props.arr,
  28. tradingScenarios: [],
  29. datas: {},
  30. signedName: '',
  31. businessLicensePath: '',//营业执照照片路径
  32. openAccountPath: '',//开户许可证照片路径
  33. legalIdCardProsPath: '',//法人证件人像面路径
  34. legalIdCardConsPath: '',//法人证件国徽面路径
  35. desireAuthPath: '',//确认入网意愿视频路径
  36. holdingIdCardPath: '',//法人手持证件影印件路径
  37. webSitePath: '',//商户网址截图影印件路径
  38. wechatAppletPath: '',//公众号/小程序/生活号业务流程截图影印件路径
  39. appPath: '',//APP首页截图影印件路径
  40. legalPersonBankCardPath: '',//法人银行卡图影印件路径
  41. desireAuthOtherPath: '',//确认入网意愿其他验证方式路径
  42. otherCerPath: '',//其他资质文件路径
  43. scLodings: null,
  44. offlist: select_data.offlist,
  45. validation_list: [],
  46. form_width: 200,
  47. registerRole : null,
  48. contactName : JSON.parse(localStorage.getItem('oData')).contactName
  49. }
  50. }
  51. componentDidMount() {
  52. this.props.onRef(this);
  53. let registerRole = JSON.parse(localStorage.getItem('oData')).registerRole;
  54. localStorage.setItem('rightArray', JSON.stringify(select_data.rightArray))
  55. this.setState({
  56. registerRole: registerRole,
  57. });
  58. if (registerRole == 'INDIVIDUAL_BUSINESS') { //个体工商户
  59. this.setState({
  60. offlist: select_data.INDIVIDUAL_BUSINESS
  61. })
  62. }
  63. if (registerRole == 'NATURAL_PERSON') { //自然人
  64. this.setState({
  65. offlist: select_data.NATURAL_PERSON
  66. })
  67. }
  68. if (registerRole == 'offlist') { //默认
  69. this.setState({
  70. offlist: select_data.offlist
  71. })
  72. }
  73. }
  74. toParent = (data) => {
  75. this.props.parent.getParams_w(this, data)
  76. }
  77. InputWdata(e) {
  78. let Params = {
  79. legalPersonName: document.getElementById("legalPersonName").value,//法人姓名
  80. profession: this.state.Params.profession == undefined ? '' : this.state.Params.profession,
  81. legalPersonIdType: this.state.Params.legalPersonIdType == undefined ? '' : this.state.Params.legalPersonIdType,//法人证件类型
  82. legalPersonIdNo: document.getElementById("legalPersonIdNo").value, //证件号码
  83. idEffectiveDateStart: '',//法人证件有效期开始日期
  84. idEffectiveDateEnd: '',//法人证件有效期结束日期
  85. cerNoType: this.state.Params.cerNoType == undefined ? '' : this.state.Params.cerNoType,//企业证件类型
  86. cerNo: document.getElementById("cerNo").value,//企业资质证书编号
  87. sellingArea: this.state.Params.sellingArea == undefined ? '' : this.state.Params.sellingArea,//营业面积
  88. staffSize: this.state.Params.staffSize == undefined ? '' : this.state.Params.staffSize,//公司员工规模
  89. tradingScenarios: this.state.Params.tradingScenarios,//交易场景说明
  90. webSite: document.getElementById("webSite").value,//网站网址
  91. webSiteName: document.getElementById("webSiteName").value,//网站名称
  92. icp: document.getElementById("icp").value,//ICP备案号
  93. appName: document.getElementById("appName").value,//APP名称
  94. wechatAppletName: document.getElementById("wechatAppletName").value,//公众号/小程序/生活号
  95. testAccountInfo: '',//测试账户信息
  96. businessLicensePath: this.state.Params.businessLicensePath == undefined ? '' : this.state.Params.businessLicensePath,//营业执照照片路径
  97. openAccountPath: this.state.Params.openAccountPath == undefined ? '' : this.state.Params.openAccountPath,//开户许可证照片路径
  98. legalIdCardProsPath: this.state.Params.legalIdCardProsPath == undefined ? '' : this.state.Params.legalIdCardProsPath,//法人证件人像面路径
  99. legalIdCardConsPath: this.state.Params.legalIdCardConsPath == undefined ? '' : this.state.Params.legalIdCardConsPath,//法人证件国徽面路径
  100. desireAuthPath: this.state.Params.desireAuthPath == undefined ? '' : this.state.Params.desireAuthPath,//确认入网意愿视频路径
  101. holdingIdCardPath: this.state.Params.holdingIdCardPath == undefined ? '' : this.state.Params.holdingIdCardPath,//法人手持证件影印件路径
  102. webSitePath: this.state.Params.webSitePath == undefined ? '' : this.state.Params.webSitePath,//商户网址截图影印件路径
  103. wechatAppletPath: this.state.Params.wechatAppletPath == undefined ? '' : this.state.Params.wechatAppletPath,//公众号/小程序/生活号业务流程截图影印件路径
  104. appPath: this.state.Params.appPath == undefined ? '' : this.state.Params.appPath,//APP首页截图影印件路径
  105. legalPersonBankCardPath: this.state.Params.legalPersonBankCardPath == undefined ? '' : this.state.Params.legalPersonBankCardPath,//法人银行卡图影印件路径
  106. desireAuthOtherPath: this.state.Params.desireAuthOtherPath == undefined ? '' : this.state.Params.desireAuthOtherPath,//确认入网意愿其他验证方式路径
  107. otherCerPath: this.state.Params.otherCerPath == undefined ? '' : this.state.Params.otherCerPath,//其他资质文件路径
  108. }
  109. localStorage.setItem('wData', JSON.stringify(Params))
  110. return Params
  111. }
  112. childMethod() { //暴露给父组件的方法,集合当前页面拿到的参数存入缓存
  113. let data = this.InputWdata();
  114. this.toParent(data)
  115. }
  116. btnClick(e) { //区分上传图片类型
  117. let index = e + 1;
  118. this.state.imgType = e;
  119. }
  120. selectChange_1(value) { //法人职业类型选择
  121. this.state.Params.profession = value;
  122. }
  123. selectChange_2(value) { //法人证件类型选择
  124. this.state.Params.legalPersonIdType = value;
  125. }
  126. selectChange_3(value) { // 企业证件类型选择
  127. this.state.Params.cerNoType = value;
  128. }
  129. selectChange_4(value) { // 营业面积
  130. this.state.Params.sellingArea = value;
  131. }
  132. selectChange_5(value) { // 员工规模
  133. this.state.Params.staffSize = value;
  134. }
  135. CheckChange(e) {
  136. this.state.Params.tradingScenarios = e.toString()
  137. }
  138. onChangeUpload(info) {
  139. let fileList = [...info.fileList];
  140. this.state.fileList = fileList
  141. }
  142. UploadImgstate() { //修改上传图片状态
  143. let fileList = this.state.fileList;
  144. let imgType = this.state.imgType; //当前上传图片点击的Index
  145. fileList[0].status = 'done' //上传成功之后的状态 自动修改
  146. fileList[0].response = fileList[0].name //图片上传成功之后展示的TIP
  147. let arr = this.state.fileList;
  148. arr[imgType] = fileList
  149. this.setState({
  150. fileList: arr
  151. })
  152. }
  153. handleChange(e) {
  154. let imgType = this.state.imgType;
  155. let file = e.file;
  156. let that_ = this;
  157. that_.setState({
  158. scLodings: true
  159. })
  160. const formData = new FormData();
  161. formData.append('file', file)
  162. formData.append('merchantSerialNumber', 'MCT_202106262257460929210')
  163. let config = {
  164. method: 'post',
  165. headers: { 'Content-Type': 'multipart/form-data' }
  166. }
  167. axios.post('http://paytest.zhongsou.com/payment/file.upload.groovy', formData, config).then((res) => {
  168. let status = res.data.msg;
  169. if (status == '获取成功') {
  170. let dataUrl = res.data.filesResult[0].fileName;
  171. that_.wjbc(imgType, dataUrl)
  172. }
  173. }).catch((error) => { //上传失败后设置回之前的上前数量与状态
  174. console.log(error);
  175. })
  176. }
  177. wjbc(e, dataUrl) {
  178. let that_ = this;
  179. let rightArray = this.state.rightArray;
  180. switch (e) {
  181. case 0:
  182. rightArray[e].txts = '上传成功'
  183. that_.state.Params.businessLicensePath = dataUrl;
  184. that_.setState({
  185. rightArray: rightArray,
  186. businessLicensePath: dataUrl,
  187. scLodings: false
  188. })
  189. break;
  190. case 1:
  191. rightArray[e].txts = '上传成功'
  192. that_.state.Params.openAccountPath = dataUrl;
  193. that_.setState({
  194. rightArray: rightArray,
  195. openAccountPath: dataUrl,
  196. scLodings: false
  197. })
  198. break;
  199. case 2:
  200. rightArray[e].txts = '上传成功'
  201. that_.state.Params.legalIdCardProsPath = dataUrl;
  202. that_.setState({
  203. rightArray: rightArray,
  204. legalIdCardProsPath: dataUrl,
  205. scLodings: false
  206. })
  207. break;
  208. case 3:
  209. rightArray[e].txts = '上传成功'
  210. that_.state.Params.legalIdCardConsPath = dataUrl;
  211. that_.setState({
  212. rightArray: rightArray,
  213. legalIdCardConsPath: dataUrl,
  214. scLodings: false
  215. })
  216. break;
  217. case 4:
  218. rightArray[e].txts = '上传成功'
  219. that_.state.Params.desireAuthPath = dataUrl;
  220. that_.setState({
  221. rightArray: rightArray,
  222. desireAuthPath: dataUrl,
  223. scLodings: false
  224. })
  225. break;
  226. case 5:
  227. rightArray[e].txts = '上传成功'
  228. that_.state.Params.holdingIdCardPath = dataUrl;
  229. that_.setState({
  230. rightArray: rightArray,
  231. holdingIdCardPath: dataUrl,
  232. scLodings: false
  233. })
  234. break;
  235. case 6:
  236. rightArray[e].txts = '上传成功'
  237. that_.state.Params.webSitePath = dataUrl;
  238. that_.setState({
  239. rightArray: rightArray,
  240. webSitePath: dataUrl,
  241. scLodings: false
  242. })
  243. break;
  244. case 7:
  245. rightArray[e].txts = '上传成功'
  246. that_.state.Params.wechatAppletPath = dataUrl;
  247. that_.setState({
  248. rightArray: rightArray,
  249. wechatAppletPath: dataUrl,
  250. scLodings: false
  251. })
  252. break;
  253. case 8:
  254. rightArray[e].txts = '上传成功'
  255. that_.state.Params.appPath = dataUrl;
  256. that_.setState({
  257. rightArray: rightArray,
  258. appPath: dataUrl,
  259. scLodings: false
  260. })
  261. break;
  262. case 9:
  263. rightArray[e].txts = '上传成功'
  264. that_.state.Params.legalPersonBankCardPath = dataUrl;
  265. that_.setState({
  266. rightArray: rightArray,
  267. legalPersonBankCardPath: dataUrl,
  268. scLodings: false
  269. })
  270. break;
  271. case 10:
  272. rightArray[e].txts = '上传成功'
  273. that_.state.Params.desireAuthOtherPath = dataUrl;
  274. that_.setState({
  275. rightArray: rightArray,
  276. desireAuthOtherPath: dataUrl,
  277. scLodings: false
  278. })
  279. break;
  280. case 11:
  281. rightArray[e].txts = '上传成功'
  282. that_.state.Params.otherCerPath = dataUrl;
  283. that_.setState({
  284. rightArray: rightArray,
  285. otherCerPath: dataUrl,
  286. scLodings: false
  287. })
  288. break;
  289. }
  290. }
  291. listTypes(e) {
  292. let data = this.state.offlist;
  293. let type = data.find((item, index) => { return item.value == e });
  294. if (type !== undefined) {
  295. type = true
  296. } else {
  297. type = false
  298. }
  299. return type
  300. }
  301. verification(e) { //暴露给父组件的方法,验证当前页面必填项
  302. this.setState({
  303. validation_list : e,
  304. rightArray : this.state.rightArray
  305. })
  306. }
  307. render() {
  308. const { selectData, Params, rightArray, headerProps, scLodings, imgType, validation_list, form_width , registerRole , contactName } = this.state;
  309. const { Option } = Select;
  310. const layout = {
  311. labelCol: { span: 4 },
  312. };
  313. const onFinish = (values) => {
  314. // console.log('xxx: ', values);
  315. };
  316. return (
  317. <div className={styleData.center_up}>
  318. <Form
  319. {...layout}
  320. onFinish={onFinish}
  321. initialValues={{ //数据回填
  322. legalPersonName : contactName,
  323. 'tradingScenarios': Params.tradingScenarios == undefined ? ['WEBSITE'] : Params.tradingScenarios,
  324. 'profession' : Params.profession == undefined ? null : Params.profession,
  325. 'legalPersonIdType' : Params.legalPersonIdType == undefined ? null : Params.legalPersonIdType,
  326. }}
  327. >
  328. <div className={styleData.center_left}>
  329. <div className={styleData.cl}>
  330. <Form.Item
  331. label={registerRole && registerRole == 'NATURAL_PERSON' ? '姓名' : '法人姓名'}
  332. name="legalPersonName"
  333. labelCol={{ style: { width: 150 } }}
  334. rules={[{ required: this.listTypes('legalPersonName') == true ? true : false, message: '' }]}
  335. validateStatus={validation_list.find((item, index) => { return item == 'legalPersonName' }) !== undefined ? 'error' : null}
  336. help={validation_list.find((item, index) => { return item == 'legalPersonName' }) !== undefined ? '此项为必填项!' : null}
  337. >
  338. <Input id='legalPersonName' style={{ width: form_width }} defaultValue={contactName} placeholder={registerRole && registerRole == 'NATURAL_PERSON' ? '请输入姓名' : '请输入法人姓名'} disabled />
  339. </Form.Item>
  340. </div>
  341. <div className={styleData.cl}>
  342. <Form.Item
  343. label={registerRole && registerRole == 'NATURAL_PERSON' ? '职业' : '法人职业'}
  344. name="profession"
  345. labelCol={{ style: { width: 150 } }}
  346. rules={[{ required: this.listTypes('profession') == true ? true : false, message: '' }]}
  347. validateStatus={validation_list.find((item, index) => { return item == 'profession' }) !== undefined ? 'error' : null}
  348. help={validation_list.find((item, index) => { return item == 'profession' }) !== undefined ? '此项为必填项!' : null}
  349. >
  350. <Select size='default' placeholder={registerRole && registerRole == 'NATURAL_PERSON' ? '请选择职业' : '请选择法人职业'} onChange={this.selectChange_1.bind(this)} style={{ width: 200 }}>
  351. {selectData.contractW.map((item, index) => (
  352. <Option key={index} value={item.value}>{item.txt}</Option>
  353. ))}
  354. </Select>
  355. </Form.Item>
  356. </div>
  357. <div className={styleData.cl}>
  358. <Form.Item
  359. label="法人证件类型"
  360. name="legalPersonIdType"
  361. labelCol={{ style: { width: 150 } }}
  362. rules={[{ required: this.listTypes('legalPersonIdType') == true ? true : false, message: '' }]}
  363. validateStatus={validation_list.find((item, index) => { return item == 'legalPersonIdType' }) !== undefined ? 'error' : null}
  364. help={validation_list.find((item, index) => { return item == 'legalPersonIdType' }) !== undefined ? '此项为必填项!' : null}
  365. >
  366. <Select size='default' placeholder="请选择证件类型" onChange={this.selectChange_2.bind(this)} style={{ width: 200 }}>
  367. {selectData.certificateW.map((item, index) => (
  368. <Option key={index} value={item.value}>{item.txt}</Option>
  369. ))}
  370. </Select>
  371. </Form.Item>
  372. </div>
  373. <div className={styleData.cl}>
  374. <Form.Item
  375. label="法人证件号码"
  376. name="legalPersonIdNo"
  377. labelCol={{ style: { width: 150 } }}
  378. rules={[{ required: this.listTypes('legalPersonIdNo') == true ? true : false, message: '' }]}
  379. validateStatus={validation_list.find((item, index) => { return item == 'legalPersonIdNo' }) !== undefined ? 'error' : null}
  380. help={validation_list.find((item, index) => { return item == 'legalPersonIdNo' }) !== undefined ? '此项为必填项!' : null}
  381. >
  382. <Input id='legalPersonIdNo' style={{ width: form_width }} placeholder="请输入证件号码" defaultValue={Params.legalPersonIdNo} />
  383. </Form.Item>
  384. </div>
  385. <div className={styleData.cl}>
  386. <Form.Item
  387. label="企业证件类型"
  388. name="cerNoType"
  389. labelCol={{ style: { width: 150 } }}
  390. rules={[{ required: this.listTypes('cerNoType') == true ? true : false, message: '' }]}
  391. validateStatus={validation_list.find((item, index) => { return item == 'cerNoType' }) !== undefined ? 'error' : null}
  392. help={validation_list.find((item, index) => { return item == 'cerNoType' }) !== undefined ? '此项为必填项!' : null}
  393. >
  394. <Select size='default' placeholder="请选择证件类型" defaultValue={Params.cerNoType} onChange={this.selectChange_3.bind(this)} style={{ width: 200 }}>
  395. {selectData.cerNoTypeW.map((item, index) => (
  396. <Option key={index} value={item.value}>{item.txt}</Option>
  397. ))}
  398. </Select>
  399. </Form.Item>
  400. </div>
  401. <div className={styleData.cl}>
  402. <Form.Item
  403. label="资质证书编号"
  404. name="cerNo"
  405. labelCol={{ style: { width: 150 } }}
  406. rules={[{ required: this.listTypes('cerNo') == true ? true : false, message: '' }]}
  407. validateStatus={validation_list.find((item, index) => { return item == 'cerNo' }) !== undefined ? 'error' : null}
  408. help={validation_list.find((item, index) => { return item == 'cerNo' }) !== undefined ? '此项为必填项!' : null}
  409. >
  410. <Input id='cerNo' style={{ width: form_width }} placeholder="请输入证书编号" defaultValue={Params.cerNo} />
  411. </Form.Item>
  412. </div>
  413. <div className={styleData.cl}>
  414. <Form.Item
  415. label="营业面积"
  416. name="sellingArea"
  417. labelCol={{ style: { width: 150 } }}
  418. rules={[{ required: this.listTypes('sellingArea') == true ? true : false, message: '' }]}
  419. validateStatus={validation_list.find((item, index) => { return item == 'sellingArea' }) !== undefined ? 'error' : null}
  420. help={validation_list.find((item, index) => { return item == 'sellingArea' }) !== undefined ? '此项为必填项!' : null}
  421. >
  422. <Select size='default' placeholder="请选择营业面积" defaultValue={Params.sellingArea} onChange={this.selectChange_4.bind(this)} style={{ width: 200 }}>
  423. <Option key={1} value='A'>500平米以上</Option>
  424. <Option key={2} value='B'>200-500平米(含)</Option>
  425. <Option key={3} value='C'>200平米以下</Option>
  426. </Select>
  427. </Form.Item>
  428. </div>
  429. <div className={styleData.cl}>
  430. <Form.Item
  431. label="公司员工规模"
  432. name="staffSize"
  433. labelCol={{ style: { width: 150 } }}
  434. rules={[{ required: this.listTypes('staffSize') == true ? true : false, message: '' }]}
  435. validateStatus={validation_list.find((item, index) => { return item == 'staffSize' }) !== undefined ? 'error' : null}
  436. help={validation_list.find((item, index) => { return item == 'staffSize' }) !== undefined ? '此项为必填项!' : null}
  437. >
  438. <Select size='default' placeholder="请选择员工规模" defaultValue={Params.staffSize} onChange={this.selectChange_5.bind(this)} style={{ width: 200 }}>
  439. <Option key={4} value='A'>100人以上</Option>
  440. <Option key={5} value='B'>50-100人(含)</Option>
  441. <Option key={6} value='C'>50人以下</Option>
  442. </Select>
  443. </Form.Item>
  444. </div>
  445. <div className={styleData.cl}>
  446. <Form.Item
  447. label="交易场景说明"
  448. name="tradingScenarios"
  449. labelCol={{ style: { width: 150 } }}
  450. rules={[{ required: this.listTypes('tradingScenarios') == true ? true : false, message: '' }]}
  451. validateStatus={validation_list.find((item, index) => { return item == 'tradingScenarios' }) !== undefined ? 'error' : null}
  452. help={validation_list.find((item, index) => { return item == 'tradingScenarios' }) !== undefined ? '此项为必填项!' : null}
  453. >
  454. <Checkbox.Group options={selectData.options} onChange={this.CheckChange.bind(this)} />
  455. </Form.Item>
  456. </div>
  457. <div className={styleData.cl}>
  458. <Form.Item
  459. label="网站网址"
  460. name="webSite"
  461. labelCol={{ style: { width: 150 } }}
  462. rules={[{ required: this.listTypes('webSite') == true ? true : false, message: '' }]}
  463. validateStatus={validation_list.find((item, index) => { return item == 'webSite' }) !== undefined ? 'error' : null}
  464. help={validation_list.find((item, index) => { return item == 'webSite' }) !== undefined ? '此项为必填项!' : null}
  465. >
  466. <Input id='webSite' style={{ width: form_width }} placeholder="请输入网站网址" defaultValue={Params.webSite} />
  467. </Form.Item>
  468. </div>
  469. <div className={styleData.cl}>
  470. <Form.Item
  471. label="网站名称"
  472. name="webSiteName"
  473. labelCol={{ style: { width: 150 } }}
  474. rules={[{ required: this.listTypes('webSiteName') == true ? true : false, message: '' }]}
  475. validateStatus={validation_list.find((item, index) => { return item == 'webSiteName' }) !== undefined ? 'error' : null}
  476. help={validation_list.find((item, index) => { return item == 'webSiteName' }) !== undefined ? '此项为必填项!' : null}
  477. >
  478. <Input id='webSiteName' style={{ width: form_width }} placeholder="请输入网站名称" defaultValue={Params.webSiteName} />
  479. </Form.Item>
  480. </div>
  481. <div className={styleData.cl}>
  482. <Form.Item
  483. label="ICP备案号"
  484. name="icp"
  485. labelCol={{ style: { width: 150 } }}
  486. rules={[{ required: this.listTypes('icp') == true ? true : false, message: '' }]}
  487. validateStatus={validation_list.find((item, index) => { return item == 'icp' }) !== undefined ? 'error' : null}
  488. help={validation_list.find((item, index) => { return item == 'icp' }) !== undefined ? '此项为必填项!' : null}
  489. >
  490. <Input id='icp' style={{ width: form_width }} placeholder="请输入ICP备案号" defaultValue={Params.icp} />
  491. </Form.Item>
  492. </div>
  493. <div className={styleData.cl}>
  494. <Form.Item
  495. label="APP名称"
  496. name="appName"
  497. labelCol={{ style: { width: 150 } }}
  498. rules={[{ required: this.listTypes('appName') == true ? true : false, message: '' }]}
  499. validateStatus={validation_list.find((item, index) => { return item == 'appName' }) !== undefined ? 'error' : null}
  500. help={validation_list.find((item, index) => { return item == 'appName' }) !== undefined ? '此项为必填项!' : null}
  501. >
  502. <Input id='appName' style={{ width: form_width }} placeholder="请输入APP名称" defaultValue={Params.appName} />
  503. </Form.Item>
  504. </div>
  505. <div className={styleData.cl}>
  506. <Form.Item
  507. label="公众号/小程序/生活号"
  508. name="wechatAppletName"
  509. labelCol={{ style: { width: 150 } }}
  510. rules={[{ required: this.listTypes('wechatAppletName') == true ? true : false, message: '' }]}
  511. validateStatus={validation_list.find((item, index) => { return item == 'wechatAppletName' }) !== undefined ? 'error' : null}
  512. help={validation_list.find((item, index) => { return item == 'wechatAppletName' }) !== undefined ? '此项为必填项!' : null}
  513. >
  514. <Input id='wechatAppletName' style={{ width: form_width }} placeholder="请输入名称" defaultValue={Params.wechatAppletName} />
  515. </Form.Item>
  516. </div>
  517. </div>
  518. <div className={styleData.center_right}>
  519. {rightArray.map((item, index) => (
  520. <Form.Item
  521. key={index}
  522. label={item.txt}
  523. name={item.value}
  524. labelCol={{ style: { width: 320 } }}
  525. rules={[{ required: this.listTypes(item.value) == true ? true : false, message: '' }]}
  526. // validateStatus={validation_list.find((item, index) => { return item == item.value }) !== undefined ? 'error' : null}
  527. // help={validation_list.find((item, index) => { return item == item.value }) !== undefined ? '此项为必填项!' : null}
  528. >
  529. <div className={styleData.cl} key={index}>
  530. <Upload
  531. {...headerProps}
  532. name={item.value}
  533. className={"Upload" + index}
  534. maxCount={1}
  535. showUploadList={false}
  536. accept={item.type}
  537. customRequest={this.handleChange.bind(this)}
  538. onChange={this.onChangeUpload.bind(this)}
  539. >
  540. {
  541. validation_list.find((items, index) => { return items == `${item.value}` }) !== undefined ?
  542. <Tooltip title="请上传必须文件!" color="red" key={index} defaultVisible={true} placement="rightTop">
  543. <Button icon={<UploadOutlined />} onClick={() => this.btnClick(index)}>选择文件</Button>
  544. </Tooltip>
  545. : <Button icon={<UploadOutlined />} onClick={() => this.btnClick(index)} >选择文件</Button>
  546. }
  547. </Upload>
  548. <div className={styleData.title_tips} style={{
  549. color: item.txts == '上传成功' ? 'green' : 'red',
  550. display : 'inline-block',
  551. marginLeft : '15px'
  552. }} >
  553. {scLodings == true && imgType == index && <Spin size="small" tip="上传中..." style={{
  554. fontSize: '12px'
  555. }}></Spin>}
  556. {scLodings == true && imgType !== index && item.txts}
  557. {scLodings == null && imgType !== index && item.txts}
  558. {scLodings == false && item.txts}
  559. </div>
  560. </div>
  561. </Form.Item>
  562. ))}
  563. </div>
  564. </Form>
  565. </div>
  566. )
  567. }
  568. }