projectvip.jsx 27 KB

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