outsourcingPro.jsx 73 KB

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