projectvip.jsx 28 KB

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