approvedvipproject.jsx 28 KB

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