outsourcingPro.jsx 73 KB

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