projectvip.jsx 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import "./public.less";
  4. import "./shouKuan.less";
  5. import { AutoComplete, Button, Input, Spin, Table, Select, message, Tabs, Tag, Tooltip, Modal } from "antd";
  6. import OrderDesc from "../orderDetail/orderDesc";
  7. import { ChooseList } from "../../order/orderNew/chooseList"
  8. import ReactToPrint from "react-to-print";
  9. import OrderItemStatus from "../../../common/orderItemStatus";
  10. import { salesList } from "@/dataDic.js";
  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 ProjectVip = React.createClass({
  19. //
  20. getInitialState() {
  21. return {
  22. dvisible: false,
  23. pageNo: 1,
  24. totalPage: 0,
  25. searchValues: {
  26. status: "1"
  27. },//查询条件
  28. loading: false,
  29. changeList: undefined,// 子组件改变的表格title数组
  30. pagination: {
  31. defaultCurrent: 1,
  32. defaultPageSize: 10,
  33. showQuickJumper: true,
  34. pageSize: 10,
  35. onChange: function (page) {
  36. this.setState({
  37. pageNo: page,
  38. });
  39. this.loadData(page);
  40. }.bind(this),
  41. showTotal: function (total) {
  42. return "共" + total + "条数据";
  43. },
  44. },
  45. columns: [
  46. {
  47. title: "销售类型",
  48. dataIndex: "salesType",
  49. key: "salesType",
  50. className: "title-table",
  51. render: (text, record) => {
  52. return (
  53. <Tooltip
  54. title={salesList[text] + ((text == 3 || text == 4 || text == 5) ? (!record.other ? "" : "," + record.other) : "")}
  55. >
  56. <span>
  57. {salesList[text]}
  58. </span>
  59. </Tooltip>
  60. );
  61. },
  62. },
  63. {
  64. title: "合同编号",
  65. dataIndex: "contractNo",
  66. key: "contractNo",
  67. className: "title-table",
  68. width: 160,
  69. render: (text, record) => {
  70. return (
  71. <Tooltip
  72. title={
  73. <Button
  74. type="primary"
  75. onClick={(e) => {
  76. e.stopPropagation();
  77. let input = document.getElementById("copyText");
  78. input.value = text;
  79. input.select();
  80. document.execCommand("copy");
  81. message.success("复制成功");
  82. }}
  83. >
  84. 复制
  85. </Button>
  86. }
  87. >
  88. <div>
  89. {text}
  90. <div style={{ display: "flex" }}>
  91. <OrderItemStatus deleteSign={record.deleteSign} />
  92. {
  93. record.approval == 1
  94. ? <Tag color="#faa755">特批待审</Tag> :
  95. record.approval == 2 && <Tag color="#ff0000">特批通过</Tag>
  96. }
  97. </div>
  98. </div>
  99. </Tooltip>
  100. );
  101. },
  102. },
  103. {
  104. title: "客户名称",
  105. dataIndex: "userName",
  106. key: "userName",
  107. className: "title-table",
  108. width: 200,
  109. render: text => {
  110. return (
  111. <Tooltip title={text}>
  112. <div>{text}</div>
  113. </Tooltip>
  114. )
  115. }
  116. },
  117. {
  118. title: "订单编号",
  119. dataIndex: "orderNo",
  120. key: "orderNo",
  121. className: "title-table",
  122. width: 140,
  123. render: (text, record) => {
  124. return (
  125. <Tooltip
  126. title={
  127. <Button
  128. type="primary"
  129. onClick={(e) => {
  130. e.stopPropagation();
  131. let input = document.getElementById("copyText");
  132. input.value = text;
  133. input.select();
  134. document.execCommand("copy");
  135. message.success("复制成功");
  136. }}
  137. >
  138. 复制
  139. </Button>
  140. }
  141. >
  142. <div>
  143. {text}
  144. <div>
  145. {record.totalAmount >= 10 && <Tag color="#ef7207">大客户</Tag>}
  146. {record.projectType == 1 && <Tag color="rgb(22, 155, 213)">会员</Tag>}
  147. </div>
  148. </div>
  149. </Tooltip>
  150. );
  151. },
  152. },
  153. {
  154. title: "订单部门",
  155. dataIndex: "depName",
  156. key: "depName",
  157. className: "title-table",
  158. },
  159. {
  160. title: "订单负责人",
  161. dataIndex: "salesmanName",
  162. key: "salesmanName",
  163. className: "title-table",
  164. },
  165. {
  166. title: "财务负责人",
  167. dataIndex: "financeName",
  168. key: "financeName",
  169. className: "title-table",
  170. },
  171. {
  172. title: "会员项目",
  173. dataIndex: "projectName",
  174. key: "projectName",
  175. className: "title-table",
  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. className: "title-table",
  190. },
  191. {
  192. title: "项目说明",
  193. dataIndex: "taskComment",
  194. key: "taskComment",
  195. className: "title-table",
  196. width: 300,
  197. },
  198. {
  199. title: "状态",
  200. dataIndex: "status",
  201. key: "status",
  202. className: "title-table",
  203. width: 80,
  204. render: (text) => {
  205. return (
  206. <div>
  207. {["", "财务审核", "特批审核", "通过", "驳回"][text]}
  208. </div>
  209. );
  210. }
  211. },
  212. {
  213. title: "操作",
  214. dataIndex: "pictureUrl",
  215. key: "pictureUrl",
  216. className: "title-table",
  217. render: (text, recard) => {
  218. return (
  219. <div>
  220. <Button
  221. type="primary"
  222. style={{ margin: 5 }}
  223. onClick={(e) => {
  224. e.stopPropagation();
  225. let arr = text || [];
  226. this.setState({
  227. pictureUrlArr: splitUrl(arr, ",", globalConfig.avatarHost + "/upload"),
  228. recard,
  229. }, () => {
  230. this.setState({
  231. imgListVisible: true,
  232. })
  233. })
  234. }}
  235. >
  236. 审核
  237. </Button>
  238. <VipLogs id={recard.id} />
  239. </div>
  240. );
  241. },
  242. },
  243. ],
  244. dataSource: [],
  245. fjlist: [],// 营销员列表
  246. checkOrderNo: "",//操作订单编号
  247. checkData: "",//操作描述
  248. checkVisible: "",//审核弹窗开关
  249. checkId: "",//会员项目编号
  250. result: -1,//1同意 0驳回
  251. imgListVisible: false,//附件弹窗
  252. pictureUrlArr: [],//附件
  253. recard: {},
  254. };
  255. },
  256. componentWillMount() {
  257. this.loadData();
  258. this.departmentList();
  259. },
  260. // 获取订单部门
  261. departmentList() {
  262. $.ajax({
  263. method: "get",
  264. dataType: "json",
  265. crossDomain: false,
  266. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  267. data: {},
  268. success: function (data) {
  269. let thedata = data.data;
  270. let theArr = [];
  271. if (!thedata) {
  272. if (data.error && data.error.length) {
  273. message.warning(data.error[0].message);
  274. }
  275. } else {
  276. thedata.map(function (item, index) {
  277. theArr.push({
  278. key: index,
  279. name: item.name,
  280. id: item.id,
  281. });
  282. });
  283. }
  284. this.setState({
  285. departmentArr: theArr,
  286. });
  287. }.bind(this),
  288. }).always(
  289. function () {
  290. }.bind(this)
  291. );
  292. },
  293. // 列表数据
  294. loadData(pageNo, pageSize) {
  295. const { searchValues, pagination } = this.state
  296. this.setState({
  297. loading: true,
  298. });
  299. let datas = Object.assign(searchValues, {
  300. pageNo: pageNo || 1,
  301. pageSize: pageSize || 10,
  302. shiroType: 2, //财务审核
  303. });
  304. $.ajax({
  305. method: "get",
  306. dataType: "json",
  307. crossDomain: false,
  308. url: globalConfig.context + "/api/admin/orderProject/memberList",
  309. data: datas,
  310. success: function (data) {
  311. this.setState({
  312. loading: false,
  313. });
  314. if (data.error && data.error.length === 0) {
  315. if (data.data.list) {
  316. pagination.current = data.data.pageNo;
  317. pagination.total = data.data.totalCount;
  318. if (data.data && data.data.list && !data.data.list.length) {
  319. pagination.current = 0;
  320. pagination.total = 0;
  321. }
  322. this.setState({
  323. dataSource: data.data.list,
  324. pagination: this.state.pagination,
  325. pageNo: data.data.pageNo,
  326. totalPage: data.data.totalPage,
  327. });
  328. } else {
  329. this.setState({
  330. dataSource: data.data,
  331. pagination: false,
  332. });
  333. }
  334. } else {
  335. message.warning(data.error[0].message);
  336. }
  337. }.bind(this),
  338. }).always(
  339. function () {
  340. this.setState({
  341. loading: false,
  342. });
  343. }.bind(this)
  344. );
  345. },
  346. // 点击行
  347. tableRowClick(record) {
  348. this.state.RowData = record;
  349. this.setState({
  350. showDesc: true,
  351. });
  352. },
  353. // 关闭
  354. closeDesc(e, s) {
  355. this.state.showDesc = e;
  356. if (s) {
  357. this.loadData(this.state.pageNo);
  358. }
  359. },
  360. // 搜索
  361. search() {
  362. this.setState({
  363. selectedRowKeys: []
  364. })
  365. this.loadData();
  366. },
  367. // 重置
  368. reset() {
  369. this.setState({
  370. searchValues: JSON.parse(JSON.stringify({})),
  371. }, () => {
  372. this.Cascaders.empty();
  373. this.loadData();
  374. })
  375. },
  376. // 点击审核
  377. checkRemark(nmb) {
  378. this.setState({
  379. checkVisible: true,
  380. checkId: this.state.recard.id,
  381. result: nmb
  382. });
  383. },
  384. // 审核
  385. toExamine() {
  386. if (!this.state.checkData) {
  387. message.warning("请填写审核说明~");
  388. return;
  389. }
  390. this.setState({
  391. loading: true,
  392. });
  393. $.ajax({
  394. method: "POST",
  395. dataType: "json",
  396. crossDomain: false,
  397. url: globalConfig.context + "/api/admin/orderProject/examineMemberProject",
  398. data: {
  399. id: this.state.checkId,
  400. remarks: this.state.checkData,
  401. result: this.state.result, //1同意 0驳回
  402. type: 0, //0财务审核 1特批审核
  403. },
  404. }).done(
  405. function (data) {
  406. if (!data.error.length) {
  407. message.success("审核成功!");
  408. this.setState({
  409. loading: false,
  410. checkVisible: false,
  411. checkData: '',
  412. imgListVisible: false,
  413. });
  414. this.loadData()
  415. } else {
  416. message.warning(data.error[0].message);
  417. }
  418. }.bind(this)
  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: 2, //财务审核
  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: 190, 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="5">全部</Option>
  728. </Select>
  729. <Button
  730. type="primary"
  731. onClick={this.search}
  732. style={{ marginLeft: 10 }}
  733. disabled={this.state.loading ? true : false}
  734. >
  735. 搜索
  736. </Button>
  737. <Button onClick={this.reset}>重置</Button>
  738. </div>
  739. </TabPane>
  740. <TabPane tab="打印" key="3">
  741. <Button
  742. type="primary"
  743. style={{ margin: "11px 0px 10px 10px" }}
  744. onClick={this.printAll}
  745. >
  746. 打印当前列表
  747. </Button>
  748. </TabPane>
  749. <TabPane tab="导出Excel" key="4">
  750. <Button
  751. type="primary"
  752. style={{ margin: "11px 0px 10px 10px" }}
  753. onClick={this.exportAll}
  754. >
  755. 导出当前列表
  756. </Button>
  757. </TabPane>
  758. </Tabs>
  759. <div className="patent-table">
  760. <Spin spinning={this.state.loading}>
  761. <Table
  762. bordered
  763. columns={
  764. this.state.changeList == undefined
  765. ? this.state.columns
  766. : this.state.changeList
  767. }
  768. dataSource={this.state.dataSource}
  769. pagination={this.state.pagination}
  770. onRowDoubleClick={this.tableRowClick.bind(this)}
  771. size="small"
  772. />
  773. </Spin>
  774. </div>
  775. <textarea id="copyText" style={{ opacity: 0 }} />
  776. {/* 订单详情 */}
  777. <OrderDesc
  778. data={this.state.RowData}
  779. showDesc={this.state.showDesc}
  780. closeDesc={this.closeDesc.bind(this)}
  781. />
  782. {
  783. //打印预览
  784. this.state.dvisible &&
  785. <Modal
  786. visible={this.state.dvisible}
  787. footer=""
  788. title="所有列表信息"
  789. className="admin-desc-content"
  790. width="1300px"
  791. onCancel={() => {
  792. this.loadData();
  793. this.setState({
  794. dvisible: false,
  795. });
  796. }}
  797. >
  798. <Spin spinning={this.state.loading}>
  799. <div
  800. className="patent-table"
  801. style={{
  802. padding: "25px 0 30px 30px",
  803. }}
  804. ref={(e) => {
  805. this.refs.all = e;
  806. }}
  807. >
  808. <Table
  809. columns={this.truncate(this.state.columns)}
  810. dataSource={this.state.dataSource}
  811. pagination={false}
  812. bordered
  813. size="small"
  814. />
  815. </div>
  816. </Spin>
  817. <ReactToPrint
  818. trigger={() => (
  819. <Button
  820. type="primary"
  821. style={{
  822. float: "right",
  823. marginTop: 10,
  824. position: "absolute",
  825. top: 0,
  826. right: 30,
  827. }}
  828. >
  829. 打印
  830. </Button>
  831. )}
  832. content={() => this.refs.all}
  833. />
  834. </Modal>
  835. }
  836. {
  837. //审核弹窗
  838. this.state.checkVisible &&
  839. <Modal
  840. width="400px"
  841. maskClosable={false}
  842. title="审核订单"
  843. confirmLoading={this.state.loading}
  844. visible={this.state.checkVisible}
  845. onOk={this.toExamine}
  846. okText={this.state.result == 1 ? "通过" : this.state.result == 0 && "驳回"}
  847. onCancel={() => {
  848. this.loadData()
  849. this.setState({
  850. checkVisible: false,
  851. checkData: '',
  852. })
  853. }}
  854. >
  855. <TextArea
  856. rows={4}
  857. value={this.state.checkData}
  858. onChange={(e) => {
  859. this.setState({
  860. checkData: e.target.value,
  861. })
  862. }}
  863. placeholder="请填写审核内容"
  864. />
  865. </Modal>
  866. }
  867. {
  868. //查看附件
  869. this.state.imgListVisible &&
  870. <Modal
  871. maskClosable={false}
  872. visible={this.state.imgListVisible}
  873. onOk={() => {
  874. this.setState({
  875. imgListVisible: false,
  876. });
  877. }}
  878. onCancel={() => {
  879. this.setState({
  880. imgListVisible: false,
  881. });
  882. }}
  883. width="600px"
  884. title="审核"
  885. footer=""
  886. >
  887. <div>附件</div>
  888. <div>
  889. <ImgList
  890. fileList={this.state.pictureUrlArr}
  891. domId="publicStatistics"
  892. />
  893. </div>
  894. <div
  895. style={{
  896. display: "flex",
  897. flexDirection: "row",
  898. justifyContent: "center",
  899. }}
  900. >
  901. {
  902. this.state.recard.status == 1 &&
  903. <Button
  904. type="primary"
  905. style={{ margin: '20px 10px 5px' }}
  906. onClick={(e) => {
  907. e.stopPropagation();
  908. this.checkRemark(1);
  909. }}
  910. >
  911. 通过
  912. </Button>
  913. }
  914. {
  915. this.state.recard.status == 1 &&
  916. <Button
  917. type="danger"
  918. style={{ margin: '20px 10px 5px' }}
  919. onClick={(e) => {
  920. e.stopPropagation();
  921. this.checkRemark(0);
  922. }}
  923. >
  924. 驳回
  925. </Button>
  926. }
  927. </div>
  928. </Modal>
  929. }
  930. </div>
  931. );
  932. },
  933. });
  934. export default ProjectVip;