checkOutsourcing.jsx 57 KB

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