approvedvipproject.jsx 28 KB

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