myprojectvip.jsx 26 KB

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