approvedvipproject.jsx 28 KB

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