outsourcingPro.jsx 74 KB

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