approveds.jsx 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232
  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
  365. ? splitUrl(
  366. thisdata.contractPictureUrl,
  367. ",",
  368. globalConfig.avatarHost + "/upload"
  369. )
  370. : [], //图片地址
  371. salesmanName: thisdata.salesmanName, //营销员名称
  372. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  373. financeName: thisdata.financeName, //财务名称
  374. financeMobile: thisdata.financeMobile, //财务电话
  375. outsource: thisdata.outsource == 0 ? "否" : "是"
  376. });
  377. };
  378. }.bind(this),
  379. }).always(function() {
  380. this.setState({
  381. loading: false
  382. });
  383. }.bind(this));
  384. },
  385. //项目列表
  386. xiangmu(orderNos) {
  387. $.ajax({
  388. method: "get",
  389. dataType: "json",
  390. crossDomain: false,
  391. url: globalConfig.context +"/api/admin/newOrder/getOrderTask",
  392. data: {
  393. orderNo:orderNos
  394. },
  395. success: function(data) {
  396. let theArr = [];
  397. if(data.error.length || data.data.list == "") {
  398. if(data.error && data.error.length) {
  399. message.warning(data.error[0].message);
  400. };
  401. } else {
  402. for (let i = 0; i < data.data.length; i++) {
  403. let thisdata = data.data[i];
  404. theArr.push({
  405. key: i,
  406. id:thisdata.id,
  407. orderNo:thisdata.orderNo,//订单编号
  408. commodityId:thisdata.commodityId,//项目ID
  409. commodityName:thisdata.commodityName,//项目名称
  410. cname:thisdata.cname,//项目类别
  411. commodityPrice:thisdata.commodityPrice,//项目价格
  412. commodityQuantity:thisdata.commodityQuantity,//项目数量
  413. main:thisdata.main,//是否为主要任务
  414. taskComment:thisdata.taskComment,//任务说明
  415. contacts:thisdata.contacts,//联系人
  416. contactsMobile:thisdata.contactsMobile,//联系人电话
  417. });
  418. };
  419. };
  420. this.setState({
  421. dataSourceX: theArr,
  422. });
  423. }.bind(this),
  424. }).always(function() {
  425. this.setState({
  426. loading: false
  427. });
  428. }.bind(this));
  429. },
  430. rizhi(){
  431. console.log(this.state.orderNo)
  432. this.setState({
  433. loading:true
  434. })
  435. $.ajax({
  436. method: "get",
  437. dataType: "json",
  438. crossDomain: false,
  439. url: '/api/admin/newOrder/selectOrderLog',
  440. data: {
  441. orderNo:this.state.orderNo
  442. },
  443. success: function (data) {
  444. let theArr = [];
  445. let thisData = data.data;
  446. if (!thisData.length) {
  447. if (data.error && data.error.length) {
  448. message.warning(data.error[0].message);
  449. };
  450. thisData = {};
  451. }else{
  452. for(let i = 0; i < data.data.length; i++) {
  453. let thisdata = data.data[i];
  454. theArr.push({
  455. processName:thisdata.processName,
  456. adminName:thisdata.adminName,
  457. createDate:thisdata.createDate,
  458. });
  459. };
  460. };
  461. this.setState({
  462. dataSourcerizhi: theArr
  463. })
  464. }.bind(this),
  465. }).always(function () {
  466. this.setState({
  467. loading: false
  468. });
  469. }.bind(this));
  470. },
  471. //查看订单日志
  472. getOrderLog(){
  473. this.setState({
  474. rizhivisible:true
  475. })
  476. this.rizhi()
  477. },
  478. closeOrderLog(){
  479. this.setState({
  480. rizhivisible:false
  481. })
  482. },
  483. //节点列表
  484. jiedian(orderNos) {
  485. $.ajax({
  486. method: "get",
  487. dataType: "json",
  488. crossDomain: false,
  489. url: globalConfig.context +"/api/admin/newOrder/selectOrderDun",
  490. data: {
  491. orderNo:orderNos
  492. },
  493. success: function(data) {
  494. let theArr = [];
  495. let thisData=[];
  496. if(data.error.length || data.data.list == "") {
  497. if(data.error && data.error.length) {
  498. message.warning(data.error[0].message);
  499. };
  500. } else {
  501. for(let i = 0; i < data.data.length; i++) {
  502. thisData= data.data[i];
  503. theArr.push({
  504. key:i,
  505. dunSubject:thisData.dunSubject?thisData.dunSubject.toString():"",//催款科目
  506. id:thisData.id,//节点Id
  507. money:thisData.money,//催款金额
  508. dunStatus:thisData.dunStatus,//催款状态
  509. })
  510. }
  511. this.setState({
  512. contactList:theArr
  513. })
  514. };
  515. }.bind(this),
  516. }).always(function() {
  517. this.setState({
  518. loading: false
  519. });
  520. }.bind(this));
  521. },
  522. //审核通过
  523. examOk(){
  524. if (this.state.flagE) return;
  525. this.setState({
  526. flagE: true
  527. });
  528. $.ajax({
  529. method: "post",
  530. dataType: "json",
  531. crossDomain: false,
  532. url: globalConfig.context +"/api/admin/newOrder/approvalOrder",
  533. data: {
  534. orderNo:this.state.orderNo,
  535. confirm:2,
  536. },
  537. success: function(data) {
  538. if(data.error.length || data.data.list == "") {
  539. if(data.error && data.error.length) {
  540. message.warning(data.error[0].message);
  541. this.setState({
  542. flagE: false
  543. });
  544. };
  545. } else {
  546. message.success("该特批订单已通过审核~");
  547. this.setState({
  548. visible:false,
  549. });
  550. this.reset();
  551. this.setState({
  552. flagE: false
  553. });
  554. };
  555. }.bind(this),
  556. }).always(function() {
  557. this.setState({
  558. loading: false
  559. });
  560. }.bind(this));
  561. },
  562. //审核不通过
  563. examOks(){
  564. if(this.state.flagE) return
  565. this.setState({
  566. flagE: true
  567. })
  568. $.ajax({
  569. method: "post",
  570. dataType: "json",
  571. crossDomain: false,
  572. url: globalConfig.context +"/api/admin/newOrder/approvalOrder",
  573. data: {
  574. orderNo:this.state.orderNo,
  575. confirm:3,
  576. reason:this.state.reason,
  577. },
  578. success: function(data) {
  579. if(data.error.length || data.data.list == "") {
  580. if(data.error && data.error.length) {
  581. message.warning(data.error[0].message);
  582. this.setState({
  583. flagE: false
  584. });
  585. };
  586. } else {
  587. message.success("该特批订单已被驳回~");
  588. this.setState({
  589. visible:false,
  590. noVisible:false,
  591. });
  592. this.loadData();
  593. this.resets();
  594. this.setState({
  595. flagE: false
  596. });
  597. };
  598. }.bind(this),
  599. }).always(function() {
  600. this.setState({
  601. loading: false
  602. });
  603. }.bind(this));
  604. },
  605. //点击拒绝
  606. examNo(){
  607. this.setState({
  608. noVisible:true
  609. })
  610. },
  611. //关闭输入理由框
  612. noCancel(){
  613. this.setState({
  614. noVisible:false
  615. })
  616. },
  617. //搜索
  618. search() {
  619. this.setState({
  620. //signBillVisible:false
  621. })
  622. this.loadData();
  623. },
  624. //重置
  625. reset() {
  626. this.setState({
  627. signBillVisible:false
  628. })
  629. this.state.orderNo='';
  630. this.state.customerName='';
  631. this.state.departmenttSearch=undefined;
  632. this.state.releaseDate[0] = undefined;
  633. this.state.releaseDate[1] = undefined;
  634. this.state.approval= undefined;
  635. this.loadData();
  636. },
  637. resets(){
  638. this.state.orderNo='';
  639. this.state.customerName='';
  640. this.state.departmenttSearch=undefined;
  641. this.state.releaseDate[0] = undefined;
  642. this.state.releaseDate[1] = undefined;
  643. },
  644. getOrgCodeUrl(e) {
  645. this.setState({ orgCodeUrl: e });
  646. },
  647. //关闭详情
  648. visitCancel(){
  649. this.setState({
  650. visible:false
  651. })
  652. this.resets();
  653. },
  654. visitOk(){
  655. this.setState({
  656. visible:false
  657. })
  658. this.resets();
  659. },
  660. //部门
  661. departmentList() {
  662. this.setState({
  663. loading: true
  664. });
  665. $.ajax({
  666. method: "get",
  667. dataType: "json",
  668. crossDomain: false,
  669. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  670. data: {
  671. },
  672. success: function(data) {
  673. let thedata = data.data;
  674. let theArr = [];
  675. if(!thedata) {
  676. if(data.error && data.error.length) {
  677. message.warning(data.error[0].message);
  678. };
  679. thedata = {};
  680. } else {
  681. thedata.map(function(item, index) {
  682. theArr.push({
  683. key: index,
  684. name: item.name,
  685. id: item.id,
  686. })
  687. })
  688. }
  689. this.setState({
  690. departmentArr: theArr,
  691. })
  692. }.bind(this),
  693. }).always(function() {
  694. this.setState({
  695. loading: false
  696. });
  697. }.bind(this));
  698. },
  699. render() {
  700. const formItemLayout = {
  701. labelCol: { span: 8 },
  702. wrapperCol: { span: 14 },
  703. };
  704. const FormItem = Form.Item;
  705. const { RangePicker } = DatePicker;
  706. const rowSelection = {
  707. selectedRowKeys: this.state.selectedRowKeys,
  708. onChange: (selectedRowKeys, selectedRows) => {
  709. this.setState({
  710. modalVisible:false,
  711. selectedRows: selectedRows.slice(-1),
  712. selectedRowKeys: selectedRowKeys.slice(-1)
  713. });
  714. },
  715. onSelect: (recordt) => {
  716. this.setState({
  717. modalVisible:false,
  718. recordt: recordt.id
  719. })
  720. },
  721. };
  722. let departmentArr = this.state.departmentArr || [];
  723. return (
  724. <div className="user-content">
  725. <ShowModalDiv ShowModal={this.state.showModal} />
  726. <div className="content-title">
  727. <span>特批订单审核</span>
  728. </div>
  729. <div className="user-search">
  730. <Input
  731. placeholder="客户名称"
  732. style={{ width: "150px", marginBottom: "10px" }}
  733. value={this.state.customerName}
  734. onChange={e => {
  735. this.setState({ customerName: e.target.value });
  736. }}
  737. />
  738. <Input
  739. placeholder="订单编号"
  740. style={{ width: "150px" }}
  741. value={this.state.orderNo}
  742. onChange={e => {
  743. this.setState({ orderNo: e.target.value });
  744. }}
  745. />
  746. <Select
  747. placeholder="选择部门"
  748. style={{ width: 150, marginRight: "10px" }}
  749. value={this.state.departmenttSearch}
  750. onChange={e => {
  751. this.setState({ departmenttSearch: e });
  752. }}
  753. >
  754. {departmentArr.map(function(item) {
  755. return <Select.Option key={item.id}>{item.name}</Select.Option>;
  756. })}
  757. </Select>
  758. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  759. <RangePicker
  760. value={[
  761. this.state.releaseDate[0]
  762. ? moment(this.state.releaseDate[0])
  763. : null,
  764. this.state.releaseDate[1]
  765. ? moment(this.state.releaseDate[1])
  766. : null
  767. ]}
  768. onChange={(data, dataString) => {
  769. this.setState({ releaseDate: dataString });
  770. }}
  771. />
  772. <Button
  773. type="primary"
  774. onClick={this.search}
  775. style={{ marginLeft: "10px" }}
  776. >
  777. 搜索
  778. </Button>
  779. <Button onClick={this.reset}>重置</Button>
  780. <div className="patent-table">
  781. <Spin spinning={this.state.loading}>
  782. <Table
  783. columns={this.state.columns}
  784. dataSource={this.state.dataSource}
  785. rowSelection={rowSelection}
  786. pagination={this.state.pagination}
  787. onRowClick={this.tableRowClick}
  788. bordered
  789. size="small"
  790. />
  791. </Spin>
  792. </div>
  793. <Modal
  794. className="customeDetails"
  795. footer=""
  796. title="订单详情"
  797. width="900px"
  798. visible={this.state.visible}
  799. onOk={this.visitOk}
  800. onCancel={this.visitCancel}
  801. >
  802. <Form
  803. layout="horizontal"
  804. onSubmit={this.handleSubmit}
  805. id="demand-form"
  806. style={{ paddingBottom: "40px" }}
  807. >
  808. <Spin spinning={this.state.loading}>
  809. <div className="clearfix">
  810. <FormItem
  811. className="half-item"
  812. {...formItemLayout}
  813. label="订单编号"
  814. >
  815. <span>{this.state.orderNo}</span>
  816. </FormItem>
  817. <FormItem
  818. className="half-item"
  819. {...formItemLayout}
  820. label="合同编号"
  821. >
  822. <span>{this.state.contractNo}</span>
  823. </FormItem>
  824. <FormItem
  825. className="half-item"
  826. {...formItemLayout}
  827. label="客户名称"
  828. >
  829. <span>{this.state.userName}</span>
  830. </FormItem>
  831. <FormItem
  832. className="half-item"
  833. {...formItemLayout}
  834. label="合同签订时间"
  835. >
  836. <span>{this.state.signDate}</span>
  837. </FormItem>
  838. <FormItem
  839. className="half-item"
  840. {...formItemLayout}
  841. label="流程状态"
  842. >
  843. <span>{getProcessStatus(this.state.processStatus)}</span>
  844. </FormItem>
  845. <FormItem
  846. className="half-item"
  847. {...formItemLayout}
  848. label="结算状态"
  849. >
  850. <span>
  851. {getLiquidationStatus(this.state.liquidationStatus)}
  852. </span>
  853. </FormItem>
  854. <FormItem
  855. className="half-item"
  856. {...formItemLayout}
  857. label="企业联系人"
  858. >
  859. <span>{this.state.contacts}</span>
  860. </FormItem>
  861. <FormItem
  862. className="half-item"
  863. {...formItemLayout}
  864. label="联系人电话"
  865. >
  866. <span>{this.state.contactMobile}</span>
  867. </FormItem>
  868. <FormItem
  869. className="half-item"
  870. {...formItemLayout}
  871. label="企业法人"
  872. >
  873. <span>{this.state.legalPerson}</span>
  874. </FormItem>
  875. <FormItem
  876. className="half-item"
  877. {...formItemLayout}
  878. label="法人电话"
  879. >
  880. <span>{this.state.legalPersonTel}</span>
  881. </FormItem>
  882. <FormItem
  883. className="half-item"
  884. {...formItemLayout}
  885. label="签单金额(万元)"
  886. >
  887. <span>{this.state.totalAmount}</span>
  888. </FormItem>
  889. <FormItem
  890. className="half-item"
  891. {...formItemLayout}
  892. label="首付金额(万元)"
  893. >
  894. <span>{this.state.firstAmount}</span>
  895. </FormItem>
  896. <FormItem
  897. className="half-item"
  898. {...formItemLayout}
  899. label="特批立项"
  900. >
  901. <span>{getApprovedState(this.state.approval)}</span>
  902. </FormItem>
  903. <FormItem
  904. className="half-item"
  905. {...formItemLayout}
  906. label="已收款项(万元)"
  907. >
  908. <span>{this.state.settlementAmount}</span>
  909. </FormItem>
  910. <FormItem
  911. className="half-item"
  912. {...formItemLayout}
  913. label="是否外包"
  914. >
  915. <span>{this.state.outsource}</span>
  916. </FormItem>
  917. <div className="clearfix">
  918. <FormItem
  919. labelCol={{ span: 4 }}
  920. wrapperCol={{ span: 16 }}
  921. label="订单留言"
  922. >
  923. <span>{this.state.orderRemarks}</span>
  924. </FormItem>
  925. </div>
  926. <div className="clearfix">
  927. <FormItem
  928. labelCol={{ span: 4 }}
  929. wrapperCol={{ span: 18 }}
  930. label={
  931. <span>
  932. <strong style={{ color: "#f00" }}>*</strong>合同扫描件
  933. </span>
  934. }
  935. >
  936. <PicturesWall
  937. fileList={this.getOrgCodeUrl}
  938. pictureUrl={this.state.orgCodeUrl}
  939. />
  940. <p>图片建议:要清晰。</p>
  941. <Button
  942. style={{
  943. float: "right",
  944. marginRight: "140px",
  945. marginTop: "20px"
  946. }}
  947. onClick={this.getOrderLog}
  948. >
  949. 查看订单 日志
  950. </Button>
  951. </FormItem>
  952. </div>
  953. <div className="clearfix">
  954. <FormItem
  955. className="half-item"
  956. {...formItemLayout}
  957. label="订单负责人"
  958. >
  959. <span>{this.state.salesmanName}</span>
  960. </FormItem>
  961. <FormItem
  962. className="half-item"
  963. {...formItemLayout}
  964. label="订单负责人电话"
  965. >
  966. <span>{this.state.salesmanMobile}</span>
  967. </FormItem>
  968. </div>
  969. <div className="clearfix">
  970. <FormItem
  971. className="half-item"
  972. {...formItemLayout}
  973. label="财务负责人"
  974. >
  975. <span>{this.state.financeName}</span>
  976. </FormItem>
  977. <FormItem
  978. className="half-item"
  979. {...formItemLayout}
  980. label="财务负责人电话"
  981. >
  982. <span>{this.state.financeMobile}</span>
  983. </FormItem>
  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.addcontact}
  993. style={{
  994. float: "right",
  995. marginRight: "50px",
  996. marginBottom: "15px"
  997. }}
  998. >
  999. 添加催款节点
  1000. </Button>
  1001. ) : (
  1002. ""
  1003. )}
  1004. </div>
  1005. <div className="clearfix">
  1006. <Spin spinning={this.state.loading}>
  1007. <Form layout="horizontal" id="demand-form">
  1008. <Table
  1009. pagination={false}
  1010. columns={this.state.ContactsLists}
  1011. dataSource={this.state.contactList}
  1012. />
  1013. <Col
  1014. span={24}
  1015. offset={9}
  1016. style={{ marginTop: "15px" }}
  1017. ></Col>
  1018. </Form>
  1019. </Spin>
  1020. </div>
  1021. <div>
  1022. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1023. 项目业务
  1024. </span>
  1025. {this.state.processStatus == 0 ? (
  1026. <Button
  1027. type="primary"
  1028. onClick={this.addDetailed}
  1029. style={{
  1030. float: "right",
  1031. marginRight: "50px",
  1032. marginBottom: "15px"
  1033. }}
  1034. >
  1035. 添加项目明细
  1036. </Button>
  1037. ) : (
  1038. ""
  1039. )}
  1040. </div>
  1041. <div className="patent-table">
  1042. <Spin spinning={this.state.loading}>
  1043. <Table
  1044. columns={this.state.columnsX}
  1045. dataSource={this.state.dataSourceX}
  1046. pagination={this.state.paginations}
  1047. onRowClick={this.tableRowClickX}
  1048. />
  1049. </Spin>
  1050. </div>
  1051. <div className="addSave" style={{ marginTop: "15px" }}>
  1052. <Button
  1053. className="cancel"
  1054. type="primary"
  1055. onClick={this.examOk}
  1056. style={{ marginLeft: "200px" }}
  1057. htmlType="submit"
  1058. >
  1059. 通过
  1060. </Button>
  1061. <Button
  1062. className="cancel"
  1063. type="primary"
  1064. onClick={this.examNo}
  1065. style={{ marginLeft: "50px" }}
  1066. htmlType="submit"
  1067. >
  1068. 驳回
  1069. </Button>
  1070. <Button
  1071. className="cancel"
  1072. type="ghost"
  1073. onClick={this.visitCancel}
  1074. style={{ marginLeft: "50px" }}
  1075. >
  1076. 取消
  1077. </Button>
  1078. </div>
  1079. </div>
  1080. </Spin>
  1081. </Form>
  1082. </Modal>
  1083. <Modal
  1084. maskClosable={false}
  1085. visible={this.state.addnextVisible}
  1086. onOk={this.nextCancel}
  1087. onCancel={this.nextCancel}
  1088. width="800px"
  1089. title={"项目任务详情"}
  1090. footer=""
  1091. className="admin-desc-content"
  1092. >
  1093. <Form layout="horizontal" id="demand-form">
  1094. <Spin spinning={this.state.loading}>
  1095. <div className="clearfix">
  1096. <FormItem
  1097. className="half-item"
  1098. {...formItemLayout}
  1099. label="项目名称"
  1100. >
  1101. <span>{this.state.commodityName}</span>
  1102. </FormItem>
  1103. <FormItem
  1104. className="half-item"
  1105. {...formItemLayout}
  1106. label="项目数量"
  1107. >
  1108. <span>{this.state.commodityQuantity}</span>
  1109. </FormItem>
  1110. <FormItem
  1111. className="half-item"
  1112. {...formItemLayout}
  1113. label="金额(万元)"
  1114. >
  1115. <span>{this.state.commodityPrice}</span>
  1116. </FormItem>
  1117. <FormItem
  1118. className="half-item"
  1119. {...formItemLayout}
  1120. label="主要项目"
  1121. >
  1122. <span>{getboutique(this.state.main)}</span>
  1123. </FormItem>
  1124. <div className="clearfix">
  1125. <FormItem
  1126. labelCol={{ span: 4 }}
  1127. wrapperCol={{ span: 16 }}
  1128. label="服务说明"
  1129. >
  1130. <span>{this.state.taskComment}</span>
  1131. </FormItem>
  1132. </div>
  1133. </div>
  1134. </Spin>
  1135. </Form>
  1136. </Modal>
  1137. <Modal
  1138. maskClosable={false}
  1139. visible={this.state.noVisible}
  1140. onOk={this.noCancel}
  1141. onCancel={this.noCancel}
  1142. width="400px"
  1143. title={"拒绝理由"}
  1144. footer=""
  1145. className="admin-desc-content"
  1146. >
  1147. <Form layout="horizontal" id="demand-form">
  1148. <Spin spinning={this.state.loading}>
  1149. <div className="clearfix">
  1150. <FormItem
  1151. labelCol={{ span: 4 }}
  1152. wrapperCol={{ span: 16 }}
  1153. label="拒绝理由"
  1154. >
  1155. <Input
  1156. type="textarea"
  1157. placeholder="请输入拒绝理由"
  1158. rows={4}
  1159. value={this.state.reason}
  1160. onChange={e => {
  1161. this.setState({ reason: e.target.value });
  1162. }}
  1163. />
  1164. </FormItem>
  1165. </div>
  1166. <div className="clearfix">
  1167. <Button
  1168. className="cancel"
  1169. type="primary"
  1170. onClick={this.examOks}
  1171. style={{ marginLeft: "50px" }}
  1172. htmlType="submit"
  1173. >
  1174. 确定
  1175. </Button>
  1176. <Button
  1177. className="cancel"
  1178. type="ghost"
  1179. onClick={this.noCancel}
  1180. style={{ marginLeft: "50px" }}
  1181. >
  1182. 取消
  1183. </Button>
  1184. </div>
  1185. </Spin>
  1186. </Form>
  1187. </Modal>
  1188. <Modal
  1189. visible={this.state.rizhivisible}
  1190. className="admin-desc-content"
  1191. width="800px"
  1192. maskClosable={false}
  1193. title="订单日志"
  1194. footer={null}
  1195. onCancel={this.closeOrderLog}
  1196. >
  1197. <div className="patent-table">
  1198. <Spin spinning={this.state.loading}>
  1199. <Table
  1200. columns={this.state.columnsrizhi}
  1201. dataSource={this.state.dataSourcerizhi}
  1202. pagination={false}
  1203. />
  1204. </Spin>
  1205. </div>
  1206. </Modal>
  1207. </div>
  1208. </div>
  1209. );
  1210. }
  1211. }));
  1212. export default IntentionCustomer;