myprojectvip.jsx 26 KB

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