myTask.jsx 197 KB

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