addService.jsx 203 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624
  1. import React from "react";
  2. import {
  3. Table,
  4. Modal,
  5. message,
  6. Spin,
  7. Input,
  8. Select,
  9. Button,
  10. Form,
  11. Upload,
  12. Popconfirm,
  13. AutoComplete,
  14. DatePicker,
  15. Col,
  16. Tabs,
  17. Tag
  18. } from "antd";
  19. import $ from "jquery/src/ajax";
  20. import "../userMangagement.less";
  21. import "../billing.less";
  22. import moment from "moment";
  23. import Picture from "@/manageCenter/publicComponent/picture";
  24. import OrderRiZi from "@/orderRiZi.jsx";
  25. import {
  26. orderTypes,
  27. customerType,
  28. jiedian,
  29. tepi,
  30. boutique,
  31. } from "../../../dataDic.js";
  32. import {
  33. splitUrl,
  34. getProcessStatus,
  35. getLiquidationStatus,
  36. getboutique,
  37. getApprovedState,
  38. getjiedian,
  39. getCuikuan,
  40. getProjectStatus,
  41. moneyVerify,
  42. getProcessStatusNew
  43. } from "../../../tools.js";
  44. import { cuiJieDian } from "@/dataDic.js"
  45. import PicturesWall from "./changeComponent/picturesWall.js";
  46. import { changeType, getChangeType } from "./changeComponent/changeDetailYxgly";
  47. // const Options = Select.Option;
  48. const Option = AutoComplete.Option;
  49. const confirm = Modal.confirm;
  50. const NewService = Form.create()(
  51. React.createClass({
  52. //查看项目列表
  53. loadData(record) {
  54. this.state.data = [];
  55. this.setState({
  56. loading: true
  57. });
  58. $.ajax({
  59. method: "get",
  60. dataType: "json",
  61. crossDomain: false,
  62. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  63. data: {
  64. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  65. },
  66. success: function (data) {
  67. let theArr = [];
  68. if (!data.data) {
  69. if (data.error && data.error.length) {
  70. message.warning(data.error[0].message);
  71. }
  72. } else {
  73. for (let i = 0; i < data.data.length; i++) {
  74. let thisdata = data.data[i];
  75. theArr.push({
  76. key: i,
  77. id: thisdata.id,
  78. orderNo: thisdata.orderNo, //订单编号
  79. commodityId: thisdata.commodityId, //项目ID
  80. commodityName: thisdata.commodityName, //项目名称
  81. cname: thisdata.cname, //项目类别
  82. commodityPrice: thisdata.commodityPrice, //项目价格
  83. commodityQuantity: thisdata.commodityQuantity, //项目数量
  84. main: thisdata.main, //是否为主要任务
  85. taskComment: thisdata.taskComment, //任务说明
  86. contacts: thisdata.contacts, //联系人
  87. contactsMobile: thisdata.contactsMobile, //联系人电话
  88. projectStatus: thisdata.projectStatus, //项目状态
  89. sort: thisdata.cSort
  90. });
  91. }
  92. }
  93. this.departmentList();
  94. this.setState({
  95. dataSource: theArr,
  96. pagination: false,
  97. // 禁用变更类型
  98. changeFlag: false
  99. });
  100. }.bind(this)
  101. }).always(
  102. function () {
  103. this.setState({
  104. loading: false
  105. });
  106. }.bind(this)
  107. );
  108. },
  109. //收款节点
  110. loadDatas(record) {
  111. this.state.data = [];
  112. this.setState({
  113. loading: true
  114. });
  115. $.ajax({
  116. method: "get",
  117. dataType: "json",
  118. crossDomain: false,
  119. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  120. data: {
  121. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  122. },
  123. success: function (data) {
  124. let theArr = [];
  125. if (!data.data) {
  126. if (data.error && data.error.length) {
  127. message.warning(data.error[0].message);
  128. }
  129. } else {
  130. for (let i = 0; i < data.data.length; i++) {
  131. let thisdata = data.data[i];
  132. theArr.push({
  133. key: i,
  134. id: thisdata.id
  135. });
  136. }
  137. }
  138. this.setState({
  139. dataSource: theArr,
  140. pagination: false
  141. });
  142. }.bind(this)
  143. }).always(
  144. function () {
  145. this.setState({
  146. loading: false
  147. });
  148. }.bind(this)
  149. );
  150. },
  151. getInitialState() {
  152. return {
  153. isCaoGao: false,
  154. cuiFlag: false,
  155. startRemarks: "",
  156. remarksC: "",
  157. loading: false,
  158. visible: false,
  159. cuiDataSource: [],
  160. status: 4,
  161. orgCodeUrl: [],
  162. voucherUrl: [],
  163. customerArr: [],
  164. // 禁用变更类型转换
  165. changeFlag: false,
  166. // 合同额禁用
  167. hetongFlag: true,
  168. // 项目及催款禁用
  169. listFlag: true,
  170. mark: false,
  171. activeKey: "1",
  172. typeChange: [],
  173. bussStats: false,
  174. checkedKeys: [],
  175. lookflowList: [],
  176. contractUrl: [],
  177. applicationUrl: [],
  178. changeAmount: "0",
  179. active: {
  180. applySign: false
  181. },
  182. lookState: false,
  183. signBillVisible: false,
  184. commod: "",
  185. columns: [
  186. {
  187. title: "业务项目名称",
  188. dataIndex: "commodityName",
  189. key: "commodityName"
  190. },
  191. {
  192. title: "项目类别",
  193. dataIndex: "cname",
  194. key: "cname"
  195. },
  196. {
  197. title: "项目数量",
  198. dataIndex: "commodityQuantity",
  199. key: "commodityQuantity"
  200. },
  201. {
  202. title: "金额(万元)",
  203. dataIndex: "commodityPrice",
  204. key: "commodityPrice"
  205. },
  206. {
  207. title: "负责人",
  208. dataIndex: "contacts",
  209. key: "contacts"
  210. },
  211. {
  212. title: "负责人电话",
  213. dataIndex: "contactsMobile",
  214. key: "contactsMobile"
  215. },
  216. {
  217. title: "项目状态",
  218. dataIndex: "projectStatus",
  219. key: "projectStatus",
  220. render: text => {
  221. return getProjectStatus(text);
  222. }
  223. },
  224. {
  225. title: "主要项目",
  226. dataIndex: "main",
  227. key: "main",
  228. render: text => {
  229. return text ? "是" : "否";
  230. }
  231. },
  232. {
  233. title: "项目说明",
  234. dataIndex: "taskComment",
  235. key: "taskComment",
  236. render: text => {
  237. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  238. }
  239. },
  240. {
  241. title: "操作",
  242. dataIndex: "ABC",
  243. key: "ABC",
  244. render: (text, record) => {
  245. return (
  246. <div>
  247. {this.state.processStatus == 0 ? (
  248. <Button
  249. onClick={e => {
  250. e.stopPropagation();
  251. this.showConfirm(this.delectRow, record);
  252. }}
  253. >
  254. 删除
  255. </Button>
  256. ) : (
  257. ""
  258. )}
  259. </div>
  260. );
  261. }
  262. }
  263. ],
  264. proColumns: [
  265. {
  266. title: "变更状态",
  267. dataIndex: "type",
  268. key: "type",
  269. render: (text, record) => {
  270. let str = "";
  271. let color = "";
  272. if (text == 1) {
  273. str = "增";
  274. color = "#87d068";
  275. } else if (text == 2) {
  276. str = "改";
  277. color = "#108ee9";
  278. } else if (text == 3) {
  279. str = "删";
  280. color = "#f50";
  281. }
  282. return (
  283. <span>
  284. <Tag
  285. color={color}
  286. style={{ display: text == 0 ? "none" : "inline-block" }}
  287. >
  288. {str}
  289. </Tag>
  290. {record.splitStatus == 1 ? (
  291. <Tag color="#108ee9">父项目</Tag>
  292. ) : (
  293. ""
  294. )}
  295. {record.splitStatus == 2 ? (
  296. <Tag color="#108ee9">子项目</Tag>
  297. ) : (
  298. ""
  299. )}
  300. </span>
  301. );
  302. }
  303. },
  304. {
  305. title: "业务项目名称",
  306. dataIndex: "commodityName",
  307. key: "commodityName"
  308. },
  309. {
  310. title: "项目类别",
  311. dataIndex: "cname",
  312. key: "cname"
  313. },
  314. {
  315. title: "项目数量",
  316. dataIndex: "commodityQuantity",
  317. key: "commodityQuantity"
  318. },
  319. {
  320. title: "金额(万元)",
  321. dataIndex: "commodityPrice",
  322. key: "commodityPrice"
  323. },
  324. {
  325. title: "主要项目",
  326. dataIndex: "main",
  327. key: "main",
  328. render: text => {
  329. return text ? "是" : "否";
  330. }
  331. },
  332. {
  333. title: "项目说明",
  334. dataIndex: "taskComment",
  335. key: "taskComment",
  336. render: text => {
  337. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  338. }
  339. },
  340. {
  341. title: "操作",
  342. dataIndex: "ABC",
  343. key: "ABC",
  344. render: (text, record) => {
  345. return (
  346. <div>
  347. <Button
  348. onClick={e => {
  349. e.stopPropagation();
  350. this.showConfirm(this.changeDeletePro, record);
  351. }}
  352. disabled={this.state.listFlag}
  353. style={{
  354. display: this.state.displayList ? "none" : "block"
  355. }}
  356. >
  357. 删除
  358. </Button>
  359. </div>
  360. );
  361. }
  362. }
  363. ],
  364. detailColumns: [
  365. {
  366. title: "变更状态",
  367. dataIndex: "type",
  368. key: "type",
  369. render: (text, record) => {
  370. let str = "";
  371. let color = "";
  372. if (text == 1) {
  373. str = "增";
  374. color = "#87d068";
  375. } else if (text == 2) {
  376. str = "改";
  377. color = "#108ee9";
  378. } else if (text == 3) {
  379. str = "删";
  380. color = "#f50";
  381. }
  382. return (
  383. <span>
  384. <Tag
  385. color={color}
  386. style={{ display: text == 0 ? "none" : "inline-block" }}
  387. >
  388. {str}
  389. </Tag>
  390. {record.splitStatus == 1 ? (
  391. <Tag
  392. color="#108ee9"
  393. >
  394. 父项目
  395. </Tag>
  396. ) : (
  397. ""
  398. )}
  399. {record.splitStatus == 2 ? (
  400. <Tag
  401. color="#108ee9"
  402. >
  403. 子项目
  404. </Tag>
  405. ) : (
  406. ""
  407. )}
  408. </span>
  409. );
  410. }
  411. },
  412. {
  413. title: "业务项目名称",
  414. dataIndex: "commodityName",
  415. key: "commodityName"
  416. // render: (text, record) => {
  417. // let str = "";
  418. // let color = "";
  419. // if (record.type == 1) {
  420. // str = "增";
  421. // color = "#87d068";
  422. // } else if (record.type == 2) {
  423. // str = "改";
  424. // color = "#108ee9";
  425. // } else if (record.type == 3) {
  426. // str = "删";
  427. // color = "#f50";
  428. // }
  429. // if (record.type == 0) {
  430. // return <span>{text}</span>;
  431. // } else {
  432. // return (
  433. // <span>
  434. // <Tag color={color}>{str}</Tag>
  435. // {text}
  436. // </span>
  437. // );
  438. // }
  439. // }
  440. },
  441. {
  442. title: "项目类别",
  443. dataIndex: "cname",
  444. key: "cname"
  445. },
  446. {
  447. title: "项目数量",
  448. dataIndex: "commodityQuantity",
  449. key: "commodityQuantity"
  450. },
  451. {
  452. title: "金额(万元)",
  453. dataIndex: "commodityPrice",
  454. key: "commodityPrice",
  455. render: text => {
  456. if (this.props.isZxs) {
  457. return <span>***</span>;
  458. } else {
  459. return <span>{text}</span>;
  460. }
  461. }
  462. },
  463. {
  464. title: "主要项目",
  465. dataIndex: "main",
  466. key: "main",
  467. render: text => {
  468. return text ? "是" : "否";
  469. }
  470. },
  471. {
  472. title: "项目说明",
  473. dataIndex: "taskComment",
  474. key: "taskComment",
  475. render: text => {
  476. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  477. }
  478. }
  479. ],
  480. detailContactsLists: [
  481. {
  482. title: "变更状态",
  483. dataIndex: "type",
  484. key: "type",
  485. render: text => {
  486. let str = "";
  487. let color = "";
  488. if (text == 1) {
  489. str = "增";
  490. color = "#87d068";
  491. } else if (text == 2) {
  492. str = "改";
  493. color = "#108ee9";
  494. } else if (text == 3) {
  495. str = "删";
  496. color = "#f50";
  497. }
  498. return (
  499. <Tag
  500. color={color}
  501. style={{ display: text == 0 ? "none" : "inline-block" }}
  502. >
  503. {str}
  504. </Tag>
  505. );
  506. }
  507. },
  508. {
  509. title: "项目名称",
  510. dataIndex: "commodityName",
  511. key: "commodityName"
  512. // render: (text, record) => {
  513. // let str = "";
  514. // let color = "";
  515. // if (record.type == 1) {
  516. // str = "增";
  517. // color = "#87d068";
  518. // } else if (record.type == 2) {
  519. // str = "改";
  520. // color = "#108ee9";
  521. // } else if (record.type == 3) {
  522. // str = "删";
  523. // color = "#f50";
  524. // }
  525. // if (record.type == 0) {
  526. // return <span>{text}</span>;
  527. // } else {
  528. // return (
  529. // <span>
  530. // <Tag color={color}>{str}</Tag>
  531. // {text}
  532. // </span>
  533. // );
  534. // }
  535. // }
  536. },
  537. {
  538. title: "项目分类",
  539. dataIndex: "projectType",
  540. key: "projectType",
  541. render: text => {
  542. let arr = this.state.proDataSource || [];
  543. let str = "";
  544. for (let i = 0; i < arr.length; i++) {
  545. if (this.state.proDataSource[i].cSort == text) {
  546. str = this.state.proDataSource[i].cname;
  547. return <span>{str}</span>;
  548. }
  549. }
  550. }
  551. },
  552. {
  553. title: "催款科目",
  554. dataIndex: "dunTypeName",
  555. key: "dunTypeName",
  556. render: text => {
  557. return <span>{text}</span>;
  558. }
  559. },
  560. {
  561. title: "时间",
  562. dataIndex: "waitDay",
  563. key: "waitDay",
  564. render: (text, record) => {
  565. if (record.dunTypeName) {
  566. return <span>{text}</span>;
  567. }
  568. }
  569. },
  570. {
  571. title: "金额(万元)",
  572. dataIndex: "money",
  573. key: "money",
  574. render: (text, record) => {
  575. if (record.dunTypeName) {
  576. if (record.appropriationRatio && !record.money) {
  577. return <span>{record.appropriationRatio}(拨款比例)</span>;
  578. } else if (record.appropriationRatio && record.money) {
  579. return (
  580. <span>
  581. {text}(比例:{record.appropriationRatio})
  582. </span>
  583. );
  584. } else {
  585. if (this.props.isZxs) {
  586. return <span>***</span>;
  587. }
  588. return <span>{text}</span>;
  589. }
  590. }
  591. }
  592. },
  593. {
  594. title: "服务年限",
  595. dataIndex: "startDate",
  596. key: "startDate",
  597. render: (text, record) => {
  598. if (record.dunTypeName) {
  599. return <span>{text}</span>;
  600. }
  601. }
  602. },
  603. {
  604. title: "催款状态",
  605. dataIndex: "status",
  606. key: "status",
  607. render: text => {
  608. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  609. }
  610. }
  611. ],
  612. columnsrizhi: [
  613. {
  614. title: "流程",
  615. dataIndex: "processName",
  616. key: "processName"
  617. },
  618. {
  619. title: "操作人",
  620. dataIndex: "adminName",
  621. key: "adminName"
  622. },
  623. {
  624. title: "时间",
  625. dataIndex: "createDate",
  626. key: "createDate"
  627. }
  628. ],
  629. contactList: [],
  630. loading: false,
  631. ContactsLists: [
  632. {
  633. title: "催款科目",
  634. dataIndex: "dunSubject",
  635. key: "dunSubject",
  636. render: (text, record) => {
  637. return (
  638. <Select
  639. placeholder="请选择催款科目"
  640. value={record.dunSubject}
  641. style={{ width: "150px" }}
  642. disabled
  643. onChange={e => {
  644. record.dunSubject = e;
  645. this.setState({ contactList: this.state.contactList });
  646. }}
  647. >
  648. {jiedian.map(function(item) {
  649. return (
  650. <Select.Option key={item.value}>{item.key}</Select.Option>
  651. );
  652. })}
  653. </Select>
  654. );
  655. }
  656. },
  657. {
  658. title: "金额(万元)",
  659. dataIndex: "money",
  660. key: "money",
  661. render: (text, record) => {
  662. return (
  663. <Input
  664. value={record.money}
  665. placeholder="请输入金额(必填项)"
  666. disabled
  667. key={record.id}
  668. required="required"
  669. onChange={e => {
  670. record.money = e.target.value;
  671. this.setState({ contactList: this.state.contactList });
  672. }}
  673. style={{ width: "120px" }}
  674. />
  675. );
  676. }
  677. },
  678. {
  679. title: "催款状态",
  680. dataIndex: "dunStatus",
  681. key: "dunStatus",
  682. render: text => {
  683. return getCuikuan(text);
  684. }
  685. },
  686. {
  687. title: "操作",
  688. dataIndex: "dels",
  689. key: "dels",
  690. render: (text, record) => {
  691. return (
  692. <div>
  693. {
  694. <Popconfirm
  695. title="是否删除?"
  696. onConfirm={() => {
  697. this.confirmDelet(record.key);
  698. }}
  699. okText="删除"
  700. cancelText="不删除"
  701. >
  702. <Button
  703. style={{
  704. marginRight: "10px",
  705. color: "#ffffff",
  706. background: "#f00",
  707. border: "none",
  708. display:
  709. this.state.processStatus == 0 ? "block" : "none"
  710. }}
  711. >
  712. 删除
  713. </Button>
  714. </Popconfirm>
  715. }
  716. {record.id ? (
  717. ""
  718. ) : (
  719. <Button type="primary" onClick={this.contactSave}>
  720. 保存
  721. </Button>
  722. )}
  723. </div>
  724. );
  725. }
  726. }
  727. ],
  728. ContactsListsNew: [
  729. {
  730. title: "项目名称",
  731. dataIndex: "commodityName",
  732. key: "commodityName",
  733. render: (text, record, index) => {
  734. let dataArr = this.state.dataSource || [];
  735. if (text) {
  736. return <span>{text}</span>;
  737. }
  738. return (
  739. <Select
  740. placeholder="请选择名称"
  741. style={{ width: "150px" }}
  742. disabled={
  743. this.state.getLoad && record.sortName ? true : false
  744. }
  745. onChange={e => {
  746. record.sortName = e;
  747. dataArr.forEach(item => {
  748. if (item.commodityName == record.sortName) {
  749. record.cname = item.cname;
  750. record.tid = item.id;
  751. record.isSave = true;
  752. record.sort = item.sort;
  753. cuiJieDian.forEach(item => {
  754. if (item.value == record.sort) {
  755. record.arr = item.children;
  756. let yearFlag = true;
  757. if (record.sort == 6) {
  758. yearFlag = false;
  759. }
  760. this.setState({
  761. getLoad: true,
  762. yearFlag
  763. });
  764. }
  765. });
  766. }
  767. });
  768. }}
  769. >
  770. {dataArr.map(item => {
  771. return (
  772. <Select.Option key={item.id} value={item.commodityName}>
  773. {item.commodityName}
  774. </Select.Option>
  775. );
  776. })}
  777. </Select>
  778. );
  779. }
  780. },
  781. {
  782. title: "项目分类",
  783. dataIndex: "projectType",
  784. key: "projectType",
  785. render: (text, record) => {
  786. if (text) {
  787. let arr = this.state.dataSource || [];
  788. let str = "";
  789. for (let i = 0; i < arr.length; i++) {
  790. if (this.state.dataSource[i].sort == text) {
  791. str = this.state.dataSource[i].cname;
  792. return <span>{str}</span>;
  793. }
  794. }
  795. }
  796. if (this.state.getLoad) {
  797. return (
  798. <Select
  799. style={{ width: "150px" }}
  800. placeholder="请选择分类"
  801. value={record.cname}
  802. >
  803. <Select.Option key={record.sort} value={record.cname}>
  804. {record.cname}
  805. </Select.Option>
  806. </Select>
  807. );
  808. } else {
  809. return (
  810. <Select style={{ width: "150px" }} placeholder="请选择分类">
  811. <Select.Option key={record.sort} value={record.cname}>
  812. {record.cname}
  813. </Select.Option>
  814. </Select>
  815. );
  816. }
  817. }
  818. },
  819. {
  820. title: "催款科目",
  821. dataIndex: "dunTypeName",
  822. key: "dunTypeName",
  823. render: (text, record) => {
  824. if (text) {
  825. return <span>{text}</span>;
  826. }
  827. if (this.state.getLoad) {
  828. let arr = record.arr || [];
  829. return (
  830. <Select
  831. style={{ width: "150px" }}
  832. placeholder="请选择分类"
  833. onChange={e => {
  834. record.dunType = e;
  835. if (e != 1) {
  836. this.setState({
  837. timeFlag: true
  838. });
  839. } else {
  840. this.setState({
  841. timeFlag: false
  842. });
  843. }
  844. if (e == 1 && record.sort == 6) {
  845. this.setState({
  846. yearFlag: true
  847. });
  848. } else if (e != 1 && record.sort == 6) {
  849. this.setState({
  850. yearFlag: false
  851. });
  852. }
  853. if (record.sort == 3 && e == 3) {
  854. this.setState({
  855. boFlag: true
  856. });
  857. } else {
  858. this.setState({
  859. boFlag: false
  860. });
  861. }
  862. }}
  863. >
  864. {arr.map(item => {
  865. record;
  866. return (
  867. <Select.Option key={item.value} value={item.value}>
  868. {item.key}
  869. </Select.Option>
  870. );
  871. })}
  872. </Select>
  873. );
  874. } else {
  875. return (
  876. <Select style={{ width: "150px" }} placeholder="请选择分类">
  877. <Select.Option
  878. key={0}
  879. value={"请选择上一项"}
  880. ></Select.Option>
  881. </Select>
  882. );
  883. }
  884. }
  885. },
  886. {
  887. title: "首付时间(特批需选择时间)",
  888. dataIndex: "waitDay",
  889. key: "waitDay",
  890. render: (text, record) => {
  891. if (record.dunTypeName) {
  892. if (text == 0) {
  893. var str = "当天";
  894. } else if (!text) {
  895. var str = "";
  896. } else {
  897. var str = text + "天";
  898. }
  899. return <span>{str}</span>;
  900. }
  901. return (
  902. <Select
  903. placeholder="请选择时间"
  904. style={{ width: "150px" }}
  905. disabled={
  906. this.state.approval != 0 && !this.state.timeFlag
  907. ? false
  908. : true
  909. }
  910. onChange={e => {
  911. record.waitDay = e;
  912. }}
  913. >
  914. <Select.Option key={0}>当天</Select.Option>
  915. <Select.Option key={3}>3天</Select.Option>
  916. <Select.Option key={5}>5天</Select.Option>
  917. <Select.Option key={7}>7天</Select.Option>
  918. <Select.Option key={15}>15天</Select.Option>
  919. </Select>
  920. );
  921. }
  922. },
  923. {
  924. title: "金额(万元)",
  925. dataIndex: "money",
  926. key: "money",
  927. render: (text, record) => {
  928. if (record.dunTypeName) {
  929. if (record.appropriationRatio && !record.money) {
  930. return <span>{record.appropriationRatio}(拨款比例)</span>;
  931. } else if (record.appropriationRatio && record.money) {
  932. return (
  933. <span>
  934. {text}(比例:{record.appropriationRatio})
  935. </span>
  936. );
  937. } else {
  938. return <span>{text}</span>;
  939. }
  940. }
  941. if (this.state.boFlag) {
  942. return (
  943. <div>
  944. <div style={{ width: 70, float: "left", marginRight: 5 }}>
  945. <Select
  946. placeholder="选择"
  947. defaultValue={"金额"}
  948. onChange={e => {
  949. record.boStatus = e;
  950. }}
  951. >
  952. <Select.Option key={true}>比例</Select.Option>
  953. <Select.Option key={false}>金额</Select.Option>
  954. </Select>
  955. </div>
  956. <div style={{ float: "right" }}>
  957. <Input
  958. value={record.money}
  959. placeholder="请根据左侧类型填写"
  960. key={record.id}
  961. required="required"
  962. onChange={e => {
  963. record.money = e.target.value;
  964. this.setState({
  965. contactList: this.state.contactList
  966. });
  967. }}
  968. style={{ width: "120px" }}
  969. />
  970. </div>
  971. </div>
  972. );
  973. } else {
  974. return (
  975. <div>
  976. <Input
  977. value={record.money}
  978. placeholder="请输入金额(必填项)"
  979. key={record.id}
  980. required="required"
  981. onChange={e => {
  982. record.money = e.target.value;
  983. this.setState({ contactList: this.state.contactList });
  984. }}
  985. style={{ width: "120px" }}
  986. />
  987. </div>
  988. );
  989. }
  990. }
  991. },
  992. {
  993. title: "服务年限",
  994. dataIndex: "startDate",
  995. key: "startDate",
  996. render: (text, record) => {
  997. if (record.dunTypeName) {
  998. return <span>{text}</span>;
  999. }
  1000. return (
  1001. <Select
  1002. placeholder="请选择年限"
  1003. style={{ width: "150px" }}
  1004. disabled={this.state.yearFlag ? true : false}
  1005. onChange={e => {
  1006. record.effectiveCount = e;
  1007. }}
  1008. >
  1009. {/* <Select.Option key={null}>无</Select.Option> */}
  1010. <Select.Option key={1}>一年</Select.Option>
  1011. <Select.Option key={3}>两年</Select.Option>
  1012. <Select.Option key={5}>三年</Select.Option>
  1013. <Select.Option key={7}>四年</Select.Option>
  1014. <Select.Option key={9}>五年</Select.Option>
  1015. </Select>
  1016. );
  1017. }
  1018. },
  1019. {
  1020. title: "催款状态",
  1021. dataIndex: "status",
  1022. key: "status",
  1023. render: text => {
  1024. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  1025. }
  1026. },
  1027. {
  1028. title: "操作",
  1029. dataIndex: "dels",
  1030. key: "dels",
  1031. render: (text, record, index) => {
  1032. return (
  1033. <div>
  1034. {this.state.processStatus == 0 ? (
  1035. <Popconfirm
  1036. title="是否删除?"
  1037. onConfirm={() => {
  1038. this.confirmDeletNew(record);
  1039. }}
  1040. okText="删除"
  1041. cancelText="不删除"
  1042. >
  1043. <Button
  1044. style={{
  1045. marginRight: "10px",
  1046. color: "#ffffff",
  1047. background: "#f00",
  1048. border: "none"
  1049. }}
  1050. >
  1051. 删除
  1052. </Button>
  1053. </Popconfirm>
  1054. ) : (
  1055. ""
  1056. )}
  1057. {record.isSave ? (
  1058. <Button
  1059. type="primary"
  1060. onClick={e => {
  1061. this.contactSaveNew(record);
  1062. }}
  1063. >
  1064. 保存
  1065. </Button>
  1066. ) : (
  1067. ""
  1068. )}
  1069. </div>
  1070. );
  1071. }
  1072. }
  1073. ],
  1074. changeCuiList: [
  1075. {
  1076. title: "变更状态",
  1077. dataIndex: "type",
  1078. key: "type",
  1079. render: text => {
  1080. let str = "";
  1081. let color = "";
  1082. if (text == 1) {
  1083. str = "增";
  1084. color = "#87d068";
  1085. } else if (text == 2) {
  1086. str = "改";
  1087. color = "#108ee9";
  1088. } else if (text == 3) {
  1089. str = "删";
  1090. color = "#f50";
  1091. }
  1092. return (
  1093. <Tag
  1094. color={color}
  1095. style={{ display: text == 0 ? "none" : "inline-block" }}
  1096. >
  1097. {str}
  1098. </Tag>
  1099. );
  1100. }
  1101. },
  1102. {
  1103. title: "项目名称",
  1104. dataIndex: "commodityName",
  1105. key: "commodityName",
  1106. render: (text, record, index) => {
  1107. let dataArr = this.state.proDataSource || [];
  1108. if (text) {
  1109. return <span>{text}</span>;
  1110. }
  1111. return (
  1112. <Select
  1113. placeholder="请选择名称"
  1114. style={{ width: "150px" }}
  1115. disabled={
  1116. this.state.getLoad && record.sortName ? true : false
  1117. }
  1118. onChange={e => {
  1119. record.sortName = e;
  1120. dataArr.forEach(item => {
  1121. if (item.commodityName == record.sortName) {
  1122. record.cname = item.cname;
  1123. record.ctid = item.id;
  1124. record.isSave = true;
  1125. record.sort = item.cSort;
  1126. cuiJieDian.forEach(item => {
  1127. if (item.value == record.sort) {
  1128. record.arr = item.children;
  1129. let yearFlag = true;
  1130. if (record.sort == 6) {
  1131. yearFlag = false;
  1132. }
  1133. this.setState({
  1134. getLoad: true,
  1135. yearFlag
  1136. });
  1137. }
  1138. });
  1139. }
  1140. });
  1141. }}
  1142. >
  1143. {dataArr.map(item => {
  1144. return (
  1145. <Select.Option key={item.id} value={item.commodityName}>
  1146. {item.commodityName}
  1147. </Select.Option>
  1148. );
  1149. })}
  1150. </Select>
  1151. );
  1152. }
  1153. },
  1154. {
  1155. title: "项目分类",
  1156. dataIndex: "projectType",
  1157. key: "projectType",
  1158. render: (text, record) => {
  1159. if (text) {
  1160. let arr = this.state.proDataSource || [];
  1161. let str = "";
  1162. for (let i = 0; i < arr.length; i++) {
  1163. if (this.state.proDataSource[i].cSort == text) {
  1164. str = this.state.proDataSource[i].cname;
  1165. return <span>{str}</span>;
  1166. }
  1167. }
  1168. }
  1169. if (this.state.getLoad) {
  1170. return (
  1171. <Select
  1172. style={{ width: "150px" }}
  1173. placeholder="请选择分类"
  1174. value={record.cname}
  1175. >
  1176. <Select.Option key={record.sort} value={record.cname}>
  1177. {record.cname}
  1178. </Select.Option>
  1179. </Select>
  1180. );
  1181. } else {
  1182. return (
  1183. <Select style={{ width: "150px" }} placeholder="请选择分类">
  1184. <Select.Option key={record.sort} value={record.cname}>
  1185. {record.cname}
  1186. </Select.Option>
  1187. </Select>
  1188. );
  1189. }
  1190. }
  1191. },
  1192. {
  1193. title: "催款科目",
  1194. dataIndex: "dunTypeName",
  1195. key: "dunTypeName",
  1196. render: (text, record) => {
  1197. if (text) {
  1198. return <span>{text}</span>;
  1199. }
  1200. if (this.state.getLoad) {
  1201. let arr = record.arr || [];
  1202. return (
  1203. <Select
  1204. style={{ width: "150px" }}
  1205. placeholder="请选择分类"
  1206. onChange={e => {
  1207. record.dunType = e;
  1208. if (e != 1) {
  1209. this.setState({
  1210. timeFlag: true
  1211. });
  1212. } else {
  1213. this.setState({
  1214. timeFlag: false
  1215. });
  1216. }
  1217. if (e == 1 && record.sort == 6) {
  1218. this.setState({
  1219. yearFlag: true
  1220. });
  1221. } else if (e != 1 && record.sort == 6) {
  1222. this.setState({
  1223. yearFlag: false
  1224. });
  1225. }
  1226. if (record.sort == 3 && e == 3) {
  1227. this.setState({
  1228. boFlag: true
  1229. });
  1230. } else {
  1231. this.setState({
  1232. boFlag: false
  1233. });
  1234. }
  1235. }}
  1236. >
  1237. {arr.map(item => {
  1238. record;
  1239. return (
  1240. <Select.Option key={item.value} value={item.value}>
  1241. {item.key}
  1242. </Select.Option>
  1243. );
  1244. })}
  1245. </Select>
  1246. );
  1247. } else {
  1248. return (
  1249. <Select style={{ width: "150px" }} placeholder="请选择分类">
  1250. <Select.Option
  1251. key={0}
  1252. value={"请选择上一项"}
  1253. ></Select.Option>
  1254. </Select>
  1255. );
  1256. }
  1257. }
  1258. },
  1259. {
  1260. title: "首付时间(特批需选择时间)",
  1261. dataIndex: "waitDay",
  1262. key: "waitDay",
  1263. render: (text, record) => {
  1264. if (record.dunTypeName) {
  1265. if (text == 0) {
  1266. var str = "当天";
  1267. } else if (!text) {
  1268. var str = "";
  1269. } else {
  1270. var str = text + "天";
  1271. }
  1272. return <span>{str}</span>;
  1273. }
  1274. return (
  1275. <Select
  1276. placeholder="请选择时间"
  1277. style={{ width: "150px" }}
  1278. disabled={
  1279. this.state.approval != 0 && !this.state.timeFlag
  1280. ? false
  1281. : true
  1282. }
  1283. onChange={e => {
  1284. record.waitDay = e;
  1285. }}
  1286. >
  1287. <Select.Option key={0}>当天</Select.Option>
  1288. <Select.Option key={3}>3天</Select.Option>
  1289. <Select.Option key={5}>5天</Select.Option>
  1290. <Select.Option key={7}>7天</Select.Option>
  1291. <Select.Option key={15}>15天</Select.Option>
  1292. </Select>
  1293. );
  1294. }
  1295. },
  1296. {
  1297. title: "金额(万元)",
  1298. dataIndex: "money",
  1299. key: "money",
  1300. render: (text, record) => {
  1301. if (record.dunTypeName) {
  1302. if (record.appropriationRatio && !record.money) {
  1303. return <span>{record.appropriationRatio}(拨款比例)</span>;
  1304. } else if (record.appropriationRatio && record.money) {
  1305. return (
  1306. <span>
  1307. {text}(比例:{record.appropriationRatio})
  1308. </span>
  1309. );
  1310. } else {
  1311. return <span>{text}</span>;
  1312. }
  1313. }
  1314. if (this.state.boFlag) {
  1315. return (
  1316. <div>
  1317. <div style={{ width: 70, float: "left", marginRight: 5 }}>
  1318. <Select
  1319. placeholder="选择"
  1320. defaultValue={"金额"}
  1321. onChange={e => {
  1322. record.boStatus = e;
  1323. }}
  1324. >
  1325. <Select.Option key={true}>比例</Select.Option>
  1326. <Select.Option key={false}>金额</Select.Option>
  1327. </Select>
  1328. </div>
  1329. <div style={{ float: "right" }}>
  1330. <Input
  1331. value={record.money}
  1332. placeholder="请根据左侧类型填写"
  1333. key={record.id}
  1334. required="required"
  1335. onChange={e => {
  1336. record.money = e.target.value;
  1337. this.setState({
  1338. contactList: this.state.contactList
  1339. });
  1340. }}
  1341. style={{ width: "120px" }}
  1342. />
  1343. </div>
  1344. </div>
  1345. );
  1346. } else {
  1347. return (
  1348. <div>
  1349. <Input
  1350. value={record.money}
  1351. placeholder="请输入金额(必填项)"
  1352. key={record.id}
  1353. required="required"
  1354. onChange={e => {
  1355. record.money = e.target.value;
  1356. this.setState({ contactList: this.state.contactList });
  1357. }}
  1358. style={{ width: "120px" }}
  1359. />
  1360. </div>
  1361. );
  1362. }
  1363. }
  1364. },
  1365. {
  1366. title: "服务年限",
  1367. dataIndex: "startDate",
  1368. key: "startDate",
  1369. render: (text, record) => {
  1370. if (record.dunTypeName) {
  1371. return <span>{text}</span>;
  1372. }
  1373. return (
  1374. <Select
  1375. placeholder="请选择年限"
  1376. style={{ width: "150px" }}
  1377. disabled={this.state.yearFlag ? true : false}
  1378. onChange={e => {
  1379. record.effectiveCount = e;
  1380. }}
  1381. >
  1382. {/* <Select.Option key={null}>无</Select.Option> */}
  1383. <Select.Option key={1}>一年</Select.Option>
  1384. <Select.Option key={3}>两年</Select.Option>
  1385. <Select.Option key={5}>三年</Select.Option>
  1386. <Select.Option key={7}>四年</Select.Option>
  1387. <Select.Option key={9}>五年</Select.Option>
  1388. </Select>
  1389. );
  1390. }
  1391. },
  1392. {
  1393. title: "催款状态",
  1394. dataIndex: "status",
  1395. key: "status",
  1396. render: text => {
  1397. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  1398. }
  1399. },
  1400. {
  1401. title: "操作",
  1402. dataIndex: "dels",
  1403. key: "dels",
  1404. render: (text, record, index) => {
  1405. return (
  1406. <div>
  1407. <Popconfirm
  1408. title="是否删除?"
  1409. onConfirm={() => {
  1410. this.changeDeleteCui(record);
  1411. }}
  1412. okText="删除"
  1413. cancelText="不删除"
  1414. >
  1415. <Button
  1416. disabled={this.state.listCuiFlag}
  1417. style={{
  1418. marginRight: "10px",
  1419. display: this.state.displayList ? "none" : "block"
  1420. }}
  1421. >
  1422. 删除
  1423. </Button>
  1424. </Popconfirm>
  1425. {record.isSave ? (
  1426. <Button
  1427. type="primary"
  1428. onClick={e => {
  1429. this.changeSaveCui(record);
  1430. }}
  1431. >
  1432. 保存
  1433. </Button>
  1434. ) : (
  1435. ""
  1436. )}
  1437. </div>
  1438. );
  1439. }
  1440. }
  1441. ]
  1442. };
  1443. },
  1444. departmentList() {
  1445. this.setState({
  1446. loading: true
  1447. });
  1448. $.ajax({
  1449. method: "get",
  1450. dataType: "json",
  1451. crossDomain: false,
  1452. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  1453. data: {},
  1454. success: function (data) {
  1455. let thedata = data.data;
  1456. let theArr = [];
  1457. if (!thedata) {
  1458. if (data.error && data.error.length) {
  1459. message.warning(data.error[0].message);
  1460. }
  1461. thedata = {};
  1462. } else {
  1463. thedata.map(function (item, index) {
  1464. theArr.push({
  1465. key: index,
  1466. name: item.name,
  1467. id: item.id,
  1468. depNo: item.depNo
  1469. });
  1470. });
  1471. }
  1472. this.setState({
  1473. departmentArr: theArr
  1474. });
  1475. }.bind(this)
  1476. }).always(
  1477. function () {
  1478. this.setState({
  1479. loading: false
  1480. });
  1481. }.bind(this)
  1482. );
  1483. },
  1484. //新建订单、编辑订单保存
  1485. handleSubmit(e) {
  1486. e.preventDefault();
  1487. let theorgCodeUrl = [];
  1488. if (this.state.orgCodeUrl.length) {
  1489. let picArr = [];
  1490. this.state.orgCodeUrl.map(function (item) {
  1491. if (
  1492. item.response &&
  1493. item.response.data &&
  1494. item.response.data.length
  1495. ) {
  1496. picArr.push(item.response.data);
  1497. }
  1498. });
  1499. theorgCodeUrl = picArr.join(",");
  1500. }
  1501. if (this.props.userDetaile) {
  1502. if (this.state.totalAmount === "") {
  1503. message.warning("签单金额不能为空");
  1504. this.refs.signFirstPayment.focus();
  1505. return false;
  1506. }
  1507. if (this.state.firstAmount === "") {
  1508. message.warning("首付金额不能为空");
  1509. this.refs.signFirstPayment.focus();
  1510. return false;
  1511. }
  1512. if (moneyVerify(this.state.firstAmount)) {
  1513. return;
  1514. }
  1515. if (moneyVerify(this.state.totalAmount)) {
  1516. return;
  1517. }
  1518. if (!theorgCodeUrl) {
  1519. message.warning("图片过大,上传失败");
  1520. this.refs.signFirstPayment.focus();
  1521. return false;
  1522. }
  1523. if (!this.state.signDate) {
  1524. message.warning("签单日期不能为空");
  1525. this.refs.signFirstPayment.focus();
  1526. return false;
  1527. }
  1528. if (!this.state.orderRemarks) {
  1529. message.warning("订单留言不能为空");
  1530. this.refs.signFirstPayment.focus();
  1531. return false;
  1532. }
  1533. } else {
  1534. }
  1535. const arr = this.state.contactListNew || [];
  1536. for (let i = 0; i < arr.length; i++) {
  1537. if (
  1538. arr[i].dunType == 1 &&
  1539. arr[i].waitDay != null &&
  1540. this.state.approval == 0
  1541. ) {
  1542. message.warning(
  1543. "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
  1544. );
  1545. return false;
  1546. } else if (
  1547. arr[i].dunType == 1 &&
  1548. arr[i].waitDay == null &&
  1549. this.state.approval == 1
  1550. ) {
  1551. message.warning(
  1552. "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
  1553. );
  1554. return false;
  1555. }
  1556. if (!this.state.contactListNew[i].id && this.props.userDetaile) {
  1557. message.warning("请保存催款节点");
  1558. return false;
  1559. }
  1560. }
  1561. this.setState({
  1562. loading: true
  1563. });
  1564. let api = this.props.userDetaile
  1565. ? "/api/admin/newOrder/updateServiceOrderNew"
  1566. : "/api/admin/newOrder/createOrder";
  1567. $.ajax({
  1568. method: "POST",
  1569. dataType: "json",
  1570. crossDomain: false,
  1571. url: globalConfig.context + api,
  1572. data: !this.props.userDetaile
  1573. ? {
  1574. uid: this.state.autoId,
  1575. orderType: this.state.orderType
  1576. }
  1577. : {
  1578. orderNo: this.state.orderNo, //订单编号
  1579. totalAmount: this.state.totalAmount, //总金额
  1580. firstAmount: this.state.firstAmount, //首付
  1581. isSubmit: this.state.isSubmit, //保存草稿还是提交
  1582. signDate: this.state.signDate, //签单日期
  1583. contacts: this.state.contacts, //企业负责人
  1584. contactMobile: this.state.contactMobile, //负责人联系方式
  1585. legalPerson: this.state.legalPerson, //企业法人
  1586. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  1587. approval: this.state.approval, //特批状态
  1588. orderRemarks: this.state.orderRemarks, //订单备注
  1589. contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  1590. orderDep: this.state.organizationSearch
  1591. }
  1592. }).done(
  1593. function (data) {
  1594. this.setState({
  1595. loading: false
  1596. });
  1597. if (!data.error.length) {
  1598. message.success("保存成功!");
  1599. this.handleOk();
  1600. if (this.state.autoId) {
  1601. this.loadData();
  1602. }
  1603. } else {
  1604. message.warning(data.error[0].message);
  1605. }
  1606. }.bind(this)
  1607. );
  1608. },
  1609. //订单详情修改
  1610. xiangqingClick(e) {
  1611. e.preventDefault();
  1612. this.setState({
  1613. loading: true
  1614. });
  1615. if (this.state.approval == 2 || this.state.approval == 3) {
  1616. message.warning("特批状态不正确");
  1617. this.setState({
  1618. loading: false
  1619. });
  1620. return;
  1621. }
  1622. $.ajax({
  1623. url: globalConfig.context + "/api/admin/newOrder/updateServiceOrderNew",
  1624. method: "post",
  1625. data: {
  1626. orderNo: this.state.orderNo, //订单编号
  1627. totalAmount: this.state.totalAmount, //总金额
  1628. firstAmount: this.state.firstAmount, //首付
  1629. isSubmit: this.state.isSubmit, //保存草稿还是提交
  1630. signDate: this.state.selTime, //签单日期
  1631. contacts: this.state.contacts, //企业负责人
  1632. contactMobile: this.state.contactMobile, //负责人联系方式
  1633. legalPerson: this.state.legalPerson, //企业法人
  1634. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  1635. approval: this.state.approval, //特批状态
  1636. orderRemarks: this.state.orderRemarks //订单备注
  1637. }
  1638. }).done(
  1639. function (data) {
  1640. this.setState({
  1641. loading: false
  1642. });
  1643. if (!data.error.length) {
  1644. message.success("保存成功!");
  1645. this.loaduser();
  1646. } else {
  1647. message.warning(data.error[0].message);
  1648. }
  1649. }.bind(this)
  1650. );
  1651. },
  1652. //查看基本详情基本信息
  1653. loaduser(record) {
  1654. this.state.orderList = [];
  1655. $.ajax({
  1656. method: "get",
  1657. dataType: "json",
  1658. crossDomain: false,
  1659. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  1660. data: {
  1661. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  1662. },
  1663. success: function (data) {
  1664. let thisData = data.data;
  1665. if (!thisData) {
  1666. if (data.error && data.error.length) {
  1667. message.warning(data.error[0].message);
  1668. }
  1669. thisData = {};
  1670. }
  1671. if (thisData.approval == 2) {
  1672. thisData.approval = "特批通过";
  1673. } else if (thisData.approval == 3) {
  1674. thisData.approval = "特批驳回";
  1675. }
  1676. this.setState({
  1677. id: thisData.id,
  1678. kehuId: thisData.buyerId,
  1679. orderNo: thisData.orderNo, //订单编号
  1680. orderType: thisData.orderType, //订单类型
  1681. firstAmount: thisData.firstAmount, //首付金额
  1682. totalAmount: thisData.totalAmount, //总金额
  1683. settlementAmount: thisData.settlementAmount, //结算金额
  1684. liquidationStatus: thisData.liquidationStatus, //清算状态
  1685. processStatus: thisData.processStatus, //流程状态
  1686. approval: thisData.approval.toString(), //特批状态
  1687. orderRemarks: thisData.orderRemarks, //订单备注
  1688. contractNo: thisData.contractNo, //合同编号
  1689. contacts: thisData.contacts, //联系人
  1690. contactMobile: thisData.contactMobile, //联系人电话
  1691. legalPerson: thisData.legalPerson, //法人
  1692. legalPersonTel: thisData.legalPersonTel, //法人电话
  1693. contractNo: thisData.contractNo, //合同编号
  1694. orgCodeUrl: thisData.contractPictureUrl
  1695. ? splitUrl(
  1696. thisData.contractPictureUrl,
  1697. ",",
  1698. globalConfig.avatarHost + "/upload"
  1699. )
  1700. : [], //图片地址
  1701. signDate: thisData.signDate, //签单时间
  1702. userName: thisData.userName, //客户名称
  1703. salesmanName: thisData.salesmanName, //营销员名称
  1704. salesmanMobile: thisData.salesmanMobile, //营销员电话
  1705. oldSalesmanName: thisData.oldSalesmanName, //营销员名称
  1706. oldSalesmanMobile: thisData.oldSalesmanMobile, //营销员电话
  1707. financeName: thisData.financeName, //财务名称
  1708. financeMobile: thisData.financeMobile, //财务电话
  1709. nowFinanceMobile: thisData.nowFinanceMobile,
  1710. nowFinance: thisData.nowFinance,
  1711. contractNo: thisData.contractNo, //合同编号
  1712. approval:
  1713. thisData.approval == 0
  1714. ? thisData.approval.toString()
  1715. : thisData.approval,
  1716. organizationSearch: thisData.orderDep,
  1717. depName: thisData.depName,
  1718. status: thisData.status,
  1719. outsource: thisData.outsource
  1720. });
  1721. // console.log("kkkk",this.state.processStatus);
  1722. }.bind(this)
  1723. }).always(
  1724. function () {
  1725. this.setState({
  1726. loading: false
  1727. });
  1728. }.bind(this)
  1729. );
  1730. },
  1731. //节点列表
  1732. jiedian(orderNos) {
  1733. $.ajax({
  1734. method: "get",
  1735. dataType: "json",
  1736. crossDomain: false,
  1737. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  1738. data: {
  1739. orderNo: orderNos
  1740. },
  1741. success: function (data) {
  1742. let theArr = [];
  1743. let thisData = [];
  1744. if (data.error.length || data.data.list == "") {
  1745. if (data.error && data.error.length) {
  1746. message.warning(data.error[0].message);
  1747. }
  1748. } else {
  1749. for (let i = 0; i < data.data.length; i++) {
  1750. thisData = data.data[i];
  1751. theArr.push({
  1752. key: i,
  1753. dunSubject: thisData.dunSubject
  1754. ? thisData.dunSubject.toString()
  1755. : "", //催款科目
  1756. id: thisData.id, //节点Id
  1757. money: thisData.money, //催款金额
  1758. dunStatus: thisData.dunStatus, //催款状态
  1759. orderNo: thisData.orderNo
  1760. });
  1761. }
  1762. this.setState({
  1763. contactList: theArr
  1764. });
  1765. }
  1766. }.bind(this)
  1767. }).always(
  1768. function () {
  1769. this.setState({
  1770. loading: false
  1771. });
  1772. }.bind(this)
  1773. );
  1774. },
  1775. //查看催款节点
  1776. jiedianNew(orderNos) {
  1777. $.ajax({
  1778. method: "get",
  1779. dataType: "json",
  1780. crossDomain: false,
  1781. url:
  1782. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  1783. data: {
  1784. orderNo: orderNos
  1785. },
  1786. success: function (data) {
  1787. if (data.error && data.error.length) {
  1788. message.warning(data.error[0].message);
  1789. } else {
  1790. let theArr = [];
  1791. let thisData = [];
  1792. let arr = data.data || [];
  1793. let totalCui = 0;
  1794. for (let i = 0; i < arr.length; i++) {
  1795. thisData = arr[i];
  1796. totalCui += +thisData.money;
  1797. theArr.push({
  1798. key: i,
  1799. dunSubject: thisData.dunSubject
  1800. ? thisData.dunSubject.toString()
  1801. : "", //催款科目
  1802. id: thisData.id, //节点Id
  1803. money: thisData.money, //催款金额
  1804. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  1805. commodityName: thisData.commodityName,
  1806. projectType: thisData.projectType,
  1807. dunTypeName: thisData.dunTypeName,
  1808. status: thisData.status,
  1809. waitDay: thisData.waitDay,
  1810. effectiveCount: thisData.effectiveCount,
  1811. startDate: thisData.startDate,
  1812. dunType: thisData.dunType,
  1813. appropriationRatio: thisData.appropriationRatio
  1814. });
  1815. }
  1816. if (!totalCui) {
  1817. totalCui = 0;
  1818. }
  1819. totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
  1820. this.setState({
  1821. contactListNew: theArr,
  1822. totalCui
  1823. });
  1824. }
  1825. }.bind(this)
  1826. }).always(
  1827. function () {
  1828. this.setState({
  1829. loading: false
  1830. });
  1831. }.bind(this)
  1832. );
  1833. },
  1834. //催款节点保存
  1835. contactSave(record) {
  1836. for (let i = 0; i < this.state.contactList.length; i++) {
  1837. if (moneyVerify(this.state.contactList[i].money)) {
  1838. return;
  1839. }
  1840. }
  1841. this.setState({
  1842. loading: true
  1843. });
  1844. $.ajax({
  1845. url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
  1846. method: "post",
  1847. data: {
  1848. orderNo: this.state.orderNo,
  1849. orderDun: JSON.stringify(this.state.contactList)
  1850. }
  1851. }).done(
  1852. function (data) {
  1853. this.setState({
  1854. loading: false
  1855. });
  1856. if (!data.error.length) {
  1857. message.success("保存成功!");
  1858. this.jiedian(record.orderNo);
  1859. } else {
  1860. message.warning(data.error[0].message);
  1861. }
  1862. }.bind(this)
  1863. );
  1864. },
  1865. //催款节点保存
  1866. contactSaveNew(record) {
  1867. if (record.boStatus == "false") {
  1868. record.boStatus = false;
  1869. } else if (record.boStatus == "true") {
  1870. record.boStatus = true;
  1871. }
  1872. if (!this.state.yearFlag) {
  1873. if (!record.effectiveCount) {
  1874. message.warning("请选择服务年限");
  1875. return;
  1876. }
  1877. } else {
  1878. record.effectiveCount = "";
  1879. }
  1880. if (record.money == "") {
  1881. message.warning("请填写金额");
  1882. return;
  1883. }
  1884. if (record.boStatus) {
  1885. if (
  1886. typeof +record.money == "number" &&
  1887. +record.money >= 0 &&
  1888. +record.money <= 1
  1889. ) {
  1890. record.appropriationRatio = record.money;
  1891. } else {
  1892. message.warning("金额比例填写错误,比例范围0~1");
  1893. return;
  1894. }
  1895. }
  1896. if (!record.dunType) {
  1897. message.warning("请选择对应科目");
  1898. return;
  1899. }
  1900. if (record.dunType != 1) {
  1901. record.waitDay = "";
  1902. }
  1903. this.setState({
  1904. loading: true
  1905. });
  1906. if (record.boStatus) {
  1907. $.ajax({
  1908. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  1909. method: "post",
  1910. data: {
  1911. orderNo: record.orderNo,
  1912. tid: record.tid,
  1913. projectType: record.sort,
  1914. dunType: record.dunType,
  1915. appropriationRatio: record.appropriationRatio,
  1916. waitDay: record.waitDay,
  1917. effectiveCount: record.effectiveCount
  1918. }
  1919. }).done(
  1920. function (data) {
  1921. this.setState({
  1922. loading: false
  1923. });
  1924. if (!data.error.length) {
  1925. message.success("保存成功!");
  1926. this.setState({
  1927. cuiFlag: false,
  1928. boFlag: false,
  1929. addFlag: false
  1930. });
  1931. this.jiedianNew(record.orderNo);
  1932. } else {
  1933. message.warning(data.error[0].message);
  1934. }
  1935. }.bind(this)
  1936. );
  1937. } else {
  1938. $.ajax({
  1939. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  1940. method: "post",
  1941. data: {
  1942. orderNo: record.orderNo,
  1943. tid: record.tid,
  1944. projectType: record.sort,
  1945. dunType: record.dunType,
  1946. money: record.money,
  1947. waitDay: record.waitDay,
  1948. effectiveCount: record.effectiveCount
  1949. }
  1950. }).done(
  1951. function (data) {
  1952. this.setState({
  1953. loading: false
  1954. });
  1955. if (!data.error.length) {
  1956. message.success("保存成功!");
  1957. this.setState({
  1958. cuiFlag: false,
  1959. boFlag: false,
  1960. addFlag: false
  1961. });
  1962. this.jiedianNew(record.orderNo);
  1963. } else {
  1964. message.warning(data.error[0].message);
  1965. }
  1966. }.bind(this)
  1967. );
  1968. }
  1969. },
  1970. //点击新增催款节点
  1971. addcontact() {
  1972. this.state.contactList.push({
  1973. key: this.state.contactList.length,
  1974. money: "",
  1975. dunSubject: undefined,
  1976. orderNo: this.state.orderNo,
  1977. dunTarget: this.state.kehuId
  1978. });
  1979. this.setState({
  1980. contactList: this.state.contactList
  1981. });
  1982. },
  1983. //点击新增催款节点
  1984. addcontactNew() {
  1985. this.state.contactListNew.push({
  1986. key: this.state.contactListNew.length,
  1987. money: "",
  1988. dunSubject: undefined,
  1989. orderNo: this.state.orderNo,
  1990. dunTarget: this.state.kehuId
  1991. });
  1992. this.setState({
  1993. contactListNew: this.state.contactListNew,
  1994. cuiFlag: true
  1995. });
  1996. },
  1997. //删除收款节点
  1998. confirmDelet(index) {
  1999. this.state.contactList.splice(index, 1);
  2000. this.setState({
  2001. contactList: this.state.contactList
  2002. });
  2003. this.contactSave();
  2004. },
  2005. //删除收款节点
  2006. confirmDeletNew(index) {
  2007. if (index.id) {
  2008. this.state.contactListNew.splice(index.id, 1);
  2009. this.setState({
  2010. contactListNew: this.state.contactListNew,
  2011. cuiFlag: false,
  2012. addFlag: false,
  2013. boFlag: false
  2014. });
  2015. $.ajax({
  2016. url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
  2017. method: "post",
  2018. data: {
  2019. id: index.id
  2020. }
  2021. }).done(
  2022. function (data) {
  2023. this.setState({
  2024. loading: false
  2025. });
  2026. if (!data.error.length) {
  2027. message.success("删除成功!");
  2028. this.setState({
  2029. cuiFlag: false
  2030. });
  2031. this.jiedianNew(this.state.orderNo);
  2032. } else {
  2033. message.warning(data.error[0].message);
  2034. }
  2035. }.bind(this)
  2036. );
  2037. } else {
  2038. this.state.contactListNew.splice(index.key, 1);
  2039. this.setState({
  2040. contactListNew: this.state.contactListNew,
  2041. cuiFlag: false,
  2042. addFlag: false,
  2043. boFlag: false
  2044. });
  2045. }
  2046. },
  2047. handleOk() {
  2048. this.setState({
  2049. visible: false,
  2050. mark: false
  2051. });
  2052. this.props.closeDesc(false, true);
  2053. },
  2054. handleCancel() {
  2055. if (this.state.orderType == undefined) {
  2056. return false;
  2057. }
  2058. if (!this.state.autoId) {
  2059. return false;
  2060. }
  2061. this.setState({
  2062. visible: false,
  2063. mark: false
  2064. });
  2065. this.props.closeDesc(false);
  2066. },
  2067. handleCancelclose() {
  2068. this.setState(
  2069. {
  2070. visible: false,
  2071. mark: false,
  2072. cuiFlag: false,
  2073. addFlag: false,
  2074. boFlag: false,
  2075. isJilu: false
  2076. },
  2077. () => {
  2078. this.setState({
  2079. activeKey: "1"
  2080. });
  2081. }
  2082. );
  2083. this.props.closeDesc(false);
  2084. this.reset();
  2085. },
  2086. //点击签单
  2087. handleCancels() {
  2088. this.setState({
  2089. isSubmit: 1
  2090. });
  2091. },
  2092. //点击签单
  2093. handleCancelq() {
  2094. this.setState({
  2095. isSubmit: 0
  2096. });
  2097. },
  2098. //删除
  2099. delectRow(record) {
  2100. this.setState({
  2101. loading: true
  2102. });
  2103. $.ajax({
  2104. method: "post",
  2105. dataType: "json",
  2106. crossDomain: false,
  2107. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  2108. data: {
  2109. id: record.id
  2110. }
  2111. }).done(
  2112. function (data) {
  2113. if (!data.error.length) {
  2114. message.success("删除成功!");
  2115. this.setState({
  2116. loading: false
  2117. });
  2118. this.jiedian(this.state.orderNo);
  2119. this.jiedianNew(this.state.orderNo);
  2120. this.loaduser();
  2121. this.loadData();
  2122. } else {
  2123. message.warning(data.error[0].message);
  2124. }
  2125. }.bind(this)
  2126. );
  2127. },
  2128. nextCancel() {
  2129. this.setState({
  2130. addnextVisible: false,
  2131. changeVisible: false
  2132. });
  2133. },
  2134. rizhi() {
  2135. this.setState({
  2136. loading: true
  2137. });
  2138. $.ajax({
  2139. method: "get",
  2140. dataType: "json",
  2141. crossDomain: false,
  2142. url: "/api/admin/newOrder/selectOrderLog",
  2143. data: {
  2144. orderNo: this.props.datauser.orderNo
  2145. },
  2146. success: function (data) {
  2147. let theArr = [];
  2148. let thisData = data.data;
  2149. if (!thisData.length) {
  2150. if (data.error && data.error.length) {
  2151. message.warning(data.error[0].message);
  2152. }
  2153. thisData = {};
  2154. } else {
  2155. for (let i = 0; i < data.data.length; i++) {
  2156. let thisdata = data.data[i];
  2157. theArr.push({
  2158. processName: thisdata.processName,
  2159. adminName: thisdata.adminName,
  2160. createDate: thisdata.createDate,
  2161. remarks: thisdata.remarks
  2162. });
  2163. }
  2164. }
  2165. this.setState({
  2166. dataSourcerizhi: theArr
  2167. });
  2168. }.bind(this)
  2169. }).always(
  2170. function () {
  2171. this.setState({
  2172. loading: false
  2173. });
  2174. }.bind(this)
  2175. );
  2176. },
  2177. //查看订单日志
  2178. getOrderLog() {
  2179. this.setState({
  2180. rizhivisible: true
  2181. });
  2182. this.rizhi();
  2183. },
  2184. closeOrderLog() {
  2185. this.setState({
  2186. rizhivisible: false
  2187. });
  2188. },
  2189. callback(key) {
  2190. this.setState({
  2191. activeKey: key
  2192. });
  2193. if (key === "1") {
  2194. this.jiedian(this.props.datauser.orderNo);
  2195. this.jiedianNew(this.props.datauser.orderNo);
  2196. this.loaduser();
  2197. // this.loaduser();
  2198. }
  2199. if (key === "3") {
  2200. this.getChangeData();
  2201. }
  2202. if (key === "2") {
  2203. let url = window.location.href.substring(7);
  2204. $.ajax({
  2205. method: "get",
  2206. dataType: "json",
  2207. crossDomain: false,
  2208. url:
  2209. globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  2210. data: {
  2211. orderNo: this.props.datauser.orderNo
  2212. },
  2213. success: function (data) {
  2214. // console.log(data.data);
  2215. if (data.data && data.data.length) {
  2216. let thisdata = data.data[data.data.length - 1];
  2217. if (thisdata.status === 0 || thisdata.processState == 0) {
  2218. this.setState({
  2219. changeId: thisdata.id,
  2220. typeChange: thisdata.type,
  2221. totalAmount: thisdata.totalAmount,
  2222. settlementAmount: thisdata.settlementAmount,
  2223. changeAmount: thisdata.changeAmount,
  2224. remarksC: thisdata.remarks,
  2225. startRemarks: thisdata.zxsRemarks,
  2226. isCaoGao: true,
  2227. changeFlag: true,
  2228. voucherUrl: thisdata.voucherUrl
  2229. ? splitUrl(
  2230. thisdata.voucherUrl,
  2231. ",",
  2232. globalConfig.avatarHost + "/upload",
  2233. url
  2234. )
  2235. : [],
  2236. processState: thisdata.processState,
  2237. status: thisdata.status
  2238. });
  2239. this.proList();
  2240. this.cuiList();
  2241. let e = thisdata.type;
  2242. console.log(e);
  2243. if (e == 1) {
  2244. this.setState({
  2245. hetongFlag: false,
  2246. listFlag: false,
  2247. listCuiFlag: false,
  2248. tuiKuanFlag: false,
  2249. displayList: false
  2250. });
  2251. } else if (e == 2) {
  2252. this.setState({
  2253. hetongFlag: true,
  2254. listFlag: false,
  2255. listCuiFlag: false,
  2256. tuiKuanFlag: true,
  2257. displayList: false
  2258. });
  2259. } else if (e == 3) {
  2260. this.setState({
  2261. listFlag: false,
  2262. hetongFlag: false,
  2263. listCuiFlag: false,
  2264. tuiKuanFlag: false,
  2265. displayList: true
  2266. });
  2267. } else if (e == 4) {
  2268. this.setState({
  2269. listFlag: false,
  2270. listCuiFlag: false,
  2271. hetongFlag: false,
  2272. tuiKuanFlag: true,
  2273. displayList: false
  2274. });
  2275. } else if (e == 5) {
  2276. this.setState({
  2277. listFlag: false,
  2278. listCuiFlag: false,
  2279. hetongFlag: true,
  2280. tuiKuanFlag: true,
  2281. displayList: false
  2282. });
  2283. } else {
  2284. this.setState({
  2285. listFlag: true,
  2286. hetongFlag: true,
  2287. listCuiFlag: true,
  2288. tuiKuanFlag: false,
  2289. displayList: false
  2290. });
  2291. }
  2292. } else {
  2293. this.setState({
  2294. listFlag: false,
  2295. hetongFlag: false,
  2296. listCuiFlag: false,
  2297. tuiKuanFlag: false,
  2298. displayList: false,
  2299. // 置空
  2300. changeId: undefined,
  2301. isCaoGao: false
  2302. });
  2303. }
  2304. } else {
  2305. this.setState({
  2306. isCaoGao: false
  2307. });
  2308. }
  2309. }.bind(this)
  2310. });
  2311. }
  2312. },
  2313. cuiList(id) {
  2314. $.ajax({
  2315. method: "get",
  2316. dataType: "json",
  2317. crossDomain: false,
  2318. url: globalConfig.context + "/api/admin/orderChange/selectChangeDun",
  2319. data: {
  2320. id: id || this.state.changeId
  2321. },
  2322. success: function (data) {
  2323. if (data.data && data.data.length) {
  2324. if (id) {
  2325. this.setState({
  2326. listCuiFlag: true
  2327. });
  2328. }
  2329. this.setState({
  2330. cuiDataSource: data.data
  2331. });
  2332. } else if (data.error && data.error.length) {
  2333. message.warning(data.error[0].message)
  2334. }
  2335. }.bind(this)
  2336. });
  2337. },
  2338. proList(id) {
  2339. $.ajax({
  2340. method: "get",
  2341. dataType: "json",
  2342. crossDomain: false,
  2343. url: globalConfig.context + "/api/admin/orderChange/selectChangeTask",
  2344. data: {
  2345. id: id || this.state.changeId
  2346. },
  2347. success: function (data) {
  2348. if (data.data && data.data.length) {
  2349. if (id) {
  2350. this.setState({
  2351. listFlag: true
  2352. });
  2353. }
  2354. this.setState({
  2355. proDataSource: data.data
  2356. });
  2357. } else if (data.error && data.error.length) {
  2358. message.warning(data.error[0].message);
  2359. }
  2360. }.bind(this)
  2361. });
  2362. },
  2363. getOrgCodeUrl(e) {
  2364. this.setState({ orgCodeUrl: e });
  2365. },
  2366. getVoucherUrl(e) {
  2367. this.setState({ voucherUrl: e });
  2368. },
  2369. //加载(自动补全)
  2370. supervisor(e, state) {
  2371. //客户名称与服务名称自动补全
  2372. let api = state
  2373. ? "/api/admin/customer/getCustomerByName"
  2374. : "/api/admin/order/getBusinessProjectByName";
  2375. $.ajax({
  2376. method: "get",
  2377. dataType: "json",
  2378. crossDomain: false,
  2379. url: globalConfig.context + api,
  2380. data: state
  2381. ? {
  2382. name: e,
  2383. type: this.state.customType
  2384. }
  2385. : {
  2386. businessName: e
  2387. },
  2388. success: function (data) {
  2389. let thedata = data.data;
  2390. if (!thedata) {
  2391. if (data.error && data.error.length) {
  2392. message.warning(data.error[0].message);
  2393. }
  2394. thedata = {};
  2395. }
  2396. this.setState({
  2397. states: state,
  2398. customerArr: thedata
  2399. });
  2400. }.bind(this)
  2401. }).always(
  2402. function () {
  2403. this.setState({
  2404. loading: false
  2405. });
  2406. }.bind(this)
  2407. );
  2408. },
  2409. supervisorCui(e) {
  2410. //客户名称与服务名称自动补全
  2411. let api = "/api/admin/order/getBusinessProjectByName";
  2412. $.ajax({
  2413. method: "get",
  2414. dataType: "json",
  2415. crossDomain: false,
  2416. url: globalConfig.context + api,
  2417. data: {
  2418. businessName: e
  2419. },
  2420. success: function (data) {
  2421. let thedata = data.data;
  2422. if (!thedata) {
  2423. if (data.error && data.error.length) {
  2424. message.warning(data.error[0].message);
  2425. }
  2426. thedata = {};
  2427. }
  2428. this.setState({
  2429. customerCuiArr: thedata
  2430. });
  2431. }.bind(this)
  2432. }).always(
  2433. function () {
  2434. this.setState({
  2435. loading: false
  2436. });
  2437. }.bind(this)
  2438. );
  2439. },
  2440. //上级主管输入框失去焦点是判断客户是否存在
  2441. selectAuto(value) {
  2442. let kid = [];
  2443. let fwList = this.state.customerArr;
  2444. fwList.map(function (item) {
  2445. if (value == item.bname) {
  2446. kid = item;
  2447. }
  2448. });
  2449. this.setState({
  2450. commodityName: value,
  2451. gid: kid.id,
  2452. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  2453. commodityFirstPayment:
  2454. kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment
  2455. });
  2456. },
  2457. selectAutoCui(value) {
  2458. let kid = [];
  2459. let fwList = this.state.customerCuiArr;
  2460. fwList.map(function (item) {
  2461. if (value == item.bname) {
  2462. kid = item;
  2463. }
  2464. });
  2465. this.setState({
  2466. commodityNameCui: value,
  2467. cid: kid.id,
  2468. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  2469. commodityFirstPayment:
  2470. kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment
  2471. });
  2472. },
  2473. //客户
  2474. selectAutoCUT(value) {
  2475. let autoIds;
  2476. let fwList = this.state.customerArr;
  2477. fwList.map(function (item) {
  2478. if (value == item.name) {
  2479. autoIds = item.id;
  2480. }
  2481. });
  2482. this.setState({
  2483. customerName: value,
  2484. autoId: autoIds
  2485. });
  2486. },
  2487. //服务值改变时请求客户名称
  2488. httpChange(e) {
  2489. this.state.gid = "";
  2490. if (e.length >= 1) {
  2491. this.supervisor(e, false);
  2492. }
  2493. this.setState({
  2494. commodityName: e
  2495. });
  2496. },
  2497. httpChangeCui(e) {
  2498. if (e.length >= 1) {
  2499. this.supervisorCui(e, false);
  2500. }
  2501. this.setState({
  2502. commodityNameCui: e
  2503. });
  2504. },
  2505. //客户名称自动补全
  2506. customerChange(e) {
  2507. if (this.state.customType) {
  2508. this.state.autoId = "";
  2509. if (e.length >= 2) {
  2510. this.supervisor(e, true);
  2511. }
  2512. this.setState({
  2513. customerName: e
  2514. });
  2515. } else {
  2516. this.setState({
  2517. customerName: ""
  2518. });
  2519. message.warning("客户所属类型必须指定");
  2520. }
  2521. },
  2522. //点击添加项目明细
  2523. addDetailed() {
  2524. this.setState({
  2525. gid: "",
  2526. customerArr: [],
  2527. commodityName: "",
  2528. commodityQuantity: "",
  2529. commodityId: "",
  2530. taskComment: "",
  2531. main: undefined,
  2532. commodityPrice: "",
  2533. addState: 1,
  2534. addnextVisible: true
  2535. });
  2536. },
  2537. //新建项目明细保存
  2538. nextSubmit(e) {
  2539. e.preventDefault();
  2540. if (this.state.gid == undefined || !this.state.gid) {
  2541. message.warning("服务名称不匹配!");
  2542. return false;
  2543. }
  2544. if (!this.state.commodityPrice) {
  2545. message.warning("请输入金额!");
  2546. this.refs.commodityPrice.focus();
  2547. return false;
  2548. }
  2549. let reg = /^([0]|[1-9][0-9]*)$/;
  2550. if (
  2551. !this.state.commodityQuantity ||
  2552. !reg.test(this.state.commodityQuantity)
  2553. ) {
  2554. message.warning("请输入正确商品数量!");
  2555. this.refs.commodityQuantity.focus();
  2556. return false;
  2557. }
  2558. if (!this.state.main) {
  2559. message.warning("请选择是否为主要项目!");
  2560. this.refs.commodityQuantity.focus();
  2561. return false;
  2562. }
  2563. this.setState({
  2564. loading: true
  2565. });
  2566. let api = this.state.addState
  2567. ? "/api/admin/newOrder/addOrderTask"
  2568. : "/api/bianji";
  2569. $.ajax({
  2570. method: "POST",
  2571. dataType: "json",
  2572. crossDomain: false,
  2573. url: globalConfig.context + api,
  2574. data: {
  2575. commodityId: this.state.gid, //商品ID
  2576. orderNo: this.props.datauser.orderNo, //订单编号
  2577. commodityName: this.state.commodityName, //商品名称
  2578. commodityQuantity: this.state.commodityQuantity, //商品数量
  2579. commodityPrice: this.state.commodityPrice, //签单总价
  2580. taskComment: this.state.taskComment, //服务说明
  2581. main: this.state.main //是否为主要项目
  2582. }
  2583. }).done(
  2584. function (data) {
  2585. this.setState({
  2586. loading: false
  2587. });
  2588. if (!data.error.length) {
  2589. message.success("保存成功!");
  2590. this.nextCancel();
  2591. //this.loaduser(this.props.datauser);
  2592. this.loadData();
  2593. } else {
  2594. message.warning(data.error[0].message);
  2595. }
  2596. }.bind(this)
  2597. );
  2598. },
  2599. //点击打卡项目详情
  2600. tableRowClick(record) {
  2601. this.setState({
  2602. jid: record.id, //项目ID
  2603. kid: record.commodityId, //商品ID
  2604. commodityName: record.commodityName, //金额
  2605. commodityPrice: record.commodityPrice, //金额
  2606. commodityQuantity: record.commodityQuantity, //数量
  2607. taskComment: record.taskComment, //备注
  2608. main: record.main.toString(), //是否为主要
  2609. addnextVisible: true,
  2610. addState: 0
  2611. });
  2612. },
  2613. //修改项目详情
  2614. tabRowSave(e) {
  2615. e.preventDefault();
  2616. if (!this.state.commodityPrice) {
  2617. message.warning("金额不能为空!");
  2618. return false;
  2619. }
  2620. let reg = /^([0]|[1-9][0-9]*)$/;
  2621. if (
  2622. !this.state.commodityQuantity ||
  2623. !reg.test(this.state.commodityQuantity)
  2624. ) {
  2625. message.warning("请输入正确商品数量!");
  2626. return false;
  2627. }
  2628. if (!this.state.main) {
  2629. message.warning("请选择是否为主要项目!");
  2630. this.refs.commodityQuantity.focus();
  2631. return false;
  2632. }
  2633. $.ajax({
  2634. method: "POST",
  2635. dataType: "json",
  2636. crossDomain: false,
  2637. url: globalConfig.context + "/api/admin/newOrder/updateOrderTask",
  2638. data: {
  2639. id: this.state.jid, //项目ID
  2640. commodityId: this.state.kid, //商品ID
  2641. orderNo: this.props.datauser.orderNo, //订单编号
  2642. main: this.state.main, //是否为主要
  2643. commodityPrice: this.state.commodityPrice, //金额
  2644. commodityQuantity: this.state.commodityQuantity, //数量
  2645. taskComment: this.state.taskComment //备注
  2646. }
  2647. }).done(
  2648. function (data) {
  2649. this.setState({
  2650. loading: false
  2651. });
  2652. if (!data.error.length) {
  2653. message.success("保存成功!");
  2654. this.nextCancel();
  2655. //this.loaduser(this.props.datauser);
  2656. this.loadData();
  2657. } else {
  2658. message.warning(data.error[0].message);
  2659. }
  2660. }.bind(this)
  2661. );
  2662. },
  2663. //签单时间选择
  2664. selTime(e, index) {
  2665. this.setState({
  2666. entryTime: e,
  2667. signDate: e,
  2668. selTime: index
  2669. });
  2670. },
  2671. //退单操作
  2672. //点击退单
  2673. tuikuan() {
  2674. this.setState({
  2675. lookVisible: true,
  2676. contractUrl: [],
  2677. applicationUrl: [],
  2678. reason: ""
  2679. });
  2680. },
  2681. //关闭退单
  2682. noCancel() {
  2683. this.setState({
  2684. lookVisible: false
  2685. });
  2686. },
  2687. //点击确认退单
  2688. tuidanOk() {
  2689. let contractUrls = [];
  2690. let applicationUrls = [];
  2691. if (this.state.contractUrl.length) {
  2692. let picArr = [];
  2693. this.state.contractUrl.map(function (item) {
  2694. if (
  2695. item.response &&
  2696. item.response.data &&
  2697. item.response.data.length
  2698. ) {
  2699. picArr.push(item.response.data);
  2700. }
  2701. });
  2702. contractUrls = picArr.join(",");
  2703. }
  2704. if (this.state.applicationUrl.length) {
  2705. let picArr = [];
  2706. this.state.applicationUrl.map(function (item) {
  2707. if (
  2708. item.response &&
  2709. item.response.data &&
  2710. item.response.data.length
  2711. ) {
  2712. picArr.push(item.response.data);
  2713. }
  2714. });
  2715. applicationUrls = picArr.join(",");
  2716. }
  2717. $.ajax({
  2718. method: "POST",
  2719. dataType: "json",
  2720. crossDomain: false,
  2721. url: globalConfig.context + "/api/admin/newOrder/addOrderRefund",
  2722. data: {
  2723. orderNo: this.state.orderNo, //订单编号
  2724. contractUrl: contractUrls.length ? contractUrls : "", //终止合同
  2725. applicationUrl: applicationUrls.length ? applicationUrls : "", //退单申请表
  2726. reason: this.state.reason //退单原因
  2727. }
  2728. }).done(
  2729. function (data) {
  2730. this.setState({
  2731. loading: false
  2732. });
  2733. if (!data.error.length) {
  2734. message.success("退单成功!");
  2735. this.noCancel();
  2736. this.handleCancelclose();
  2737. } else {
  2738. message.warning(data.error[0].message);
  2739. }
  2740. }.bind(this)
  2741. );
  2742. },
  2743. //开单选择订单类型骚操作
  2744. orderTypeFn(e) {
  2745. if (e == 0) {
  2746. this.setState({
  2747. bussStats: true,
  2748. orderType: e
  2749. });
  2750. this.category();
  2751. } else {
  2752. this.setState({
  2753. contractType: undefined,
  2754. bussStats: false,
  2755. orderType: e
  2756. });
  2757. }
  2758. },
  2759. //品类数据获取
  2760. category() {
  2761. $.ajax({
  2762. method: "get",
  2763. dataType: "json",
  2764. crossDomain: false,
  2765. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  2766. data: {},
  2767. success: function (data) {
  2768. let thedata = data.data;
  2769. let theArr = [];
  2770. if (!thedata) {
  2771. if (data.error && data.error.length) {
  2772. message.warning(data.error[0].message);
  2773. }
  2774. thedata = {};
  2775. } else {
  2776. thedata.map(function (item, index) {
  2777. theArr.push({
  2778. key: index,
  2779. name: item.cname,
  2780. id: item.id
  2781. });
  2782. });
  2783. }
  2784. this.setState({
  2785. contractType: undefined,
  2786. categoryArr: theArr
  2787. });
  2788. }.bind(this)
  2789. });
  2790. },
  2791. //变更申请
  2792. changeApply() {
  2793. if (this.state.processStatus <= 4) {
  2794. message.warning("当前订单流程不能发起变更!");
  2795. return false;
  2796. }
  2797. if (this.state.changeAmount === "") {
  2798. message.warning("申请退款金额不能为空!");
  2799. // console.log(this.state.changeAmount);
  2800. return false;
  2801. }
  2802. if (this.state.remarksC.trim() == "") {
  2803. message.warning("请正确填写变更原因");
  2804. return false;
  2805. }
  2806. if (this.state.startRemarks.trim() == "") {
  2807. message.warning("请正确填写备注信息");
  2808. return false;
  2809. }
  2810. let theorgCodeUrl = [];
  2811. if (this.state.voucherUrl.length) {
  2812. let picArr = [];
  2813. this.state.voucherUrl.map(function (item) {
  2814. if (
  2815. item.response &&
  2816. item.response.data &&
  2817. item.response.data.length
  2818. ) {
  2819. picArr.push(item.response.data);
  2820. }
  2821. });
  2822. theorgCodeUrl = picArr.join(",");
  2823. }
  2824. this.setState({
  2825. loading: true
  2826. });
  2827. if (this.state.typeChange == 0) {
  2828. $.ajax({
  2829. method: "post",
  2830. dataType: "json",
  2831. crossDomain: false,
  2832. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  2833. data: {
  2834. orderNo: this.state.orderNo, //订单编号
  2835. processState: 1,
  2836. status: 1,
  2837. startRemarks: this.state.startRemarks,
  2838. remarks: this.state.remarksC,
  2839. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  2840. totalAmount: this.state.totalAmount,
  2841. settlementAmount: this.state.settlementAmount,
  2842. changeAmount: this.state.changeAmount,
  2843. applicant: this.state.salesmanName,
  2844. depName: this.state.depName,
  2845. type: this.state.typeChange
  2846. }
  2847. }).done(
  2848. function (data) {
  2849. this.setState({
  2850. loading: false
  2851. });
  2852. if (!data.error.length) {
  2853. message.success("发起变更成功");
  2854. this.handleCancelclose();
  2855. } else {
  2856. message.warning(data.error[0].message);
  2857. }
  2858. }.bind(this)
  2859. );
  2860. } else {
  2861. $.ajax({
  2862. method: "post",
  2863. dataType: "json",
  2864. crossDomain: false,
  2865. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  2866. data: {
  2867. orderNo: this.state.orderNo, //订单编号
  2868. processState: 0,
  2869. status: 0,
  2870. startRemarks: this.state.startRemarks,
  2871. remarks: this.state.remarksC,
  2872. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  2873. totalAmount: this.state.totalAmount,
  2874. settlementAmount: this.state.settlementAmount,
  2875. changeAmount: this.state.changeAmount,
  2876. applicant: this.state.salesmanName,
  2877. depName: this.state.depName,
  2878. type: this.state.typeChange
  2879. }
  2880. }).done(
  2881. function (data) {
  2882. this.setState({
  2883. loading: false
  2884. });
  2885. if (!data.error.length) {
  2886. message.success("发起变更草稿");
  2887. this.setState(
  2888. {
  2889. isCaoGao: true,
  2890. loading: false
  2891. },
  2892. () => {
  2893. this.callback("2");
  2894. }
  2895. );
  2896. } else {
  2897. message.warning(data.error[0].message);
  2898. }
  2899. }.bind(this)
  2900. );
  2901. }
  2902. },
  2903. reset() {
  2904. this.setState({
  2905. startRemarks: "",
  2906. remarksC: "",
  2907. voucherUrl: [],
  2908. totalAmount: undefined,
  2909. settlementAmount: undefined,
  2910. changeAmount: "0",
  2911. applicant: undefined,
  2912. depNameChange: undefined,
  2913. typeChange: []
  2914. });
  2915. },
  2916. componentWillReceiveProps(nextProps) {
  2917. //props改变时触发
  2918. this.state.visible = nextProps.showDesc;
  2919. this.state.signBillVisible = nextProps.signBillVisible;
  2920. if (this.state.signBillVisible) {
  2921. this.loaduser(nextProps.uid);
  2922. }
  2923. if (nextProps.userDetaile && nextProps.showDesc) {
  2924. this.loaduser(nextProps.datauser);
  2925. this.jiedian(nextProps.datauser.orderNo);
  2926. this.jiedianNew(nextProps.datauser.orderNo);
  2927. this.loadData(nextProps.datauser);
  2928. this.getChangeData(nextProps.datauser);
  2929. } else {
  2930. this.setState({
  2931. orderType: undefined,
  2932. customerName: "",
  2933. autoId: "",
  2934. customerArr: [],
  2935. contractType: undefined,
  2936. bussStats: false,
  2937. customType: undefined
  2938. });
  2939. }
  2940. },
  2941. //查看变更记录
  2942. getChangeData(record) {
  2943. this.setState({
  2944. loading: true
  2945. });
  2946. $.ajax({
  2947. method: "get",
  2948. dataType: "json",
  2949. crossDomain: false,
  2950. url: globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  2951. data: {
  2952. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  2953. },
  2954. success: function (data) {
  2955. this.setState({
  2956. loading: false
  2957. });
  2958. let url = window.location.href.substring(7);
  2959. // console.log(data.data);
  2960. if (data.data && data.data.length) {
  2961. let thisdata = data.data[data.data.length - 1];
  2962. let obj = {
  2963. id: thisdata.id,
  2964. typeChange: thisdata.type,
  2965. totalAmount: thisdata.totalAmount,
  2966. settlementAmount: thisdata.settlementAmount,
  2967. changeAmount: thisdata.changeAmount,
  2968. remarksC: thisdata.remarks,
  2969. startRemarks: thisdata.zxsRemarks,
  2970. processState: thisdata.processState,
  2971. status: thisdata.status,
  2972. voucherUrl: thisdata.voucherUrl
  2973. ? splitUrl(
  2974. thisdata.voucherUrl,
  2975. ",",
  2976. globalConfig.avatarHost + "/upload",
  2977. url
  2978. )
  2979. : []
  2980. };
  2981. this.proList(thisdata.id);
  2982. this.cuiList(thisdata.id);
  2983. this.setState({
  2984. //判断是否有合同变更记录
  2985. isJilu: true,
  2986. detailChange: obj
  2987. });
  2988. }
  2989. }.bind(this)
  2990. });
  2991. },
  2992. showConfirm(fn, record) {
  2993. confirm({
  2994. title: "确定删除此项目吗?",
  2995. content: (
  2996. <span style={{ color: "red" }}>
  2997. 删除后会将该项目下的所有催款节点自动清除!!!
  2998. </span>
  2999. ),
  3000. onOk() {
  3001. fn(record);
  3002. },
  3003. onCancel() { }
  3004. });
  3005. },
  3006. changeAddPro() {
  3007. this.setState({
  3008. changeVisible: true,
  3009. gid: "",
  3010. customerArr: [],
  3011. commodityName: "",
  3012. commodityQuantity: "",
  3013. commodityId: "",
  3014. taskComment: "",
  3015. main: undefined,
  3016. commodityPrice: ""
  3017. });
  3018. },
  3019. changeProSubmit() {
  3020. if (this.state.gid == undefined || !this.state.gid) {
  3021. message.warning("服务名称不匹配!");
  3022. return false;
  3023. }
  3024. if (!this.state.commodityPrice) {
  3025. message.warning("请输入金额!");
  3026. this.refs.commodityPrice.focus();
  3027. return false;
  3028. }
  3029. let reg = /^([0]|[1-9][0-9]*)$/;
  3030. if (
  3031. !this.state.commodityQuantity ||
  3032. !reg.test(this.state.commodityQuantity)
  3033. ) {
  3034. message.warning("请输入正确商品数量!");
  3035. this.refs.commodityQuantity.focus();
  3036. return false;
  3037. }
  3038. if (!this.state.main) {
  3039. message.warning("请选择是否为主要项目!");
  3040. this.refs.commodityQuantity.focus();
  3041. return false;
  3042. }
  3043. this.setState({
  3044. loading: true
  3045. });
  3046. let type = 0;
  3047. if (this.state.typeChange == 4 || this.state.typeChange == 5) {
  3048. type = 1;
  3049. }
  3050. $.ajax({
  3051. method: "post",
  3052. dataType: "json",
  3053. crossDomain: false,
  3054. url: globalConfig.context + "/api/admin/orderChange/addChangeTask",
  3055. data: {
  3056. commodityId: this.state.gid, //商品ID
  3057. orderNo: this.props.datauser.orderNo, //订单编号
  3058. commodityName: this.state.commodityName, //商品名称
  3059. commodityQuantity: this.state.commodityQuantity, //商品数量
  3060. commodityPrice: this.state.commodityPrice, //签单总价
  3061. taskComment: this.state.taskComment, //服务说明
  3062. main: this.state.main, //是否为主要项目
  3063. cid: this.state.changeId, //变更ID
  3064. type
  3065. },
  3066. success: function (data) {
  3067. let theArr = [];
  3068. if (data.error && data.error.length) {
  3069. message.warning(data.error[0].message);
  3070. } else {
  3071. message.success("保存成功");
  3072. this.nextCancel();
  3073. this.proList();
  3074. }
  3075. }.bind(this)
  3076. }).always(
  3077. function () {
  3078. this.setState({
  3079. loading: false
  3080. });
  3081. }.bind(this)
  3082. );
  3083. },
  3084. changeDeletePro(record) {
  3085. this.setState({
  3086. loading: true
  3087. });
  3088. $.ajax({
  3089. method: "post",
  3090. dataType: "json",
  3091. crossDomain: false,
  3092. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  3093. data: {
  3094. id: record.id,
  3095. type: 3,
  3096. tid: record.tid
  3097. },
  3098. success: function (data) {
  3099. let theArr = [];
  3100. if (data.error && data.error.length) {
  3101. message.warning(data.error[0].message);
  3102. } else {
  3103. message.success("删除成功");
  3104. this.proList();
  3105. this.cuiList()
  3106. }
  3107. }.bind(this)
  3108. }).always(
  3109. function () {
  3110. this.setState({
  3111. loading: false
  3112. });
  3113. }.bind(this)
  3114. );
  3115. },
  3116. //点击新增变更催款节点
  3117. changeAddCui() {
  3118. this.state.cuiDataSource.push({
  3119. key: this.state.cuiDataSource.length,
  3120. money: "",
  3121. dunSubject: undefined,
  3122. orderNo: this.state.orderNo,
  3123. dunTarget: this.state.kehuId
  3124. });
  3125. this.setState({
  3126. cuiDataSource: this.state.cuiDataSource,
  3127. cuiFlag: true
  3128. });
  3129. },
  3130. //删除变更收款节点
  3131. changeDeleteCui(index) {
  3132. if (index.id) {
  3133. this.state.cuiDataSource.splice(index.id, 1);
  3134. this.setState({
  3135. contactListNew: this.state.cuiDataSource,
  3136. cuiFlag: false,
  3137. addFlag: false,
  3138. boFlag: false
  3139. });
  3140. $.ajax({
  3141. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  3142. method: "post",
  3143. data: {
  3144. id: index.id,
  3145. type: 3,
  3146. tid: index.tid
  3147. }
  3148. }).done(
  3149. function (data) {
  3150. this.setState({
  3151. loading: false
  3152. });
  3153. if (!data.error.length) {
  3154. message.success("删除成功!");
  3155. this.setState({
  3156. cuiFlag: false
  3157. });
  3158. this.cuiList();
  3159. this.proList()
  3160. } else {
  3161. message.warning(data.error[0].message);
  3162. }
  3163. }.bind(this)
  3164. );
  3165. } else {
  3166. this.state.cuiDataSource.splice(index.key, 1);
  3167. this.setState({
  3168. cuiDataSource: this.state.cuiDataSource,
  3169. cuiFlag: false,
  3170. addFlag: false,
  3171. boFlag: false
  3172. });
  3173. }
  3174. },
  3175. changeSaveCui(record) {
  3176. if (record.boStatus == "false") {
  3177. record.boStatus = false;
  3178. } else if (record.boStatus == "true") {
  3179. record.boStatus = true;
  3180. }
  3181. if (!this.state.yearFlag) {
  3182. if (!record.effectiveCount) {
  3183. message.warning("请选择服务年限");
  3184. return;
  3185. }
  3186. } else {
  3187. record.effectiveCount = "";
  3188. }
  3189. if (record.money == "") {
  3190. message.warning("请填写金额");
  3191. return;
  3192. }
  3193. if (record.boStatus) {
  3194. if (
  3195. typeof +record.money == "number" &&
  3196. +record.money >= 0 &&
  3197. +record.money <= 1
  3198. ) {
  3199. record.appropriationRatio = record.money;
  3200. } else {
  3201. message.warning("金额比例填写错误,比例范围0~1");
  3202. return;
  3203. }
  3204. }
  3205. if (!record.dunType) {
  3206. message.warning("请选择对应科目");
  3207. return;
  3208. }
  3209. if (record.dunType != 1) {
  3210. record.waitDay = "";
  3211. }
  3212. this.setState({
  3213. loading: true
  3214. });
  3215. if (record.boStatus) {
  3216. $.ajax({
  3217. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  3218. method: "post",
  3219. data: {
  3220. orderNo: record.orderNo,
  3221. ctid: record.ctid,
  3222. projectType: record.sort,
  3223. dunType: record.dunType,
  3224. appropriationRatio: record.appropriationRatio,
  3225. waitDay: record.waitDay,
  3226. effectiveCount: record.effectiveCount,
  3227. cid: this.state.changeId //变更ID
  3228. }
  3229. }).done(
  3230. function (data) {
  3231. this.setState({
  3232. loading: false
  3233. });
  3234. if (!data.error.length) {
  3235. message.success("保存成功!");
  3236. this.setState({
  3237. cuiFlag: false,
  3238. boFlag: false,
  3239. addFlag: false
  3240. });
  3241. this.cuiList();
  3242. } else {
  3243. message.warning(data.error[0].message);
  3244. }
  3245. }.bind(this)
  3246. );
  3247. } else {
  3248. $.ajax({
  3249. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  3250. method: "post",
  3251. data: {
  3252. orderNo: record.orderNo,
  3253. ctid: record.ctid,
  3254. projectType: record.sort,
  3255. dunType: record.dunType,
  3256. money: record.money,
  3257. waitDay: record.waitDay,
  3258. effectiveCount: record.effectiveCount,
  3259. cid: this.state.changeId //变更ID
  3260. }
  3261. }).done(
  3262. function (data) {
  3263. this.setState({
  3264. loading: false
  3265. });
  3266. if (!data.error.length) {
  3267. message.success("保存成功!");
  3268. this.setState({
  3269. cuiFlag: false,
  3270. boFlag: false,
  3271. addFlag: false
  3272. });
  3273. this.cuiList();
  3274. } else {
  3275. message.warning(data.error[0].message);
  3276. }
  3277. }.bind(this)
  3278. );
  3279. }
  3280. },
  3281. submitChange() {
  3282. if (this.state.processStatus <= 4) {
  3283. message.warning("当前订单流程不能发起变更!");
  3284. return false;
  3285. }
  3286. if (this.state.changeAmount === "") {
  3287. message.warning("申请退款金额不能为空!");
  3288. return false;
  3289. }
  3290. if (this.state.remarksC.trim() == "") {
  3291. message.warning("请正确填写变更原因");
  3292. return false;
  3293. }
  3294. if (this.state.startRemarks.trim() == "") {
  3295. message.warning("请正确填写备注信息");
  3296. return false;
  3297. }
  3298. let theorgCodeUrl = [];
  3299. if (this.state.voucherUrl.length) {
  3300. let picArr = [];
  3301. this.state.voucherUrl.map(function (item) {
  3302. if (
  3303. item.response &&
  3304. item.response.data &&
  3305. item.response.data.length
  3306. ) {
  3307. picArr.push(item.response.data);
  3308. }
  3309. });
  3310. theorgCodeUrl = picArr.join(",");
  3311. }
  3312. this.setState({
  3313. loading: true
  3314. });
  3315. $.ajax({
  3316. url: globalConfig.context + "/api/admin/orderChange/updateOrderChange",
  3317. method: "post",
  3318. data: {
  3319. id: this.state.changeId,
  3320. changeType: 0,
  3321. orderNo: this.state.orderNo, //订单编号
  3322. processState: 0,
  3323. startRemarks: this.state.startRemarks,
  3324. remarks: this.state.remarksC,
  3325. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3326. totalAmount: this.state.totalAmount,
  3327. settlementAmount: this.state.settlementAmount,
  3328. changeAmount: this.state.changeAmount,
  3329. applicant: this.state.salesmanName,
  3330. depName: this.state.depName,
  3331. type: this.state.typeChange
  3332. }
  3333. }).done(
  3334. function (data) {
  3335. if (!data.error.length) {
  3336. this.setState({
  3337. loading: false
  3338. });
  3339. message.success("发起变更成功");
  3340. this.handleCancelclose();
  3341. } else {
  3342. message.warning(data.error[0].message);
  3343. }
  3344. }.bind(this)
  3345. );
  3346. },
  3347. editCui(record) {
  3348. this.setState({
  3349. editCuiVisible: true,
  3350. editCuiMoney: record.money,
  3351. editCuiTid: record.tid,
  3352. editCuiId: record.id,
  3353. });
  3354. console.log(record);
  3355. },
  3356. editPro(record) {
  3357. this.setState({
  3358. editProVisible: true,
  3359. editProMoney: record.commodityPrice,
  3360. editProCommodityQuantity: record.commodityQuantity,
  3361. editProTid: record.tid,
  3362. editProId: record.id
  3363. });
  3364. console.log(record);
  3365. },
  3366. submitEditCui() {
  3367. this.setState({
  3368. loading: true
  3369. })
  3370. $.ajax({
  3371. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  3372. method: "post",
  3373. data: {
  3374. id: this.state.editCuiId,
  3375. type: this.state.editCuiTid ? 2 : 1,
  3376. money: this.state.editCuiMoney,
  3377. tid: this.state.editCuiTid
  3378. }
  3379. }).done(
  3380. function (data) {
  3381. this.setState({
  3382. loading: false
  3383. });
  3384. if (!data.error.length) {
  3385. message.success("修改成功!");
  3386. this.cuiList();
  3387. this.proList();
  3388. this.setState({
  3389. editCuiVisible: false
  3390. });
  3391. } else {
  3392. message.warning(data.error[0].message);
  3393. }
  3394. }.bind(this)
  3395. );
  3396. },
  3397. submitEditPro() {
  3398. this.setState({
  3399. loading: true
  3400. })
  3401. $.ajax({
  3402. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  3403. method: "post",
  3404. data: {
  3405. id: this.state.editProId,
  3406. type: this.state.editProTid ? 2 : 1,
  3407. commodityPrice: this.state.editProMoney,
  3408. commodityQuantity: this.state.editProCommodityQuantity,
  3409. tid: this.state.editProTid
  3410. }
  3411. }).done(
  3412. function (data) {
  3413. this.setState({
  3414. loading: false
  3415. });
  3416. if (!data.error.length) {
  3417. message.success("修改成功!");
  3418. this.cuiList();
  3419. this.proList();
  3420. this.setState({
  3421. editProVisible: false
  3422. });
  3423. } else {
  3424. message.warning(data.error[0].message);
  3425. }
  3426. }.bind(this)
  3427. );
  3428. },
  3429. render() {
  3430. const FormItem = Form.Item;
  3431. const { TabPane } = Tabs;
  3432. const { TextArea } = Input;
  3433. const formItemLayout = {
  3434. labelCol: { span: 8 },
  3435. wrapperCol: { span: 14 }
  3436. };
  3437. const contractData = this.state.contractData;
  3438. const formItemList = [
  3439. {
  3440. label: "企业联系人",
  3441. content: <span>{this.state.contacts}</span>
  3442. },
  3443. {
  3444. label: "联系人电话",
  3445. content: <span>{this.state.contactMobile}</span>
  3446. },
  3447. {
  3448. label: "企业法人",
  3449. content: <span>{this.state.legalPerson}</span>
  3450. },
  3451. {
  3452. label: "法人电话",
  3453. content: <span>{this.state.legalPersonTel}</span>
  3454. }
  3455. // {
  3456. // label: "签单金额(万元)",
  3457. // content: <span>{this.state.totalAmount}</span>
  3458. // },
  3459. // {
  3460. // label: "首付金额(万元)",
  3461. // content: <span>{this.state.firstAmount}</span>
  3462. // },
  3463. // {
  3464. // label: "特批立项",
  3465. // content: <span>{getApprovedState(this.state.approval)}</span>
  3466. // },
  3467. // {
  3468. // label: "合同签订时间",
  3469. // content: <span>{this.state.signDate}</span>
  3470. // },
  3471. // {
  3472. // label: "订单部门",
  3473. // content: <span>{this.state.depName}</span>
  3474. // }
  3475. ];
  3476. const dataSources = this.state.customerArr || [];
  3477. const cuiDataList = this.state.contactList || [];
  3478. let departmentArr = this.state.departmentArr || [];
  3479. const options = this.state.states
  3480. ? dataSources.map(group => (
  3481. <Select.Option key={group.id} value={group.name}>
  3482. {group.name}
  3483. </Select.Option>
  3484. ))
  3485. : dataSources.map((group, index) => (
  3486. <Select.Option key={index} value={group.bname}>
  3487. {group.bname}
  3488. </Select.Option>
  3489. ));
  3490. return (
  3491. <div>
  3492. <Modal
  3493. maskClosable={false}
  3494. visible={this.state.visible}
  3495. onOk={this.handleOk}
  3496. onCancel={this.handleCancelclose}
  3497. width={!this.props.userDetaile ? "600px" : "900px"}
  3498. title={!this.props.userDetaile ? "创建订单" : ""}
  3499. footer=""
  3500. // width={1300}
  3501. className="admin-desc-content"
  3502. >
  3503. <Form
  3504. layout="horizontal"
  3505. onSubmit={this.handleSubmit}
  3506. // id="demand-form"
  3507. style={{ paddingBottom: "40px" }}
  3508. >
  3509. <Spin spinning={this.state.loading}>
  3510. <div className="clearfix">
  3511. {!this.props.userDetaile ? (
  3512. <div className="clearfix">
  3513. <div className="clearfix">
  3514. <FormItem {...formItemLayout} label="订单类型">
  3515. <Select
  3516. placeholder="请选择订单类型"
  3517. style={{ width: "200px" }}
  3518. value={this.state.orderType}
  3519. onChange={e => {
  3520. this.setState({ orderType: e });
  3521. }}
  3522. >
  3523. {orderTypes.map(function (item) {
  3524. return (
  3525. <Select.Option key={item.value}>
  3526. {item.key}
  3527. </Select.Option>
  3528. );
  3529. })}
  3530. </Select>
  3531. <span className="mandatory">*</span>
  3532. </FormItem>
  3533. </div>
  3534. <FormItem {...formItemLayout} label="客户所属类型">
  3535. <Select
  3536. placeholder="请选择客户所属类型"
  3537. style={{ width: "200px" }}
  3538. value={this.state.customType}
  3539. onChange={e => {
  3540. this.setState({ customType: e });
  3541. }}
  3542. >
  3543. {customerType.map(function (item) {
  3544. return (
  3545. <Select.Option key={item.value}>
  3546. {item.key}
  3547. </Select.Option>
  3548. );
  3549. })}
  3550. </Select>
  3551. </FormItem>
  3552. <div className="clearfix">
  3553. <FormItem {...formItemLayout} label="客户名称">
  3554. <AutoComplete
  3555. className="certain-category-search"
  3556. dropdownClassName="certain-category-search-dropdown"
  3557. dropdownMatchSelectWidth={false}
  3558. dropdownStyle={{ width: 200 }}
  3559. size="large"
  3560. style={{ width: "200px" }}
  3561. dataSource={options}
  3562. placeholder="输入名称"
  3563. value={this.state.customerName}
  3564. onChange={this.customerChange}
  3565. filterOption={true}
  3566. onSelect={this.selectAutoCUT}
  3567. >
  3568. <Input />
  3569. </AutoComplete>
  3570. <span className="mandatory">*</span>
  3571. </FormItem>
  3572. </div>
  3573. <div className="addSave" style={{ marginTop: "15px" }}>
  3574. <Button
  3575. className="cancel"
  3576. type="primary"
  3577. onClick={this.handleCancel}
  3578. style={{ marginLeft: "150px" }}
  3579. htmlType="submit"
  3580. >
  3581. 开单
  3582. </Button>
  3583. <Button
  3584. className="cancel"
  3585. type="ghost"
  3586. onClick={this.handleCancelclose}
  3587. style={{ marginLeft: "50px" }}
  3588. >
  3589. 取消
  3590. </Button>
  3591. </div>
  3592. </div>
  3593. ) : (
  3594. <Tabs
  3595. onChange={this.callback}
  3596. activeKey={this.state.activeKey}
  3597. >
  3598. <TabPane tab={"最新订单"} key="1">
  3599. <div className="clearfix">
  3600. <div className="clearfix">
  3601. <FormItem
  3602. className="half-item"
  3603. {...formItemLayout}
  3604. label="合同编号"
  3605. >
  3606. {<span>{this.state.contractNo}</span>}
  3607. </FormItem>
  3608. <FormItem
  3609. className="half-item"
  3610. {...formItemLayout}
  3611. label="订单编号"
  3612. >
  3613. <span>{this.state.orderNo}</span>
  3614. </FormItem>
  3615. <FormItem
  3616. className="half-item"
  3617. {...formItemLayout}
  3618. label="流程状态"
  3619. >
  3620. <span>
  3621. {getProcessStatus(this.state.processStatus)}
  3622. </span>
  3623. </FormItem>
  3624. <FormItem
  3625. className="half-item"
  3626. {...formItemLayout}
  3627. label="结算状态"
  3628. >
  3629. <span>
  3630. {getLiquidationStatus(
  3631. this.state.liquidationStatus
  3632. )}
  3633. </span>
  3634. </FormItem>
  3635. {this.state.processStatus === 0 ? (
  3636. <div className="clearfix">
  3637. <FormItem
  3638. className="half-item"
  3639. {...formItemLayout}
  3640. label="特批立项"
  3641. >
  3642. <Select
  3643. placeholder="请选择客户所属类型"
  3644. style={{ width: "240px" }}
  3645. value={getApprovedState(
  3646. this.state.approval
  3647. )}
  3648. onChange={e => {
  3649. this.setState({ approval: e });
  3650. }}
  3651. >
  3652. {/* {tepi.map(function(item) {
  3653. // if(item.key == "特批通过" || item.key == "特批驳回")
  3654. return (
  3655. <Select.Option key={item.value}>
  3656. {item.key}
  3657. </Select.Option>
  3658. );
  3659. })} */}
  3660. <Select.Option key={0}>
  3661. 非特批
  3662. </Select.Option>
  3663. <Select.Option key={1}>特批</Select.Option>
  3664. </Select>
  3665. </FormItem>
  3666. <FormItem
  3667. className="half-item"
  3668. {...formItemLayout}
  3669. label="合同签订时间"
  3670. >
  3671. <DatePicker
  3672. style={{
  3673. marginTop: "2px",
  3674. // width: "240px",
  3675. height: "32px"
  3676. }}
  3677. showTime
  3678. format="YYYY-MM-DD"
  3679. onOk={() => { }}
  3680. value={
  3681. this.state.signDate
  3682. ? moment(this.state.signDate)
  3683. : null
  3684. }
  3685. onChange={(data, dataString) => {
  3686. this.setState({ signDate: dataString });
  3687. }}
  3688. />
  3689. <span
  3690. className="mandatory"
  3691. style={{ marginLeft: 20 }}
  3692. >
  3693. *
  3694. </span>
  3695. </FormItem>
  3696. <FormItem
  3697. className="half-item"
  3698. {...formItemLayout}
  3699. label="订单部门"
  3700. >
  3701. <Select
  3702. placeholder="请输入订单部门"
  3703. style={{ width: 240 }}
  3704. value={this.state.organizationSearch}
  3705. onChange={e => {
  3706. this.setState({ organizationSearch: e });
  3707. }}
  3708. >
  3709. {departmentArr.map(function (item) {
  3710. return (
  3711. <Select.Option key={item.id}>
  3712. {item.name}
  3713. </Select.Option>
  3714. );
  3715. })}
  3716. </Select>
  3717. </FormItem>
  3718. </div>
  3719. ) : (
  3720. <div className="clearfix">
  3721. <FormItem
  3722. className="half-item"
  3723. {...formItemLayout}
  3724. label="特批立项"
  3725. >
  3726. <span>
  3727. {getApprovedState(this.state.approval)}
  3728. </span>
  3729. </FormItem>
  3730. <FormItem
  3731. className="half-item"
  3732. {...formItemLayout}
  3733. label="合同签订时间"
  3734. >
  3735. <span>{this.state.signDate}</span>
  3736. </FormItem>
  3737. <FormItem
  3738. className="half-item"
  3739. {...formItemLayout}
  3740. label="订单部门"
  3741. >
  3742. <span>{this.state.depName}</span>
  3743. </FormItem>
  3744. <FormItem
  3745. className="half-item"
  3746. {...formItemLayout}
  3747. label="是否外包"
  3748. >
  3749. <span>
  3750. {this.state.outsource == 0 ? "否" : "是"}
  3751. </span>
  3752. </FormItem>
  3753. </div>
  3754. )}
  3755. </div>
  3756. <h3
  3757. style={{
  3758. marginLeft: 10,
  3759. fontWeight: 800,
  3760. marginBottom: 10
  3761. }}
  3762. >
  3763. 收款项目
  3764. </h3>
  3765. {this.state.processStatus === 0 ? (
  3766. <div className="clearfix">
  3767. <FormItem
  3768. className="half-item"
  3769. {...formItemLayout}
  3770. label="签单金额(万元)"
  3771. >
  3772. <Input
  3773. placeholder="签单金额"
  3774. ref="signTotalAmount"
  3775. value={this.state.totalAmount}
  3776. onChange={e => {
  3777. this.setState({
  3778. totalAmount: e.target.value
  3779. });
  3780. }}
  3781. style={{ width: "240px" }}
  3782. />
  3783. {/* <span className="mandatory">*</span> */}
  3784. </FormItem>
  3785. <FormItem
  3786. className="half-item"
  3787. {...formItemLayout}
  3788. label="首付金额(万元)"
  3789. >
  3790. <Input
  3791. placeholder="请输入实签首款金额"
  3792. ref="signFirstPayment"
  3793. value={this.state.firstAmount}
  3794. onChange={e => {
  3795. this.setState({
  3796. firstAmount: e.target.value
  3797. });
  3798. }}
  3799. style={{ width: "240px" }}
  3800. />
  3801. {/* <span className="mandatory">*</span> */}
  3802. </FormItem>
  3803. <FormItem
  3804. className="half-item"
  3805. {...formItemLayout}
  3806. label="已收款项"
  3807. >
  3808. <span>
  3809. {this.state.settlementAmount + "万元"}
  3810. </span>
  3811. {/* {this.state.settlementAmount ? (
  3812. <Button
  3813. type="primary"
  3814. onClick={this.tuikuan}
  3815. style={{
  3816. float: "right",
  3817. marginRight: "50px",
  3818. marginBottom: "15px"
  3819. }}
  3820. >
  3821. 退单
  3822. </Button>
  3823. ) : (
  3824. ""
  3825. )} */}
  3826. </FormItem>
  3827. </div>
  3828. ) : (
  3829. <div className="clearfix">
  3830. <FormItem
  3831. className="half-item"
  3832. {...formItemLayout}
  3833. label="签单金额(万元)"
  3834. >
  3835. <span>{this.state.totalAmount}</span>
  3836. </FormItem>
  3837. <FormItem
  3838. className="half-item"
  3839. {...formItemLayout}
  3840. label="首付金额(万元)"
  3841. >
  3842. <span>{this.state.firstAmount}</span>
  3843. </FormItem>
  3844. <FormItem
  3845. className="half-item"
  3846. {...formItemLayout}
  3847. label="已收款项"
  3848. >
  3849. <span>
  3850. {this.state.settlementAmount + "万元"}
  3851. </span>
  3852. {/* {this.state.settlementAmount ? (
  3853. <Button
  3854. type="primary"
  3855. onClick={this.tuikuan}
  3856. style={{
  3857. float: "right",
  3858. marginRight: "50px",
  3859. marginBottom: "15px"
  3860. }}
  3861. >
  3862. 退单
  3863. </Button>
  3864. ) : (
  3865. ""
  3866. )} */}
  3867. </FormItem>
  3868. </div>
  3869. )}
  3870. <h3
  3871. style={{
  3872. marginLeft: 10,
  3873. fontWeight: 800,
  3874. marginBottom: 10
  3875. }}
  3876. >
  3877. 联系信息
  3878. </h3>
  3879. {this.state.processStatus == 0 ? (
  3880. <div className="clearfix">
  3881. <div className="clearfix">
  3882. <FormItem
  3883. className="half-item"
  3884. {...formItemLayout}
  3885. label="客户名称"
  3886. >
  3887. <span>{this.state.userName}</span>
  3888. </FormItem>
  3889. </div>
  3890. <FormItem
  3891. className="half-item"
  3892. {...formItemLayout}
  3893. label="企业联系人"
  3894. >
  3895. <Input
  3896. placeholder="请输入联系人"
  3897. ref="signTotalAmount"
  3898. value={this.state.contacts}
  3899. onChange={e => {
  3900. this.setState({ contacts: e.target.value });
  3901. }}
  3902. style={{ width: "240px" }}
  3903. />
  3904. </FormItem>
  3905. <FormItem
  3906. className="half-item"
  3907. {...formItemLayout}
  3908. label="联系人电话"
  3909. >
  3910. <Input
  3911. placeholder="请输入联系人电话"
  3912. ref="signTotalAmount"
  3913. value={this.state.contactMobile}
  3914. onChange={e => {
  3915. this.setState({
  3916. contactMobile: e.target.value
  3917. });
  3918. }}
  3919. style={{ width: "240px" }}
  3920. />
  3921. </FormItem>
  3922. <FormItem
  3923. className="half-item"
  3924. {...formItemLayout}
  3925. label="企业法人"
  3926. >
  3927. <Input
  3928. placeholder="请输入法人"
  3929. ref="signTotalAmount"
  3930. value={this.state.legalPerson}
  3931. onChange={e => {
  3932. this.setState({
  3933. legalPerson: e.target.value
  3934. });
  3935. }}
  3936. style={{ width: "240px" }}
  3937. />
  3938. </FormItem>
  3939. <FormItem
  3940. className="half-item"
  3941. {...formItemLayout}
  3942. label="法人电话"
  3943. >
  3944. <Input
  3945. placeholder="请输入法人电话"
  3946. ref="signTotalAmount"
  3947. value={this.state.legalPersonTel}
  3948. onChange={e => {
  3949. this.setState({
  3950. legalPersonTel: e.target.value
  3951. });
  3952. }}
  3953. style={{ width: "240px" }}
  3954. />
  3955. </FormItem>
  3956. </div>
  3957. ) : (
  3958. <div className="clearfix">
  3959. {formItemList.map((data, index) => {
  3960. return (
  3961. <FormItem
  3962. className="half-item"
  3963. {...formItemLayout}
  3964. key={index}
  3965. label={data.label}
  3966. >
  3967. {data.content}
  3968. </FormItem>
  3969. );
  3970. })}
  3971. </div>
  3972. )}
  3973. <div className="clearfix">
  3974. {this.state.processStatus == 0 ? (
  3975. <FormItem
  3976. labelCol={{ span: 4 }}
  3977. wrapperCol={{ span: 18 }}
  3978. label={
  3979. <span>
  3980. <strong style={{ color: "#f00" }}>*</strong>
  3981. 合同扫描件
  3982. </span>
  3983. }
  3984. >
  3985. <PicturesWall
  3986. fileList={this.getOrgCodeUrl}
  3987. pictureUrl={this.state.orgCodeUrl}
  3988. url="/api/admin/order/uploadOrderImg"
  3989. sign=""
  3990. />
  3991. <p>图片建议:要清晰。</p>
  3992. <Button
  3993. style={{
  3994. float: "right",
  3995. marginRight: "140px",
  3996. marginTop: "20px"
  3997. }}
  3998. onClick={this.getOrderLog}
  3999. >
  4000. 查看订单日志
  4001. </Button>
  4002. </FormItem>
  4003. ) : (
  4004. <FormItem
  4005. labelCol={{ span: 4 }}
  4006. wrapperCol={{ span: 18 }}
  4007. label="合同扫描件"
  4008. >
  4009. <Upload
  4010. className="demandDetailShow-upload"
  4011. listType="picture-card"
  4012. fileList={this.state.orgCodeUrl}
  4013. onPreview={file => {
  4014. this.setState({
  4015. previewImage: file.url || file.thumbUrl,
  4016. previewVisible: true
  4017. });
  4018. }}
  4019. ></Upload>
  4020. <Modal
  4021. maskClosable={false}
  4022. footer={null}
  4023. visible={this.state.previewVisible}
  4024. onCancel={() => {
  4025. this.setState({ previewVisible: false });
  4026. }}
  4027. >
  4028. <img
  4029. alt=""
  4030. style={{ width: "100%" }}
  4031. src={this.state.previewImage || ""}
  4032. />
  4033. </Modal>
  4034. <Button
  4035. style={{
  4036. float: "right",
  4037. marginRight: "140px",
  4038. marginTop: "20px"
  4039. }}
  4040. onClick={this.getOrderLog}
  4041. >
  4042. 查看订单日志
  4043. </Button>
  4044. </FormItem>
  4045. )}
  4046. </div>
  4047. <div className="clearfix">
  4048. {this.state.processStatus == 0 ? (
  4049. <div className="clearfix">
  4050. <FormItem
  4051. labelCol={{ span: 4 }}
  4052. wrapperCol={{ span: 16 }}
  4053. label="订单留言"
  4054. >
  4055. <Input
  4056. type="textarea"
  4057. placeholder="请输入订单留言"
  4058. rows={4}
  4059. value={this.state.orderRemarks}
  4060. onChange={e => {
  4061. this.setState({
  4062. orderRemarks: e.target.value
  4063. });
  4064. }}
  4065. style={{ width: "95%" }}
  4066. />
  4067. <span className="mandatory">*</span>
  4068. </FormItem>
  4069. </div>
  4070. ) : (
  4071. <FormItem
  4072. labelCol={{ span: 4 }}
  4073. wrapperCol={{ span: 16 }}
  4074. label="订单留言"
  4075. >
  4076. <p
  4077. style={{ width: 500, wordWrap: "break-word" }}
  4078. >
  4079. {this.state.orderRemarks}
  4080. </p>
  4081. </FormItem>
  4082. )}
  4083. </div>
  4084. <div className="clearfix">
  4085. <FormItem
  4086. className="half-item"
  4087. {...formItemLayout}
  4088. label="订单负责人"
  4089. >
  4090. <span>{this.state.salesmanName}</span>
  4091. </FormItem>
  4092. <FormItem
  4093. className="half-item"
  4094. {...formItemLayout}
  4095. label="订单负责人电话"
  4096. >
  4097. <span>{this.state.salesmanMobile}</span>
  4098. </FormItem>
  4099. </div>
  4100. <div className="clearfix">
  4101. <FormItem
  4102. className="half-item"
  4103. {...formItemLayout}
  4104. label="当前财务负责人"
  4105. >
  4106. <span>{this.state.nowFinance}</span>
  4107. </FormItem>
  4108. <FormItem
  4109. className="half-item"
  4110. {...formItemLayout}
  4111. label="当前财务负责人电话"
  4112. >
  4113. <span>{this.state.nowFinanceMobile}</span>
  4114. </FormItem>
  4115. </div>
  4116. <div className="clearfix">
  4117. <FormItem
  4118. className="half-item"
  4119. {...formItemLayout}
  4120. style={{ opacity: ".5" }}
  4121. label="原订单负责人"
  4122. >
  4123. <span>{this.state.oldSalesmanName}</span>
  4124. </FormItem>
  4125. <FormItem
  4126. className="half-item"
  4127. {...formItemLayout}
  4128. style={{ opacity: ".5" }}
  4129. label="原订单负责人电话"
  4130. >
  4131. <span>{this.state.oldSalesmanMobile}</span>
  4132. </FormItem>
  4133. </div>
  4134. <div className="clearfix">
  4135. <FormItem
  4136. className="half-item"
  4137. style={{ opacity: ".5" }}
  4138. {...formItemLayout}
  4139. label="实际财务操作人"
  4140. >
  4141. <span>{this.state.financeName}</span>
  4142. </FormItem>
  4143. <FormItem
  4144. className="half-item"
  4145. {...formItemLayout}
  4146. style={{ opacity: ".5" }}
  4147. label="实际财务操作人电话"
  4148. >
  4149. <span>{this.state.financeMobile}</span>
  4150. </FormItem>
  4151. </div>
  4152. <div>
  4153. <span
  4154. style={{ marginLeft: "50px", fontSize: "20px" }}
  4155. >
  4156. 项目业务
  4157. </span>
  4158. {this.state.processStatus == 0 ? (
  4159. <Button
  4160. type="primary"
  4161. onClick={this.addDetailed}
  4162. style={{
  4163. float: "right",
  4164. marginRight: "50px",
  4165. marginBottom: "15px"
  4166. }}
  4167. >
  4168. 添加项目明细
  4169. </Button>
  4170. ) : (
  4171. ""
  4172. )}
  4173. </div>
  4174. <div
  4175. className="patent-table"
  4176. style={{ marginBottom: 10 }}
  4177. >
  4178. <Spin spinning={this.state.loading}>
  4179. <Table
  4180. columns={this.state.columns}
  4181. dataSource={this.state.dataSource}
  4182. pagination={this.state.pagination}
  4183. onRowClick={this.tableRowClick}
  4184. bordered
  4185. size="small"
  4186. />
  4187. </Spin>
  4188. </div>
  4189. <div
  4190. style={{
  4191. display: cuiDataList.length ? "block" : "none"
  4192. }}
  4193. >
  4194. <span
  4195. style={{ marginLeft: "50px", fontSize: "20px" }}
  4196. >
  4197. 旧催款节点
  4198. </span>
  4199. <Button
  4200. type="primary"
  4201. // onClick={this.addcontact}
  4202. disabled
  4203. onClick={e => {
  4204. cuiDataList.length
  4205. ? this.addcontact()
  4206. : this.addcontactNew();
  4207. }}
  4208. style={{
  4209. float: "right",
  4210. marginRight: "50px",
  4211. marginBottom: "15px",
  4212. display:
  4213. this.state.processStatus == 0
  4214. ? "block"
  4215. : "none"
  4216. }}
  4217. >
  4218. 添加催款节点
  4219. </Button>
  4220. </div>
  4221. <div
  4222. className="clearfix"
  4223. style={{
  4224. display: cuiDataList.length ? "block" : "none"
  4225. }}
  4226. >
  4227. <Spin spinning={this.state.loading}>
  4228. <Form layout="horizontal">
  4229. <Table
  4230. pagination={false}
  4231. columns={this.state.ContactsLists}
  4232. dataSource={this.state.contactList}
  4233. scroll={{ x: "max-content", y: 0 }}
  4234. bordered
  4235. size="small"
  4236. />
  4237. <Col
  4238. span={24}
  4239. offset={9}
  4240. style={{ marginTop: "15px" }}
  4241. ></Col>
  4242. </Form>
  4243. </Spin>
  4244. </div>
  4245. <div
  4246. style={{
  4247. display: cuiDataList.length ? "none" : "block"
  4248. }}
  4249. >
  4250. <span
  4251. style={{
  4252. marginLeft: "50px",
  4253. fontSize: "20px"
  4254. }}
  4255. >
  4256. 新催款节点
  4257. </span>
  4258. <span
  4259. style={{
  4260. display: "inline-block",
  4261. marginLeft: 10,
  4262. color: "red"
  4263. }}
  4264. >
  4265. 金额总计(万元): {this.state.totalCui}
  4266. </span>
  4267. <Button
  4268. type="primary"
  4269. disabled={this.state.addFlag ? true : false}
  4270. // onClick={this.addcontact}
  4271. onClick={e => {
  4272. this.setState({ addFlag: true });
  4273. this.addcontactNew();
  4274. }}
  4275. style={{
  4276. float: "right",
  4277. marginRight: "50px",
  4278. marginBottom: "15px",
  4279. display:
  4280. this.state.processStatus == 0
  4281. ? "block"
  4282. : "none"
  4283. }}
  4284. >
  4285. 添加催款节点
  4286. </Button>
  4287. </div>
  4288. <div
  4289. className="clearfix"
  4290. style={{
  4291. display: cuiDataList.length ? "none" : "block"
  4292. }}
  4293. >
  4294. <Spin spinning={this.state.loading}>
  4295. <Form layout="horizontal">
  4296. <Table
  4297. pagination={false}
  4298. columns={this.state.ContactsListsNew}
  4299. dataSource={this.state.contactListNew}
  4300. scroll={{ x: "max-content", y: 0 }}
  4301. bordered
  4302. size="small"
  4303. />
  4304. <Col
  4305. span={24}
  4306. offset={9}
  4307. style={{ marginTop: "15px" }}
  4308. ></Col>
  4309. </Form>
  4310. </Spin>
  4311. </div>
  4312. {this.state.processStatus == 0 ? (
  4313. <div
  4314. className="addSave"
  4315. style={{ marginTop: "15px" }}
  4316. >
  4317. <Button
  4318. className="cancel"
  4319. type="primary"
  4320. onClick={this.handleCancels}
  4321. style={{ marginLeft: "200px" }}
  4322. htmlType="submit"
  4323. >
  4324. 签单
  4325. </Button>
  4326. <Button
  4327. className="cancel"
  4328. type="primary"
  4329. onClick={this.handleCancelq}
  4330. style={{ marginLeft: "50px" }}
  4331. htmlType="submit"
  4332. >
  4333. 保存
  4334. </Button>
  4335. <Button
  4336. className="cancel"
  4337. type="ghost"
  4338. onClick={this.handleCancelclose}
  4339. style={{ marginLeft: "50px" }}
  4340. >
  4341. 取消
  4342. </Button>
  4343. </div>
  4344. ) : (
  4345. ""
  4346. )}
  4347. </div>
  4348. </TabPane>
  4349. <TabPane tab="合同变更发起" key="2">
  4350. {
  4351. <div>
  4352. <div className="clearfix">
  4353. <FormItem
  4354. className="half-item"
  4355. {...formItemLayout}
  4356. label="客户名称"
  4357. >
  4358. <span>{this.state.userName}</span>
  4359. </FormItem>
  4360. </div>
  4361. <div className="clearfix">
  4362. <FormItem
  4363. className="half-item"
  4364. {...formItemLayout}
  4365. label="合同编号"
  4366. >
  4367. <span>{this.state.contractNo}</span>
  4368. </FormItem>
  4369. </div>
  4370. <div className="clearfix">
  4371. <FormItem
  4372. className="half-item"
  4373. {...formItemLayout}
  4374. label="申请变更部门"
  4375. >
  4376. {/* {!this.state.mark ? ( */}
  4377. <span>{this.state.depName}</span>
  4378. {/* ) : (
  4379. <span>{contractData.depName}</span>
  4380. )} */}
  4381. </FormItem>
  4382. <FormItem
  4383. className="half-item"
  4384. {...formItemLayout}
  4385. label="申请人"
  4386. >
  4387. <span>{this.state.salesmanName}</span>
  4388. </FormItem>
  4389. </div>
  4390. <div className="clearfix">
  4391. <FormItem
  4392. labelCol={{ span: 4 }}
  4393. wrapperCol={{ span: 18 }}
  4394. label="变更类型"
  4395. >
  4396. {/* {!this.state.mark ? ( */}
  4397. <Select
  4398. placeholder="选择合同变更类型"
  4399. style={{ width: 200 }}
  4400. disabled={this.state.changeFlag}
  4401. value={this.state.typeChange}
  4402. onChange={e => {
  4403. this.setState({
  4404. typeChange: e,
  4405. changeFlag: true
  4406. });
  4407. if (e == 1) {
  4408. this.setState({
  4409. hetongFlag: false,
  4410. listFlag: false,
  4411. listCuiFlag: false,
  4412. tuiKuanFlag: false,
  4413. displayList: false
  4414. });
  4415. } else if (e == 2) {
  4416. this.setState({
  4417. hetongFlag: true,
  4418. listFlag: false,
  4419. listCuiFlag: false,
  4420. tuiKuanFlag: true,
  4421. displayList: false
  4422. });
  4423. } else if (e == 3) {
  4424. this.setState({
  4425. listFlag: false,
  4426. hetongFlag: false,
  4427. listCuiFlag: false,
  4428. tuiKuanFlag: false,
  4429. displayList: true
  4430. });
  4431. } else if (e == 4) {
  4432. this.setState({
  4433. listFlag: false,
  4434. listCuiFlag: false,
  4435. hetongFlag: false,
  4436. tuiKuanFlag: true,
  4437. displayList: false
  4438. });
  4439. } else if (e == 5) {
  4440. this.setState({
  4441. listFlag: false,
  4442. listCuiFlag: false,
  4443. hetongFlag: true,
  4444. tuiKuanFlag: true,
  4445. displayList: false
  4446. });
  4447. } else {
  4448. this.setState({
  4449. listFlag: true,
  4450. hetongFlag: true,
  4451. listCuiFlag: true,
  4452. tuiKuanFlag: false,
  4453. displayList: false
  4454. });
  4455. }
  4456. }}
  4457. value={this.state.typeChange}
  4458. >
  4459. <Option value={0}>退单退款</Option>
  4460. <Option value={1}>项目及金额变更</Option>
  4461. <Option value={2}>仅项目变更</Option>
  4462. <Option value={3}>仅金额变更</Option>
  4463. <Option value={4}>重报</Option>
  4464. <Option value={5}>赠送</Option>
  4465. </Select>
  4466. <Button
  4467. style={{ marginLeft: 10 }}
  4468. onClick={e => {
  4469. this.setState({
  4470. listFlag: false,
  4471. hetongFlag: false,
  4472. listCuiFlag: false,
  4473. tuiKuanFlag: false,
  4474. displayList: false,
  4475. startRemarks: "",
  4476. remarksC: "",
  4477. voucherUrl: [],
  4478. changeAmount: "0",
  4479. applicant: undefined,
  4480. depNameChange: undefined,
  4481. typeChange: [],
  4482. changeFlag: false
  4483. });
  4484. }}
  4485. >
  4486. 重置
  4487. </Button>
  4488. </FormItem>
  4489. </div>
  4490. <div className="clearfix">
  4491. <FormItem
  4492. labelCol={{ span: 4 }}
  4493. wrapperCol={{ span: 18 }}
  4494. label="合同额(万元)"
  4495. >
  4496. {/* {!this.state.mark ? ( */}
  4497. <Input
  4498. placeholder="请输入合同额"
  4499. disabled={this.state.hetongFlag}
  4500. ref="signTotalAmount"
  4501. value={this.state.totalAmount}
  4502. onChange={e => {
  4503. this.setState({
  4504. totalAmount: e.target.value
  4505. });
  4506. }}
  4507. style={{ width: "240px" }}
  4508. />
  4509. {/* ) : (
  4510. <span>{contractData.totalAmount}</span>
  4511. )} */}
  4512. </FormItem>
  4513. <FormItem
  4514. labelCol={{ span: 4 }}
  4515. wrapperCol={{ span: 18 }}
  4516. label="已收款(万元)"
  4517. >
  4518. <span>
  4519. {this.state.settlementAmount}
  4520. &nbsp;&nbsp;&nbsp;&nbsp;
  4521. <span style={{ color: "red" }}>
  4522. (注:已收款与现实收款不符,请与财务专员联系)
  4523. </span>
  4524. </span>
  4525. </FormItem>
  4526. <FormItem
  4527. labelCol={{ span: 4 }}
  4528. wrapperCol={{ span: 18 }}
  4529. label="申请退款(万元)"
  4530. >
  4531. {/* {!this.state.mark ? ( */}
  4532. <Input
  4533. placeholder="请输入申请退款"
  4534. ref="signTotalAmount"
  4535. disabled={this.state.tuiKuanFlag}
  4536. value={this.state.changeAmount}
  4537. onChange={e => {
  4538. this.setState({
  4539. changeAmount: e.target.value
  4540. });
  4541. }}
  4542. style={{ width: "240px" }}
  4543. />
  4544. {/* ) : (
  4545. <span>{contractData.changeAmount}</span>
  4546. )} */}
  4547. </FormItem>
  4548. </div>
  4549. {/* 动态展示项目以及催款节点 */}
  4550. <div
  4551. style={{
  4552. display: this.state.isCaoGao ? "block" : "none"
  4553. }}
  4554. >
  4555. <div>
  4556. <span
  4557. style={{
  4558. marginLeft: "50px",
  4559. fontSize: "20px"
  4560. }}
  4561. >
  4562. 项目业务
  4563. </span>
  4564. <span style={{ color: "red" }}>
  4565. (注:项目删除后,此项目的全部节点、全部工时,全部被删除,请谨慎删除!)
  4566. </span>
  4567. <Button
  4568. type="primary"
  4569. onClick={this.changeAddPro}
  4570. disabled={this.state.listFlag}
  4571. style={{
  4572. float: "right",
  4573. marginRight: "50px",
  4574. marginBottom: "15px",
  4575. display: this.state.displayList
  4576. ? "none"
  4577. : "block"
  4578. }}
  4579. >
  4580. 添加项目明细
  4581. </Button>
  4582. </div>
  4583. <div
  4584. className="patent-table"
  4585. style={{ marginBottom: 10 }}
  4586. >
  4587. <Spin spinning={this.state.loading}>
  4588. <Table
  4589. columns={this.state.proColumns}
  4590. dataSource={this.state.proDataSource}
  4591. pagination={this.state.pagination}
  4592. onRowDoubleClick={
  4593. this.listFlag ? "" : this.editPro
  4594. }
  4595. bordered
  4596. size="small"
  4597. />
  4598. </Spin>
  4599. </div>
  4600. <div>
  4601. <span
  4602. style={{
  4603. marginLeft: "50px",
  4604. fontSize: "20px"
  4605. }}
  4606. >
  4607. 催款节点
  4608. </span>
  4609. <span style={{ color: "red" }}>
  4610. (注:节点删除后,无论节点是否触发,均会删除,请谨慎删除!)
  4611. </span>
  4612. {/* <span
  4613. style={{
  4614. display: "inline-block",
  4615. marginLeft: 10,
  4616. color: "red"
  4617. }}
  4618. >
  4619. 金额总计(万元): {this.state.totalCui}
  4620. </span> */}
  4621. <Button
  4622. type="primary"
  4623. onClick={e => {
  4624. this.changeAddCui();
  4625. }}
  4626. disabled={this.state.listCuiFlag}
  4627. style={{
  4628. float: "right",
  4629. marginRight: "50px",
  4630. marginBottom: "15px",
  4631. display: this.state.displayList
  4632. ? "none"
  4633. : "block"
  4634. }}
  4635. >
  4636. 添加催款节点
  4637. </Button>
  4638. </div>
  4639. <div className="clearfix">
  4640. <Spin spinning={this.state.loading}>
  4641. <Form layout="horizontal">
  4642. <Table
  4643. pagination={false}
  4644. columns={this.state.changeCuiList}
  4645. dataSource={this.state.cuiDataSource}
  4646. scroll={{ x: "max-content", y: 0 }}
  4647. onRowDoubleClick={
  4648. this.listCuiFlag ? "" : this.editCui
  4649. }
  4650. bordered
  4651. size="small"
  4652. />
  4653. <Col
  4654. span={24}
  4655. offset={9}
  4656. style={{ marginTop: "15px" }}
  4657. ></Col>
  4658. </Form>
  4659. </Spin>
  4660. </div>
  4661. </div>
  4662. <div className="clearfix">
  4663. <FormItem
  4664. style={{ height: "auto" }}
  4665. labelCol={{ span: 4 }}
  4666. wrapperCol={{ span: 18 }}
  4667. label="变更原因"
  4668. >
  4669. {/* {!this.state.mark ? ( */}
  4670. <TextArea
  4671. rows={4}
  4672. placeholder="请输入变更原因"
  4673. ref="signTotalAmount"
  4674. style={{ width: "95%" }}
  4675. value={this.state.remarksC}
  4676. onChange={e => {
  4677. this.setState({
  4678. remarksC: e.target.value
  4679. });
  4680. }}
  4681. />
  4682. {/* ) : (
  4683. <span>{contractData.remarks}</span>
  4684. )} */}
  4685. </FormItem>
  4686. </div>
  4687. <div className="clearfix">
  4688. <FormItem
  4689. style={{ height: "auto" }}
  4690. labelCol={{ span: 4 }}
  4691. wrapperCol={{ span: 18 }}
  4692. label="备注"
  4693. >
  4694. {/* {!this.state.mark ? ( */}
  4695. <TextArea
  4696. rows={4}
  4697. placeholder="请输入备注"
  4698. ref="signTotalAmount"
  4699. style={{ width: "95%" }}
  4700. value={this.state.startRemarks}
  4701. onChange={e => {
  4702. this.setState({
  4703. startRemarks: e.target.value
  4704. });
  4705. }}
  4706. />
  4707. {/* ) : (
  4708. <span>{contractData.startRemarks}</span>
  4709. )} */}
  4710. </FormItem>
  4711. </div>
  4712. {/* ---- */}
  4713. <div className="clearfix">
  4714. <FormItem
  4715. labelCol={{ span: 4 }}
  4716. wrapperCol={{ span: 18 }}
  4717. label="变更凭证"
  4718. >
  4719. {/* {!this.state.mark ? ( */}
  4720. <PicturesWall
  4721. fileList={this.getVoucherUrl}
  4722. pictureUrl={this.state.voucherUrl}
  4723. url="/api/admin/orderChange/uploadFile"
  4724. sign="order_change_file"
  4725. />
  4726. {/* ) : (
  4727. <div>
  4728. <Upload
  4729. className="demandDetailShow-upload"
  4730. listType="picture-card"
  4731. fileList={this.state.voucherUrl}
  4732. onPreview={file => {
  4733. this.setState({
  4734. previewImage:
  4735. file.url || file.thumbUrl,
  4736. previewVisible: true
  4737. });
  4738. }}
  4739. />
  4740. <Modal
  4741. maskClosable={false}
  4742. footer={null}
  4743. visible={this.state.previewVisible}
  4744. onCancel={() => {
  4745. this.setState({
  4746. previewVisible: false
  4747. });
  4748. }}
  4749. >
  4750. <img
  4751. alt=""
  4752. style={{ width: "100%" }}
  4753. src={this.state.previewImage || ""}
  4754. />
  4755. </Modal>
  4756. </div>
  4757. )} */}
  4758. <p>图片建议:要清晰。</p>
  4759. </FormItem>
  4760. </div>
  4761. {/* {!this.state.mark ? ( */}
  4762. <div className="clearfix">
  4763. <Button
  4764. type="primary"
  4765. style={{ float: "right", marginRight: 40 }}
  4766. // onClick={this.changeApply}
  4767. onClick={e => {
  4768. if (this.state.isCaoGao) {
  4769. this.submitChange();
  4770. } else {
  4771. this.changeApply();
  4772. }
  4773. }}
  4774. >
  4775. {this.state.isCaoGao
  4776. ? "发起变更申请"
  4777. : this.state.typeChange == 0
  4778. ? "发起变更申请"
  4779. : "下一步"}
  4780. </Button>
  4781. </div>
  4782. {/* ) : (
  4783. ""
  4784. )} */}
  4785. </div>
  4786. }
  4787. </TabPane>
  4788. {this.state.isJilu ? (
  4789. <TabPane tab={"最近变更记录"} key="3">
  4790. <div>
  4791. <div className="clearfix">
  4792. <FormItem
  4793. className="half-item"
  4794. {...formItemLayout}
  4795. label="客户名称"
  4796. >
  4797. <span>{this.state.userName}</span>
  4798. </FormItem>
  4799. <FormItem
  4800. className="half-item"
  4801. {...formItemLayout}
  4802. label="当前进度"
  4803. >
  4804. <span>
  4805. {getProcessStatusNew(
  4806. this.state.detailChange.processState,
  4807. this.state.detailChange.status
  4808. )}
  4809. </span>
  4810. </FormItem>
  4811. </div>
  4812. <div className="clearfix">
  4813. <FormItem
  4814. className="half-item"
  4815. {...formItemLayout}
  4816. label="合同编号"
  4817. >
  4818. <span>{this.state.contractNo}</span>
  4819. </FormItem>
  4820. </div>
  4821. <div className="clearfix">
  4822. <FormItem
  4823. className="half-item"
  4824. {...formItemLayout}
  4825. label="申请变更部门"
  4826. >
  4827. <span>{this.state.depName}</span>
  4828. </FormItem>
  4829. <FormItem
  4830. className="half-item"
  4831. {...formItemLayout}
  4832. label="申请人"
  4833. >
  4834. <span>{this.state.salesmanName}</span>
  4835. </FormItem>
  4836. </div>
  4837. <div className="clearfix">
  4838. <FormItem
  4839. labelCol={{ span: 4 }}
  4840. wrapperCol={{ span: 18 }}
  4841. label="变更类型"
  4842. >
  4843. <span>
  4844. {getChangeType(
  4845. this.state.detailChange.typeChange
  4846. )}
  4847. </span>
  4848. </FormItem>
  4849. </div>
  4850. <div className="clearfix">
  4851. <FormItem
  4852. labelCol={{ span: 4 }}
  4853. wrapperCol={{ span: 18 }}
  4854. label="合同额(万元)"
  4855. >
  4856. <span>
  4857. {this.state.detailChange.totalAmount}
  4858. </span>
  4859. </FormItem>
  4860. <FormItem
  4861. labelCol={{ span: 4 }}
  4862. wrapperCol={{ span: 18 }}
  4863. label="已收款(万元)"
  4864. >
  4865. <span>
  4866. {this.state.detailChange.settlementAmount}
  4867. </span>
  4868. </FormItem>
  4869. <FormItem
  4870. labelCol={{ span: 4 }}
  4871. wrapperCol={{ span: 18 }}
  4872. label="申请退款(万元)"
  4873. >
  4874. <span>
  4875. {this.state.detailChange.changeAmount}
  4876. </span>
  4877. </FormItem>
  4878. </div>
  4879. {/* 动态展示项目以及催款节点 */}
  4880. <div>
  4881. <div>
  4882. <span
  4883. style={{
  4884. marginLeft: "50px",
  4885. fontSize: "20px"
  4886. }}
  4887. >
  4888. 项目业务
  4889. </span>
  4890. </div>
  4891. <div
  4892. className="patent-table"
  4893. style={{ marginBottom: 10 }}
  4894. >
  4895. <Spin spinning={this.state.loading}>
  4896. <Table
  4897. columns={this.state.detailColumns}
  4898. dataSource={this.state.proDataSource}
  4899. pagination={this.state.pagination}
  4900. // onRowClick={this.tableRowClick}
  4901. bordered
  4902. size="small"
  4903. />
  4904. </Spin>
  4905. </div>
  4906. <div>
  4907. <span
  4908. style={{
  4909. marginLeft: "50px",
  4910. fontSize: "20px"
  4911. }}
  4912. >
  4913. 催款节点
  4914. </span>
  4915. {/* <span
  4916. style={{
  4917. display: "inline-block",
  4918. marginLeft: 10,
  4919. color: "red"
  4920. }}
  4921. >
  4922. 金额总计(万元): {this.state.totalCui}
  4923. </span> */}
  4924. </div>
  4925. <div className="clearfix">
  4926. <Spin spinning={this.state.loading}>
  4927. <Form layout="horizontal">
  4928. <Table
  4929. pagination={false}
  4930. columns={this.state.detailContactsLists}
  4931. dataSource={this.state.cuiDataSource}
  4932. scroll={{ x: "max-content", y: 0 }}
  4933. bordered
  4934. size="small"
  4935. />
  4936. <Col
  4937. span={24}
  4938. offset={9}
  4939. style={{ marginTop: "15px" }}
  4940. ></Col>
  4941. </Form>
  4942. </Spin>
  4943. </div>
  4944. </div>
  4945. <div className="clearfix">
  4946. <FormItem
  4947. style={{ height: "auto" }}
  4948. labelCol={{ span: 4 }}
  4949. wrapperCol={{ span: 18 }}
  4950. label="变更原因"
  4951. >
  4952. <span>{this.state.detailChange.remarksC}</span>
  4953. </FormItem>
  4954. </div>
  4955. <div className="clearfix">
  4956. <FormItem
  4957. style={{ height: "auto" }}
  4958. labelCol={{ span: 4 }}
  4959. wrapperCol={{ span: 18 }}
  4960. label="备注"
  4961. >
  4962. <span>
  4963. {this.state.detailChange.startRemarks}
  4964. </span>
  4965. </FormItem>
  4966. </div>
  4967. {/* ---- */}
  4968. <div className="clearfix">
  4969. <FormItem
  4970. labelCol={{ span: 4 }}
  4971. wrapperCol={{ span: 18 }}
  4972. label="变更凭证"
  4973. >
  4974. <div>
  4975. <Upload
  4976. className="demandDetailShow-upload"
  4977. listType="picture-card"
  4978. fileList={
  4979. this.state.detailChange.voucherUrl
  4980. }
  4981. onPreview={file => {
  4982. this.setState({
  4983. previewImage: file.url || file.thumbUrl,
  4984. previewVisible: true
  4985. });
  4986. }}
  4987. />
  4988. <Modal
  4989. maskClosable={false}
  4990. footer={null}
  4991. visible={this.state.previewVisible}
  4992. onCancel={() => {
  4993. this.setState({
  4994. previewVisible: false
  4995. });
  4996. }}
  4997. >
  4998. <img
  4999. alt=""
  5000. style={{ width: "100%" }}
  5001. src={this.state.previewImage || ""}
  5002. />
  5003. </Modal>
  5004. </div>
  5005. </FormItem>
  5006. </div>
  5007. </div>
  5008. </TabPane>
  5009. ) : (
  5010. ""
  5011. )}
  5012. </Tabs>
  5013. )}
  5014. </div>
  5015. </Spin>
  5016. </Form>
  5017. </Modal>
  5018. <Modal
  5019. maskClosable={false}
  5020. visible={this.state.addnextVisible}
  5021. onOk={this.nextCancel}
  5022. onCancel={this.nextCancel}
  5023. width="800px"
  5024. title={this.state.addState ? "添加项目任务" : "项目任务详情"}
  5025. footer=""
  5026. className="admin-desc-content"
  5027. >
  5028. <Form
  5029. layout="horizontal"
  5030. onSubmit={this.nextSubmit}
  5031. // id="demand-form"
  5032. >
  5033. <Spin spinning={this.state.loading}>
  5034. {this.state.addState ? (
  5035. <div className="clearfix">
  5036. <FormItem
  5037. className="half-item"
  5038. {...formItemLayout}
  5039. label="服务名称"
  5040. >
  5041. <AutoComplete
  5042. className="certain-category-search"
  5043. dropdownClassName="certain-category-search-dropdown"
  5044. dropdownMatchSelectWidth={false}
  5045. dropdownStyle={{ width: 200 }}
  5046. style={{ width: "200px" }}
  5047. dataSource={options}
  5048. placeholder="输入服务名称"
  5049. value={this.state.commodityName}
  5050. onChange={this.httpChange}
  5051. filterOption={true}
  5052. onSelect={this.selectAuto}
  5053. >
  5054. <Input />
  5055. </AutoComplete>
  5056. <span className="mandatory">*</span>
  5057. </FormItem>
  5058. <FormItem
  5059. className="half-item"
  5060. {...formItemLayout}
  5061. label="服务数量"
  5062. >
  5063. <Input
  5064. placeholder="请输入服务数量"
  5065. value={this.state.commodityQuantity}
  5066. style={{ width: "200px" }}
  5067. onChange={e => {
  5068. this.setState({ commodityQuantity: e.target.value });
  5069. }}
  5070. ref="commodityQuantity"
  5071. />
  5072. <span className="mandatory">*</span>
  5073. </FormItem>
  5074. <FormItem
  5075. className="half-item"
  5076. {...formItemLayout}
  5077. label="实签价格(万元)"
  5078. >
  5079. <Input
  5080. placeholder="请输入实签价格"
  5081. value={this.state.commodityPrice}
  5082. style={{ width: "200px" }}
  5083. onChange={e => {
  5084. this.setState({ commodityPrice: e.target.value });
  5085. }}
  5086. ref="commodityPrice"
  5087. />
  5088. <span className="mandatory">*</span>
  5089. </FormItem>
  5090. <FormItem
  5091. className="half-item"
  5092. {...formItemLayout}
  5093. label="主要业务"
  5094. >
  5095. <Select
  5096. placeholder="选择是否为主要业务"
  5097. style={{ width: "200px" }}
  5098. value={this.state.main}
  5099. onChange={e => {
  5100. this.setState({ main: e });
  5101. }}
  5102. >
  5103. {boutique.map(function (item) {
  5104. return (
  5105. <Select.Option key={item.value}>
  5106. {item.key}
  5107. </Select.Option>
  5108. );
  5109. })}
  5110. </Select>
  5111. <span className="mandatory">*</span>
  5112. </FormItem>
  5113. <div className="clearfix">
  5114. <FormItem
  5115. labelCol={{ span: 4 }}
  5116. wrapperCol={{ span: 16 }}
  5117. label="服务说明"
  5118. >
  5119. <Input
  5120. type="textarea"
  5121. placeholder="请输入服务说明"
  5122. value={this.state.taskComment}
  5123. onChange={e => {
  5124. this.setState({ taskComment: e.target.value });
  5125. }}
  5126. />
  5127. </FormItem>
  5128. </div>
  5129. <FormItem
  5130. wrapperCol={{ span: 12, offset: 4 }}
  5131. className="half-middle"
  5132. >
  5133. <Button
  5134. className="submitSave"
  5135. type="primary"
  5136. htmlType="submit"
  5137. >
  5138. 保存
  5139. </Button>
  5140. <Button
  5141. className="submitSave"
  5142. type="ghost"
  5143. onClick={this.nextCancel}
  5144. >
  5145. 取消
  5146. </Button>
  5147. </FormItem>
  5148. </div>
  5149. ) : (
  5150. <div className="clearfix">
  5151. {this.state.processStatus == 0 ? (
  5152. <div className="clearfix">
  5153. <FormItem
  5154. className="half-item"
  5155. {...formItemLayout}
  5156. label="项目名称"
  5157. >
  5158. <span>{this.state.commodityName}</span>
  5159. </FormItem>
  5160. <FormItem
  5161. className="half-item"
  5162. {...formItemLayout}
  5163. label="项目数量"
  5164. >
  5165. <Input
  5166. placeholder="请输入数量"
  5167. value={this.state.commodityQuantity}
  5168. style={{ width: "200px" }}
  5169. onChange={e => {
  5170. this.setState({
  5171. commodityQuantity: e.target.value
  5172. });
  5173. }}
  5174. />
  5175. <span className="mandatory">*</span>
  5176. </FormItem>
  5177. <FormItem
  5178. className="half-item"
  5179. {...formItemLayout}
  5180. label="金额(万元)"
  5181. >
  5182. <Input
  5183. placeholder="请输入签单金额"
  5184. value={this.state.commodityPrice}
  5185. style={{ width: "200px" }}
  5186. onChange={e => {
  5187. this.setState({ commodityPrice: e.target.value });
  5188. }}
  5189. />
  5190. <span className="mandatory">*</span>
  5191. </FormItem>
  5192. <FormItem
  5193. className="half-item"
  5194. {...formItemLayout}
  5195. label="主要项目"
  5196. >
  5197. <Select
  5198. placeholder="选择是否为主要业务"
  5199. style={{ width: "200px" }}
  5200. value={this.state.main}
  5201. onChange={e => {
  5202. this.setState({ main: e });
  5203. }}
  5204. >
  5205. {boutique.map(function (item) {
  5206. return (
  5207. <Select.Option key={item.value}>
  5208. {item.key}
  5209. </Select.Option>
  5210. );
  5211. })}
  5212. </Select>
  5213. <span className="mandatory">*</span>
  5214. </FormItem>
  5215. <div className="clearfix">
  5216. <FormItem
  5217. labelCol={{ span: 4 }}
  5218. wrapperCol={{ span: 16 }}
  5219. label="服务说明"
  5220. >
  5221. <Input
  5222. type="textarea"
  5223. placeholder="请输入服务说明"
  5224. value={this.state.taskComment}
  5225. onChange={e => {
  5226. this.setState({ taskComment: e.target.value });
  5227. }}
  5228. />
  5229. </FormItem>
  5230. </div>
  5231. <FormItem
  5232. wrapperCol={{ span: 12, offset: 4 }}
  5233. className="half-middle"
  5234. >
  5235. <Button
  5236. className="submitSave"
  5237. type="primary"
  5238. onClick={this.tabRowSave}
  5239. >
  5240. 保存
  5241. </Button>
  5242. <Button
  5243. className="submitSave"
  5244. type="ghost"
  5245. onClick={this.nextCancel}
  5246. >
  5247. 取消
  5248. </Button>
  5249. </FormItem>
  5250. </div>
  5251. ) : (
  5252. <div className="clearfix">
  5253. <FormItem
  5254. className="half-item"
  5255. {...formItemLayout}
  5256. label="项目名称"
  5257. >
  5258. <span>{this.state.commodityName}</span>
  5259. </FormItem>
  5260. <FormItem
  5261. className="half-item"
  5262. {...formItemLayout}
  5263. label="项目数量"
  5264. >
  5265. <span>{this.state.commodityQuantity}</span>
  5266. </FormItem>
  5267. <FormItem
  5268. className="half-item"
  5269. {...formItemLayout}
  5270. label="金额(万元)"
  5271. >
  5272. <span>{this.state.commodityPrice}</span>
  5273. </FormItem>
  5274. <FormItem
  5275. className="half-item"
  5276. {...formItemLayout}
  5277. label="主要项目"
  5278. >
  5279. <span>{getboutique(this.state.main)}</span>
  5280. </FormItem>
  5281. <div className="clearfix">
  5282. <FormItem
  5283. labelCol={{ span: 4 }}
  5284. wrapperCol={{ span: 16 }}
  5285. label="服务说明"
  5286. >
  5287. <span>{this.state.taskComment}</span>
  5288. </FormItem>
  5289. </div>
  5290. </div>
  5291. )}
  5292. </div>
  5293. )}
  5294. </Spin>
  5295. </Form>
  5296. </Modal>
  5297. <Modal
  5298. maskClosable={false}
  5299. visible={this.state.changeVisible}
  5300. onOk={this.nextCancel}
  5301. onCancel={this.nextCancel}
  5302. width="800px"
  5303. title={"添加变更项目"}
  5304. footer=""
  5305. className="admin-desc-content"
  5306. >
  5307. <Form
  5308. layout="horizontal"
  5309. // id="demand-form"
  5310. >
  5311. <Spin spinning={this.state.loading}>
  5312. <div className="clearfix">
  5313. <FormItem
  5314. className="half-item"
  5315. {...formItemLayout}
  5316. label="服务名称"
  5317. >
  5318. <AutoComplete
  5319. className="certain-category-search"
  5320. dropdownClassName="certain-category-search-dropdown"
  5321. dropdownMatchSelectWidth={false}
  5322. dropdownStyle={{ width: 200 }}
  5323. style={{ width: "200px" }}
  5324. dataSource={options}
  5325. placeholder="输入服务名称"
  5326. value={this.state.commodityName}
  5327. onChange={this.httpChange}
  5328. filterOption={true}
  5329. onSelect={this.selectAuto}
  5330. >
  5331. <Input />
  5332. </AutoComplete>
  5333. <span className="mandatory">*</span>
  5334. </FormItem>
  5335. <FormItem
  5336. className="half-item"
  5337. {...formItemLayout}
  5338. label="服务数量"
  5339. >
  5340. <Input
  5341. placeholder="请输入服务数量"
  5342. value={this.state.commodityQuantity}
  5343. style={{ width: "200px" }}
  5344. onChange={e => {
  5345. this.setState({ commodityQuantity: e.target.value });
  5346. }}
  5347. ref="commodityQuantity"
  5348. />
  5349. <span className="mandatory">*</span>
  5350. </FormItem>
  5351. <FormItem
  5352. className="half-item"
  5353. {...formItemLayout}
  5354. label="实签价格(万元)"
  5355. >
  5356. <Input
  5357. placeholder="请输入实签价格"
  5358. value={this.state.commodityPrice}
  5359. style={{ width: "200px" }}
  5360. onChange={e => {
  5361. this.setState({ commodityPrice: e.target.value });
  5362. }}
  5363. ref="commodityPrice"
  5364. />
  5365. <span className="mandatory">*</span>
  5366. </FormItem>
  5367. <FormItem
  5368. className="half-item"
  5369. {...formItemLayout}
  5370. label="主要业务"
  5371. >
  5372. <Select
  5373. placeholder="选择是否为主要业务"
  5374. style={{ width: "200px" }}
  5375. value={this.state.main}
  5376. onChange={e => {
  5377. this.setState({ main: e });
  5378. }}
  5379. >
  5380. {boutique.map(function (item) {
  5381. return (
  5382. <Select.Option key={item.value}>
  5383. {item.key}
  5384. </Select.Option>
  5385. );
  5386. })}
  5387. </Select>
  5388. <span className="mandatory">*</span>
  5389. </FormItem>
  5390. <div className="clearfix">
  5391. <FormItem
  5392. labelCol={{ span: 4 }}
  5393. wrapperCol={{ span: 16 }}
  5394. label="服务说明"
  5395. >
  5396. <Input
  5397. type="textarea"
  5398. placeholder="请输入服务说明"
  5399. value={this.state.taskComment}
  5400. onChange={e => {
  5401. this.setState({ taskComment: e.target.value });
  5402. }}
  5403. />
  5404. </FormItem>
  5405. </div>
  5406. <FormItem
  5407. wrapperCol={{ span: 12, offset: 4 }}
  5408. className="half-middle"
  5409. >
  5410. <Button
  5411. className="submitSave"
  5412. type="primary"
  5413. onClick={this.changeProSubmit}
  5414. >
  5415. 保存
  5416. </Button>
  5417. <Button
  5418. className="submitSave"
  5419. type="ghost"
  5420. onClick={this.nextCancel}
  5421. >
  5422. 取消
  5423. </Button>
  5424. </FormItem>
  5425. </div>
  5426. </Spin>
  5427. </Form>
  5428. </Modal>
  5429. <Modal
  5430. maskClosable={false}
  5431. visible={this.state.lookVisible}
  5432. onOk={this.noCancel}
  5433. onCancel={this.noCancel}
  5434. width="800px"
  5435. title={"退单申请"}
  5436. footer=""
  5437. className="admin-desc-content"
  5438. >
  5439. <Form layout="horizontal">
  5440. <Spin spinning={this.state.loading}>
  5441. <div className="clearfix">
  5442. <FormItem
  5443. labelCol={{ span: 4 }}
  5444. wrapperCol={{ span: 16 }}
  5445. label="终止合同"
  5446. >
  5447. <Picture
  5448. fileList={e => {
  5449. this.setState({ contractUrl: e });
  5450. }}
  5451. pictureUrl={this.state.contractUrl}
  5452. visible={this.props.visible}
  5453. data={{
  5454. sign: "order_refund_file",
  5455. url: "/api/admin/newOrder/uploadRefundOrderFile",
  5456. number: 8
  5457. }}
  5458. />
  5459. </FormItem>
  5460. </div>
  5461. <div className="clearfix">
  5462. <FormItem
  5463. labelCol={{ span: 4 }}
  5464. wrapperCol={{ span: 16 }}
  5465. label="退单申请表"
  5466. >
  5467. <Picture
  5468. fileList={e => {
  5469. this.setState({ applicationUrl: e });
  5470. }}
  5471. pictureUrl={this.state.applicationUrl}
  5472. visible={this.props.visible}
  5473. data={{
  5474. sign: "order_refund_file",
  5475. url: "/api/admin/newOrder/uploadRefundOrderFile",
  5476. number: 8
  5477. }}
  5478. />
  5479. </FormItem>
  5480. </div>
  5481. <div className="clearfix">
  5482. <FormItem
  5483. labelCol={{ span: 4 }}
  5484. wrapperCol={{ span: 16 }}
  5485. label="退单理由"
  5486. >
  5487. <Input
  5488. type="textarea"
  5489. placeholder="请输入退单理由"
  5490. rows={4}
  5491. value={this.state.reason}
  5492. onChange={e => {
  5493. this.setState({ reason: e.target.value });
  5494. }}
  5495. />
  5496. </FormItem>
  5497. </div>
  5498. <div className="clearfix">
  5499. <Button
  5500. className="cancel"
  5501. type="primary"
  5502. onClick={this.tuidanOk}
  5503. style={{ marginLeft: "50px" }}
  5504. htmlType="submit"
  5505. >
  5506. 确定退单
  5507. </Button>
  5508. <Button
  5509. className="cancel"
  5510. type="ghost"
  5511. onClick={this.noCancel}
  5512. style={{ marginLeft: "50px" }}
  5513. >
  5514. 取消
  5515. </Button>
  5516. </div>
  5517. </Spin>
  5518. </Form>
  5519. </Modal>
  5520. <Modal
  5521. title="修改项目金额及数量"
  5522. visible={this.state.editProVisible}
  5523. onOk={this.submitEditPro}
  5524. width={300}
  5525. okText={"保存"}
  5526. onCancel={() => {
  5527. this.setState({
  5528. editProVisible: false
  5529. });
  5530. }}
  5531. >
  5532. <div className="clearfix">
  5533. <FormItem
  5534. labelCol={{ span: 6 }}
  5535. wrapperCol={{ span: 14 }}
  5536. label="项目金额"
  5537. >
  5538. <Input
  5539. placeholder="请输入金额"
  5540. rows={4}
  5541. value={this.state.editProMoney}
  5542. onChange={e => {
  5543. this.setState({ editProMoney: e.target.value });
  5544. }}
  5545. />
  5546. </FormItem>
  5547. <FormItem
  5548. labelCol={{ span: 6 }}
  5549. wrapperCol={{ span: 14 }}
  5550. label="项目数量"
  5551. >
  5552. <Input
  5553. placeholder="请输入数量"
  5554. rows={4}
  5555. value={this.state.editProCommodityQuantity}
  5556. onChange={e => {
  5557. this.setState({ editProCommodityQuantity: e.target.value });
  5558. }}
  5559. />
  5560. </FormItem>
  5561. </div>
  5562. </Modal>
  5563. <Modal
  5564. title="修改催款节点金额"
  5565. visible={this.state.editCuiVisible}
  5566. onOk={this.submitEditCui}
  5567. okText={"保存"}
  5568. width={300}
  5569. onCancel={e => {
  5570. this.setState({
  5571. editCuiVisible: false
  5572. });
  5573. }}
  5574. >
  5575. <div className="clearfix">
  5576. <FormItem
  5577. labelCol={{ span: 6 }}
  5578. wrapperCol={{ span: 14 }}
  5579. label="催款金额"
  5580. >
  5581. <Input
  5582. placeholder="请输入金额"
  5583. rows={4}
  5584. value={this.state.editCuiMoney}
  5585. onChange={e => {
  5586. this.setState({ editCuiMoney: e.target.value });
  5587. }}
  5588. />
  5589. </FormItem>
  5590. </div>
  5591. </Modal>
  5592. <OrderRiZi
  5593. dataSourcerizhi={this.state.dataSourcerizhi}
  5594. closeOrderLog={this.closeOrderLog}
  5595. visible={this.state.rizhivisible}
  5596. loading={this.state.loading}
  5597. />
  5598. </div>
  5599. );
  5600. }
  5601. })
  5602. );
  5603. export default Form.create()(NewService);