outsourcingPro.jsx 73 KB

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