myTask.jsx 198 KB

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