myprojectvip.jsx 27 KB

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