outsourcingPro.jsx 68 KB

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