myprojectvip.jsx 26 KB

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