myTask.jsx 185 KB

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