projectvip.jsx 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967
  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. width: 60,
  197. render: (text, record) => {
  198. return (
  199. !!text && JSON.parse(text).map(item =>
  200. <div>{item}年 </div>
  201. )
  202. );
  203. }
  204. },
  205. {
  206. title: "本次派单",
  207. dataIndex: "serviceYear",
  208. key: "serviceYear",
  209. render: (text, record) => {
  210. return (
  211. <div>{!text ? "" : text + "年"}</div>
  212. );
  213. }
  214. },
  215. {
  216. title: "项目说明",
  217. dataIndex: "taskComment",
  218. key: "taskComment",
  219. render: (text, record) => {
  220. return (
  221. <div style={{ maxWidth: 220 }}>{text}</div>
  222. );
  223. }
  224. },
  225. {
  226. title: "状态",
  227. dataIndex: "status",
  228. key: "status",
  229. render: (text) => {
  230. return (
  231. <div>
  232. {["", "财务审核", "特批审核", "通过", "驳回"][text]}
  233. </div>
  234. );
  235. }
  236. },
  237. {
  238. title: "操作",
  239. dataIndex: "pictureUrl",
  240. key: "pictureUrl",
  241. width: 90,
  242. render: (text, recard) => {
  243. return (
  244. <div>
  245. <Button
  246. type="primary"
  247. style={{ margin: 5 }}
  248. onClick={(e) => {
  249. e.stopPropagation();
  250. let arr = text || [];
  251. this.setState({
  252. pictureUrlArr: splitUrl(arr, ",", globalConfig.avatarHost + "/upload"),
  253. recard,
  254. }, () => {
  255. this.setState({
  256. imgListVisible: true,
  257. })
  258. })
  259. }}
  260. >
  261. 审核
  262. </Button>
  263. <VipLogs id={recard.id} />
  264. </div>
  265. );
  266. },
  267. },
  268. ],
  269. dataSource: [],
  270. fjlist: [],// 营销员列表
  271. checkOrderNo: "",//操作订单编号
  272. checkData: "",//操作描述
  273. checkVisible: "",//审核弹窗开关
  274. checkId: "",//会员项目编号
  275. result: -1,//1同意 0驳回
  276. imgListVisible: false,//附件弹窗
  277. pictureUrlArr: [],//附件
  278. recard: {},
  279. };
  280. },
  281. componentWillMount() {
  282. this.loadData();
  283. // this.departmentList();
  284. },
  285. // 获取订单部门
  286. departmentList() {
  287. $.ajax({
  288. method: "get",
  289. dataType: "json",
  290. crossDomain: false,
  291. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  292. data: {},
  293. success: function (data) {
  294. let thedata = data.data;
  295. let theArr = [];
  296. if (!thedata) {
  297. if (data.error && data.error.length) {
  298. message.warning(data.error[0].message);
  299. }
  300. } else {
  301. thedata.map(function (item, index) {
  302. theArr.push({
  303. key: index,
  304. name: item.name,
  305. id: item.id,
  306. });
  307. });
  308. }
  309. this.setState({
  310. departmentArr: theArr,
  311. });
  312. }.bind(this),
  313. }).always(
  314. function () {
  315. }.bind(this)
  316. );
  317. },
  318. // 列表数据
  319. loadData(pageNo, pageSize) {
  320. const { searchValues, pagination } = this.state
  321. this.setState({
  322. loading: true,
  323. });
  324. let datas = Object.assign(searchValues, {
  325. pageNo: pageNo || 1,
  326. pageSize: pageSize || 10,
  327. shiroType: 2, //财务审核
  328. });
  329. $.ajax({
  330. method: "get",
  331. dataType: "json",
  332. crossDomain: false,
  333. url: globalConfig.context + "/api/admin/orderProject/memberList",
  334. data: datas,
  335. success: function (data) {
  336. this.setState({
  337. loading: false,
  338. });
  339. if (data.error && data.error.length === 0) {
  340. if (data.data.list) {
  341. pagination.current = data.data.pageNo;
  342. pagination.total = data.data.totalCount;
  343. if (data.data && data.data.list && !data.data.list.length) {
  344. pagination.current = 0;
  345. pagination.total = 0;
  346. }
  347. this.setState({
  348. dataSource: data.data.list,
  349. pagination: this.state.pagination,
  350. pageNo: data.data.pageNo,
  351. totalPage: data.data.totalPage,
  352. });
  353. } else {
  354. this.setState({
  355. dataSource: data.data,
  356. pagination: false,
  357. });
  358. }
  359. } else {
  360. message.warning(data.error[0].message);
  361. }
  362. }.bind(this),
  363. }).always(
  364. function () {
  365. this.setState({
  366. loading: false,
  367. });
  368. }.bind(this)
  369. );
  370. },
  371. // 点击行
  372. tableRowClick(record) {
  373. this.state.RowData = record;
  374. this.setState({
  375. showDesc: true,
  376. });
  377. },
  378. // 关闭
  379. closeDesc(e, s) {
  380. this.state.showDesc = e;
  381. if (s) {
  382. this.loadData(this.state.pageNo);
  383. }
  384. },
  385. // 搜索
  386. search() {
  387. this.setState({
  388. selectedRowKeys: []
  389. })
  390. this.loadData();
  391. },
  392. // 重置
  393. reset() {
  394. this.setState({
  395. searchValues: JSON.parse(JSON.stringify({})),
  396. }, () => {
  397. this.Cascaders.empty();
  398. this.loadData();
  399. })
  400. },
  401. // 点击审核
  402. checkRemark(nmb) {
  403. this.setState({
  404. checkVisible: true,
  405. checkId: this.state.recard.id,
  406. result: nmb
  407. });
  408. },
  409. // 审核
  410. toExamine() {
  411. if (!this.state.checkData) {
  412. message.warning("请填写审核说明~");
  413. return;
  414. }
  415. this.setState({
  416. loading: true,
  417. });
  418. $.ajax({
  419. method: "POST",
  420. dataType: "json",
  421. crossDomain: false,
  422. url: globalConfig.context + "/api/admin/orderProject/examineMemberProject",
  423. data: {
  424. id: this.state.checkId,
  425. remarks: this.state.checkData,
  426. result: this.state.result, //1同意 0驳回
  427. type: 0, //0财务审核 1特批审核
  428. },
  429. }).done(
  430. function (data) {
  431. if (!data.error.length) {
  432. message.success("审核成功!");
  433. this.setState({
  434. loading: false,
  435. checkVisible: false,
  436. checkData: '',
  437. imgListVisible: false,
  438. });
  439. this.loadData()
  440. } else {
  441. message.warning(data.error[0].message);
  442. }
  443. }.bind(this)
  444. );
  445. },
  446. // 更改表格显示数据
  447. changeList(arr) {
  448. const newArr = [];
  449. this.state.columns.forEach((item) => {
  450. arr.forEach((val) => {
  451. if (val === item.title) {
  452. newArr.push(item);
  453. }
  454. });
  455. });
  456. this.setState({
  457. changeList: newArr,
  458. });
  459. },
  460. // 导出当前列表
  461. exportAll() {
  462. message.config({
  463. duration: 20,
  464. });
  465. let loading = message.loading("下载中...");
  466. this.setState({
  467. exportPendingLoading: true,
  468. });
  469. let data = {
  470. shiroType: 2, //财务审核
  471. };
  472. let obj1 = JSON.parse(JSON.stringify(this.state.searchValues));
  473. data = Object.assign(data, obj1);
  474. $.ajax({
  475. method: "get",
  476. dataType: "json",
  477. crossDomain: false,
  478. url: "/api/admin/orderProject/memberList/export",
  479. data,
  480. success: function (data) {
  481. if (data.error.length === 0) {
  482. this.download(data.data);
  483. } else {
  484. message.warning(data.error[0].message);
  485. }
  486. }.bind(this),
  487. }).always(
  488. function () {
  489. loading();
  490. this.setState({
  491. exportPendingLoading: false,
  492. });
  493. }.bind(this)
  494. );
  495. },
  496. // 打印
  497. printAll() {
  498. this.setState({
  499. dvisible: true,
  500. });
  501. this.loadData(1, 9999999);
  502. },
  503. // 下载
  504. download(fileName) {
  505. window.location.href =
  506. globalConfig.context + "/open/download?fileName=" + fileName;
  507. },
  508. // 查询订单负责人列表
  509. followUp(e) {
  510. const { searchValues } = this.state;
  511. this.setState({
  512. searchValues: Object.assign(searchValues, {
  513. aname: e,
  514. }),
  515. });
  516. $.ajax({
  517. method: "get",
  518. dataType: "json",
  519. crossDomain: false,
  520. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  521. data: {
  522. adminName: e,
  523. },
  524. success: function (data) {
  525. let thedata = data.data;
  526. if (!thedata) {
  527. if (data.error && data.error.length) {
  528. message.warning(data.error[0].message);
  529. }
  530. thedata = {};
  531. }
  532. this.setState({
  533. fjlist: thedata,
  534. });
  535. }.bind(this),
  536. }).always(
  537. function () {
  538. this.setState({
  539. loading: false,
  540. });
  541. }.bind(this)
  542. );
  543. },
  544. // 选中订单负责人
  545. selectF(value) {
  546. const { searchValues, fjlist } = this.state;
  547. const newdataSources = JSON.stringify(fjlist) == "{}" ? [] : fjlist;
  548. this.setState({
  549. searchValues: Object.assign(searchValues, {
  550. salesmanId: newdataSources.find((item) => item.name == value).id,
  551. }),
  552. });
  553. },
  554. // 失去焦点
  555. blurChange(e) {
  556. let theType = "";
  557. let contactLists = this.state.customerArr || [];
  558. if (e) {
  559. contactLists.map(function (item) {
  560. if (item.name == e.toString()) {
  561. theType = item.id;
  562. }
  563. });
  564. }
  565. this.setState({
  566. theTypes: theType,
  567. });
  568. },
  569. // 删除数组最后一项(删除操作列)
  570. truncate(arr) {
  571. return arr.filter(function (v, i, ar) {
  572. return i !== ar.length - 1
  573. })
  574. },
  575. render() {
  576. const { TextArea } = Input
  577. const { searchValues, departmentArr = [] } = this.state
  578. const dataSources = this.state.fjlist || [];
  579. const options = dataSources.map((group) => (
  580. <Select.Option key={group.id} value={group.name}>
  581. {group.name}
  582. </Select.Option>
  583. ));
  584. return (
  585. <div className="user-content">
  586. <ShowModalDiv ShowModal={this.state.showModal} />
  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["userName"]
  619. ? searchValues["userName"]
  620. : ""}
  621. onChange={(e) => {
  622. searchValues["userName"] = e.target.value;
  623. this.setState({
  624. searchValues: searchValues,
  625. });
  626. }}
  627. />
  628. <Cascaders
  629. ref={node => this.Cascaders = node}
  630. placeholder="订单部门"
  631. id="id"
  632. name="name"
  633. children="list"
  634. height={28}
  635. onSel={(e) => {
  636. searchValues["deps"] = JSON.stringify(e);
  637. this.setState({
  638. searchValues: searchValues,
  639. });
  640. }}
  641. />
  642. {/* <Select
  643. placeholder="订单部门"
  644. style={{ width: 190, marginRight: 10 }}
  645. value={searchValues["depId"]
  646. ? searchValues["depId"]
  647. : undefined}
  648. onChange={(e) => {
  649. searchValues["depId"] = e;
  650. this.setState({
  651. searchValues: searchValues,
  652. });
  653. }}
  654. >
  655. {departmentArr.map(function (item) {
  656. return (
  657. <Select.Option key={item.id}>{item.name}</Select.Option>
  658. );
  659. })}
  660. </Select> */}
  661. <Input
  662. placeholder="合同编号"
  663. value={searchValues["contractNo"]
  664. ? searchValues["contractNo"]
  665. : ""}
  666. onChange={(e) => {
  667. searchValues["contractNo"] = e.target.value;
  668. this.setState({
  669. searchValues: searchValues,
  670. });
  671. }}
  672. />
  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: 120 }}
  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: 120 }}
  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="5">全部</Option>
  753. </Select>
  754. <Button
  755. type="primary"
  756. onClick={this.search}
  757. style={{ marginLeft: 10 }}
  758. disabled={this.state.loading ? true : false}
  759. >
  760. 搜索
  761. </Button>
  762. <Button onClick={this.reset}>重置</Button>
  763. </div>
  764. </TabPane>
  765. <TabPane tab="打印" key="3">
  766. <Button
  767. type="primary"
  768. style={{ margin: "11px 0px 10px 10px" }}
  769. onClick={this.printAll}
  770. >
  771. 打印当前列表
  772. </Button>
  773. </TabPane>
  774. <TabPane tab="导出Excel" key="4">
  775. <Button
  776. type="primary"
  777. style={{ margin: "11px 0px 10px 10px" }}
  778. onClick={this.exportAll}
  779. >
  780. 导出当前列表
  781. </Button>
  782. </TabPane>
  783. </Tabs>
  784. <div className="patent-table">
  785. <Spin spinning={this.state.loading}>
  786. <Table
  787. bordered
  788. columns={
  789. this.state.changeList == undefined
  790. ? this.state.columns
  791. : this.state.changeList
  792. }
  793. dataSource={this.state.dataSource}
  794. pagination={this.state.pagination}
  795. onRowDoubleClick={this.tableRowClick.bind(this)}
  796. size="small"
  797. />
  798. </Spin>
  799. </div>
  800. <textarea id="copyText" style={{ opacity: 0 }} />
  801. {/* 订单详情 */}
  802. <OrderDesc
  803. data={this.state.RowData}
  804. showDesc={this.state.showDesc}
  805. closeDesc={this.closeDesc.bind(this)}
  806. />
  807. {
  808. //打印预览
  809. this.state.dvisible &&
  810. <Modal
  811. visible={this.state.dvisible}
  812. footer=""
  813. title="所有列表信息"
  814. className="admin-desc-content"
  815. width="1300px"
  816. onCancel={() => {
  817. this.loadData();
  818. this.setState({
  819. dvisible: false,
  820. });
  821. }}
  822. >
  823. <Spin spinning={this.state.loading}>
  824. <div
  825. className="patent-table"
  826. style={{
  827. padding: "25px 0 30px 30px",
  828. }}
  829. ref={(e) => {
  830. this.refs.all = e;
  831. }}
  832. >
  833. <Table
  834. columns={this.truncate(this.state.columns)}
  835. dataSource={this.state.dataSource}
  836. pagination={false}
  837. bordered
  838. size="small"
  839. />
  840. </div>
  841. </Spin>
  842. <ReactToPrint
  843. trigger={() => (
  844. <Button
  845. type="primary"
  846. style={{
  847. float: "right",
  848. marginTop: 10,
  849. position: "absolute",
  850. top: 0,
  851. right: 30,
  852. }}
  853. >
  854. 打印
  855. </Button>
  856. )}
  857. content={() => this.refs.all}
  858. />
  859. </Modal>
  860. }
  861. {
  862. //审核弹窗
  863. this.state.checkVisible &&
  864. <Modal
  865. width="400px"
  866. maskClosable={false}
  867. title="审核订单"
  868. confirmLoading={this.state.loading}
  869. visible={this.state.checkVisible}
  870. onOk={this.toExamine}
  871. okText={this.state.result == 1 ? "通过" : this.state.result == 0 && "驳回"}
  872. onCancel={() => {
  873. this.loadData()
  874. this.setState({
  875. checkVisible: false,
  876. checkData: '',
  877. })
  878. }}
  879. >
  880. <TextArea
  881. rows={4}
  882. value={this.state.checkData}
  883. onChange={(e) => {
  884. this.setState({
  885. checkData: e.target.value,
  886. })
  887. }}
  888. placeholder="请填写审核内容"
  889. />
  890. </Modal>
  891. }
  892. {
  893. //查看附件
  894. this.state.imgListVisible &&
  895. <Modal
  896. maskClosable={false}
  897. visible={this.state.imgListVisible}
  898. onOk={() => {
  899. this.setState({
  900. imgListVisible: false,
  901. });
  902. }}
  903. onCancel={() => {
  904. this.setState({
  905. imgListVisible: false,
  906. });
  907. }}
  908. width="600px"
  909. title="审核"
  910. footer=""
  911. >
  912. <div>附件</div>
  913. <div>
  914. <ImgList
  915. fileList={this.state.pictureUrlArr}
  916. domId="publicStatistics"
  917. />
  918. </div>
  919. <div
  920. style={{
  921. display: "flex",
  922. flexDirection: "row",
  923. justifyContent: "center",
  924. }}
  925. >
  926. {
  927. this.state.recard.status == 1 &&
  928. <Button
  929. type="primary"
  930. style={{ margin: '20px 10px 5px' }}
  931. onClick={(e) => {
  932. e.stopPropagation();
  933. this.checkRemark(1);
  934. }}
  935. >
  936. 通过
  937. </Button>
  938. }
  939. {
  940. this.state.recard.status == 1 &&
  941. <Button
  942. type="danger"
  943. style={{ margin: '20px 10px 5px' }}
  944. onClick={(e) => {
  945. e.stopPropagation();
  946. this.checkRemark(0);
  947. }}
  948. >
  949. 驳回
  950. </Button>
  951. }
  952. </div>
  953. </Modal>
  954. }
  955. </div>
  956. );
  957. },
  958. });
  959. export default ProjectVip;