zxsglyOutSourcingPaiDan.jsx 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750
  1. import React from 'react';
  2. import $ from 'jquery/src/ajax';
  3. import moment from 'moment';
  4. import '../../order/userMangagement.less';
  5. import {boutique} from '../../../dataDic.js';
  6. import '@/manageCenter/financialManage/distribute/public.less';
  7. import { Button,Form, Input, Select, Spin, Table, Switch, message, DatePicker, Modal,AutoComplete,Tabs} from 'antd';
  8. import Assign from '@/manageCenter/publicComponent/assign';
  9. import {
  10. getProcessStatus,
  11. getApproval,
  12. getLiquidationStatus,
  13. getApprovedState,
  14. splitUrl,
  15. getboutique,
  16. ShowModal
  17. } from "@/tools";
  18. import ShowModalDiv from "@/showModal.jsx";
  19. const zxsglyOutSourcingPaiDan = React.createClass({
  20. loadData(pageNo) {
  21. this.state.data = [];
  22. this.setState({
  23. page:pageNo,
  24. loading: true
  25. });
  26. $.ajax({
  27. method: "get",
  28. dataType: "json",
  29. crossDomain: false,
  30. url: globalConfig.context +"/api/admin/newOrder/orderNewList",
  31. data: {
  32. pageNo: pageNo || 1,
  33. pageSize: this.state.pagination.pageSize,
  34. specially: 4,//咨询师管理列表
  35. distribution:this.state.distribution,//全部列表
  36. name: this.state.customerName,//名称
  37. depId: this.state.departmenttSearch,//订单部门
  38. orderNo: this.state.orderNoSearch,//订单编号
  39. starTime: this.state.releaseDate[0],//开始时间
  40. endTime: this.state.releaseDate[1],//结束时间
  41. outsource: 1,
  42. },
  43. success: function (data) {
  44. ShowModal(this);
  45. let theArr = [];
  46. if (!data.data || !data.data.list) {
  47. if (data.error && data.error.length) {
  48. message.warning(data.error[0].message);
  49. };
  50. } else {
  51. for (let i = 0; i < data.data.list.length; i++) {
  52. let thisdata = data.data.list[i];
  53. theArr.push({
  54. key: i,
  55. id:thisdata.id,//任务ID
  56. orderNo: thisdata.orderNo,//订单编号
  57. totalAmount:thisdata.totalAmount,//签单金额
  58. processStatus:thisdata.processStatus,//流程状态
  59. liquidationStatus:thisdata.liquidationStatus,//结算状态
  60. approval:thisdata.approval,//特批状态
  61. signDate:thisdata.signDate,//签单时间
  62. userName:thisdata.userName,//客户名称
  63. salesmanName:thisdata.salesmanName,//营销员名称
  64. financeName:thisdata.financeName,//财务名称
  65. consultantName:thisdata.consultantName,//项目负责人
  66. createDate:thisdata.createDate,//下单时间
  67. settlementAmount:thisdata.settlementAmount,//已交款项
  68. depName:thisdata.depName,//部门名称
  69. });
  70. };
  71. }
  72. this.state.pagination.current = data.data.pageNo;
  73. this.state.pagination.total = data.data.totalCount;
  74. if(data.data&&data.data.list&&!data.data.list.length){
  75. this.state.pagination.current=0
  76. this.state.pagination.total=0
  77. }
  78. this.setState({
  79. dataSource: theArr,
  80. pagination: this.state.pagination
  81. });
  82. }.bind(this),
  83. }).always(function () {
  84. this.setState({
  85. loading: false
  86. });
  87. }.bind(this));
  88. },
  89. getInitialState() {
  90. return {
  91. distribution:'0',
  92. customerArr: [],
  93. searchMore: true,
  94. assignVisible:false,
  95. releaseDate: [],
  96. attachmentUrl:[],
  97. pictureUrl:[],
  98. departmentArr: [],
  99. boHuivisible:false,
  100. selectedRowKeys: [],
  101. selectedRows: [],
  102. loading: false,
  103. paginations:false,
  104. pagination: {
  105. defaultCurrent: 1,
  106. defaultPageSize: 10,
  107. showQuickJumper: true,
  108. pageSize: 10,
  109. onChange: function (page) {
  110. this.loadData(page);
  111. }.bind(this),
  112. showTotal: function (total) {
  113. return '共' + total + '条数据';
  114. }
  115. },
  116. columns: [
  117. {
  118. title: '订单编号',
  119. dataIndex: 'orderNo',
  120. key: 'orderNo',
  121. },
  122. {
  123. title: '签单客户',
  124. dataIndex: 'userName',
  125. key: 'userName',
  126. }, {
  127. title: '下单时间',
  128. dataIndex: 'createDate',
  129. key: 'createDate',
  130. }, {
  131. title: '签单时间',
  132. dataIndex: 'signDate',
  133. key: 'signDate',
  134. },
  135. {
  136. title: '订单总金额(万)',
  137. dataIndex: 'totalAmount',
  138. key: 'totalAmount'
  139. },
  140. {
  141. title: '是否特批',
  142. dataIndex: 'approval',
  143. key: 'approval',
  144. render: text => { return getApproval(text)}
  145. },
  146. {
  147. title: '订单负责人',
  148. dataIndex: 'salesmanName',
  149. key: 'salesmanName'
  150. },{
  151. title: '订单部门',
  152. dataIndex: 'depName',
  153. key: 'depName'
  154. },
  155. {
  156. title: '财务负责人',
  157. dataIndex: 'financeName',
  158. key: 'financeName'
  159. },
  160. {
  161. title: '项目负责人',
  162. dataIndex: 'consultantName',
  163. key: 'consultantName'
  164. },
  165. {
  166. title: '分派状态',
  167. dataIndex: 'processStatus',
  168. key: 'processStatus',
  169. render: text => { return text==5||text==6?getProcessStatus(text):'未分配'}
  170. },
  171. {
  172. title:'操作',
  173. dataIndex: 'caozuo',
  174. key: 'caouzo',
  175. render:(text,record)=>{
  176. return <div>
  177. {record.settlementAmount==0?
  178. <Button type="primary" style={{margin:'0 10px'}} onClick={(e)=>{e.stopPropagation(),this.examNo(record)}}>驳回</Button>
  179. :''}
  180. </div>
  181. }
  182. }
  183. ],
  184. columnsW: [
  185. {
  186. title: '外包名称',
  187. dataIndex: 'name',
  188. key: 'name',
  189. }, {
  190. title: '联系人',
  191. dataIndex: 'contacts',
  192. key: 'contacts',
  193. }, {
  194. title: '联系人电话',
  195. dataIndex: 'contactsMobile',
  196. key: 'contactsMobile',
  197. },
  198. {
  199. title: '地址',
  200. dataIndex: 'ProvinceCity',
  201. key: 'ProvinceCity',
  202. render:(test)=>{
  203. return test[0]===null?'':(getprovince(test[0])+'/'+getprovince(test[1])+'/'+getprovince(test[2]))
  204. }
  205. },
  206. {
  207. title: '地址详情',
  208. dataIndex: 'address',
  209. key: 'address',
  210. render:(text)=>{
  211. return (text&&text.length>8?text.substr(0,8)+'...':text)
  212. }
  213. },
  214. {
  215. title: '创建时间',
  216. dataIndex: 'createTimes',
  217. key: 'createTimes',
  218. },
  219. {
  220. title: '任务名称',
  221. dataIndex: 'tname',
  222. key: 'tname'
  223. },
  224. {
  225. title: '合同编号',
  226. dataIndex: 'contractNo',
  227. key: 'contractNo',
  228. },
  229. {
  230. title: '项目状态',
  231. dataIndex: 'projectStatus',
  232. key: 'projectStatus',
  233. render:(text)=>{
  234. return getProjectStatus(text);
  235. }
  236. },
  237. ],
  238. columnsrizhi:[
  239. {
  240. title:'流程',
  241. dataIndex: 'processName',
  242. key: 'processName'
  243. },{
  244. title:'操作人',
  245. dataIndex: 'adminName',
  246. key: 'adminName'
  247. },{
  248. title:'时间',
  249. dataIndex: 'createDate',
  250. key: 'createDate'
  251. }
  252. ],
  253. dataSource: [],
  254. searchTime: [],
  255. columnsX: [
  256. {
  257. title: '业务项目名称',
  258. dataIndex: 'commodityName',
  259. key: 'commodityName'
  260. }, {
  261. title: '项目类别',
  262. dataIndex: 'cname',
  263. key: 'cname'
  264. },{
  265. title: '项目数量',
  266. dataIndex: 'commodityQuantity',
  267. key: 'commodityQuantity'
  268. }, {
  269. title: '金额(万元)',
  270. dataIndex: 'commodityPrice',
  271. key: 'commodityPrice'
  272. }, {
  273. title: '负责人',
  274. dataIndex: 'contacts',
  275. key: 'contacts'
  276. }, {
  277. title: '负责人电话',
  278. dataIndex: 'contactsMobile',
  279. key: 'contactsMobile'
  280. }, {
  281. title: '主要项目',
  282. dataIndex: 'main',
  283. key: 'main',
  284. render:(text)=>{
  285. return (text?'是':'否')
  286. }
  287. }, {
  288. title: '项目说明',
  289. dataIndex: 'taskComment',
  290. key: 'taskComment',
  291. render:(text)=>{
  292. return (text&&text.length>8?text.substr(0,8)+'…':text)
  293. }
  294. },
  295. {
  296. title:'操作',
  297. dataIndex: 'caozuo',
  298. key: 'caouzo',
  299. render:(text,record)=>{
  300. return (
  301. <div>
  302. {this.state.processStatus == 4 ||
  303. record.taskStatus == 0 ? (
  304. <Button
  305. type="primary"
  306. style={{ margin: "0 10px" }}
  307. onClick={e => {
  308. e.stopPropagation(), this.evaluate(record);
  309. }}
  310. >
  311. 分配任务
  312. </Button>
  313. ) : (
  314. ""
  315. )}
  316. </div>
  317. );
  318. }
  319. }
  320. ],
  321. dataSourceX: [],
  322. }
  323. },
  324. /* 分派 */
  325. evaluate(record){
  326. this.state.assignData=record;
  327. this.setState({
  328. assignVisible:true
  329. })
  330. },
  331. componentWillMount() {
  332. this.departmentList();
  333. this.loadData();
  334. },
  335. tableRowClick(record) {
  336. this.state.RowData = record;
  337. this.setState({
  338. visible: true,
  339. modKey:"1",
  340. });
  341. this.xiangqing(record.orderNo);
  342. this.xiangmu(record.orderNo);
  343. this.jiedian(record.orderNo);
  344. },
  345. //审核不通过
  346. examOks(){
  347. $.ajax({
  348. method: "post",
  349. dataType: "json",
  350. crossDomain: false,
  351. url: globalConfig.context +"/api/admin/newOrder/technicianBackOrder",
  352. data: {
  353. orderNo:this.state.orderNo,
  354. reason:this.state.reason,
  355. },
  356. success: function(data) {
  357. if(data.error.length || data.data == "") {
  358. if(data.error && data.error.length) {
  359. message.warning(data.error[0].message);
  360. };
  361. } else {
  362. message.success("该订单已被驳回~");
  363. this.setState({
  364. visible:false,
  365. noVisible:false,
  366. reason:'',
  367. });
  368. this.reset();
  369. };
  370. }.bind(this),
  371. }).always(function() {
  372. this.setState({
  373. loading: false
  374. });
  375. }.bind(this));
  376. },
  377. //点击拒绝
  378. examNo(record){
  379. this.setState({
  380. noVisible:true,
  381. orderNo:record.orderNo
  382. })
  383. },
  384. //关闭输入理由框
  385. noCancel(){
  386. this.setState({
  387. noVisible:false,
  388. reason:'',
  389. })
  390. },
  391. //订单详情
  392. xiangqing(orderNos) {
  393. $.ajax({
  394. method: "get",
  395. dataType: "json",
  396. crossDomain: false,
  397. url: globalConfig.context +"/api/admin/newOrder/getOrderNewDetail",
  398. data: {
  399. orderNo:orderNos
  400. },
  401. success: function(data) {
  402. if(data.error.length || data.data.list == "") {
  403. if(data.error && data.error.length) {
  404. message.warning(data.error[0].message);
  405. };
  406. } else {
  407. let thisdata=data.data;
  408. this.setState({
  409. orderNo: thisdata.orderNo,//订单编号
  410. contractNo: thisdata.contractNo,//合同编号
  411. userName:thisdata.userName,//客户名称
  412. depName:thisdata.depName,//订单部门
  413. signDate:thisdata.signDate,//签单时间
  414. processStatus:thisdata.processStatus,//流程状态
  415. liquidationStatus:thisdata.liquidationStatus,//结算状态
  416. contacts:thisdata.contacts,//企业联系人
  417. contactMobile:thisdata.contactMobile,//联系人电话
  418. legalPerson:thisdata.legalPerson,//法人
  419. legalPersonTel:thisdata.legalPersonTel,//法人电话
  420. firstAmount:thisdata.firstAmount,//签单金额
  421. totalAmount:thisdata.totalAmount,//首付金额
  422. approval:thisdata.approval,//特批状态
  423. settlementAmount:thisdata.settlementAmount,//已收款项
  424. orderRemarks:thisdata.orderRemarks,//订单留言
  425. orgCodeUrl: thisdata.contractPictureUrl ? splitUrl(thisdata.contractPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],//图片地址
  426. salesmanName:thisdata.salesmanName,//营销员名称
  427. salesmanMobile:thisdata.salesmanMobile,//营销员电话
  428. financeName:thisdata.financeName,//财务名称
  429. financeMobile:thisdata.financeMobile,//财务电话
  430. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  431. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  432. nowFinance: thisdata.nowFinance, //财务名称
  433. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  434. })
  435. };
  436. }.bind(this),
  437. }).always(function() {
  438. this.setState({
  439. loading: false
  440. });
  441. }.bind(this));
  442. },
  443. //项目列表
  444. xiangmu(orderNos) {
  445. $.ajax({
  446. method: "get",
  447. dataType: "json",
  448. crossDomain: false,
  449. url: globalConfig.context +"/api/admin/newOrder/getOrderTask",
  450. data: {
  451. orderNo:orderNos
  452. },
  453. success: function(data) {
  454. let theArr = [];
  455. if(data.error.length || data.data.list == "") {
  456. if(data.error && data.error.length) {
  457. message.warning(data.error[0].message);
  458. };
  459. } else {
  460. for (let i = 0; i < data.data.length; i++) {
  461. let thisdata = data.data[i];
  462. theArr.push({
  463. key: i,
  464. id:thisdata.id,
  465. orderNo:thisdata.orderNo,//订单编号
  466. commodityId:thisdata.commodityId,//项目ID
  467. commodityName:thisdata.commodityName,//项目名称
  468. cname:thisdata.cname,//项目类别
  469. commodityPrice:thisdata.commodityPrice,//项目价格
  470. commodityQuantity:thisdata.commodityQuantity,//项目数量
  471. main:thisdata.main,//是否为主要任务
  472. taskComment:thisdata.taskComment,//任务说明
  473. contacts:thisdata.contacts,//联系人
  474. contactsMobile:thisdata.contactsMobile,//联系人电话
  475. taskStatus:thisdata.taskStatus,//是否分配
  476. });
  477. };
  478. };
  479. this.setState({
  480. dataSourceX: theArr,
  481. });
  482. }.bind(this),
  483. }).always(function() {
  484. this.setState({
  485. loading: false
  486. });
  487. }.bind(this));
  488. },
  489. rizhi(){
  490. console.log(this.state.orderNo)
  491. this.setState({
  492. loading:true
  493. })
  494. $.ajax({
  495. method: "get",
  496. dataType: "json",
  497. crossDomain: false,
  498. url: '/api/admin/newOrder/selectOrderLog',
  499. data: {
  500. orderNo:this.state.orderNo
  501. },
  502. success: function (data) {
  503. let theArr = [];
  504. let thisData = data.data;
  505. if (!thisData.length) {
  506. if (data.error && data.error.length) {
  507. message.warning(data.error[0].message);
  508. };
  509. thisData = {};
  510. }else{
  511. for(let i = 0; i < data.data.length; i++) {
  512. let thisdata = data.data[i];
  513. theArr.push({
  514. processName:thisdata.processName,
  515. adminName:thisdata.adminName,
  516. createDate:thisdata.createDate,
  517. });
  518. };
  519. };
  520. this.setState({
  521. dataSourcerizhi: theArr
  522. })
  523. }.bind(this),
  524. }).always(function () {
  525. this.setState({
  526. loading: false
  527. });
  528. }.bind(this));
  529. },
  530. //查看订单日志
  531. getOrderLog(){
  532. this.setState({
  533. rizhivisible:true
  534. })
  535. this.rizhi()
  536. },
  537. closeOrderLog(){
  538. this.setState({
  539. rizhivisible:false
  540. })
  541. },
  542. load(){
  543. if(this.state.attachmentUrl.length !== 0){
  544. let url = window.location.href.substring(7);
  545. this.state.attachmentUrl.forEach((e)=>{
  546. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  547. })
  548. }else{
  549. message.error("此订单无上传文件")
  550. }
  551. },
  552. supervisor(e,state){ //客户名称与服务名称自动补全
  553. $.ajax({
  554. method: "get",
  555. dataType: "json",
  556. crossDomain: false,
  557. url: '/api/admin/order/getBusinessProjectByName',
  558. data:{
  559. businessName:e
  560. },
  561. success: function (data) {
  562. let thedata=data.data;
  563. if (!thedata) {
  564. if (data.error && data.error.length) {
  565. message.warning(data.error[0].message);
  566. };
  567. thedata = {};
  568. };
  569. this.setState({
  570. states:state,
  571. customerArr:thedata,
  572. });
  573. }.bind(this),
  574. }).always(function () {
  575. this.setState({
  576. loading: false
  577. });
  578. }.bind(this));
  579. },
  580. //服务值改变时请求客户名称
  581. httpChange(e){
  582. this.state.gid='';
  583. if(e.length>=1){
  584. this.supervisor(e,false);
  585. }
  586. this.setState({
  587. commodityName:e
  588. })
  589. },
  590. //新建项目明细保存
  591. nextSubmit(e) {
  592. e.preventDefault();
  593. if(this.state.gid==undefined||!this.state.gid){
  594. message.warning('服务名称不匹配!');
  595. return false;
  596. };
  597. if(!this.state.commodityPrice){
  598. message.warning('请输入金额!');
  599. this.refs.commodityPrice.focus();
  600. return false;
  601. };
  602. if(!this.state.commodityQuantity){
  603. message.warning('请输入商品数量!');
  604. this.refs.commodityQuantity.focus();
  605. return false;
  606. };
  607. if(!this.state.main){
  608. message.warning('请选择是否为主要项目!');
  609. this.refs.commodityQuantity.focus();
  610. return false;
  611. };
  612. this.setState({
  613. loading: true
  614. });
  615. let api=this.state.addState?'/api/admin/newOrder/addOrderTask':'/api/bianji';
  616. $.ajax({
  617. method: "POST",
  618. dataType: "json",
  619. crossDomain: false,
  620. url: globalConfig.context +api ,
  621. data: {
  622. commodityId:this.state.gid,//商品ID
  623. orderNo:this.state.RowData.orderNo,//订单编号
  624. commodityName:this.state.commodityName,//商品名称
  625. commodityQuantity:this.state.commodityQuantity,//商品数量
  626. commodityPrice:this.state.commodityPrice,//签单总价
  627. taskComment:this.state.taskComment,//服务说明
  628. main:this.state.main,//是否为主要项目
  629. }
  630. }).done(function(data) {
  631. this.setState({
  632. loading: false
  633. });
  634. if(!data.error.length) {
  635. message.success('保存成功!');
  636. this.nextCancel()
  637. //this.loaduser(this.props.datauser);
  638. this.xiangmu(this.state.RowData.orderNo)
  639. this.loadData();
  640. } else {
  641. message.warning(data.error[0].message);
  642. }
  643. }.bind(this));
  644. },
  645. //详情
  646. callBack(key){
  647. if(key === '2'){
  648. this.setState({
  649. modKey:key,
  650. width:"1200px"
  651. })
  652. this.loadWaiBao()
  653. }
  654. if(key === '1'){
  655. this.setState({
  656. modKey:key,
  657. })
  658. }
  659. if (this.state.pictureUrl.length) {
  660. let picArr = [];
  661. this.state.pictureUrl.map(function (item) {
  662. if ( item.response && item.response.data && item.response.data.length ){
  663. picArr.push(item.response.data);
  664. }
  665. });
  666. };
  667. if (key === '3') {
  668. this.setState({
  669. modKey:key,
  670. })
  671. this.setState({
  672. loading:true,
  673. });
  674. $.ajax({
  675. method: "get",
  676. dataType: "json",
  677. crossDomain: false,
  678. url: globalConfig.context +"/api/admin/outsourceOrg/orderOutsourceDtails",
  679. data: {
  680. orderNo:this.state.orderNo,
  681. },
  682. success: function(data) {
  683. let thisdata = data.data;
  684. console.log(thisdata)
  685. if(thisdata){
  686. this.setState({
  687. id: thisdata.id,
  688. createTimes:thisdata.createTimes,
  689. auditTimes:thisdata.auditTimes,
  690. remarks:thisdata.remarks,
  691. attachmentUrl:thisdata.attachmentUrl ? splitUrl(thisdata.attachmentUrl, ',', globalConfig.avatarHost + '/upload') : [],
  692. pictureUrl: thisdata.pictureUrl ? splitUrl(thisdata.pictureUrl, ',', globalConfig.avatarHost + '/upload') : [],//图片地址
  693. amount:thisdata.amount,
  694. companyName:thisdata.companyName,
  695. refundStatus: thisdata.refundStatus,
  696. })
  697. }
  698. }.bind(this),
  699. }).always(function() {
  700. this.setState({
  701. loading: false
  702. });
  703. }.bind(this));
  704. }
  705. },
  706. //外包详情
  707. loadWaiBao(){
  708. $.ajax({
  709. method: "get",
  710. dataType: "json",
  711. rossDomain: false,
  712. url: globalConfig.context + '/api/admin/outsourceOrg/selectOrderOutsourceOrg',
  713. data: {
  714. orderNo:this.state.orderNo
  715. },
  716. success: function (data) {
  717. let theArr = [];
  718. if(data.error.length || data.data.list == "") {
  719. if(data.error && data.error.length) {
  720. message.warning(data.error[0].message);
  721. };
  722. } else {
  723. for (let i = 0; i < data.data.length; i++) {
  724. let thisdata = data.data[i];
  725. let ProvinceCityArr = [];
  726. let ProvinceS = thisdata.province; //省
  727. let citys = thisdata.city;//市
  728. let Areas = thisdata.area;//区
  729. ProvinceCityArr.push(ProvinceS, citys, Areas);
  730. theArr.push({
  731. key: i,
  732. id:thisdata.id,
  733. name:thisdata.name,
  734. contacts:thisdata.contacts,//订单编号
  735. contactsMobile:thisdata.contactsMobile,
  736. ProvinceCity:ProvinceCityArr[0] === null?[]:ProvinceCityArr,
  737. province:thisdata.province,
  738. city:thisdata.city,
  739. area:thisdata.area,
  740. address:thisdata.address,
  741. remarks:thisdata.remarks,
  742. tid:thisdata.tid,
  743. createTimes:thisdata.createTimes,
  744. tname:thisdata.tname,
  745. contractNo:thisdata.contractNo,
  746. projectStatus:thisdata.projectStatus,
  747. });
  748. };
  749. };
  750. this.setState({
  751. dataSourceW:theArr
  752. },()=>{
  753. });
  754. }.bind(this),
  755. }).always(function () {
  756. this.setState({
  757. loading: false
  758. });
  759. }.bind(this));
  760. },
  761. //上级主管输入框失去焦点是判断客户是否存在
  762. selectAuto(value){
  763. let kid=[];
  764. let fwList=this.state.customerArr;
  765. fwList.map(function(item){
  766. if(value==item.bname){
  767. kid=item
  768. }
  769. })
  770. this.setState({
  771. commodityName:value,
  772. gid:kid.id,
  773. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  774. commodityFirstPayment:kid.firstPayment==0?kid.firstPayment.toString():kid.firstPayment
  775. })
  776. console.log(this.state.commodityName,"jjjj",this.state.gid);
  777. },
  778. //点击添加项目明细
  779. addDetailed(){
  780. this.setState({
  781. gid:'',
  782. customerArr:[],
  783. commodityName:'',
  784. commodityQuantity:'',
  785. commodityId:'',
  786. taskComment:'',
  787. main:undefined,
  788. commodityPrice:'',
  789. addState:1,
  790. addserviceVisible: true
  791. })
  792. },
  793. //修改项目详情
  794. tabRowSave(e){
  795. e.preventDefault();
  796. if(!this.state.commodityPrice){
  797. message.warning('金额不能为空!');
  798. return false;
  799. };
  800. if(!this.state.commodityQuantity){
  801. message.warning('数量不能为空!');
  802. return false;
  803. };
  804. if(!this.state.main){
  805. message.warning('请选择是否为主要项目!');
  806. this.refs.commodityQuantity.focus();
  807. return false;
  808. };
  809. console.log(this.state.gid);
  810. $.ajax({
  811. method: "POST",
  812. dataType: "json",
  813. crossDomain: false,
  814. url: globalConfig.context +'/api/admin/newOrder/updateOrderTask' ,
  815. data: {
  816. id:this.state.jid,//项目ID
  817. commodityId:this.state.gid,//商品ID
  818. orderNo:this.state.RowData.orderNo,//订单编号
  819. main:this.state.main,//是否为主要
  820. commodityPrice:this.state.commodityPrice,//金额
  821. commodityQuantity:this.state.commodityQuantity,//数量
  822. taskComment:this.state.taskComment//备注
  823. }
  824. }).done(function(data) {
  825. this.setState({
  826. loading: false
  827. });
  828. if(!data.error.length) {
  829. message.success('保存成功!');
  830. this.nextCancel()
  831. //this.loaduser(this.props.datauser);
  832. this.loadData();
  833. } else {
  834. message.warning(data.error[0].message);
  835. }
  836. }.bind(this));
  837. },
  838. //节点列表
  839. jiedian(orderNos) {
  840. $.ajax({
  841. method: "get",
  842. dataType: "json",
  843. crossDomain: false,
  844. url: globalConfig.context +"/api/admin/newOrder/selectOrderDun",
  845. data: {
  846. orderNo:orderNos
  847. },
  848. success: function(data) {
  849. let theArr = [];
  850. let thisData=[];
  851. if(data.error.length || data.data.list == "") {
  852. if(data.error && data.error.length) {
  853. message.warning(data.error[0].message);
  854. };
  855. } else {
  856. for(let i = 0; i < data.data.length; i++) {
  857. thisData= data.data[i];
  858. theArr.push({
  859. key:i,
  860. dunSubject:thisData.dunSubject?thisData.dunSubject.toString():"",//催款科目
  861. id:thisData.id,//节点Id
  862. money:thisData.money,//催款金额
  863. dunStatus:thisData.dunStatus,//催款状态
  864. })
  865. }
  866. this.setState({
  867. contactList:theArr
  868. })
  869. };
  870. }.bind(this),
  871. }).always(function() {
  872. this.setState({
  873. loading: false
  874. });
  875. }.bind(this));
  876. },
  877. closeDesc(e, s) {
  878. this.state.showDesc = e;
  879. if (s) {
  880. this.loadData(this.state.page);
  881. };
  882. },
  883. closeAssign(e, s) {
  884. this.state.assignVisible = e;
  885. if (s) {
  886. this.loadData(this.state.page);
  887. this.xiangqing(this.state.orderNo);
  888. this.xiangmu(this.state.orderNo);
  889. this.jiedian(this.state.orderNo);
  890. };
  891. },
  892. search() {
  893. this.loadData();
  894. },
  895. reset() {
  896. this.state.nameSearch = '';
  897. this.state.customerName='';
  898. this.state.releaseDate = [];
  899. this.state.orderNoSearch='';
  900. this.state.departmenttSearch=undefined;
  901. this.state.distribution=undefined;
  902. this.loadData(this.state.page);
  903. },
  904. nextCancel() {
  905. this.setState({
  906. addserviceVisible: false,
  907. addnextVisible: false
  908. })
  909. },
  910. //点击打卡项目详情
  911. tableRowClickX(record) {
  912. this.setState({
  913. jid:record.id,//项目ID
  914. kid:record.commodityId,//商品ID
  915. commodityName:record.commodityName,//金额
  916. commodityPrice:record.commodityPrice,//金额
  917. commodityQuantity:record.commodityQuantity,//数量
  918. taskComment:record.taskComment,//备注
  919. main:record.main.toString(),//是否为主要
  920. addnextVisible:true,
  921. addState:0,
  922. });
  923. },
  924. searchSwitch() {
  925. this.setState({
  926. searchMore: !this.state.searchMore
  927. });
  928. },
  929. //关闭详情
  930. visitCancel(){
  931. this.setState({
  932. visible:false
  933. },()=>{
  934. this.setState({
  935. modKey:"1",
  936. })
  937. })
  938. // this.reset();
  939. },
  940. visitOk(){
  941. this.setState({
  942. visible:false
  943. })
  944. this.reset();
  945. },
  946. resets(){
  947. this.state.orderNo='';
  948. this.state.customerName='';
  949. this.state.departmenttSearch=undefined;
  950. this.state.releaseDate[0] = undefined;
  951. this.state.releaseDate[1] = undefined;
  952. },
  953. //部门
  954. departmentList() {
  955. this.setState({
  956. loading: true
  957. });
  958. $.ajax({
  959. method: "get",
  960. dataType: "json",
  961. crossDomain: false,
  962. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  963. data: {
  964. },
  965. success: function(data) {
  966. let thedata = data.data;
  967. let theArr = [];
  968. if(!thedata) {
  969. if(data.error && data.error.length) {
  970. message.warning(data.error[0].message);
  971. };
  972. thedata = {};
  973. } else {
  974. thedata.map(function(item, index) {
  975. theArr.push({
  976. key: index,
  977. name: item.name,
  978. id: item.id,
  979. })
  980. })
  981. }
  982. this.setState({
  983. departmentArr: theArr,
  984. })
  985. }.bind(this),
  986. }).always(function() {
  987. this.setState({
  988. loading: false
  989. });
  990. }.bind(this));
  991. },
  992. render() {
  993. const { TabPane } = Tabs;
  994. const formItemLayout = {
  995. labelCol: { span: 8 },
  996. wrapperCol: { span: 14 },
  997. };
  998. const dataSources=this.state.customerArr || [];
  999. const options = dataSources.map((group,index) =>
  1000. <Select.Option key={index} value={group.bname}>{group.bname}</Select.Option>
  1001. )
  1002. const FormItem = Form.Item;
  1003. const { RangePicker } = DatePicker;
  1004. let departmentArr = this.state.departmentArr || [];
  1005. return (
  1006. <div className="user-content">
  1007. <ShowModalDiv ShowModal={this.state.showModal} />
  1008. <div className="content-title">
  1009. <span>外包项目派单</span>
  1010. </div>
  1011. <div className="user-search">
  1012. <Input
  1013. placeholder="客户名称"
  1014. value={this.state.customerName}
  1015. onChange={e => {
  1016. this.setState({ customerName: e.target.value });
  1017. }}
  1018. />
  1019. <Input
  1020. placeholder="订单编号"
  1021. value={this.state.orderNoSearch}
  1022. onChange={e => {
  1023. this.setState({ orderNoSearch: e.target.value });
  1024. }}
  1025. />
  1026. <Select
  1027. placeholder="选择部门"
  1028. style={{ width: 150, marginRight: "10px" }}
  1029. value={this.state.departmenttSearch}
  1030. onChange={e => {
  1031. this.setState({ departmenttSearch: e });
  1032. }}
  1033. >
  1034. {departmentArr.map(function(item) {
  1035. return (
  1036. <Select.Option key={item.id}>{item.name}</Select.Option>
  1037. );
  1038. })}
  1039. </Select>
  1040. <Select
  1041. onChange={e => {
  1042. this.setState({ distribution: e });
  1043. }}
  1044. style={{ width: 160, marginRight: 5 }}
  1045. placeholder="分派状态"
  1046. value={this.state.distribution}
  1047. >
  1048. <Option value="0">未分配</Option>
  1049. <Option value="1">部分分配</Option>
  1050. <Option value="2">全部分配</Option>
  1051. </Select>
  1052. <Button type="primary" onClick={this.search}>
  1053. 搜索
  1054. </Button>
  1055. <Button onClick={this.reset}>重置</Button>
  1056. <span>
  1057. 更多搜索
  1058. <Switch
  1059. defaultChecked={false}
  1060. onChange={this.searchSwitch.bind(this)}
  1061. />
  1062. </span>
  1063. <div
  1064. className="search-more"
  1065. style={this.state.searchMore ? { display: "none" } : {}}
  1066. >
  1067. <span>订单时间 :</span>
  1068. <RangePicker
  1069. value={[
  1070. this.state.releaseDate[0]
  1071. ? moment(this.state.releaseDate[0])
  1072. : null,
  1073. this.state.releaseDate[1]
  1074. ? moment(this.state.releaseDate[1])
  1075. : null
  1076. ]}
  1077. onChange={(data, dataString) => {
  1078. this.setState({ releaseDate: dataString });
  1079. }}
  1080. />
  1081. </div>
  1082. </div>
  1083. <div className="patent-table">
  1084. <Spin spinning={this.state.loading}>
  1085. <Table
  1086. columns={this.state.columns}
  1087. dataSource={this.state.dataSource}
  1088. pagination={this.state.pagination}
  1089. onRowClick={this.tableRowClick.bind(this)}
  1090. />
  1091. </Spin>
  1092. </div>
  1093. <Assign
  1094. title="项目"
  1095. selApi="/api/admin/orderProject/projectDistribution"
  1096. data={this.state.assignData}
  1097. showDesc={this.state.assignVisible}
  1098. closeDesc={this.closeAssign.bind(this)}
  1099. fenpaiData={8}
  1100. specially={1}
  1101. roleName={"咨询师经理"}
  1102. requestMethod={"post"}
  1103. />
  1104. <Modal
  1105. className="customeDetails"
  1106. footer=""
  1107. width="900px"
  1108. visible={this.state.visible}
  1109. onOk={this.visitOk}
  1110. onCancel={this.visitCancel}
  1111. >
  1112. <Tabs onChange={this.callBack} activeKey={this.state.modKey}>
  1113. <TabPane tab="项目概况" key="1">
  1114. <Form
  1115. layout="horizontal"
  1116. onSubmit={this.handleSubmit}
  1117. id="demand-form"
  1118. style={{ paddingBottom: "40px" }}
  1119. >
  1120. <Spin spinning={this.state.loading}>
  1121. <div className="clearfix">
  1122. <FormItem
  1123. className="half-item"
  1124. {...formItemLayout}
  1125. label="订单编号"
  1126. >
  1127. <span>{this.state.orderNo}</span>
  1128. </FormItem>
  1129. <FormItem
  1130. className="half-item"
  1131. {...formItemLayout}
  1132. label="合同编号"
  1133. >
  1134. <span>{this.state.contractNo}</span>
  1135. </FormItem>
  1136. <FormItem
  1137. className="half-item"
  1138. {...formItemLayout}
  1139. label="客户名称"
  1140. >
  1141. <span>{this.state.userName}</span>
  1142. </FormItem>
  1143. <FormItem
  1144. className="half-item"
  1145. {...formItemLayout}
  1146. label="合同签订时间"
  1147. >
  1148. <span>{this.state.signDate}</span>
  1149. </FormItem>
  1150. <FormItem
  1151. className="half-item"
  1152. {...formItemLayout}
  1153. label="流程状态"
  1154. >
  1155. <span>
  1156. {getProcessStatus(this.state.processStatus)}
  1157. </span>
  1158. </FormItem>
  1159. <FormItem
  1160. className="half-item"
  1161. {...formItemLayout}
  1162. label="结算状态"
  1163. >
  1164. <span>
  1165. {getLiquidationStatus(this.state.liquidationStatus)}
  1166. </span>
  1167. </FormItem>
  1168. <FormItem
  1169. className="half-item"
  1170. {...formItemLayout}
  1171. label="企业联系人"
  1172. >
  1173. <span>{this.state.contacts}</span>
  1174. </FormItem>
  1175. <FormItem
  1176. className="half-item"
  1177. {...formItemLayout}
  1178. label="联系人电话"
  1179. >
  1180. <span>{this.state.contactMobile}</span>
  1181. </FormItem>
  1182. <FormItem
  1183. className="half-item"
  1184. {...formItemLayout}
  1185. label="企业法人"
  1186. >
  1187. <span>{this.state.legalPerson}</span>
  1188. </FormItem>
  1189. <FormItem
  1190. className="half-item"
  1191. {...formItemLayout}
  1192. label="法人电话"
  1193. >
  1194. <span>{this.state.legalPersonTel}</span>
  1195. </FormItem>
  1196. <FormItem
  1197. className="half-item"
  1198. {...formItemLayout}
  1199. label="签单金额(万元)"
  1200. >
  1201. <span>{this.state.totalAmount}</span>
  1202. </FormItem>
  1203. <FormItem
  1204. className="half-item"
  1205. {...formItemLayout}
  1206. label="首付金额(万元)"
  1207. >
  1208. <span>{this.state.firstAmount}</span>
  1209. </FormItem>
  1210. <FormItem
  1211. className="half-item"
  1212. {...formItemLayout}
  1213. label="特批立项"
  1214. >
  1215. <span>{getApprovedState(this.state.approval)}</span>
  1216. </FormItem>
  1217. <FormItem
  1218. className="half-item"
  1219. {...formItemLayout}
  1220. label="已收款项(万元)"
  1221. >
  1222. <span>{this.state.settlementAmount}</span>
  1223. </FormItem>
  1224. <div className="clearfix">
  1225. <FormItem
  1226. labelCol={{ span: 4 }}
  1227. wrapperCol={{ span: 16 }}
  1228. label="订单留言"
  1229. >
  1230. <p style={{ width: 500, wordWrap: "break-word" }}>
  1231. {this.state.orderRemarks}
  1232. </p>
  1233. </FormItem>
  1234. <Button
  1235. style={{
  1236. float: "right",
  1237. marginRight: "140px",
  1238. marginTop: "20px"
  1239. }}
  1240. onClick={this.getOrderLog}
  1241. >
  1242. 查看订单 日志
  1243. </Button>
  1244. </div>
  1245. <div className="clearfix">
  1246. <FormItem
  1247. className="half-item"
  1248. {...formItemLayout}
  1249. label="订单负责人"
  1250. >
  1251. <span>{this.state.salesmanName}</span>
  1252. </FormItem>
  1253. <FormItem
  1254. className="half-item"
  1255. {...formItemLayout}
  1256. label="订单负责人电话"
  1257. >
  1258. <span>{this.state.salesmanMobile}</span>
  1259. </FormItem>
  1260. <FormItem
  1261. className="half-item"
  1262. {...formItemLayout}
  1263. label="订单部门"
  1264. >
  1265. <span>{this.state.depName}</span>
  1266. </FormItem>
  1267. </div>
  1268. <div className="clearfix">
  1269. <FormItem
  1270. className="half-item"
  1271. {...formItemLayout}
  1272. label="当前财务负责人"
  1273. >
  1274. <span>{this.state.nowFinance}</span>
  1275. </FormItem>
  1276. <FormItem
  1277. className="half-item"
  1278. {...formItemLayout}
  1279. label="当前财务负责人电话"
  1280. >
  1281. <span>{this.state.nowFinanceMobile}</span>
  1282. </FormItem>
  1283. </div>
  1284. <div className="clearfix">
  1285. <FormItem
  1286. className="half-item"
  1287. {...formItemLayout}
  1288. style={{ opacity: ".5" }}
  1289. label="原订单负责人"
  1290. >
  1291. <span>{this.state.oldSalesmanName}</span>
  1292. </FormItem>
  1293. <FormItem
  1294. className="half-item"
  1295. {...formItemLayout}
  1296. style={{ opacity: ".5" }}
  1297. label="原订单负责人电话"
  1298. >
  1299. <span>{this.state.oldSalesmanMobile}</span>
  1300. </FormItem>
  1301. </div>
  1302. <div className="clearfix">
  1303. <FormItem
  1304. className="half-item"
  1305. {...formItemLayout}
  1306. style={{ opacity: ".5" }}
  1307. label="实际财务操作人"
  1308. >
  1309. <span>{this.state.financeName}</span>
  1310. </FormItem>
  1311. <FormItem
  1312. className="half-item"
  1313. {...formItemLayout}
  1314. style={{ opacity: ".5" }}
  1315. label="实际财务操作人电话"
  1316. >
  1317. <span>{this.state.financeMobile}</span>
  1318. </FormItem>
  1319. </div>
  1320. {
  1321. <div>
  1322. <span
  1323. style={{ marginLeft: "50px", fontSize: "20px" }}
  1324. >
  1325. 项目业务
  1326. </span>
  1327. {
  1328. <Button
  1329. type="primary"
  1330. onClick={this.addDetailed}
  1331. style={{ float: "right", marginRight: "50px" }}
  1332. >
  1333. 添加项目明细
  1334. </Button>
  1335. }
  1336. </div>
  1337. }
  1338. <div className="patent-table">
  1339. <Spin spinning={this.state.loading}>
  1340. <Table
  1341. columns={this.state.columnsX}
  1342. dataSource={this.state.dataSourceX}
  1343. pagination={this.state.paginations}
  1344. onRowClick={this.tableRowClickX}
  1345. />
  1346. </Spin>
  1347. </div>
  1348. </div>
  1349. </Spin>
  1350. </Form>
  1351. </TabPane>
  1352. <TabPane tab="外包详情" key="2">
  1353. <div className="clearfix">
  1354. <p style={{ color: "red" }}>
  1355. 提示:查看备注请点击表格左侧加号按钮~
  1356. </p>
  1357. <div className="patent-table">
  1358. <Spin spinning={this.state.loading}>
  1359. <Table
  1360. columns={this.state.columnsW}
  1361. dataSource={this.state.dataSourceW}
  1362. pagination={false}
  1363. expandedRowRender={record => (
  1364. <p style={{ margin: 0 }}>{record.remarks}</p>
  1365. )}
  1366. scroll={{ x: 300, y: 0 }}
  1367. />
  1368. </Spin>
  1369. </div>
  1370. </div>
  1371. </TabPane>
  1372. {/*<TabPane tab="外包审核" key="2">
  1373. <div className="clearfix">
  1374. <FormItem className="half-item"
  1375. {...formItemLayout}
  1376. label="外包公司" >
  1377. <span>{this.state.companyName}</span>
  1378. </FormItem>
  1379. </div>
  1380. <div className="clearfix">
  1381. <FormItem className="half-item"
  1382. {...formItemLayout}
  1383. label="成本(万元)" >
  1384. <span>{this.state.amount}</span>
  1385. </FormItem>
  1386. </div>
  1387. <div className="clearfix">
  1388. <FormItem className="half-item"
  1389. {...formItemLayout}
  1390. label="上传协议文件" >
  1391. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1392. data={(e)=>{
  1393. return {
  1394. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1395. }
  1396. }}
  1397. fileList={this.state.attachmentUrl}
  1398. onChange={(e)=>{
  1399. this.setState({
  1400. attachmentUrl:e.fileList,
  1401. })
  1402. }}>
  1403. </Upload>
  1404. <Button type="primary" size="small" style={{marginLeft:'0'}} onClick={this.load}>下载附件</Button>
  1405. </FormItem>
  1406. </div>
  1407. <div className="clearfix">
  1408. <FormItem
  1409. labelCol={{ span: 4 }}
  1410. wrapperCol={{ span: 18 }}
  1411. label="合同扫描件"
  1412. >
  1413. <Upload className="demandDetailShow-upload"
  1414. listType="picture-card"
  1415. fileList={this.state.pictureUrl}
  1416. onPreview={(file) => {
  1417. this.setState({
  1418. previewImage: file.url || file.thumbUrl,
  1419. previewVisible: true,
  1420. });
  1421. }} >
  1422. </Upload>
  1423. <Modal maskClosable={false} footer={null}
  1424. visible={this.state.previewVisible}
  1425. onCancel={() => { this.setState({ previewVisible: false }) }}>
  1426. <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
  1427. </Modal>
  1428. </FormItem>
  1429. </div>
  1430. <div className="clearfix">
  1431. <hr className="division"/>
  1432. <div className="clearfix">
  1433. <FormItem className="half-item"
  1434. {...formItemLayout}
  1435. label="审核意见" >
  1436. <span>{this.state.remarks}</span>
  1437. </FormItem>
  1438. </div>
  1439. <div className="clearfix">
  1440. <FormItem className="half-item"
  1441. {...formItemLayout}
  1442. label="审核结果" >
  1443. <span>{getRefundStatus(this.state.refundStatus)}</span>
  1444. </FormItem>
  1445. </div>
  1446. <div className="clearfix">
  1447. <FormItem className="half-item"
  1448. {...formItemLayout}
  1449. label="审核时间" >
  1450. <span>{this.state.auditTimes}</span>
  1451. </FormItem>
  1452. </div>
  1453. </div>
  1454. </TabPane>*/}
  1455. </Tabs>
  1456. </Modal>
  1457. <Modal
  1458. maskClosable={false}
  1459. visible={this.state.addnextVisible}
  1460. onOk={this.nextCancel}
  1461. onCancel={this.nextCancel}
  1462. width="800px"
  1463. title="项目任务详情"
  1464. footer=""
  1465. className="admin-desc-content"
  1466. >
  1467. <Form
  1468. layout="horizontal"
  1469. onSubmit={this.nextSubmit}
  1470. id="demand-form"
  1471. >
  1472. <Spin spinning={this.state.loading}>
  1473. <div className="clearfix">
  1474. <FormItem
  1475. className="half-item"
  1476. {...formItemLayout}
  1477. label="项目名称"
  1478. >
  1479. <span>{this.state.commodityName}</span>
  1480. </FormItem>
  1481. <FormItem
  1482. className="half-item"
  1483. {...formItemLayout}
  1484. label="项目数量"
  1485. >
  1486. <span>{this.state.commodityQuantity}</span>
  1487. </FormItem>
  1488. <FormItem
  1489. className="half-item"
  1490. {...formItemLayout}
  1491. label="金额(万元)"
  1492. >
  1493. <span>{this.state.commodityPrice}</span>
  1494. </FormItem>
  1495. <FormItem
  1496. className="half-item"
  1497. {...formItemLayout}
  1498. label="主要项目"
  1499. >
  1500. <span>{getboutique(this.state.main)}</span>
  1501. </FormItem>
  1502. <div className="clearfix">
  1503. <FormItem
  1504. labelCol={{ span: 4 }}
  1505. wrapperCol={{ span: 16 }}
  1506. label="服务说明"
  1507. >
  1508. <span>{this.state.taskComment}</span>
  1509. </FormItem>
  1510. </div>
  1511. </div>
  1512. </Spin>
  1513. </Form>
  1514. </Modal>
  1515. <Modal
  1516. maskClosable={false}
  1517. visible={this.state.addserviceVisible}
  1518. onOk={this.nextCancel}
  1519. onCancel={this.nextCancel}
  1520. width="800px"
  1521. title={"添加项目明细"}
  1522. footer=""
  1523. className="admin-desc-content"
  1524. >
  1525. <Form
  1526. layout="horizontal"
  1527. onSubmit={this.nextSubmit}
  1528. id="demand-form"
  1529. >
  1530. <Spin spinning={this.state.loading}>
  1531. <div className="clearfix">
  1532. <FormItem
  1533. className="half-item"
  1534. {...formItemLayout}
  1535. label="服务名称"
  1536. >
  1537. <AutoComplete
  1538. className="certain-category-search"
  1539. dropdownClassName="certain-category-search-dropdown"
  1540. dropdownMatchSelectWidth={false}
  1541. dropdownStyle={{ width: 200 }}
  1542. style={{ width: "200px" }}
  1543. placeholder="输入服务名称"
  1544. dataSource={options}
  1545. value={this.state.commodityName}
  1546. onChange={this.httpChange}
  1547. filterOption={true}
  1548. onSelect={this.selectAuto}
  1549. >
  1550. <Input />
  1551. </AutoComplete>
  1552. <span className="mandatory">*</span>
  1553. </FormItem>
  1554. <FormItem
  1555. className="half-item"
  1556. {...formItemLayout}
  1557. label="服务数量"
  1558. >
  1559. <Input
  1560. placeholder="请输入服务数量"
  1561. style={{ width: "200px" }}
  1562. value={this.state.commodityQuantity}
  1563. onChange={e => {
  1564. this.setState({ commodityQuantity: e.target.value });
  1565. }}
  1566. ref="commodityQuantity"
  1567. />
  1568. <span className="mandatory">*</span>
  1569. </FormItem>
  1570. <FormItem
  1571. className="half-item"
  1572. {...formItemLayout}
  1573. label="实签价格(万元)"
  1574. >
  1575. <Input
  1576. placeholder="请输入实签价格"
  1577. style={{ width: "200px" }}
  1578. value={this.state.commodityPrice}
  1579. onChange={e => {
  1580. this.setState({ commodityPrice: e.target.value });
  1581. }}
  1582. ref="commodityPrice"
  1583. />
  1584. <span className="mandatory">*</span>
  1585. </FormItem>
  1586. <FormItem
  1587. className="half-item"
  1588. {...formItemLayout}
  1589. label="主要业务"
  1590. >
  1591. <Select
  1592. placeholder="选择是否为主要业务"
  1593. style={{ width: "200px" }}
  1594. value={this.state.main}
  1595. onChange={e => {
  1596. this.setState({ main: e });
  1597. }}
  1598. >
  1599. {boutique.map(function(item) {
  1600. return (
  1601. <Select.Option key={item.value}>
  1602. {item.key}
  1603. </Select.Option>
  1604. );
  1605. })}
  1606. </Select>
  1607. <span className="mandatory">*</span>
  1608. </FormItem>
  1609. <div className="clearfix">
  1610. <FormItem
  1611. labelCol={{ span: 4 }}
  1612. wrapperCol={{ span: 16 }}
  1613. label="服务说明"
  1614. >
  1615. <Input
  1616. type="textarea"
  1617. placeholder="请输入服务说明"
  1618. value={this.state.taskComment}
  1619. onChange={e => {
  1620. this.setState({ taskComment: e.target.value });
  1621. }}
  1622. />
  1623. </FormItem>
  1624. </div>
  1625. <FormItem
  1626. wrapperCol={{ span: 12, offset: 4 }}
  1627. className="half-middle"
  1628. >
  1629. <Button
  1630. className="submitSave"
  1631. type="primary"
  1632. htmlType="submit"
  1633. >
  1634. 保存
  1635. </Button>
  1636. <Button
  1637. className="submitSave"
  1638. type="ghost"
  1639. onClick={this.nextCancel}
  1640. >
  1641. 取消
  1642. </Button>
  1643. </FormItem>
  1644. </div>
  1645. </Spin>
  1646. </Form>
  1647. </Modal>
  1648. <Modal
  1649. maskClosable={false}
  1650. visible={this.state.noVisible}
  1651. onOk={this.noCancel}
  1652. onCancel={this.noCancel}
  1653. width="400px"
  1654. title={"驳回理由"}
  1655. footer=""
  1656. className="admin-desc-content"
  1657. >
  1658. <Form layout="horizontal" id="demand-form">
  1659. <Spin spinning={this.state.loading}>
  1660. <div className="clearfix">
  1661. <FormItem
  1662. labelCol={{ span: 4 }}
  1663. wrapperCol={{ span: 16 }}
  1664. label="拒绝理由"
  1665. >
  1666. <Input
  1667. type="textarea"
  1668. placeholder="请输入拒绝理由"
  1669. rows={4}
  1670. value={this.state.reason}
  1671. onChange={e => {
  1672. this.setState({ reason: e.target.value });
  1673. }}
  1674. />
  1675. </FormItem>
  1676. </div>
  1677. <div className="clearfix">
  1678. <Button
  1679. className="cancel"
  1680. type="primary"
  1681. onClick={this.examOks}
  1682. style={{ marginLeft: "50px" }}
  1683. htmlType="submit"
  1684. >
  1685. 确定
  1686. </Button>
  1687. <Button
  1688. className="cancel"
  1689. type="ghost"
  1690. onClick={this.noCancel}
  1691. style={{ marginLeft: "50px" }}
  1692. >
  1693. 取消
  1694. </Button>
  1695. </div>
  1696. </Spin>
  1697. </Form>
  1698. </Modal>
  1699. <Modal
  1700. visible={this.state.rizhivisible}
  1701. className="admin-desc-content"
  1702. width="800px"
  1703. maskClosable={false}
  1704. title="订单日志"
  1705. footer={null}
  1706. onCancel={this.closeOrderLog}
  1707. >
  1708. <div className="patent-table">
  1709. <Spin spinning={this.state.loading}>
  1710. <Table
  1711. columns={this.state.columnsrizhi}
  1712. dataSource={this.state.dataSourcerizhi}
  1713. pagination={false}
  1714. />
  1715. </Spin>
  1716. </div>
  1717. </Modal>
  1718. </div>
  1719. );
  1720. }
  1721. })
  1722. export default zxsglyOutSourcingPaiDan;