outsourcingPro.jsx 71 KB

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