projectQuery.jsx 39 KB

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