outsourcingPro.jsx 67 KB

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