checkOutsourcing.jsx 67 KB

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