index.vue 175 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066
  1. <template>
  2. <div class="app-container">
  3. <!-- 配方模板表 -->
  4. <div ref="template" class="template">
  5. <div class="recipeTemplate">
  6. <p>{{ $t('dailyExecutionPlan.title') }}</p>
  7. </div>
  8. <div class="search">
  9. <el-date-picker
  10. v-model="table.getdataListParm.parammaps.mydate"
  11. type="date"
  12. :placeholder="$t('dailyExecutionPlan.xzrq')"
  13. style="width: 150px"
  14. format="yyyy-MM-dd"
  15. value-format="yyyy-MM-dd"
  16. :clearable="false"
  17. @change="changeDate"
  18. />
  19. <el-button
  20. class="el-icon-arrow-left elIconArrowLeft"
  21. @click="handleBefore"
  22. />
  23. <el-button
  24. class="el-icon-arrow-right elIconArrowRight"
  25. @click="handleNext"
  26. />
  27. <el-select
  28. v-model="table.getdataListParm.parammaps.lpplantype"
  29. filterable
  30. :placeholder="$t('processAnalysis.planType')"
  31. class="filter-item"
  32. clearable
  33. style="width: 120px"
  34. @change="changePlanType"
  35. >
  36. <el-option
  37. v-for="item in planTypeList"
  38. :key="item.value"
  39. :label="item.lable"
  40. :value="item.value"
  41. />
  42. </el-select>
  43. <el-select
  44. v-model="table.getdataListParm.parammaps.times"
  45. filterable
  46. :placeholder="$t('premixedPlan.bc')"
  47. class="filter-item"
  48. style="width: 120px"
  49. clearable
  50. @change="changeFrequency"
  51. >
  52. <el-option
  53. v-for="item in frequencyList"
  54. :key="item.id"
  55. :label="item.name"
  56. :value="item.id"
  57. />
  58. </el-select>
  59. <el-select
  60. v-model="table.getdataListParm.parammaps.printType"
  61. filterable
  62. :placeholder="$t('dailyExecutionPlan.dylx')"
  63. class="filter-item"
  64. :clearable="false"
  65. style="width: 120px"
  66. >
  67. <el-option
  68. v-for="item in printingTypeList"
  69. :key="item.value"
  70. :label="item.lable"
  71. :value="item.value"
  72. />
  73. </el-select>
  74. <el-select
  75. v-model="table.getdataListParm.parammaps.plandimen"
  76. filterable
  77. :placeholder="$t('dailyExecutionPlan.jhwd')"
  78. class="filter-item"
  79. style="width: 120px"
  80. :clearable="false"
  81. >
  82. <el-option
  83. v-for="item in planningDimensionList"
  84. :key="item.value"
  85. :label="item.lable"
  86. :value="item.value"
  87. />
  88. </el-select>
  89. <el-select
  90. v-model="table.getdataListParm.parammaps.enable3"
  91. filterable
  92. :placeholder="$t('dailyExecutionPlan.dclx')"
  93. class="filter-item"
  94. style="width: 120px"
  95. :clearable="false"
  96. >
  97. <el-option
  98. v-for="item in exportTypeList"
  99. :key="item.value"
  100. :label="item.lable"
  101. :value="item.value"
  102. />
  103. </el-select>
  104. <el-select
  105. v-model="table.getdataListParm.parammaps.tmrname"
  106. filterable
  107. :placeholder="$t('processAnalysis.tmrName')"
  108. class="filter-item"
  109. style="width: 120px"
  110. :clearable="false"
  111. >
  112. <el-option
  113. v-for="item in tmrDownList"
  114. :key="item.tmrname"
  115. :label="item.tmrname"
  116. :value="item.tmrtname"
  117. />
  118. </el-select>
  119. <el-select
  120. v-model="table.getdataListParm.parammaps.iscompleted"
  121. filterable
  122. :placeholder="$t('dailyExecutionPlan.zxzt')"
  123. class="filter-item"
  124. style="width: 120px"
  125. :clearable="false"
  126. >
  127. <el-option
  128. v-for="item in iscompletedList"
  129. :key="item.value"
  130. :label="item.lable"
  131. :value="item.value"
  132. />
  133. </el-select>
  134. <el-button class="successBorder" @click="form_search">{{
  135. $t('common.query')
  136. }}</el-button>
  137. <el-button
  138. class="export"
  139. icon="el-icon-upload2"
  140. @click="handleExport"
  141. >{{ $t('formulationEvaluation.out') }}</el-button
  142. >
  143. <el-button class="export" icon="el-icon-upload2" @click="handlePrint">{{
  144. $t('dailyExecutionPlan.dy')
  145. }}</el-button>
  146. <el-button
  147. class="export"
  148. style="margin-left: -5px"
  149. @click="form_deleteRecord"
  150. >{{ $t('dailyExecutionPlan.scjl') }}</el-button
  151. >
  152. </div>
  153. <div class="operation" style="margin-bottom: 26px">
  154. <el-button
  155. v-if="isRoleEdit"
  156. class="success"
  157. icon="el-icon-plus"
  158. @click="handleCreate"
  159. >{{ $t('dailyExecutionPlan.xsc') }}</el-button
  160. >
  161. <el-button
  162. v-if="isRoleEdit"
  163. class="success"
  164. icon="el-icon-edit-outline"
  165. @click="handleRevisePlan"
  166. >{{ $t('dailyExecutionPlan.xgjh') }}</el-button
  167. >
  168. <el-button
  169. v-if="isRoleEdit"
  170. class="copy"
  171. icon="el-icon-copy-document"
  172. @click="handleCopy"
  173. >{{ $t('dailyExecutionPlan.fzjh') }}</el-button
  174. >
  175. <el-button
  176. v-if="isOrder && isRoleEdit"
  177. icon="el-icon-sort"
  178. class="success"
  179. @click="handleChangeOrder"
  180. >{{ $t('formulationEvaluation.ggsx') }}</el-button
  181. >
  182. <div v-else style="margin-left: 10px; display: inline-block">
  183. <el-button
  184. v-if="isRoleEdit"
  185. icon="el-icon-folder-checked"
  186. class="success"
  187. @click="saveChangeOrder"
  188. >{{ $t('formulationEvaluation.save') }}</el-button
  189. >
  190. <el-button
  191. v-if="isRoleEdit"
  192. icon="el-icon-close"
  193. class="sortCancel"
  194. @click="cancelChangeOrder"
  195. >{{ $t('formulationEvaluation.cancel') }}</el-button
  196. >
  197. </div>
  198. <el-button
  199. v-if="isRoleEdit"
  200. class="success"
  201. icon="el-icon-open"
  202. @click="handleTakeEffect"
  203. >{{ $t('premixedPlan.sx') }}</el-button
  204. >
  205. <el-button
  206. v-if="isRoleEdit"
  207. class="danger"
  208. icon="el-icon-turn-off"
  209. @click="handleDisable"
  210. >{{ $t('premixedPlan.jy') }}</el-button
  211. >
  212. <el-button
  213. v-if="dataSynchronization2.isDataSynchronization"
  214. class="success"
  215. icon="el-icon-plus"
  216. @click="form_updata"
  217. >{{ $t('dailyExecutionPlan.scjh') }}</el-button
  218. >
  219. <el-button
  220. v-if="dataSynchronization.isDataSynchronization && isRoleEdit"
  221. class="success"
  222. @click="handleDataSynchronization"
  223. >{{ $t('dailyExecutionPlan.sjtb') }}</el-button
  224. >
  225. <el-button
  226. v-if="dataSynchronization3.isDataSynchronization && isRoleEdit"
  227. class="success"
  228. @click="handleDataUpload"
  229. >{{ $t('dailyExecutionPlan.sjsc') }}</el-button
  230. >
  231. <el-button
  232. v-if="isRoleEdit"
  233. class="danger"
  234. icon="el-icon-delete"
  235. @click="handleDelete"
  236. >{{ $t('formulationEvaluation.del') }}</el-button
  237. >
  238. <el-button
  239. v-if="isRoleEdit && sapUpload.isSap"
  240. class="success"
  241. icon="el-icon-upload2"
  242. @click="handleSAPUpload"
  243. >{{ $t('dailyExecutionPlan.spasc') }}</el-button
  244. >
  245. <el-button
  246. v-if="isRoleEdit && ispalyUd"
  247. class="success"
  248. icon="el-icon-plus"
  249. @click="handleGetUd1"
  250. >{{ $t('dailyExecutionPlan.jbsjsc') }}</el-button
  251. >
  252. <el-button
  253. v-if="isRoleEdit && ispalyUd"
  254. class="success"
  255. icon="el-icon-plus"
  256. @click="handleGetUd2"
  257. >{{ $t('dailyExecutionPlan.slsc') }}</el-button
  258. >
  259. <el-button
  260. v-if="isRoleEdit && ispalyUd"
  261. class="success"
  262. icon="el-icon-plus"
  263. @click="handleGetUd3"
  264. >{{ $t('dailyExecutionPlan.salsc') }}</el-button
  265. >
  266. <el-button
  267. v-if="isRoleEdit"
  268. class="success"
  269. icon="el-icon-circle-check"
  270. @click="handleQuickcompletion"
  271. >{{ $t('dailyExecutionPlan.kswc') }}</el-button
  272. >
  273. </div>
  274. <!-- 日执行计划 -->
  275. <div class="table">
  276. <el-table
  277. id="table1"
  278. ref="parent"
  279. :key="table.tableKey"
  280. v-loading="table.listLoading"
  281. :element-loading-text="$t('common.tableMsg')"
  282. :data="table.list"
  283. border
  284. fit
  285. highlight-current-row
  286. style="width: 98%"
  287. row-key="id"
  288. :row-style="rowStyle1"
  289. :cell-style="cellStyle"
  290. class="elTable table-fixed"
  291. :row-class-name="tableRowClassName"
  292. :height="myheight"
  293. @row-click="tableRowClick"
  294. @selection-change="handleSelect"
  295. >
  296. <el-table-column type="selection" min-width="50" />
  297. <el-table-column
  298. :label="$t('formulationEvaluation.xh')"
  299. align="center"
  300. prop="sort"
  301. width="50px"
  302. />
  303. <el-table-column
  304. :label="$t('dailyExecutionPlan.jhmc')"
  305. min-width="90px"
  306. align="center"
  307. >
  308. <template slot-scope="scope">
  309. <span>{{ scope.row.projname }}</span>
  310. </template>
  311. </el-table-column>
  312. <el-table-column
  313. :label="$t('dailyExecutionPlan.jhlx')"
  314. prop="weight"
  315. min-width="90px"
  316. align="center"
  317. :formatter="lpplantype"
  318. />
  319. <el-table-column
  320. :label="$t('premixedPlan.tmrbh')"
  321. min-width="90px"
  322. align="center"
  323. >
  324. <template slot-scope="scope">
  325. <span>{{ scope.row.tmrtname }}</span>
  326. </template>
  327. </el-table-column>
  328. <el-table-column
  329. :label="$t('errorAnalysis.Driver')"
  330. min-width="150px"
  331. align="center"
  332. >
  333. <template slot-scope="scope">
  334. <!-- <span>{{ scope.row.driver }}</span> -->
  335. <el-select
  336. v-model="scope.row.driverId"
  337. :disabled="scope.row.havebutton == 1"
  338. filterable
  339. placeholder="驾驶员"
  340. class="filter-item"
  341. style="width: 95%; padding: 10px 0"
  342. :clearable="false"
  343. @change="
  344. (value) => {
  345. changeDriver(value, scope.row)
  346. }
  347. "
  348. >
  349. <el-option
  350. v-for="item in driverList"
  351. :key="item.id"
  352. :label="item.drivername"
  353. :value="item.id"
  354. />
  355. </el-select>
  356. </template>
  357. </el-table-column>
  358. <el-table-column
  359. :label="$t('dailyExecutionPlan.yzx')"
  360. min-width="70px"
  361. align="center"
  362. >
  363. <template slot-scope="scope">
  364. <div
  365. v-if="scope.row.havebutton == 0"
  366. style="background: #009a69; color: #fff; line-height: 30px"
  367. >
  368. {{ $t('feedChart.no') }}
  369. </div>
  370. <div
  371. v-else
  372. style="background: #fc2323; color: #000; line-height: 30px"
  373. >
  374. {{ $t('feedChart.yes') }}
  375. </div>
  376. </template>
  377. </el-table-column>
  378. <el-table-column
  379. :label="$t('errorAnalysis.isTrainNumber')"
  380. min-width="80px"
  381. align="center"
  382. >
  383. <template slot-scope="scope">
  384. <span>{{ scope.row.times }}</span>
  385. </template>
  386. </el-table-column>
  387. <el-table-column
  388. :label="$t('dailyExecutionPlan.lhl')"
  389. min-width="80px"
  390. align="center"
  391. >
  392. <template slot-scope="scope">
  393. <span>{{ scope.row.lweight }}</span>
  394. </template>
  395. </el-table-column>
  396. <el-table-column
  397. :label="$t('dailyExecutionPlan.qy')"
  398. min-width="70px"
  399. align="center"
  400. >
  401. <template slot-scope="scope">
  402. <el-switch
  403. v-if="dataDisabled == false"
  404. v-model="scope.row.enable"
  405. :disabled="scope.row.havebutton == 1"
  406. active-color="#13ce66"
  407. inactive-color="#ff4949"
  408. :active-value="1"
  409. :inactive-value="0"
  410. @change="handleEnableChange(scope.row)"
  411. />
  412. <el-switch
  413. v-else
  414. v-model="scope.row.enable"
  415. disabled
  416. active-color="#13ce66"
  417. inactive-color="#ff4949"
  418. :active-value="1"
  419. :inactive-value="0"
  420. @change="handleEnableChange(scope.row)"
  421. />
  422. </template>
  423. </el-table-column>
  424. <el-table-column
  425. :label="$t('premixedPlan.time')"
  426. min-width="80px"
  427. align="center"
  428. >
  429. <template slot-scope="scope">
  430. <span>{{ scope.row.plantime }}</span>
  431. </template>
  432. </el-table-column>
  433. <el-table-column
  434. :label="$t('errorAnalysis.feedName')"
  435. min-width="100px"
  436. align="center"
  437. >
  438. <template slot-scope="scope">
  439. <b style="font-size: 26px; line-height: 30px">{{
  440. scope.row.ftname
  441. }}</b>
  442. </template>
  443. </el-table-column>
  444. <el-table-column
  445. :label="$t('formulationEvaluation.nts')"
  446. min-width="80px"
  447. align="center"
  448. >
  449. <template slot-scope="scope">
  450. <span>{{ scope.row.cowcount }}</span>
  451. </template>
  452. </el-table-column>
  453. <el-table-column
  454. :label="$t('premixedPlan.ms')"
  455. min-width="80px"
  456. align="center"
  457. >
  458. <template slot-scope="scope">
  459. <span>{{ scope.row.display }}</span>
  460. </template>
  461. </el-table-column>
  462. <el-table-column
  463. :label="$t('dailyExecutionPlan.flw')"
  464. min-width="80px"
  465. align="left"
  466. >
  467. <template slot-scope="scope">
  468. <span>{{ scope.row.barnames }}</span>
  469. </template>
  470. </el-table-column>
  471. <el-table-column
  472. align="center"
  473. width="100"
  474. :label="$t('errorAnalysis.cz')"
  475. class-name="small-padding fixed-width"
  476. fixed="right"
  477. >
  478. <template slot-scope="{ row }">
  479. <el-button
  480. class="miniDanger"
  481. icon="el-icon-delete"
  482. @click="handleRowDelete(row)"
  483. />
  484. <el-button
  485. class="miniDanger"
  486. icon="el-icon-sort"
  487. @click="handleRowSort(row)"
  488. />
  489. </template>
  490. </el-table-column>
  491. </el-table>
  492. <span
  493. v-if="table.listLoading == false"
  494. style="margin-right: 30px; margin-top: 10px; font-size: 14px"
  495. >{{ $t('processAnalysis.total') }}{{ table.total
  496. }}{{ $t('processAnalysis.tiao') }}</span
  497. >
  498. </div>
  499. </div>
  500. <!-- maxHeight="enlargeHeight -->
  501. <div v-if="isDetail" style="position: relative">
  502. <el-button
  503. class="hide"
  504. @click="handleCloseTable2"
  505. style="position: absolute; right: 0; top: -20px"
  506. >{{ $t('formulationEvaluation.hide') }}</el-button
  507. >
  508. <!-- 预混料 -->
  509. <div
  510. v-if="table3.getdataListParm.parammaps.lpplantype == 4"
  511. class="content"
  512. >
  513. <el-row :gutter="20">
  514. <el-col :span="12">
  515. <div class="table2">
  516. <div class="contentOperation">
  517. <p>{{ $t('dailyExecutionPlan.jhxq') }}</p>
  518. </div>
  519. <div class="content-table">
  520. <el-table
  521. :key="table2.tableKey"
  522. v-loading="table2.listLoading"
  523. :element-loading-text="$t('common.tableMsg')"
  524. :data="table2.list"
  525. fit
  526. border
  527. highlight-current-row
  528. style="width: 100%"
  529. height="450"
  530. :row-style="rowStyle"
  531. :cell-style="cellStyle"
  532. class="elTable table-fixed"
  533. :span-method="objectSpanMethod"
  534. >
  535. <el-table-column
  536. :label="$t('dailyExecutionPlan.czxh')"
  537. width="90px"
  538. align="center"
  539. >
  540. <template slot-scope="scope">
  541. <span>{{ scope.row.sort }}</span>
  542. </template>
  543. </el-table-column>
  544. <el-table-column
  545. :label="$t('InventoryManagement.silc')"
  546. prop="fname"
  547. min-width="90px"
  548. align="center"
  549. >
  550. <template slot-scope="scope">
  551. <span>{{ scope.row.fname }}</span>
  552. </template>
  553. </el-table-column>
  554. <el-table-column
  555. :label="$t('dailyExecutionPlan.sjzl')"
  556. prop="weight"
  557. min-width="130px"
  558. align="center"
  559. >
  560. <template slot-scope="scope">
  561. <span v-if="scope.row.NoEdit">{{
  562. scope.row.weight
  563. }}</span>
  564. <el-input
  565. v-if="scope.row.Edit"
  566. v-model="scope.row.weight"
  567. type="number"
  568. maxlength="32"
  569. style="width: 95%; padding: 10px 0"
  570. />
  571. </template>
  572. </el-table-column>
  573. <el-table-column
  574. :label="$t('dailyExecutionPlan.xj')"
  575. prop="description"
  576. min-width="90px"
  577. align="center"
  578. >
  579. <template slot-scope="scope">
  580. <span>{{ scope.row.subtotal }}</span>
  581. </template>
  582. </el-table-column>
  583. <el-table-column
  584. :label="$t('errorAnalysis.cz')"
  585. align="left"
  586. min-width="200"
  587. class-name="small-padding"
  588. >
  589. <template slot-scope="{ row }">
  590. <el-button
  591. v-if="row.isUpdate && isRoleEdit"
  592. :disabled="
  593. table2.getdataListParm.parammaps.havebutton == 1
  594. "
  595. class="miniSuccess"
  596. icon="el-icon-edit-outline"
  597. @click="handleUpdate2(row)"
  598. />
  599. <span v-if="row.isUpdate && isRoleEdit" class="centerSpan"
  600. >|</span
  601. >
  602. <el-button
  603. v-if="row.isUpdateSave"
  604. :disabled="isokDisable"
  605. icon="el-icon-folder-checked"
  606. class="miniSuccess"
  607. @click="updateData2(row, '0')"
  608. />
  609. <span v-if="row.isUpdateSave" class="centerSpan">|</span>
  610. <el-button
  611. v-if="row.isUpdateSave"
  612. class="minCancel"
  613. icon="el-icon-close"
  614. @click="updateCancel2(row)"
  615. />
  616. <span v-if="row.isUpdate && isRoleEdit" class="centerSpan"
  617. >|</span
  618. >
  619. <el-button
  620. v-if="row.isUpdate && isRoleEdit"
  621. class="miniSuccess"
  622. @click="handleRowEmpty(row, 0)"
  623. >
  624. <svg-icon icon-class="clear" />
  625. </el-button>
  626. </template>
  627. </el-table-column>
  628. </el-table>
  629. </div>
  630. </div>
  631. </el-col>
  632. </el-row>
  633. </div>
  634. <!-- 撒料 -->
  635. <div
  636. v-if="table3.getdataListParm.parammaps.lpplantype == 0"
  637. class="content"
  638. >
  639. <el-row :gutter="20">
  640. <el-col :span="12">
  641. <div class="table2">
  642. <div class="contentOperation">
  643. <p>{{ $t('dailyExecutionPlan.jhxq') }}</p>
  644. </div>
  645. <div class="content-table">
  646. <el-table
  647. :key="table2.tableKey"
  648. v-loading="table2.listLoading"
  649. :element-loading-text="$t('common.tableMsg')"
  650. :data="table2.list"
  651. fit
  652. border
  653. highlight-current-row
  654. style="width: 100%"
  655. height="450"
  656. :row-style="rowStyle"
  657. :cell-style="cellStyle"
  658. class="elTable table-fixed"
  659. :span-method="objectSpanMethod"
  660. >
  661. <el-table-column
  662. :label="$t('dailyExecutionPlan.czxh')"
  663. min-width="90px"
  664. align="center"
  665. >
  666. <template slot-scope="scope">
  667. <span>{{ scope.row.sort }}</span>
  668. </template>
  669. </el-table-column>
  670. <el-table-column
  671. :label="$t('InventoryManagement.silc')"
  672. prop="fname"
  673. min-width="90px"
  674. align="center"
  675. >
  676. <template slot-scope="scope">
  677. <span>{{ scope.row.fname }}</span>
  678. </template>
  679. </el-table-column>
  680. <el-table-column
  681. :label="$t('dailyExecutionPlan.sjzl')"
  682. prop="weight"
  683. min-width="130px"
  684. align="center"
  685. >
  686. <template slot-scope="scope">
  687. <span v-if="scope.row.NoEdit">{{
  688. scope.row.weight
  689. }}</span>
  690. <el-input
  691. v-if="scope.row.Edit"
  692. v-model="scope.row.weight"
  693. type="number"
  694. maxlength="32"
  695. style="width: 95%; padding: 10px 0"
  696. />
  697. </template>
  698. </el-table-column>
  699. <el-table-column
  700. :label="$t('dailyExecutionPlan.xj')"
  701. prop="description"
  702. min-width="90px"
  703. align="center"
  704. >
  705. <template slot-scope="scope">
  706. <span>{{ scope.row.subtotal }}</span>
  707. </template>
  708. </el-table-column>
  709. <el-table-column
  710. :label="$t('errorAnalysis.cz')"
  711. align="left"
  712. min-width="200"
  713. class-name="small-padding"
  714. >
  715. <template slot-scope="{ row }">
  716. <el-button
  717. v-if="row.isUpdate && isRoleEdit"
  718. :disabled="
  719. table2.getdataListParm.parammaps.havebutton == 1
  720. "
  721. class="miniSuccess"
  722. icon="el-icon-edit-outline"
  723. @click="handleUpdate2(row)"
  724. />
  725. <el-button
  726. v-if="row.isUpdateSave"
  727. :disabled="isokDisable"
  728. icon="el-icon-folder-checked"
  729. class="miniSuccess"
  730. @click="updateData2(row, '0')"
  731. />
  732. <span v-if="row.isUpdateSave" class="centerSpan">|</span>
  733. <el-button
  734. v-if="row.isUpdateSave"
  735. class="minCancel"
  736. icon="el-icon-close"
  737. @click="updateCancel2(row)"
  738. />
  739. <span v-if="row.isUpdate && isRoleEdit" class="centerSpan"
  740. >|</span
  741. >
  742. <el-button
  743. v-if="row.isUpdate && isRoleEdit"
  744. class="miniSuccess"
  745. @click="handleRowEmpty(row, 0)"
  746. >
  747. <svg-icon icon-class="clear" />
  748. </el-button>
  749. </template>
  750. </el-table-column>
  751. </el-table>
  752. </div>
  753. </div>
  754. </el-col>
  755. <el-col :span="12">
  756. <div class="table3">
  757. <div class="contentOperation">
  758. <p>{{ $t('dailyExecutionPlan.lsxq') }}</p>
  759. </div>
  760. <div class="content-table">
  761. <el-table
  762. :key="table3.tableKey"
  763. v-loading="table3.listLoading"
  764. :element-loading-text="$t('common.tableMsg')"
  765. :data="table3.list"
  766. height="450"
  767. fit
  768. border
  769. highlight-current-row
  770. style="width: 100%"
  771. :row-style="rowStyle"
  772. :cell-style="cellStyle"
  773. class="elTable table-fixed"
  774. >
  775. <el-table-column
  776. :label="$t('dailyExecutionPlan.czxh')"
  777. min-width="90px"
  778. align="center"
  779. >
  780. <template slot-scope="scope">
  781. <span>{{ scope.row.sort }}</span>
  782. </template>
  783. </el-table-column>
  784. <el-table-column
  785. :label="$t('errorAnalysis.pen')"
  786. min-width="90px"
  787. align="center"
  788. >
  789. <template slot-scope="scope">
  790. <span>{{ scope.row.fname }}</span>
  791. </template>
  792. </el-table-column>
  793. <el-table-column
  794. :label="$t('dailyExecutionPlan.sjzl')"
  795. prop="weight"
  796. min-width="130px"
  797. align="center"
  798. >
  799. <template slot-scope="scope">
  800. <span v-if="scope.row.NoEdit">{{
  801. scope.row.weight
  802. }}</span>
  803. <el-input
  804. v-if="scope.row.Edit"
  805. v-model="scope.row.weight"
  806. type="number"
  807. maxlength="32"
  808. style="width: 95%; padding: 10px 0"
  809. />
  810. </template>
  811. </el-table-column>
  812. <el-table-column
  813. :label="$t('errorAnalysis.cz')"
  814. align="left"
  815. min-width="200"
  816. class-name="small-padding"
  817. >
  818. <template slot-scope="{ row }">
  819. <el-button
  820. v-if="row.isUpdate && isRoleEdit"
  821. :disabled="
  822. table3.getdataListParm.parammaps.havebutton == 1
  823. "
  824. class="miniSuccess"
  825. icon="el-icon-edit-outline"
  826. @click="handleUpdate3(row)"
  827. />
  828. <el-button
  829. v-if="row.isUpdateSave"
  830. :disabled="isokDisable"
  831. icon="el-icon-folder-checked"
  832. class="miniSuccess"
  833. @click="updateData3(row, '1')"
  834. />
  835. <span v-if="row.isUpdateSave" class="centerSpan">|</span>
  836. <el-button
  837. v-if="row.isUpdateSave"
  838. class="minCancel"
  839. icon="el-icon-close"
  840. @click="updateCancel3(row)"
  841. />
  842. <span v-if="row.isUpdate && isRoleEdit" class="centerSpan"
  843. >|</span
  844. >
  845. <el-button
  846. v-if="row.isUpdate && isRoleEdit"
  847. class="miniSuccess"
  848. @click="handleRowEmpty(row, 1)"
  849. >
  850. <svg-icon icon-class="clear" />
  851. </el-button>
  852. </template>
  853. </el-table-column>
  854. </el-table>
  855. </div>
  856. </div>
  857. </el-col>
  858. </el-row>
  859. </div>
  860. <!-- 剩料 -->
  861. <div
  862. v-if="table3.getdataListParm.parammaps.lpplantype == 3"
  863. class="content"
  864. >
  865. <el-row :gutter="20">
  866. <el-col :span="12"
  867. ><div class="table2">
  868. <div class="contentOperation">
  869. <p>{{ $t('dailyExecutionPlan.jhxq') }}</p>
  870. </div>
  871. <div class="content-table">
  872. <el-table
  873. :key="table2.tableKey"
  874. v-loading="table2.listLoading"
  875. :element-loading-text="$t('common.tableMsg')"
  876. :data="table2.list"
  877. fit
  878. border
  879. highlight-current-row
  880. style="width: 100%"
  881. height="450"
  882. :row-style="rowStyle"
  883. :cell-style="cellStyle"
  884. class="elTable table-fixed"
  885. :span-method="objectSpanMethod"
  886. >
  887. <el-table-column
  888. :label="$t('dailyExecutionPlan.czxh')"
  889. min-width="130px"
  890. align="center"
  891. >
  892. <template slot-scope="scope">
  893. <span>{{ scope.row.sort }}</span>
  894. </template>
  895. </el-table-column>
  896. <el-table-column
  897. :label="$t('dailyExecutionPlan.qlls')"
  898. prop="fname"
  899. min-width="130px"
  900. align="center"
  901. >
  902. <template slot-scope="scope">
  903. <span>{{ scope.row.fname }}</span>
  904. </template>
  905. </el-table-column>
  906. <el-table-column
  907. :label="$t('message.msg311')"
  908. prop="useinbar"
  909. min-width="130px"
  910. align="center"
  911. >
  912. <template slot-scope="scope">
  913. <span>{{ scope.row.useinbar }}</span>
  914. </template>
  915. </el-table-column>
  916. <el-table-column
  917. :label="$t('dailyExecutionPlan.xj')"
  918. prop="description"
  919. min-width="130px"
  920. align="center"
  921. >
  922. <template slot-scope="scope">
  923. <span>{{ scope.row.subtotal }}</span>
  924. </template>
  925. </el-table-column>
  926. </el-table>
  927. </div>
  928. </div>
  929. </el-col>
  930. <el-col :span="12">
  931. <div class="table3">
  932. <div class="contentOperation">
  933. <p>{{ $t('dailyExecutionPlan.lsxq') }}</p>
  934. </div>
  935. <div class="content-table">
  936. <el-table
  937. :key="table3.tableKey"
  938. v-loading="table3.listLoading"
  939. :element-loading-text="$t('common.tableMsg')"
  940. :data="table3.list"
  941. height="450"
  942. fit
  943. border
  944. highlight-current-row
  945. style="width: 100%"
  946. :row-style="rowStyle"
  947. :cell-style="cellStyle"
  948. class="elTable table-fixed"
  949. >
  950. <el-table-column
  951. :label="$t('dailyExecutionPlan.czxh')"
  952. min-width="130px"
  953. align="center"
  954. >
  955. <template slot-scope="scope">
  956. <span>{{ scope.row.sort }}</span>
  957. </template>
  958. </el-table-column>
  959. <el-table-column
  960. :label="$t('premixedPlan.ztls')"
  961. min-width="130px"
  962. align="center"
  963. >
  964. <template slot-scope="scope">
  965. <span>{{ scope.row.fname }}</span>
  966. </template>
  967. </el-table-column>
  968. </el-table>
  969. </div>
  970. </div>
  971. </el-col>
  972. </el-row>
  973. </div>
  974. <!-- 撒料计划-混料 -->
  975. <div
  976. v-if="
  977. table3.getdataListParm.parammaps.lpplantype == 1 ||
  978. table3.getdataListParm.parammaps.lpplantype == 5
  979. "
  980. class="content"
  981. >
  982. <el-row :gutter="20">
  983. <el-col :span="12">
  984. <div class="table2">
  985. <div class="contentOperation">
  986. <p>{{ $t('dailyExecutionPlan.jhxq') }}</p>
  987. </div>
  988. <div class="content-table">
  989. <el-table
  990. :key="table2.tableKey"
  991. v-loading="table2.listLoading"
  992. :element-loading-text="$t('common.tableMsg')"
  993. :data="table2.list"
  994. fit
  995. border
  996. highlight-current-row
  997. style="width: 100%"
  998. height="450"
  999. :row-style="rowStyle"
  1000. :cell-style="cellStyle"
  1001. class="elTable table-fixed"
  1002. :span-method="objectSpanMethod"
  1003. >
  1004. <el-table-column
  1005. :label="$t('dailyExecutionPlan.czxh')"
  1006. min-width="90px"
  1007. align="center"
  1008. >
  1009. <template slot-scope="scope">
  1010. <span>{{ scope.row.sort }}</span>
  1011. </template>
  1012. </el-table-column>
  1013. <el-table-column
  1014. :label="$t('InventoryManagement.silc')"
  1015. prop="fname"
  1016. min-width="90px"
  1017. align="center"
  1018. >
  1019. <template slot-scope="scope">
  1020. <span>{{ scope.row.fname }}</span>
  1021. </template>
  1022. </el-table-column>
  1023. <el-table-column
  1024. :label="$t('dailyExecutionPlan.sjzl')"
  1025. prop="weight"
  1026. min-width="130px"
  1027. align="center"
  1028. >
  1029. <template slot-scope="scope">
  1030. <span v-if="scope.row.NoEdit">{{
  1031. scope.row.weight
  1032. }}</span>
  1033. <el-input
  1034. v-if="scope.row.Edit"
  1035. v-model="scope.row.weight"
  1036. type="number"
  1037. maxlength="32"
  1038. style="width: 95%; padding: 10px 0"
  1039. />
  1040. </template>
  1041. </el-table-column>
  1042. <el-table-column
  1043. :label="$t('dailyExecutionPlan.xj')"
  1044. prop="description"
  1045. min-width="90px"
  1046. align="center"
  1047. >
  1048. <template slot-scope="scope">
  1049. <span>{{ scope.row.subtotal }}</span>
  1050. </template>
  1051. </el-table-column>
  1052. <el-table-column
  1053. :label="$t('errorAnalysis.cz')"
  1054. align="left"
  1055. min-width="200"
  1056. class-name="small-padding"
  1057. >
  1058. <template slot-scope="{ row }">
  1059. <el-button
  1060. v-if="row.isUpdate && isRoleEdit"
  1061. :disabled="
  1062. table2.getdataListParm.parammaps.havebutton == 1
  1063. "
  1064. class="miniSuccess"
  1065. icon="el-icon-edit-outline"
  1066. @click="handleUpdate2(row)"
  1067. />
  1068. <el-button
  1069. v-if="row.isUpdateSave"
  1070. :disabled="isokDisable"
  1071. icon="el-icon-folder-checked"
  1072. class="miniSuccess"
  1073. @click="updateData2(row, '0')"
  1074. />
  1075. <span v-if="row.isUpdateSave" class="centerSpan">|</span>
  1076. <el-button
  1077. v-if="row.isUpdateSave"
  1078. class="minCancel"
  1079. icon="el-icon-close"
  1080. @click="updateCancel2(row)"
  1081. />
  1082. <span v-if="row.isUpdate && isRoleEdit" class="centerSpan"
  1083. >|</span
  1084. >
  1085. <el-button
  1086. v-if="row.isUpdate && isRoleEdit"
  1087. class="miniSuccess"
  1088. @click="handleRowEmpty(row, 0)"
  1089. >
  1090. <svg-icon icon-class="clear" />
  1091. </el-button>
  1092. </template>
  1093. </el-table-column>
  1094. </el-table>
  1095. </div>
  1096. </div>
  1097. </el-col>
  1098. <el-col :span="12">
  1099. <div class="table3">
  1100. <div class="contentOperation">
  1101. <p>{{ $t('dailyExecutionPlan.lsxq') }}</p>
  1102. </div>
  1103. <div class="content-table">
  1104. <el-table
  1105. :key="table3.tableKey"
  1106. v-loading="table3.listLoading"
  1107. :element-loading-text="$t('common.tableMsg')"
  1108. :data="table3.list"
  1109. height="450"
  1110. fit
  1111. border
  1112. highlight-current-row
  1113. style="width: 100%"
  1114. :row-style="rowStyle"
  1115. :cell-style="cellStyle"
  1116. class="elTable table-fixed"
  1117. >
  1118. <el-table-column
  1119. :label="$t('dailyExecutionPlan.czxh')"
  1120. min-width="90px"
  1121. align="center"
  1122. >
  1123. <template slot-scope="scope">
  1124. <span>{{ scope.row.sort }}</span>
  1125. </template>
  1126. </el-table-column>
  1127. <el-table-column
  1128. :label="$t('processAnalysis.slcl')"
  1129. min-width="90px"
  1130. align="center"
  1131. >
  1132. <template slot-scope="scope">
  1133. <span>{{ scope.row.fname }}</span>
  1134. </template>
  1135. </el-table-column>
  1136. <el-table-column
  1137. :label="$t('dailyExecutionPlan.sjzl')"
  1138. min-width="130px"
  1139. align="center"
  1140. >
  1141. <template slot-scope="scope">
  1142. <span v-if="scope.row.NoEdit">{{
  1143. scope.row.weight
  1144. }}</span>
  1145. <el-input
  1146. v-if="scope.row.Edit"
  1147. v-model="scope.row.weight"
  1148. type="number"
  1149. maxlength="32"
  1150. style="width: 95%; padding: 10px 0"
  1151. />
  1152. </template>
  1153. </el-table-column>
  1154. <el-table-column
  1155. :label="$t('errorAnalysis.cz')"
  1156. align="left"
  1157. min-width="200"
  1158. class-name="small-padding"
  1159. >
  1160. <template slot-scope="{ row }">
  1161. <el-button
  1162. v-if="row.isUpdate && isRoleEdit"
  1163. :disabled="
  1164. table3.getdataListParm.parammaps.havebutton == 1
  1165. "
  1166. class="miniSuccess"
  1167. icon="el-icon-edit-outline"
  1168. @click="handleUpdate3(row)"
  1169. />
  1170. <el-button
  1171. v-if="row.isUpdateSave"
  1172. :disabled="isokDisable"
  1173. icon="el-icon-folder-checked"
  1174. class="miniSuccess"
  1175. @click="updateData3(row, '1')"
  1176. />
  1177. <span v-if="row.isUpdateSave" class="centerSpan">|</span>
  1178. <el-button
  1179. v-if="row.isUpdateSave"
  1180. class="minCancel"
  1181. icon="el-icon-close"
  1182. @click="updateCancel3(row)"
  1183. />
  1184. <span v-if="row.isUpdate && isRoleEdit" class="centerSpan"
  1185. >|</span
  1186. >
  1187. <el-button
  1188. v-if="row.isUpdate && isRoleEdit"
  1189. class="miniSuccess"
  1190. @click="handleRowEmpty(row, 1)"
  1191. >
  1192. <svg-icon icon-class="clear" />
  1193. </el-button>
  1194. </template>
  1195. </el-table-column>
  1196. </el-table>
  1197. </div>
  1198. </div>
  1199. </el-col>
  1200. </el-row>
  1201. </div>
  1202. <!-- 撒料计划-撒料 -->
  1203. <div
  1204. v-if="table3.getdataListParm.parammaps.lpplantype == 2"
  1205. class="content"
  1206. >
  1207. <el-row :gutter="20">
  1208. <el-col :span="12">
  1209. <div class="table3">
  1210. <div class="contentOperation">
  1211. <p>{{ $t('dailyExecutionPlan.lsxq') }}</p>
  1212. </div>
  1213. <div class="content-table">
  1214. <el-table
  1215. :key="table3.tableKey"
  1216. v-loading="table3.listLoading"
  1217. :element-loading-text="$t('common.tableMsg')"
  1218. :data="table3.list"
  1219. height="450"
  1220. fit
  1221. border
  1222. highlight-current-row
  1223. style="width: 100%"
  1224. :row-style="rowStyle"
  1225. :cell-style="cellStyle"
  1226. class="elTable table-fixed"
  1227. >
  1228. <el-table-column
  1229. :label="$t('dailyExecutionPlan.czxh')"
  1230. min-width="90px"
  1231. align="center"
  1232. >
  1233. <template slot-scope="scope">
  1234. <span>{{ scope.row.sort }}</span>
  1235. </template>
  1236. </el-table-column>
  1237. <el-table-column
  1238. :label="$t('processAnalysis.slcl')"
  1239. min-width="90px"
  1240. align="center"
  1241. >
  1242. <template slot-scope="scope">
  1243. <span>{{ scope.row.fname }}</span>
  1244. </template>
  1245. </el-table-column>
  1246. <el-table-column
  1247. :label="$t('dailyExecutionPlan.sjzl')"
  1248. min-width="130px"
  1249. align="center"
  1250. >
  1251. <template slot-scope="scope">
  1252. <span v-if="scope.row.NoEdit">{{
  1253. scope.row.weight
  1254. }}</span>
  1255. <el-input
  1256. v-if="scope.row.Edit"
  1257. v-model="scope.row.weight"
  1258. type="number"
  1259. maxlength="32"
  1260. style="width: 95%; padding: 10px 0"
  1261. />
  1262. </template>
  1263. </el-table-column>
  1264. <el-table-column
  1265. :label="$t('dailyExecutionPlan.xj')"
  1266. prop="description"
  1267. min-width="90px"
  1268. align="center"
  1269. >
  1270. <template slot-scope="scope">
  1271. <span>{{ scope.row.subtotal }}</span>
  1272. </template>
  1273. </el-table-column>
  1274. <el-table-column
  1275. :label="$t('errorAnalysis.cz')"
  1276. align="left"
  1277. min-width="200"
  1278. class-name="small-padding"
  1279. >
  1280. <template slot-scope="{ row }">
  1281. <el-button
  1282. v-if="row.isUpdate && isRoleEdit"
  1283. :disabled="
  1284. table3.getdataListParm.parammaps.havebutton == 1
  1285. "
  1286. class="miniSuccess"
  1287. icon="el-icon-edit-outline"
  1288. @click="handleUpdate3(row)"
  1289. />
  1290. <el-button
  1291. v-if="row.isUpdateSave"
  1292. :disabled="isokDisable"
  1293. icon="el-icon-folder-checked"
  1294. class="miniSuccess"
  1295. @click="updateData3(row, '0')"
  1296. />
  1297. <span v-if="row.isUpdateSave" class="centerSpan">|</span>
  1298. <el-button
  1299. v-if="row.isUpdateSave"
  1300. class="minCancel"
  1301. icon="el-icon-close"
  1302. @click="updateCancel3(row)"
  1303. />
  1304. <span v-if="row.isUpdate && isRoleEdit" class="centerSpan"
  1305. >|</span
  1306. >
  1307. <el-button
  1308. v-if="row.isUpdate && isRoleEdit"
  1309. class="miniSuccess"
  1310. @click="handleRowEmpty(row, 0)"
  1311. >
  1312. <svg-icon icon-class="clear" />
  1313. </el-button>
  1314. </template>
  1315. </el-table-column>
  1316. </el-table>
  1317. </div>
  1318. </div>
  1319. </el-col>
  1320. <el-col :span="12">
  1321. <div class="table2">
  1322. <div class="contentOperation">
  1323. <p>{{ $t('dailyExecutionPlan.jhxq') }}</p>
  1324. </div>
  1325. <div class="content-table">
  1326. <el-table
  1327. :key="table2.tableKey"
  1328. v-loading="table2.listLoading"
  1329. :element-loading-text="$t('common.tableMsg')"
  1330. :data="table2.list"
  1331. fit
  1332. border
  1333. highlight-current-row
  1334. style="width: 100%"
  1335. height="450"
  1336. :row-style="rowStyle"
  1337. :cell-style="cellStyle"
  1338. class="elTable table-fixed"
  1339. >
  1340. <el-table-column
  1341. :label="$t('dailyExecutionPlan.czxh')"
  1342. min-width="90px"
  1343. align="center"
  1344. >
  1345. <template slot-scope="scope">
  1346. <span>{{ scope.row.sort }}</span>
  1347. </template>
  1348. </el-table-column>
  1349. <el-table-column
  1350. :label="$t('errorAnalysis.isHouseName')"
  1351. prop="fname"
  1352. min-width="90px"
  1353. align="center"
  1354. >
  1355. <template slot-scope="scope">
  1356. <span>{{ scope.row.fname }}</span>
  1357. </template>
  1358. </el-table-column>
  1359. <el-table-column
  1360. :label="$t('dailyExecutionPlan.sjzl')"
  1361. prop="weight"
  1362. width="130px"
  1363. align="center"
  1364. >
  1365. <template slot-scope="scope">
  1366. <span v-if="scope.row.NoEdit">{{
  1367. scope.row.weight
  1368. }}</span>
  1369. <el-input
  1370. v-if="scope.row.Edit"
  1371. v-model="scope.row.weight"
  1372. type="number"
  1373. maxlength="32"
  1374. style="width: 95%; padding: 10px 0"
  1375. />
  1376. </template>
  1377. </el-table-column>
  1378. <el-table-column
  1379. :label="$t('errorAnalysis.cz')"
  1380. align="left"
  1381. min-width="200"
  1382. class-name="small-padding"
  1383. >
  1384. <template slot-scope="{ row }">
  1385. <el-button
  1386. v-if="row.isUpdate && isRoleEdit"
  1387. :disabled="
  1388. table2.getdataListParm.parammaps.havebutton == 1
  1389. "
  1390. class="miniSuccess"
  1391. icon="el-icon-edit-outline"
  1392. @click="handleUpdate2(row)"
  1393. />
  1394. <el-button
  1395. v-if="row.isUpdateSave"
  1396. :disabled="isokDisable"
  1397. icon="el-icon-folder-checked"
  1398. class="miniSuccess"
  1399. @click="updateData2(row, '1')"
  1400. />
  1401. <span v-if="row.isUpdateSave" class="centerSpan">|</span>
  1402. <el-button
  1403. v-if="row.isUpdateSave"
  1404. class="minCancel"
  1405. icon="el-icon-close"
  1406. @click="updateCancel2(row)"
  1407. />
  1408. <span v-if="row.isUpdate && isRoleEdit" class="centerSpan"
  1409. >|</span
  1410. >
  1411. <el-button
  1412. v-if="row.isUpdate && isRoleEdit"
  1413. class="miniSuccess"
  1414. @click="handleRowEmpty(row, 1)"
  1415. >
  1416. <svg-icon icon-class="clear" />
  1417. </el-button>
  1418. </template>
  1419. </el-table-column>
  1420. </el-table>
  1421. </div>
  1422. </div>
  1423. </el-col>
  1424. </el-row>
  1425. </div>
  1426. </div>
  1427. <!-- 新生成 -->
  1428. <el-dialog
  1429. :title="textMap[newGeneration.dialogStatus]"
  1430. :destroy-on-close="true"
  1431. :visible.sync="newGeneration.dialogFormVisible"
  1432. :close-on-click-modal="false"
  1433. width="35%"
  1434. >
  1435. <div class="newGeneration" v-loading="newGenerationLoading">
  1436. <el-form
  1437. ref="temp"
  1438. :rules="newGeneration.rules"
  1439. :model="newGeneration.temp"
  1440. label-position="right"
  1441. label-width="120px"
  1442. style="width: 100%; margin: 0 auto 50px"
  1443. >
  1444. <el-row v-if="newGeneration.dialogStatus == 'newGeneration'">
  1445. <el-col :span="24">
  1446. <el-form-item
  1447. :label="$t('dailyExecutionPlan.sjfw')"
  1448. prop="inputDatetime"
  1449. >
  1450. <el-date-picker
  1451. v-model="newGeneration.temp.inputDatetime"
  1452. class="inputDatetime filter-item"
  1453. type="daterange"
  1454. :range-separator="$t('common.to')"
  1455. :start-placeholder="$t('common.startTime')"
  1456. :end-placeholder="$t('common.endTime')"
  1457. style="width: 100%"
  1458. :clearable="false"
  1459. :picker-options="pickerOptions2"
  1460. />
  1461. </el-form-item>
  1462. </el-col>
  1463. </el-row>
  1464. <el-row v-else>
  1465. <el-col :span="24">
  1466. <el-form-item
  1467. :label="$t('dailyExecutionPlan.sjfw')"
  1468. prop="copyInputDatetime"
  1469. >
  1470. <el-date-picker
  1471. v-model="newGeneration.temp.copyInputDatetime"
  1472. :picker-options="pickerOptions"
  1473. class="inputDatetime filter-item"
  1474. type="daterange"
  1475. :range-separator="$t('common.to')"
  1476. :start-placeholder="$t('common.startTime')"
  1477. :end-placeholder="$t('common.endTime')"
  1478. style="width: 100%"
  1479. :clearable="false"
  1480. />
  1481. </el-form-item>
  1482. </el-col>
  1483. </el-row>
  1484. <p
  1485. v-if="
  1486. newGeneration.temp.tips == true ||
  1487. newGeneration.dialogStatus == 'copy'
  1488. "
  1489. style="font-weight: 700; color: red; text-align: center"
  1490. >
  1491. {{ $t('dailyExecutionPlan.note') }}
  1492. </p>
  1493. <div style="height: 200px; overflow: auto">
  1494. <div v-if="myMaxTimes == 1">
  1495. <div>{{ $t('dailyExecutionPlan.dyBan1') }}</div>
  1496. <div v-for="(item, index) in tipsList.one" :key="index + 'A'">
  1497. <b
  1498. v-if="
  1499. item.arrList !== null &&
  1500. item.arrList !== undefined &&
  1501. item.arrList.length > 0
  1502. "
  1503. >{{ item.ftname }}:</b
  1504. >
  1505. <span
  1506. v-if="
  1507. item.arrList !== null &&
  1508. item.arrList !== undefined &&
  1509. item.arrList.length > 0
  1510. "
  1511. >
  1512. <span
  1513. v-for="(item2, index2) in item.arrList"
  1514. :key="index2 + 'a'"
  1515. >
  1516. {{ item2.barname }}
  1517. </span>
  1518. </span>
  1519. </div>
  1520. </div>
  1521. <div v-else-if="myMaxTimes == 2">
  1522. <div>{{ $t('dailyExecutionPlan.dyBan1') }}</div>
  1523. <div v-for="(item, index) in tipsList.one" :key="index + 'B'">
  1524. <b
  1525. v-if="
  1526. item.arrList !== null &&
  1527. item.arrList !== undefined &&
  1528. item.arrList.length > 0
  1529. "
  1530. >{{ item.ftname }}:</b
  1531. >
  1532. <span
  1533. v-if="
  1534. item.arrList !== null &&
  1535. item.arrList !== undefined &&
  1536. item.arrList.length > 0
  1537. "
  1538. >
  1539. <span
  1540. v-for="(item2, index2) in item.arrList"
  1541. :key="index2 + 'b'"
  1542. >
  1543. {{ item2.barname }}
  1544. </span>
  1545. </span>
  1546. </div>
  1547. <div>{{ $t('dailyExecutionPlan.dyBan2') }}</div>
  1548. <div v-for="(item, index) in tipsList.two" :key="index + 'C'">
  1549. <b
  1550. v-if="
  1551. item.arrList !== null &&
  1552. item.arrList !== undefined &&
  1553. item.arrList.length > 0
  1554. "
  1555. >{{ item.ftname }}:</b
  1556. >
  1557. <span
  1558. v-if="
  1559. item.arrList !== null &&
  1560. item.arrList !== undefined &&
  1561. item.arrList.length > 0
  1562. "
  1563. >
  1564. <span
  1565. v-for="(item2, index2) in item.arrList"
  1566. :key="index2 + 'c'"
  1567. >
  1568. {{ item2.barname }}
  1569. </span>
  1570. </span>
  1571. </div>
  1572. </div>
  1573. <div v-else-if="myMaxTimes == 3">
  1574. <div>{{ $t('dailyExecutionPlan.dyBan1') }}</div>
  1575. <div v-for="(item, index) in tipsList.one" :key="index + 'D'">
  1576. <b
  1577. v-if="
  1578. item.arrList !== null &&
  1579. item.arrList !== undefined &&
  1580. item.arrList.length > 0
  1581. "
  1582. >{{ item.ftname }}:</b
  1583. >
  1584. <span
  1585. v-if="
  1586. item.arrList !== null &&
  1587. item.arrList !== undefined &&
  1588. item.arrList.length > 0
  1589. "
  1590. >
  1591. <span
  1592. v-for="(item2, index2) in item.arrList"
  1593. :key="index2 + 'd'"
  1594. >
  1595. {{ item2.barname }}
  1596. </span>
  1597. </span>
  1598. </div>
  1599. <div>{{ $t('dailyExecutionPlan.dyBan2') }}</div>
  1600. <div v-for="(item, index) in tipsList.two" :key="index + 'E'">
  1601. <b
  1602. v-if="
  1603. item.arrList !== null &&
  1604. item.arrList !== undefined &&
  1605. item.arrList.length > 0
  1606. "
  1607. >{{ item.ftname }}:</b
  1608. >
  1609. <span
  1610. v-if="
  1611. item.arrList !== null &&
  1612. item.arrList !== undefined &&
  1613. item.arrList.length > 0
  1614. "
  1615. >
  1616. <span
  1617. v-for="(item2, index2) in item.arrList"
  1618. :key="index2 + 'e'"
  1619. >
  1620. {{ item2.barname }}
  1621. </span>
  1622. </span>
  1623. </div>
  1624. <div>{{ $t('dailyExecutionPlan.dyBan3') }}</div>
  1625. <div v-for="(item, index) in tipsList.three" :key="index + 'F'">
  1626. <b
  1627. v-if="
  1628. item.arrList !== null &&
  1629. item.arrList !== undefined &&
  1630. item.arrList.length > 0
  1631. "
  1632. >{{ item.ftname }}:</b
  1633. >
  1634. <span
  1635. v-if="
  1636. item.arrList !== null &&
  1637. item.arrList !== undefined &&
  1638. item.arrList.length > 0
  1639. "
  1640. >
  1641. <span
  1642. v-for="(item2, index2) in item.arrList"
  1643. :key="index2 + 'f'"
  1644. >
  1645. {{ item2.barname }}
  1646. </span>
  1647. </span>
  1648. </div>
  1649. </div>
  1650. <div v-else>
  1651. <div>{{ $t('dailyExecutionPlan.dyBan1') }}</div>
  1652. <div v-for="(item, index) in tipsList.one" :key="index + 'G'">
  1653. <b
  1654. v-if="
  1655. item.arrList !== null &&
  1656. item.arrList !== undefined &&
  1657. item.arrList.length > 0
  1658. "
  1659. >{{ item.ftname }}:</b
  1660. >
  1661. <span
  1662. v-if="
  1663. item.arrList !== null &&
  1664. item.arrList !== undefined &&
  1665. item.arrList.length > 0
  1666. "
  1667. >
  1668. <span
  1669. v-for="(item2, index2) in item.arrList"
  1670. :key="index2 + 'g'"
  1671. >
  1672. {{ item2.barname }}
  1673. </span>
  1674. </span>
  1675. </div>
  1676. <div>{{ $t('dailyExecutionPlan.dyBan2') }}</div>
  1677. <div v-for="(item, index) in tipsList.two" :key="index + 'H'">
  1678. <b
  1679. v-if="
  1680. item.arrList !== null &&
  1681. item.arrList !== undefined &&
  1682. item.arrList.length > 0
  1683. "
  1684. >{{ item.ftname }}:</b
  1685. >
  1686. <span
  1687. v-if="
  1688. item.arrList !== null &&
  1689. item.arrList !== undefined &&
  1690. item.arrList.length > 0
  1691. "
  1692. >
  1693. <span
  1694. v-for="(item2, index2) in item.arrList"
  1695. :key="index2 + 'h'"
  1696. >
  1697. {{ item2.barname }}
  1698. </span>
  1699. </span>
  1700. </div>
  1701. <div>{{ $t('dailyExecutionPlan.dyBan3') }}</div>
  1702. <div v-for="(item, index) in tipsList.three" :key="index + 'I'">
  1703. <b
  1704. v-if="
  1705. item.arrList !== null &&
  1706. item.arrList !== undefined &&
  1707. item.arrList.length > 0
  1708. "
  1709. >{{ item.ftname }}:</b
  1710. >
  1711. <span
  1712. v-if="
  1713. item.arrList !== null &&
  1714. item.arrList !== undefined &&
  1715. item.arrList.length > 0
  1716. "
  1717. >
  1718. <span
  1719. v-for="(item2, index2) in item.arrList"
  1720. :key="index2 + 'i'"
  1721. >
  1722. {{ item2.barname }}
  1723. </span>
  1724. </span>
  1725. </div>
  1726. <div>{{ $t('dailyExecutionPlan.dyBan4') }}</div>
  1727. <div v-for="(item, index) in tipsList.four" :key="index + 'J'">
  1728. <b
  1729. v-if="
  1730. item.arrList !== null &&
  1731. item.arrList !== undefined &&
  1732. item.arrList.length > 0
  1733. "
  1734. >{{ item.ftname }}:</b
  1735. >
  1736. <span
  1737. v-if="
  1738. item.arrList !== null &&
  1739. item.arrList !== undefined &&
  1740. item.arrList.length > 0
  1741. "
  1742. >
  1743. <span
  1744. v-for="(item2, index2) in item.arrList"
  1745. :key="index2 + 'j'"
  1746. >
  1747. {{ item2.barname }}
  1748. </span>
  1749. </span>
  1750. </div>
  1751. </div>
  1752. </div>
  1753. </el-form>
  1754. <div slot="footer" class="dialog-footer" style="bottom: 20px">
  1755. <el-button
  1756. class="cancelClose"
  1757. @click="
  1758. newGeneration.dialogFormVisible = false
  1759. getList()
  1760. "
  1761. >{{ $t('formulationEvaluation.cancel') }}</el-button
  1762. >
  1763. <el-button
  1764. v-if="newGeneration.dialogStatus == 'newGeneration'"
  1765. class="save"
  1766. :disabled="isokDisable"
  1767. @click="newGenerationData()"
  1768. >{{ $t('errorAnalysis.confirm') }}</el-button
  1769. >
  1770. <el-button
  1771. v-else
  1772. class="save"
  1773. :disabled="isokDisable"
  1774. @click="copyData()"
  1775. >{{ $t('errorAnalysis.confirm') }}</el-button
  1776. >
  1777. </div>
  1778. </div>
  1779. </el-dialog>
  1780. <!-- 历史记录 -->
  1781. <el-dialog
  1782. :fullscreen="dialogFull"
  1783. :destroy-on-close="true"
  1784. :visible.sync="historyRecord.dialogFormVisible"
  1785. :close-on-click-modal="false"
  1786. width="90%"
  1787. >
  1788. <template slot="title">
  1789. <div class="avue-crud__dialog__header">
  1790. <span class="el-dialog__title">
  1791. <span
  1792. style="
  1793. display: inline-block;
  1794. width: 3px;
  1795. height: 20px;
  1796. margin-right: 5px;
  1797. float: left;
  1798. margin-top: 2px;
  1799. "
  1800. />
  1801. {{ textMap[historyRecord.dialogStatus] }}
  1802. </span>
  1803. <div
  1804. class="avue-crud__dialog__menu"
  1805. @click="dialogFull ? (dialogFull = false) : (dialogFull = true)"
  1806. >
  1807. <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
  1808. <svg-icon v-else icon-class="fullscreen" />
  1809. </div>
  1810. </div>
  1811. </template>
  1812. <div class="historyRecord">
  1813. <keep-alive>
  1814. <component :is="historyRecord.myComponent" ref="historyRecord" />
  1815. </keep-alive>
  1816. </div>
  1817. <div slot="footer" class="dialog-footer">
  1818. <el-button
  1819. class="cancelClose cancelClose1"
  1820. @click="historyRecord.dialogFormVisible = false"
  1821. >{{ $t('common.closed') }}</el-button
  1822. >
  1823. </div>
  1824. </el-dialog>
  1825. <!-- 正在同步中 -->
  1826. <el-dialog
  1827. :destroy-on-close="true"
  1828. :visible.sync="dataSynchronization.dialogFormVisible"
  1829. :close-on-click-modal="false"
  1830. width="30%"
  1831. >
  1832. <div
  1833. class="dataSynchronization"
  1834. style="text-align: center; font-size: 18px"
  1835. >
  1836. <i class="el-icon-loading" />
  1837. <span>{{ $t('dailyExecutionPlan.zztb') }} </span>
  1838. <div slot="footer" class="dialog-footer" style="bottom: 10px">
  1839. <el-button
  1840. class="miniPrimary"
  1841. @click="dataSynchronization.dialogFormVisible = false"
  1842. >{{ $t('errorAnalysis.confirm') }}</el-button
  1843. >
  1844. </div>
  1845. </div>
  1846. </el-dialog>
  1847. <!-- 修改计划 -->
  1848. <RevisePlan
  1849. :show.sync="isShowDialog"
  1850. :parent-active-name="activeName"
  1851. :parent-date="parentDate"
  1852. />
  1853. <!-- 删除记录 -->
  1854. <el-dialog
  1855. :title="textMap[deleteRecord.dialogStatus]"
  1856. :destroy-on-close="true"
  1857. :visible.sync="deleteRecord.dialogFormVisible"
  1858. :close-on-click-modal="false"
  1859. width="90%"
  1860. >
  1861. <div class="deleteRecord">
  1862. <div class="search">
  1863. <el-date-picker
  1864. v-model="deleteRecord.mydate"
  1865. type="date"
  1866. :placeholder="$t('dailyExecutionPlan.xzrq')"
  1867. style="width: 150px"
  1868. format="yyyy-MM-dd"
  1869. value-format="yyyy-MM-dd"
  1870. :clearable="false"
  1871. @change="changeDeleteRecordDate"
  1872. />
  1873. </div>
  1874. <div class="table">
  1875. <el-table
  1876. :key="deleteRecord.tableKey"
  1877. v-loading="deleteRecord.listLoading"
  1878. :element-loading-text="$t('common.tableMsg')"
  1879. :data="deleteRecord.list"
  1880. border
  1881. fit
  1882. highlight-current-row
  1883. style="width: 98%"
  1884. row-key="id"
  1885. :row-style="rowStyle"
  1886. :cell-style="cellStyle"
  1887. class="elTable table-fixed"
  1888. :height="370"
  1889. >
  1890. <el-table-column
  1891. :label="$t('formulationEvaluation.xh')"
  1892. align="center"
  1893. prop="sort"
  1894. width="50px"
  1895. />
  1896. <el-table-column
  1897. :label="$t('dailyExecutionPlan.jhmc')"
  1898. min-width="90px"
  1899. align="center"
  1900. prop="projname"
  1901. />
  1902. <el-table-column
  1903. :label="$t('dailyExecutionPlan.jhlx')"
  1904. prop="weight"
  1905. min-width="90px"
  1906. align="center"
  1907. :formatter="lpplantype"
  1908. />
  1909. <el-table-column
  1910. :label="$t('premixedPlan.tmrbh')"
  1911. min-width="90px"
  1912. align="center"
  1913. prop="tmrtname"
  1914. />
  1915. <el-table-column
  1916. :label="$t('errorAnalysis.Driver')"
  1917. min-width="90px"
  1918. align="center"
  1919. prop="driver"
  1920. />
  1921. <el-table-column
  1922. :label="$t('dailyExecutionPlan.yzx')"
  1923. min-width="70px"
  1924. align="center"
  1925. >
  1926. <template slot-scope="scope">
  1927. <span v-if="scope.row.havebutton == 0">{{
  1928. $t('feedChart.no')
  1929. }}</span>
  1930. <span v-else>{{ $t('feedChart.yes') }}</span>
  1931. </template>
  1932. </el-table-column>
  1933. <el-table-column
  1934. :label="$t('errorAnalysis.isTrainNumber')"
  1935. min-width="80px"
  1936. align="center"
  1937. prop="times"
  1938. />
  1939. <el-table-column
  1940. :label="$t('dailyExecutionPlan.lhl')"
  1941. min-width="80px"
  1942. align="center"
  1943. prop="lweight"
  1944. />
  1945. <el-table-column
  1946. :label="$t('dailyExecutionPlan.qy')"
  1947. min-width="70px"
  1948. align="center"
  1949. >
  1950. <template slot-scope="scope">
  1951. <el-switch
  1952. v-if="dataDisabled == false"
  1953. disabled
  1954. v-model="scope.row.enable"
  1955. active-color="#13ce66"
  1956. inactive-color="#ff4949"
  1957. :active-value="1"
  1958. :inactive-value="0"
  1959. @change="handleEnableChange(scope.row)"
  1960. />
  1961. <el-switch
  1962. v-else
  1963. v-model="scope.row.enable"
  1964. disabled
  1965. active-color="#13ce66"
  1966. inactive-color="#ff4949"
  1967. :active-value="1"
  1968. :inactive-value="0"
  1969. @change="handleEnableChange(scope.row)"
  1970. />
  1971. </template>
  1972. </el-table-column>
  1973. <el-table-column
  1974. :label="$t('premixedPlan.time')"
  1975. min-width="80px"
  1976. align="center"
  1977. prop="plantime"
  1978. />
  1979. <el-table-column
  1980. :label="$t('errorAnalysis.feedName')"
  1981. min-width="100px"
  1982. align="center"
  1983. prop="ftname"
  1984. />
  1985. <el-table-column
  1986. :label="$t('formulationEvaluation.nts')"
  1987. min-width="80px"
  1988. align="center"
  1989. prop="cowcount"
  1990. />
  1991. <el-table-column
  1992. :label="$t('premixedPlan.ms')"
  1993. min-width="80px"
  1994. align="center"
  1995. prop="display"
  1996. />
  1997. <el-table-column
  1998. :label="$t('dailyExecutionPlan.flw')"
  1999. min-width="80px"
  2000. align="left"
  2001. prop="barnames"
  2002. />
  2003. </el-table>
  2004. <span
  2005. v-if="deleteRecord.listLoading == false"
  2006. style="margin-right: 30px; margin-top: 10px; font-size: 14px"
  2007. >{{ $t('processAnalysis.total') }}{{ deleteRecord.total
  2008. }}{{ $t('processAnalysis.tiao') }}</span
  2009. >
  2010. </div>
  2011. <div slot="footer" class="dialog-footer" style="bottom: 20px">
  2012. <el-button
  2013. class="cancelClose1"
  2014. @click="
  2015. deleteRecord.dialogFormVisible = false
  2016. getList()
  2017. "
  2018. >{{ $t('formulationEvaluation.cancel') }}</el-button
  2019. >
  2020. </div>
  2021. </div>
  2022. </el-dialog>
  2023. <el-dialog
  2024. :title="textMap[sapUpload.dialogStatus]"
  2025. :destroy-on-close="true"
  2026. :visible.sync="sapUpload.dialogFormVisible"
  2027. :close-on-click-modal="false"
  2028. width="30%"
  2029. >
  2030. <div class="sapUpload">
  2031. <el-form
  2032. ref="sapUpload"
  2033. :rules="sapUpload.rules"
  2034. :model="sapUpload.temp"
  2035. label-position="right"
  2036. label-width="100px"
  2037. style="width: 100%; margin: 0 auto 50px"
  2038. >
  2039. <el-row>
  2040. <el-col :span="24">
  2041. <el-form-item :label="$t('premixedPlan.time')" prop="date">
  2042. <el-date-picker
  2043. v-model="sapUpload.temp.date"
  2044. :clearable="false"
  2045. class="filter-item"
  2046. type="date"
  2047. />
  2048. </el-form-item>
  2049. </el-col>
  2050. </el-row>
  2051. </el-form>
  2052. <div slot="footer" class="dialog-footer" style="bottom: 20px">
  2053. <el-button
  2054. class="cancelClose"
  2055. @click="
  2056. sapUpload.dialogFormVisible = false
  2057. getList()
  2058. "
  2059. >{{ $t('formulationEvaluation.cancel') }}</el-button
  2060. >
  2061. <el-button
  2062. class="save"
  2063. v-if="sapUpload.dialogStatus == 'sapUpload'"
  2064. :disabled="isokDisable"
  2065. @click="sapUploadData()"
  2066. >{{ $t('errorAnalysis.confirm') }}</el-button
  2067. >
  2068. <el-button
  2069. class="save"
  2070. v-else-if="sapUpload.dialogStatus == 'udload1'"
  2071. :disabled="isokDisable"
  2072. @click="udData1()"
  2073. >{{ $t('errorAnalysis.confirm') }}</el-button
  2074. >
  2075. <el-button
  2076. class="save"
  2077. v-else-if="sapUpload.dialogStatus == 'udload2'"
  2078. :disabled="isokDisable"
  2079. @click="udData2()"
  2080. >{{ $t('errorAnalysis.confirm') }}</el-button
  2081. >
  2082. <el-button
  2083. class="save"
  2084. v-else-if="sapUpload.dialogStatus == 'udload3'"
  2085. :disabled="isokDisable"
  2086. @click="udData3()"
  2087. >{{ $t('errorAnalysis.confirm') }}</el-button
  2088. >
  2089. </div>
  2090. </div>
  2091. </el-dialog>
  2092. </div>
  2093. </template>
  2094. <script>
  2095. import {
  2096. GetDataByName,
  2097. GetDataByNames,
  2098. ExecDataByConfig,
  2099. PostDataByName,
  2100. getDorm,
  2101. GetReportform,
  2102. checkButtons,
  2103. postJson,
  2104. postJson2,
  2105. SyncSCJH
  2106. } from '@/api/common'
  2107. import RevisePlan from './revisePlan.vue'
  2108. import printJS from 'print-js'
  2109. import {
  2110. parseTime,
  2111. json2excel,
  2112. handleTableSpan,
  2113. handleObjectSpanMethod
  2114. } from '@/utils/index.js'
  2115. import Cookies from 'js-cookie'
  2116. import Sortable from 'sortablejs'
  2117. import { MessageBox } from 'element-ui'
  2118. export default {
  2119. name: 'DailyExecutionPlan',
  2120. components: {
  2121. RevisePlan
  2122. },
  2123. data() {
  2124. return {
  2125. myheight: document.documentElement.clientHeight - 280,
  2126. // myheight: 500,
  2127. enlargeHeight: document.documentElement.clientHeight - 85 - 165 + 50,
  2128. isDetail: false,
  2129. newGenerationLoading: false,
  2130. dialogFull: false,
  2131. isRoleEdit: [],
  2132. dataDisabled: false,
  2133. requestParams: [
  2134. // { name: 'getDictByName', offset: 0, pagecount: 0, params: ['牲畜父类'] }
  2135. ],
  2136. planTypeList: this.$t('dailyExecutionPlan.planTypeList'), // 计划类型
  2137. printingTypeList: this.$t('dailyExecutionPlan.printingTypeList'), // 打印类型
  2138. frequencyList: [], // 班次
  2139. planningDimensionList: this.$t(
  2140. 'dailyExecutionPlan.planningDimensionList'
  2141. ), // 发料顺序
  2142. exportTypeList: this.$t('dailyExecutionPlan.exportTypeList'), // 导出类型
  2143. iscompletedList: this.$t('dailyExecutionPlan.iscompletedList'),
  2144. // 班次
  2145. maxTime: {
  2146. getMaxTimesParm: {
  2147. name: 'getSysoptEnable',
  2148. page: 1,
  2149. offset: 1,
  2150. pagecount: 1,
  2151. returntype: 'Map',
  2152. parammaps: {
  2153. pastureid: Cookies.get('pastureid'),
  2154. inforname: 'times'
  2155. }
  2156. }
  2157. },
  2158. isOrder: true,
  2159. table: {
  2160. getdataListParm: {
  2161. name: 'getDownloadedplanList',
  2162. page: 1,
  2163. offset: 1,
  2164. pagecount: '',
  2165. returntype: 'Map',
  2166. parammaps: {
  2167. pastureid: Cookies.get('pastureid'),
  2168. barid: '',
  2169. mydate: parseTime(new Date(), '{y}-{m}-{d}'),
  2170. times: '',
  2171. lpplantype: '',
  2172. printType: '',
  2173. plandimen: '0',
  2174. enable3: '0',
  2175. iscompleted: '',
  2176. tmrname: ''
  2177. }
  2178. },
  2179. tableKey: 0,
  2180. list: [],
  2181. total: 0,
  2182. listLoading: false
  2183. },
  2184. // 计划内容操作详情
  2185. table2: {
  2186. getdataListParm: {
  2187. name: 'getDownloadplandtl1ListV2',
  2188. page: 1,
  2189. offset: 1,
  2190. returntype: 'Map',
  2191. parammaps: {
  2192. pastureid: Cookies.get('pastureid'),
  2193. date: '',
  2194. id: ''
  2195. }
  2196. },
  2197. tableKey: 0,
  2198. list: [],
  2199. total: 0,
  2200. listLoading: false
  2201. },
  2202. // 计划内容 舍栏详情
  2203. table3: {
  2204. getdataListParm: {
  2205. name: 'getDownloadplandt2ListV2',
  2206. page: 1,
  2207. offset: 1,
  2208. returntype: 'Map',
  2209. parammaps: {
  2210. pastureid: Cookies.get('pastureid'),
  2211. date: '',
  2212. id: ''
  2213. }
  2214. },
  2215. tableKey: 0,
  2216. list: [],
  2217. total: 0,
  2218. listLoading: false
  2219. },
  2220. // 新生成
  2221. newGeneration: {
  2222. dialogFormVisible: false,
  2223. dialogStatus: '',
  2224. getdataListParm: {
  2225. name: 'checkLLPIsDistribution',
  2226. page: 1,
  2227. offset: 1,
  2228. pagecount: 1,
  2229. returntype: 'Map',
  2230. parammaps: {
  2231. pastureid: Cookies.get('pastureid')
  2232. }
  2233. },
  2234. temp: {
  2235. inputDatetime: [
  2236. parseTime(new Date(), '{y}-{m}-{d}'),
  2237. parseTime(new Date(), '{y}-{m}-{d}')
  2238. ],
  2239. tips: ''
  2240. },
  2241. rules: {
  2242. inputDatetime: [
  2243. {
  2244. type: 'array',
  2245. required: true,
  2246. message: this.$t('hardwareTest.bt'),
  2247. trigger: 'blur'
  2248. }
  2249. ],
  2250. copyInputDatetime: [
  2251. {
  2252. type: 'array',
  2253. required: true,
  2254. message: this.$t('hardwareTest.bt'),
  2255. trigger: 'blur'
  2256. }
  2257. ]
  2258. }
  2259. },
  2260. pickerMinDate: '',
  2261. pickerOptions: {
  2262. onPick: ({ maxDate, minDate }) => {
  2263. this.pickerMinDate = minDate.getTime()
  2264. if (maxDate) {
  2265. this.pickerMinDate = ''
  2266. }
  2267. },
  2268. disabledDate: (time) => {
  2269. if (this.pickerMinDate !== '') {
  2270. const one = 31 * 24 * 3600 * 1000
  2271. const minTime = this.pickerMinDate
  2272. const maxTime = this.pickerMinDate + one
  2273. return time.getTime() < minTime || time.getTime() > maxTime - 8.64e7
  2274. }
  2275. return time.getTime() < Date.now() - 8.64e7
  2276. }
  2277. },
  2278. pickerOptions2: {
  2279. onPick: ({ maxDate, minDate }) => {
  2280. this.pickerMinDate = minDate.getTime()
  2281. if (maxDate) {
  2282. this.pickerMinDate = ''
  2283. }
  2284. },
  2285. disabledDate: (time) => {
  2286. if (this.pickerMinDate !== '') {
  2287. const one = 14 * 24 * 3600 * 1000
  2288. const minTime = this.pickerMinDate
  2289. const maxTime = this.pickerMinDate + one
  2290. return time.getTime() < minTime || time.getTime() > maxTime - 8.64e7
  2291. }
  2292. return time.getTime() < Date.now() - 8.64e7
  2293. }
  2294. },
  2295. historyRecord: {
  2296. dialogFormVisible: false,
  2297. dialogStatus: '',
  2298. myComponent: null
  2299. },
  2300. dataSynchronization: {
  2301. dialogFormVisible: false,
  2302. dialogStatus: '',
  2303. getdataListParm: {
  2304. name: 'getSysoptEnable',
  2305. page: 1,
  2306. offset: 1,
  2307. pagecount: 1,
  2308. returntype: 'Map',
  2309. parammaps: {
  2310. pastureid: Cookies.get('pastureid'),
  2311. inforname: 'isDataSync'
  2312. }
  2313. },
  2314. isDataSynchronization: false
  2315. },
  2316. dataSynchronization2: {
  2317. dialogFormVisible: false,
  2318. dialogStatus: '',
  2319. getdataListParm: {
  2320. name: 'getSysoptEnable',
  2321. page: 1,
  2322. offset: 1,
  2323. pagecount: 1,
  2324. returntype: 'Map',
  2325. parammaps: {
  2326. pastureid: Cookies.get('pastureid'),
  2327. inforname: 'zcSync'
  2328. }
  2329. },
  2330. isDataSynchronization: false
  2331. },
  2332. dataSynchronization3: {
  2333. dialogFormVisible: false,
  2334. dialogStatus: '',
  2335. getdataListParm: {
  2336. name: 'getSysoptEnable',
  2337. page: 1,
  2338. offset: 1,
  2339. pagecount: 1,
  2340. returntype: 'Map',
  2341. parammaps: {
  2342. pastureid: Cookies.get('pastureid'),
  2343. inforname: 'wgSap'
  2344. }
  2345. },
  2346. isDataSynchronization: false
  2347. },
  2348. textMap: {
  2349. newGeneration: this.$t('message.msg298'),
  2350. historyRecord: this.$t('message.msg34'),
  2351. revisePlan: this.$t('message.msg220'),
  2352. copy: this.$t('message.msg303'),
  2353. deleteRecord: this.$t('message.msg297'),
  2354. sapUpload: this.$t('message.msg299'),
  2355. udload1: this.$t('message.msg300'),
  2356. udload2: this.$t('message.msg301'),
  2357. udload3: this.$t('message.msg302')
  2358. },
  2359. isokDisable: false,
  2360. requestParam: {},
  2361. rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
  2362. rowStyle1: { height: 80 + 'px' },
  2363. cellStyle: { padding: 0 + 'px' },
  2364. isShowDialog: false,
  2365. activeName: this.$t('dailyExecutionPlan.lspf'),
  2366. parentDate: '',
  2367. downLoad: {
  2368. getdataListParm: {
  2369. name: '',
  2370. page: 1,
  2371. offset: 1,
  2372. pagecount: '',
  2373. returntype: 'Map',
  2374. parammaps: {
  2375. pastureid: Cookies.get('pastureid'),
  2376. date: ''
  2377. }
  2378. },
  2379. list: [],
  2380. labelList: []
  2381. },
  2382. tmrDownList: [],
  2383. getTmrListParam: {
  2384. name: 'getDownloadedplanTmrNameUnfinished',
  2385. page: 1,
  2386. offset: 1,
  2387. pagecount: 10,
  2388. returntype: 'Map',
  2389. parammaps: {
  2390. pastureid: Cookies.get('pastureid'),
  2391. mydate: parseTime(new Date(), '{y}-{m}-{d}')
  2392. }
  2393. },
  2394. myMaxTimes: '',
  2395. tipsList: [],
  2396. spanObj: {},
  2397. mergekeys: ['sort', 'description'],
  2398. deleteRecord: {
  2399. dialogFormVisible: false,
  2400. dialogStatus: '',
  2401. total: 0,
  2402. tableKey: 0,
  2403. listLoading: false,
  2404. list: [],
  2405. mydate: parseTime(new Date(), '{y}-{m}-{d}')
  2406. },
  2407. selectList: [],
  2408. driverList: [],
  2409. sapUpload: {
  2410. dialogFormVisible: false,
  2411. dialogStatus: '',
  2412. temp: {
  2413. date: parseTime(new Date(), '{y}-{m}-{d}')
  2414. },
  2415. rules: {
  2416. date: [
  2417. {
  2418. required: true,
  2419. message: this.$t('hardwareTest.bt'),
  2420. trigger: 'blur'
  2421. }
  2422. ]
  2423. },
  2424. getdataListParm: {
  2425. name: 'getSysoptEnable',
  2426. page: 1,
  2427. offset: 1,
  2428. pagecount: 1,
  2429. returntype: 'Map',
  2430. parammaps: {
  2431. pastureid: Cookies.get('pastureid'),
  2432. inforname: 'xdmysapupload'
  2433. }
  2434. },
  2435. isSap: false
  2436. },
  2437. ispalyUd: false
  2438. }
  2439. },
  2440. created() {
  2441. this.getIspalyUd()
  2442. this.parentDate = this.table.getdataListParm.parammaps.mydate
  2443. console.log(this.parentDate, 'this.parentDate')
  2444. this.getDataSynchronization()
  2445. this.getDataSynchronization2()
  2446. this.getDataSynchronization3()
  2447. this.getButtons()
  2448. this.getList()
  2449. this.getDownList()
  2450. this.getIsDisplay()
  2451. this.getIsSap()
  2452. this.getTMRList()
  2453. this.getDriverList()
  2454. },
  2455. mounted() {
  2456. this.getTmrListParam.parammaps.mydate = parseTime(new Date(), '{y}-{m}-{d}')
  2457. },
  2458. methods: {
  2459. getDriverList() {
  2460. const url = 'authdata/GetDataByName'
  2461. const data = {
  2462. name: 'getDriverList',
  2463. page: 1,
  2464. offset: 1,
  2465. pagecount: 50,
  2466. returntype: 'Map',
  2467. parammaps: { pastureid: Cookies.get('pastureid') }
  2468. }
  2469. postJson(url, data).then((response) => {
  2470. if (response.data !== null) {
  2471. this.driverList = response.data.list
  2472. } else {
  2473. this.driverList = []
  2474. }
  2475. })
  2476. },
  2477. getTMRList() {
  2478. this.getTmrListParam.parammaps.mydate =
  2479. this.table.getdataListParm.parammaps.mydate
  2480. GetDataByName(this.getTmrListParam).then((response) => {
  2481. if (response.data.list !== null) {
  2482. this.tmrDownList = response.data.list
  2483. }
  2484. })
  2485. },
  2486. getButtons() {
  2487. const Edit = 'DailyExecutionPlan'
  2488. const isRoleEdit = checkButtons(
  2489. JSON.parse(sessionStorage.getItem('buttons')),
  2490. Edit
  2491. )
  2492. this.isRoleEdit = isRoleEdit
  2493. },
  2494. getDataSynchronization() {
  2495. GetDataByName(this.dataSynchronization.getdataListParm).then(
  2496. (response) => {
  2497. // console.log(response.data.list[0])
  2498. if (response.data.list !== null) {
  2499. if (response.data.list[0].inforvalue == 0) {
  2500. this.dataSynchronization.isDataSynchronization = false
  2501. } else {
  2502. this.dataSynchronization.isDataSynchronization = true
  2503. }
  2504. }
  2505. }
  2506. )
  2507. },
  2508. getDataSynchronization2() {
  2509. GetDataByName(this.dataSynchronization2.getdataListParm).then(
  2510. (response) => {
  2511. if (response.data.list !== null) {
  2512. if (response.data.list[0].inforvalue == 0) {
  2513. this.dataSynchronization2.isDataSynchronization = false
  2514. } else {
  2515. this.dataSynchronization2.isDataSynchronization = true
  2516. }
  2517. }
  2518. }
  2519. )
  2520. },
  2521. getDataSynchronization3() {
  2522. GetDataByName(this.dataSynchronization3.getdataListParm).then(
  2523. (response) => {
  2524. // console.log(response.data.list[0])
  2525. if (response.data.list[0].inforvalue == 0) {
  2526. this.dataSynchronization3.isDataSynchronization = false
  2527. } else {
  2528. this.dataSynchronization3.isDataSynchronization = true
  2529. }
  2530. }
  2531. )
  2532. },
  2533. form_updata() {
  2534. var send_data = {
  2535. name: 'syncSCJH',
  2536. page: 1,
  2537. offset: 1,
  2538. pagecount: 1,
  2539. returntype: 'Map',
  2540. parammaps: {
  2541. // pastureid: Cookies.get('pastureid'),
  2542. // inforname: 'isDataSync'
  2543. }
  2544. }
  2545. SyncSCJH(send_data).then((response) => {
  2546. if (response.msg === 'fail') {
  2547. this.$notify({
  2548. title: this.$t('message.msg40'),
  2549. message: response.data,
  2550. type: 'warning',
  2551. duration: 2000
  2552. })
  2553. } else {
  2554. this.$notify({
  2555. title: this.$t('common.succes'),
  2556. message: this.$t('message.msg190'),
  2557. type: 'success',
  2558. duration: 2000
  2559. })
  2560. }
  2561. })
  2562. },
  2563. getIsDisplay() {
  2564. GetDataByName(this.maxTime.getMaxTimesParm).then((response) => {
  2565. console.log(response.data.list[0].inforvalue)
  2566. this.myMaxTimes = response.data.list[0].inforvalue
  2567. if (response.data.list[0].inforvalue == 1) {
  2568. this.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one') }]
  2569. } else if (response.data.list[0].inforvalue == 2) {
  2570. this.frequencyList = [
  2571. { id: '1', name: this.$t('errorAnalysis.one') },
  2572. { id: '2', name: this.$t('errorAnalysis.two') }
  2573. ]
  2574. } else if (response.data.list[0].inforvalue == 3) {
  2575. this.frequencyList = [
  2576. { id: '1', name: this.$t('errorAnalysis.one') },
  2577. { id: '2', name: this.$t('errorAnalysis.two') },
  2578. { id: '3', name: this.$t('errorAnalysis.three') }
  2579. ]
  2580. } else if (response.data.list[0].inforvalue == 4) {
  2581. this.frequencyList = [
  2582. { id: '1', name: this.$t('errorAnalysis.one') },
  2583. { id: '2', name: this.$t('errorAnalysis.two') },
  2584. { id: '3', name: this.$t('errorAnalysis.three') },
  2585. { id: '4', name: this.$t('errorAnalysis.four') }
  2586. ]
  2587. } else if (response.data.list[0].inforvalue == 5) {
  2588. this.frequencyList = [
  2589. { id: '1', name: this.$t('errorAnalysis.one') },
  2590. { id: '2', name: this.$t('errorAnalysis.two') },
  2591. { id: '3', name: this.$t('errorAnalysis.three') },
  2592. { id: '4', name: this.$t('errorAnalysis.four') },
  2593. { id: '5', name: this.$t('errorAnalysis.five') }
  2594. ]
  2595. } else if (response.data.list[0].inforvalue == 6) {
  2596. this.frequencyList = [
  2597. { id: '1', name: this.$t('errorAnalysis.one') },
  2598. { id: '2', name: this.$t('errorAnalysis.two') },
  2599. { id: '3', name: this.$t('errorAnalysis.three') },
  2600. { id: '4', name: this.$t('errorAnalysis.four') },
  2601. { id: '5', name: this.$t('errorAnalysis.five') },
  2602. { id: '6', name: this.$t('errorAnalysis.six') }
  2603. ]
  2604. }
  2605. })
  2606. },
  2607. getDownList() {
  2608. GetDataByNames(this.requestParams).then((response) => {
  2609. // this.livestockTypeList = response.data.getDictByName.list
  2610. })
  2611. },
  2612. // -------------------日执行计划-----------------------------
  2613. handleBefore() {
  2614. if (
  2615. this.table.getdataListParm.parammaps.mydate !== '' &&
  2616. this.table.getdataListParm.parammaps.mydate !== null
  2617. ) {
  2618. this.table.getdataListParm.parammaps.mydate = new Date(
  2619. this.table.getdataListParm.parammaps.mydate
  2620. )
  2621. var start = new Date(
  2622. this.table.getdataListParm.parammaps.mydate.setDate(
  2623. this.table.getdataListParm.parammaps.mydate.getDate() - 1
  2624. )
  2625. )
  2626. // var start = this.table.getdataListParm.parammaps.mydate - 1
  2627. this.table.getdataListParm.parammaps.mydate = parseTime(
  2628. start,
  2629. '{y}-{m}-{d}'
  2630. )
  2631. // this.$forceUpdate()
  2632. this.parentDate = this.table.getdataListParm.parammaps.mydate
  2633. this.getTMRList()
  2634. this.getList()
  2635. }
  2636. var d = this.table.getdataListParm.parammaps.mydate
  2637. var curDate = parseTime(new Date(), '{y}-{m}-{d}')
  2638. if (d < curDate) {
  2639. this.dataDisabled = true
  2640. } else {
  2641. this.dataDisabled = false
  2642. }
  2643. console.log(this.dataDisabled)
  2644. },
  2645. handleNext() {
  2646. if (
  2647. this.table.getdataListParm.parammaps.mydate !== '' &&
  2648. this.table.getdataListParm.parammaps.mydate !== null
  2649. ) {
  2650. this.table.getdataListParm.parammaps.mydate = new Date(
  2651. this.table.getdataListParm.parammaps.mydate
  2652. )
  2653. var stop = new Date(
  2654. this.table.getdataListParm.parammaps.mydate.setDate(
  2655. this.table.getdataListParm.parammaps.mydate.getDate() + 1
  2656. )
  2657. )
  2658. this.table.getdataListParm.parammaps.mydate = parseTime(
  2659. stop,
  2660. '{y}-{m}-{d}'
  2661. )
  2662. this.parentDate = this.table.getdataListParm.parammaps.mydate
  2663. this.getTMRList()
  2664. this.getList()
  2665. }
  2666. var d = this.table.getdataListParm.parammaps.mydate
  2667. var curDate = parseTime(new Date(), '{y}-{m}-{d}')
  2668. if (d < curDate) {
  2669. this.dataDisabled = true
  2670. } else {
  2671. this.dataDisabled = false
  2672. }
  2673. console.log(this.dataDisabled)
  2674. },
  2675. getList() {
  2676. this.table.listLoading = true
  2677. GetDataByName(this.table.getdataListParm).then((response) => {
  2678. console.log('table数据', response.data.list)
  2679. if (response.data.list !== null) {
  2680. // var obj = { 'id': '580999', 'havebutton': '0', 'lpplantype': 2, 'pid': '3283220207862547456', 'times': '第二班', 'projname': '2.666' }
  2681. // response.data.list[6] = obj
  2682. this.getIsColor(response.data.list)
  2683. this.table.list = response.data.list
  2684. this.table.pageNum = response.data.pageNum
  2685. this.table.pageSize = response.data.pageSize
  2686. this.table.total = response.data.total
  2687. console.log('计划类型', response.data.list[0].lpplantype)
  2688. this.table2.getdataListParm.parammaps.havebutton =
  2689. response.data.list[0].havebutton
  2690. this.table3.getdataListParm.parammaps.havebutton =
  2691. response.data.list[0].havebutton
  2692. if (response.data.list[0].lpplantype == 0) {
  2693. // 撒料
  2694. this.table2.getdataListParm.name = 'getDownloadplandtl1ListV2'
  2695. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  2696. this.table2.getdataListParm.parammaps.useinbartype = ''
  2697. this.table3.getdataListParm.parammaps.useinbartype = ''
  2698. this.table2.getdataListParm.parammaps.date =
  2699. this.table.getdataListParm.parammaps.mydate
  2700. this.table3.getdataListParm.parammaps.date =
  2701. this.table.getdataListParm.parammaps.mydate
  2702. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  2703. this.table3.getdataListParm.parammaps.id = response.data.list[0].id
  2704. this.table3.getdataListParm.parammaps.lpplantype =
  2705. response.data.list[0].lpplantype
  2706. this.getList2()
  2707. this.getList3()
  2708. } else if (response.data.list[0].lpplantype == 1) {
  2709. // 撒料计划-混料
  2710. this.table2.getdataListParm.name = 'getDownloadplandtl1ListV2'
  2711. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  2712. this.table2.getdataListParm.parammaps.useinbartype = ''
  2713. this.table3.getdataListParm.parammaps.useinbartype = ''
  2714. this.table2.getdataListParm.parammaps.date =
  2715. this.table.getdataListParm.parammaps.mydate
  2716. this.table3.getdataListParm.parammaps.date =
  2717. this.table.getdataListParm.parammaps.mydate
  2718. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  2719. this.table3.getdataListParm.parammaps.id = response.data.list[0].id
  2720. this.table3.getdataListParm.parammaps.lpplantype =
  2721. response.data.list[0].lpplantype
  2722. this.getList2()
  2723. this.getList3()
  2724. } else if (response.data.list[0].lpplantype == 2) {
  2725. // 撒料计划-撒料
  2726. this.table2.getdataListParm.name = 'getDownloadplandt2ListV2'
  2727. this.table3.getdataListParm.name = 'getDownloadplandtl1ListV2'
  2728. this.table2.getdataListParm.parammaps.useinbartype = ''
  2729. this.table3.getdataListParm.parammaps.useinbartype = ''
  2730. this.table2.getdataListParm.parammaps.date =
  2731. this.table.getdataListParm.parammaps.mydate
  2732. this.table3.getdataListParm.parammaps.date =
  2733. this.table.getdataListParm.parammaps.mydate
  2734. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  2735. this.table3.getdataListParm.parammaps.id = response.data.list[0].id
  2736. this.table3.getdataListParm.parammaps.lpplantype =
  2737. response.data.list[0].lpplantype
  2738. this.getList2()
  2739. this.getList3()
  2740. } else if (response.data.list[0].lpplantype == 3) {
  2741. // 剩料
  2742. this.table2.getdataListParm.name = 'getDownloadplandt2ListV2'
  2743. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  2744. this.table2.getdataListParm.parammaps.useinbartype = 0
  2745. this.table3.getdataListParm.parammaps.useinbartype = 1
  2746. this.table2.getdataListParm.parammaps.date =
  2747. this.table.getdataListParm.parammaps.mydate
  2748. this.table3.getdataListParm.parammaps.date =
  2749. this.table.getdataListParm.parammaps.mydate
  2750. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  2751. this.table3.getdataListParm.parammaps.id = response.data.list[0].id
  2752. this.table3.getdataListParm.parammaps.lpplantype =
  2753. response.data.list[0].lpplantype
  2754. this.getList2()
  2755. this.getList3()
  2756. } else if (response.data.list[0].lpplantype == 4) {
  2757. // 预混
  2758. this.table2.getdataListParm.name = 'getDownloadplandtl1ListV2'
  2759. this.table2.getdataListParm.parammaps.useinbartype = ''
  2760. this.table3.getdataListParm.parammaps.useinbartype = ''
  2761. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  2762. this.table3.getdataListParm.parammaps.lpplantype =
  2763. response.data.list[0].lpplantype
  2764. this.getList2()
  2765. } else if (response.data.list[0].lpplantype == 5) {
  2766. // 预称重计划
  2767. this.table2.getdataListParm.name = 'getDownloadplandtl1ListV2'
  2768. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  2769. this.table2.getdataListParm.parammaps.useinbartype = ''
  2770. this.table3.getdataListParm.parammaps.useinbartype = ''
  2771. this.table2.getdataListParm.parammaps.date =
  2772. this.table.getdataListParm.parammaps.mydate
  2773. this.table3.getdataListParm.parammaps.date =
  2774. this.table.getdataListParm.parammaps.mydate
  2775. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  2776. this.table3.getdataListParm.parammaps.id = response.data.list[0].id
  2777. this.table3.getdataListParm.parammaps.lpplantype =
  2778. response.data.list[0].lpplantype
  2779. this.getList2()
  2780. this.getList3()
  2781. }
  2782. } else {
  2783. this.table.list = []
  2784. this.table3.getdataListParm.parammaps.lpplantype = ''
  2785. this.table2.getdataListParm.parammaps.id = ''
  2786. this.table3.getdataListParm.parammaps.id = ''
  2787. // this.getList2()
  2788. // this.getList3()
  2789. this.table2.list = []
  2790. this.table3.list = []
  2791. }
  2792. setTimeout(() => {
  2793. this.table.listLoading = false
  2794. }, 100)
  2795. })
  2796. },
  2797. form_search() {
  2798. this.getTMRList()
  2799. this.table.getdataListParm.offset = 1
  2800. this.getList()
  2801. },
  2802. handleEnableChange(row) {
  2803. this.requestParam.name = 'updatedownloadenable'
  2804. this.requestParam.parammaps = {}
  2805. this.requestParam.parammaps.pastureid = row.pastureid
  2806. this.requestParam.parammaps.id = row.id
  2807. this.requestParam.parammaps.enable = row.enable
  2808. PostDataByName(this.requestParam).then((response) => {
  2809. if (response.msg === 'fail') {
  2810. this.$notify({
  2811. title: this.$t('driver.saveFail'),
  2812. message: response.data,
  2813. type: 'warning',
  2814. duration: 2000
  2815. })
  2816. } else {
  2817. this.$notify({
  2818. title: '',
  2819. message: this.$t('driver.saveSuccess'),
  2820. type: 'success',
  2821. duration: 2000
  2822. })
  2823. this.getList()
  2824. }
  2825. })
  2826. },
  2827. getIsColor(arr) {
  2828. var map = {}
  2829. var dest = []
  2830. for (var i = 0; i < arr.length; i++) {
  2831. var ai = arr[i]
  2832. if (!map[ai.pid]) {
  2833. dest.push({
  2834. pid: ai.pid,
  2835. data: [ai]
  2836. })
  2837. map[ai.pid] = ai
  2838. } else {
  2839. for (var j = 0; j < dest.length; j++) {
  2840. var dj = dest[j]
  2841. if (dj.pid == ai.pid) {
  2842. dj.data.push(ai)
  2843. break
  2844. }
  2845. }
  2846. }
  2847. }
  2848. console.log(dest)
  2849. var newArr1 = []
  2850. for (var i = 0; i < dest.length; i++) {
  2851. var newArr = dest[i].data
  2852. for (var j = 0; j < dest[i].data.length; j++) {
  2853. dest[i].data[j].isColor = i
  2854. newArr1.push(dest[i].data[j])
  2855. }
  2856. }
  2857. console.log(newArr1)
  2858. this.table.list = newArr1
  2859. },
  2860. tableRowClassName({ row }) {
  2861. if (row.isColor % 2 == 0) {
  2862. return 'warning-row'
  2863. } else {
  2864. return 'success-row'
  2865. }
  2866. },
  2867. lpplantype: function (cellValue) {
  2868. if (cellValue.lpplantype == 0) {
  2869. return '撒料计划'
  2870. } else if (cellValue.lpplantype == 1) {
  2871. return '撒料计划-混料'
  2872. } else if (cellValue.lpplantype == 2) {
  2873. return '撒料计划-撒料'
  2874. } else if (cellValue.lpplantype == 3) {
  2875. return '剩料计划'
  2876. } else if (cellValue.lpplantype == 4) {
  2877. return '预混计划'
  2878. } else if (cellValue.lpplantype == 5) {
  2879. return '预称重计划'
  2880. }
  2881. },
  2882. changeDate(val) {
  2883. console.log('选择了日期', val)
  2884. this.getList()
  2885. // this.getList2()
  2886. // this.getList3()
  2887. var d = this.table.getdataListParm.parammaps.mydate
  2888. var curDate = parseTime(new Date(), '{y}-{m}-{d}')
  2889. if (d < curDate) {
  2890. this.dataDisabled = true
  2891. } else {
  2892. this.dataDisabled = false
  2893. }
  2894. console.log(this.dataDisabled)
  2895. this.parentDate = this.table.getdataListParm.parammaps.mydate
  2896. console.log(this.parentDate, 'this.parentDate')
  2897. },
  2898. changePlanType(val) {
  2899. console.log('选择了计划类型', val)
  2900. this.getList()
  2901. this.getList2()
  2902. this.getList3()
  2903. },
  2904. changeFrequency(val) {
  2905. console.log('选择了班次', val)
  2906. this.getList()
  2907. this.getList2()
  2908. this.getList3()
  2909. },
  2910. // 日执行计划行点击
  2911. tableRowClick(row, column, event) {
  2912. console.log(row, column, event)
  2913. console.log('点击计划类型', row.lpplantype)
  2914. if (this.isOrder == false) {
  2915. this.$message({
  2916. type: 'error',
  2917. message: this.$t('message.msg42'),
  2918. duration: 2000
  2919. })
  2920. } else {
  2921. if (column.label !== '操作') {
  2922. this.isDetail = true // 点击行显示详情
  2923. this.myheight = 80 * 5 + 50
  2924. }
  2925. }
  2926. this.table2.getdataListParm.parammaps.havebutton = row.havebutton
  2927. this.table3.getdataListParm.parammaps.havebutton = row.havebutton
  2928. // 撒料计划0/撒料计划-混料1/撒料计划-撒料2/剩料计划3/预混计划4/预称重计划5
  2929. if (row.lpplantype == 0) {
  2930. // 撒料
  2931. this.table2.getdataListParm.name = 'getDownloadplandtl1ListV2'
  2932. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  2933. this.table2.getdataListParm.parammaps.useinbartype = ''
  2934. this.table3.getdataListParm.parammaps.useinbartype = ''
  2935. this.table2.getdataListParm.parammaps.date =
  2936. this.table.getdataListParm.parammaps.mydate
  2937. this.table3.getdataListParm.parammaps.date =
  2938. this.table.getdataListParm.parammaps.mydate
  2939. this.table2.getdataListParm.parammaps.id = row.id
  2940. this.table3.getdataListParm.parammaps.id = row.id
  2941. this.table3.getdataListParm.parammaps.lpplantype = row.lpplantype
  2942. this.getList2()
  2943. this.getList3()
  2944. } else if (row.lpplantype == 1) {
  2945. // 撒料计划-混料
  2946. this.table2.getdataListParm.name = 'getDownloadplandtl1ListV2'
  2947. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  2948. this.table2.getdataListParm.parammaps.useinbartype = ''
  2949. this.table3.getdataListParm.parammaps.useinbartype = ''
  2950. this.table2.getdataListParm.parammaps.date =
  2951. this.table.getdataListParm.parammaps.mydate
  2952. this.table3.getdataListParm.parammaps.date =
  2953. this.table.getdataListParm.parammaps.mydate
  2954. this.table2.getdataListParm.parammaps.id = row.id
  2955. this.table3.getdataListParm.parammaps.id = row.id
  2956. this.table3.getdataListParm.parammaps.lpplantype = row.lpplantype
  2957. this.getList2()
  2958. this.getList3()
  2959. } else if (row.lpplantype == 2) {
  2960. // 撒料计划-撒料
  2961. this.table2.getdataListParm.name = 'getDownloadplandt2ListV2'
  2962. this.table3.getdataListParm.name = 'getDownloadplandtl1ListV2'
  2963. this.table2.getdataListParm.parammaps.useinbartype = ''
  2964. this.table3.getdataListParm.parammaps.useinbartype = ''
  2965. this.table2.getdataListParm.parammaps.date =
  2966. this.table.getdataListParm.parammaps.mydate
  2967. this.table3.getdataListParm.parammaps.date =
  2968. this.table.getdataListParm.parammaps.mydate
  2969. this.table2.getdataListParm.parammaps.id = row.id
  2970. this.table3.getdataListParm.parammaps.id = row.id
  2971. this.table3.getdataListParm.parammaps.lpplantype = row.lpplantype
  2972. this.getList2()
  2973. this.getList3()
  2974. console.log(this.table3.getdataListParm.parammaps.lpplantype)
  2975. } else if (row.lpplantype == 3) {
  2976. // 剩料
  2977. this.table2.getdataListParm.name = 'getDownloadplandt2ListV2'
  2978. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  2979. this.table2.getdataListParm.parammaps.useinbartype = 0
  2980. this.table3.getdataListParm.parammaps.useinbartype = 1
  2981. this.table2.getdataListParm.parammaps.date =
  2982. this.table.getdataListParm.parammaps.mydate
  2983. this.table3.getdataListParm.parammaps.date =
  2984. this.table.getdataListParm.parammaps.mydate
  2985. this.table2.getdataListParm.parammaps.id = row.id
  2986. this.table3.getdataListParm.parammaps.id = row.id
  2987. this.table3.getdataListParm.parammaps.lpplantype = row.lpplantype
  2988. this.getList2()
  2989. this.getList3()
  2990. } else if (row.lpplantype == 4) {
  2991. // 预混
  2992. this.table2.getdataListParm.name = 'getDownloadplandtl1ListV2'
  2993. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  2994. this.table2.getdataListParm.parammaps.useinbartype = ''
  2995. this.table3.getdataListParm.parammaps.useinbartype = ''
  2996. this.table2.getdataListParm.parammaps.id = row.id
  2997. this.table3.getdataListParm.parammaps.lpplantype = row.lpplantype
  2998. this.getList2()
  2999. } else if (row.lpplantype == 5) {
  3000. // 预称重计划
  3001. this.table2.getdataListParm.name = 'getDownloadplandtl1ListV2'
  3002. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  3003. this.table2.getdataListParm.parammaps.useinbartype = ''
  3004. this.table3.getdataListParm.parammaps.useinbartype = ''
  3005. this.table2.getdataListParm.parammaps.date =
  3006. this.table.getdataListParm.parammaps.mydate
  3007. this.table3.getdataListParm.parammaps.date =
  3008. this.table.getdataListParm.parammaps.mydate
  3009. this.table2.getdataListParm.parammaps.id = row.id
  3010. this.table3.getdataListParm.parammaps.id = row.id
  3011. this.table3.getdataListParm.parammaps.lpplantype = row.lpplantype
  3012. this.getList2()
  3013. this.getList3()
  3014. }
  3015. this.$forceUpdate()
  3016. },
  3017. handleCloseTable2() {
  3018. this.isDetail = false
  3019. this.myheight = document.documentElement.clientHeight - 280 + 140
  3020. },
  3021. // 计划内容操作详情
  3022. getList2() {
  3023. this.table2.listLoading = true
  3024. this.table2.getdataListParm.parammaps.date =
  3025. this.table.getdataListParm.parammaps.mydate
  3026. GetDataByName(this.table2.getdataListParm).then((response) => {
  3027. console.log('table数据', response.data.list)
  3028. if (response.data.list !== null) {
  3029. for (let i = 0; i < response.data.list.length; i++) {
  3030. this.$set(response.data.list[i], 'Edit', false) // 编辑
  3031. this.$set(response.data.list[i], 'NoEdit', true) // 不可编辑/输入
  3032. this.$set(response.data.list[i], 'isCreate', false) // 新增操作
  3033. this.$set(response.data.list[i], 'isUpdate', true) // 编辑操作
  3034. this.$set(response.data.list[i], 'isUpdateSave', false) // 编辑保存
  3035. }
  3036. this.table2.list = response.data.list
  3037. // 撒料计划0/撒料计划-混料1/撒料计划-撒料2/剩料计划3/预混计划4
  3038. if (
  3039. this.table3.getdataListParm.parammaps.lpplantype == 0 ||
  3040. this.table3.getdataListParm.parammaps.lpplantype == 1 ||
  3041. this.table3.getdataListParm.parammaps.lpplantype == 4
  3042. ) {
  3043. const arr = []
  3044. var a = 0
  3045. let b = this.table2.list[0].sort
  3046. let c = 0
  3047. for (let i = 0; i < this.table2.list.length; i++) {
  3048. if (b !== parseInt(this.table2.list[i].sort)) {
  3049. b = this.table2.list[i].sort
  3050. // arr.push({ 'sort': '小计', 'weight': a.toFixed(parseInt(Cookies.get('decimal'))) })
  3051. a = 0
  3052. }
  3053. a = a + parseFloat(this.table2.list[i].weight)
  3054. c = c + parseFloat(this.table2.list[i].weight)
  3055. arr.push(this.table2.list[i])
  3056. }
  3057. // arr.push({ 'sort': '小计', 'weight': a.toFixed(parseInt(Cookies.get('decimal'))) })
  3058. arr.push({
  3059. sort: this.$t('message.msg296'),
  3060. weight: c.toFixed(parseInt(Cookies.get('decimal')))
  3061. })
  3062. this.table2.list = arr
  3063. }
  3064. if (this.table3.getdataListParm.parammaps.lpplantype == 2) {
  3065. const arr = []
  3066. var aa = 0
  3067. let bb = this.table2.list[0].sort
  3068. let cc = 0
  3069. for (let i = 0; i < this.table2.list.length; i++) {
  3070. if (bb !== parseInt(this.table2.list[i].sort)) {
  3071. bb = this.table2.list[i].sort
  3072. aa = 0
  3073. }
  3074. aa = aa + parseFloat(this.table2.list[i].weight)
  3075. cc = cc + parseFloat(this.table2.list[i].weight)
  3076. arr.push(this.table2.list[i])
  3077. }
  3078. arr.push({
  3079. sort: this.$t('message.msg296'),
  3080. weight: cc.toFixed(parseInt(Cookies.get('decimal')))
  3081. })
  3082. this.table2.list = arr
  3083. console.log('this.table2.list', this.table2.list)
  3084. console.log(this.table3.getdataListParm.parammaps.lpplantype)
  3085. }
  3086. console.log(this.table2.list)
  3087. this.table2.pageNum = response.data.pageNum
  3088. this.table2.pageSize = response.data.pageSize
  3089. this.table2.total = response.data.total
  3090. } else {
  3091. this.table2.list = []
  3092. }
  3093. this.handleSpan()
  3094. setTimeout(() => {
  3095. this.table2.listLoading = false
  3096. }, 100)
  3097. })
  3098. },
  3099. // 计划内容栏舍详情
  3100. getList3() {
  3101. this.table3.listLoading = true
  3102. this.table3.getdataListParm.parammaps.date =
  3103. this.table.getdataListParm.parammaps.mydate
  3104. GetDataByName(this.table3.getdataListParm).then((response) => {
  3105. console.log('table数据', response.data.list)
  3106. if (response.data.list !== null) {
  3107. for (let i = 0; i < response.data.list.length; i++) {
  3108. this.$set(response.data.list[i], 'Edit', false) // 编辑
  3109. this.$set(response.data.list[i], 'NoEdit', true) // 不可编辑/输入
  3110. this.$set(response.data.list[i], 'isCreate', false) // 新增操作
  3111. this.$set(response.data.list[i], 'isUpdate', true) // 编辑操作
  3112. this.$set(response.data.list[i], 'isUpdateSave', false) // 编辑保存
  3113. }
  3114. this.table3.list = response.data.list
  3115. if (this.table3.getdataListParm.parammaps.lpplantype == 0) {
  3116. const arr = []
  3117. var a = 0
  3118. let b = this.table3.list[0].sort
  3119. let c = 0
  3120. for (let i = 0; i < this.table3.list.length; i++) {
  3121. if (b !== parseInt(this.table3.list[i].sort)) {
  3122. b = this.table3.list[i].sort
  3123. a = 0
  3124. }
  3125. a = a + parseFloat(this.table3.list[i].weight)
  3126. c = c + parseFloat(this.table3.list[i].weight)
  3127. arr.push(this.table3.list[i])
  3128. }
  3129. arr.push({
  3130. sort: this.$t('message.msg296'),
  3131. weight: c.toFixed(parseInt(Cookies.get('decimal')))
  3132. })
  3133. this.table3.list = arr
  3134. }
  3135. this.table3.pageNum = response.data.pageNum
  3136. this.table3.pageSize = response.data.pageSize
  3137. this.table3.total = response.data.total
  3138. } else {
  3139. this.table3.list = []
  3140. }
  3141. setTimeout(() => {
  3142. this.table3.listLoading = false
  3143. }, 100)
  3144. })
  3145. },
  3146. // 新生成
  3147. handleCreate() {
  3148. console.log('点击了新生成')
  3149. this.newGeneration.temp.inputDatetime = [
  3150. parseTime(new Date(), '{y}-{m}-{d}'),
  3151. parseTime(new Date(), '{y}-{m}-{d}')
  3152. ]
  3153. GetDataByName(this.newGeneration.getdataListParm).then((response) => {
  3154. console.log('table数据', response.data.list)
  3155. if (response.data.list !== null) {
  3156. if (response.data.list[0].vmsg == '存在未分配') {
  3157. this.newGeneration.temp.tips = true
  3158. this.$message({
  3159. type: 'warning',
  3160. message: this.$t('message.msg191'),
  3161. duration: 2000
  3162. })
  3163. this.getTips()
  3164. } else {
  3165. this.newGeneration.temp.tips = false
  3166. this.newGeneration.dialogStatus = 'newGeneration'
  3167. this.newGeneration.dialogFormVisible = true
  3168. }
  3169. }
  3170. })
  3171. },
  3172. getTips() {
  3173. const url = 'authdata/feedp/undistribute'
  3174. const data = {}
  3175. // data.times = 1
  3176. data.times = this.myMaxTimes
  3177. data.pastureid = Cookies.get('pastureid')
  3178. this.tipsList = []
  3179. postJson(url, data).then((response) => {
  3180. if (response.data !== null) {
  3181. this.tipsList = response.data
  3182. // if(this.myMaxTimes == 1){
  3183. // this.tipsList = response.data.one
  3184. // }else if(this.myMaxTimes == 2){
  3185. // this.tipsList.push(response.data.one,response.data.two)
  3186. // }else if(this.myMaxTimes == 3){
  3187. // this.tipsList.push(response.data.one,response.data.two,response.data.three)
  3188. // }else if(this.myMaxTimes == 4){
  3189. // this.tipsList.push(response.data.one,response.data.two,response.data.three,response.data.four)
  3190. // }
  3191. } else {
  3192. this.tipsList = []
  3193. }
  3194. console.log('this.tipsList==>', this.tipsList)
  3195. this.newGeneration.dialogStatus = 'newGeneration'
  3196. this.newGeneration.dialogFormVisible = true
  3197. })
  3198. },
  3199. DateDiff(sDate1, sDate2) {
  3200. console.log(sDate1, sDate2)
  3201. var aDate, oDate1, oDate2, iDays
  3202. aDate = sDate1.split('-')
  3203. oDate1 = new Date(aDate[0], aDate[1], aDate[2]) // 转换为12-18-2006格式
  3204. aDate = sDate2.split('-')
  3205. oDate2 = new Date(aDate[0], aDate[1], aDate[2])
  3206. iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24) // 把相差的毫秒数转换为天数
  3207. this.newGeneration.temp.days = parseInt(iDays) + 1
  3208. return iDays
  3209. },
  3210. newGenerationData() {
  3211. console.log('点击了新生成保存', this.newGeneration.temp)
  3212. this.newGenerationLoading = true
  3213. this.isokDisable = true
  3214. this.$refs['temp'].validate((valid) => {
  3215. if (valid) {
  3216. this.newGeneration.temp.startTime = parseTime(
  3217. this.newGeneration.temp.inputDatetime[0],
  3218. '{y}-{m}-{d}'
  3219. )
  3220. this.newGeneration.temp.stopTime = parseTime(
  3221. this.newGeneration.temp.inputDatetime[1],
  3222. '{y}-{m}-{d}'
  3223. )
  3224. this.DateDiff(
  3225. this.newGeneration.temp.stopTime,
  3226. this.newGeneration.temp.startTime
  3227. )
  3228. this.requestParam = {}
  3229. this.requestParam.common = { returnmap: '0' }
  3230. this.requestParam.data = []
  3231. this.requestParam.data[0] = {
  3232. name: 'checkDLPIsStart',
  3233. type: 'v',
  3234. parammaps: {
  3235. pastureid: Cookies.get('pastureid'),
  3236. startTime: this.newGeneration.temp.startTime
  3237. }
  3238. }
  3239. this.requestParam.data[1] = {
  3240. name: 'checkPreMixStorage',
  3241. type: 'e',
  3242. parammaps: {
  3243. pastureid: Cookies.get('pastureid'),
  3244. days: this.newGeneration.temp.days
  3245. }
  3246. }
  3247. this.requestParam.data[2] = {
  3248. name: 'createdownloadedplan',
  3249. type: 'e',
  3250. parammaps: {
  3251. pastureid: Cookies.get('pastureid'),
  3252. startTime: this.newGeneration.temp.startTime,
  3253. stopTime: this.newGeneration.temp.stopTime
  3254. }
  3255. }
  3256. ExecDataByConfig(this.requestParam).then((response) => {
  3257. console.log('新生成保存发送参数', this.requestParam)
  3258. if (response.msg === 'fail') {
  3259. this.$notify({
  3260. title: this.$t('driver.saveFail'),
  3261. message: response.data,
  3262. type: 'warning',
  3263. duration: 2000
  3264. })
  3265. this.isokDisable = false
  3266. this.newGenerationLoading = false
  3267. } else {
  3268. this.$notify({
  3269. title: '',
  3270. message: this.$t('driver.saveSuccess'),
  3271. type: 'success',
  3272. duration: 2000
  3273. })
  3274. this.newGeneration.dialogFormVisible = false
  3275. this.getList()
  3276. this.isokDisable = false
  3277. this.newGenerationLoading = false
  3278. }
  3279. })
  3280. }
  3281. })
  3282. },
  3283. // 修改计划
  3284. handleRevisePlan(data) {
  3285. this.dialogFull = false
  3286. var arr = []
  3287. if (this.table.list.length > 0) {
  3288. for (let i = 0; i < this.table.list.length; i++) {
  3289. if (this.table.list[i].havebutton == 1) {
  3290. arr.push(this.table.list[i])
  3291. }
  3292. }
  3293. }
  3294. if (arr.length !== this.table.list.length) {
  3295. console.log('点击了修改计划1', this.activeName)
  3296. this.isShowDialog = true
  3297. this.activeName = '栏舍配方'
  3298. console.log('点击了修改计划2', this.activeName)
  3299. } else {
  3300. this.$message({ type: 'error', message: this.$t('message.msg192') })
  3301. }
  3302. },
  3303. handleExport() {
  3304. this.downLoad.getdataListParm.parammaps.date =
  3305. this.table.getdataListParm.parammaps.mydate
  3306. this.downLoad.getdataListParm.parammaps.lpplantype =
  3307. this.table.getdataListParm.parammaps.lpplantype
  3308. this.downLoad.getdataListParm.parammaps.times =
  3309. this.table.getdataListParm.parammaps.times
  3310. this.downLoad.getdataListParm.parammaps.enable =
  3311. this.table.getdataListParm.parammaps.enable
  3312. this.downLoad.getdataListParm.parammaps.enable2 =
  3313. this.table.getdataListParm.parammaps.enable2
  3314. var exportTitle = ''
  3315. if (this.table.getdataListParm.parammaps.plandimen == '1') {
  3316. if (this.table.getdataListParm.parammaps.enable3 == '0') {
  3317. this.downLoad.getdataListParm.name = 'downloadPlanTLJDTMR'
  3318. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.a')
  3319. } else if (this.table.getdataListParm.parammaps.enable3 == '1') {
  3320. this.downLoad.getdataListParm.name = 'downloadPlanTLLDTMR'
  3321. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.b')
  3322. } else if (this.table.getdataListParm.parammaps.enable3 == '2') {
  3323. this.downLoad.getdataListParm.name = 'downloadPlanSLJDTMR'
  3324. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.c')
  3325. } else if (this.table.getdataListParm.parammaps.enable3 == '3') {
  3326. this.downLoad.getdataListParm.name = 'downloadPlanTSLJDTMR'
  3327. exportTitle =
  3328. this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.d')
  3329. } else if (this.table.getdataListParm.parammaps.enable3 == '4') {
  3330. this.downLoad.getdataListParm.name = 'downloadPlanTSLLDTMR'
  3331. exportTitle =
  3332. this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.g')
  3333. } else if (this.table.getdataListParm.parammaps.enable3 == '5') {
  3334. this.downLoad.getdataListParm.name = 'downloadPlanBZJDTMR'
  3335. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.e')
  3336. } else {
  3337. this.downLoad.getdataListParm.name = 'downloadPlanSFJDTMR'
  3338. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.f')
  3339. }
  3340. } else {
  3341. if (this.table.getdataListParm.parammaps.enable3 == '0') {
  3342. this.downLoad.getdataListParm.name = 'downloadPlanTLJD'
  3343. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.a')
  3344. } else if (this.table.getdataListParm.parammaps.enable3 == '1') {
  3345. this.downLoad.getdataListParm.name = 'downloadPlanTLLD'
  3346. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.b')
  3347. } else if (this.table.getdataListParm.parammaps.enable3 == '2') {
  3348. this.downLoad.getdataListParm.name = 'downloadPlanSLJD'
  3349. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.c')
  3350. } else if (this.table.getdataListParm.parammaps.enable3 == '3') {
  3351. this.downLoad.getdataListParm.name = 'downloadPlanTSLJD'
  3352. exportTitle =
  3353. this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.d')
  3354. } else if (this.table.getdataListParm.parammaps.enable3 == '4') {
  3355. this.downLoad.getdataListParm.name = 'downloadPlanTSLLD'
  3356. exportTitle =
  3357. this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.g')
  3358. } else if (this.table.getdataListParm.parammaps.enable3 == '5') {
  3359. this.downLoad.getdataListParm.name = 'downloadPlanBZJD'
  3360. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.e')
  3361. } else {
  3362. this.downLoad.getdataListParm.name = 'downloadPlanSFJD'
  3363. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.f')
  3364. }
  3365. }
  3366. GetReportform(this.downLoad.getdataListParm).then((response) => {
  3367. if (response.data.list !== null) {
  3368. this.downLoad.labelList = []
  3369. var filterValArr = []
  3370. for (let i = 0; i < response.data.list.data1.length; i++) {
  3371. this.downLoad.labelList.push(response.data.list.data1[i].label)
  3372. filterValArr.push(response.data.list.data1[i].prop)
  3373. }
  3374. this.downLoad.list = response.data.list.data2
  3375. } else {
  3376. this.downLoad.list = []
  3377. }
  3378. var multiHeaderArr = []
  3379. for (let i = 0; i < this.downLoad.labelList.length; i++) {
  3380. if (i == 0) {
  3381. multiHeaderArr.push(exportTitle)
  3382. } else {
  3383. multiHeaderArr.push('')
  3384. }
  3385. }
  3386. import('@/vendor/Export5Excel').then((excel) => {
  3387. const multiHeader = [multiHeaderArr]
  3388. const multiHeader2 = [this.downLoad.labelList]
  3389. const filterVal = filterValArr
  3390. const data = this.downLoad.list.map((v) => filterVal.map((j) => v[j]))
  3391. const merges = []
  3392. excel.export_json_to_excel({
  3393. multiHeader,
  3394. multiHeader2,
  3395. data,
  3396. filename: exportTitle,
  3397. merges
  3398. })
  3399. })
  3400. })
  3401. },
  3402. rowDrop() {
  3403. console.log(
  3404. document.querySelector('#table1 .el-table__body-wrapper tbody')
  3405. )
  3406. const tbody = document.querySelector(
  3407. '#table1 .el-table__body-wrapper tbody'
  3408. )
  3409. // this.sorTable()
  3410. const that = this
  3411. var sortable = Sortable.create(tbody, {
  3412. disabled: that.dropState,
  3413. onChoose({ newIndex, oldIndex }) {
  3414. console.log(that.isOrder, 'that.isOrder == false')
  3415. console.log(that.dropState, 'that.dropState')
  3416. if (that.dropState == true || that.isOrder == true) {
  3417. sortable.destroy()
  3418. }
  3419. },
  3420. onEnd(evt) {
  3421. var tableList = [...that.table.list] // 保留拖动前数据
  3422. const targetRow = that.table.list.splice(evt.oldIndex, 1)[0] // 拖动数据
  3423. const targetRow2 = that.table.list[evt.newIndex] // 拖动后下方数据
  3424. const targetRow3 = that.table.list[evt.newIndex - 1] // 拖动后上方数据
  3425. console.log(targetRow, 'targetRow')
  3426. console.log(targetRow2, 'targetRow2')
  3427. console.log(targetRow3, 'targetRow3')
  3428. that.table.list.splice(evt.newIndex, 0, targetRow)
  3429. // ==========
  3430. // 已执行的计划不可拖动
  3431. if (targetRow.havebutton == 1) {
  3432. that.$nextTick(() => {
  3433. that.$set(that.table, 'list', tableList)
  3434. })
  3435. that.$message({
  3436. type: 'error',
  3437. message: this.$t('message.msg194'),
  3438. duration: 2000
  3439. })
  3440. return false
  3441. }
  3442. // 相同班次之间可以拖动
  3443. // if (targetRow2 !== undefined && targetRow3 !== undefined) {
  3444. // if (targetRow.times !== targetRow2.times && targetRow.times !== targetRow3.times) {
  3445. // that.$nextTick(() => {
  3446. // that.$set(that.table, 'list', tableList)
  3447. // })
  3448. // that.$message({ type: 'error', message: '因班次不同不可调整顺序', duration: 2000 })
  3449. // return false
  3450. // }
  3451. // } else if (targetRow2 !== undefined && targetRow3 == undefined) {
  3452. // if (targetRow.times !== targetRow2.times) {
  3453. // that.$nextTick(() => {
  3454. // that.$set(that.table, 'list', tableList)
  3455. // })
  3456. // that.$message({ type: 'error', message: '因班次不同不可调整顺序', duration: 2000 })
  3457. // return false
  3458. // }
  3459. // } else if (targetRow2 == undefined && targetRow3 !== undefined) {
  3460. // if (targetRow.times !== targetRow3.times) {
  3461. // that.$nextTick(() => {
  3462. // that.$set(that.table, 'list', tableList)
  3463. // })
  3464. // that.$message({ type: 'error', message: '因班次不同不可调整顺序', duration: 2000 })
  3465. // return false
  3466. // }
  3467. // }
  3468. // 撒料计划0,
  3469. // 撒料计划-混料1
  3470. // 撒料计划-撒料2
  3471. // 剩料计划3
  3472. // 预混计划4
  3473. // 预称重计划5
  3474. if (targetRow.lpplantype == 1) {
  3475. // 拖动数据为撒料计划-混料
  3476. if (targetRow2 == undefined) {
  3477. that.$nextTick(() => {
  3478. that.$set(that.table, 'list', tableList)
  3479. })
  3480. } else if (
  3481. targetRow2 !== undefined &&
  3482. targetRow2.pid == targetRow.pid
  3483. ) {
  3484. that.$nextTick(() => {
  3485. that.$set(that.table, 'list', tableList)
  3486. })
  3487. } else {
  3488. var pidArr = [] // pid相同的值
  3489. var pidArr1 = [] //
  3490. var index // 索引
  3491. for (let i = 0; i < tableList.length; i++) {
  3492. if (tableList[i].pid == targetRow.pid) {
  3493. pidArr.push(tableList[i])
  3494. } else {
  3495. pidArr1.push(tableList[i])
  3496. }
  3497. }
  3498. // 找到对应上方pid 的ID
  3499. // 比如说id 580243 找到对应的索引
  3500. if (targetRow3 !== undefined) {
  3501. for (let i = 0; i < pidArr1.length; i++) {
  3502. if (pidArr1[i].id == targetRow3.id) {
  3503. index = i
  3504. }
  3505. }
  3506. } else {
  3507. for (let i = 0; i < pidArr1.length; i++) {
  3508. if (pidArr1[i].id == targetRow2.id) {
  3509. index = i - 1
  3510. }
  3511. }
  3512. }
  3513. pidArr1.splice(index + 1, 0, ...pidArr)
  3514. console.log(pidArr1)
  3515. that.$nextTick(() => {
  3516. that.table.list = pidArr1
  3517. })
  3518. }
  3519. if (targetRow2 !== undefined && targetRow3 !== undefined) {
  3520. if (targetRow2.pid == targetRow3.pid) {
  3521. that.$nextTick(() => {
  3522. that.$set(that.table, 'list', tableList)
  3523. })
  3524. that.$message({
  3525. type: 'error',
  3526. message: this.$t('message.msg195'),
  3527. duration: 2000
  3528. })
  3529. return false
  3530. }
  3531. }
  3532. } else if (targetRow.lpplantype == 5) {
  3533. // 拖动数据为预称重计划
  3534. if (targetRow2 !== undefined) {
  3535. console.log(targetRow3, targetRow2, 'zhidao')
  3536. if (targetRow3 !== undefined) {
  3537. if (
  3538. targetRow3.pid !== targetRow.pid &&
  3539. targetRow2.pid !== targetRow.pid
  3540. ) {
  3541. that.$nextTick(() => {
  3542. that.$set(that.table, 'list', tableList)
  3543. })
  3544. that.$message({
  3545. type: 'error',
  3546. message: this.$t('message.msg196'),
  3547. duration: 2000
  3548. })
  3549. return false
  3550. } else {
  3551. console.log('wojinlaile', targetRow2, targetRow)
  3552. if (
  3553. targetRow3.lpplantype == 0 &&
  3554. targetRow2.pid !== targetRow.pid
  3555. ) {
  3556. that.$nextTick(() => {
  3557. that.$set(that.table, 'list', tableList)
  3558. })
  3559. that.$message({
  3560. type: 'error',
  3561. message: this.$t('message.msg197'),
  3562. duration: 2000
  3563. })
  3564. return false
  3565. }
  3566. if (
  3567. targetRow2.lpplantype !== 5 &&
  3568. targetRow3.lpplantype !== 5
  3569. ) {
  3570. that.$nextTick(() => {
  3571. that.$set(that.table, 'list', tableList)
  3572. })
  3573. that.$message({
  3574. type: 'error',
  3575. message: this.$t('message.msg196'),
  3576. duration: 2000
  3577. })
  3578. return false
  3579. }
  3580. }
  3581. } else {
  3582. if (targetRow2.pid !== targetRow.pid) {
  3583. that.$nextTick(() => {
  3584. that.$set(that.table, 'list', tableList)
  3585. })
  3586. that.$message({
  3587. type: 'error',
  3588. message: this.$t('message.msg196'),
  3589. duration: 2000
  3590. })
  3591. return false
  3592. } else {
  3593. if (targetRow2.pid !== targetRow.pid) {
  3594. that.$nextTick(() => {
  3595. that.$set(that.table, 'list', tableList)
  3596. })
  3597. that.$message({
  3598. type: 'error',
  3599. message: this.$t('message.msg197'),
  3600. duration: 2000
  3601. })
  3602. return false
  3603. }
  3604. }
  3605. }
  3606. } else {
  3607. if (targetRow2 == undefined) {
  3608. that.$nextTick(() => {
  3609. that.$set(that.table, 'list', tableList)
  3610. })
  3611. that.$message({
  3612. type: 'error',
  3613. message: this.$t('message.msg196'),
  3614. duration: 2000
  3615. })
  3616. return false
  3617. } else if (targetRow3.pid !== targetRow.pid) {
  3618. that.$nextTick(() => {
  3619. that.$set(that.table, 'list', tableList)
  3620. })
  3621. that.$message({
  3622. type: 'error',
  3623. message: this.$t('message.msg196'),
  3624. duration: 2000
  3625. })
  3626. return false
  3627. } else {
  3628. if (targetRow3.lpplantype == 0) {
  3629. that.$nextTick(() => {
  3630. that.$set(that.table, 'list', tableList)
  3631. })
  3632. that.$message({
  3633. type: 'error',
  3634. message: this.$t('message.msg197'),
  3635. duration: 2000
  3636. })
  3637. return false
  3638. }
  3639. }
  3640. }
  3641. if (targetRow2 !== undefined && targetRow3 !== undefined) {
  3642. if (
  3643. targetRow2.pid !== targetRow.pid &&
  3644. targetRow3.pid !== targetRow.pid
  3645. ) {
  3646. that.$nextTick(() => {
  3647. that.$set(that.table, 'list', tableList)
  3648. })
  3649. that.$message({
  3650. type: 'error',
  3651. message: this.$t('message.msg195'),
  3652. duration: 2000
  3653. })
  3654. return false
  3655. } else if (
  3656. targetRow3.pid == targetRow.pid &&
  3657. (targetRow3.lpplantype == 1 || targetRow3.lpplantype == 2)
  3658. ) {
  3659. that.$nextTick(() => {
  3660. that.$set(that.table, 'list', tableList)
  3661. })
  3662. that.$message({
  3663. type: 'error',
  3664. message: this.$t('message.msg196'),
  3665. duration: 2000
  3666. })
  3667. return false
  3668. }
  3669. }
  3670. } else if (targetRow.lpplantype == 2) {
  3671. // 拖动数据为撒料计划-撒料
  3672. if (targetRow2 == undefined) {
  3673. if (targetRow3.pid !== targetRow.pid) {
  3674. that.$nextTick(() => {
  3675. that.$set(that.table, 'list', tableList)
  3676. })
  3677. that.$message({
  3678. type: 'error',
  3679. message: this.$t('message.msg198'),
  3680. duration: 2000
  3681. })
  3682. return false
  3683. }
  3684. } else {
  3685. if (
  3686. targetRow2.lpplantype == 1 &&
  3687. (targetRow2.pid == targetRow.pid || targetRow2 == undefined)
  3688. ) {
  3689. // 拖动数据下方为撒料计划-混料时且pid相同,不可拖动,提示
  3690. that.$nextTick(() => {
  3691. that.$set(that.table, 'list', tableList)
  3692. })
  3693. that.$message({
  3694. type: 'error',
  3695. message: this.$t('message.msg199'),
  3696. duration: 2000
  3697. })
  3698. return false
  3699. } else if (
  3700. targetRow.lpplantype == 2 &&
  3701. (targetRow2.pid == targetRow.pid ||
  3702. targetRow3.pid == targetRow.pid ||
  3703. targetRow2 == undefined ||
  3704. targetRow3 == undefined)
  3705. ) {
  3706. console.log('正常拖动')
  3707. } else {
  3708. that.$nextTick(() => {
  3709. that.$set(that.table, 'list', tableList)
  3710. })
  3711. that.$message({
  3712. type: 'error',
  3713. message: this.$t('message.msg198'),
  3714. duration: 2000
  3715. })
  3716. return false
  3717. }
  3718. }
  3719. if (targetRow2 !== undefined && targetRow3 !== undefined) {
  3720. if (targetRow2.pid == targetRow3.pid) {
  3721. that.$nextTick(() => {
  3722. that.$set(that.table, 'list', tableList)
  3723. })
  3724. that.$message({
  3725. type: 'error',
  3726. message: this.$t('message.msg195'),
  3727. duration: 2000
  3728. })
  3729. return false
  3730. }
  3731. }
  3732. } else if (targetRow.lpplantype == 0) {
  3733. // 拖动数据为撒料计划
  3734. console.log('遍历有相同的pid,一起跟着拖动3')
  3735. var pidArr = [] // pid相同的值
  3736. var pidArr1 = [] //
  3737. var index // 索引
  3738. for (let i = 0; i < tableList.length; i++) {
  3739. if (tableList[i].pid == targetRow.pid) {
  3740. pidArr.push(tableList[i])
  3741. } else {
  3742. pidArr1.push(tableList[i])
  3743. }
  3744. }
  3745. if (pidArr.length > 0) {
  3746. // 找到对应上方pid 的ID
  3747. // 比如说id 580243 找到对应的索引
  3748. if (targetRow3 !== undefined) {
  3749. for (let i = 0; i < pidArr1.length; i++) {
  3750. if (pidArr1[i].id == targetRow3.id) {
  3751. index = i
  3752. }
  3753. }
  3754. } else {
  3755. for (let i = 0; i < pidArr1.length; i++) {
  3756. if (pidArr1[i].id == targetRow2.id) {
  3757. index = i - 1
  3758. }
  3759. }
  3760. }
  3761. pidArr1.splice(index + 1, 0, ...pidArr)
  3762. console.log(pidArr1)
  3763. that.$nextTick(() => {
  3764. that.table.list = pidArr1
  3765. })
  3766. }
  3767. if (targetRow2 !== undefined && targetRow3 !== undefined) {
  3768. if (targetRow2.pid == targetRow3.pid) {
  3769. that.$nextTick(() => {
  3770. that.$set(that.table, 'list', tableList)
  3771. })
  3772. that.$message({
  3773. type: 'error',
  3774. message: this.$t('message.msg200'),
  3775. duration: 2000
  3776. })
  3777. return false
  3778. }
  3779. }
  3780. } else if (targetRow.lpplantype == 3 || targetRow.lpplantype == 4) {
  3781. if (targetRow2 !== undefined && targetRow3 !== undefined) {
  3782. if (targetRow2.pid == targetRow3.pid) {
  3783. if (targetRow2.lpplantype == 5 && targetRow3.lpplantype == 5) {
  3784. that.$nextTick(() => {
  3785. that.$set(that.table, 'list', tableList)
  3786. })
  3787. that.$message({
  3788. type: 'error',
  3789. message: this.$t('message.msg201'),
  3790. duration: 2000
  3791. })
  3792. return false
  3793. } else if (
  3794. (targetRow.pid == targetRow2.pid &&
  3795. targetRow.lpplantype == 3 &&
  3796. targetRow2.lpplantype == 3) ||
  3797. (targetRow.pid == targetRow3.pid &&
  3798. targetRow.lpplantype == 3 &&
  3799. targetRow3.lpplantype == 3)
  3800. ) {
  3801. console.log('剩料之间可以互相拖动')
  3802. console.log(tableList)
  3803. } else {
  3804. that.$nextTick(() => {
  3805. that.$set(that.table, 'list', tableList)
  3806. })
  3807. // 撒料计划0,
  3808. // 撒料计划-混料1
  3809. // 撒料计划-撒料2
  3810. // 剩料计划3
  3811. // 预混计划4
  3812. // 预称重计划5
  3813. if (targetRow3.lpplantype == 0) {
  3814. that.$set(targetRow3, 'mylpplantype', '撒料计划')
  3815. } else if (targetRow3.lpplantype == 1) {
  3816. that.$set(targetRow3, 'mylpplantype', '撒料计划-混料')
  3817. } else if (targetRow3.lpplantype == 2) {
  3818. that.$set(targetRow3, 'mylpplantype', '撒料计划-撒料')
  3819. } else if (targetRow3.lpplantype == 3) {
  3820. that.$set(targetRow3, 'mylpplantype', '剩料计划')
  3821. } else if (targetRow3.lpplantype == 4) {
  3822. that.$set(targetRow3, 'mylpplantype', '预混计划')
  3823. } else if (targetRow3.lpplantype == 5) {
  3824. that.$set(targetRow3, 'mylpplantype', '预称重计划')
  3825. }
  3826. if (targetRow2.lpplantype == 0) {
  3827. that.$set(targetRow2, 'mylpplantype', '撒料计划')
  3828. } else if (targetRow2.lpplantype == 1) {
  3829. that.$set(targetRow2, 'mylpplantype', '撒料计划-混料')
  3830. } else if (targetRow2.lpplantype == 2) {
  3831. that.$set(targetRow2, 'mylpplantype', '撒料计划-撒料')
  3832. } else if (targetRow2.lpplantype == 3) {
  3833. that.$set(targetRow2, 'mylpplantype', '剩料计划')
  3834. } else if (targetRow2.lpplantype == 4) {
  3835. that.$set(targetRow2, 'mylpplantype', '预混计划')
  3836. } else if (targetRow2.lpplantype == 5) {
  3837. that.$set(targetRow2, 'mylpplantype', '预称重计划')
  3838. }
  3839. var message =
  3840. '不可拖动至' +
  3841. targetRow3.mylpplantype +
  3842. '跟' +
  3843. targetRow2.mylpplantype +
  3844. '之间'
  3845. that.$message({
  3846. type: 'error',
  3847. message: message,
  3848. duration: 2000
  3849. })
  3850. return false
  3851. }
  3852. }
  3853. }
  3854. // ========
  3855. // var pidArr = [] // pid相同的值
  3856. // var pidArr1 = [] //
  3857. // var index // 索引
  3858. // for (let i = 0; i < tableList.length; i++) {
  3859. // if (tableList[i].pid == targetRow.pid) {
  3860. // pidArr.push(tableList[i])
  3861. // } else {
  3862. // pidArr1.push(tableList[i])
  3863. // }
  3864. // }
  3865. // if (pidArr.length > 0) {
  3866. // // 找到对应上方pid 的ID
  3867. // // 比如说id 580243 找到对应的索引
  3868. // if (targetRow3 !== undefined) {
  3869. // for (let i = 0; i < pidArr1.length; i++) {
  3870. // if (pidArr1[i].id == targetRow3.id) {
  3871. // index = i
  3872. // }
  3873. // }
  3874. // } else {
  3875. // for (let i = 0; i < pidArr1.length; i++) {
  3876. // if (pidArr1[i].id == targetRow2.id) {
  3877. // index = i - 1
  3878. // }
  3879. // }
  3880. // }
  3881. // pidArr1.splice(index + 1, 0, ...pidArr)
  3882. // console.log(pidArr1)
  3883. // that.$nextTick(() => {
  3884. // that.table.list = pidArr1
  3885. // })
  3886. // }
  3887. // if (targetRow2 !== undefined && targetRow3 !== undefined) {
  3888. // if (targetRow2.pid == targetRow3.pid) {
  3889. // that.$nextTick(() => {
  3890. // that.$set(that.table, 'list', tableList)
  3891. // })
  3892. // that.$message({ type: 'error', message: '不可将其他计划拖动至预称重计划之间9999', duration: 2000 })
  3893. // return false
  3894. // }
  3895. // }
  3896. }
  3897. // ===
  3898. }
  3899. })
  3900. },
  3901. // 复制
  3902. handleCopy() {
  3903. if (this.table.list.length > 0) {
  3904. this.newGeneration.temp = {}
  3905. this.newGeneration.dialogStatus = 'copy'
  3906. this.newGeneration.dialogFormVisible = true
  3907. } else {
  3908. this.$message({ type: 'error', message: this.$t('message.msg202') })
  3909. }
  3910. },
  3911. copyData() {
  3912. console.log(this.newGeneration.temp.copyInputDatetime)
  3913. this.isokDisable = true
  3914. setTimeout(() => {
  3915. this.isokDisable = false
  3916. }, 5000)
  3917. this.$refs['temp'].validate((valid) => {
  3918. if (valid) {
  3919. this.requestParam.name = 'copydownloadedplan'
  3920. this.requestParam.parammaps = {}
  3921. this.requestParam.parammaps.pastureid = Cookies.get('pastureid')
  3922. this.requestParam.parammaps.date =
  3923. this.table.getdataListParm.parammaps.mydate
  3924. this.requestParam.parammaps.startTime = parseTime(
  3925. this.newGeneration.temp.copyInputDatetime[0],
  3926. '{y}-{m}-{d}'
  3927. )
  3928. this.requestParam.parammaps.stopTime = parseTime(
  3929. this.newGeneration.temp.copyInputDatetime[1],
  3930. '{y}-{m}-{d}'
  3931. )
  3932. PostDataByName(this.requestParam).then((response) => {
  3933. if (response.msg === 'fail') {
  3934. this.$notify({
  3935. title: this.$t('driver.saveFail'),
  3936. message: response.data,
  3937. type: 'warning',
  3938. duration: 2000
  3939. })
  3940. } else {
  3941. this.$notify({
  3942. title: this.$t('common.succes'),
  3943. message: this.$t('driver.saveSuccess'),
  3944. type: 'success',
  3945. duration: 2000
  3946. })
  3947. this.newGeneration.dialogFormVisible = false
  3948. this.getList()
  3949. }
  3950. })
  3951. }
  3952. })
  3953. },
  3954. handleChangeOrder() {
  3955. // 拖动顺序
  3956. this.isOrder = false
  3957. this.rowDrop()
  3958. },
  3959. saveChangeOrder() {
  3960. // 保存顺序
  3961. var sortList = []
  3962. for (let i = 0; i < this.table.list.length; i++) {
  3963. var obj = {}
  3964. obj.sort = i
  3965. obj.pastureid = this.table.list[i].pastureid
  3966. obj.id = this.table.list[i].id
  3967. sortList.push(obj)
  3968. }
  3969. console.log(sortList)
  3970. this.requestParam = {}
  3971. this.requestParam.common = { returnmap: '0' }
  3972. this.requestParam.data = []
  3973. this.requestParam.data[0] = {
  3974. name: 'insertSpotList',
  3975. resultmaps: { list: sortList }
  3976. }
  3977. this.requestParam.data[0].children = []
  3978. this.requestParam.data[0].children[0] = {
  3979. name: 'updatedownloadesort',
  3980. type: 'e',
  3981. parammaps: {
  3982. id: '@insertSpotList.id',
  3983. pastureid: '@insertSpotList.pastureid',
  3984. sort: '@insertSpotList.sort'
  3985. }
  3986. }
  3987. ExecDataByConfig(this.requestParam).then((response) => {
  3988. console.log('顺序切换保存发送参数', this.requestParam)
  3989. if (response.msg === 'fail') {
  3990. this.$notify({
  3991. title: this.$t('message.msg51'),
  3992. message: response.data,
  3993. type: 'warning',
  3994. duration: 2000
  3995. })
  3996. } else {
  3997. this.$notify({
  3998. title: '',
  3999. message: this.$t('message.msg50'),
  4000. type: 'success',
  4001. duration: 2000
  4002. })
  4003. this.getList()
  4004. this.isOrder = true
  4005. }
  4006. })
  4007. },
  4008. cancelChangeOrder() {
  4009. // 取消顺序
  4010. this.getList()
  4011. this.isOrder = true
  4012. },
  4013. handleDataSynchronization() {
  4014. MessageBox.confirm(this.$t('message.msg345'), {
  4015. confirmButtonText: this.$t('common.confirm'),
  4016. cancelButtonText: this.$t('common.cancel'),
  4017. type: 'warning'
  4018. })
  4019. .then(() => {
  4020. this.requestParam = {}
  4021. this.requestParam.pastureid = Cookies.get('pastureid')
  4022. // this.$alert('正在同步', { confirmButtonText: '确定' })
  4023. this.dataSynchronization.dialogFormVisible = true
  4024. getDorm(this.requestParam).then((response) => {
  4025. console.log(response)
  4026. if (response.msg == 'ok') {
  4027. this.dataSynchronization.dialogFormVisible = false
  4028. this.$notify({
  4029. title: this.$t('message.msg203'),
  4030. message: this.$t('message.msg203'),
  4031. type: 'success',
  4032. duration: 2000
  4033. })
  4034. } else {
  4035. this.$notify({
  4036. title: this.$t('message.msg204'),
  4037. message: response.data,
  4038. type: 'warning',
  4039. duration: 2000
  4040. })
  4041. this.dataSynchronization.dialogFormVisible = false
  4042. }
  4043. })
  4044. })
  4045. .catch(() => {
  4046. this.$message({ type: 'info', message: this.$t('message.msg205') })
  4047. })
  4048. },
  4049. handleRowDelete(row) {
  4050. console.log('删除')
  4051. MessageBox.confirm(this.$t('common.delMsg'), {
  4052. confirmButtonText: this.$t('common.confirm'),
  4053. cancelButtonText: this.$t('common.cancel'),
  4054. type: 'warning'
  4055. })
  4056. .then(() => {
  4057. this.selectList = []
  4058. this.requestParam = {}
  4059. this.requestParam.name = 'delDownloadedplan'
  4060. this.requestParam.parammaps = {}
  4061. this.requestParam.parammaps.pastureid = row.pastureid
  4062. this.requestParam.parammaps.id = row.id
  4063. PostDataByName(this.requestParam).then((response) => {
  4064. if (response.msg === 'fail') {
  4065. this.$notify({
  4066. title: this.$t('common.delfail'),
  4067. message: response.data,
  4068. type: 'warning',
  4069. duration: 2000
  4070. })
  4071. } else {
  4072. this.$notify({
  4073. title: this.$t('common.succes'),
  4074. message: this.$t('common.delSuccess'),
  4075. type: 'success',
  4076. duration: 2000
  4077. })
  4078. this.getList()
  4079. }
  4080. })
  4081. })
  4082. .catch(() => {
  4083. this.$message({ type: 'info', message: this.$t('common.cancelMsg') })
  4084. })
  4085. },
  4086. handleRowSort(row) {
  4087. this.$prompt(this.$t('message.msg206'), this.$t('message.msg207'), {
  4088. inputPlaceholder: this.$t('message.msg208'),
  4089. confirmButtonText: '确定',
  4090. cancelButtonText: this.$t('common.cancel'),
  4091. inputPattern: /^\d+$/,
  4092. inputErrorMessage: this.$t('message.msg209')
  4093. })
  4094. .then(({ value }) => {
  4095. const url = 'authdata/plan/sort/edit'
  4096. const data = {
  4097. planId: row.id,
  4098. mydate: row.mydate,
  4099. sort: value
  4100. }
  4101. postJson(url, data).then((response) => {
  4102. if (response.msg === 'fail') {
  4103. this.$notify({
  4104. title: this.$t('message.msg37'),
  4105. message: response.data,
  4106. type: 'error',
  4107. duration: 2000
  4108. })
  4109. } else {
  4110. this.$notify({
  4111. title: this.$t('common.succes'),
  4112. message: this.$t('message.msg153'),
  4113. type: 'success',
  4114. duration: 2000
  4115. })
  4116. this.getList()
  4117. }
  4118. })
  4119. })
  4120. .catch(() => {
  4121. this.$message({
  4122. type: 'info',
  4123. message: this.$t('message.msg210')
  4124. })
  4125. })
  4126. },
  4127. handleSpan() {
  4128. this.mergekeys.forEach((key) => {
  4129. this.spanObj[key] = []
  4130. let position = 0
  4131. this.table2.list.forEach((item, index) => {
  4132. if (index === 0) {
  4133. this.spanObj[key].push(1)
  4134. position = 0
  4135. } else {
  4136. if (key == 'description') {
  4137. if (
  4138. this.table2.list[index][key] ===
  4139. this.table2.list[index - 1][key] &&
  4140. this.table2.list[index]['sort'] ===
  4141. this.table2.list[index - 1]['sort']
  4142. ) {
  4143. this.spanObj[key][position] += 1
  4144. this.spanObj[key].push(0)
  4145. } else {
  4146. this.spanObj[key].push(1)
  4147. position = index
  4148. }
  4149. } else {
  4150. if (
  4151. this.table2.list[index][key] ===
  4152. this.table2.list[index - 1][key]
  4153. ) {
  4154. this.spanObj[key][position] += 1
  4155. this.spanObj[key].push(0)
  4156. } else {
  4157. this.spanObj[key].push(1)
  4158. position = index
  4159. }
  4160. }
  4161. }
  4162. })
  4163. })
  4164. },
  4165. objectSpanMethod({ row, column, rowIndex, columnIndex }) {
  4166. for (let i = 0; i < this.mergekeys.length; i++) {
  4167. if (column.property === this.mergekeys[i]) {
  4168. const _row = this.spanObj[this.mergekeys[i]][rowIndex]
  4169. const _col = _row > 0 ? 1 : 0
  4170. return {
  4171. rowspan: _row,
  4172. colspan: _col
  4173. }
  4174. }
  4175. }
  4176. },
  4177. form_deleteRecord() {
  4178. this.deleteRecord.dialogStatus = 'deleteRecord'
  4179. this.deleteRecord.dialogFormVisible = true
  4180. this.deleteRecord.mydate = this.table.getdataListParm.parammaps.mydate
  4181. this.getDeleteRecordList()
  4182. },
  4183. changeDeleteRecordDate() {
  4184. this.getDeleteRecordList()
  4185. },
  4186. getDeleteRecordList() {
  4187. const url = 'authdata/GetDataByName'
  4188. const data = {}
  4189. data.name = 'getDownloadedplanDeleteList'
  4190. data.page = 1
  4191. data.offset = 1
  4192. data.pagecount = ''
  4193. data.returntype = 'Map'
  4194. data.parammaps = {}
  4195. data.parammaps.pastureid = Cookies.get('pastureid')
  4196. data.parammaps.mydate = this.deleteRecord.mydate
  4197. postJson(url, data).then((response) => {
  4198. if (response.data !== null) {
  4199. this.deleteRecord.list = response.data.list
  4200. } else {
  4201. this.deleteRecord.list = []
  4202. }
  4203. this.deleteRecord.total = response.data.total
  4204. })
  4205. },
  4206. handleSelect(val) {
  4207. console.log('勾选数据', val)
  4208. this.selectList = val
  4209. },
  4210. handleTakeEffect() {
  4211. if (this.selectList.length == 0) {
  4212. this.$message({
  4213. type: 'error',
  4214. message: this.$t('message.msg12'),
  4215. duration: 2000
  4216. })
  4217. } else {
  4218. MessageBox.confirm(
  4219. this.$t('message.msg29') +
  4220. this.selectList.length +
  4221. this.$t('message.msg141'),
  4222. {
  4223. confirmButtonText: this.$t('common.confirm'),
  4224. cancelButtonText: this.$t('common.cancel'),
  4225. type: 'warning'
  4226. }
  4227. ).then(() => {
  4228. for (let i = 0; i < this.selectList.length; i++) {
  4229. // this.$set(this.selectList[i], 'enable', '1')
  4230. this.selectList[i].enable = 1
  4231. }
  4232. console.log('生效', this.selectList)
  4233. this.requestParam.common = {
  4234. returnmap: '0'
  4235. }
  4236. this.requestParam.data = []
  4237. this.requestParam.data[0] = {
  4238. name: 'insertSpotList',
  4239. resultmaps: {
  4240. list: this.selectList
  4241. }
  4242. }
  4243. this.requestParam.data[0].children = []
  4244. this.requestParam.data[0].children[0] = {
  4245. name: 'updateDownloadedplanEnable',
  4246. type: 'e',
  4247. parammaps: {
  4248. enable: '@insertSpotList.enable',
  4249. id: '@insertSpotList.id',
  4250. pastureid: '@insertSpotList.pastureid'
  4251. }
  4252. }
  4253. ExecDataByConfig(this.requestParam).then((response) => {
  4254. console.log('生效保存发送参数', this.requestParam)
  4255. if (response.msg === 'fail') {
  4256. this.$notify({
  4257. title: this.$t('message.msg11'),
  4258. message: response.data,
  4259. type: 'warning',
  4260. duration: 2000
  4261. })
  4262. } else {
  4263. this.$notify({
  4264. title: this.$t('common.succes'),
  4265. message: this.$t('message.msg10'),
  4266. type: 'success',
  4267. duration: 2000
  4268. })
  4269. this.getList()
  4270. }
  4271. })
  4272. })
  4273. }
  4274. },
  4275. handleDisable() {
  4276. if (this.selectList.length == 0) {
  4277. this.$message({
  4278. type: 'error',
  4279. message: this.$t('message.msg12'),
  4280. duration: 2000
  4281. })
  4282. } else {
  4283. MessageBox.confirm(
  4284. this.$t('message.msg29') +
  4285. this.selectList.length +
  4286. this.$t('message.msg30'),
  4287. {
  4288. confirmButtonText: this.$t('common.confirm'),
  4289. cancelButtonText: this.$t('common.cancel'),
  4290. type: 'warning'
  4291. }
  4292. ).then(() => {
  4293. for (let i = 0; i < this.selectList.length; i++) {
  4294. // this.$set(this.selectList[i], 'enable', '1')
  4295. this.selectList[i].enable = 0
  4296. }
  4297. console.log('禁用', this.selectList)
  4298. this.requestParam.common = {
  4299. returnmap: '0'
  4300. }
  4301. this.requestParam.data = []
  4302. this.requestParam.data[0] = {
  4303. name: 'insertSpotList',
  4304. resultmaps: {
  4305. list: this.selectList
  4306. }
  4307. }
  4308. this.requestParam.data[0].children = []
  4309. this.requestParam.data[0].children[0] = {
  4310. name: 'updateDownloadedplanEnable',
  4311. type: 'e',
  4312. parammaps: {
  4313. enable: '@insertSpotList.enable',
  4314. id: '@insertSpotList.id',
  4315. pastureid: '@insertSpotList.pastureid'
  4316. }
  4317. }
  4318. ExecDataByConfig(this.requestParam).then((response) => {
  4319. console.log('禁用保存发送参数', this.requestParam)
  4320. if (response.msg === 'fail') {
  4321. this.$notify({
  4322. title: this.$t('message.msg13'),
  4323. message: response.data,
  4324. type: 'warning',
  4325. duration: 2000
  4326. })
  4327. } else {
  4328. this.$notify({
  4329. title: this.$t('common.succes'),
  4330. message: this.$t('message.msg15'),
  4331. type: 'success',
  4332. duration: 2000
  4333. })
  4334. this.getList()
  4335. }
  4336. })
  4337. })
  4338. }
  4339. },
  4340. handlePrint() {
  4341. this.downLoad.getdataListParm.parammaps.date =
  4342. this.table.getdataListParm.parammaps.mydate
  4343. this.downLoad.getdataListParm.parammaps.lpplantype =
  4344. this.table.getdataListParm.parammaps.lpplantype
  4345. this.downLoad.getdataListParm.parammaps.times =
  4346. this.table.getdataListParm.parammaps.times
  4347. this.downLoad.getdataListParm.parammaps.enable =
  4348. this.table.getdataListParm.parammaps.enable
  4349. this.downLoad.getdataListParm.parammaps.enable2 =
  4350. this.table.getdataListParm.parammaps.enable2
  4351. var exportTitle = ''
  4352. if (this.table.getdataListParm.parammaps.plandimen == '1') {
  4353. if (this.table.getdataListParm.parammaps.enable3 == '0') {
  4354. this.downLoad.getdataListParm.name = 'downloadPlanTLJDTMR'
  4355. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.a')
  4356. } else if (this.table.getdataListParm.parammaps.enable3 == '1') {
  4357. this.downLoad.getdataListParm.name = 'downloadPlanTLLDTMR'
  4358. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.b')
  4359. } else if (this.table.getdataListParm.parammaps.enable3 == '2') {
  4360. this.downLoad.getdataListParm.name = 'downloadPlanSLJDTMR'
  4361. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.c')
  4362. } else if (this.table.getdataListParm.parammaps.enable3 == '3') {
  4363. this.downLoad.getdataListParm.name = 'downloadPlanTSLJDTMR'
  4364. exportTitle =
  4365. this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.d')
  4366. } else if (this.table.getdataListParm.parammaps.enable3 == '4') {
  4367. this.downLoad.getdataListParm.name = 'downloadPlanTSLLDTMR'
  4368. exportTitle =
  4369. this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.g')
  4370. } else if (this.table.getdataListParm.parammaps.enable3 == '5') {
  4371. this.downLoad.getdataListParm.name = 'downloadPlanBZJDTMR'
  4372. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.e')
  4373. } else {
  4374. this.downLoad.getdataListParm.name = 'downloadPlanSFJDTMR'
  4375. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.f')
  4376. }
  4377. } else {
  4378. if (this.table.getdataListParm.parammaps.enable3 == '0') {
  4379. this.downLoad.getdataListParm.name = 'downloadPlanTLJD'
  4380. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.a')
  4381. } else if (this.table.getdataListParm.parammaps.enable3 == '1') {
  4382. this.downLoad.getdataListParm.name = 'downloadPlanTLLD'
  4383. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.b')
  4384. } else if (this.table.getdataListParm.parammaps.enable3 == '2') {
  4385. this.downLoad.getdataListParm.name = 'downloadPlanSLJD'
  4386. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.c')
  4387. } else if (this.table.getdataListParm.parammaps.enable3 == '3') {
  4388. this.downLoad.getdataListParm.name = 'downloadPlanTSLJD'
  4389. exportTitle =
  4390. this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.d')
  4391. } else if (this.table.getdataListParm.parammaps.enable3 == '4') {
  4392. this.downLoad.getdataListParm.name = 'downloadPlanTSLLD'
  4393. exportTitle =
  4394. this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.g')
  4395. } else if (this.table.getdataListParm.parammaps.enable3 == '5') {
  4396. this.downLoad.getdataListParm.name = 'downloadPlanBZJD'
  4397. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.e')
  4398. } else {
  4399. this.downLoad.getdataListParm.name = 'downloadPlanSFJD'
  4400. exportTitle = this.table.getdataListParm.parammaps.mydate + this.$t('message.msg353.f')
  4401. }
  4402. }
  4403. GetReportform(this.downLoad.getdataListParm).then((response) => {
  4404. if (response.data.list !== null) {
  4405. this.downLoad.labelList = []
  4406. var filterValArr = []
  4407. for (let i = 0; i < response.data.list.data1.length; i++) {
  4408. this.downLoad.labelList.push(response.data.list.data1[i].label)
  4409. filterValArr.push(response.data.list.data1[i].prop)
  4410. }
  4411. this.downLoad.list = response.data.list.data2
  4412. } else {
  4413. this.downLoad.list = []
  4414. }
  4415. let data = []
  4416. for (let i = 0; i < filterValArr.length; i++) {
  4417. let obj = {}
  4418. obj.field = filterValArr[i]
  4419. obj.columnSize = i
  4420. for (let j = i; j < this.downLoad.labelList.length; j++) {
  4421. obj.displayName = this.downLoad.labelList[i]
  4422. }
  4423. if (obj.field !== undefined && obj.displayName !== undefined) {
  4424. data.push(obj)
  4425. }
  4426. for (let i = 0; i < this.downLoad.list.length; i++) {
  4427. if (
  4428. this.downLoad.list[i][obj.displayName] == null ||
  4429. this.downLoad.list[i][obj.displayName] == undefined
  4430. ) {
  4431. this.downLoad.list[i][obj.displayName] = ''
  4432. }
  4433. }
  4434. }
  4435. console.log(this.downLoad.list)
  4436. printJS({
  4437. printable: this.downLoad.list,
  4438. properties: data,
  4439. type: 'json',
  4440. header: exportTitle,
  4441. //样式设置
  4442. gridStyle: 'border:1px solid #ccc;',
  4443. gridHeaderStyle: 'border:1px solid #ccc;text-align:center'
  4444. })
  4445. })
  4446. },
  4447. handleDelete() {
  4448. if (this.selectList.length == 0) {
  4449. this.$message({
  4450. type: 'error',
  4451. message: this.$t('message.msg211'),
  4452. duration: 2000
  4453. })
  4454. } else {
  4455. MessageBox.confirm(
  4456. this.$t('message.msg29') +
  4457. this.selectList.length +
  4458. this.$t('message.msg31'),
  4459. {
  4460. confirmButtonText: this.$t('common.confirm'),
  4461. cancelButtonText: this.$t('common.cancel'),
  4462. type: 'warning'
  4463. }
  4464. ).then(() => {
  4465. console.log(this.selectList)
  4466. this.requestParam.common = { returnmap: '0' }
  4467. this.requestParam.data = []
  4468. this.requestParam.data[0] = {
  4469. name: 'insertSpotList',
  4470. resultmaps: { list: this.selectList }
  4471. }
  4472. this.requestParam.data[0].children = []
  4473. this.requestParam.data[0].children[0] = {
  4474. name: 'delDownloadedplan',
  4475. type: 'e',
  4476. parammaps: {
  4477. id: '@insertSpotList.id',
  4478. pastureid: '@insertSpotList.pastureid'
  4479. }
  4480. }
  4481. ExecDataByConfig(this.requestParam).then((response) => {
  4482. console.log('删除保存发送参数', this.requestParam)
  4483. if (response.msg === 'fail') {
  4484. this.$notify({
  4485. title: this.$t('common.delfail'),
  4486. message: response.data,
  4487. type: 'warning',
  4488. duration: 2000
  4489. })
  4490. } else {
  4491. this.$notify({
  4492. title: '',
  4493. message: this.$t('common.delSuccess'),
  4494. type: 'success',
  4495. duration: 2000
  4496. })
  4497. this.getList()
  4498. }
  4499. })
  4500. })
  4501. }
  4502. },
  4503. handleDataUpload() {
  4504. let a = Cookies.get('url')
  4505. let b = a.search(8081)
  4506. let c = a.substring(0, a.search(8081)) + '8082'
  4507. let d = a.substring(0, a.lastIndexOf('/'))
  4508. console.log(d)
  4509. let url = ''
  4510. if (b == -1) {
  4511. url = d + ':8082'
  4512. } else {
  4513. url = c
  4514. }
  4515. let _url = url + '/authdata/feeding/push'
  4516. let data = {
  4517. date: parseTime(new Date(), '{y}-{m}-{d}'),
  4518. pastureId: Cookies.get('pastureid')
  4519. }
  4520. console.log(_url, '_url')
  4521. postJson2(_url, data).then((response) => {
  4522. if (response.msg == 'ok') {
  4523. this.$notify({
  4524. title: '',
  4525. message: response.data,
  4526. type: 'success',
  4527. duration: 2000
  4528. })
  4529. } else {
  4530. this.$notify({
  4531. title: this.$t('message.msg40'),
  4532. message: response.data,
  4533. type: 'warning',
  4534. duration: 2000
  4535. })
  4536. }
  4537. })
  4538. },
  4539. handleUpdate2(row) {
  4540. for (let i = 0; i < this.table2.list.length; i++) {
  4541. if (this.table2.list[i].Edit == true) {
  4542. this.$message({
  4543. type: 'error',
  4544. message: this.$t('driver.messageNote'),
  4545. duration: 2000
  4546. })
  4547. return false
  4548. }
  4549. }
  4550. // 编辑true,不可编辑false
  4551. row.Edit = true
  4552. row.NoEdit = false
  4553. // 新增false,编辑false,编辑保存true
  4554. row.isUpdate = false
  4555. row.isUpdateSave = true
  4556. },
  4557. updateData2(row, type) {
  4558. const url = 'authdata/dailydata/edit'
  4559. const data = {}
  4560. data.pid = row.pid
  4561. data.weight = row.weight
  4562. data.sort = row.sort
  4563. // 饲料
  4564. if (type == '0') {
  4565. data.location = 0
  4566. data.fid = row.fid
  4567. } else {
  4568. // 车辆||栏舍
  4569. data.location = 1
  4570. data.fbarid = row.fbarid
  4571. }
  4572. data.date = this.table.getdataListParm.parammaps.mydate
  4573. data.sort = row.sort
  4574. postJson(url, data).then((response) => {
  4575. if (response.msg == 'ok') {
  4576. this.$notify({
  4577. title: '',
  4578. message: this.$t('message.msg212'),
  4579. type: 'success',
  4580. duration: 2000
  4581. })
  4582. this.getList2()
  4583. this.getList3()
  4584. } else {
  4585. this.$notify({
  4586. title: this.$t('message.msg37'),
  4587. message: response.data,
  4588. type: 'warning',
  4589. duration: 2000
  4590. })
  4591. }
  4592. })
  4593. },
  4594. updateCancel2(row) {
  4595. row.Edit = false
  4596. row.NoEdit = true
  4597. // 新增false,编辑true,编辑保存false
  4598. row.isCreate = false
  4599. row.isUpdate = true
  4600. row.isUpdateSave = false
  4601. this.getList2()
  4602. },
  4603. handleUpdate3(row) {
  4604. for (let i = 0; i < this.table3.list.length; i++) {
  4605. if (this.table3.list[i].Edit == true) {
  4606. this.$message({
  4607. type: 'error',
  4608. message: this.$t('driver.messageNote'),
  4609. duration: 2000
  4610. })
  4611. return false
  4612. }
  4613. }
  4614. // 编辑true,不可编辑false
  4615. row.Edit = true
  4616. row.NoEdit = false
  4617. // 新增false,编辑false,编辑保存true
  4618. row.isUpdate = false
  4619. row.isUpdateSave = true
  4620. },
  4621. updateData3(row, type) {
  4622. const url = 'authdata/dailydata/edit'
  4623. const data = {}
  4624. data.pid = row.pid
  4625. data.weight = row.weight
  4626. data.sort = row.sort
  4627. // 饲料
  4628. if (type == '0') {
  4629. data.location = 0
  4630. data.fid = row.fid
  4631. } else {
  4632. // 车辆||栏舍
  4633. data.location = 1
  4634. data.fbarid = row.fbarid
  4635. }
  4636. data.date = this.table.getdataListParm.parammaps.mydate
  4637. data.sort = row.sort
  4638. postJson(url, data).then((response) => {
  4639. if (response.msg == 'ok') {
  4640. this.$notify({
  4641. title: '',
  4642. message: this.$t('message.msg212'),
  4643. type: 'success',
  4644. duration: 2000
  4645. })
  4646. this.getList2()
  4647. this.getList3()
  4648. } else {
  4649. this.$notify({
  4650. title: this.$t('message.msg37'),
  4651. message: response.data,
  4652. type: 'warning',
  4653. duration: 2000
  4654. })
  4655. }
  4656. })
  4657. },
  4658. updateCancel3(row) {
  4659. row.Edit = false
  4660. row.NoEdit = true
  4661. // 新增false,编辑true,编辑保存false
  4662. row.isCreate = false
  4663. row.isUpdate = true
  4664. row.isUpdateSave = false
  4665. this.getList3()
  4666. },
  4667. changeDriver(value, row) {
  4668. const url = 'authdata/PostDataByName'
  4669. const data = {
  4670. name: 'updateDownloadedplanDriver',
  4671. parammaps: {
  4672. driverId: value,
  4673. id: row.id
  4674. }
  4675. }
  4676. postJson(url, data).then((response) => {
  4677. if (response.msg == 'ok') {
  4678. this.$notify({
  4679. title: '',
  4680. message: this.$t('message.msg212'),
  4681. type: 'success',
  4682. duration: 2000
  4683. })
  4684. this.getList()
  4685. } else {
  4686. this.$notify({
  4687. title: this.$t('message.msg37'),
  4688. message: response.data,
  4689. type: 'warning',
  4690. duration: 2000
  4691. })
  4692. }
  4693. })
  4694. },
  4695. getIsSap() {
  4696. GetDataByName(this.sapUpload.getdataListParm).then((response) => {
  4697. // console.log()
  4698. if (response.data.list !== null) {
  4699. if (response.data.list[0].inforvalue == 1) {
  4700. this.sapUpload.isSap = true
  4701. } else {
  4702. this.sapUpload.isSap = false
  4703. }
  4704. console.log(this.sapUpload.isSap)
  4705. }
  4706. })
  4707. },
  4708. handleSAPUpload() {
  4709. this.sapUpload.dialogStatus = 'sapUpload'
  4710. this.sapUpload.dialogFormVisible = true
  4711. },
  4712. sapUploadData() {
  4713. this.$refs['sapUpload'].validate((valid) => {
  4714. if (valid) {
  4715. const url = 'authdata/sap/material'
  4716. const data = {
  4717. // "name":"xdmysapupload",
  4718. pastureid: Cookies.get('pastureid'),
  4719. date: parseTime(this.sapUpload.temp.date, '{y}-{m}-{d}')
  4720. }
  4721. postJson(url, data).then((response) => {
  4722. if (response.msg == 'ok') {
  4723. this.$notify({
  4724. title: '',
  4725. message: this.$t('message.msg153'),
  4726. type: 'success',
  4727. duration: 2000
  4728. })
  4729. this.sapUpload.dialogFormVisible = false
  4730. this.getList()
  4731. } else {
  4732. this.$notify({
  4733. title: this.$t('message.msg37'),
  4734. message: response.data,
  4735. type: 'warning',
  4736. duration: 2000
  4737. })
  4738. }
  4739. })
  4740. }
  4741. })
  4742. },
  4743. getIspalyUd() {
  4744. let url = 'authdata/GetDataByName'
  4745. let data = {
  4746. name: 'getSysoptEnable',
  4747. page: 1,
  4748. offset: 1,
  4749. pagecount: 1,
  4750. returntype: 'Map',
  4751. parammaps: {
  4752. pastureid: Cookies.get('pastureid'),
  4753. inforname: 'gmUdSync'
  4754. }
  4755. }
  4756. postJson(url, data).then((response) => {
  4757. if (response.msg !== 'fail') {
  4758. if (response.data.list[0].inforvalue == 0) {
  4759. this.ispalyUd = false
  4760. } else {
  4761. this.ispalyUd = true
  4762. }
  4763. } else {
  4764. this.$notify({
  4765. title: this.$t('message.msg14'),
  4766. message: response.data,
  4767. type: 'warning',
  4768. duration: 2000
  4769. })
  4770. }
  4771. })
  4772. },
  4773. handleGetUd1() {
  4774. this.sapUpload.dialogStatus = 'udload1'
  4775. this.sapUpload.dialogFormVisible = true
  4776. },
  4777. udData1() {
  4778. this.$refs['sapUpload'].validate((valid) => {
  4779. if (valid) {
  4780. let url = 'authdata/gm/udutir/push'
  4781. let data = {
  4782. pastureId: Cookies.get('pastureid'),
  4783. date: parseTime(this.sapUpload.temp.date, '{y}-{m}-{d}')
  4784. }
  4785. postJson(url, data).then((response) => {
  4786. if (response.msg !== 'fail') {
  4787. this.$notify({
  4788. title: this.$t('common.succes'),
  4789. message: this.$t('driver.saveSuccess'),
  4790. type: 'success',
  4791. duration: 2000
  4792. })
  4793. this.sapUpload.dialogFormVisible = false
  4794. this.getList()
  4795. } else {
  4796. this.$notify({
  4797. title: this.$t('driver.saveFail'),
  4798. message: response.data,
  4799. type: 'warning',
  4800. duration: 2000
  4801. })
  4802. }
  4803. })
  4804. }
  4805. })
  4806. },
  4807. handleGetUd2() {
  4808. this.sapUpload.dialogStatus = 'udload2'
  4809. this.sapUpload.dialogFormVisible = true
  4810. },
  4811. udData2() {
  4812. this.$refs['sapUpload'].validate((valid) => {
  4813. if (valid) {
  4814. let url = 'authdata/gm/udbarfeedremain/push'
  4815. let data = {
  4816. pastureId: Cookies.get('pastureid'),
  4817. date: parseTime(this.sapUpload.temp.date, '{y}-{m}-{d}')
  4818. }
  4819. postJson(url, data).then((response) => {
  4820. if (response.msg !== 'fail') {
  4821. this.$notify({
  4822. title: this.$t('common.succes'),
  4823. message: this.$t('driver.saveSuccess'),
  4824. type: 'success',
  4825. duration: 2000
  4826. })
  4827. this.sapUpload.dialogFormVisible = false
  4828. this.getList()
  4829. } else {
  4830. this.$notify({
  4831. title: this.$t('driver.saveFail'),
  4832. message: response.data,
  4833. type: 'warning',
  4834. duration: 2000
  4835. })
  4836. }
  4837. })
  4838. }
  4839. })
  4840. },
  4841. handleGetUd3() {
  4842. this.sapUpload.dialogStatus = 'udload3'
  4843. this.sapUpload.dialogFormVisible = true
  4844. },
  4845. udData3() {
  4846. this.$refs['sapUpload'].validate((valid) => {
  4847. if (valid) {
  4848. let url = 'authdata/gm/udmaterialIssue/push'
  4849. let data = {
  4850. pastureId: Cookies.get('pastureid'),
  4851. date: parseTime(this.sapUpload.temp.date, '{y}-{m}-{d}')
  4852. }
  4853. postJson(url, data).then((response) => {
  4854. if (response.msg !== 'fail') {
  4855. this.$notify({
  4856. title: this.$t('common.succes'),
  4857. message: this.$t('driver.saveSuccess'),
  4858. type: 'success',
  4859. duration: 2000
  4860. })
  4861. this.sapUpload.dialogFormVisible = false
  4862. this.getList()
  4863. } else {
  4864. this.$notify({
  4865. title: this.$t('driver.saveFail'),
  4866. message: response.data,
  4867. type: 'warning',
  4868. duration: 2000
  4869. })
  4870. }
  4871. })
  4872. }
  4873. })
  4874. },
  4875. handleRowEmpty(row, plan) {
  4876. console.log(row, 'row')
  4877. MessageBox.confirm(this.$t('message.msg310'), {
  4878. confirmButtonText: this.$t('common.confirm'),
  4879. cancelButtonText: this.$t('common.cancel'),
  4880. type: 'warning'
  4881. }).then(() => {
  4882. console.log(this.selectList)
  4883. this.requestParam.common = { returnmap: '0' }
  4884. this.requestParam.data = []
  4885. this.requestParam.data[0] = {
  4886. name: 'insertSpotList',
  4887. resultmaps: { list: this.selectList }
  4888. }
  4889. this.requestParam.data[0].children = []
  4890. this.requestParam.data[0].children[0] = {
  4891. name: 'delDownloadedplan',
  4892. type: 'e',
  4893. parammaps: {
  4894. id: '@insertSpotList.id',
  4895. pastureid: '@insertSpotList.pastureid'
  4896. }
  4897. }
  4898. const url = 'authdata/PostDataByName'
  4899. const data = {
  4900. name: 'clearDeleteDownloadedplan',
  4901. parammaps: {
  4902. pid: row.pid,
  4903. lpplantype: this.table3.getdataListParm.parammaps.lpplantype,
  4904. plan: plan,
  4905. sort: row.sort
  4906. }
  4907. }
  4908. postJson(url, data).then((response) => {
  4909. console.log('清空保存发送参数', this.requestParam)
  4910. if (response.msg === 'fail') {
  4911. this.$notify({
  4912. title: this.$t('message.msg214'),
  4913. message: response.data,
  4914. type: 'warning',
  4915. duration: 2000
  4916. })
  4917. } else {
  4918. this.$notify({
  4919. title: '',
  4920. message: this.$t('message.msg213'),
  4921. type: 'success',
  4922. duration: 2000
  4923. })
  4924. // this.getList()
  4925. this.getList2()
  4926. this.getList3()
  4927. }
  4928. })
  4929. })
  4930. },
  4931. handleQuickcompletion() {
  4932. if (this.selectList.length == 0) {
  4933. this.$message({
  4934. type: 'error',
  4935. message: this.$t('message.msg215'),
  4936. duration: 2000
  4937. })
  4938. } else {
  4939. MessageBox.confirm(this.$t('message.msg216'), {
  4940. confirmButtonText: this.$t('common.confirm'),
  4941. cancelButtonText: this.$t('common.cancel'),
  4942. type: 'warning'
  4943. }).then(() => {
  4944. console.log(this.selectList)
  4945. let arr = []
  4946. for (let i = 0; i < this.selectList.length; i++) {
  4947. arr.push(this.selectList[i].id)
  4948. }
  4949. const url = '/authdata/plan/artificial/edit'
  4950. const data = {
  4951. planId: arr.join()
  4952. }
  4953. postJson(url, data).then((response) => {
  4954. console.log('快速完成保存发送参数', this.requestParam)
  4955. if (response.msg === 'fail') {
  4956. this.$notify({
  4957. title: this.$t('driver.saveFail'),
  4958. message: response.data,
  4959. type: 'warning',
  4960. duration: 2000
  4961. })
  4962. } else {
  4963. this.$notify({
  4964. title: '',
  4965. message: this.$t('driver.saveSuccess'),
  4966. type: 'success',
  4967. duration: 2000
  4968. })
  4969. this.getList()
  4970. }
  4971. })
  4972. })
  4973. }
  4974. }
  4975. }
  4976. }
  4977. </script>
  4978. <style>
  4979. .el-table .warning-row {
  4980. background: oldlace;
  4981. }
  4982. .el-table .success-row {
  4983. background: #f0f9eb;
  4984. }
  4985. @page {
  4986. size: auto A4 landscape;
  4987. margin: 3mm;
  4988. }
  4989. .agreeCon {
  4990. background: #fff;
  4991. box-sizing: border-box;
  4992. padding: 2rem 3rem 4rem;
  4993. }
  4994. </style>
  4995. <style lang="scss" scoped>
  4996. .app-container {
  4997. background: #fff;
  4998. }
  4999. .operation {
  5000. }
  5001. .search {
  5002. margin-top: 10px;
  5003. }
  5004. .table {
  5005. margin-bottom: 20px;
  5006. }
  5007. .template {
  5008. background: #fff;
  5009. position: relative;
  5010. }
  5011. .table2 {
  5012. // float: left;width: 50%;
  5013. background: #fff;
  5014. position: relative;
  5015. .content-table {
  5016. margin-top: 20px;
  5017. }
  5018. .contentOperation {
  5019. right: -50px;
  5020. z-index: 1;
  5021. }
  5022. }
  5023. .table3 {
  5024. // float: left;width: 50%;
  5025. background: #fff;
  5026. position: relative;
  5027. .content-table {
  5028. margin-top: 20px;
  5029. }
  5030. .contentOperation {
  5031. right: -50px;
  5032. z-index: 1;
  5033. }
  5034. }
  5035. /deep/.el-input.is-disabled .el-input__inner {
  5036. color: #000;
  5037. }
  5038. </style>