approvedvipproject.jsx 29 KB

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