outOutsourcingList.jsx 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import moment from "moment";
  4. import "./public.less";
  5. import {
  6. Button,
  7. Form,
  8. Input,
  9. Select,
  10. Spin,
  11. Table,
  12. message,
  13. DatePicker,
  14. Modal,
  15. Upload,
  16. Tabs
  17. } from "antd";
  18. import Assign from "@/manageCenter/publicComponent/assign";
  19. import {
  20. getjiedian,
  21. getProcessStatus,
  22. getApproval,
  23. getNewOrderType,
  24. getLiquidationStatus,
  25. getProjectStatus,
  26. splitUrl,
  27. getprovince
  28. } from "@/tools";
  29. const FormItem = Form.Item;
  30. const outsourcingPaiDan = React.createClass({
  31. loadData(pageNo) {
  32. this.state.data = [];
  33. this.setState({
  34. loading: true
  35. });
  36. $.ajax({
  37. method: "get",
  38. dataType: "json",
  39. crossDomain: false,
  40. url: globalConfig.context + "/api/admin/financial/allUnassignedOrder",
  41. data: {
  42. pageNo: pageNo || 1,
  43. pageSize: this.state.pagination.pageSize,
  44. buyerName: this.state.nameSearch, //客户名称
  45. orderNo: this.state.orderNoSearch,
  46. startTime: this.state.releaseDate[0],
  47. endTime: this.state.releaseDate[1],
  48. processStatus: this.state.processStatus,
  49. outsource: 1
  50. },
  51. success: function(data) {
  52. let theArr = [];
  53. if (!data.data || !data.data.list) {
  54. if (data.error && data.error.length) {
  55. message.warning(data.error[0].message);
  56. }
  57. } else {
  58. for (let i = 0; i < data.data.list.length; i++) {
  59. let thisdata = data.data.list[i];
  60. theArr.push({
  61. key: i,
  62. orderNo: thisdata.orderNo,
  63. approval: thisdata.approval,
  64. orderType: thisdata.orderType,
  65. processStatus: thisdata.processStatus,
  66. signTotalAmount: thisdata.signTotalAmount,
  67. buyerName: thisdata.buyerName,
  68. sellerName: thisdata.sellerName,
  69. createTime: thisdata.createTime
  70. ? new Date(thisdata.createTime).toLocaleString()
  71. : "",
  72. signTime: thisdata.signTime,
  73. contractNo: thisdata.contractNo,
  74. financeId: thisdata.financeId,
  75. departmentName: thisdata.departmentName,
  76. outsourceName: thisdata.outsourceName
  77. });
  78. }
  79. }
  80. if (data.data && data.data.list && !data.data.list.length) {
  81. this.state.pagination.current = 0;
  82. this.state.pagination.total = 0;
  83. }
  84. this.setState({
  85. totalPage: data.data.totalPage,
  86. dataSource: theArr,
  87. pagination: this.state.pagination
  88. });
  89. }.bind(this)
  90. }).always(
  91. function() {
  92. this.setState({
  93. loading: false
  94. });
  95. }.bind(this)
  96. );
  97. },
  98. getInitialState() {
  99. return {
  100. searchMore: true,
  101. assignVisible: false,
  102. releaseDate: [],
  103. totalPage: 0,
  104. boHuivisible: false,
  105. selectedRowKeys: [],
  106. selectedRows: [],
  107. modKey: "1",
  108. width: "800px",
  109. loading: false,
  110. pagination: {
  111. defaultCurrent: 1,
  112. defaultPageSize: 10,
  113. showQuickJumper: true,
  114. pageSize: 10,
  115. onChange: function(page) {
  116. this.loadData(page);
  117. }.bind(this),
  118. showTotal: function(total) {
  119. return "共" + total + "条数据";
  120. }
  121. },
  122. columns: [
  123. {
  124. title: "订单编号",
  125. dataIndex: "orderNo",
  126. key: "orderNo",
  127. fixed: "left"
  128. },
  129. {
  130. title: "合同编号",
  131. dataIndex: "contractNo",
  132. key: "contractNo"
  133. },
  134. {
  135. title: "下单时间",
  136. dataIndex: "createTime",
  137. key: "createTime"
  138. },
  139. {
  140. title: "签单时间",
  141. dataIndex: "signTime",
  142. key: "signTime"
  143. },
  144. {
  145. title: "签单客户",
  146. dataIndex: "buyerName",
  147. key: "buyerName",
  148. render: text => {
  149. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  150. }
  151. },
  152. {
  153. title: "外包公司",
  154. dataIndex: "outsourceName",
  155. key: "outsourceName",
  156. render: text => {
  157. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  158. }
  159. },
  160. {
  161. title: "流程状态",
  162. dataIndex: "processStatus",
  163. key: "processStatus",
  164. render: text => {
  165. return getProcessStatus(text);
  166. }
  167. },
  168. {
  169. title: "订单部门",
  170. dataIndex: "departmentName",
  171. key: "departmentName",
  172. render: text => {
  173. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  174. }
  175. },
  176. {
  177. title: "订单总金额(万)",
  178. dataIndex: "signTotalAmount",
  179. key: "signTotalAmount"
  180. },
  181. {
  182. title: "是否特批",
  183. dataIndex: "approval",
  184. key: "approval",
  185. render: text => {
  186. return getApproval(text);
  187. }
  188. },
  189. {
  190. title: "订单负责人",
  191. dataIndex: "sellerName",
  192. key: "sellerName"
  193. },
  194. {
  195. title: "操作",
  196. dataIndex: "caozuo",
  197. key: "caouzo",
  198. render: (text, recard) => {
  199. return <div>{this.judgeFenpai(recard)}</div>;
  200. }
  201. }
  202. ],
  203. columnsX: [
  204. {
  205. title: "业务项目名称",
  206. dataIndex: "commodityName",
  207. key: "commodityName",
  208. render: text => {
  209. return text && text.length > 6 ? (
  210. <span title={text}>{text.substr(0, 8)}...</span>
  211. ) : (
  212. text
  213. );
  214. }
  215. },
  216. {
  217. title: "项目类别",
  218. dataIndex: "cname",
  219. key: "cname"
  220. },
  221. {
  222. title: "项目数量(个)",
  223. dataIndex: "commodityQuantity",
  224. key: "commodityQuantity"
  225. },
  226. {
  227. title: "服务市价(万元)",
  228. dataIndex: "commodityPrice",
  229. key: "commodityPrice"
  230. },
  231. {
  232. title: "项目状态",
  233. dataIndex: "projectStatus",
  234. key: "projectStatus",
  235. render: text => {
  236. return getProjectStatus(text);
  237. }
  238. },
  239. {
  240. title: "证书编号",
  241. dataIndex: "certificateNumber",
  242. key: "certificateNumber"
  243. },
  244. {
  245. title: "是否主要项目",
  246. dataIndex: "main",
  247. key: "main",
  248. render: text => {
  249. return text ? "是" : "否";
  250. }
  251. },
  252. {
  253. title: "项目说明",
  254. dataIndex: "taskComment",
  255. key: "taskComment",
  256. render: text => {
  257. return text && text.length > 8 ? (
  258. <span title={text}>{text.substr(0, 8)}...</span>
  259. ) : (
  260. text
  261. );
  262. }
  263. }
  264. ],
  265. columnsY: [
  266. {
  267. title: "流程",
  268. dataIndex: "processName",
  269. key: "processName"
  270. },
  271. {
  272. title: "操作人",
  273. dataIndex: "adminName",
  274. key: "adminName"
  275. },
  276. {
  277. title: "时间",
  278. dataIndex: "createDate",
  279. key: "createDate"
  280. }
  281. ],
  282. columnsW: [
  283. {
  284. title: "外包名称",
  285. dataIndex: "name",
  286. key: "name"
  287. },
  288. {
  289. title: "联系人",
  290. dataIndex: "contacts",
  291. key: "contacts"
  292. },
  293. {
  294. title: "联系人电话",
  295. dataIndex: "contactsMobile",
  296. key: "contactsMobile"
  297. },
  298. {
  299. title: "地址",
  300. dataIndex: "ProvinceCity",
  301. key: "ProvinceCity",
  302. render: test => {
  303. return test[0] === null
  304. ? ""
  305. : getprovince(test[0]) +
  306. "/" +
  307. getprovince(test[1]) +
  308. "/" +
  309. getprovince(test[2]);
  310. }
  311. },
  312. {
  313. title: "地址详情",
  314. dataIndex: "address",
  315. key: "address",
  316. render: text => {
  317. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  318. }
  319. },
  320. {
  321. title: "创建时间",
  322. dataIndex: "createTimes",
  323. key: "createTimes"
  324. },
  325. {
  326. title: "任务名称",
  327. dataIndex: "tname",
  328. key: "tname"
  329. },
  330. {
  331. title: "合同编号",
  332. dataIndex: "contractNo",
  333. key: "contractNo"
  334. },
  335. {
  336. title: "项目状态",
  337. dataIndex: "projectStatus",
  338. key: "projectStatus",
  339. render: text => {
  340. return getProjectStatus(text);
  341. }
  342. }
  343. ],
  344. dataSource: [],
  345. searchTime: [,]
  346. };
  347. },
  348. /* 判断是否有分派按钮 */
  349. judgeFenpai(recard) {
  350. if (recard.approval === 2) {
  351. if (recard.financeId === null || "") {
  352. return (
  353. <Button
  354. type="primary"
  355. onClick={e => {
  356. e.stopPropagation(), this.evaluate(recard);
  357. }}
  358. >
  359. 分派
  360. </Button>
  361. );
  362. } else {
  363. return undefined;
  364. }
  365. } else if (recard.processStatus <= 2) {
  366. return (
  367. <Button
  368. type="primary"
  369. onClick={e => {
  370. e.stopPropagation(), this.evaluate(recard);
  371. }}
  372. >
  373. 分派
  374. </Button>
  375. );
  376. } else {
  377. return undefined;
  378. }
  379. },
  380. jdDate(orderNo) {
  381. $.ajax({
  382. method: "get",
  383. dataType: "json",
  384. crossDomain: false,
  385. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  386. data: {
  387. orderNo: orderNo
  388. },
  389. success: function(data) {
  390. let thisData = data.data;
  391. if (!thisData.length) {
  392. if (data.error && data.error.length) {
  393. message.warning(data.error[0].message);
  394. }
  395. thisData = {};
  396. } else {
  397. this.setState({
  398. jsDate: thisData
  399. });
  400. }
  401. }.bind(this)
  402. }).always(
  403. function() {
  404. this.setState({
  405. loading: false
  406. });
  407. }.bind(this)
  408. );
  409. },
  410. /* 分派 */
  411. evaluate(recard) {
  412. this.state.assignData = recard;
  413. this.setState({
  414. assignVisible: true
  415. });
  416. },
  417. /* 驳回 */
  418. reject(recard) {
  419. this.setState({
  420. bohuiData: recard,
  421. boHuiVisible: true,
  422. content: ""
  423. });
  424. },
  425. boHuiOk() {
  426. this.setState({
  427. boHuiVisible: false
  428. });
  429. if (
  430. this.state.pagination.current == this.state.totalPage &&
  431. this.state.pagination.total % 10 == 1
  432. ) {
  433. this.loadData(this.state.page - 1);
  434. } else {
  435. this.loadData(this.state.page);
  436. }
  437. },
  438. boHuiCancel() {
  439. this.setState({
  440. boHuiVisible: false
  441. });
  442. },
  443. componentWillMount() {
  444. this.loadData();
  445. },
  446. tableRowClick(record) {
  447. this.state.RowData = record;
  448. this.setState({
  449. showDesc: true,
  450. visible: true,
  451. orderNo: record.orderNo,
  452. modKey: "1"
  453. });
  454. this.jdDate(record.orderNo);
  455. this.loadXmu(record);
  456. this.loadModal(record);
  457. },
  458. //详情
  459. callBack(key) {
  460. if (key === "2") {
  461. this.setState({
  462. modKey: key,
  463. width: "1200px"
  464. });
  465. this.loadWaiBao();
  466. }
  467. if (key === "1") {
  468. this.setState({
  469. modKey: key,
  470. width: "800px"
  471. });
  472. }
  473. },
  474. //外包详情
  475. loadWaiBao() {
  476. $.ajax({
  477. method: "get",
  478. dataType: "json",
  479. rossDomain: false,
  480. url:
  481. globalConfig.context +
  482. "/api/admin/outsourceOrg/selectOrderOutsourceOrg",
  483. data: {
  484. orderNo: this.state.orderNo
  485. },
  486. success: function(data) {
  487. let theArr = [];
  488. if (data.error.length || data.data.list == "") {
  489. if (data.error && data.error.length) {
  490. message.warning(data.error[0].message);
  491. }
  492. } else {
  493. for (let i = 0; i < data.data.length; i++) {
  494. let thisdata = data.data[i];
  495. let ProvinceCityArr = [];
  496. let ProvinceS = thisdata.province; //省
  497. let citys = thisdata.city; //市
  498. let Areas = thisdata.area; //区
  499. ProvinceCityArr.push(ProvinceS, citys, Areas);
  500. theArr.push({
  501. key: i,
  502. id: thisdata.id,
  503. name: thisdata.name,
  504. contacts: thisdata.contacts, //订单编号
  505. contactsMobile: thisdata.contactsMobile,
  506. ProvinceCity: ProvinceCityArr[0] === null ? [] : ProvinceCityArr,
  507. province: thisdata.province,
  508. city: thisdata.city,
  509. area: thisdata.area,
  510. address: thisdata.address,
  511. remarks: thisdata.remarks,
  512. tid: thisdata.tid,
  513. createTimes: thisdata.createTimes,
  514. tname: thisdata.tname,
  515. contractNo: thisdata.contractNo,
  516. projectStatus: thisdata.projectStatus
  517. });
  518. }
  519. }
  520. this.setState(
  521. {
  522. dataSourceW: theArr
  523. },
  524. () => {}
  525. );
  526. }.bind(this)
  527. }).always(
  528. function() {
  529. this.setState({
  530. loading: false
  531. });
  532. }.bind(this)
  533. );
  534. },
  535. loadXmu(record) {
  536. this.state.data = [];
  537. this.setState({
  538. loading: true
  539. });
  540. $.ajax({
  541. method: "get",
  542. dataType: "json",
  543. crossDomain: false,
  544. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  545. data: {
  546. orderNo: record.orderNo
  547. },
  548. success: function(data) {
  549. let theArr = [];
  550. if (!data.data) {
  551. if (data.error && data.error.length) {
  552. message.warning(data.error[0].message);
  553. }
  554. } else {
  555. for (let i = 0; i < data.data.length; i++) {
  556. let thisdata = data.data[i];
  557. theArr.push({
  558. key: i,
  559. id: thisdata.id,
  560. orderNo: thisdata.orderNo,
  561. commodityName: thisdata.commodityName,
  562. commodityPrice: thisdata.commodityPrice,
  563. commodityQuantity: thisdata.commodityQuantity,
  564. taskStatus: thisdata.taskStatus,
  565. taskComment: thisdata.taskComment,
  566. main: thisdata.main,
  567. contacts: thisdata.contacts,
  568. contactsMobile: thisdata.contactsMobile,
  569. cname: thisdata.cname,
  570. certificateNumber: thisdata.certificateNumber,
  571. projectStatus: thisdata.projectStatus
  572. });
  573. }
  574. }
  575. this.setState({
  576. dataSourceX: theArr,
  577. pagination: false
  578. });
  579. }.bind(this)
  580. }).always(
  581. function() {
  582. this.setState({
  583. loading: false
  584. });
  585. }.bind(this)
  586. );
  587. },
  588. loadModal(record) {
  589. this.state.orderList = [];
  590. $.ajax({
  591. method: "get",
  592. dataType: "json",
  593. crossDomain: false,
  594. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  595. data: {
  596. orderNo: record.orderNo
  597. },
  598. success: function(data) {
  599. let thisData = data.data;
  600. if (!thisData) {
  601. if (data.error && data.error.length) {
  602. message.warning(data.error[0].message);
  603. }
  604. thisData = {};
  605. }
  606. this.setState({
  607. id: thisData.id,
  608. orderList: thisData,
  609. approval:
  610. thisData.approval == 0
  611. ? thisData.approval.toString()
  612. : thisData.approval,
  613. orderRemarks: thisData.orderRemarks,
  614. orgCodeUrl: thisData.contractPictureUrl
  615. ? splitUrl(
  616. thisData.contractPictureUrl,
  617. ",",
  618. globalConfig.avatarHost + "/upload"
  619. )
  620. : [],
  621. orderNo: thisData.orderNo, //订单编号
  622. buyerId: thisData.buyerId,
  623. depName: thisData.depName
  624. });
  625. }.bind(this)
  626. }).always(
  627. function() {
  628. this.setState({
  629. loading: false
  630. });
  631. }.bind(this)
  632. );
  633. },
  634. rizhi() {
  635. this.setState({
  636. loading: true
  637. });
  638. $.ajax({
  639. method: "get",
  640. dataType: "json",
  641. crossDomain: false,
  642. url: "/api/admin/newOrder/selectOrderLog",
  643. data: {
  644. orderNo: this.state.orderNo
  645. },
  646. success: function(data) {
  647. let theArr = [];
  648. let thisData = data.data;
  649. if (!thisData.length) {
  650. if (data.error && data.error.length) {
  651. message.warning(data.error[0].message);
  652. }
  653. thisData = {};
  654. } else {
  655. for (let i = 0; i < data.data.length; i++) {
  656. let thisdata = data.data[i];
  657. theArr.push({
  658. processName: thisdata.processName,
  659. adminName: thisdata.adminName,
  660. createDate: thisdata.createDate,
  661. remarks: thisdata.remarks
  662. });
  663. }
  664. }
  665. this.setState({
  666. dataSourceY: theArr
  667. });
  668. }.bind(this)
  669. }).always(
  670. function() {
  671. this.setState({
  672. loading: false
  673. });
  674. }.bind(this)
  675. );
  676. },
  677. closeOrderLog() {
  678. this.setState({
  679. avisible: false
  680. });
  681. },
  682. getOrderLog() {
  683. this.setState({
  684. avisible: true
  685. });
  686. this.rizhi();
  687. },
  688. closeModal() {
  689. this.setState({
  690. visible: false,
  691. modKey: "1",
  692. width: "800px"
  693. });
  694. },
  695. closeDesc(e, s) {
  696. this.state.showDesc = e;
  697. if (s) {
  698. this.loadData(this.state.page);
  699. }
  700. },
  701. closeAssign(e, s) {
  702. this.state.assignVisible = e;
  703. if (s) {
  704. if (
  705. this.state.pagination.current == this.state.totalPage &&
  706. this.state.pagination.total % 10 == 1
  707. ) {
  708. this.loadData(this.state.page - 1);
  709. } else {
  710. this.loadData(this.state.page);
  711. }
  712. }
  713. },
  714. search() {
  715. this.loadData();
  716. },
  717. reset() {
  718. this.state.nameSearch = "";
  719. this.state.releaseDate = [];
  720. this.state.orderNoSearch = "";
  721. this.state.processStatus = [];
  722. this.loadData();
  723. },
  724. searchSwitch() {
  725. this.setState({
  726. searchMore: !this.state.searchMore
  727. });
  728. },
  729. render() {
  730. const { RangePicker } = DatePicker;
  731. const { TabPane } = Tabs;
  732. const theData = this.state.orderList || {};
  733. const formItemLayout = {
  734. labelCol: { span: 10 },
  735. wrapperCol: { span: 12 }
  736. };
  737. const jsDate = this.state.jsDate || [];
  738. return (
  739. <div className="user-content">
  740. <div className="content-title">
  741. <span>外省外包列表</span>
  742. </div>
  743. <div className="user-search">
  744. <Input
  745. placeholder="客户名称"
  746. value={this.state.nameSearch}
  747. onChange={e => {
  748. this.setState({ nameSearch: e.target.value });
  749. }}
  750. />
  751. <Input
  752. placeholder="订单编号"
  753. value={this.state.orderNoSearch}
  754. onChange={e => {
  755. this.setState({ orderNoSearch: e.target.value });
  756. }}
  757. />
  758. <Select
  759. placeholder="流程状态"
  760. onChange={e => {
  761. this.setState({ processStatus: e });
  762. }}
  763. style={{ width: 160, marginRight: 5 }}
  764. value={this.state.processStatus}
  765. >
  766. <Option value="2">未分配</Option>
  767. <Option value="3">已分配</Option>
  768. </Select>
  769. <span style={{ marginRight: 10 }}>下单时间 :</span>
  770. <RangePicker
  771. value={[
  772. this.state.releaseDate[0]
  773. ? moment(this.state.releaseDate[0])
  774. : null,
  775. this.state.releaseDate[1]
  776. ? moment(this.state.releaseDate[1])
  777. : null
  778. ]}
  779. onChange={(data, dataString) => {
  780. this.setState({ releaseDate: dataString });
  781. }}
  782. />
  783. <Button
  784. type="primary"
  785. onClick={this.search}
  786. style={{ marginLeft: 10 }}
  787. >
  788. 搜索
  789. </Button>
  790. <Button onClick={this.reset}>重置</Button>
  791. </div>
  792. <div className="patent-table">
  793. <Spin spinning={this.state.loading}>
  794. <Table
  795. columns={this.state.columns}
  796. dataSource={this.state.dataSource}
  797. scroll={{ x: 1500, y: 0 }}
  798. rowSelection={false}
  799. pagination={this.state.pagination}
  800. onRowClick={this.tableRowClick.bind(this)}
  801. />
  802. </Spin>
  803. </div>
  804. <div className="patent-desc">
  805. <Modal
  806. maskClosable={false}
  807. visible={this.state.visible}
  808. onCancel={this.closeModal}
  809. width={this.state.width}
  810. footer=""
  811. className="admin-desc-content"
  812. >
  813. <Tabs
  814. onChange={this.callBack}
  815. type="card"
  816. activeKey={this.state.modKey}
  817. >
  818. <TabPane tab="项目概况" key="1">
  819. <Form layout="horizontal" id="demand-form">
  820. <Spin spinning={this.state.loading}>
  821. <div className="clearfix">
  822. <FormItem
  823. className="half-item"
  824. {...formItemLayout}
  825. label="订单编号"
  826. >
  827. <span>{this.state.orderNo}</span>
  828. </FormItem>
  829. <FormItem
  830. className="half-item"
  831. {...formItemLayout}
  832. label="签单时间"
  833. >
  834. <span>{theData.signDate}</span>
  835. </FormItem>
  836. <FormItem
  837. className="half-item"
  838. {...formItemLayout}
  839. label="客户名称"
  840. >
  841. <span>{theData.userName}</span>
  842. </FormItem>
  843. <FormItem
  844. className="half-item"
  845. {...formItemLayout}
  846. label="流转状态"
  847. >
  848. <span>{getProcessStatus(theData.processStatus)}</span>
  849. </FormItem>
  850. <FormItem
  851. className="half-item"
  852. {...formItemLayout}
  853. label="订单类型"
  854. >
  855. <span>{getNewOrderType(theData.orderType)}</span>
  856. </FormItem>
  857. <FormItem
  858. className="half-item"
  859. {...formItemLayout}
  860. label="结算状态"
  861. >
  862. <span>
  863. {getLiquidationStatus(theData.liquidationStatus)}
  864. </span>
  865. </FormItem>
  866. <FormItem
  867. className="half-item"
  868. {...formItemLayout}
  869. label="签单总金额(万元)"
  870. >
  871. <span>{theData.totalAmount}</span>
  872. </FormItem>
  873. <FormItem
  874. className="half-item"
  875. {...formItemLayout}
  876. label="首付款(万元)"
  877. >
  878. <span>{theData.firstAmount}</span>
  879. </FormItem>
  880. <FormItem
  881. className="half-item"
  882. {...formItemLayout}
  883. label="已收款(万元)"
  884. >
  885. <span>{theData.settlementAmount}</span>
  886. </FormItem>
  887. <FormItem
  888. className="half-item"
  889. {...formItemLayout}
  890. label="是否特批"
  891. >
  892. <span>{getApproval(theData.approval)}</span>
  893. </FormItem>
  894. {/*this.props.data.orderStatus=='6'&&<FormItem className="half-item" {...formItemLayout} label="已退(万元)">
  895. <span>{this.props.data.refundAmount}</span>
  896. </FormItem>*/}
  897. </div>
  898. <div className="clearfix">
  899. <FormItem
  900. labelCol={{ span: 5 }}
  901. wrapperCol={{ span: 18 }}
  902. label="合同扫描件"
  903. >
  904. <Upload
  905. className="demandDetailShow-upload"
  906. listType="picture-card"
  907. fileList={this.state.orgCodeUrl}
  908. onPreview={file => {
  909. this.setState({
  910. previewImage: file.url || file.thumbUrl,
  911. previewVisible: true
  912. });
  913. }}
  914. ></Upload>
  915. <Modal
  916. maskClosable={false}
  917. footer={null}
  918. visible={this.state.previewVisible}
  919. onCancel={() => {
  920. this.setState({ previewVisible: false });
  921. }}
  922. >
  923. <img
  924. alt=""
  925. style={{ width: "100%" }}
  926. src={this.state.previewImage || ""}
  927. />
  928. </Modal>
  929. <Button
  930. style={{
  931. float: "right",
  932. marginRight: "140px",
  933. marginTop: "20px"
  934. }}
  935. onClick={this.getOrderLog}
  936. >
  937. 查看订单日志
  938. </Button>
  939. </FormItem>
  940. </div>
  941. <div className="clearfix">
  942. <FormItem
  943. className="half-item"
  944. {...formItemLayout}
  945. label="合同编号"
  946. >
  947. <span>{theData.contractNo}</span>
  948. </FormItem>
  949. <FormItem
  950. className="half-item"
  951. {...formItemLayout}
  952. label="订单部门"
  953. >
  954. <span>{theData.depName}</span>
  955. </FormItem>
  956. </div>
  957. <div className="clearfix">
  958. <FormItem
  959. labelCol={{ span: 5 }}
  960. wrapperCol={{ span: 18 }}
  961. label="订单留言"
  962. >
  963. <p style={{ width: 500, wordWrap: "break-word" }}>
  964. {this.state.orderRemarks}
  965. </p>
  966. </FormItem>
  967. </div>
  968. <div className="clearfix">
  969. <FormItem
  970. labelCol={{ span: 5 }}
  971. wrapperCol={{ span: 18 }}
  972. label="收款节点"
  973. >
  974. {jsDate.map(item => {
  975. return (
  976. <p>
  977. {getjiedian(item.dunSubject)} -- {item.money} 万元
  978. </p>
  979. );
  980. })}
  981. </FormItem>
  982. </div>
  983. <div className="clearfix">
  984. <FormItem
  985. className="half-item"
  986. {...formItemLayout}
  987. label="订单负责人"
  988. >
  989. <span>{theData.salesmanName}</span>
  990. </FormItem>
  991. <FormItem
  992. className="half-item"
  993. {...formItemLayout}
  994. label="订单负责人电话"
  995. >
  996. <span>{theData.salesmanMobile}</span>
  997. </FormItem>
  998. <FormItem
  999. className="half-item"
  1000. {...formItemLayout}
  1001. label="财务负责人"
  1002. >
  1003. <span>{theData.financeName}</span>
  1004. </FormItem>
  1005. <FormItem
  1006. className="half-item"
  1007. {...formItemLayout}
  1008. label="财务负责人电话"
  1009. >
  1010. <span>{theData.financeMobile}</span>
  1011. </FormItem>
  1012. </div>
  1013. <Modal
  1014. visible={this.state.avisible}
  1015. className="admin-desc-content"
  1016. width="800px"
  1017. maskClosable={false}
  1018. title="订单日志"
  1019. footer={null}
  1020. onCancel={this.closeOrderLog}
  1021. >
  1022. <div className="patent-table">
  1023. <Spin spinning={this.state.loading}>
  1024. <Table
  1025. columns={this.state.columnsY}
  1026. dataSource={this.state.dataSourceY}
  1027. pagination={false}
  1028. />
  1029. </Spin>
  1030. </div>
  1031. </Modal>
  1032. <div className="clearfix">
  1033. <p style={{ fontSize: 18, marginLeft: 20 }}>项目业务</p>
  1034. <div className="patent-table">
  1035. <Spin spinning={this.state.loading}>
  1036. <Table
  1037. columns={this.state.columnsX}
  1038. dataSource={this.state.dataSourceX}
  1039. pagination={this.state.pagination}
  1040. onRowClick={this.tableRowClick}
  1041. />
  1042. </Spin>
  1043. </div>
  1044. </div>
  1045. </Spin>
  1046. </Form>
  1047. </TabPane>
  1048. <TabPane tab="外包详情" key="2">
  1049. <div className="clearfix">
  1050. <p style={{ color: "red" }}>
  1051. 提示:查看备注请点击表格左侧加号按钮~
  1052. </p>
  1053. <div className="patent-table">
  1054. <Spin spinning={this.state.loading}>
  1055. <Table
  1056. columns={this.state.columnsW}
  1057. dataSource={this.state.dataSourceW}
  1058. pagination={this.state.pagination}
  1059. expandedRowRender={record => (
  1060. <p style={{ margin: 0 }}>{record.remarks}</p>
  1061. )}
  1062. scroll={{ x: 300, y: 0 }}
  1063. />
  1064. </Spin>
  1065. </div>
  1066. </div>
  1067. </TabPane>
  1068. </Tabs>
  1069. </Modal>
  1070. </div>
  1071. <Assign
  1072. title="订单"
  1073. selApi="/api/admin/financial/distributionFinance"
  1074. data={this.state.assignData}
  1075. fenpaiData={4}
  1076. showDesc={this.state.assignVisible}
  1077. closeDesc={this.closeAssign.bind(this)}
  1078. roleName={"财务专员"}
  1079. requestMethod={"post"}
  1080. />
  1081. <Modal
  1082. visible={this.state.boHuiVisible}
  1083. width="400px"
  1084. title="驳回备注"
  1085. footer=""
  1086. onOk={this.boHuiOk}
  1087. onCancel={this.boHuiCancel}
  1088. >
  1089. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  1090. <Spin spinning={this.state.loading}>
  1091. <FormItem
  1092. labelCol={{ span: 5 }}
  1093. wrapperCol={{ span: 16 }}
  1094. label={
  1095. <span>
  1096. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  1097. </span>
  1098. }
  1099. >
  1100. <Input
  1101. type="textarea"
  1102. rows={4}
  1103. placeholder="请输入驳回原因"
  1104. value={this.state.content}
  1105. onChange={e => {
  1106. this.setState({ content: e.target.value });
  1107. }}
  1108. />
  1109. </FormItem>
  1110. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  1111. <Button
  1112. type="primary"
  1113. htmlType="submit"
  1114. style={{ marginRight: 20 }}
  1115. >
  1116. 驳回
  1117. </Button>
  1118. <Button
  1119. type="default"
  1120. onClick={() => {
  1121. this.boHuiCancel();
  1122. }}
  1123. >
  1124. 取消
  1125. </Button>
  1126. </FormItem>
  1127. </Spin>
  1128. </Form>
  1129. </Modal>
  1130. </div>
  1131. );
  1132. }
  1133. });
  1134. export default outsourcingPaiDan;