approveds.jsx 36 KB

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