outsourcingPro.jsx 74 KB

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