outsourcingPro.jsx 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007
  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: "orderNo",
  213. key: "orderNo",
  214. },
  215. {
  216. title: "合同编号",
  217. dataIndex: "contractNo",
  218. key: "contractNo",
  219. },
  220. {
  221. title: "客户名称",
  222. dataIndex: "userName",
  223. key: "userName",
  224. },
  225. {
  226. title: "订单部门",
  227. dataIndex: "depName",
  228. key: "depName",
  229. },
  230. {
  231. title: "订单负责人",
  232. dataIndex: "adminName",
  233. key: "adminName",
  234. },
  235. {
  236. title: "项目类别",
  237. dataIndex: "cname",
  238. key: "cname",
  239. },
  240. {
  241. title: "项目编号",
  242. dataIndex: "tid",
  243. key: "tid",
  244. },
  245. {
  246. title: "项目名称",
  247. dataIndex: "bname",
  248. key: "bname",
  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. theArr.push({
  839. key: i,
  840. id: thisData.id, //节点Id
  841. tid: thisData.tid,
  842. companyName: thisData.companyName, //供应商名称
  843. unitPrice: thisData.unitPrice, //单价
  844. quantity: thisData.quantity, //数量
  845. totalAmount: thisData.totalAmount, //总价
  846. material: thisData.material, //材料 0无 1有
  847. urgent: thisData.urgent, // 0无加急(系统默认)1加急3天 2加急4天 3加急5-10天 4加急11-15天 5加急16-20天 6加急21-25天 7加急26-30天
  848. audit: thisData.audit, //0无审计 1年审 2专审
  849. assets: thisData.assets, //资产
  850. income: thisData.income, //收入
  851. remarks: thisData.remarks, //备注
  852. cid: thisData.cid, //机构id
  853. })
  854. }
  855. if (!allTotalAmount) {
  856. allTotalAmount = 0
  857. }
  858. console.log(theArr)
  859. console.log(companyNameArr)
  860. this.setState({
  861. tid: id,
  862. PayNodeCompany: companyNameArr,
  863. thirdInfoList: theArr,
  864. allTotalAmount: allTotalAmount,
  865. })
  866. }
  867. }.bind(this),
  868. }).always(
  869. function () {
  870. this.setState({
  871. loading: false,
  872. })
  873. }.bind(this)
  874. )
  875. },
  876. payNodeTable(id) {
  877. $.ajax({
  878. method: 'get',
  879. dataType: 'json',
  880. crossDomain: false,
  881. url: globalConfig.context + '/api/admin/company/selectPaymentNode',
  882. data: {
  883. tid: id,
  884. },
  885. success: function (data) {
  886. if (data.error && data.error.length) {
  887. message.warning(data.error[0].message)
  888. } else {
  889. let payNodeArr = []
  890. let thisData = []
  891. let arr = data.data || []
  892. // console.log('this.state.paySubject', this.state.paySubject)
  893. //对#5283自定义的补充展示
  894. this.state.paySubject.push({ key: '自定义', value: '0' })
  895. for (let i = 0; i < arr.length; i++) {
  896. thisData = arr[i]
  897. //遍历paySubject,获取当前dunType对应的key
  898. this.state.paySubject.map((item) => {
  899. if (item.value == thisData.dunType) {
  900. thisData.dunType = item.key
  901. }
  902. })
  903. payNodeArr.push({
  904. key: i,
  905. id: thisData.id, //付款节点Id
  906. tid: thisData.tid,
  907. companyName: thisData.companyName, //供应商名称
  908. projectType: thisData.projectType, //项目分类
  909. dunType: thisData.dunType, //催款分类
  910. unitPrice: thisData.unitPrice, //单价
  911. quantity: thisData.quantity, //数量
  912. totalAmount: thisData.totalAmount, //总价
  913. partyAmount: thisData.partyAmount, //付款
  914. partyTimes: thisData.partyTimes, //付款时间
  915. cid: thisData.cid, //机构id
  916. })
  917. }
  918. // console.log('paySubject:', this.state.paySubject)
  919. this.setState({
  920. tid: id,
  921. payNodeList: payNodeArr,
  922. })
  923. }
  924. }.bind(this),
  925. }).always(
  926. function () {
  927. this.setState({
  928. loading: false,
  929. })
  930. }.bind(this)
  931. )
  932. },
  933. waiDetail() {
  934. let url = window.location.href.substring(7)
  935. this.setState({
  936. loading: true,
  937. })
  938. $.ajax({
  939. method: 'get',
  940. dataType: 'json',
  941. crossDomain: false,
  942. url:
  943. globalConfig.context + '/api/admin/outsourceOrg/orderOutsourceDtails',
  944. data: {
  945. tid: this.state.tid,
  946. orderNo: this.state.orderNo,
  947. },
  948. }).done(
  949. function (data) {
  950. this.setState({
  951. loading: false,
  952. })
  953. if (!data.error.length && data.data) {
  954. this.setState({
  955. startType: data.data.startType, //类型
  956. patentType: data.data.patentType, //专利类型
  957. patentNameType: data.data.patentNameType, //专利名称类型
  958. patentName: data.data.patentName, //专利名称
  959. outsourceRemarks: data.data.outsourceRemarks,
  960. remarks: data.data.remarks,
  961. companyName: data.data.companyName,
  962. amount: data.data.amount,
  963. mid: data.data.id,
  964. unitPrice: data.data.unitPrice,
  965. refundStatus: data.data.refundStatus,
  966. unitNumber: data.data.unitNumber,
  967. pictureUrl: data.data.pictureUrl
  968. ? splitUrl(
  969. data.data.pictureUrl,
  970. ',',
  971. globalConfig.avatarHost + '/upload',
  972. url
  973. )
  974. : [], //图片地址
  975. createTimes: data.data.createTimes,
  976. auditTimes: data.data.auditTimes,
  977. })
  978. } else if (data.error && data.error.length) {
  979. message.warning(data.error[0].message)
  980. } else if (!data.data) {
  981. this.setState({
  982. refundStatus: undefined,
  983. })
  984. }
  985. }.bind(this)
  986. )
  987. },
  988. tableRowClick(record) {
  989. this.setState(
  990. {
  991. visible: true,
  992. loading: true,
  993. refundStatus: record.refundStatus,
  994. tid: record.tid,
  995. },
  996. () => {
  997. console.log(this.state.tid);
  998. }
  999. );
  1000. this.xiangqing(record.orderNo);
  1001. this.xiangmu(record.orderNo);
  1002. this.jiedian(record.orderNo);
  1003. this.jiedianNew(record.orderNo);
  1004. // 获取第三方信息表格
  1005. this.thirdTable(record.tid);
  1006. //获取支付节点信息表格
  1007. this.payNodeTable(record.tid);
  1008. $.ajax({
  1009. method: "get",
  1010. dataType: "json",
  1011. crossDomain: false,
  1012. url:
  1013. globalConfig.context + "/api/admin/outsourceOrg/orderOutsourceDtails",
  1014. data: {
  1015. orderNo: record.orderNo,
  1016. tid: record.tid,
  1017. },
  1018. success: function (data) {
  1019. if (data.error.length || data.data.list == "") {
  1020. if (data.error && data.error.length) {
  1021. message.warning(data.error[0].message);
  1022. }
  1023. } else {
  1024. let thisdata = data.data;
  1025. this.setState({
  1026. id: thisdata.id,
  1027. orderNo: thisdata.orderNo,
  1028. createTimes: thisdata.createTimes,
  1029. auditTimes: thisdata.auditTimes,
  1030. remarks: thisdata.remarks,
  1031. pictureUrl: thisdata.pictureUrl
  1032. ? splitUrl(
  1033. thisdata.pictureUrl,
  1034. ",",
  1035. globalConfig.avatarHost + "/upload"
  1036. )
  1037. : [], //图片地址
  1038. amount: thisdata.amount,
  1039. refundStatus: thisdata.refundStatus,
  1040. companyName: thisdata.companyName,
  1041. outsourceRemarks: thisdata.outsourceRemarks,
  1042. unitNumber: thisdata.unitNumber,
  1043. unitPrice: thisdata.unitPrice,
  1044. });
  1045. }
  1046. }.bind(this),
  1047. }).always(
  1048. function () {
  1049. this.setState({
  1050. loading: false,
  1051. });
  1052. }.bind(this)
  1053. );
  1054. },
  1055. //页面加载函数
  1056. componentWillMount() {
  1057. this.loadData();
  1058. },
  1059. //审核
  1060. examOk() {
  1061. if (this.state.remarks == "" || this.state.remarks == undefined) {
  1062. message.warning("请填写备注信息!");
  1063. return;
  1064. }
  1065. this.setState({
  1066. loading: true,
  1067. });
  1068. $.ajax({
  1069. method: "post",
  1070. dataType: "json",
  1071. crossDomain: false,
  1072. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsourceNew",
  1073. data: {
  1074. id: this.state.id,
  1075. orderNo: this.state.orderNo,
  1076. tid: this.state.tid,
  1077. remarks: this.state.remarks,
  1078. refundStatus: 1,
  1079. type: 1,
  1080. },
  1081. success: function (data) {
  1082. if (data.error.length || data.data.list == "") {
  1083. if (data.error && data.error.length) {
  1084. message.warning(data.error[0].message);
  1085. }
  1086. } else {
  1087. message.success("该订单已通过");
  1088. this.setState({
  1089. visible: false,
  1090. });
  1091. this.cancel();
  1092. this.loadData();
  1093. }
  1094. }.bind(this),
  1095. }).always(
  1096. function () {
  1097. this.setState({
  1098. loading: false,
  1099. });
  1100. }.bind(this)
  1101. );
  1102. },
  1103. examNo() {
  1104. if (this.state.remarks == "" || this.state.remarks == undefined) {
  1105. message.warning("请填写备注信息!");
  1106. return;
  1107. }
  1108. this.setState({
  1109. loading: true,
  1110. });
  1111. $.ajax({
  1112. method: "post",
  1113. dataType: "json",
  1114. crossDomain: false,
  1115. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsourceNew",
  1116. data: {
  1117. id: this.state.id,
  1118. orderNo: this.state.orderNo,
  1119. tid: this.state.tid,
  1120. remarks: this.state.remarks,
  1121. refundStatus: 2,
  1122. type: 1,
  1123. },
  1124. success: function (data) {
  1125. if (data.error.length || data.data.list == "") {
  1126. if (data.error && data.error.length) {
  1127. message.warning(data.error[0].message);
  1128. }
  1129. } else {
  1130. message.success("该订单已驳回");
  1131. this.setState({
  1132. visible: false,
  1133. });
  1134. this.cancel();
  1135. this.loadData();
  1136. }
  1137. }.bind(this),
  1138. }).always(
  1139. function () {
  1140. this.setState({
  1141. loading: false,
  1142. });
  1143. }.bind(this)
  1144. );
  1145. },
  1146. //通过发给外包
  1147. outsourcing() {
  1148. if (this.state.flag) return;
  1149. this.setState({
  1150. flag: true,
  1151. });
  1152. $.ajax({
  1153. method: "post",
  1154. dataType: "json",
  1155. crossDomain: false,
  1156. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  1157. data: {
  1158. orderNo: this.state.orderNo,
  1159. orderStatus: 2,
  1160. outsource: 1,
  1161. },
  1162. success: function (data) {
  1163. if (data.error.length || data.data.list == "") {
  1164. if (data.error && data.error.length) {
  1165. message.warning(data.error[0].message);
  1166. }
  1167. } else {
  1168. message.success("该订单已通过审核~");
  1169. this.setState({
  1170. visible: false,
  1171. flag: false,
  1172. });
  1173. this.reset();
  1174. }
  1175. }.bind(this),
  1176. }).always(
  1177. function () {
  1178. this.setState({
  1179. loading: false,
  1180. });
  1181. }.bind(this)
  1182. );
  1183. },
  1184. getUrl(url) {
  1185. let theorgCodeUrl = [];
  1186. if (url.length) {
  1187. let picArr = [];
  1188. url.map(function (item) {
  1189. if (
  1190. item.response &&
  1191. item.response.data &&
  1192. item.response.data.length
  1193. ) {
  1194. picArr.push(item.response.data);
  1195. }
  1196. });
  1197. theorgCodeUrl = picArr.join(",");
  1198. }
  1199. return theorgCodeUrl;
  1200. },
  1201. //搜索
  1202. search() {
  1203. this.loadData();
  1204. },
  1205. //重置
  1206. reset() {
  1207. this.state.nameSearch = "";
  1208. this.state.contractNoSearch = "";
  1209. this.state.releaseDate[0] = undefined;
  1210. this.state.releaseDate[1] = undefined;
  1211. this.state.refundStatusSearch = undefined;
  1212. this.loadData(1);
  1213. },
  1214. resets() {
  1215. this.state.orderNo = "";
  1216. this.state.customerName = "";
  1217. this.state.releaseDate[0] = undefined;
  1218. this.state.releaseDate[1] = undefined;
  1219. },
  1220. getOrgCodeUrl(e) {
  1221. this.setState({ pictureUrl: e });
  1222. },
  1223. callback(e) {
  1224. if (e == 2) {
  1225. this.waiDetail()
  1226. }
  1227. this.setState({
  1228. activeKey: e,
  1229. });
  1230. },
  1231. downImg() {
  1232. let num = 0;
  1233. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1234. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1235. num = i;
  1236. }
  1237. }
  1238. if (num == this.state.orgCodeUrl.length - 1) {
  1239. return message.warning("已经是最后一张了哦");
  1240. }
  1241. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  1242. this.setState({
  1243. previewImage: this.state.previewImage,
  1244. rotateDeg: 0,
  1245. });
  1246. },
  1247. upImg() {
  1248. let num = 0;
  1249. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1250. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1251. num = i;
  1252. }
  1253. }
  1254. if (num == 0) {
  1255. return message.warning("已经是第一张了哦");
  1256. }
  1257. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  1258. this.setState({
  1259. previewImage: this.state.previewImage,
  1260. rotateDeg: 0,
  1261. });
  1262. },
  1263. rotate() {
  1264. let rotateDeg = this.state.rotateDeg + 90;
  1265. this.setState({
  1266. rotateDeg,
  1267. });
  1268. },
  1269. downImgs() {
  1270. let num = 0;
  1271. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  1272. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  1273. num = i;
  1274. }
  1275. }
  1276. if (num == this.state.replenishUrl.length - 1) {
  1277. return message.warning("已经是最后一张了哦");
  1278. }
  1279. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  1280. this.setState({
  1281. previewImage: this.state.previewImage,
  1282. rotateDeg: 0,
  1283. });
  1284. },
  1285. upImgs() {
  1286. let num = 0;
  1287. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  1288. if (this.state.replenishUrl[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.replenishUrl[num - 1].url;
  1296. this.setState({
  1297. previewImage: this.state.previewImage,
  1298. rotateDeg: 0,
  1299. });
  1300. },
  1301. rotates() {
  1302. let rotateDeg = this.state.rotateDeg + 90;
  1303. this.setState({
  1304. rotateDeg,
  1305. });
  1306. },
  1307. render() {
  1308. const formItemLayout = {
  1309. labelCol: { span: 8 },
  1310. wrapperCol: { span: 14 },
  1311. };
  1312. const FormItem = Form.Item;
  1313. const { TextArea } = Input;
  1314. const { TabPane } = Tabs;
  1315. const { RangePicker } = DatePicker;
  1316. const cuiDataList = this.state.contactList || [];
  1317. return (
  1318. <div className="user-content">
  1319. {this.state.resVisible ? (
  1320. <ResolutionDetail
  1321. cancel={this.resCancel}
  1322. detail={this.state.resRecord}
  1323. visible={this.state.resVisible}
  1324. id={this.state.resRecord.orderNo}
  1325. />
  1326. ) : (
  1327. ""
  1328. )}
  1329. <ShowModalDiv ShowModal={this.state.showModal} />
  1330. <div className="content-title" style={{ marginBottom: 10 }}>
  1331. <span style={{ fontWeight: 900, fontSize: 16 }}>外包项目列表</span>
  1332. </div>
  1333. <div className="user-search">
  1334. <Tabs
  1335. defaultActiveKey="1"
  1336. onChange={(e) => {
  1337. this.callback(e);
  1338. }}
  1339. className="test"
  1340. >
  1341. <TabPane tab="搜索" key="1">
  1342. <Input
  1343. placeholder="客户名称"
  1344. style={{
  1345. width: "150px",
  1346. marginBottom: "10px",
  1347. marginLeft: 10,
  1348. marginRight: 10,
  1349. }}
  1350. value={this.state.nameSearch}
  1351. onChange={(e) => {
  1352. this.setState({ nameSearch: e.target.value });
  1353. }}
  1354. />
  1355. <Input
  1356. placeholder="合同编号"
  1357. style={{ width: "150px" }}
  1358. value={this.state.contractNoSearch}
  1359. onChange={(e) => {
  1360. this.setState({ contractNoSearch: e.target.value });
  1361. }}
  1362. />
  1363. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1364. <RangePicker
  1365. value={[
  1366. this.state.releaseDate[0]
  1367. ? moment(this.state.releaseDate[0])
  1368. : null,
  1369. this.state.releaseDate[1]
  1370. ? moment(this.state.releaseDate[1])
  1371. : null,
  1372. ]}
  1373. onChange={(data, dataString) => {
  1374. this.setState({ releaseDate: dataString });
  1375. }}
  1376. />
  1377. <Select
  1378. value={this.state.refundStatusSearch}
  1379. style={{ width: 150, marginLeft: "10px" }}
  1380. onChange={(e) => {
  1381. this.setState({
  1382. refundStatusSearch: e,
  1383. });
  1384. }}
  1385. placeholder="审核状态"
  1386. >
  1387. <Option value={0}>待审核</Option>
  1388. <Option value={1}>审核通过</Option>
  1389. <Option value={2}>审核驳回</Option>
  1390. </Select>
  1391. <Button
  1392. type="primary"
  1393. onClick={this.search}
  1394. style={{ marginLeft: "10px", marginRight: 10 }}
  1395. >
  1396. 搜索
  1397. </Button>
  1398. <Button onClick={this.reset}>重置</Button>
  1399. </TabPane>
  1400. </Tabs>
  1401. <div className="patent-table">
  1402. <Spin spinning={this.state.loading}>
  1403. <Table
  1404. columns={this.state.columns}
  1405. dataSource={this.state.dataSource}
  1406. pagination={this.state.pagination}
  1407. onRowClick={this.tableRowClick}
  1408. bordered
  1409. size="small"
  1410. />
  1411. </Spin>
  1412. </div>
  1413. <Modal
  1414. maskClosable={false}
  1415. visible={this.state.visible}
  1416. onCancel={this.cancel}
  1417. width="900px"
  1418. title={""}
  1419. footer=""
  1420. className="admin-desc-content"
  1421. confirmLoading={this.state.confirmLoading}
  1422. >
  1423. <Tabs activeKey={this.state.activeKey} onChange={this.callback}>
  1424. <TabPane tab="订单详情" key="1">
  1425. <Form
  1426. layout="horizontal"
  1427. onSubmit={this.handleSubmit}
  1428. id="demand-form"
  1429. style={{ paddingBottom: "40px" }}
  1430. >
  1431. <Spin spinning={this.state.loading}>
  1432. <div className="clearfix">
  1433. <FormItem
  1434. className="half-item"
  1435. {...formItemLayout}
  1436. label="订单编号"
  1437. >
  1438. <span>{this.state.orderNo}</span>
  1439. </FormItem>
  1440. <FormItem
  1441. className="half-item"
  1442. {...formItemLayout}
  1443. label="合同编号"
  1444. >
  1445. <span>{this.state.contractNo}</span>
  1446. </FormItem>
  1447. <FormItem
  1448. className="half-item"
  1449. {...formItemLayout}
  1450. label="客户名称"
  1451. >
  1452. <span>{this.state.userName}</span>
  1453. </FormItem>
  1454. <FormItem
  1455. className="half-item"
  1456. {...formItemLayout}
  1457. label="合同签订时间"
  1458. >
  1459. <span>{this.state.signDate}</span>
  1460. </FormItem>
  1461. <FormItem
  1462. className="half-item"
  1463. {...formItemLayout}
  1464. label="流程状态"
  1465. >
  1466. <span>
  1467. {getProcessStatus(this.state.processStatus)}
  1468. </span>
  1469. </FormItem>
  1470. <FormItem
  1471. className="half-item"
  1472. {...formItemLayout}
  1473. label="结算状态"
  1474. >
  1475. <span>
  1476. {getLiquidationStatus(this.state.liquidationStatus)}
  1477. </span>
  1478. </FormItem>
  1479. <FormItem
  1480. className="half-item"
  1481. {...formItemLayout}
  1482. label="企业联系人"
  1483. >
  1484. <span>{this.state.contacts}</span>
  1485. </FormItem>
  1486. <FormItem
  1487. className="half-item"
  1488. {...formItemLayout}
  1489. label="联系人电话"
  1490. >
  1491. <span>{this.state.contactMobile}</span>
  1492. </FormItem>
  1493. <FormItem
  1494. className="half-item"
  1495. {...formItemLayout}
  1496. label="企业法人"
  1497. >
  1498. <span>{this.state.legalPerson}</span>
  1499. </FormItem>
  1500. <FormItem
  1501. className="half-item"
  1502. {...formItemLayout}
  1503. label="法人电话"
  1504. >
  1505. <span>{this.state.legalPersonTel}</span>
  1506. </FormItem>
  1507. <FormItem
  1508. className="half-item"
  1509. {...formItemLayout}
  1510. label="签单金额(万元)"
  1511. >
  1512. <span>{this.state.totalAmount}</span>
  1513. </FormItem>
  1514. <FormItem
  1515. className="half-item"
  1516. {...formItemLayout}
  1517. label="首付金额(万元)"
  1518. >
  1519. <span>{this.state.firstAmount}</span>
  1520. </FormItem>
  1521. <FormItem
  1522. className="half-item"
  1523. {...formItemLayout}
  1524. label="特批立项"
  1525. >
  1526. <span>{getApprovedState(this.state.approval)}</span>
  1527. </FormItem>
  1528. <FormItem
  1529. className="half-item"
  1530. {...formItemLayout}
  1531. label="已收款项(万元)"
  1532. >
  1533. <span>{this.state.settlementAmount}</span>
  1534. </FormItem>
  1535. <FormItem
  1536. className="half-item"
  1537. {...formItemLayout}
  1538. label="订单部门"
  1539. >
  1540. <span>{this.state.depName}</span>
  1541. </FormItem>
  1542. <FormItem
  1543. className="half-item"
  1544. {...formItemLayout}
  1545. label="是否外包"
  1546. >
  1547. <span>{this.state.outsource}</span>
  1548. </FormItem>
  1549. <div className="clearfix">
  1550. <FormItem
  1551. labelCol={{ span: 4 }}
  1552. wrapperCol={{ span: 16 }}
  1553. label="订单留言"
  1554. >
  1555. <span>{this.state.orderRemarks}</span>
  1556. </FormItem>
  1557. </div>
  1558. <div className="clearfix">
  1559. <FormItem
  1560. labelCol={{ span: 4 }}
  1561. wrapperCol={{ span: 18 }}
  1562. label="合同扫描件"
  1563. >
  1564. <Upload
  1565. className="demandDetailShow-upload"
  1566. listType="picture-card"
  1567. fileList={this.state.orgCodeUrl}
  1568. onPreview={(file) => {
  1569. this.setState({
  1570. previewImage: file.url || file.thumbUrl,
  1571. previewVisible: true,
  1572. });
  1573. }}
  1574. ></Upload>
  1575. <Modal
  1576. maskClosable={false}
  1577. footer={null}
  1578. width={"50%"}
  1579. visible={this.state.previewVisible}
  1580. onCancel={() => {
  1581. this.setState({
  1582. previewVisible: false,
  1583. rotateDeg: 0,
  1584. });
  1585. }}
  1586. >
  1587. <img
  1588. alt=""
  1589. style={{
  1590. width: "100%",
  1591. transform: `rotate(${this.state.rotateDeg}deg)`,
  1592. }}
  1593. src={this.state.previewImage || ""}
  1594. />
  1595. <Button
  1596. onClick={this.rotate}
  1597. style={{
  1598. position: "relative",
  1599. left: "50%",
  1600. transform: "translateX(-50%)",
  1601. }}
  1602. >
  1603. 旋转
  1604. </Button>
  1605. <Button
  1606. onClick={this.upImg}
  1607. style={{
  1608. position: "absolute",
  1609. left: -81,
  1610. top: "50%",
  1611. transform: "translateY(-50%)",
  1612. }}
  1613. >
  1614. 上一张
  1615. </Button>
  1616. <Button
  1617. onClick={this.downImg}
  1618. style={{
  1619. position: "absolute",
  1620. right: -81,
  1621. top: "50%",
  1622. transform: "translateY(-50%)",
  1623. }}
  1624. >
  1625. 下一张
  1626. </Button>
  1627. </Modal>
  1628. <Button
  1629. style={{
  1630. float: "right",
  1631. marginRight: "140px",
  1632. marginTop: "20px",
  1633. }}
  1634. onClick={this.getOrderLog}
  1635. >
  1636. 查看订单日志
  1637. </Button>
  1638. </FormItem>
  1639. <FormItem
  1640. labelCol={{ span: 4 }}
  1641. wrapperCol={{ span: 18 }}
  1642. label="补充协议"
  1643. >
  1644. <Upload
  1645. className="demandDetailShow-upload"
  1646. listType="picture-card"
  1647. fileList={this.state.replenishUrl}
  1648. onPreview={(file) => {
  1649. this.setState({
  1650. previewImage: file.url || file.thumbUrl,
  1651. previewVisibles: true,
  1652. });
  1653. }}
  1654. ></Upload>
  1655. <Modal
  1656. maskClosable={false}
  1657. footer={null}
  1658. width={"50%"}
  1659. visible={this.state.previewVisibles}
  1660. onCancel={() => {
  1661. this.setState({
  1662. previewVisibles: false,
  1663. rotateDeg: 0,
  1664. });
  1665. }}
  1666. >
  1667. <img
  1668. alt=""
  1669. style={{
  1670. width: "100%",
  1671. transform: `rotate(${this.state.rotateDeg}deg)`,
  1672. }}
  1673. src={this.state.previewImage || ""}
  1674. />
  1675. <Button
  1676. onClick={this.rotate}
  1677. style={{
  1678. position: "relative",
  1679. left: "50%",
  1680. transform: "translateX(-50%)",
  1681. }}
  1682. >
  1683. 旋转
  1684. </Button>
  1685. <Button
  1686. onClick={this.upImgs}
  1687. style={{
  1688. position: "absolute",
  1689. left: -81,
  1690. top: "50%",
  1691. transform: "translateY(-50%)",
  1692. }}
  1693. >
  1694. 上一张
  1695. </Button>
  1696. <Button
  1697. onClick={this.downImgs}
  1698. style={{
  1699. position: "absolute",
  1700. right: -81,
  1701. top: "50%",
  1702. transform: "translateY(-50%)",
  1703. }}
  1704. >
  1705. 下一张
  1706. </Button>
  1707. </Modal>
  1708. </FormItem>
  1709. </div>
  1710. <div className="clearfix">
  1711. <FormItem
  1712. className="half-item"
  1713. {...formItemLayout}
  1714. label="订单负责人"
  1715. >
  1716. <span>{this.state.salesmanName}</span>
  1717. </FormItem>
  1718. <FormItem
  1719. className="half-item"
  1720. {...formItemLayout}
  1721. label="订单负责人电话"
  1722. >
  1723. <span>{this.state.salesmanMobile}</span>
  1724. </FormItem>
  1725. </div>
  1726. <div className="clearfix">
  1727. <FormItem
  1728. className="half-item"
  1729. {...formItemLayout}
  1730. label="当前财务负责人"
  1731. >
  1732. <span>{this.state.nowFinance}</span>
  1733. </FormItem>
  1734. <FormItem
  1735. className="half-item"
  1736. {...formItemLayout}
  1737. label="当前财务负责人电话"
  1738. >
  1739. <span>{this.state.nowFinanceMobile}</span>
  1740. </FormItem>
  1741. </div>
  1742. <div className="clearfix">
  1743. <FormItem
  1744. className="half-item"
  1745. {...formItemLayout}
  1746. style={{ opacity: ".5" }}
  1747. label="原订单负责人"
  1748. >
  1749. <span>{this.state.oldSalesmanName}</span>
  1750. </FormItem>
  1751. <FormItem
  1752. className="half-item"
  1753. {...formItemLayout}
  1754. style={{ opacity: ".5" }}
  1755. label="原订单负责人电话"
  1756. >
  1757. <span>{this.state.oldSalesmanMobile}</span>
  1758. </FormItem>
  1759. </div>
  1760. <div className="clearfix">
  1761. <FormItem
  1762. className="half-item"
  1763. style={{ opacity: ".5" }}
  1764. {...formItemLayout}
  1765. label="实际财务操作人"
  1766. >
  1767. <span>{this.state.financeName}</span>
  1768. </FormItem>
  1769. <FormItem
  1770. className="half-item"
  1771. {...formItemLayout}
  1772. style={{ opacity: ".5" }}
  1773. label="实际财务操作人电话"
  1774. >
  1775. <span>{this.state.financeMobile}</span>
  1776. </FormItem>
  1777. </div>
  1778. <div>
  1779. <span
  1780. style={{ marginLeft: "50px", fontSize: "20px" }}
  1781. >
  1782. 项目业务
  1783. </span>
  1784. {this.state.processStatus == 0 ? (
  1785. <Button
  1786. type="primary"
  1787. onClick={this.addDetailed}
  1788. style={{
  1789. float: "right",
  1790. marginRight: "50px",
  1791. marginBottom: "15px",
  1792. }}
  1793. >
  1794. 添加项目明细
  1795. </Button>
  1796. ) : (
  1797. ""
  1798. )}
  1799. </div>
  1800. <div className="patent-table">
  1801. <Spin spinning={this.state.loading}>
  1802. <Table
  1803. columns={this.state.columnsX}
  1804. dataSource={this.state.dataSourceX}
  1805. pagination={this.state.paginations}
  1806. onRowClick={this.tableRowClickX}
  1807. bordered
  1808. size="small"
  1809. />
  1810. </Spin>
  1811. </div>
  1812. <div>
  1813. <span style={{ marginLeft: 50, fontSize: "20px" }}>
  1814. 催款节点
  1815. </span>
  1816. <span
  1817. style={{
  1818. display: cuiDataList.length
  1819. ? "none"
  1820. : "inline-block",
  1821. marginLeft: 10,
  1822. color: "red",
  1823. }}
  1824. >
  1825. 金额总计(万元): {this.state.totalCui}
  1826. </span>
  1827. </div>
  1828. <div className="clearfix">
  1829. <Spin spinning={this.state.loading}>
  1830. <Form layout="horizontal" id="demand-form">
  1831. <Table
  1832. pagination={false}
  1833. bordered
  1834. size="small"
  1835. columns={
  1836. cuiDataList.length
  1837. ? this.state.ContactsLists
  1838. : this.state.ContactsListsNew
  1839. }
  1840. dataSource={
  1841. cuiDataList.length
  1842. ? this.state.contactList
  1843. : this.state.contactListNew
  1844. }
  1845. />
  1846. <Col
  1847. span={24}
  1848. offset={9}
  1849. style={{ marginTop: "15px" }}
  1850. />
  1851. </Form>
  1852. </Spin>
  1853. </div>
  1854. </div>
  1855. </Spin>
  1856. </Form>
  1857. </TabPane>
  1858. <TabPane tab="外包审核" key="2">
  1859. <Spin spinning={this.state.loading}>
  1860. <CheckProject
  1861. {...this.props}
  1862. tid={this.state.tid}
  1863. status={this.state.refundStatus}
  1864. thirdInfoList={this.state.thirdInfoList}
  1865. dataSource={this.state.payNodeList}
  1866. outsourceRemarks={this.state.outsourceRemarks}
  1867. fileList={this.state.pictureUrl}
  1868. startType={this.state.startType}
  1869. projectStatus={this.state.projectStatus}
  1870. />
  1871. {this.state.refundStatus == 0 ? (
  1872. <div>
  1873. <hr className="division" />
  1874. <div className="clearfix" style={{ marginTop: "20px" }}>
  1875. <FormItem
  1876. labelCol={{ span: 4 }}
  1877. wrapperCol={{ span: 18 }}
  1878. label={
  1879. <span>
  1880. <strong style={{ color: "#f00" }}>*</strong>
  1881. 审核意见
  1882. </span>
  1883. }
  1884. >
  1885. <Input
  1886. type="textarea"
  1887. placeholder="请输入备注"
  1888. rows={4}
  1889. value={this.state.remarks}
  1890. onChange={(e) => {
  1891. this.setState({ remarks: e.target.value });
  1892. }}
  1893. style={{ width: "440px" }}
  1894. />
  1895. <span
  1896. className="tip"
  1897. style={{
  1898. width: "160px",
  1899. verticalAlign: "top",
  1900. display: "inline-block",
  1901. marginLeft: "10px",
  1902. }}
  1903. >
  1904. 通过或驳回都必须填写审核意见!
  1905. </span>
  1906. </FormItem>
  1907. </div>
  1908. <div className="clearfix fa">
  1909. <Button
  1910. type="danger"
  1911. onClick={this.examNo}
  1912. loading={this.state.loading}
  1913. style={{
  1914. color: "#fff",
  1915. backgroundColor: "#f04134",
  1916. }}
  1917. >
  1918. 驳回
  1919. </Button>
  1920. <Button
  1921. type="primary"
  1922. loading={this.state.loading}
  1923. onClick={this.examOk}
  1924. >
  1925. 通过
  1926. </Button>
  1927. </div>
  1928. </div>
  1929. ) : (
  1930. <div className="clearfix">
  1931. <hr className="division" />
  1932. <div className="clearfix">
  1933. <FormItem
  1934. className="half-item"
  1935. {...formItemLayout}
  1936. label="审核意见"
  1937. >
  1938. <span>{this.state.remarks}</span>
  1939. </FormItem>
  1940. </div>
  1941. {parseInt(this.state.startType) !== 1 ?<div className="clearfix">
  1942. <FormItem
  1943. className="half-item"
  1944. {...formItemLayout}
  1945. label="审核结果"
  1946. >
  1947. <span>
  1948. {getRefundStatus(this.state.refundStatus)}
  1949. </span>
  1950. </FormItem>
  1951. </div> : <div/>}
  1952. <div className="clearfix">
  1953. <FormItem
  1954. className="half-item"
  1955. {...formItemLayout}
  1956. label="审核时间"
  1957. >
  1958. <span>{this.state.auditTimes}</span>
  1959. </FormItem>
  1960. </div>
  1961. </div>
  1962. )}
  1963. </Spin>
  1964. </TabPane>
  1965. </Tabs>
  1966. </Modal>
  1967. <Modal
  1968. visible={this.state.rizhivisible}
  1969. className="admin-desc-content"
  1970. width="800px"
  1971. maskClosable={false}
  1972. title="订单日志"
  1973. footer={null}
  1974. onCancel={this.closeOrderLog}
  1975. >
  1976. <div className="patent-table">
  1977. <Spin spinning={this.state.loading}>
  1978. <Table
  1979. columns={this.state.columnsrizhi}
  1980. dataSource={this.state.dataSourcerizhi}
  1981. pagination={false}
  1982. bordered
  1983. size="small"
  1984. />
  1985. </Spin>
  1986. </div>
  1987. </Modal>
  1988. </div>
  1989. </div>
  1990. );
  1991. },
  1992. })
  1993. );
  1994. export default outsourcingPro;