outsourcingPro.jsx 73 KB

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