approvedvipproject.jsx 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import { AutoComplete, Button, Input, Spin, Table, Select, message, Tabs, Tag, Tooltip, Modal } from "antd";
  4. import OrderDesc from "../../financialManage/orderDetail/orderDesc"
  5. import ResolutionDetail from "@/resolutionDetail";
  6. import { ChooseList } from "../../order/orderNew/chooseList"
  7. import ReactToPrint from "react-to-print";
  8. import OrderItemStatus from "../../../common/orderItemStatus";
  9. import { salesList } from "@/dataDic.js";
  10. import ShowModalDiv from "@/showModal.jsx";
  11. import VipLogs from "../../../common/logPopup/viplogs";//会员日志
  12. import { splitUrl } from "@/tools";
  13. import ImgList from "../../../common/imgList";
  14. const { TabPane } = Tabs;
  15. //总裁特批会员项目
  16. const ApprovedVipProject = React.createClass({
  17. //
  18. getInitialState() {
  19. return {
  20. dvisible: false,
  21. pageNo: 1,
  22. totalPage: 0,
  23. searchValues: {
  24. status: "2"
  25. },//查询条件
  26. loading: false,
  27. changeList: undefined,// 子组件改变的表格title数组
  28. pagination: {
  29. defaultCurrent: 1,
  30. defaultPageSize: 10,
  31. showQuickJumper: true,
  32. pageSize: 10,
  33. onChange: function (page) {
  34. this.setState({
  35. pageNo: page,
  36. });
  37. this.loadData(page);
  38. }.bind(this),
  39. showTotal: function (total) {
  40. return "共" + total + "条数据";
  41. },
  42. },
  43. columns: [
  44. {
  45. title: "销售类型",
  46. dataIndex: "salesType",
  47. key: "salesType",
  48. render: (text, record) => {
  49. return (
  50. <Tooltip
  51. title={salesList[text] + ((text == 3 || text == 4 || text == 5) ? (!record.other ? "" : "," + record.other) : "")}
  52. >
  53. <span>
  54. {salesList[text]}
  55. </span>
  56. </Tooltip>
  57. );
  58. },
  59. },
  60. {
  61. title: "合同编号",
  62. dataIndex: "contractNo",
  63. key: "contractNo",
  64. width: 160,
  65. render: (text, record) => {
  66. return (
  67. <Tooltip
  68. title={
  69. <Button
  70. type="primary"
  71. onClick={(e) => {
  72. e.stopPropagation();
  73. let input = document.getElementById("copyText");
  74. input.value = text;
  75. input.select();
  76. document.execCommand("copy");
  77. message.success("复制成功");
  78. }}
  79. >
  80. 复制
  81. </Button>
  82. }
  83. >
  84. <div>
  85. {text}
  86. <div style={{ display: "flex" }}>
  87. <OrderItemStatus deleteSign={record.deleteSign} />
  88. {
  89. record.approval == 1
  90. ? <Tag color="#faa755">特批待审</Tag> :
  91. record.approval == 2 && <Tag color="#ff0000">特批通过</Tag>
  92. }
  93. </div>
  94. </div>
  95. </Tooltip>
  96. );
  97. },
  98. },
  99. {
  100. title: "客户名称",
  101. dataIndex: "userName",
  102. key: "userName",
  103. width: 160,
  104. render: text => {
  105. return (
  106. <Tooltip title={text}>
  107. <div>{text}</div>
  108. </Tooltip>
  109. )
  110. }
  111. },
  112. {
  113. title: "订单编号",
  114. dataIndex: "orderNo",
  115. key: "orderNo",
  116. width: 140,
  117. render: (text, record) => {
  118. return (
  119. <Tooltip
  120. title={
  121. <Button
  122. type="primary"
  123. onClick={(e) => {
  124. e.stopPropagation();
  125. let input = document.getElementById("copyText");
  126. input.value = text;
  127. input.select();
  128. document.execCommand("copy");
  129. message.success("复制成功");
  130. }}
  131. >
  132. 复制
  133. </Button>
  134. }
  135. >
  136. <div>
  137. {text}
  138. <div>
  139. {record.totalAmount >= 10 && <Tag color="#ef7207">大客户</Tag>}
  140. {record.projectType == 1 && <Tag color="rgb(22, 155, 213)">会员</Tag>}
  141. </div>
  142. </div>
  143. </Tooltip>
  144. );
  145. },
  146. },
  147. {
  148. title: "订单部门",
  149. dataIndex: "depName",
  150. key: "depName",
  151. },
  152. {
  153. title: "订单负责人",
  154. dataIndex: "salesmanName",
  155. key: "salesmanName",
  156. },
  157. {
  158. title: "财务负责人",
  159. dataIndex: "financeName",
  160. key: "financeName",
  161. },
  162. {
  163. title: "会员项目",
  164. dataIndex: "projectName",
  165. key: "projectName",
  166. render: (text, record) => {
  167. return (
  168. <div>
  169. {text}
  170. {(record.memberType == 1 || record.memberType == 2) && <Tag color="#ff0000">特批项目</Tag>}
  171. </div>
  172. )
  173. }
  174. },
  175. {
  176. title: "数量",
  177. dataIndex: "commodityQuantity",
  178. key: "commodityQuantity",
  179. },
  180. {
  181. title: "总年限",
  182. dataIndex: "yearSum",
  183. key: "yearSum",
  184. render: (text, record) => {
  185. return (
  186. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  187. );
  188. }
  189. },
  190. {
  191. title: "年限",
  192. dataIndex: "serviceLife",
  193. key: "serviceLife",
  194. width: 60,
  195. render: (text, record) => {
  196. return (
  197. !!text && JSON.parse(text).map(item =>
  198. <div>{item}年 </div>
  199. )
  200. );
  201. }
  202. },
  203. {
  204. title: "本次派单",
  205. dataIndex: "serviceYear",
  206. key: "serviceYear",
  207. render: (text, record) => {
  208. return (
  209. <div>{!text ? "" : text + "年"}</div>
  210. );
  211. }
  212. },
  213. {
  214. title: "项目说明",
  215. dataIndex: "taskComment",
  216. key: "taskComment",
  217. render: (text, record) => {
  218. return (
  219. <div style={{ maxWidth: 220 }}>{text}</div>
  220. );
  221. }
  222. },
  223. {
  224. title: "状态",
  225. dataIndex: "status",
  226. key: "status",
  227. render: (text) => {
  228. return (
  229. <div>
  230. {["", "财务审核", "特批审核", "通过", "驳回"][text]}
  231. </div>
  232. );
  233. }
  234. },
  235. {
  236. title: "操作",
  237. dataIndex: "pictureUrl",
  238. key: "pictureUrl",
  239. width: 90,
  240. render: (text, recard) => {
  241. return (
  242. <div>
  243. <Button
  244. type="primary"
  245. style={{ margin: 5 }}
  246. onClick={(e) => {
  247. e.stopPropagation();
  248. let arr = text || [];
  249. this.setState({
  250. pictureUrlArr: splitUrl(arr, ",", globalConfig.avatarHost + "/upload"),
  251. recard,
  252. }, () => {
  253. this.setState({
  254. imgListVisible: true,
  255. })
  256. })
  257. }}
  258. >
  259. 审核
  260. </Button>
  261. <VipLogs id={recard.id} />
  262. </div>
  263. );
  264. },
  265. },
  266. ],
  267. dataSource: [],
  268. fjlist: [],// 营销员列表
  269. checkOrderNo: "",//操作订单编号
  270. checkData: "",//操作描述
  271. checkVisible: "",//审核弹窗开关
  272. checkId: "",//会员项目编号
  273. result: -1,//1同意 0驳回
  274. imgListVisible: false,//附件弹窗
  275. pictureUrlArr: [],//附件
  276. recard: {},
  277. };
  278. },
  279. componentWillMount() {
  280. this.loadData();
  281. this.departmentList();
  282. },
  283. // 获取订单部门
  284. departmentList() {
  285. $.ajax({
  286. method: "get",
  287. dataType: "json",
  288. crossDomain: false,
  289. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  290. data: {},
  291. success: function (data) {
  292. let thedata = data.data;
  293. let theArr = [];
  294. if (!thedata) {
  295. if (data.error && data.error.length) {
  296. message.warning(data.error[0].message);
  297. }
  298. } else {
  299. thedata.map(function (item, index) {
  300. theArr.push({
  301. key: index,
  302. name: item.name,
  303. id: item.id,
  304. });
  305. });
  306. }
  307. this.setState({
  308. departmentArr: theArr,
  309. });
  310. }.bind(this),
  311. }).always(
  312. function () {
  313. }.bind(this)
  314. );
  315. },
  316. // 列表数据
  317. loadData(pageNo, pageSize) {
  318. const { searchValues, pagination } = this.state
  319. this.setState({
  320. loading: true,
  321. });
  322. let datas = Object.assign(searchValues, {
  323. pageNo: pageNo || 1,
  324. pageSize: pageSize || 10,
  325. shiroType: 3, //特批审核
  326. });
  327. $.ajax({
  328. method: "get",
  329. dataType: "json",
  330. crossDomain: false,
  331. url: globalConfig.context + "/api/admin/orderProject/memberList",
  332. data: datas,
  333. success: function (data) {
  334. this.setState({
  335. loading: false,
  336. });
  337. if (data.error && data.error.length === 0) {
  338. if (data.data.list) {
  339. pagination.current = data.data.pageNo;
  340. pagination.total = data.data.totalCount;
  341. if (data.data && data.data.list && !data.data.list.length) {
  342. pagination.current = 0;
  343. pagination.total = 0;
  344. }
  345. this.setState({
  346. dataSource: data.data.list,
  347. pagination: this.state.pagination,
  348. pageNo: data.data.pageNo,
  349. totalPage: data.data.totalPage,
  350. });
  351. } else {
  352. this.setState({
  353. dataSource: data.data,
  354. pagination: false,
  355. });
  356. }
  357. } else {
  358. message.warning(data.error[0].message);
  359. }
  360. }.bind(this),
  361. }).always(
  362. function () {
  363. this.setState({
  364. loading: false,
  365. });
  366. }.bind(this)
  367. );
  368. },
  369. // 点击行
  370. tableRowClick(record) {
  371. this.state.RowData = record;
  372. this.setState({
  373. showDesc: true,
  374. });
  375. },
  376. // 关闭
  377. closeDesc(e, s) {
  378. this.state.showDesc = e;
  379. if (s) {
  380. this.loadData(this.state.pageNo);
  381. }
  382. },
  383. // 搜索
  384. search() {
  385. this.setState({
  386. selectedRowKeys: []
  387. })
  388. this.loadData();
  389. },
  390. // 重置
  391. reset() {
  392. this.setState({
  393. searchValues: JSON.parse(JSON.stringify({})),
  394. }, () => {
  395. this.loadData();
  396. })
  397. },
  398. // 点击审核
  399. checkRemark(nmb) {
  400. this.setState({
  401. checkVisible: true,
  402. checkId: this.state.recard.id,
  403. result: nmb
  404. });
  405. },
  406. // 审核
  407. toExamine() {
  408. if (!this.state.checkData) {
  409. message.warning("请填写审核说明~");
  410. return;
  411. }
  412. this.setState({
  413. loading: true,
  414. });
  415. $.ajax({
  416. method: "POST",
  417. dataType: "json",
  418. crossDomain: false,
  419. url: globalConfig.context + "/api/admin/orderProject/examineMemberProject",
  420. data: {
  421. id: this.state.checkId,
  422. remarks: this.state.checkData,
  423. result: this.state.result, //1同意 0驳回
  424. type: 1, //0财务审核 1特批审核
  425. },
  426. }).done(
  427. function (data) {
  428. if (!data.error.length) {
  429. message.success("审核成功!");
  430. this.setState({
  431. loading: false,
  432. checkVisible: false,
  433. checkData: '',
  434. imgListVisible: false,
  435. });
  436. this.loadData()
  437. } else {
  438. message.warning(data.error[0].message);
  439. }
  440. }.bind(this)
  441. );
  442. },
  443. // 更改表格显示数据
  444. changeList(arr) {
  445. const newArr = [];
  446. this.state.columns.forEach((item) => {
  447. arr.forEach((val) => {
  448. if (val === item.title) {
  449. newArr.push(item);
  450. }
  451. });
  452. });
  453. this.setState({
  454. changeList: newArr,
  455. });
  456. },
  457. // 导出当前列表
  458. exportAll() {
  459. message.config({
  460. duration: 20,
  461. });
  462. let loading = message.loading("下载中...");
  463. this.setState({
  464. exportPendingLoading: true,
  465. });
  466. let data = {
  467. shiroType: 3, //特批审核
  468. };
  469. let obj1 = JSON.parse(JSON.stringify(this.state.searchValues));
  470. data = Object.assign(data, obj1);
  471. $.ajax({
  472. method: "get",
  473. dataType: "json",
  474. crossDomain: false,
  475. url: "/api/admin/orderProject/memberList/export",
  476. data,
  477. success: function (data) {
  478. if (data.error.length === 0) {
  479. this.download(data.data);
  480. } else {
  481. message.warning(data.error[0].message);
  482. }
  483. }.bind(this),
  484. }).always(
  485. function () {
  486. loading();
  487. this.setState({
  488. exportPendingLoading: false,
  489. });
  490. }.bind(this)
  491. );
  492. },
  493. // 打印
  494. printAll() {
  495. this.setState({
  496. dvisible: true,
  497. });
  498. this.loadData(1, 9999999);
  499. },
  500. // 下载
  501. download(fileName) {
  502. window.location.href =
  503. globalConfig.context + "/open/download?fileName=" + fileName;
  504. },
  505. // 查询订单负责人列表
  506. followUp(e) {
  507. const { searchValues } = this.state;
  508. this.setState({
  509. searchValues: Object.assign(searchValues, {
  510. aname: e,
  511. }),
  512. });
  513. $.ajax({
  514. method: "get",
  515. dataType: "json",
  516. crossDomain: false,
  517. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  518. data: {
  519. adminName: e,
  520. },
  521. success: function (data) {
  522. let thedata = data.data;
  523. if (!thedata) {
  524. if (data.error && data.error.length) {
  525. message.warning(data.error[0].message);
  526. }
  527. thedata = {};
  528. }
  529. this.setState({
  530. fjlist: thedata,
  531. });
  532. }.bind(this),
  533. }).always(
  534. function () {
  535. this.setState({
  536. loading: false,
  537. });
  538. }.bind(this)
  539. );
  540. },
  541. // 选中订单负责人
  542. selectF(value) {
  543. const { searchValues, fjlist } = this.state;
  544. const newdataSources = JSON.stringify(fjlist) == "{}" ? [] : fjlist;
  545. this.setState({
  546. searchValues: Object.assign(searchValues, {
  547. salesmanId: newdataSources.find((item) => item.name == value).id,
  548. }),
  549. });
  550. },
  551. // 失去焦点
  552. blurChange(e) {
  553. let theType = "";
  554. let contactLists = this.state.customerArr || [];
  555. if (e) {
  556. contactLists.map(function (item) {
  557. if (item.name == e.toString()) {
  558. theType = item.id;
  559. }
  560. });
  561. }
  562. this.setState({
  563. theTypes: theType,
  564. });
  565. },
  566. // 删除数组最后一项(删除操作列)
  567. truncate(arr) {
  568. return arr.filter(function (v, i, ar) {
  569. return i !== ar.length - 1
  570. })
  571. },
  572. render() {
  573. const { TextArea } = Input
  574. const { searchValues, departmentArr = [] } = this.state
  575. const dataSources = this.state.fjlist || [];
  576. const options = dataSources.map((group) => (
  577. <Select.Option key={group.id} value={group.name}>
  578. {group.name}
  579. </Select.Option>
  580. ));
  581. return (
  582. <div className="user-content">
  583. <ShowModalDiv ShowModal={this.state.showModal} />
  584. <div className="content-title" style={{ marginBottom: 10 }}>
  585. <span style={{ fontWeight: 900, fontSize: 16 }}>特批会员项目</span>
  586. </div>
  587. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  588. <TabPane tab="更改表格显示数据" key="1">
  589. <div style={{ marginLeft: 10 }}>
  590. <ChooseList
  591. columns={this.state.columns}
  592. changeFn={this.changeList}
  593. changeList={this.state.changeList}
  594. top={55}
  595. margin={11}
  596. />
  597. </div>
  598. </TabPane>
  599. <TabPane tab="搜索" key="2">
  600. <div className="user-search" style={{ marginLeft: 10 }}>
  601. <Input
  602. placeholder="订单编号"
  603. value={searchValues["orderNo"]
  604. ? searchValues["orderNo"]
  605. : ""}
  606. onChange={(e) => {
  607. searchValues["orderNo"] = e.target.value;
  608. this.setState({
  609. searchValues: searchValues,
  610. });
  611. }}
  612. />
  613. <Input
  614. placeholder="客户名称"
  615. value={searchValues["userName"]
  616. ? searchValues["userName"]
  617. : ""}
  618. onChange={(e) => {
  619. searchValues["userName"] = e.target.value;
  620. this.setState({
  621. searchValues: searchValues,
  622. });
  623. }}
  624. />
  625. <Select
  626. placeholder="订单部门"
  627. style={{ width: 190, marginRight: 10 }}
  628. value={searchValues["depId"]
  629. ? searchValues["depId"]
  630. : undefined}
  631. onChange={(e) => {
  632. searchValues["depId"] = e;
  633. this.setState({
  634. searchValues: searchValues,
  635. });
  636. }}
  637. >
  638. {departmentArr.map(function (item) {
  639. return (
  640. <Select.Option key={item.id}>{item.name}</Select.Option>
  641. );
  642. })}
  643. </Select>
  644. <Input
  645. placeholder="合同编号"
  646. value={searchValues["contractNo"]
  647. ? searchValues["contractNo"]
  648. : ""}
  649. onChange={(e) => {
  650. searchValues["contractNo"] = e.target.value;
  651. this.setState({
  652. searchValues: searchValues,
  653. });
  654. }}
  655. />
  656. <AutoComplete
  657. className="certain-category-search"
  658. dropdownClassName="certain-category-search-dropdown"
  659. dropdownMatchSelectWidth={false}
  660. style={{ width: "120px" }}
  661. dataSource={options}
  662. placeholder="订单负责人"
  663. value={searchValues.aname || undefined}
  664. onChange={this.followUp.bind(this)}
  665. filterOption={true}
  666. onSelect={this.selectF.bind(this)}
  667. >
  668. <Input />
  669. </AutoComplete>
  670. <Input
  671. placeholder="项目名称"
  672. value={searchValues["projectName"]
  673. ? searchValues["projectName"]
  674. : ""}
  675. onChange={(e) => {
  676. searchValues["projectName"] = e.target.value;
  677. this.setState({
  678. searchValues: searchValues,
  679. });
  680. }}
  681. />
  682. <Select
  683. style={{ width: 120 }}
  684. placeholder="签单金额"
  685. value={searchValues["amountStatus"]
  686. ? searchValues["amountStatus"]
  687. : undefined}
  688. onChange={(e) => {
  689. searchValues["amountStatus"] = e;
  690. this.setState({
  691. searchValues: searchValues,
  692. });
  693. }}
  694. >
  695. <Option value="0">10万元以下</Option>
  696. <Option value="1">10~20万元</Option>
  697. <Option value="2">20~30万元</Option>
  698. <Option value="3">30~40万元</Option>
  699. <Option value="4">40万元以上</Option>
  700. </Select>
  701. <Select
  702. style={{ width: 120 }}
  703. placeholder="特批状态"
  704. value={searchValues["approval"]
  705. ? searchValues["approval"]
  706. : undefined}
  707. onChange={(e) => {
  708. searchValues["approval"] = e;
  709. this.setState({
  710. searchValues: searchValues,
  711. });
  712. }}
  713. >
  714. <Option value="0">非特批</Option>
  715. <Option value="1">特批待审</Option>
  716. <Option value="2">特批通过</Option>
  717. <Option value="4">全部特批</Option>
  718. </Select>
  719. <Select
  720. style={{ width: 120 }}
  721. placeholder="审核状态"
  722. value={searchValues["status"]
  723. ? searchValues["status"]
  724. : undefined}
  725. onChange={(e) => {
  726. searchValues["status"] = e;
  727. this.setState({
  728. searchValues: searchValues,
  729. });
  730. }}
  731. >
  732. <Option value="1">财务审核</Option>
  733. <Option value="2">特批审核</Option>
  734. <Option value="3">通过</Option>
  735. <Option value="5">全部</Option>
  736. </Select>
  737. <Button
  738. type="primary"
  739. onClick={this.search}
  740. style={{ marginLeft: 10 }}
  741. disabled={this.state.loading ? true : false}
  742. >
  743. 搜索
  744. </Button>
  745. <Button onClick={this.reset}>重置</Button>
  746. </div>
  747. </TabPane>
  748. <TabPane tab="打印" key="3">
  749. <Button
  750. type="primary"
  751. style={{ margin: "11px 0px 10px 10px" }}
  752. onClick={this.printAll}
  753. >
  754. 打印当前列表
  755. </Button>
  756. </TabPane>
  757. <TabPane tab="导出Excel" key="4">
  758. <Button
  759. type="primary"
  760. style={{ margin: "11px 0px 10px 10px" }}
  761. onClick={this.exportAll}
  762. >
  763. 导出当前列表
  764. </Button>
  765. </TabPane>
  766. </Tabs>
  767. <div className="patent-table">
  768. <Spin spinning={this.state.loading}>
  769. <Table
  770. bordered
  771. columns={
  772. this.state.changeList == undefined
  773. ? this.state.columns
  774. : this.state.changeList
  775. }
  776. dataSource={this.state.dataSource}
  777. pagination={this.state.pagination}
  778. onRowDoubleClick={this.tableRowClick.bind(this)}
  779. size="small"
  780. />
  781. </Spin>
  782. </div>
  783. <textarea id="copyText" style={{ opacity: 0 }} />
  784. {/* 订单详情 */}
  785. <OrderDesc
  786. data={this.state.RowData}
  787. showDesc={this.state.showDesc}
  788. closeDesc={this.closeDesc.bind(this)}
  789. />
  790. {
  791. //打印预览
  792. this.state.dvisible &&
  793. <Modal
  794. visible={this.state.dvisible}
  795. footer=""
  796. title="所有列表信息"
  797. className="admin-desc-content"
  798. width="1300px"
  799. onCancel={() => {
  800. this.loadData();
  801. this.setState({
  802. dvisible: false,
  803. });
  804. }}
  805. >
  806. <Spin spinning={this.state.loading}>
  807. <div
  808. className="patent-table"
  809. style={{
  810. padding: "25px 0 30px 30px",
  811. }}
  812. ref={(e) => {
  813. this.refs.all = e;
  814. }}
  815. >
  816. <Table
  817. columns={this.truncate(this.state.columns)}
  818. dataSource={this.state.dataSource}
  819. pagination={false}
  820. bordered
  821. size="small"
  822. />
  823. </div>
  824. </Spin>
  825. <ReactToPrint
  826. trigger={() => (
  827. <Button
  828. type="primary"
  829. style={{
  830. float: "right",
  831. marginTop: 10,
  832. position: "absolute",
  833. top: 0,
  834. right: 30,
  835. }}
  836. >
  837. 打印
  838. </Button>
  839. )}
  840. content={() => this.refs.all}
  841. />
  842. </Modal>
  843. }
  844. {
  845. //审核弹窗
  846. this.state.checkVisible &&
  847. <Modal
  848. width="400px"
  849. maskClosable={false}
  850. title="审核订单"
  851. confirmLoading={this.state.loading}
  852. visible={this.state.checkVisible}
  853. onOk={this.toExamine}
  854. okText={this.state.result == 1 ? "通过" : this.state.result == 0 && "驳回"}
  855. onCancel={() => {
  856. this.loadData()
  857. this.setState({
  858. checkVisible: false,
  859. checkData: '',
  860. })
  861. }}
  862. >
  863. <TextArea
  864. rows={4}
  865. value={this.state.checkData}
  866. onChange={(e) => {
  867. this.setState({
  868. checkData: e.target.value,
  869. })
  870. }}
  871. placeholder="请填写审核内容"
  872. />
  873. </Modal>
  874. }
  875. {
  876. //查看附件
  877. this.state.imgListVisible &&
  878. <Modal
  879. maskClosable={false}
  880. visible={this.state.imgListVisible}
  881. onOk={() => {
  882. this.setState({
  883. imgListVisible: false,
  884. });
  885. }}
  886. onCancel={() => {
  887. this.setState({
  888. imgListVisible: false,
  889. });
  890. }}
  891. width="600px"
  892. title="审核"
  893. footer=""
  894. >
  895. <div>附件</div>
  896. <div>
  897. <ImgList
  898. fileList={this.state.pictureUrlArr}
  899. domId="publicStatistics"
  900. />
  901. </div>
  902. <div
  903. style={{
  904. display: "flex",
  905. flexDirection: "row",
  906. justifyContent: "center",
  907. }}
  908. >
  909. {
  910. this.state.recard.status == 2 &&
  911. <Button
  912. type="primary"
  913. style={{ margin: '20px 10px 5px' }}
  914. onClick={(e) => {
  915. e.stopPropagation();
  916. this.checkRemark(1);
  917. }}
  918. >
  919. 通过
  920. </Button>
  921. }
  922. {
  923. this.state.recard.status == 2 &&
  924. <Button
  925. type="danger"
  926. style={{ margin: '20px 10px 5px' }}
  927. onClick={(e) => {
  928. e.stopPropagation();
  929. this.checkRemark(0);
  930. }}
  931. >
  932. 驳回
  933. </Button>
  934. }
  935. </div>
  936. </Modal>
  937. }
  938. </div>
  939. );
  940. },
  941. });
  942. export default ApprovedVipProject;