outsourcingPro.jsx 74 KB

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