outsourcingPaiDan.jsx 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732
  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. splitUrl,
  28. getprovince,
  29. getRefundStatus
  30. } from "@/tools";
  31. import ImgList from "../../../common/imgList";
  32. import {ChooseList} from "../../order/orderNew/chooseList";
  33. import {getProjectName} from "../../../tools";
  34. import OrderItemStatus from "../../../common/orderItemStatus";
  35. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  36. const FormItem = Form.Item;
  37. const outsourcingPaiDan = React.createClass({
  38. departmentList() {
  39. this.setState({
  40. loading: true,
  41. });
  42. $.ajax({
  43. method: "get",
  44. dataType: "json",
  45. crossDomain: false,
  46. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  47. data: {},
  48. success: function (data) {
  49. let thedata = data.data;
  50. let theArr = [];
  51. if (!thedata) {
  52. if (data.error && data.error.length) {
  53. message.warning(data.error[0].message);
  54. }
  55. } else {
  56. thedata.map(function (item, index) {
  57. theArr.push({
  58. key: index,
  59. name: item.name,
  60. id: item.id,
  61. });
  62. });
  63. }
  64. this.setState({
  65. departmentArr: theArr,
  66. });
  67. }.bind(this),
  68. }).always(
  69. function () {
  70. this.setState({
  71. loading: false,
  72. });
  73. }.bind(this)
  74. );
  75. },
  76. loadData(pageNo) {
  77. this.state.data = [];
  78. this.setState({
  79. selectedRowKeys: [],
  80. selectedRowKey: [],
  81. page: pageNo,
  82. loading: true,
  83. });
  84. $.ajax({
  85. method: "get",
  86. dataType: "json",
  87. crossDomain: false,
  88. url: globalConfig.context + "/api/admin/financial/allUnassignedOrder",
  89. data: {
  90. pageNo: pageNo || 1,
  91. pageSize: this.state.pagination.pageSize,
  92. buyerName: this.state.nameSearch, //客户名称
  93. orderNo: this.state.orderNoSearch,
  94. startTime: this.state.releaseDate[0],
  95. endTime: this.state.releaseDate[1],
  96. processStatus: this.state.processStatusSearch,
  97. contractNo: this.state.contractNoSearch,
  98. departmentId: this.state.departmenttList,
  99. outsource: 1,
  100. },
  101. success: function (data) {
  102. let theArr = [];
  103. if (!data.data || !data.data.list) {
  104. if (data.error && data.error.length) {
  105. message.warning(data.error[0].message);
  106. }
  107. } else {
  108. for (let i = 0; i < data.data.list.length; i++) {
  109. let thisdata = data.data.list[i];
  110. theArr.push({
  111. key: i,
  112. orderNo: thisdata.orderNo,
  113. approval: thisdata.approval,
  114. orderType: thisdata.orderType,
  115. processStatus: thisdata.processStatus,
  116. signTotalAmount: thisdata.signTotalAmount,
  117. buyerName: thisdata.buyerName,
  118. sellerName: thisdata.sellerName,
  119. createTime: thisdata.createTime
  120. ? new Date(thisdata.createTime).toLocaleString()
  121. : "",
  122. signTime: thisdata.signTime,
  123. contractNo: thisdata.contractNo,
  124. financeId: thisdata.financeId,
  125. departmentName: thisdata.departmentName,
  126. outsourceName: thisdata.outsourceName,
  127. });
  128. }
  129. }
  130. this.state.pagination.total = data.data.totalCount;
  131. this.state.pagination.current = data.data.pageNo;
  132. if (data.data && data.data.list && !data.data.list.length) {
  133. this.state.pagination.current = 0;
  134. this.state.pagination.total = 0;
  135. }
  136. this.setState({
  137. totalPage: data.data.totalPage,
  138. dataSource: theArr,
  139. pagination: this.state.pagination,
  140. });
  141. }.bind(this),
  142. }).always(
  143. function () {
  144. this.setState({
  145. loading: false,
  146. });
  147. }.bind(this)
  148. );
  149. },
  150. getInitialState() {
  151. return {
  152. rotateDeg: 0,
  153. searchMore: true,
  154. assignVisible: false,
  155. releaseDate: [],
  156. totalPage: 0,
  157. attachmentUrl: [],
  158. pictureUrl: [],
  159. processStatusSearch: "2",
  160. boHuivisible: false,
  161. selectedRowKeys: [],
  162. selectedRows: [],
  163. modKey: "1",
  164. width: "800px",
  165. loading: false,
  166. pagination: {
  167. defaultCurrent: 1,
  168. defaultPageSize: 10,
  169. showQuickJumper: true,
  170. pageSize: 10,
  171. onChange: function (page) {
  172. this.loadData(page);
  173. }.bind(this),
  174. showTotal: function (total) {
  175. return "共" + total + "条数据";
  176. },
  177. },
  178. columns: [
  179. {
  180. title: "订单编号",
  181. dataIndex: "orderNo",
  182. key: "orderNo",
  183. },
  184. {
  185. title: "合同编号",
  186. dataIndex: "contractNo",
  187. key: "contractNo",
  188. },
  189. {
  190. title: "下单时间",
  191. dataIndex: "createTime",
  192. key: "createTime",
  193. },
  194. {
  195. title: "签单时间",
  196. dataIndex: "signTime",
  197. key: "signTime",
  198. },
  199. {
  200. title: "签单客户",
  201. dataIndex: "buyerName",
  202. key: "buyerName",
  203. render: (text) => {
  204. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  205. },
  206. },
  207. {
  208. title: "外包公司",
  209. dataIndex: "outsourceName",
  210. key: "outsourceName",
  211. render: (text) => {
  212. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  213. },
  214. },
  215. {
  216. title: "流程状态",
  217. dataIndex: "processStatus",
  218. key: "processStatus",
  219. render: (text) => {
  220. return getProcessStatus(text);
  221. },
  222. },
  223. {
  224. title: "订单部门",
  225. dataIndex: "departmentName",
  226. key: "departmentName",
  227. render: (text) => {
  228. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  229. },
  230. },
  231. {
  232. title: "订单总金额(万)",
  233. dataIndex: "signTotalAmount",
  234. key: "signTotalAmount",
  235. },
  236. {
  237. title: "是否特批",
  238. dataIndex: "approval",
  239. key: "approval",
  240. render: (text) => {
  241. return getApproval(text);
  242. },
  243. },
  244. {
  245. title: "订单负责人",
  246. dataIndex: "sellerName",
  247. key: "sellerName",
  248. },
  249. {
  250. title: "操作",
  251. dataIndex: "caozuo",
  252. key: "caouzo",
  253. render: (text, recard) => {
  254. return <div>{this.judgeFenpai(recard)}</div>;
  255. },
  256. },
  257. ],
  258. columnsX: [
  259. {
  260. title: "业务项目名称",
  261. dataIndex: "commodityName",
  262. key: "commodityName",
  263. render: (text) => {
  264. return text && text.length > 6 ? (
  265. <span title={text}>{text.substr(0, 8)}...</span>
  266. ) : (
  267. text
  268. );
  269. },
  270. },
  271. {
  272. title: "项目类别",
  273. dataIndex: "cname",
  274. key: "cname",
  275. },
  276. {
  277. title: "项目数量",
  278. dataIndex: "commodityQuantity",
  279. key: "commodityQuantity",
  280. render: (text, record) => {
  281. if (record.splitStatus == 1) {
  282. return (
  283. <span>
  284. {text}{" "}
  285. <Tag
  286. color="#108ee9"
  287. onClick={(e) => {
  288. e.stopPropagation();
  289. this.showRes(record);
  290. }}
  291. >
  292. 已拆
  293. </Tag>
  294. </span>
  295. );
  296. } else {
  297. return text;
  298. }
  299. },
  300. },
  301. {
  302. title: "服务市价(万元)",
  303. dataIndex: "commodityPrice",
  304. key: "commodityPrice",
  305. },
  306. {
  307. title: "项目状态",
  308. dataIndex: "projectStatus",
  309. key: "projectStatus",
  310. render: (text) => {
  311. return getProjectName(text);
  312. },
  313. },
  314. {
  315. title: "证书编号",
  316. dataIndex: "certificateNumber",
  317. key: "certificateNumber",
  318. },
  319. {
  320. title: "是否主要项目",
  321. dataIndex: "main",
  322. key: "main",
  323. render: (text) => {
  324. return text ? "是" : "否";
  325. },
  326. },
  327. {
  328. title: "项目说明",
  329. dataIndex: "taskComment",
  330. key: "taskComment",
  331. render: (text) => {
  332. return text && text.length > 8 ? (
  333. <span title={text}>{text.substr(0, 8)}...</span>
  334. ) : (
  335. text
  336. );
  337. },
  338. },
  339. ],
  340. columnsY: [
  341. {
  342. title: "流程",
  343. dataIndex: "processName",
  344. key: "processName",
  345. },
  346. {
  347. title: "操作人",
  348. dataIndex: "adminName",
  349. key: "adminName",
  350. },
  351. {
  352. title: "时间",
  353. dataIndex: "createDate",
  354. key: "createDate",
  355. },
  356. ],
  357. columnsW: [
  358. {
  359. title: "外包名称",
  360. dataIndex: "name",
  361. key: "name",
  362. },
  363. {
  364. title: "联系人",
  365. dataIndex: "contacts",
  366. key: "contacts",
  367. },
  368. {
  369. title: "联系人电话",
  370. dataIndex: "contactsMobile",
  371. key: "contactsMobile",
  372. },
  373. {
  374. title: "地址",
  375. dataIndex: "ProvinceCity",
  376. key: "ProvinceCity",
  377. render: (test) => {
  378. return test[0] === null
  379. ? ""
  380. : getprovince(test[0]) +
  381. "/" +
  382. getprovince(test[1]) +
  383. "/" +
  384. getprovince(test[2]);
  385. },
  386. },
  387. {
  388. title: "地址详情",
  389. dataIndex: "address",
  390. key: "address",
  391. render: (text) => {
  392. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  393. },
  394. },
  395. {
  396. title: "创建时间",
  397. dataIndex: "createTimes",
  398. key: "createTimes",
  399. },
  400. {
  401. title: "任务名称",
  402. dataIndex: "tname",
  403. key: "tname",
  404. },
  405. {
  406. title: "合同编号",
  407. dataIndex: "contractNo",
  408. key: "contractNo",
  409. },
  410. {
  411. title: "项目状态",
  412. dataIndex: "projectStatus",
  413. key: "projectStatus",
  414. render: (text) => {
  415. return getProjectName(text);
  416. },
  417. },
  418. ],
  419. dataSource: [],
  420. searchTime: [,],
  421. };
  422. },
  423. /* 判断是否有分派按钮 */
  424. judgeFenpai(recard) {
  425. if (recard.approval === 2) {
  426. if (recard.financeId === null || recard.financeId === "") {
  427. return (
  428. <Button
  429. type="primary"
  430. onClick={(e) => {
  431. e.stopPropagation(), this.evaluate(recard);
  432. }}
  433. >
  434. 分派
  435. </Button>
  436. );
  437. } else {
  438. return undefined;
  439. }
  440. } else if (recard.processStatus <= 2) {
  441. return (
  442. <Button
  443. type="primary"
  444. onClick={(e) => {
  445. e.stopPropagation(), this.evaluate(recard);
  446. }}
  447. >
  448. 分派
  449. </Button>
  450. );
  451. } else {
  452. return undefined;
  453. }
  454. },
  455. jdDate(orderNo) {
  456. $.ajax({
  457. method: "get",
  458. dataType: "json",
  459. crossDomain: false,
  460. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  461. data: {
  462. orderNo: orderNo,
  463. },
  464. success: function (data) {
  465. let thisData = data.data;
  466. if (!thisData.length) {
  467. if (data.error && data.error.length) {
  468. message.warning(data.error[0].message);
  469. }
  470. thisData = {};
  471. } else {
  472. this.setState({
  473. jsDate: thisData,
  474. });
  475. }
  476. }.bind(this),
  477. }).always(
  478. function () {
  479. this.setState({
  480. loading: false,
  481. });
  482. }.bind(this)
  483. );
  484. },
  485. /* 分派 */
  486. evaluate(recard) {
  487. this.state.assignData = recard;
  488. this.setState({
  489. assignVisible: true,
  490. });
  491. },
  492. /* 驳回 */
  493. reject(recard) {
  494. this.setState({
  495. bohuiData: recard,
  496. boHuiVisible: true,
  497. content: "",
  498. });
  499. },
  500. boHuiOk() {
  501. this.setState({
  502. boHuiVisible: false,
  503. });
  504. if (
  505. this.state.pagination.current == this.state.totalPage &&
  506. this.state.pagination.total % 10 == 1
  507. ) {
  508. this.loadData(this.state.page - 1);
  509. } else {
  510. this.loadData(this.state.page);
  511. }
  512. },
  513. boHuiCancel() {
  514. this.setState({
  515. boHuiVisible: false,
  516. });
  517. },
  518. componentWillMount() {
  519. this.departmentList();
  520. this.loadData();
  521. },
  522. // 拆分详细
  523. showRes(record) {
  524. this.setState({
  525. resVisible: true,
  526. resRecord: record,
  527. });
  528. },
  529. resCancel() {
  530. this.setState({
  531. resVisible: false,
  532. });
  533. },
  534. tableRowClick(record) {
  535. this.state.RowData = record;
  536. this.setState({
  537. showDesc: true,
  538. visible: true,
  539. orderNo: record.orderNo,
  540. modKey: "1",
  541. });
  542. this.jdDate(record.orderNo);
  543. this.loadXmu(record);
  544. this.loadModal(record);
  545. },
  546. //详情
  547. callBack(key) {
  548. if (key === "2") {
  549. this.setState({
  550. modKey: key,
  551. width: "1200px",
  552. });
  553. this.loadWaiBao();
  554. }
  555. if (key === "1") {
  556. this.setState({
  557. modKey: key,
  558. width: "800px",
  559. });
  560. }
  561. if (this.state.pictureUrl.length) {
  562. let picArr = [];
  563. this.state.pictureUrl.map(function (item) {
  564. if (item.response && item.response.data && item.response.data.length) {
  565. picArr.push(item.response.data);
  566. }
  567. });
  568. }
  569. if (key === "3") {
  570. this.setState({
  571. modKey: key,
  572. width: "800px",
  573. });
  574. this.setState({
  575. loading: true,
  576. });
  577. $.ajax({
  578. method: "get",
  579. dataType: "json",
  580. crossDomain: false,
  581. url:
  582. globalConfig.context + "/api/admin/outsourceOrg/orderOutsourceDtails",
  583. data: {
  584. orderNo: this.state.orderNo,
  585. },
  586. success: function (data) {
  587. let thisdata = data.data;
  588. this.setState({
  589. id: thisdata.id,
  590. createTimes: thisdata.createTimes,
  591. auditTimes: thisdata.auditTimes,
  592. remarks: thisdata.remarks,
  593. attachmentUrl: thisdata.attachmentUrl
  594. ? splitUrl(
  595. thisdata.attachmentUrl,
  596. ",",
  597. globalConfig.avatarHost + "/upload"
  598. )
  599. : [],
  600. pictureUrl: thisdata.pictureUrl
  601. ? splitUrl(
  602. thisdata.pictureUrl,
  603. ",",
  604. globalConfig.avatarHost + "/upload"
  605. )
  606. : [], //图片地址
  607. amount: thisdata.amount,
  608. companyName: thisdata.companyName,
  609. refundStatus: thisdata.refundStatus,
  610. outsourceRemarks: thisdata.outsourceRemarks,
  611. unitNumber: thisdata.unitNumber,
  612. unitPrice: thisdata.unitPrice,
  613. });
  614. }.bind(this),
  615. }).always(
  616. function () {
  617. this.setState({
  618. loading: false,
  619. });
  620. }.bind(this)
  621. );
  622. }
  623. },
  624. //外包详情
  625. loadWaiBao() {
  626. $.ajax({
  627. method: "get",
  628. dataType: "json",
  629. rossDomain: false,
  630. url:
  631. globalConfig.context +
  632. "/api/admin/outsourceOrg/selectOrderOutsourceOrg",
  633. data: {
  634. orderNo: this.state.orderNo,
  635. },
  636. success: function (data) {
  637. let theArr = [];
  638. if (data.error.length || data.data.list == "") {
  639. if (data.error && data.error.length) {
  640. message.warning(data.error[0].message);
  641. }
  642. } else {
  643. for (let i = 0; i < data.data.length; i++) {
  644. let thisdata = data.data[i];
  645. let ProvinceCityArr = [];
  646. let ProvinceS = thisdata.province; //省
  647. let citys = thisdata.city; //市
  648. let Areas = thisdata.area; //区
  649. ProvinceCityArr.push(ProvinceS, citys, Areas);
  650. theArr.push({
  651. key: i,
  652. id: thisdata.id,
  653. name: thisdata.name,
  654. contacts: thisdata.contacts, //订单编号
  655. contactsMobile: thisdata.contactsMobile,
  656. ProvinceCity: ProvinceCityArr[0] === null ? [] : ProvinceCityArr,
  657. province: thisdata.province,
  658. city: thisdata.city,
  659. area: thisdata.area,
  660. address: thisdata.address,
  661. remarks: thisdata.remarks,
  662. tid: thisdata.tid,
  663. createTimes: thisdata.createTimes,
  664. tname: thisdata.tname,
  665. contractNo: thisdata.contractNo,
  666. projectStatus: thisdata.projectStatus,
  667. });
  668. }
  669. }
  670. this.setState(
  671. {
  672. dataSourceW: theArr,
  673. },
  674. () => {}
  675. );
  676. }.bind(this),
  677. }).always(
  678. function () {
  679. this.setState({
  680. loading: false,
  681. });
  682. }.bind(this)
  683. );
  684. },
  685. loadXmu(record) {
  686. this.state.data = [];
  687. this.setState({
  688. loading: true,
  689. });
  690. $.ajax({
  691. method: "get",
  692. dataType: "json",
  693. crossDomain: false,
  694. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  695. data: {
  696. orderNo: record.orderNo,
  697. },
  698. success: function (data) {
  699. let theArr = [];
  700. if (!data.data) {
  701. if (data.error && data.error.length) {
  702. message.warning(data.error[0].message);
  703. }
  704. } else {
  705. for (let i = 0; i < data.data.length; i++) {
  706. let thisdata = data.data[i];
  707. theArr.push({
  708. key: i,
  709. id: thisdata.id,
  710. orderNo: thisdata.orderNo,
  711. commodityName: thisdata.commodityName,
  712. commodityPrice: thisdata.commodityPrice,
  713. commodityQuantity: thisdata.commodityQuantity,
  714. taskStatus: thisdata.taskStatus,
  715. taskComment: thisdata.taskComment,
  716. main: thisdata.main,
  717. contacts: thisdata.contacts,
  718. contactsMobile: thisdata.contactsMobile,
  719. cname: thisdata.cname,
  720. certificateNumber: thisdata.certificateNumber,
  721. projectStatus: thisdata.projectStatus,
  722. splitStatus: thisdata.splitStatus,
  723. });
  724. }
  725. }
  726. this.setState({
  727. dataSourceX: theArr,
  728. });
  729. }.bind(this),
  730. }).always(
  731. function () {
  732. this.setState({
  733. loading: false,
  734. });
  735. }.bind(this)
  736. );
  737. },
  738. loadModal(record) {
  739. this.state.orderList = [];
  740. $.ajax({
  741. method: "get",
  742. dataType: "json",
  743. crossDomain: false,
  744. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  745. data: {
  746. orderNo: record.orderNo,
  747. },
  748. success: function (data) {
  749. let thisData = data.data;
  750. if (!thisData) {
  751. if (data.error && data.error.length) {
  752. message.warning(data.error[0].message);
  753. }
  754. thisData = {};
  755. }
  756. this.setState({
  757. orderUid: thisData.uid,
  758. id: thisData.id,
  759. orderList: thisData,
  760. approval:
  761. thisData.approval == 0
  762. ? thisData.approval.toString()
  763. : thisData.approval,
  764. orderRemarks: thisData.orderRemarks,
  765. orgCodeUrl: thisData.contractPictureUrl
  766. ? splitUrl(
  767. thisData.contractPictureUrl,
  768. ",",
  769. globalConfig.avatarHost + "/upload"
  770. )
  771. : [],
  772. replenishUrl: thisData.agreementUrl
  773. ? splitUrl(
  774. thisData.agreementUrl,
  775. ",",
  776. globalConfig.avatarHost + "/upload"
  777. )
  778. : [],
  779. orderNo: thisData.orderNo, //订单编号
  780. buyerId: thisData.buyerId,
  781. depName: thisData.depName,
  782. deleteSign:thisData.deleteSign,
  783. });
  784. }.bind(this),
  785. }).always(
  786. function () {
  787. this.setState({
  788. loading: false,
  789. });
  790. }.bind(this)
  791. );
  792. },
  793. rizhi() {
  794. this.setState({
  795. loading: true,
  796. });
  797. $.ajax({
  798. method: "get",
  799. dataType: "json",
  800. crossDomain: false,
  801. url: "/api/admin/newOrder/selectOrderLog",
  802. data: {
  803. orderNo: this.state.orderNo,
  804. },
  805. success: function (data) {
  806. let theArr = [];
  807. let thisData = data.data;
  808. if (!thisData.length) {
  809. if (data.error && data.error.length) {
  810. message.warning(data.error[0].message);
  811. }
  812. thisData = {};
  813. } else {
  814. for (let i = 0; i < data.data.length; i++) {
  815. let thisdata = data.data[i];
  816. theArr.push({
  817. processName: thisdata.processName,
  818. adminName: thisdata.adminName,
  819. createDate: thisdata.createDate,
  820. remarks: thisdata.remarks,
  821. });
  822. }
  823. }
  824. this.setState({
  825. dataSourceY: theArr,
  826. });
  827. }.bind(this),
  828. }).always(
  829. function () {
  830. this.setState({
  831. loading: false,
  832. });
  833. }.bind(this)
  834. );
  835. },
  836. closeOrderLog() {
  837. this.setState({
  838. avisible: false,
  839. });
  840. },
  841. load() {
  842. if (this.state.attachmentUrl) {
  843. let url = window.location.href.substring(7);
  844. this.state.attachmentUrl.forEach((e) => {
  845. window.location.href =
  846. "http://" +
  847. url.substring(0, url.indexOf("/")) +
  848. "/api/admin/outsourceOrg//downloadFile?path=" +
  849. e.response.data;
  850. });
  851. } else {
  852. message.error("此订单无上传文件");
  853. }
  854. },
  855. getOrderLog() {
  856. this.setState({
  857. avisible: true,
  858. });
  859. this.rizhi();
  860. },
  861. closeModal() {
  862. this.setState(
  863. {
  864. visible: false,
  865. width: "800px",
  866. },
  867. () => {
  868. this.setState({
  869. modKey: "1",
  870. });
  871. }
  872. );
  873. },
  874. closeDesc(e, s) {
  875. this.state.showDesc = e;
  876. if (s) {
  877. this.loadData(this.state.page);
  878. }
  879. },
  880. closeAssign(e, s) {
  881. this.state.assignVisible = e;
  882. if (s) {
  883. if (
  884. this.state.pagination.current == this.state.totalPage &&
  885. this.state.pagination.total % 10 == 1
  886. ) {
  887. this.loadData(this.state.page - 1);
  888. } else {
  889. this.loadData(this.state.page);
  890. }
  891. }
  892. },
  893. search() {
  894. this.loadData();
  895. },
  896. downImg() {
  897. let num = 0;
  898. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  899. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  900. num = i;
  901. }
  902. }
  903. if (num == this.state.orgCodeUrl.length - 1) {
  904. return message.warning("已经是最后一张了哦");
  905. }
  906. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  907. this.setState({
  908. previewImage: this.state.previewImage,
  909. rotateDeg: 0,
  910. });
  911. },
  912. upImg() {
  913. let num = 0;
  914. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  915. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  916. num = i;
  917. }
  918. }
  919. if (num == 0) {
  920. return message.warning("已经是第一张了哦");
  921. }
  922. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  923. this.setState({
  924. previewImage: this.state.previewImage,
  925. rotateDeg: 0,
  926. });
  927. },
  928. rotate() {
  929. let rotateDeg = this.state.rotateDeg + 90;
  930. this.setState({
  931. rotateDeg,
  932. });
  933. },
  934. downImgs() {
  935. let num = 0;
  936. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  937. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  938. num = i;
  939. }
  940. }
  941. if (num == this.state.replenishUrl.length - 1) {
  942. return message.warning("已经是最后一张了哦");
  943. }
  944. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  945. this.setState({
  946. previewImage: this.state.previewImage,
  947. rotateDeg: 0,
  948. });
  949. },
  950. upImgs() {
  951. let num = 0;
  952. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  953. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  954. num = i;
  955. }
  956. }
  957. if (num == 0) {
  958. return message.warning("已经是第一张了哦");
  959. }
  960. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  961. this.setState({
  962. previewImage: this.state.previewImage,
  963. rotateDeg: 0,
  964. });
  965. },
  966. rotates() {
  967. let rotateDeg = this.state.rotateDeg + 90;
  968. this.setState({
  969. rotateDeg,
  970. });
  971. },
  972. reset() {
  973. this.state.nameSearch = "";
  974. this.state.releaseDate = [];
  975. this.state.orderNoSearch = "";
  976. this.state.departmenttList = undefined;
  977. this.state.processStatus = [];
  978. this.state.contractNoSearch = "";
  979. this.loadData();
  980. },
  981. searchSwitch() {
  982. this.setState({
  983. searchMore: !this.state.searchMore,
  984. });
  985. },
  986. changeList(arr) {
  987. const newArr = [];
  988. this.state.columns.forEach(item => {
  989. arr.forEach(val => {
  990. if (val === item.title) {
  991. newArr.push(item);
  992. }
  993. });
  994. });
  995. this.setState({
  996. changeList: newArr
  997. });
  998. },
  999. render() {
  1000. const { RangePicker } = DatePicker;
  1001. const { TabPane } = Tabs;
  1002. var departmentArr = this.state.departmentArr || [];
  1003. const theData = this.state.orderList || {};
  1004. const formItemLayout = {
  1005. labelCol: { span: 8 },
  1006. wrapperCol: { span: 12 },
  1007. };
  1008. const jsDate = this.state.jsDate || [];
  1009. return (
  1010. <div className="user-content">
  1011. {this.state.resVisible ? (
  1012. <ResolutionDetail
  1013. cancel={this.resCancel}
  1014. detail={this.state.resRecord}
  1015. visible={this.state.resVisible}
  1016. id={this.state.resRecord.orderNo}
  1017. />
  1018. ) : (
  1019. ""
  1020. )}
  1021. <div className="content-title">
  1022. <span>外包派单</span>
  1023. </div>
  1024. <Tabs defaultActiveKey="1" className="test">
  1025. <TabPane tab="搜索" key="1">
  1026. <div className="user-search">
  1027. <Input
  1028. placeholder="客户名称"
  1029. value={this.state.nameSearch}
  1030. onChange={(e) => {
  1031. this.setState({ nameSearch: e.target.value });
  1032. }}
  1033. />
  1034. <Input
  1035. placeholder="订单编号"
  1036. value={this.state.orderNoSearch}
  1037. onChange={(e) => {
  1038. this.setState({ orderNoSearch: e.target.value });
  1039. }}
  1040. />
  1041. <Select
  1042. placeholder="订单部门"
  1043. style={{ width: 150, marginRight: 10 }}
  1044. value={this.state.departmenttList}
  1045. onChange={(e) => {
  1046. this.setState({ departmenttList: e });
  1047. }}
  1048. >
  1049. {departmentArr.map(function (item) {
  1050. return <Select.Option key={item.id}>{item.name}</Select.Option>;
  1051. })}
  1052. </Select>
  1053. <Select
  1054. placeholder="流程状态"
  1055. onChange={(e) => {
  1056. this.setState({ processStatusSearch: e });
  1057. }}
  1058. style={{ width: 160, marginRight: 5 }}
  1059. value={this.state.processStatusSearch}
  1060. >
  1061. <Option value="2">未分配</Option>
  1062. <Option value="3">已分配</Option>
  1063. </Select>
  1064. <Input
  1065. placeholder="合同编号"
  1066. value={this.state.contractNoSearch}
  1067. onChange={(e) => {
  1068. this.setState({
  1069. contractNoSearch: e.target.value,
  1070. });
  1071. }}
  1072. />
  1073. <span style={{ marginRight: 10 }}>下单时间 :</span>
  1074. <RangePicker
  1075. value={[
  1076. this.state.releaseDate[0]
  1077. ? moment(this.state.releaseDate[0])
  1078. : null,
  1079. this.state.releaseDate[1]
  1080. ? moment(this.state.releaseDate[1])
  1081. : null,
  1082. ]}
  1083. onChange={(data, dataString) => {
  1084. this.setState({ releaseDate: dataString });
  1085. }}
  1086. />
  1087. <Button
  1088. type="primary"
  1089. onClick={this.search}
  1090. style={{ marginLeft: 10 }}
  1091. >
  1092. 搜索
  1093. </Button>
  1094. <Button onClick={this.reset}>重置</Button>
  1095. </div>
  1096. </TabPane>
  1097. <TabPane tab="更改表格显示数据" key="2">
  1098. <div style={{ marginLeft: 10 }}>
  1099. <ChooseList
  1100. columns={this.state.columns}
  1101. changeFn={this.changeList}
  1102. changeList={this.state.changeList}
  1103. top={55}
  1104. margin={11}
  1105. />
  1106. </div>
  1107. </TabPane>
  1108. </Tabs>
  1109. <div className="patent-table">
  1110. <Spin spinning={this.state.loading}>
  1111. <Table
  1112. columns={
  1113. this.state.changeList
  1114. ? this.state.changeList
  1115. : this.state.columns
  1116. }
  1117. dataSource={this.state.dataSource}
  1118. scroll={{ x: 1500, y: 0 }}
  1119. rowSelection={false}
  1120. size="small"
  1121. bordered
  1122. style={{
  1123. cursor: 'pointer',
  1124. }}
  1125. pagination={this.state.pagination}
  1126. onRowClick={this.tableRowClick.bind(this)}
  1127. />
  1128. </Spin>
  1129. </div>
  1130. <div className="patent-desc">
  1131. {this.state.visible ? <Modal
  1132. maskClosable={false}
  1133. visible={this.state.visible}
  1134. onCancel={this.closeModal}
  1135. width={this.state.width}
  1136. footer=""
  1137. className="admin-desc-content"
  1138. >
  1139. <Tabs
  1140. onChange={this.callBack}
  1141. type="card"
  1142. activeKey={this.state.modKey}
  1143. tabBarExtraContent={
  1144. <div style={{fontWeight:'bold',paddingRight:'15px'}}>
  1145. <OrderItemStatus deleteSign={this.state.deleteSign}/>
  1146. </div>
  1147. }
  1148. >
  1149. <TabPane tab="项目概况" key="1">
  1150. {this.state.modKey === "1" ? <Form layout="horizontal" id="demand-form">
  1151. <Spin spinning={this.state.loading}>
  1152. <div className="clearfix">
  1153. <FormItem
  1154. className="half-item"
  1155. {...formItemLayout}
  1156. label="订单编号"
  1157. >
  1158. <span>{this.state.orderNo}</span>
  1159. </FormItem>
  1160. <FormItem
  1161. className="half-item"
  1162. {...formItemLayout}
  1163. label="签单时间"
  1164. >
  1165. <span>{theData.signDate}</span>
  1166. </FormItem>
  1167. <FormItem
  1168. className="half-item"
  1169. {...formItemLayout}
  1170. label="客户名称"
  1171. >
  1172. <span>{theData.userName}</span>
  1173. <EnterpriseNameChange
  1174. type='journal'
  1175. style={{ marginLeft: 10 }}
  1176. enterpriseId={this.state.orderUid}/>
  1177. </FormItem>
  1178. <FormItem
  1179. className="half-item"
  1180. {...formItemLayout}
  1181. label="流转状态"
  1182. >
  1183. <span>{getProcessStatus(theData.processStatus)}</span>
  1184. </FormItem>
  1185. <FormItem
  1186. className="half-item"
  1187. {...formItemLayout}
  1188. label="订单类型"
  1189. >
  1190. <span>{getNewOrderType(theData.orderType)}</span>
  1191. </FormItem>
  1192. <FormItem
  1193. className="half-item"
  1194. {...formItemLayout}
  1195. label="结算状态"
  1196. >
  1197. <span>
  1198. {getLiquidationStatus(theData.liquidationStatus)}
  1199. </span>
  1200. </FormItem>
  1201. <FormItem
  1202. className="half-item"
  1203. {...formItemLayout}
  1204. label="签单总金额(万元)"
  1205. >
  1206. <span>{theData.totalAmount}</span>
  1207. </FormItem>
  1208. <FormItem
  1209. className="half-item"
  1210. {...formItemLayout}
  1211. label="首付款(万元)"
  1212. >
  1213. <span>{theData.firstAmount}</span>
  1214. </FormItem>
  1215. <FormItem
  1216. className="half-item"
  1217. {...formItemLayout}
  1218. label="已收款(万元)"
  1219. >
  1220. <span>{theData.settlementAmount}</span>
  1221. </FormItem>
  1222. <FormItem
  1223. className="half-item"
  1224. {...formItemLayout}
  1225. label="是否特批"
  1226. >
  1227. <span>{getApproval(theData.approval)}</span>
  1228. </FormItem>
  1229. {/*this.props.data.orderStatus=='6'&&<FormItem className="half-item" {...formItemLayout} label="已退(万元)">
  1230. <span>{this.props.data.refundAmount}</span>
  1231. </FormItem>*/}
  1232. </div>
  1233. <div className="clearfix">
  1234. <FormItem
  1235. labelCol={{ span: 5 }}
  1236. wrapperCol={{ span: 18 }}
  1237. label="合同扫描件"
  1238. >
  1239. {/*<Upload*/}
  1240. {/* className="demandDetailShow-upload"*/}
  1241. {/* listType="picture-card"*/}
  1242. {/* fileList={this.state.orgCodeUrl}*/}
  1243. {/* onPreview={(file) => {*/}
  1244. {/* this.setState({*/}
  1245. {/* previewImage: file.url || file.thumbUrl,*/}
  1246. {/* previewVisible: true,*/}
  1247. {/* });*/}
  1248. {/* }}*/}
  1249. {/*/>*/}
  1250. {this.state.visible && this.state.modKey === "1" && this.state.orgCodeUrl ? <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1251. <ImgList fileList={this.state.orgCodeUrl} domId={'outsourcingPaiDan1'}/>
  1252. </div> : <div/>}
  1253. <Modal
  1254. maskClosable={false}
  1255. footer={null}
  1256. width={"50%"}
  1257. visible={this.state.previewVisible}
  1258. onCancel={() => {
  1259. this.setState({
  1260. previewVisible: false,
  1261. rotateDeg: 0,
  1262. });
  1263. }}
  1264. >
  1265. <img
  1266. alt=""
  1267. style={{
  1268. width: "100%",
  1269. transform: `rotate(${this.state.rotateDeg}deg)`,
  1270. }}
  1271. src={this.state.previewImage || ""}
  1272. />
  1273. <Button
  1274. onClick={this.rotate}
  1275. style={{
  1276. position: "relative",
  1277. left: "50%",
  1278. transform: "translateX(-50%)",
  1279. }}
  1280. >
  1281. 旋转
  1282. </Button>
  1283. <Button
  1284. onClick={this.upImg}
  1285. style={{
  1286. position: "absolute",
  1287. left: -81,
  1288. top: "50%",
  1289. transform: "translateY(-50%)",
  1290. }}
  1291. >
  1292. 上一张
  1293. </Button>
  1294. <Button
  1295. onClick={this.downImg}
  1296. style={{
  1297. position: "absolute",
  1298. right: -81,
  1299. top: "50%",
  1300. transform: "translateY(-50%)",
  1301. }}
  1302. >
  1303. 下一张
  1304. </Button>
  1305. </Modal>
  1306. <Button
  1307. style={{
  1308. float: "right",
  1309. marginRight: "140px",
  1310. marginTop: "20px",
  1311. }}
  1312. onClick={this.getOrderLog}
  1313. >
  1314. 查看订单日志
  1315. </Button>
  1316. </FormItem>
  1317. <FormItem
  1318. labelCol={{ span: 5 }}
  1319. wrapperCol={{ span: 18 }}
  1320. label="补充协议"
  1321. >
  1322. {/*<Upload*/}
  1323. {/* className="demandDetailShow-upload"*/}
  1324. {/* listType="picture-card"*/}
  1325. {/* fileList={this.state.replenishUrl}*/}
  1326. {/* onPreview={(file) => {*/}
  1327. {/* this.setState({*/}
  1328. {/* previewImage: file.url || file.thumbUrl,*/}
  1329. {/* previewVisibles: true,*/}
  1330. {/* });*/}
  1331. {/* }}*/}
  1332. {/*/>*/}
  1333. {this.state.visible && this.state.modKey === "1" && this.state.replenishUrl ? <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1334. <ImgList fileList={this.state.replenishUrl} domId={'outsourcingPaiDan2'}/>
  1335. </div> : <div/>}
  1336. <Modal
  1337. maskClosable={false}
  1338. footer={null}
  1339. width={"50%"}
  1340. visible={this.state.previewVisibles}
  1341. onCancel={() => {
  1342. this.setState({
  1343. previewVisibles: false,
  1344. rotateDeg: 0,
  1345. });
  1346. }}
  1347. >
  1348. <img
  1349. alt=""
  1350. style={{
  1351. width: "100%",
  1352. transform: `rotate(${this.state.rotateDeg}deg)`,
  1353. }}
  1354. src={this.state.previewImage || ""}
  1355. />
  1356. <Button
  1357. onClick={this.rotates}
  1358. style={{
  1359. position: "relative",
  1360. left: "50%",
  1361. transform: "translateX(-50%)",
  1362. }}
  1363. >
  1364. 旋转
  1365. </Button>
  1366. <Button
  1367. onClick={this.upImgs}
  1368. style={{
  1369. position: "absolute",
  1370. left: -81,
  1371. top: "50%",
  1372. transform: "translateY(-50%)",
  1373. }}
  1374. >
  1375. 上一张
  1376. </Button>
  1377. <Button
  1378. onClick={this.downImgs}
  1379. style={{
  1380. position: "absolute",
  1381. right: -81,
  1382. top: "50%",
  1383. transform: "translateY(-50%)",
  1384. }}
  1385. >
  1386. 下一张
  1387. </Button>
  1388. </Modal>
  1389. </FormItem>
  1390. </div>
  1391. <div className="clearfix">
  1392. <FormItem
  1393. className="half-item"
  1394. {...formItemLayout}
  1395. label="合同编号"
  1396. >
  1397. <span>{theData.contractNo}</span>
  1398. </FormItem>
  1399. <FormItem
  1400. className="half-item"
  1401. {...formItemLayout}
  1402. label="订单部门"
  1403. >
  1404. <span>{theData.depName}</span>
  1405. </FormItem>
  1406. </div>
  1407. <div className="clearfix">
  1408. <FormItem
  1409. labelCol={{ span: 5 }}
  1410. wrapperCol={{ span: 18 }}
  1411. label="订单留言"
  1412. >
  1413. <p style={{ width: 500, wordWrap: "break-word" }}>
  1414. {this.state.orderRemarks}
  1415. </p>
  1416. </FormItem>
  1417. </div>
  1418. <div className="clearfix">
  1419. <FormItem
  1420. labelCol={{ span: 5 }}
  1421. wrapperCol={{ span: 18 }}
  1422. label="收款节点"
  1423. >
  1424. {jsDate.map((item) => {
  1425. return (
  1426. <p>
  1427. {getjiedian(item.dunSubject)} -- {item.money} 万元
  1428. </p>
  1429. );
  1430. })}
  1431. </FormItem>
  1432. </div>
  1433. <div className="clearfix">
  1434. <FormItem
  1435. className="half-item"
  1436. {...formItemLayout}
  1437. label="订单负责人"
  1438. >
  1439. <span>{theData.salesmanName}</span>
  1440. </FormItem>
  1441. <FormItem
  1442. className="half-item"
  1443. {...formItemLayout}
  1444. label="订单负责人电话"
  1445. >
  1446. <span>{theData.salesmanMobile}</span>
  1447. </FormItem>
  1448. <FormItem
  1449. className="half-item"
  1450. {...formItemLayout}
  1451. label="财务负责人"
  1452. >
  1453. <span>{theData.financeName}</span>
  1454. </FormItem>
  1455. <FormItem
  1456. className="half-item"
  1457. {...formItemLayout}
  1458. label="财务负责人电话"
  1459. >
  1460. <span>{theData.financeMobile}</span>
  1461. </FormItem>
  1462. </div>
  1463. <Modal
  1464. visible={this.state.avisible}
  1465. className="admin-desc-content"
  1466. width="800px"
  1467. maskClosable={false}
  1468. title="订单日志"
  1469. footer={null}
  1470. onCancel={this.closeOrderLog}
  1471. >
  1472. <div className="patent-table">
  1473. <Spin spinning={this.state.loading}>
  1474. <Table
  1475. columns={this.state.columnsY}
  1476. size="small"
  1477. bordered
  1478. dataSource={this.state.dataSourceY}
  1479. pagination={false}
  1480. />
  1481. </Spin>
  1482. </div>
  1483. </Modal>
  1484. <div className="clearfix">
  1485. <p style={{ fontSize: 18, marginLeft: 20 }}>项目业务</p>
  1486. <div className="patent-table">
  1487. <Spin spinning={this.state.loading}>
  1488. <Table
  1489. columns={this.state.columnsX}
  1490. dataSource={this.state.dataSourceX}
  1491. pagination={false}
  1492. size="small"
  1493. bordered
  1494. style={{
  1495. cursor: 'pointer',
  1496. }}
  1497. onRowClick={this.tableRowClick}
  1498. />
  1499. </Spin>
  1500. </div>
  1501. </div>
  1502. </Spin>
  1503. </Form>:<div/>}
  1504. </TabPane>
  1505. <TabPane tab="外包详情" key="2">
  1506. <div className="clearfix">
  1507. <p style={{ color: "red" }}>
  1508. 提示:查看备注请点击表格左侧加号按钮~
  1509. </p>
  1510. <div className="patent-table">
  1511. <Spin spinning={this.state.loading}>
  1512. <Table
  1513. columns={this.state.columnsW}
  1514. dataSource={this.state.dataSourceW}
  1515. pagination={false}
  1516. expandedRowRender={(record) => (
  1517. <p style={{ margin: 0 }}>{record.remarks}</p>
  1518. )}
  1519. scroll={{ x: 300, y: 0 }}
  1520. />
  1521. </Spin>
  1522. </div>
  1523. </div>
  1524. </TabPane>
  1525. <TabPane tab="外包审核" key="3">
  1526. <div className="clearfix">
  1527. <FormItem
  1528. className="half-item"
  1529. {...formItemLayout}
  1530. label="外包公司"
  1531. >
  1532. <span>{this.state.companyName}</span>
  1533. </FormItem>
  1534. </div>
  1535. <div className="clearfix">
  1536. <FormItem
  1537. className="half-item"
  1538. {...formItemLayout}
  1539. label="单价(万元)"
  1540. >
  1541. <span>{this.state.unitPrice}</span>
  1542. </FormItem>
  1543. </div>
  1544. <div className="clearfix">
  1545. <FormItem
  1546. className="half-item"
  1547. {...formItemLayout}
  1548. label="数量(个)"
  1549. >
  1550. <span>{this.state.unitNumber}</span>
  1551. </FormItem>
  1552. </div>
  1553. <div className="clearfix">
  1554. <FormItem
  1555. className="half-item"
  1556. {...formItemLayout}
  1557. label="总金额(万元)"
  1558. >
  1559. <span>{this.state.amount}</span>
  1560. </FormItem>
  1561. </div>
  1562. <div className="clearfix">
  1563. <FormItem
  1564. className="half-item"
  1565. {...formItemLayout}
  1566. label="备注"
  1567. >
  1568. <span>{this.state.outsourceRemarks}</span>
  1569. </FormItem>
  1570. </div>
  1571. {/*<div className="clearfix">
  1572. <FormItem className="half-item"
  1573. {...formItemLayout}
  1574. label="上传协议文件" >
  1575. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1576. data={(e)=>{
  1577. return {
  1578. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1579. }
  1580. }}
  1581. fileList={this.state.attachmentUrl}
  1582. showUploadList={{showRemoveIcon:false}}
  1583. onPreview={(e)=>{
  1584. let url = window.location.href.substring(7)
  1585. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  1586. }}>
  1587. </Upload>
  1588. </FormItem>
  1589. </div>*/}
  1590. <div className="clearfix">
  1591. <FormItem
  1592. labelCol={{ span: 4 }}
  1593. wrapperCol={{ span: 18 }}
  1594. label="合同/协议扫描件"
  1595. >
  1596. {/*<Upload*/}
  1597. {/* className="demandDetailShow-upload"*/}
  1598. {/* listType="picture-card"*/}
  1599. {/* fileList={this.state.pictureUrl}*/}
  1600. {/* onPreview={(file) => {*/}
  1601. {/* this.setState({*/}
  1602. {/* previewImage: file.url || file.thumbUrl,*/}
  1603. {/* previewVisible: true,*/}
  1604. {/* });*/}
  1605. {/* }}*/}
  1606. {/*/>*/}
  1607. {this.state.visible && this.state.modKey === "3" && this.state.pictureUrl ? <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1608. <ImgList fileList={this.state.pictureUrl} domId={'outsourcingPaiDan3'}/>
  1609. </div> : <div/>}
  1610. <Modal
  1611. maskClosable={false}
  1612. footer={null}
  1613. visible={this.state.previewVisible}
  1614. onCancel={() => {
  1615. this.setState({ previewVisible: false });
  1616. }}
  1617. >
  1618. <img
  1619. alt=""
  1620. style={{ width: "100%" }}
  1621. src={this.state.previewImage || ""}
  1622. />
  1623. </Modal>
  1624. </FormItem>
  1625. </div>
  1626. <div className="clearfix">
  1627. <hr className="division" />
  1628. <div className="clearfix">
  1629. <FormItem
  1630. className="half-item"
  1631. {...formItemLayout}
  1632. label="审核意见"
  1633. >
  1634. <span>{this.state.remarks}</span>
  1635. </FormItem>
  1636. </div>
  1637. <div className="clearfix">
  1638. <FormItem
  1639. className="half-item"
  1640. {...formItemLayout}
  1641. label="审核结果"
  1642. >
  1643. <span>{getRefundStatus(this.state.refundStatus)}</span>
  1644. </FormItem>
  1645. </div>
  1646. <div className="clearfix">
  1647. <FormItem
  1648. className="half-item"
  1649. {...formItemLayout}
  1650. label="审核时间"
  1651. >
  1652. <span>{this.state.auditTimes}</span>
  1653. </FormItem>
  1654. </div>
  1655. </div>
  1656. </TabPane>
  1657. </Tabs>
  1658. </Modal> : <div/>}
  1659. </div>
  1660. <Assign
  1661. title="订单"
  1662. selApi="/api/admin/financial/distributionFinance"
  1663. data={this.state.assignData}
  1664. fenpaiData={4}
  1665. showDesc={this.state.assignVisible}
  1666. closeDesc={this.closeAssign.bind(this)}
  1667. roleName={"财务专员"}
  1668. requestMethod={"post"}
  1669. />
  1670. <Modal
  1671. visible={this.state.boHuiVisible}
  1672. width="400px"
  1673. title="驳回备注"
  1674. footer=""
  1675. maskClosable={false}
  1676. onOk={this.boHuiOk}
  1677. onCancel={this.boHuiCancel}
  1678. >
  1679. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  1680. <Spin spinning={this.state.loading}>
  1681. <FormItem
  1682. labelCol={{ span: 5 }}
  1683. wrapperCol={{ span: 16 }}
  1684. label={
  1685. <span>
  1686. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  1687. </span>
  1688. }
  1689. >
  1690. <Input
  1691. type="textarea"
  1692. rows={4}
  1693. placeholder="请输入驳回原因"
  1694. value={this.state.content}
  1695. onChange={(e) => {
  1696. this.setState({ content: e.target.value });
  1697. }}
  1698. />
  1699. </FormItem>
  1700. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  1701. <Button
  1702. type="primary"
  1703. htmlType="submit"
  1704. style={{ marginRight: 20 }}
  1705. >
  1706. 驳回
  1707. </Button>
  1708. <Button
  1709. type="default"
  1710. onClick={() => {
  1711. this.boHuiCancel();
  1712. }}
  1713. >
  1714. 取消
  1715. </Button>
  1716. </FormItem>
  1717. </Spin>
  1718. </Form>
  1719. </Modal>
  1720. </div>
  1721. );
  1722. },
  1723. });
  1724. export default outsourcingPaiDan;