checkOutsourcing.jsx 65 KB

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