outsourcingPro.jsx 75 KB

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