projectQuery.jsx 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275
  1. import React,{Component} from 'react';
  2. import ajax from 'jquery/src/ajax/xhr.js';
  3. import $ from 'jquery/src/ajax';
  4. import moment from 'moment';
  5. import '@/manageCenter/financialManage/distribute/public.less';
  6. import { Icon, Button,Form, Input, Select, Spin,Tag, Table, Switch, message, DatePicker, Modal,Upload ,Col,Tabs} from 'antd';
  7. import OrderDesc from '@/manageCenter/financialManage/orderDetail/orderDesc'
  8. import Assign from '@/manageCenter/publicComponent/assign';
  9. import ResolutionDetail from "@/resolutionDetail";
  10. import {
  11. getProcessStatus,
  12. getApproval,
  13. getLiquidationStatus,
  14. getApprovedState,
  15. splitUrl,
  16. getjiedian,
  17. getboutique,
  18. ShowModal
  19. } from "@/tools";
  20. import ShowModalDiv from "@/showModal.jsx";
  21. import OrderRiZi from "@/orderRiZi.jsx";
  22. import ImgList from "../../../common/imgList";
  23. import {ChooseList} from "../../order/orderNew/chooseList";
  24. import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
  25. import OrderItemStatus from "../../../common/orderItemStatus";
  26. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  27. import OrderCoor from '../../order/orderNew/changeComponent/orderCoor';
  28. import ContentUrl from '../../order/orderNew/contentUrl';
  29. const {TabPane} = Tabs
  30. const PaiDan = React.createClass({
  31. loadData(pageNo) {
  32. this.state.data = [];
  33. this.setState({
  34. page: pageNo,
  35. loading: true
  36. });
  37. $.ajax({
  38. method: "get",
  39. dataType: "json",
  40. crossDomain: false,
  41. url: globalConfig.context + "/api/admin/newOrder/orderNewList",
  42. data: {
  43. pageNo: pageNo || 1,
  44. pageSize: this.state.pagination.pageSize,
  45. specially: 4, //咨询师管理列表
  46. distribution: this.state.distribution, //全部列表
  47. name: this.state.customerName, //名称
  48. depId: this.state.departmenttSearch, //订单部门
  49. orderNo: this.state.orderNoSearch, //订单编号
  50. starTime: this.state.releaseDate[0], //开始时间
  51. endTime: this.state.releaseDate[1] //结束时间
  52. },
  53. success: function(data) {
  54. ShowModal(this);
  55. let theArr = [];
  56. if (!data.data || !data.data.list) {
  57. if (data.error && data.error.length) {
  58. message.warning(data.error[0].message);
  59. }
  60. } else {
  61. for (let i = 0; i < data.data.list.length; i++) {
  62. let thisdata = data.data.list[i];
  63. theArr.push({
  64. key: i,
  65. id: thisdata.id, //任务ID
  66. orderNo: thisdata.orderNo, //订单编号
  67. totalAmount: thisdata.totalAmount, //签单金额
  68. processStatus: thisdata.processStatus, //流程状态
  69. liquidationStatus: thisdata.liquidationStatus, //结算状态
  70. approval: thisdata.approval, //特批状态
  71. signDate: thisdata.signDate, //签单时间
  72. userName: thisdata.userName, //客户名称
  73. salesmanName: thisdata.salesmanName, //营销员名称
  74. financeName: thisdata.financeName, //财务名称
  75. consultantName: thisdata.consultantName, //项目负责人
  76. createDate: thisdata.createDate, //下单时间
  77. depName: thisdata.depName //部门名称
  78. });
  79. }
  80. }
  81. this.state.pagination.current = data.data.pageNo;
  82. this.state.pagination.total = data.data.totalCount;
  83. if (data.data && data.data.list && !data.data.list.length) {
  84. this.state.pagination.current = 0;
  85. this.state.pagination.total = 0;
  86. }
  87. this.setState({
  88. dataSource: theArr,
  89. pagination: this.state.pagination
  90. });
  91. }.bind(this)
  92. }).always(
  93. function() {
  94. this.setState({
  95. loading: false
  96. });
  97. }.bind(this)
  98. );
  99. },
  100. getInitialState() {
  101. return {
  102. rotateDeg: 0,
  103. orderNos:'',
  104. searchMore: true,
  105. releaseDate: [],
  106. activeKey: "1",
  107. orgCodeUrl: [],
  108. voucherUrl: [],
  109. boHuivisible: false,
  110. selectedRowKeys: [],
  111. declarationBatch: 1,
  112. dataInfor: {},
  113. selectedRows: [],
  114. loading: false,
  115. resVisible: false,
  116. paginations: false,
  117. pagination: {
  118. defaultCurrent: 1,
  119. defaultPageSize: 10,
  120. showQuickJumper: true,
  121. pageSize: 10,
  122. onChange: function(page) {
  123. this.loadData(page);
  124. }.bind(this),
  125. showTotal: function(total) {
  126. return "共" + total + "条数据";
  127. }
  128. },
  129. columns: [
  130. {
  131. title: "订单编号",
  132. dataIndex: "orderNo",
  133. key: "orderNo"
  134. },
  135. {
  136. title: "签单客户",
  137. dataIndex: "userName",
  138. key: "userName"
  139. },
  140. {
  141. title: "下单时间",
  142. dataIndex: "createDate",
  143. key: "createDate"
  144. },
  145. {
  146. title: "签单时间",
  147. dataIndex: "signDate",
  148. key: "signDate"
  149. },
  150. {
  151. title: "订单总金额(万)",
  152. dataIndex: "totalAmount",
  153. key: "totalAmount"
  154. },
  155. {
  156. title: "是否特批",
  157. dataIndex: "approval",
  158. key: "approval",
  159. render: text => {
  160. return getApproval(text);
  161. }
  162. },
  163. {
  164. title: "订单负责人",
  165. dataIndex: "salesmanName",
  166. key: "salesmanName"
  167. },
  168. {
  169. title: "财务负责人",
  170. dataIndex: "financeName",
  171. key: "financeName"
  172. },
  173. {
  174. title: "项目负责人",
  175. dataIndex: "consultantName",
  176. key: "consultantName"
  177. },
  178. {
  179. title: "订单部门",
  180. dataIndex: "depName",
  181. key: "depName"
  182. },
  183. {
  184. title: "分派状态",
  185. dataIndex: "processStatus",
  186. key: "processStatus",
  187. render: text => {
  188. return text == 5 || text == 6 ? getProcessStatus(text) : "未分配";
  189. }
  190. }
  191. ],
  192. columnsrizhi: [
  193. {
  194. title: "流程",
  195. dataIndex: "processName",
  196. key: "processName"
  197. },
  198. {
  199. title: "操作人",
  200. dataIndex: "adminName",
  201. key: "adminName"
  202. },
  203. {
  204. title: "时间",
  205. dataIndex: "createDate",
  206. key: "createDate"
  207. }
  208. ],
  209. dataSource: [],
  210. searchTime: [],
  211. columnsX: [
  212. {
  213. title: "业务项目名称",
  214. dataIndex: "commodityName",
  215. key: "commodityName",
  216. render: (text, record) => {
  217. return (
  218. <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
  219. )
  220. }
  221. },
  222. {
  223. title: "项目类别",
  224. dataIndex: "cname",
  225. key: "cname"
  226. },
  227. {
  228. title: "项目数量",
  229. dataIndex: "commodityQuantity",
  230. key: "commodityQuantity",
  231. render: (text, record) => {
  232. if (record.splitStatus == 1) {
  233. return (
  234. <span>
  235. {text}{" "}
  236. <Tag
  237. color="#108ee9"
  238. onClick={e => {
  239. e.stopPropagation();
  240. this.showRes(record);
  241. }}
  242. >
  243. 已拆
  244. </Tag>
  245. </span>
  246. );
  247. } else {
  248. return text;
  249. }
  250. }
  251. },
  252. {
  253. title: "金额(万元)",
  254. dataIndex: "commodityPrice",
  255. key: "commodityPrice"
  256. },
  257. {
  258. title: "负责人",
  259. dataIndex: "contacts",
  260. key: "contacts"
  261. },
  262. {
  263. title: "负责人电话",
  264. dataIndex: "contactsMobile",
  265. key: "contactsMobile"
  266. },
  267. {
  268. title: "主要项目",
  269. dataIndex: "main",
  270. key: "main",
  271. render: text => {
  272. return text ? "是" : "否";
  273. }
  274. },
  275. {
  276. title: "项目说明",
  277. dataIndex: "taskComment",
  278. key: "taskComment",
  279. render: text => {
  280. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  281. }
  282. }
  283. ],
  284. dataSourceX: []
  285. };
  286. },
  287. componentWillMount() {
  288. this.departmentList();
  289. this.loadData();
  290. },
  291. tableRowClick(record, index) {
  292. this.state.RowData = record;
  293. this.setState({
  294. visible: true,
  295. orderNos:record.orderNo
  296. });
  297. this.xiangqing(record.orderNo);
  298. this.xiangmu(record.orderNo);
  299. },
  300. // 拆分详细
  301. showRes(record) {
  302. this.setState({
  303. resVisible: true,
  304. resRecord: record
  305. });
  306. },
  307. resCancel() {
  308. this.setState({
  309. resVisible: false
  310. });
  311. },
  312. //订单详情
  313. xiangqing(orderNos) {
  314. $.ajax({
  315. method: "get",
  316. dataType: "json",
  317. crossDomain: false,
  318. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  319. data: {
  320. orderNo: orderNos
  321. },
  322. success: function(data) {
  323. let theArr = [];
  324. if (data.error.length || data.data.list == "") {
  325. if (data.error && data.error.length) {
  326. message.warning(data.error[0].message);
  327. }
  328. } else {
  329. let thisdata = data.data;
  330. this.setState({
  331. orderUid: thisdata.uid,
  332. orderNo: thisdata.orderNo, //订单编号
  333. contractNo: thisdata.contractNo, //合同编号
  334. userName: thisdata.userName, //客户名称
  335. signDate: thisdata.signDate, //签单时间
  336. processStatus: thisdata.processStatus, //流程状态
  337. liquidationStatus: thisdata.liquidationStatus, //结算状态
  338. contacts: thisdata.contacts, //企业联系人
  339. contactMobile: thisdata.contactMobile, //联系人电话
  340. legalPerson: thisdata.legalPerson, //法人
  341. legalPersonTel: thisdata.legalPersonTel, //法人电话
  342. firstAmount: thisdata.firstAmount, //签单金额
  343. totalAmount: thisdata.totalAmount, //首付金额
  344. approval: thisdata.approval, //特批状态
  345. settlementAmount: thisdata.settlementAmount, //已收款项
  346. orderRemarks: thisdata.orderRemarks, //订单留言
  347. orgCodeUrl: thisdata.contractPictureUrl
  348. ? splitUrl(
  349. thisdata.contractPictureUrl,
  350. ",",
  351. globalConfig.avatarHost + "/upload"
  352. )
  353. : [], //图片地址
  354. replenishUrl: thisdata.agreementUrl
  355. ? splitUrl(
  356. thisdata.agreementUrl,
  357. ",",
  358. globalConfig.avatarHost + "/upload"
  359. )
  360. : [], //图片地址
  361. contentUrl:thisdata.serviceContent
  362. ? splitUrl(
  363. thisdata.serviceContent,
  364. ",",
  365. globalConfig.avatarHost + "/upload"
  366. )
  367. : [], //图片地址
  368. salesmanName: thisdata.salesmanName, //营销员名称
  369. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  370. financeName: thisdata.financeName, //财务名称
  371. financeMobile: thisdata.financeMobile, //财务电话
  372. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  373. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  374. nowFinance: thisdata.nowFinance, //财务名称
  375. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  376. depName: thisdata.depName, //订单部门
  377. outsource: thisdata.outsource == 0 ? "否" : "是",
  378. deleteSign:thisdata.deleteSign,
  379. });
  380. }
  381. }.bind(this)
  382. }).always(
  383. function() {
  384. this.setState({
  385. loading: false
  386. });
  387. }.bind(this)
  388. );
  389. },
  390. //项目列表
  391. xiangmu(orderNos) {
  392. $.ajax({
  393. method: "get",
  394. dataType: "json",
  395. crossDomain: false,
  396. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  397. data: {
  398. orderNo: orderNos
  399. },
  400. success: function(data) {
  401. let theArr = [];
  402. if (data.error.length || data.data.list == "") {
  403. if (data.error && data.error.length) {
  404. message.warning(data.error[0].message);
  405. }
  406. } else {
  407. for (let i = 0; i < data.data.length; i++) {
  408. let thisdata = data.data[i];
  409. thisdata.key = i;
  410. theArr.push(thisdata);
  411. }
  412. }
  413. this.setState({
  414. dataSourceX: theArr
  415. });
  416. }.bind(this)
  417. }).always(
  418. function() {
  419. this.setState({
  420. loading: false
  421. });
  422. }.bind(this)
  423. );
  424. },
  425. closeDesc(e, s) {
  426. this.state.showDesc = e;
  427. if (s) {
  428. this.loadData(this.state.page);
  429. }
  430. },
  431. search() {
  432. this.loadData();
  433. },
  434. reset() {
  435. this.state.nameSearch = "";
  436. this.state.customerName = "";
  437. this.state.releaseDate = [];
  438. this.state.orderNoSearch = "";
  439. this.state.departmenttSearch = undefined;
  440. this.state.distribution = undefined;
  441. this.loadData(this.state.page);
  442. },
  443. resetAll() {
  444. this.state.nameSearch = "";
  445. this.state.customerName = "";
  446. this.state.releaseDate = [];
  447. this.state.orderNoSearch = "";
  448. this.state.departmenttSearch = undefined;
  449. this.state.distribution = undefined;
  450. this.loadData();
  451. },
  452. searchSwitch() {
  453. this.setState({
  454. searchMore: !this.state.searchMore
  455. });
  456. },
  457. rizhi() {
  458. console.log(this.state.orderNo);
  459. this.setState({
  460. loading: true
  461. });
  462. $.ajax({
  463. method: "get",
  464. dataType: "json",
  465. crossDomain: false,
  466. url: "/api/admin/newOrder/selectOrderLog",
  467. data: {
  468. orderNo: this.state.orderNo
  469. },
  470. success: function(data) {
  471. let theArr = [];
  472. let thisData = data.data;
  473. if (!thisData.length) {
  474. if (data.error && data.error.length) {
  475. message.warning(data.error[0].message);
  476. }
  477. thisData = {};
  478. } else {
  479. for (let i = 0; i < data.data.length; i++) {
  480. let thisdata = data.data[i];
  481. theArr.push({
  482. processName: thisdata.processName,
  483. adminName: thisdata.adminName,
  484. createDate: thisdata.createDate,
  485. remarks: thisdata.remarks
  486. });
  487. }
  488. }
  489. this.setState({
  490. dataSourcerizhi: theArr
  491. });
  492. }.bind(this)
  493. }).always(
  494. function() {
  495. this.setState({
  496. loading: false
  497. });
  498. }.bind(this)
  499. );
  500. },
  501. //查看订单日志
  502. getOrderLog() {
  503. this.setState({
  504. rizhivisible: true
  505. });
  506. this.rizhi();
  507. },
  508. closeOrderLog() {
  509. this.setState({
  510. rizhivisible: false
  511. });
  512. },
  513. //关闭详情
  514. visitCancel(e) {
  515. this.setState({
  516. visible: false
  517. });
  518. this.reset();
  519. },
  520. visitOk(e) {
  521. this.setState({
  522. visible: false
  523. });
  524. this.reset();
  525. },
  526. nextCancel() {
  527. this.setState({
  528. addnextVisible: false
  529. });
  530. },
  531. //点击打卡项目详情
  532. tableRowClickX(record, index) {
  533. this.setState({
  534. jid: record.id, //项目ID
  535. kid: record.commodityId, //商品ID
  536. commodityName: record.commodityName, //金额
  537. commodityPrice: record.commodityPrice, //金额
  538. commodityQuantity: record.commodityQuantity, //数量
  539. taskComment: record.taskComment, //备注
  540. main: record.main.toString(), //是否为主要
  541. addnextVisible: true,
  542. dataInfor:record,
  543. addState: 0
  544. });
  545. },
  546. resets() {
  547. this.state.orderNo = "";
  548. this.state.customerName = "";
  549. this.state.departmenttSearch = undefined;
  550. this.state.releaseDate[0] = undefined;
  551. this.state.releaseDate[1] = undefined;
  552. },
  553. //部门
  554. departmentList() {
  555. this.setState({
  556. loading: true
  557. });
  558. $.ajax({
  559. method: "get",
  560. dataType: "json",
  561. crossDomain: false,
  562. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  563. data: {},
  564. success: function(data) {
  565. let thedata = data.data;
  566. let theArr = [];
  567. if (!thedata) {
  568. if (data.error && data.error.length) {
  569. message.warning(data.error[0].message);
  570. }
  571. thedata = {};
  572. } else {
  573. thedata.map(function(item, index) {
  574. theArr.push({
  575. key: index,
  576. name: item.name,
  577. id: item.id
  578. });
  579. });
  580. }
  581. this.setState({
  582. departmentArr: theArr
  583. });
  584. }.bind(this)
  585. }).always(
  586. function() {
  587. this.setState({
  588. loading: false
  589. });
  590. }.bind(this)
  591. );
  592. },
  593. downImg() {
  594. let num = 0;
  595. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  596. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  597. num = i;
  598. }
  599. }
  600. if (num == this.state.orgCodeUrl.length - 1) {
  601. return message.warning("已经是最后一张了哦");
  602. }
  603. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  604. this.setState({
  605. previewImage: this.state.previewImage,
  606. rotateDeg: 0
  607. });
  608. },
  609. upImg() {
  610. let num = 0;
  611. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  612. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  613. num = i;
  614. }
  615. }
  616. if (num == 0) {
  617. return message.warning("已经是第一张了哦");
  618. }
  619. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  620. this.setState({
  621. previewImage: this.state.previewImage,
  622. rotateDeg: 0
  623. });
  624. },
  625. rotate() {
  626. let rotateDeg = this.state.rotateDeg + 90;
  627. this.setState({
  628. rotateDeg
  629. });
  630. },
  631. downImgs() {
  632. let num = 0;
  633. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  634. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  635. num = i;
  636. }
  637. }
  638. if (num == this.state.replenishUrl.length - 1) {
  639. return message.warning("已经是最后一张了哦");
  640. }
  641. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  642. this.setState({
  643. previewImage: this.state.previewImage,
  644. rotateDeg: 0
  645. });
  646. },
  647. upImgs() {
  648. let num = 0;
  649. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  650. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  651. num = i;
  652. }
  653. }
  654. if (num == 0) {
  655. return message.warning("已经是第一张了哦");
  656. }
  657. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  658. this.setState({
  659. previewImage: this.state.previewImage,
  660. rotateDeg: 0
  661. });
  662. },
  663. rotates() {
  664. let rotateDeg = this.state.rotateDeg + 90;
  665. this.setState({
  666. rotateDeg
  667. });
  668. },
  669. changeList(arr) {
  670. const newArr = [];
  671. this.state.columns.forEach(item => {
  672. arr.forEach(val => {
  673. if (val === item.title) {
  674. newArr.push(item);
  675. }
  676. });
  677. });
  678. this.setState({
  679. changeList: newArr
  680. });
  681. },
  682. render() {
  683. const rowSelection = {
  684. selectedRowKeys: this.state.selectedRowKeys,
  685. onChange: (selectedRowKeys, selectedRows) => {
  686. this.setState({
  687. selectedRows: selectedRows.slice(-1),
  688. selectedRowKeys: selectedRowKeys.slice(-1)
  689. });
  690. }
  691. };
  692. const formItemLayout = {
  693. labelCol: { span: 8 },
  694. wrapperCol: { span: 14 }
  695. };
  696. const FormItem = Form.Item;
  697. let departmentArr = this.state.departmentArr || [];
  698. const hasSelected = this.state.selectedRowKeys.length > 0;
  699. const { RangePicker } = DatePicker;
  700. return (
  701. <div className="user-content">
  702. {this.state.resVisible ? (
  703. <ResolutionDetail
  704. cancel={this.resCancel}
  705. detail={this.state.resRecord}
  706. visible={this.state.resVisible}
  707. id={this.state.resRecord.orderNo}
  708. />
  709. ) : (
  710. ""
  711. )}
  712. <ShowModalDiv ShowModal={this.state.showModal} />
  713. <div className="content-title" style={{ marginBottom: 10 }}>
  714. <span style={{ fontWeight: 900, fontSize: 16 }}>项目派单管理</span>
  715. </div>
  716. <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
  717. <TabPane tab="搜索" key="1">
  718. <div className="user-search">
  719. <Input
  720. placeholder="客户名称"
  721. value={this.state.customerName}
  722. style={{ marginLeft: 10 }}
  723. onChange={(e) => {
  724. this.setState({ customerName: e.target.value });
  725. }}
  726. />
  727. <Input
  728. placeholder="订单编号"
  729. value={this.state.orderNoSearch}
  730. onChange={(e) => {
  731. this.setState({ orderNoSearch: e.target.value });
  732. }}
  733. />
  734. <Select
  735. placeholder="选择部门"
  736. style={{ width: 150, marginRight: "10px" }}
  737. value={this.state.departmenttSearch}
  738. onChange={(e) => {
  739. this.setState({ departmenttSearch: e });
  740. }}
  741. >
  742. {departmentArr.map(function (item) {
  743. return (
  744. <Select.Option key={item.id}>{item.name}</Select.Option>
  745. );
  746. })}
  747. </Select>
  748. <Select
  749. onChange={(e) => {
  750. this.setState({ distribution: e });
  751. }}
  752. style={{ width: 160, marginRight: 5 }}
  753. placeholder="分派状态"
  754. value={this.state.distribution}
  755. >
  756. <Option value="0">未分配</Option>
  757. <Option value="1">部分分配</Option>
  758. <Option value="2">全部分配</Option>
  759. </Select>
  760. <Button type="primary" onClick={this.search}>
  761. 搜索
  762. </Button>
  763. <Button onClick={this.resetAll}>重置</Button>
  764. <span>
  765. 更多搜索
  766. <Switch
  767. defaultChecked={false}
  768. onChange={this.searchSwitch.bind(this)}
  769. />
  770. </span>
  771. <div
  772. className="search-more"
  773. style={this.state.searchMore ? { display: "none" } : {}}
  774. >
  775. <span>订单时间 :</span>
  776. <RangePicker
  777. value={[
  778. this.state.releaseDate[0]
  779. ? moment(this.state.releaseDate[0])
  780. : null,
  781. this.state.releaseDate[1]
  782. ? moment(this.state.releaseDate[1])
  783. : null,
  784. ]}
  785. onChange={(data, dataString) => {
  786. this.setState({ releaseDate: dataString });
  787. }}
  788. />
  789. </div>
  790. </div>
  791. </TabPane>
  792. <TabPane tab="更改表格显示数据" key="2">
  793. <div style={{ marginLeft: 10 }}>
  794. <ChooseList
  795. columns={this.state.columns}
  796. changeFn={this.changeList}
  797. changeList={this.state.changeList}
  798. top={55}
  799. margin={11}
  800. />
  801. </div>
  802. </TabPane>
  803. </Tabs>
  804. <div className="patent-table">
  805. <Spin spinning={this.state.loading}>
  806. <Table
  807. columns={
  808. this.state.changeList
  809. ? this.state.changeList
  810. : this.state.columns
  811. }
  812. dataSource={this.state.dataSource}
  813. rowSelection={rowSelection}
  814. pagination={this.state.pagination}
  815. onRowClick={this.tableRowClick.bind(this)}
  816. bordered
  817. size="middle"
  818. />
  819. </Spin>
  820. </div>
  821. {this.state.visible ? <Modal
  822. className="customeDetails"
  823. footer=""
  824. title="订单详情"
  825. width="1000px"
  826. visible={this.state.visible}
  827. onOk={this.visitOk}
  828. onCancel={this.visitCancel}
  829. >
  830. <Form
  831. layout="horizontal"
  832. onSubmit={this.handleSubmit}
  833. id="demand-form"
  834. style={{ paddingBottom: "40px" }}
  835. >
  836. <Spin spinning={this.state.loading}>
  837. <div className="clearfix">
  838. <div style={{position:"absolute",top:'-52px',left:'81px',zIndex:10000}}>
  839. <OrderItemStatus deleteSign={this.state.deleteSign}/>
  840. </div>
  841. <FormItem
  842. className="half-item"
  843. {...formItemLayout}
  844. label="订单编号"
  845. >
  846. <span>{this.state.orderNo}</span>
  847. </FormItem>
  848. <FormItem
  849. className="half-item"
  850. {...formItemLayout}
  851. label="合同编号"
  852. >
  853. <span>{this.state.contractNo}</span>
  854. </FormItem>
  855. <FormItem
  856. className="half-item"
  857. {...formItemLayout}
  858. label="客户名称"
  859. >
  860. <span>{this.state.userName}</span>
  861. <EnterpriseNameChange
  862. type='journal'
  863. style={{ marginLeft: 10 }}
  864. enterpriseId={this.state.orderUid}/>
  865. </FormItem>
  866. <FormItem
  867. className="half-item"
  868. {...formItemLayout}
  869. label="合同签订时间"
  870. >
  871. <span>{this.state.signDate}</span>
  872. </FormItem>
  873. <FormItem
  874. className="half-item"
  875. {...formItemLayout}
  876. label="流程状态"
  877. >
  878. <span>{getProcessStatus(this.state.processStatus)}</span>
  879. </FormItem>
  880. <FormItem
  881. className="half-item"
  882. {...formItemLayout}
  883. label="结算状态"
  884. >
  885. <span>
  886. {getLiquidationStatus(this.state.liquidationStatus)}
  887. </span>
  888. </FormItem>
  889. <FormItem
  890. className="half-item"
  891. {...formItemLayout}
  892. label="企业联系人"
  893. >
  894. <span>{this.state.contacts}</span>
  895. </FormItem>
  896. <FormItem
  897. className="half-item"
  898. {...formItemLayout}
  899. label="联系人电话"
  900. >
  901. <span>{this.state.contactMobile}</span>
  902. </FormItem>
  903. <FormItem
  904. className="half-item"
  905. {...formItemLayout}
  906. label="企业法人"
  907. >
  908. <span>{this.state.legalPerson}</span>
  909. </FormItem>
  910. <FormItem
  911. className="half-item"
  912. {...formItemLayout}
  913. label="法人电话"
  914. >
  915. <span>{this.state.legalPersonTel}</span>
  916. </FormItem>
  917. <FormItem
  918. className="half-item"
  919. {...formItemLayout}
  920. label="签单金额(万元)"
  921. >
  922. <span>{this.state.totalAmount}</span>
  923. </FormItem>
  924. <FormItem
  925. className="half-item"
  926. {...formItemLayout}
  927. label="首付金额(万元)"
  928. >
  929. <span>{this.state.firstAmount}</span>
  930. </FormItem>
  931. <FormItem
  932. className="half-item"
  933. {...formItemLayout}
  934. label="特批立项"
  935. >
  936. <span>{getApprovedState(this.state.approval)}</span>
  937. </FormItem>
  938. <FormItem
  939. className="half-item"
  940. {...formItemLayout}
  941. label="已收款项(万元)"
  942. >
  943. <span>{this.state.settlementAmount}</span>
  944. </FormItem>
  945. <FormItem
  946. className="half-item"
  947. {...formItemLayout}
  948. label="是否外包"
  949. >
  950. <span>{this.state.outsource}</span>
  951. </FormItem>
  952. <div className="clearfix">
  953. <FormItem
  954. labelCol={{ span: 4 }}
  955. wrapperCol={{ span: 16 }}
  956. label="订单留言"
  957. >
  958. <span>{this.state.orderRemarks}</span>
  959. </FormItem>
  960. </div>
  961. <div className="clearfix">
  962. <FormItem
  963. labelCol={{ span: 4 }}
  964. wrapperCol={{ span: 18 }}
  965. label="合同扫描件"
  966. >
  967. {/*<Upload*/}
  968. {/* className="demandDetailShow-upload"*/}
  969. {/* listType="picture-card"*/}
  970. {/* fileList={this.state.orgCodeUrl}*/}
  971. {/* onPreview={(file) => {*/}
  972. {/* this.setState({*/}
  973. {/* previewImage: file.url || file.thumbUrl,*/}
  974. {/* previewVisible: true,*/}
  975. {/* });*/}
  976. {/* }}*/}
  977. {/*/>*/}
  978. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  979. {this.state.visible && this.state.orgCodeUrl ? <ImgList fileList={this.state.orgCodeUrl} domId={'projectQuery1'}/> : <div/>}
  980. </div>
  981. <Modal
  982. maskClosable={false}
  983. footer={null}
  984. width={"50%"}
  985. visible={this.state.previewVisible}
  986. onCancel={() => {
  987. this.setState({ previewVisible: false,rotateDeg: 0 });
  988. }}
  989. >
  990. <img
  991. alt=""
  992. style={{
  993. width: "100%",
  994. transform: `rotate(${this.state.rotateDeg}deg)`,
  995. }}
  996. src={this.state.previewImage || ""}
  997. />
  998. <Button
  999. onClick={this.rotate}
  1000. style={{
  1001. position: "relative",
  1002. left: "50%",
  1003. transform: "translateX(-50%)",
  1004. }}
  1005. >
  1006. 旋转
  1007. </Button>
  1008. <Button
  1009. onClick={this.upImg}
  1010. style={{
  1011. position: "absolute",
  1012. left: -81,
  1013. top: "50%",
  1014. transform: "translateY(-50%)",
  1015. }}
  1016. >
  1017. 上一张
  1018. </Button>
  1019. <Button
  1020. onClick={this.downImg}
  1021. style={{
  1022. position: "absolute",
  1023. right: -81,
  1024. top: "50%",
  1025. transform: "translateY(-50%)",
  1026. }}
  1027. >
  1028. 下一张
  1029. </Button>
  1030. </Modal>
  1031. <Button
  1032. style={{
  1033. float: "right",
  1034. marginRight: "140px",
  1035. marginTop: "20px",
  1036. }}
  1037. onClick={this.getOrderLog}
  1038. >
  1039. 查看订单 日志
  1040. </Button>
  1041. </FormItem>
  1042. <FormItem
  1043. labelCol={{ span: 4 }}
  1044. wrapperCol={{ span: 18 }}
  1045. label="补充协议"
  1046. >
  1047. {/*<Upload*/}
  1048. {/* className="demandDetailShow-upload"*/}
  1049. {/* listType="picture-card"*/}
  1050. {/* fileList={this.state.replenishUrl}*/}
  1051. {/* onPreview={(file) => {*/}
  1052. {/* this.setState({*/}
  1053. {/* previewImage: file.url || file.thumbUrl,*/}
  1054. {/* previewVisibles: true,*/}
  1055. {/* });*/}
  1056. {/* }}*/}
  1057. {/*/>*/}
  1058. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1059. {this.state.visible && this.state.replenishUrl ? <ImgList fileList={this.state.replenishUrl} domId={'projectQuery2'}/> : <div/>}
  1060. </div>
  1061. <Modal
  1062. maskClosable={false}
  1063. footer={null}
  1064. width={"50%"}
  1065. visible={this.state.previewVisibles}
  1066. onCancel={() => {
  1067. this.setState({ previewVisibles: false,rotateDeg: 0 });
  1068. }}
  1069. >
  1070. <img
  1071. alt=""
  1072. style={{
  1073. width: "100%",
  1074. transform: `rotate(${this.state.rotateDeg}deg)`,
  1075. }}
  1076. src={this.state.previewImage || ""}
  1077. />
  1078. <Button
  1079. onClick={this.rotate}
  1080. style={{
  1081. position: "relative",
  1082. left: "50%",
  1083. transform: "translateX(-50%)",
  1084. }}
  1085. >
  1086. 旋转
  1087. </Button>
  1088. <Button
  1089. onClick={this.upImgs}
  1090. style={{
  1091. position: "absolute",
  1092. left: -81,
  1093. top: "50%",
  1094. transform: "translateY(-50%)",
  1095. }}
  1096. >
  1097. 上一张
  1098. </Button>
  1099. <Button
  1100. onClick={this.downImgs}
  1101. style={{
  1102. position: "absolute",
  1103. right: -81,
  1104. top: "50%",
  1105. transform: "translateY(-50%)",
  1106. }}
  1107. >
  1108. 下一张
  1109. </Button>
  1110. </Modal>
  1111. </FormItem>
  1112. </div>
  1113. <ContentUrl
  1114. processStatus={1}
  1115. domId = {"projectQueryContents"}
  1116. contentUrl = {this.state.contentUrl }
  1117. imgId = {"projectQueryContentsImg"}
  1118. />
  1119. <div className="clearfix">
  1120. <FormItem
  1121. className="half-item"
  1122. {...formItemLayout}
  1123. label="订单负责人"
  1124. >
  1125. <span>{this.state.salesmanName}</span>
  1126. </FormItem>
  1127. <FormItem
  1128. className="half-item"
  1129. {...formItemLayout}
  1130. label="订单负责人电话"
  1131. >
  1132. <span>{this.state.salesmanMobile}</span>
  1133. </FormItem>
  1134. <FormItem
  1135. className="half-item"
  1136. {...formItemLayout}
  1137. label="订单部门"
  1138. >
  1139. <span>{this.state.depName}</span>
  1140. </FormItem>
  1141. </div>
  1142. <div className="clearfix">
  1143. <FormItem
  1144. className="half-item"
  1145. {...formItemLayout}
  1146. label="当前财务负责人"
  1147. >
  1148. <span>{this.state.nowFinance}</span>
  1149. </FormItem>
  1150. <FormItem
  1151. className="half-item"
  1152. {...formItemLayout}
  1153. label="当前财务负责人电话"
  1154. >
  1155. <span>{this.state.nowFinanceMobile}</span>
  1156. </FormItem>
  1157. </div>
  1158. <div className="clearfix">
  1159. <FormItem
  1160. className="half-item"
  1161. {...formItemLayout}
  1162. style={{ opacity: ".5" }}
  1163. label="原订单负责人"
  1164. >
  1165. <span>{this.state.oldSalesmanName}</span>
  1166. </FormItem>
  1167. <FormItem
  1168. className="half-item"
  1169. {...formItemLayout}
  1170. style={{ opacity: ".5" }}
  1171. label="原订单负责人电话"
  1172. >
  1173. <span>{this.state.oldSalesmanMobile}</span>
  1174. </FormItem>
  1175. </div>
  1176. <div className="clearfix">
  1177. <FormItem
  1178. className="half-item"
  1179. {...formItemLayout}
  1180. style={{ opacity: ".5" }}
  1181. label="实际财务操作人"
  1182. >
  1183. <span>{this.state.financeName}</span>
  1184. </FormItem>
  1185. <FormItem
  1186. className="half-item"
  1187. {...formItemLayout}
  1188. style={{ opacity: ".5" }}
  1189. label="实际财务操作人电话"
  1190. >
  1191. <span>{this.state.financeMobile}</span>
  1192. </FormItem>
  1193. </div>
  1194. <div>
  1195. <OrderCoor orderNo={this.state.orderNos}/>
  1196. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1197. 项目业务
  1198. </span>
  1199. {this.state.processStatus == 0 ? (
  1200. <Button
  1201. type="primary"
  1202. onClick={this.addDetailed}
  1203. style={{
  1204. float: "right",
  1205. marginRight: "50px",
  1206. marginBottom: "15px",
  1207. }}
  1208. >
  1209. 添加项目明细
  1210. </Button>
  1211. ) : (
  1212. ""
  1213. )}
  1214. </div>
  1215. <div className="patent-table">
  1216. <Spin spinning={this.state.loading}>
  1217. <Table
  1218. columns={this.state.columnsX}
  1219. size="small"
  1220. bordered
  1221. dataSource={this.state.dataSourceX}
  1222. pagination={this.state.paginations}
  1223. onRowClick={this.tableRowClickX}
  1224. />
  1225. </Spin>
  1226. </div>
  1227. </div>
  1228. </Spin>
  1229. </Form>
  1230. </Modal> : <div/>}
  1231. {/* <Modal
  1232. visible={this.state.rizhivisible}
  1233. className="admin-desc-content"
  1234. width="800px"
  1235. maskClosable={false}
  1236. title="订单日志"
  1237. footer={null}
  1238. onCancel={this.closeOrderLog}
  1239. >
  1240. <div className="patent-table">
  1241. <Spin spinning={this.state.loading}>
  1242. <Table
  1243. columns={this.state.columnsrizhi}
  1244. dataSource={this.state.dataSourcerizhi}
  1245. pagination={false}
  1246. />
  1247. </Spin>
  1248. </div>
  1249. </Modal> */}
  1250. <OrderRiZi
  1251. dataSourcerizhi={this.state.dataSourcerizhi}
  1252. closeOrderLog={this.closeOrderLog}
  1253. visible={this.state.rizhivisible}
  1254. loading={this.state.loading}
  1255. />
  1256. {this.state.addnextVisible && <ProjectDetailsReadOnly
  1257. infor={this.state.dataInfor}
  1258. visible={this.state.addnextVisible}
  1259. onCancel={this.nextCancel}
  1260. />}
  1261. </div>
  1262. );
  1263. }
  1264. });
  1265. export default PaiDan;