outsourcingPro.jsx 75 KB

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