projectvip.jsx 27 KB

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