outsourcingPaiDan.jsx 53 KB

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