approvedvipproject.jsx 27 KB

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