outsourcingPro.jsx 75 KB

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