checkOutsourcing.jsx 40 KB

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