outOutsourcingList.jsx 34 KB

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