outsourcingPro.jsx 67 KB

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