projectvip.jsx 28 KB

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