outsourcingPro.jsx 74 KB

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