outsourcingPro.jsx 74 KB

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