outsourcingPro.jsx 74 KB

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