myTask.jsx 197 KB

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