checkOutsourcing.jsx 58 KB

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