outsourcingPro.jsx 73 KB

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