outsourcingPro.jsx 75 KB

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