outsourcingPro.jsx 75 KB

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