checkOutsourcing.jsx 58 KB

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