outOutsourcingList.jsx 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139
  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. });
  662. }
  663. }
  664. this.setState({
  665. dataSourceY: theArr
  666. });
  667. }.bind(this)
  668. }).always(
  669. function() {
  670. this.setState({
  671. loading: false
  672. });
  673. }.bind(this)
  674. );
  675. },
  676. closeOrderLog() {
  677. this.setState({
  678. avisible: false
  679. });
  680. },
  681. getOrderLog() {
  682. this.setState({
  683. avisible: true
  684. });
  685. this.rizhi();
  686. },
  687. closeModal() {
  688. this.setState({
  689. visible: false,
  690. modKey: "1",
  691. width: "800px"
  692. });
  693. },
  694. closeDesc(e, s) {
  695. this.state.showDesc = e;
  696. if (s) {
  697. this.loadData(this.state.page);
  698. }
  699. },
  700. closeAssign(e, s) {
  701. this.state.assignVisible = e;
  702. if (s) {
  703. if (
  704. this.state.pagination.current == this.state.totalPage &&
  705. this.state.pagination.total % 10 == 1
  706. ) {
  707. this.loadData(this.state.page - 1);
  708. } else {
  709. this.loadData(this.state.page);
  710. }
  711. }
  712. },
  713. search() {
  714. this.loadData();
  715. },
  716. reset() {
  717. this.state.nameSearch = "";
  718. this.state.releaseDate = [];
  719. this.state.orderNoSearch = "";
  720. this.state.processStatus = [];
  721. this.loadData();
  722. },
  723. searchSwitch() {
  724. this.setState({
  725. searchMore: !this.state.searchMore
  726. });
  727. },
  728. render() {
  729. const { RangePicker } = DatePicker;
  730. const { TabPane } = Tabs;
  731. const theData = this.state.orderList || {};
  732. const formItemLayout = {
  733. labelCol: { span: 10 },
  734. wrapperCol: { span: 12 }
  735. };
  736. const jsDate = this.state.jsDate || [];
  737. return (
  738. <div className="user-content">
  739. <div className="content-title">
  740. <span>外省外包列表</span>
  741. </div>
  742. <div className="user-search">
  743. <Input
  744. placeholder="客户名称"
  745. value={this.state.nameSearch}
  746. onChange={e => {
  747. this.setState({ nameSearch: e.target.value });
  748. }}
  749. />
  750. <Input
  751. placeholder="订单编号"
  752. value={this.state.orderNoSearch}
  753. onChange={e => {
  754. this.setState({ orderNoSearch: e.target.value });
  755. }}
  756. />
  757. <Select
  758. placeholder="流程状态"
  759. onChange={e => {
  760. this.setState({ processStatus: e });
  761. }}
  762. style={{ width: 160, marginRight: 5 }}
  763. value={this.state.processStatus}
  764. >
  765. <Option value="2">未分配</Option>
  766. <Option value="3">已分配</Option>
  767. </Select>
  768. <span style={{ marginRight: 10 }}>下单时间 :</span>
  769. <RangePicker
  770. value={[
  771. this.state.releaseDate[0]
  772. ? moment(this.state.releaseDate[0])
  773. : null,
  774. this.state.releaseDate[1]
  775. ? moment(this.state.releaseDate[1])
  776. : null
  777. ]}
  778. onChange={(data, dataString) => {
  779. this.setState({ releaseDate: dataString });
  780. }}
  781. />
  782. <Button
  783. type="primary"
  784. onClick={this.search}
  785. style={{ marginLeft: 10 }}
  786. >
  787. 搜索
  788. </Button>
  789. <Button onClick={this.reset}>重置</Button>
  790. </div>
  791. <div className="patent-table">
  792. <Spin spinning={this.state.loading}>
  793. <Table
  794. columns={this.state.columns}
  795. dataSource={this.state.dataSource}
  796. scroll={{ x: 1500, y: 0 }}
  797. rowSelection={false}
  798. pagination={this.state.pagination}
  799. onRowClick={this.tableRowClick.bind(this)}
  800. />
  801. </Spin>
  802. </div>
  803. <div className="patent-desc">
  804. <Modal
  805. maskClosable={false}
  806. visible={this.state.visible}
  807. onCancel={this.closeModal}
  808. width={this.state.width}
  809. footer=""
  810. className="admin-desc-content"
  811. >
  812. <Tabs
  813. onChange={this.callBack}
  814. type="card"
  815. activeKey={this.state.modKey}
  816. >
  817. <TabPane tab="项目概况" key="1">
  818. <Form layout="horizontal" id="demand-form">
  819. <Spin spinning={this.state.loading}>
  820. <div className="clearfix">
  821. <FormItem
  822. className="half-item"
  823. {...formItemLayout}
  824. label="订单编号"
  825. >
  826. <span>{this.state.orderNo}</span>
  827. </FormItem>
  828. <FormItem
  829. className="half-item"
  830. {...formItemLayout}
  831. label="签单时间"
  832. >
  833. <span>{theData.signDate}</span>
  834. </FormItem>
  835. <FormItem
  836. className="half-item"
  837. {...formItemLayout}
  838. label="客户名称"
  839. >
  840. <span>{theData.userName}</span>
  841. </FormItem>
  842. <FormItem
  843. className="half-item"
  844. {...formItemLayout}
  845. label="流转状态"
  846. >
  847. <span>{getProcessStatus(theData.processStatus)}</span>
  848. </FormItem>
  849. <FormItem
  850. className="half-item"
  851. {...formItemLayout}
  852. label="订单类型"
  853. >
  854. <span>{getNewOrderType(theData.orderType)}</span>
  855. </FormItem>
  856. <FormItem
  857. className="half-item"
  858. {...formItemLayout}
  859. label="结算状态"
  860. >
  861. <span>
  862. {getLiquidationStatus(theData.liquidationStatus)}
  863. </span>
  864. </FormItem>
  865. <FormItem
  866. className="half-item"
  867. {...formItemLayout}
  868. label="签单总金额(万元)"
  869. >
  870. <span>{theData.totalAmount}</span>
  871. </FormItem>
  872. <FormItem
  873. className="half-item"
  874. {...formItemLayout}
  875. label="首付款(万元)"
  876. >
  877. <span>{theData.firstAmount}</span>
  878. </FormItem>
  879. <FormItem
  880. className="half-item"
  881. {...formItemLayout}
  882. label="已收款(万元)"
  883. >
  884. <span>{theData.settlementAmount}</span>
  885. </FormItem>
  886. <FormItem
  887. className="half-item"
  888. {...formItemLayout}
  889. label="是否特批"
  890. >
  891. <span>{getApproval(theData.approval)}</span>
  892. </FormItem>
  893. {/*this.props.data.orderStatus=='6'&&<FormItem className="half-item" {...formItemLayout} label="已退(万元)">
  894. <span>{this.props.data.refundAmount}</span>
  895. </FormItem>*/}
  896. </div>
  897. <div className="clearfix">
  898. <FormItem
  899. labelCol={{ span: 5 }}
  900. wrapperCol={{ span: 18 }}
  901. label="合同扫描件"
  902. >
  903. <Upload
  904. className="demandDetailShow-upload"
  905. listType="picture-card"
  906. fileList={this.state.orgCodeUrl}
  907. onPreview={file => {
  908. this.setState({
  909. previewImage: file.url || file.thumbUrl,
  910. previewVisible: true
  911. });
  912. }}
  913. ></Upload>
  914. <Modal
  915. maskClosable={false}
  916. footer={null}
  917. visible={this.state.previewVisible}
  918. onCancel={() => {
  919. this.setState({ previewVisible: false });
  920. }}
  921. >
  922. <img
  923. alt=""
  924. style={{ width: "100%" }}
  925. src={this.state.previewImage || ""}
  926. />
  927. </Modal>
  928. <Button
  929. style={{
  930. float: "right",
  931. marginRight: "140px",
  932. marginTop: "20px"
  933. }}
  934. onClick={this.getOrderLog}
  935. >
  936. 查看订单日志
  937. </Button>
  938. </FormItem>
  939. </div>
  940. <div className="clearfix">
  941. <FormItem
  942. className="half-item"
  943. {...formItemLayout}
  944. label="合同编号"
  945. >
  946. <span>{theData.contractNo}</span>
  947. </FormItem>
  948. <FormItem
  949. className="half-item"
  950. {...formItemLayout}
  951. label="订单部门"
  952. >
  953. <span>{theData.depName}</span>
  954. </FormItem>
  955. </div>
  956. <div className="clearfix">
  957. <FormItem
  958. labelCol={{ span: 5 }}
  959. wrapperCol={{ span: 18 }}
  960. label="订单留言"
  961. >
  962. <p style={{ width: 500, wordWrap: "break-word" }}>
  963. {this.state.orderRemarks}
  964. </p>
  965. </FormItem>
  966. </div>
  967. <div className="clearfix">
  968. <FormItem
  969. labelCol={{ span: 5 }}
  970. wrapperCol={{ span: 18 }}
  971. label="收款节点"
  972. >
  973. {jsDate.map(item => {
  974. return (
  975. <p>
  976. {getjiedian(item.dunSubject)} -- {item.money} 万元
  977. </p>
  978. );
  979. })}
  980. </FormItem>
  981. </div>
  982. <div className="clearfix">
  983. <FormItem
  984. className="half-item"
  985. {...formItemLayout}
  986. label="订单负责人"
  987. >
  988. <span>{theData.salesmanName}</span>
  989. </FormItem>
  990. <FormItem
  991. className="half-item"
  992. {...formItemLayout}
  993. label="订单负责人电话"
  994. >
  995. <span>{theData.salesmanMobile}</span>
  996. </FormItem>
  997. <FormItem
  998. className="half-item"
  999. {...formItemLayout}
  1000. label="财务负责人"
  1001. >
  1002. <span>{theData.financeName}</span>
  1003. </FormItem>
  1004. <FormItem
  1005. className="half-item"
  1006. {...formItemLayout}
  1007. label="财务负责人电话"
  1008. >
  1009. <span>{theData.financeMobile}</span>
  1010. </FormItem>
  1011. </div>
  1012. <Modal
  1013. visible={this.state.avisible}
  1014. className="admin-desc-content"
  1015. width="800px"
  1016. maskClosable={false}
  1017. title="订单日志"
  1018. footer={null}
  1019. onCancel={this.closeOrderLog}
  1020. >
  1021. <div className="patent-table">
  1022. <Spin spinning={this.state.loading}>
  1023. <Table
  1024. columns={this.state.columnsY}
  1025. dataSource={this.state.dataSourceY}
  1026. pagination={false}
  1027. />
  1028. </Spin>
  1029. </div>
  1030. </Modal>
  1031. <div className="clearfix">
  1032. <p style={{ fontSize: 18, marginLeft: 20 }}>项目业务</p>
  1033. <div className="patent-table">
  1034. <Spin spinning={this.state.loading}>
  1035. <Table
  1036. columns={this.state.columnsX}
  1037. dataSource={this.state.dataSourceX}
  1038. pagination={this.state.pagination}
  1039. onRowClick={this.tableRowClick}
  1040. />
  1041. </Spin>
  1042. </div>
  1043. </div>
  1044. </Spin>
  1045. </Form>
  1046. </TabPane>
  1047. <TabPane tab="外包详情" key="2">
  1048. <div className="clearfix">
  1049. <p style={{ color: "red" }}>
  1050. 提示:查看备注请点击表格左侧加号按钮~
  1051. </p>
  1052. <div className="patent-table">
  1053. <Spin spinning={this.state.loading}>
  1054. <Table
  1055. columns={this.state.columnsW}
  1056. dataSource={this.state.dataSourceW}
  1057. pagination={this.state.pagination}
  1058. expandedRowRender={record => (
  1059. <p style={{ margin: 0 }}>{record.remarks}</p>
  1060. )}
  1061. scroll={{ x: 300, y: 0 }}
  1062. />
  1063. </Spin>
  1064. </div>
  1065. </div>
  1066. </TabPane>
  1067. </Tabs>
  1068. </Modal>
  1069. </div>
  1070. <Assign
  1071. title="订单"
  1072. selApi="/api/admin/financial/distributionFinance"
  1073. data={this.state.assignData}
  1074. fenpaiData={4}
  1075. showDesc={this.state.assignVisible}
  1076. closeDesc={this.closeAssign.bind(this)}
  1077. roleName={"财务专员"}
  1078. requestMethod={"post"}
  1079. />
  1080. <Modal
  1081. visible={this.state.boHuiVisible}
  1082. width="400px"
  1083. title="驳回备注"
  1084. footer=""
  1085. onOk={this.boHuiOk}
  1086. onCancel={this.boHuiCancel}
  1087. >
  1088. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  1089. <Spin spinning={this.state.loading}>
  1090. <FormItem
  1091. labelCol={{ span: 5 }}
  1092. wrapperCol={{ span: 16 }}
  1093. label={
  1094. <span>
  1095. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  1096. </span>
  1097. }
  1098. >
  1099. <Input
  1100. type="textarea"
  1101. rows={4}
  1102. placeholder="请输入驳回原因"
  1103. value={this.state.content}
  1104. onChange={e => {
  1105. this.setState({ content: e.target.value });
  1106. }}
  1107. />
  1108. </FormItem>
  1109. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  1110. <Button
  1111. type="primary"
  1112. htmlType="submit"
  1113. style={{ marginRight: 20 }}
  1114. >
  1115. 驳回
  1116. </Button>
  1117. <Button
  1118. type="default"
  1119. onClick={() => {
  1120. this.boHuiCancel();
  1121. }}
  1122. >
  1123. 取消
  1124. </Button>
  1125. </FormItem>
  1126. </Spin>
  1127. </Form>
  1128. </Modal>
  1129. </div>
  1130. );
  1131. }
  1132. });
  1133. export default outsourcingPaiDan;