checkOutsourcing.jsx 67 KB

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