index.vue 179 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516
  1. <template>
  2. <div class="app-container">
  3. <div v-if="isPercentage" class="percentage" style="width: 210px;height: 90px;background: #fff;position: fixed;bottom: 0;left: 0;z-index: 9999999999999;">
  4. <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
  5. <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
  6. </div>
  7. <div class="filter-container">
  8. <el-select v-model="getdataListParm.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item" @change="changePastureName">
  9. <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
  10. </el-select>
  11. <el-input v-model="getdataListParm.parammaps.orderNumber" placeholder="申购单号" style="width: 200px;" class="filter-item" />
  12. <el-select v-model="getdataListParm.parammaps.stuteSH" style="width: 140px;" clearable placeholder="审核状态" class="filter-item">
  13. <el-option v-for="item in statues" :key="item.id" :label="item.name" :value="item.id" />
  14. </el-select>
  15. <el-select v-model="getdataListParm.parammaps.departmentId" clearable style="width: 140px;" placeholder="申购部门" class="filter-item">
  16. <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
  17. </el-select>
  18. <el-select v-model="getdataListParm.parammaps.purchase_type" clearable style="width: 140px;" placeholder="申购状态" class="filter-item">
  19. <el-option v-for="item in subscriptionStatusList" :key="item.id" :label="item.name" :value="item.id" />
  20. </el-select>
  21. <el-input v-model="getdataListParm.parammaps.empName" placeholder="申购人" style="width: 200px;" class="filter-item" />
  22. <!-- <el-select v-model="getdataListParm.parammaps.empName " style="width: 140px;" placeholder="申购人" class="filter-item">
  23. <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
  24. </el-select> -->
  25. <el-date-picker ref="inputDatetime" v-model="getdataListParm.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
  26. <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
  27. <div>
  28. <el-button v-if="isSubscribeAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="apply_subscribe">新增</el-button>
  29. <el-button v-if="isSubscribeSpecial" class="filter-item" type="primary" icon="el-icon-edit" @click="handle_specialSubscription">特殊申购</el-button>
  30. <el-button v-if="isSubscribeMilk" class="filter-item" type="primary" icon="el-icon-edit" @click="handle_milkSubscription">奶厅申购</el-button>
  31. <el-button v-if="isSubscribeExport" v-waves class="filter-item" type="success" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
  32. <el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
  33. <el-radio-button label="全部" />
  34. <el-badge :value="pending.total" class="item">
  35. <el-radio-button label="待处理" />
  36. </el-badge>
  37. <el-radio-button label="已处理" />
  38. </el-radio-group>
  39. </div>
  40. </div>
  41. <div class="filter-button" />
  42. <el-table
  43. :key="tableKey"
  44. v-loading="listLoading"
  45. element-loading-text="给我一点时间"
  46. :data="list"
  47. border
  48. fit
  49. highlight-current-row
  50. style="width: 100%;"
  51. :row-style="rowStyle"
  52. :cell-style="cellStyle"
  53. class="elTable"
  54. :max-height="myHeight"
  55. >
  56. <el-table-column label="序号" align="center" type="index" width="50px">
  57. <template slot-scope="scope">
  58. <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
  59. </template>
  60. </el-table-column>
  61. <el-table-column label="申购单号" min-width="150px" align="center">
  62. <template slot-scope="scope">
  63. <span>{{ scope.row.orderNumber }}</span>
  64. </template>
  65. </el-table-column>
  66. <el-table-column label="牧场" min-width="90px" align="center">
  67. <template slot-scope="scope">
  68. <span>{{ scope.row.pastureName }}</span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="申购日期" sortable prop="inputTime" min-width="80px" align="center" />
  72. <el-table-column label="申购状态" min-width="80px" align="center">
  73. <template slot-scope="scope">
  74. <span v-if="scope.row.purchase_type == 1">暂估申购</span>
  75. <span v-else-if="scope.row.purchase_type == 3">赠品申购</span>
  76. <span v-else-if="scope.row.departmentName == '挤奶处'">奶厅申购</span>
  77. <span v-else>新增申购</span>
  78. </template>
  79. </el-table-column>
  80. <el-table-column label="审核状态" min-width="80px" align="center" :formatter="statue" />
  81. <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width" fixed="right">
  82. <template slot-scope="{row}">
  83. <el-button v-if="isSubscribeSee" type="primary" size="mini" @click="form_see(row)">查看</el-button>
  84. <el-button v-if="row.statue == 4||row.statue == 6||row.statue == 8||row.statue == 10||row.statue == 12 ||row.statue == 14" style="display:inline-block" type="success" size="mini" @click="form_edit(row)">编辑</el-button>
  85. <el-button v-else style="display:none" type="success" size="mini" @click="form_edit(row)">编辑</el-button>
  86. <!-- 库管 -->
  87. <el-button v-if="isSubscribeExamineKG && row.statue == 2 && row.departmentName == '挤奶处'" style="display:inline-block" type="success" size="mini" @click="handleExamine1(row)">库管</el-button>
  88. <el-button v-if="isSubscribeExamineKG && row.statue == 2 && row.departmentName !== '挤奶处'" style="display:inline-block" type="success" size="mini" @click="form_edit1(row)">合单</el-button>
  89. <el-button v-if="isSubscribeExamineKG && row.statue == 2 && row.departmentName !== '挤奶处'" style="display:inline-block" type="success" size="mini" @click="form_modify1(row)">提交</el-button>
  90. <!-- 设备 -->
  91. <el-button v-if="isSubscribeExamineSBZG && row.statue == 3" style="display:inline-block" type="success" size="mini" @click="handleExamine2(row)">设备</el-button>
  92. <!-- 供应商主管 -->
  93. <el-button v-if="isSubscribeExamineZG && row.statue == 9" style="display:inline-block" type="success" size="mini" @click="handleExamine3(row)">供应商主管</el-button>
  94. <!-- 场长 -->
  95. <el-button v-if="sdchangzhangshenhe && row.statue == 5 && (row.departmentName == '挤奶处' && row.examine == 1)" style="display:inline-block" type="success" size="mini" @click="handleExamine4(row)">场长</el-button>
  96. <el-button v-else-if="sdchangzhangshenhe && row.statue == 5 && row.departmentName !== '挤奶处'" style="display:inline-block" type="success" size="mini" @click="handleExamine4(row)">场长</el-button>
  97. <!-- 采购 -->
  98. <el-button v-if="isSubscribeExamineCG && (row.departmentName == '挤奶处' && row.statue == 15 ) || (row.departmentName !== '挤奶处' && row.statue == 11) " style="display:inline-block" type="success" size="mini" @click="handleExamine5(row)">采购</el-button>
  99. <!-- 财务 -->
  100. <el-button v-if="isSubscribeExamineCW && row.purchase_type > 0 && row.statue == 7" style="display:inline-block" type="success" size="mini" @click="handleExamine6(row)">财务</el-button>
  101. <!-- 奶厅 -->
  102. <el-button v-if="isSubscribeExamineNT && row.departmentName == '挤奶处' && (row.examine !== 1 && row.statue == 5 || row.statue == 11) " style="display:inline-block" type="success" size="mini" @click="handleExamine7(row)">奶厅</el-button>
  103. <el-button v-if="isSubscribeDelete && (row.statue == 4||row.statue == 6||row.statue == 8||row.statue == 12 ||row.statue == 14 ||row.statue == 16)" style="display:inline-block" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
  104. <el-button v-else style="display:none" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
  105. </template>
  106. </el-table-column>
  107. </el-table>
  108. <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
  109. <!-- 弹出层新增or修改 -->
  110. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="90%">
  111. <div class="app-container">
  112. <el-form
  113. ref="createTemp"
  114. :rules="rules"
  115. :model="createTemp"
  116. label-position="right"
  117. label-width="100px"
  118. style="width: 90%;margin:0 auto;"
  119. >
  120. <el-row>
  121. <el-col :span="8">
  122. <el-form-item label="申购单号:" prop="orderNumber">
  123. <el-input ref="orderNumber" v-model="createTemp.orderNumber" disabled />
  124. </el-form-item>
  125. </el-col>
  126. <el-col :span="8">
  127. <el-form-item label="牧场:" prop="pastureId">
  128. <el-select v-model="createTemp.pastureId" placeholder="牧场" class="filter-item" style="width:100%" :disabled="dialogStatus==='update'" @change="changePasture">
  129. <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
  130. </el-select>
  131. </el-form-item>
  132. </el-col>
  133. <el-col :span="8">
  134. <el-form-item label="申购部门:" prop="departmentId">
  135. <el-select v-model="createTemp.departmentId" placeholder="申购部门" class="filter-item" style="width:100%" :disabled="dialogStatus==='update' || isMilk" @change="changeDepart">
  136. <el-option v-for="item in createDepartList" :key="item.id" :label="item.name" :value="item.id" :disabled="item.name== '挤奶处'" />
  137. </el-select>
  138. </el-form-item>
  139. </el-col>
  140. </el-row>
  141. <el-row>
  142. <el-col :span="8">
  143. <el-form-item label="申购人:" prop="employeId">
  144. <el-select v-model="createTemp.employeId" placeholder="申购人" class="filter-item" style="width:100%" :disabled="dialogStatus==='update'">
  145. <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
  146. </el-select>
  147. </el-form-item>
  148. </el-col>
  149. <el-col :span="8">
  150. <el-form-item label="申购日期:" prop="createTime">
  151. <el-date-picker v-model="createTemp.createTime" :picker-options="pickerOptions" type="datetime" placeholder="申购日期" style="width:100%" :disabled="dialogStatus==='update'" />
  152. </el-form-item>
  153. </el-col>
  154. <el-col v-if="dialogStatus==='create'" :span="8">
  155. <el-form-item label="线上采购:" prop="providerId">
  156. <el-select v-model="createTemp.providerId" placeholder="线上采购" clearable class="filter-item" style="width:100%" @change="changeProvider">
  157. <el-option v-for="item in onlineSubscriptionList" :key="item.id" :label="item.providerName" :value="item.id" />
  158. </el-select>
  159. </el-form-item>
  160. </el-col>
  161. <el-col v-if="dialogStatus==='update'" :span="8">
  162. <el-form-item label="线上采购:" prop="providerName">
  163. <el-input ref="providerName" v-model="createTemp.providerName" disabled />
  164. </el-form-item>
  165. </el-col>
  166. </el-row>
  167. <el-row>
  168. <el-col :span="16">
  169. <el-form-item label="备件:" prop="partCode">
  170. <el-autocomplete
  171. v-model="createTemp.partCode"
  172. value-key="name"
  173. class="inline-input"
  174. :fetch-suggestions="sparePartSearch"
  175. placeholder="请输入备件编号或备件名称或备件规格"
  176. style="width:100%"
  177. ref="autocomplete"
  178. @select="handleSelectSparePart"
  179. >
  180. <template slot-scope="{ item }">
  181. <b>备件编号:</b><div class="name" style="display: inline;">{{ item.partCode }}</div>&nbsp;
  182. | &nbsp;<b>备件名称:</b><span class="addr">{{ item.partName }}</span>&nbsp;
  183. | &nbsp;<b>备件规格:</b><span class="addr">{{ item.specification }}</span>
  184. </template>
  185. </el-autocomplete>
  186. </el-form-item>
  187. </el-col>
  188. </el-row>
  189. </el-form>
  190. <el-table
  191. :key="tableKey"
  192. v-loading="listLoading"
  193. element-loading-text="给我一点时间"
  194. :data="listAdd"
  195. border
  196. fit
  197. highlight-current-row
  198. style="width: 100%;margin-bottom:30px"
  199. :row-style="rowStyle"
  200. :cell-style="cellStyle"
  201. class="elTable"
  202. >
  203. <!-- table表格 -->
  204. <el-table-column label="序号" align="center" type="index" width="50px" />
  205. <el-table-column label="备件编号" prop="partCode" align="center" min-width="90">
  206. <template slot-scope="scope">
  207. <span>{{ scope.row.partCode }}</span>
  208. </template>
  209. </el-table-column>
  210. <el-table-column label="备件名称" prop="partName" align="center" min-width="90">
  211. <template slot-scope="scope">
  212. <span>{{ scope.row.partName }}</span>
  213. </template>
  214. </el-table-column>
  215. <el-table-column label="备件规格" prop="specification" min-width="80px" align="center">
  216. <template slot-scope="scope">
  217. <span>{{ scope.row.specification }}</span>
  218. </template>
  219. </el-table-column>
  220. <el-table-column label="备件图片" prop="picpath" min-width="110px" align="center">
  221. <template slot-scope="scope">
  222. <el-popover placement="right" title="" trigger="hover">
  223. <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
  224. <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
  225. </el-popover>
  226. </template>
  227. </el-table-column>
  228. <el-table-column label="备件品牌" prop="brand" align="center" min-width="60">
  229. <template slot-scope="scope">
  230. <span v-if="dialogStatus==='create'">{{ scope.row.brandName }}</span>
  231. <span v-if="dialogStatus==='update'">{{ scope.row.brandName }}</span>
  232. </template>
  233. </el-table-column>
  234. <el-table-column label="计量单位" prop="unit" align="center" min-width="60">
  235. <template slot-scope="scope">
  236. <span>{{ scope.row.unit }}</span>
  237. </template>
  238. </el-table-column>
  239. <el-table-column label="现有库存" prop="reportery" align="center" min-width="60">
  240. <template slot-scope="scope">
  241. <span v-if="createTemp.providerId == '' || parseFloat(createTemp.purchaseType) > 0">{{ scope.row.reportery }}</span>
  242. </template>
  243. </el-table-column>
  244. <el-table-column label="价格" prop="price" align="center" min-width="150">
  245. <template slot-scope="scope">
  246. <div v-if="scope.row.contractId== '' || parseInt(scope.row.contractId) < 0 || parseInt(scope.row.contractId) == 0">
  247. <el-form :model="scope.row" :rules="rules">
  248. <el-form-item>
  249. <el-input v-model="scope.row.price" style="margin-top:15px" />
  250. </el-form-item>
  251. </el-form>
  252. </div>
  253. <div v-else v-for="item in scope.row.pricearr">
  254. <el-tooltip class="item" effect="dark" placement="top-start">
  255. <div slot="content">{{item}}</div>
  256. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item}}</div>
  257. </el-tooltip>
  258. </div>
  259. </template>
  260. </el-table-column>
  261. <el-table-column label="使用周期" min-width="120px" align="center">
  262. <template slot-scope="scope">
  263. <div v-for="item in scope.row.lifeCyclearr">
  264. <el-tooltip class="item" effect="dark" placement="top-start">
  265. <div slot="content">{{item}}</div>
  266. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item}}</div>
  267. </el-tooltip>
  268. </div>
  269. </template>
  270. </el-table-column>
  271. <el-table-column label="合同差异项" min-width="120px" align="center">
  272. <template slot-scope="scope">
  273. <div v-for="item in scope.row.contractVarianceItemarr">
  274. <el-tooltip class="item" effect="dark" placement="top-start">
  275. <div slot="content">{{item}}</div>
  276. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item}}</div>
  277. </el-tooltip>
  278. </div>
  279. </template>
  280. </el-table-column>
  281. <el-table-column label="申购数量" min-width="100px" align="center" valign="middle">
  282. <template slot-scope="scope">
  283. <el-form :model="scope.row" :rules="rules">
  284. <el-form-item prop="amount">
  285. <el-input v-model="scope.row.amount" style="margin-top:15px" />
  286. </el-form-item>
  287. </el-form>
  288. </template>
  289. </el-table-column>
  290. <!-- <el-table-column label="部门" min-width="110px" align="center" prop="purpose" valign="middle" /> -->
  291. <el-table-column label="驳回说明" min-width="110px" align="center" prop="explain1" valign="middle" v-if="textMap.create == '新增'" />
  292. <el-table-column label="备注" min-width="110px" align="center" valign="middle">
  293. <template slot-scope="scope">
  294. <el-input v-model="scope.row.purpose" />
  295. </template>
  296. </el-table-column>
  297. <el-table-column
  298. label="操作"
  299. align="center"
  300. width="100"
  301. class-name="small-padding fixed-width"
  302. fixed="right"
  303. >
  304. <template slot-scope="{row}">
  305. <a class="del" @click="partDelete(row)">删除</a>
  306. </template>
  307. </el-table-column>
  308. </el-table>
  309. <div slot="footer" class="dialog-footer" style="bottom:10px">
  310. <el-button type="primary" :disabled="isokDisable" v-if="dialogStatus==='create'" @click="add_dialog_save()">保存并关闭</el-button>
  311. <el-button type="primary" :disabled="isokDisable" v-else-if="dialogStatus==='update'" @click="edit_dialog_save()">保存并关闭</el-button>
  312. <el-button @click="dialogFormVisible = false;get_table_data();">取消并关闭</el-button>
  313. </div>
  314. </div>
  315. </el-dialog>
  316. <!-- 特殊申购 -->
  317. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible2" :close-on-click-modal="false" width="90%">
  318. <div class="app-container">
  319. <el-form
  320. ref="createTemp"
  321. :rules="rules"
  322. :model="createTemp"
  323. label-position="right"
  324. label-width="100px"
  325. style="width: 90%;margin:0 auto;"
  326. >
  327. <el-row>
  328. <el-col :span="8">
  329. <el-form-item label="申购单号:" prop="orderNumber">
  330. <el-input ref="orderNumber" v-model="createTemp.orderNumber" disabled />
  331. </el-form-item>
  332. </el-col>
  333. <el-col :span="8">
  334. <el-form-item label="牧场:" prop="pastureId">
  335. <el-select v-model="createTemp.pastureId" placeholder="牧场" class="filter-item" style="width:100%" :disabled="dialogStatus==='update'" @change="changePasture">
  336. <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
  337. </el-select>
  338. </el-form-item>
  339. </el-col>
  340. <el-col :span="8">
  341. <el-form-item label="申购部门:" prop="departmentId">
  342. <el-select v-model="createTemp.departmentId" placeholder="申购部门" class="filter-item" style="width:100%" :disabled="dialogStatus==='update'" @change="changeDepart">
  343. <el-option v-for="item in createDepartList" :key="item.id" :label="item.name" :value="item.id" />
  344. </el-select>
  345. </el-form-item>
  346. </el-col>
  347. </el-row>
  348. <el-row>
  349. <el-col :span="8">
  350. <el-form-item label="申购人:" prop="employeId">
  351. <el-select v-model="createTemp.employeId" placeholder="申购人" class="filter-item" style="width:100%" :disabled="dialogStatus==='update'">
  352. <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
  353. </el-select>
  354. </el-form-item>
  355. </el-col>
  356. <el-col :span="8">
  357. <el-form-item label="申购日期:" prop="createTime">
  358. <el-date-picker v-model="createTemp.createTime" :picker-options="pickerOptions" type="datetime" placeholder="申购日期" style="width:100%" :disabled="dialogStatus==='update'" />
  359. </el-form-item>
  360. </el-col>
  361. <el-col v-if="dialogStatus==='special' && createTemp.purchaseType == '1' || createTemp.purchaseType == '3'" :span="8">
  362. <el-form-item label="供应商:" prop="providerId">
  363. <el-select v-model="createTemp.providerId" filterable placeholder="供应商" class="filter-item" style="width:100%" :disabled="dialogStatus==='update'">
  364. <el-option v-for="item in providerList" :key="item.id" :label="item.providerName" :value="item.id" />
  365. </el-select>
  366. </el-form-item>
  367. </el-col>
  368. <el-col v-if="dialogStatus==='special' && createTemp.purchaseType == '2'" :span="8">
  369. <el-form-item label="供应商:" prop="providerId">
  370. <el-input ref="providerName" v-model="createTemp.providerName" />
  371. <!-- <el-select v-model="createTemp.providerId" placeholder="供应商" class="filter-item" style="width:100%" :disabled="dialogStatus==='update'">
  372. <el-option v-for="item in providerList" :key="item.id" :label="item.providerName" :value="item.id" />
  373. </el-select> -->
  374. </el-form-item>
  375. </el-col>
  376. <el-col :span="8" v-if="dialogStatus==='special' && createTemp.purchaseType == '2'">
  377. <el-form-item label="垫付人:" prop="funderId">
  378. <el-select v-model="createTemp.funderId" filterable placeholder="垫付人" class="filter-item" style="width:100%" :disabled="dialogStatus==='update'">
  379. <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
  380. </el-select>
  381. </el-form-item>
  382. </el-col>
  383. </el-row>
  384. <el-row>
  385. <el-col :span="24">
  386. <el-form-item label="申购类型:" prop="purchaseType">
  387. <el-radio v-model="createTemp.purchaseType" label="1" @change="changeType()">暂估</el-radio>
  388. <!-- <el-radio v-model="createTemp.purchaseType" label="2" @change="changeType()">垫付</el-radio> -->
  389. <el-radio v-model="createTemp.purchaseType" label="3" @change="changeType()">赠品</el-radio>
  390. </el-form-item>
  391. </el-col>
  392. </el-row>
  393. <el-row>
  394. <el-col :span="16">
  395. <el-form-item label="备件:" prop="partCode">
  396. <el-autocomplete
  397. v-model="createTemp.partCode"
  398. value-key="name"
  399. class="inline-input"
  400. :fetch-suggestions="sparePartSearch"
  401. placeholder="请输入备件编号或备件名称或备件规格"
  402. style="width:100%"
  403. ref="autocomplete"
  404. @select="handleSelectSparePart"
  405. >
  406. <template slot-scope="{ item }">
  407. <b>备件编号:</b><div class="name" style="display: inline;">{{ item.partCode }}</div>&nbsp;
  408. | &nbsp;<b>备件名称:</b><span class="addr">{{ item.partName }}</span>&nbsp;
  409. | &nbsp;<b>备件规格:</b><span class="addr">{{ item.specification }}</span>
  410. </template>
  411. </el-autocomplete>
  412. </el-form-item>
  413. </el-col>
  414. </el-row>
  415. </el-form>
  416. <el-table
  417. :key="tableKey"
  418. v-loading="listLoading"
  419. element-loading-text="给我一点时间"
  420. :data="listAdd"
  421. border
  422. fit
  423. highlight-current-row
  424. style="width: 100%;margin-bottom:30px"
  425. :row-style="rowStyle"
  426. :cell-style="cellStyle"
  427. class="elTable"
  428. >
  429. <!-- table表格 -->
  430. <el-table-column label="序号" align="center" type="index" width="50px" />
  431. <el-table-column label="备件编号" prop="partCode" align="center" min-width="90">
  432. <template slot-scope="scope">
  433. <span>{{ scope.row.partCode }}</span>
  434. </template>
  435. </el-table-column>
  436. <el-table-column label="备件名称" prop="partName" align="center" min-width="90">
  437. <template slot-scope="scope">
  438. <span>{{ scope.row.partName }}</span>
  439. </template>
  440. </el-table-column>
  441. <el-table-column label="备件规格" prop="specification" min-width="80px" align="center">
  442. <template slot-scope="scope">
  443. <span>{{ scope.row.specification }}</span>
  444. </template>
  445. </el-table-column>
  446. <el-table-column label="备件图片" prop="picpath" min-width="110px" align="center">
  447. <template slot-scope="scope">
  448. <el-popover placement="right" title="" trigger="hover">
  449. <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
  450. <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
  451. </el-popover>
  452. </template>
  453. </el-table-column>
  454. <el-table-column label="备件品牌" prop="brand" align="center" min-width="160">
  455. <template slot-scope="scope">
  456. <el-form :model="scope.row" :rules="rules">
  457. <el-form-item prop="brandName">
  458. <el-autocomplete v-model="scope.row.brandName" value-key="brandName" class="inline-input" :fetch-suggestions="brandSearch" placeholder="请输入品牌" style="width:100%;" @select="(value)=> {handleSelectBrand(value,scope.row)}" />
  459. </el-form-item>
  460. </el-form>
  461. </template>
  462. </el-table-column>
  463. <el-table-column label="计量单位" prop="unit" align="center" min-width="60">
  464. <template slot-scope="scope">
  465. <span>{{ scope.row.unit }}</span>
  466. </template>
  467. </el-table-column>
  468. <el-table-column label="现有库存" prop="reportery" align="center" min-width="60">
  469. <template slot-scope="scope">
  470. <span v-if="createTemp.providerId == '' || parseFloat(createTemp.purchaseType) > 0">{{ scope.row.reportery }}</span>
  471. </template>
  472. </el-table-column>
  473. <!-- <el-table-column v-if="createTemp.purchaseType == '1'" label="价格" prop="price" align="center" min-width="150">
  474. <template slot-scope="scope">
  475. <div v-if="createTemp.purchaseType == '1'" v-for="item in scope.row.pricearr" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
  476. <el-tooltip class="item" effect="dark" placement="top-start">
  477. <div slot="content">{{item}}</div>
  478. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item}}</div>
  479. </el-tooltip>
  480. </div>
  481. </template>
  482. </el-table-column> -->
  483. <el-table-column label="价格" prop="price" align="center" min-width="150">
  484. <template slot-scope="scope">
  485. <el-form :model="scope.row" :rules="rules">
  486. <el-form-item prop="price">
  487. <el-input v-model="scope.row.price" style="margin-top:15px" />
  488. </el-form-item>
  489. </el-form>
  490. </template>
  491. </el-table-column>
  492. <el-table-column label="申购数量" min-width="100px" align="center" valign="middle">
  493. <template slot-scope="scope">
  494. <el-form :model="scope.row" :rules="rules">
  495. <el-form-item prop="amount">
  496. <el-input v-model="scope.row.amount" style="margin-top:15px" />
  497. </el-form-item>
  498. </el-form>
  499. </template>
  500. </el-table-column>
  501. <el-table-column v-if="createTemp.purchaseType == '1'" label="驳回说明" min-width="110px" align="center" prop="explain1" valign="middle" />
  502. <el-table-column label="备注" min-width="110px" align="center" valign="middle">
  503. <template slot-scope="scope">
  504. <el-input v-model="scope.row.purpose" />
  505. </template>
  506. </el-table-column>
  507. <el-table-column
  508. label="操作"
  509. align="center"
  510. width="100"
  511. class-name="small-padding fixed-width"
  512. fixed="right"
  513. >
  514. <template slot-scope="{row}">
  515. <a class="del" @click="partDelete(row)">删除</a>
  516. </template>
  517. </el-table-column>
  518. </el-table>
  519. <div slot="footer" class="dialog-footer" style="bottom:10px">
  520. <el-button type="primary" :disabled="isokDisable" v-if="dialogStatus==='special'" @click="special_dialog_save()">保存并关闭</el-button>
  521. <el-button @click="dialogFormVisible2 = false;get_table_data();">取消并关闭</el-button>
  522. </div>
  523. </div>
  524. </el-dialog>
  525. <!-- 查看 -->
  526. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisibleSee" :close-on-click-modal="false" width="90%">
  527. <div class="app-containerSee">
  528. <el-form
  529. ref="seeTemp"
  530. :rules="rules"
  531. :model="seeTemp"
  532. label-position="right"
  533. label-width="100px"
  534. style="width: 90%;margin:0 auto;"
  535. >
  536. <el-row>
  537. <el-col :span="8">
  538. <el-form-item label="申购单号:" prop="orderNumber">
  539. <el-input ref="orderNumber" v-model="seeTemp.orderNumber" disabled />
  540. </el-form-item>
  541. </el-col>
  542. <el-col :span="8">
  543. <el-form-item label="牧场:" prop="pastureId">
  544. <el-select v-model="seeTemp.pastureId" placeholder="牧场" class="filter-item" disabled style="width:100%">
  545. <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
  546. </el-select>
  547. </el-form-item>
  548. </el-col>
  549. <el-col :span="8">
  550. <el-form-item label="申购部门:" prop="departmentName">
  551. <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled />
  552. </el-form-item>
  553. </el-col>
  554. </el-row>
  555. <el-row>
  556. <el-col :span="8">
  557. <el-form-item label="申购人:" prop="empname">
  558. <el-input ref="empname" v-model="seeTemp.empname" disabled />
  559. </el-form-item>
  560. </el-col>
  561. <el-col :span="8">
  562. <el-form-item label="申购日期:" prop="inputTime">
  563. <el-date-picker v-model="seeTemp.inputTime" :picker-options="pickerOptions" type="date" placeholder="申购日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" disabled />
  564. </el-form-item>
  565. </el-col>
  566. <el-col :span="8" v-if="seeTemp.purchaseType == '2'">
  567. <el-form-item label="供应商:" prop="funderProviderName ">
  568. <el-input ref="funderProviderName " v-model="seeTemp.funderProviderName " disabled />
  569. </el-form-item>
  570. </el-col>
  571. <el-col :span="8" v-if="seeTemp.purchase_type > 0 && seeTemp.purchaseType !== '2'">
  572. <el-form-item label="供应商:" prop="providerName">
  573. <el-input ref="providerName" v-model="seeTemp.providerName" disabled />
  574. </el-form-item>
  575. </el-col>
  576. <el-col :span="8" v-if="seeTemp.purchaseType == '2'">
  577. <el-form-item label="垫付人:" prop="funder_name">
  578. <el-input ref="funder_name" v-model="seeTemp.funder_name" disabled />
  579. </el-form-item>
  580. </el-col>
  581. <el-col :span="8" v-if="seeTemp.purchase_type < 1">
  582. <el-form-item label="线上采购:" prop="providerName">
  583. <el-input ref="providerName" v-model="seeTemp.providerName" disabled />
  584. </el-form-item>
  585. </el-col>
  586. </el-row>
  587. <el-row v-if="seeTemp.purchase_type > 0">
  588. <el-col :span="24">
  589. <el-form-item label="申购类型:" prop="purchaseType">
  590. <!-- <el-radio v-model="seeTemp.purchaseType" disabled label="1">暂估</el-radio> -->
  591. <!-- <el-radio v-model="seeTemp.purchaseType" disabled label="2">垫付</el-radio> -->
  592. <el-radio v-model="seeTemp.purchaseType" disabled label="3">赠品</el-radio>
  593. </el-form-item>
  594. </el-col>
  595. </el-row>
  596. </el-form>
  597. <el-table
  598. :key="tableKey"
  599. v-loading="listLoadingSee"
  600. element-loading-text="给我一点时间"
  601. :data="listSee"
  602. border
  603. fit
  604. highlight-current-row
  605. style="width: 100%;margin-bottom:30px"
  606. :row-style="rowStyle"
  607. :cell-style="cellStyle"
  608. class="elTable"
  609. @sort-change="tableSort"
  610. >
  611. <el-table-column type="index" label="序号" align="center" width="50px" />
  612. <el-table-column label="备件编号" prop="partCode" align="center" min-width="90">
  613. <template slot-scope="scope">
  614. <span>{{ scope.row.partCode }}</span>
  615. </template>
  616. </el-table-column>
  617. <el-table-column label="备件名称" prop="partName" align="center" min-width="90">
  618. <template slot-scope="scope">
  619. <span>{{ scope.row.partName }}</span>
  620. </template>
  621. </el-table-column>
  622. <el-table-column label="备件规格" prop="specification" min-width="90px" align="center">
  623. <template slot-scope="scope">
  624. <span>{{ scope.row.specification }}</span>
  625. </template>
  626. </el-table-column>
  627. <el-table-column label="备件图片" prop="picpath" min-width="110px" align="center">
  628. <template slot-scope="scope">
  629. <el-popover placement="right" title="" trigger="hover">
  630. <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
  631. <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
  632. </el-popover>
  633. </template>
  634. </el-table-column>
  635. <el-table-column label="备件品牌" prop="brandName" align="center" min-width="60">
  636. <template slot-scope="scope">
  637. <span>{{ scope.row.brandName }}</span>
  638. </template>
  639. </el-table-column>
  640. <el-table-column label="计量单位" prop="unit" align="center" min-width="60">
  641. <template slot-scope="scope">
  642. <span>{{ scope.row.unit }}</span>
  643. </template>
  644. </el-table-column>
  645. <el-table-column label="现有库存" sortable prop="storageAmount" align="center" min-width="60" />
  646. <!-- <el-table-column label="价格" sortable prop="price" align="center" min-width="60" /> -->
  647. <el-table-column label="价格" min-width="150px" align="center">
  648. <template slot-scope="scope">
  649. <div v-for="item in scope.row.pricearr" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
  650. <el-tooltip class="item" effect="dark" placement="top-start">
  651. <div slot="content">{{item}}</div>
  652. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item}}</div>
  653. </el-tooltip>
  654. </div>
  655. </template>
  656. </el-table-column>
  657. <el-table-column label="使用周期" min-width="120px" align="center">
  658. <template slot-scope="scope">
  659. <div v-for="item in scope.row.lifeCyclearr" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
  660. <el-tooltip class="item" effect="dark" placement="top-start">
  661. <div slot="content">{{item}}</div>
  662. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item}}</div>
  663. </el-tooltip>
  664. </div>
  665. </template>
  666. </el-table-column>
  667. <el-table-column label="合同差异项" min-width="120px" align="center">
  668. <template slot-scope="scope">
  669. <div v-for="item in scope.row.contractVarianceItemarr" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
  670. <el-tooltip class="item" effect="dark" placement="top-start">
  671. <div slot="content">{{item}}</div>
  672. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item}}</div>
  673. </el-tooltip>
  674. </div>
  675. </template>
  676. </el-table-column>
  677. <el-table-column label="申购数量" sortable prop="amount" align="center" min-width="60" />
  678. <el-table-column label="驳回说明" min-width="110px" align="center" prop="explain1" valign="middle" />
  679. <el-table-column label="备注" min-width="110px" align="center" prop="purpose" />
  680. </el-table>
  681. <el-form
  682. ref="seeTemp"
  683. :rules="rules"
  684. :model="seeTemp"
  685. label-position="right"
  686. label-width="100px"
  687. style="width: 90%;margin:0 auto;"
  688. >
  689. <el-row>
  690. <el-col>
  691. <el-form-item label="流程进度" />
  692. <el-steps :active="active" align-center finish-status="success">
  693. <el-step
  694. v-for="(item,index) in activeList"
  695. :key="index"
  696. :title="item.title"
  697. :status="item.status"
  698. >
  699. <template slot="description">
  700. <div class="step-row">
  701. <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
  702. <div>{{ item.reason }}</div>
  703. </div>
  704. </template>
  705. </el-step>
  706. </el-steps>
  707. </el-col>
  708. </el-row>
  709. <el-row>
  710. <el-col>
  711. <el-form-item label="操作:">
  712. <!-- 库管 -->
  713. <el-button v-if="isSubscribeExamineKG && seeTemp.statue == 2 && seeTemp.departmentName == '挤奶处'" type="success" style="display:inline-block" @click="handleExamine1(row)">库管</el-button>
  714. <!-- 设备 -->
  715. <el-button v-if="isSubscribeExamineSBZG && seeTemp.statue == 3" type="success" style="display:inline-block" @click="handleExamine2(row)">设备</el-button>
  716. <!-- 供应商主管 -->
  717. <el-button v-if="isSubscribeExamineZG && seeTemp.statue == 9" type="success" style="display:inline-block" @click="handleExamine3(row)">供应商</el-button>
  718. <!-- 场长 -->
  719. <el-button v-if=" sdchangzhangshenhe && seeTemp.statue == 5 && seeTemp.departmentName == '挤奶处' && seeTemp.examine == 1" type="success" style="display:inline-block" @click="handleExamine4(row)">场长</el-button>
  720. <el-button v-else-if=" sdchangzhangshenhe && seeTemp.statue == 5 && seeTemp.departmentName !== '挤奶处'" type="success" style="display:inline-block" @click="handleExamine4(row)">场长</el-button>
  721. <!-- 采购 -->
  722. <el-button v-if="isSubscribeExamineCG && seeTemp.statue == 11 && (seeTemp.departmentName == '挤奶处' && seeTemp.statue == 15 ) || (seeTemp.departmentName !== '挤奶处' && seeTemp.statue == 11) " type="success" style="display:inline-block" @click="handleExamine5(row)">采购</el-button>
  723. <!-- 财务 -->
  724. <el-button v-if="isSubscribeExamineCW && seeTemp.purchase_type > 0 && seeTemp.statue == 7 " style="display:inline-block" type="success" size="mini" @click="handleExamine6(row)">财务</el-button>
  725. <!-- 奶厅 -->
  726. <el-button v-if="isSubscribeExamineNT && seeTemp.departmentName == '挤奶处' && (seeTemp.examine !== 1 && seeTemp.statue == 5 || seeTemp.statue == 11) " style="display:inline-block" type="success" size="mini" @click="handleExamine7(row)">奶厅</el-button>
  727. </el-form-item>
  728. </el-col>
  729. </el-row>
  730. </el-form>
  731. <div slot="footer" class="dialog-footer" style="bottom:5px;">
  732. <el-button @click="dialogFormVisibleSee = false">关闭</el-button>
  733. </div>
  734. </div>
  735. </el-dialog>
  736. <!-- 审核 -->
  737. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_Examine" :close-on-click-modal="false" width="30%">
  738. <div class="app-examine">
  739. <h3 style="width: 100%;margin:0 0 0 5%;line-height:50px;">请确认审核结果:</h3>
  740. <el-form ref="examineTemp" :rules="rules" :model="examineTemp" label-position="right" style="width: 50%;margin:0 auto;">
  741. <el-row style="width:88%;height:150px;margin:0 auto;">
  742. <el-col :span="20">
  743. <el-form-item>
  744. <el-radio-group v-model="examineTemp.statue" @change="changeStatue">
  745. <el-radio :label="1" checked>通过</el-radio>
  746. <el-radio :label="2">不通过</el-radio>
  747. </el-radio-group>
  748. </el-form-item>
  749. </el-col>
  750. <el-col v-if="statueReason" :span="20">
  751. <el-input v-model="examineTemp.workflowNote" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入不通过原因" />
  752. </el-col>
  753. </el-row>
  754. </el-form>
  755. </div>
  756. <div slot="footer" class="dialog-footer">
  757. <el-button v-if="dialogStatus==='examine1'" type="primary" :disabled="isokDisable" @click="createExamineData1()">确认</el-button>
  758. <el-button v-if="dialogStatus==='examine2'" type="primary" :disabled="isokDisable" @click="createExamineData2()">确认</el-button>
  759. <el-button v-if="dialogStatus==='examine3'" type="primary" :disabled="isokDisable" @click="createExamineData3()">确认</el-button>
  760. <el-button v-if="dialogStatus==='examine4'" type="primary" :disabled="isokDisable" @click="createExamineData4()">确认</el-button>
  761. <el-button v-if="dialogStatus==='examine5'" type="primary" :disabled="isokDisable" @click="createExamineData5()">确认</el-button>
  762. <el-button v-if="dialogStatus==='examine6'" type="primary" :disabled="isokDisable" @click="createExamineData6()">确认</el-button>
  763. <el-button v-if="dialogStatus==='examine7'" type="primary" :disabled="isokDisable" @click="createExamineData7()">确认</el-button>
  764. <el-button @click="dialogFormVisible_Examine = false;">关闭</el-button>
  765. </div>
  766. </el-dialog>
  767. <!-- 查看备件 -->
  768. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_seepart" :close-on-click-modal="false" width="90%">
  769. <div>
  770. <el-input v-model="seepart.getdataListParm.parammaps.partName" placeholder="备件" style="width: 200px;" class="filter-item" />
  771. <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="seepart_search">搜索</el-button>
  772. <h3 v-if="seepartList.length == 0" style="text-align: center;height: 300px;line-height:300px;">呆滞库存查询(如可调拨使用,请优先消耗)</h3>
  773. <div v-else>
  774. <el-table
  775. :key="seepart.tableKey"
  776. v-loading="seepart.listLoading"
  777. element-loading-text="给我一点时间"
  778. :data="seepartList"
  779. border
  780. fit
  781. highlight-current-row
  782. style="width: 100%;margin-bottom:30px;margin-top:20px;"
  783. :row-style="rowStyle"
  784. :cell-style="cellStyle"
  785. class="elTable"
  786. height="300"
  787. >
  788. <el-table-column label="序号" align="center" type="index" width="50px" />
  789. <el-table-column label="牧场名称" prop="pastureName" align="center" min-width="90" />
  790. <el-table-column label="备件编号" prop="partCode" align="center" min-width="90" />
  791. <el-table-column label="备件名称" prop="partName" align="center" min-width="90" />
  792. <el-table-column label="备件规格" prop="specification" align="center" min-width="90" />
  793. <el-table-column label="备件图片" prop="picpath" align="center" min-width="90">
  794. <template slot-scope="scope">
  795. <el-popover placement="right" title="" trigger="hover">
  796. <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
  797. <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
  798. </el-popover>
  799. </template>
  800. </el-table-column>
  801. <el-table-column label="备件品牌" prop="brand" align="center" min-width="90" />
  802. <el-table-column label="计量单位" prop="unit" align="center" min-width="90" />
  803. <el-table-column label="现有库存" sortable prop="reportery" align="center" min-width="60" />
  804. <el-table-column label="价格" sortable prop="price" align="center" min-width="60" />
  805. <el-table-column label="在库天数" sortable prop="daysInStorage" align="center" min-width="60" />
  806. <el-table-column label="负责人" prop="dutyPersonal" align="center" min-width="90" />
  807. <el-table-column label="联系方式" prop="telphone" align="center" min-width="90" />
  808. </el-table>
  809. <pagination v-show="seepart.total>0" :total="seepart.total" :page.sync="seepart.getdataListParm.offset" :limit.sync="seepart.getdataListParm.pagecount" @pagination="get_seepart_data" />
  810. </div>
  811. </div>
  812. <div slot="footer" class="dialog-footer">
  813. <el-button type="primary" :disabled="isokDisable" @click="form_add()">继续申购</el-button>
  814. <el-button @click="dialogFormVisible_seepart = false;seepart.getdataListParm.parammaps.partName = ''">取消</el-button>
  815. </div>
  816. </el-dialog>
  817. <!-- 合单 -->
  818. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_modify" :close-on-click-modal="false" width="90%">
  819. <div>
  820. <el-form ref="modifyTemp" :rules="rules" :model="modifyTemp" label-position="right" label-width="100px" style="width: 90%;margin:0 auto;" >
  821. <el-row>
  822. <el-col :span="8">
  823. <el-form-item label="申购单号:" prop="orderNumber">
  824. <el-input ref="orderNumber" v-model="modifyTemp.orderNumber" disabled />
  825. </el-form-item>
  826. </el-col>
  827. <el-col :span="8">
  828. <el-form-item label="牧场:" prop="pastureId">
  829. <el-select v-model="modifyTemp.pastureId" placeholder="牧场" class="filter-item" style="width:100%" :disabled="dialogStatus==='update'" @change="changePasture">
  830. <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
  831. </el-select>
  832. </el-form-item>
  833. </el-col>
  834. </el-row>
  835. </el-form>
  836. <el-table
  837. :key="tableKey"
  838. v-loading="listLoading"
  839. element-loading-text="给我一点时间"
  840. :data="modifylist"
  841. border
  842. fit
  843. highlight-current-row
  844. style="width: 100%;margin-bottom:30px"
  845. :row-style="rowStyle"
  846. :cell-style="cellStyle"
  847. class="elTable"
  848. >
  849. <!-- table表格 -->
  850. <el-table-column label="序号" align="center" type="index" width="50px" />
  851. <el-table-column label="备件编号" prop="partCode" align="center" min-width="90" />
  852. <el-table-column label="备件名称" prop="partName" align="center" min-width="90" />
  853. <el-table-column label="备件规格" prop="specification" min-width="80px" align="center" />
  854. <el-table-column label="计量单位" prop="unit" align="center" min-width="60" />
  855. <el-table-column label="现有库存" prop="reportery" align="center" min-width="60" />
  856. <el-table-column label="价格" prop="price" align="center" min-width="150">
  857. <template slot-scope="scope">
  858. <div v-for="item in scope.row.pricearr">
  859. <el-tooltip class="item" effect="dark" placement="top-start">
  860. <div slot="content">{{item}}</div>
  861. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item}}</div>
  862. </el-tooltip>
  863. </div>
  864. </template>
  865. </el-table-column>
  866. <el-table-column label="使用周期" min-width="120px" align="center">
  867. <template slot-scope="scope">
  868. <div v-for="item in scope.row.lifeCyclearr">
  869. <el-tooltip class="item" effect="dark" placement="top-start">
  870. <div slot="content">{{item}}</div>
  871. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item}}</div>
  872. </el-tooltip>
  873. </div>
  874. </template>
  875. </el-table-column>
  876. <el-table-column label="合同差异项" min-width="120px" align="center">
  877. <template slot-scope="scope">
  878. <div v-for="item in scope.row.contractVarianceItemarr">
  879. <el-tooltip class="item" effect="dark" placement="top-start">
  880. <div slot="content">{{item}}</div>
  881. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item}}</div>
  882. </el-tooltip>
  883. </div>
  884. </template>
  885. </el-table-column>
  886. <el-table-column label="部门" prop="departmentName" align="center" min-width="60" />
  887. <el-table-column label="申购人" prop="empname" align="center" min-width="60" />
  888. <el-table-column label="申购日期" prop="date" align="center" min-width="60" />
  889. <el-table-column label="备注" min-width="110px" align="center" valign="middle" prop="purpose" />
  890. <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width" fixed="right" >
  891. <template slot-scope="{row}">
  892. <a class="del" @click="partReject(row)">驳回</a>
  893. </template>
  894. </el-table-column>
  895. </el-table>
  896. </div>
  897. <div slot="footer" class="dialog-footer">
  898. <el-button type="primary" :disabled="isokDisable" @click="form_modify()">提交</el-button>
  899. <el-button @click="dialogFormVisible_modify = false;">取消</el-button>
  900. </div>
  901. </el-dialog>
  902. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisibleSee1" :close-on-click-modal="false" width="90%">
  903. <div class="app-containerSee">
  904. <el-form
  905. ref="seeTemp"
  906. :rules="rules"
  907. :model="seeTemp"
  908. label-position="right"
  909. label-width="100px"
  910. style="width: 90%;margin:0 auto;"
  911. >
  912. <el-row>
  913. <el-col :span="8">
  914. <el-form-item label="申购单号:" prop="orderNumber">
  915. <el-input ref="orderNumber" v-model="seeTemp.orderNumber" disabled />
  916. </el-form-item>
  917. </el-col>
  918. <el-col :span="8">
  919. <el-form-item label="牧场:" prop="pastureId">
  920. <el-select v-model="seeTemp.pastureId" placeholder="牧场" class="filter-item" disabled style="width:100%">
  921. <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
  922. </el-select>
  923. </el-form-item>
  924. </el-col>
  925. </el-row>
  926. </el-form>
  927. <el-table
  928. :key="tableKey"
  929. v-loading="listLoadingSee"
  930. element-loading-text="给我一点时间"
  931. :data="listSee"
  932. border
  933. fit
  934. highlight-current-row
  935. style="width: 100%;margin-bottom:30px"
  936. :row-style="rowStyle"
  937. :cell-style="cellStyle"
  938. class="elTable"
  939. @sort-change="tableSort"
  940. >
  941. <el-table-column type="index" label="序号" align="center" width="50px" />
  942. <el-table-column label="备件编号" prop="partCode" align="center" min-width="90" />
  943. <el-table-column label="备件名称" prop="partName" align="center" min-width="90" />
  944. <el-table-column label="备件规格" prop="specification" min-width="90px" align="center" />
  945. <el-table-column label="供应商" prop="providerName" align="center" min-width="60" />
  946. <el-table-column label="备件品牌" prop="brandName" align="center" min-width="60" />
  947. <el-table-column label="计量单位" prop="unit" align="center" min-width="60" />
  948. <el-table-column label="现有库存" sortable prop="storageAmount" align="center" min-width="60" />
  949. <el-table-column label="申购数量" sortable prop="amount" align="center" min-width="60" />
  950. <el-table-column label="价格" min-width="110px" align="center">
  951. <template slot-scope="scope">
  952. <div v-for="item in scope.row.pricearr" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
  953. <el-tooltip class="item" effect="dark" placement="top-start">
  954. <div slot="content">{{item}}</div>
  955. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item}}</div>
  956. </el-tooltip>
  957. </div>
  958. </template>
  959. </el-table-column>
  960. <el-table-column label="使用周期" min-width="100px" align="center">
  961. <template slot-scope="scope">
  962. <div v-for="item in scope.row.lifeCyclearr" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
  963. <el-tooltip class="item" effect="dark" placement="top-start">
  964. <div slot="content">{{item}}</div>
  965. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item}}</div>
  966. </el-tooltip>
  967. </div>
  968. </template>
  969. </el-table-column>
  970. <el-table-column label="合同差异项" min-width="100px" align="center">
  971. <template slot-scope="scope">
  972. <div v-for="item in scope.row.contractVarianceItemarr" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
  973. <el-tooltip class="item" effect="dark" placement="top-start">
  974. <div slot="content">{{item}}</div>
  975. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item}}</div>
  976. </el-tooltip>
  977. </div>
  978. </template>
  979. </el-table-column>
  980. <el-table-column label="部门" sortable prop="departmentName" align="center" min-width="80" />
  981. <el-table-column label="申购人" sortable prop="empname" align="center" min-width="60" />
  982. <el-table-column label="申购日期" sortable prop="date" align="center" min-width="100" />
  983. <el-table-column label="备注" min-width="110px" align="center" prop="purpose" />
  984. </el-table>
  985. <el-form ref="seeTemp" :rules="rules" :model="seeTemp" label-position="right" label-width="100px" style="width: 90%;margin:0 auto;" >
  986. <el-row>
  987. <el-col>
  988. <el-form-item label="流程进度" />
  989. <el-steps :active="active" align-center finish-status="success">
  990. <el-step
  991. v-for="(item,index) in activeList"
  992. :key="index"
  993. :title="item.title"
  994. :status="item.status"
  995. >
  996. <template slot="description">
  997. <div class="step-row">
  998. <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
  999. <div>{{ item.reason }}</div>
  1000. </div>
  1001. </template>
  1002. </el-step>
  1003. </el-steps>
  1004. </el-col>
  1005. </el-row>
  1006. <el-row>
  1007. <el-col>
  1008. <el-form-item label="操作:">
  1009. <!-- 库管 -->
  1010. <el-button v-if="isSubscribeExamineKG && seeTemp.statue == 2 && seeTemp.departmentName == '挤奶处'" type="success" style="display:inline-block" @click="handleExamine1(row)">库管</el-button>
  1011. <!-- 设备 -->
  1012. <el-button v-if="isSubscribeExamineSBZG && seeTemp.statue == 3" type="success" style="display:inline-block" @click="handleExamine2(row)">设备</el-button>
  1013. <!-- 供应商主管 -->
  1014. <el-button v-if="isSubscribeExamineZG && seeTemp.statue == 9" type="success" style="display:inline-block" @click="handleExamine3(row)">供应</el-button>
  1015. <!-- 场长 -->
  1016. <el-button v-if=" sdchangzhangshenhe && seeTemp.statue == 5 && seeTemp.departmentName == '挤奶处' && seeTemp.examine == 1" type="success" style="display:inline-block" @click="handleExamine4(row)">场长</el-button>
  1017. <el-button v-else-if=" sdchangzhangshenhe && seeTemp.statue == 5 && seeTemp.departmentName !== '挤奶处'" type="success" style="display:inline-block" @click="handleExamine4(row)">场长</el-button>
  1018. <!-- 采购 -->
  1019. <el-button v-if="isSubscribeExamineCG && seeTemp.statue == 11 && (seeTemp.departmentName == '挤奶处' && seeTemp.statue == 15 ) || (seeTemp.departmentName !== '挤奶处' && seeTemp.statue == 11) " type="success" style="display:inline-block" @click="handleExamine5(row)">采购</el-button>
  1020. <!-- 财务 -->
  1021. <el-button v-if="isSubscribeExamineCW && seeTemp.purchase_type > 0 && seeTemp.statue == 7 " style="display:inline-block" type="success" @click="handleExamine6(row)">财务</el-button>
  1022. <!-- 奶厅 -->
  1023. <el-button v-if="isSubscribeExamineNT && seeTemp.departmentName == '挤奶处' && (seeTemp.examine !== 1 && seeTemp.statue == 5 || seeTemp.statue == 11) " style="display:inline-block" type="success" @click="handleExamine7(row)">奶厅</el-button>
  1024. </el-form-item>
  1025. </el-col>
  1026. </el-row>
  1027. </el-form>
  1028. <div slot="footer" class="dialog-footer" style="bottom:5px;">
  1029. <el-button @click="dialogFormVisibleSee1 = false">关闭</el-button>
  1030. </div>
  1031. </div>
  1032. </el-dialog>
  1033. </div>
  1034. </template>
  1035. <script>
  1036. // / 引入
  1037. import { GetDataByName,postJson, GetDataByNames, partslistSGv2, PostDataByName, ExecDataByConfig, checkButtons, failproccess, GetAccount } from '@/api/common'
  1038. import waves from '@/directive/waves' // waves directive
  1039. import { parseTime, sortChange, json2excel } from '@/utils/index.js'
  1040. // eslint-disable-next-line no-unused-vars
  1041. import { validateEMail } from '@/utils/validate.js'
  1042. import Pagination from '@/components/Pagination' // secondary package based on el-pagination
  1043. import { MessageBox } from 'element-ui'
  1044. import Cookies from 'js-cookie'
  1045. import { getToken } from '@/utils/auth'
  1046. export default {
  1047. name: 'Subscribe',
  1048. components: { Pagination },
  1049. directives: { waves },
  1050. data() {
  1051. return {
  1052. isSubscribeAdd: [],isSubscribeSpecial:[], isSubscribeExamineSBZG:[],isSubscribeTemplate: [], isSubscribeImport: [], isSubscribeExport: [], isSubscribeSee: [], isSubscribeDelete: [], isSubscribeExamineKG: [], isSubscribeExamineCG: [],isSubscribeExamineCW:[], isSubscribeExamineZG: [],isSubscribeExamineNT: [],sdchangzhangshenhe: [],
  1053. isSubscribeMilk:[],
  1054. isokDisable: false,
  1055. findAllProvider: [],
  1056. findAllPasture: [],
  1057. findAllDepart: [],
  1058. findAllEmploye: [],
  1059. subscriptionStatusList:[
  1060. {id:0,name:'正常'},
  1061. {id:1,name:'暂估'},
  1062. {id:3,name:'赠品'}],//申购状态
  1063. onlineSubscriptionList: [], createDepartList: [], edit: 0,
  1064. requestParams: [
  1065. { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
  1066. { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
  1067. { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
  1068. { name: 'getflexProviderList', offset: 0, pagecount: 0, parammaps: {}}
  1069. ],
  1070. getDepartParam: {
  1071. name: 'findAllDepart', offset: 0, pagecount: 0,
  1072. parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
  1073. },
  1074. pickerOptions: {
  1075. disabledDate(time) {
  1076. return time.getTime() > Date.now()// 当天之前的时间可选
  1077. }
  1078. },
  1079. textMap: {
  1080. update: '编辑',
  1081. create: '新增',
  1082. see: '查看',
  1083. examine1: '审核1',
  1084. examine2: '审核2',
  1085. examine3: '审核3',
  1086. examine4: '审核4',
  1087. examine5: '审核5',
  1088. examine6: '审核6',
  1089. examine7: '审核7',
  1090. special: '特殊申购',
  1091. seepart:'备件申购'
  1092. },
  1093. rules: {
  1094. equipmentName: [{ required: true, message: '必填', trigger: 'blur' }]
  1095. },
  1096. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  1097. cellStyle: { padding: 0 + 'px' },
  1098. statues: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
  1099. radioAll: '全部',
  1100. getdataListParm: {
  1101. name: 'getpartpurchaseList',
  1102. page: 1,
  1103. offset: 1,
  1104. pagecount: 10,
  1105. returntype: 'Map',
  1106. parammaps: {
  1107. pastureName: Cookies.get('pasturename'),
  1108. empId: Cookies.get('employeid'),
  1109. orderNumber: '',
  1110. stuteSH: '',
  1111. departmentId: '',
  1112. inputDatetime: '',
  1113. startTime: '',
  1114. stopTime: '',
  1115. loginId: Cookies.get('employeid'),
  1116. menu: 'Subscribe',
  1117. logindeptId: Cookies.get('departmentid'),
  1118. loginpastureId: Cookies.get('pastureid'),
  1119. purchase_type:''
  1120. }
  1121. },
  1122. tableKey: 0,
  1123. listLoading: true,
  1124. total: 0,
  1125. list: [],
  1126. dialogStatus: '',
  1127. dialogFormVisible: false,
  1128. dialogFormVisible_milk:false,
  1129. dialogFormVisible2: false,
  1130. dialogFormVisibleSee: false,
  1131. dialogFormVisibleSee1: false,
  1132. listLoadingSee: true,
  1133. listSee: [],
  1134. totalSee: 0,
  1135. seeTemp: {},
  1136. getdataListSee: {
  1137. name: 'getpartpurchaseBybig',
  1138. returntype: 'Map',
  1139. parammaps: {}
  1140. },
  1141. createTemp: {
  1142. pastureId: this.$store.state.user.pastureid,
  1143. departmentId: this.$store.state.user.departmentid,
  1144. employeId: this.$store.state.user.employeid,
  1145. createTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1146. providerId: '',
  1147. purchaseType:'1',
  1148. funderId:'',
  1149. partCode:''
  1150. },
  1151. requestSparePart: {
  1152. name: 'getPartsListSG',
  1153. page: 1,
  1154. offset: 1,
  1155. pagecount: 20,
  1156. returntype: 'Map',
  1157. parammaps: {
  1158. pastureId: Cookies.get('pastureid')
  1159. }
  1160. },
  1161. getParmCreateNumber: {
  1162. name: 'autoCreatCode',
  1163. page: 0,
  1164. offset: 0,
  1165. pagecount: 0,
  1166. returntype: 'Map',
  1167. parammaps: {
  1168. pastureId: Cookies.get('pastureid'),
  1169. codeType: 'SG'
  1170. }
  1171. },
  1172. getParmCreateAmount: {
  1173. name: 'getPartsListSGv2',
  1174. page: 0,
  1175. offset: 0,
  1176. pagecount: 0,
  1177. returntype: 'Map',
  1178. parammaps: {
  1179. pastureId: Cookies.get('pastureid'),
  1180. pastureName: Cookies.get('pasturename')
  1181. }
  1182. },
  1183. listAdd: [],
  1184. postDataPramas: {},
  1185. requestParam: {
  1186. parammaps:{partCode:''}
  1187. },
  1188. dialogFormVisible_Examine: false,
  1189. examineTemp: {
  1190. statue: 1
  1191. },
  1192. statueReason: false,
  1193. activeList: [],
  1194. active: 3,
  1195. buttons: [],
  1196. downloadParam: {},
  1197. isPercentage: false,
  1198. percentage: 1,
  1199. pending: {
  1200. total: 0,
  1201. getdataListParm: {
  1202. name: 'getpartpurchaseWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
  1203. parammaps: {
  1204. loginId: Cookies.get('employeid'),
  1205. menu: 'Subscribe', logindeptId: Cookies.get('departmentid'), loginpastureId: Cookies.get('pastureid'),
  1206. empId: Cookies.get('employeid'), pastureId: Cookies.get('pastureid'), deptId: Cookies.get('departmentid')
  1207. }
  1208. }
  1209. },
  1210. providerList:[],
  1211. dialogFormVisible_seepart:false,
  1212. seepartList:[],
  1213. seepart:{
  1214. tableKey: 0,
  1215. listLoading: true,
  1216. total: 0,
  1217. getdataListParm: {
  1218. page: 1, offset: 1, pagecount: 10,
  1219. name:'getIdleSpareParts',
  1220. parammaps:{
  1221. partName:''
  1222. }
  1223. }
  1224. },
  1225. apply_subscribeData:{},
  1226. isApplyEx4:true,
  1227. isMilk:false, //标记是不是奶厅申购
  1228. myHeight:document.documentElement.clientHeight - 85- 150,
  1229. dialogFormVisible_modify:false,
  1230. modifyTemp:{
  1231. orderNumber:''
  1232. },
  1233. modifylist:[{}],
  1234. requestBrand: {
  1235. name: 'getBrandByPartCode',
  1236. page: 0,
  1237. offset: 0,
  1238. pagecount: 10,
  1239. returntype: 'Map',
  1240. parammaps: {}
  1241. },
  1242. BrandList: [],
  1243. }
  1244. },
  1245. created() {
  1246. const that = this
  1247. GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
  1248. that.buttons = response.data.list
  1249. that.get_auto_buttons()
  1250. })
  1251. this.get_select_list()
  1252. this.get_table_data()
  1253. this.getPendingList()
  1254. this.getProviderList()
  1255. },
  1256. methods: {
  1257. tableSort(column) {
  1258. sortChange(column, this.listSee)
  1259. },
  1260. get_auto_buttons() {
  1261. // 新增
  1262. const SubscribeAdd = 'customs:subscribe:add'
  1263. const isSubscribeAdd = checkButtons(this.$store.state.user.buttons, SubscribeAdd)
  1264. this.isSubscribeAdd = isSubscribeAdd
  1265. // isSubscribeSpecial
  1266. // 特殊申购
  1267. const SubscribeSpecial = 'customs:subscribe:special'
  1268. const isSubscribeSpecial = checkButtons(this.$store.state.user.buttons, SubscribeSpecial)
  1269. this.isSubscribeSpecial = isSubscribeSpecial
  1270. // 奶厅申购
  1271. const SubscribeMilk = 'customs:subscribe:milk'
  1272. const isSubscribeMilk = checkButtons(this.$store.state.user.buttons, SubscribeMilk)
  1273. this.isSubscribeMilk = isSubscribeMilk
  1274. // 模板
  1275. // eslint-disable-next-line no-redeclare
  1276. const SubscribeTemplate = 'customs:subscribe:template'
  1277. const isSubscribeTemplate = checkButtons(this.$store.state.user.buttons, SubscribeTemplate)
  1278. this.isSubscribeTemplate = isSubscribeTemplate
  1279. // 导入
  1280. // eslint-disable-next-line no-redeclare
  1281. const SubscribeImport = 'customs:subscribe:import'
  1282. const isSubscribeImport = checkButtons(this.$store.state.user.buttons, SubscribeImport)
  1283. this.isSubscribeImport = isSubscribeImport
  1284. // 导出
  1285. // eslint-disable-next-line no-redeclare
  1286. const SubscribeExport = 'customs:subscribe:export'
  1287. const isSubscribeExport = checkButtons(this.$store.state.user.buttons, SubscribeExport)
  1288. this.isSubscribeExport = isSubscribeExport
  1289. // 查看
  1290. // eslint-disable-next-line no-redeclare
  1291. const SubscribeSee = 'customs:subscribe:see'
  1292. const isSubscribeSee = checkButtons(this.$store.state.user.buttons, SubscribeSee)
  1293. this.isSubscribeSee = isSubscribeSee
  1294. // 删除
  1295. // eslint-disable-next-line no-redeclare
  1296. const SubscribeDelete = 'customs:subscribe:delete'
  1297. const isSubscribeDelete = checkButtons(this.$store.state.user.buttons, SubscribeDelete)
  1298. this.isSubscribeDelete = isSubscribeDelete
  1299. // 库管审核
  1300. // eslint-disable-next-line no-redeclare
  1301. const SubscribeExamineKG = 'customs:subscribe:examineKG'
  1302. const isSubscribeExamineKG = checkButtons(this.$store.state.user.buttons, SubscribeExamineKG)
  1303. this.isSubscribeExamineKG = isSubscribeExamineKG
  1304. // 设备主管审核
  1305. const SubscribeExamineSBZG = 'customs:subscribe:examineSBZG'
  1306. const isSubscribeExamineSBZG = checkButtons(this.$store.state.user.buttons, SubscribeExamineSBZG)
  1307. this.isSubscribeExamineSBZG = isSubscribeExamineSBZG
  1308. // 主管审核
  1309. // eslint-disable-next-line no-redeclare
  1310. const SubscribeExamineZG = 'customs:subscribe:examineZG'
  1311. const isSubscribeExamineZG = checkButtons(this.$store.state.user.buttons, SubscribeExamineZG)
  1312. this.isSubscribeExamineZG = isSubscribeExamineZG
  1313. const changzhangshenhe = 'changzhangshenhe'
  1314. const sdchangzhangshenhe = checkButtons(this.$store.state.user.buttons, changzhangshenhe)
  1315. this.sdchangzhangshenhe = sdchangzhangshenhe
  1316. // 采购审核
  1317. // eslint-disable-next-line no-redeclare
  1318. const SubscribeExamineCG = 'customs:subscribe:examineCG'
  1319. const isSubscribeExamineCG = checkButtons(this.$store.state.user.buttons, SubscribeExamineCG)
  1320. this.isSubscribeExamineCG = isSubscribeExamineCG
  1321. // 财务审核
  1322. const SubscribeExamineCW = 'customs:subscribe:examineCW'
  1323. const isSubscribeExamineCW = checkButtons(this.$store.state.user.buttons, SubscribeExamineCW)
  1324. this.isSubscribeExamineCW = isSubscribeExamineCW
  1325. // 财务审核
  1326. const SubscribeExamineNT = 'customs:subscribe:examineNT'
  1327. const isSubscribeExamineNT = checkButtons(this.$store.state.user.buttons, SubscribeExamineNT)
  1328. this.isSubscribeExamineNT = isSubscribeExamineNT
  1329. },
  1330. getPendingList() {
  1331. this.pending.getdataListParm.parammaps.pastureName = this.getdataListParm.parammaps.pastureName
  1332. this.pending.getdataListParm.parammaps.orderNumber = this.getdataListParm.parammaps.orderNumber
  1333. this.pending.getdataListParm.parammaps.stuteSH = this.getdataListParm.parammaps.stuteSH
  1334. this.pending.getdataListParm.parammaps.departmentId = this.getdataListParm.parammaps.departmentId
  1335. this.pending.getdataListParm.parammaps.inputDatetime = this.getdataListParm.parammaps.inputDatetime
  1336. this.pending.getdataListParm.parammaps.loginId = this.getdataListParm.parammaps.loginId
  1337. this.pending.getdataListParm.parammaps.menu = this.getdataListParm.parammaps.menu
  1338. this.pending.getdataListParm.parammaps.logindeptId = this.getdataListParm.parammaps.logindeptId
  1339. this.pending.getdataListParm.parammaps.loginpastureId = this.getdataListParm.parammaps.loginpastureId
  1340. this.pending.getdataListParm.parammaps.empId = this.getdataListParm.parammaps.empId
  1341. this.pending.getdataListParm.parammaps.pastureId = Cookies.get('pastureid')
  1342. this.pending.getdataListParm.parammaps.deptId = Cookies.get('departmentid')
  1343. GetDataByName(this.pending.getdataListParm).then(response => {
  1344. this.pending.total = response.data.total3
  1345. })
  1346. },
  1347. get_table_data() {
  1348. this.listLoading = true
  1349. if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
  1350. this.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
  1351. this.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
  1352. } else {
  1353. this.getdataListParm.parammaps.startTime = ''
  1354. this.getdataListParm.parammaps.stopTime = ''
  1355. }
  1356. GetDataByName(this.getdataListParm).then(response => {
  1357. if (response.data.list !== null) {
  1358. console.log('table数据', response.data.list)
  1359. this.list = response.data.list
  1360. this.pageNum = response.data.pageNum
  1361. this.pageSize = response.data.pageSize
  1362. } else {
  1363. this.list = []
  1364. }
  1365. this.total = response.data.total
  1366. setTimeout(() => {
  1367. this.listLoading = false
  1368. }, 100)
  1369. })
  1370. },
  1371. changeAll() {
  1372. console.log(this.radioAll)
  1373. if (this.radioAll === '全部') {
  1374. this.getdataListParm.name = 'getpartpurchaseList'
  1375. this.getdataListParm.offset = 1
  1376. this.getdataListParm.parammaps = {
  1377. pastureName: Cookies.get('pasturename'),
  1378. orderNumber: '',
  1379. departmentId: '',
  1380. inputDatetime: '',
  1381. startTime: '',
  1382. stopTime: '',
  1383. loginId: Cookies.get('employeid'),
  1384. menu: 'Subscribe',
  1385. logindeptId: Cookies.get('departmentid'),
  1386. loginpastureId: Cookies.get('pastureid')
  1387. }
  1388. this.get_table_data()
  1389. } else if (this.radioAll === '待处理') {
  1390. this.getdataListParm.name = 'getpartpurchaseWebListNO'
  1391. this.getdataListParm.offset = 1
  1392. this.getdataListParm.parammaps = {
  1393. pastureName: this.getdataListParm.parammaps.pastureName,
  1394. orderNumber: this.getdataListParm.parammaps.orderNumber,
  1395. stuteSH: this.getdataListParm.parammaps.stuteSH,
  1396. departmentId: this.getdataListParm.parammaps.departmentId,
  1397. inputDatetime: this.getdataListParm.parammaps.inputDatetime,
  1398. startTime: this.getdataListParm.parammaps.startTime,
  1399. stopTime: this.getdataListParm.parammaps.stopTime,
  1400. loginId: Cookies.get('employeid'),
  1401. menu: 'Subscribe',
  1402. logindeptId: Cookies.get('departmentid'),
  1403. loginpastureId: Cookies.get('pastureid'),
  1404. empId: Cookies.get('employeid'),
  1405. pastureId: Cookies.get('pastureid'),
  1406. deptId: Cookies.get('departmentid')
  1407. }
  1408. this.get_table_data()
  1409. } else if (this.radioAll === '已处理') {
  1410. this.getdataListParm.name = 'getpartpurchaseWebList'
  1411. this.getdataListParm.offset = 1
  1412. this.getdataListParm.parammaps = {
  1413. pastureName: this.getdataListParm.parammaps.pastureName,
  1414. orderNumber: this.getdataListParm.parammaps.orderNumber,
  1415. stuteSH: this.getdataListParm.parammaps.stuteSH,
  1416. departmentId: this.getdataListParm.parammaps.departmentId,
  1417. inputDatetime: this.getdataListParm.parammaps.inputDatetime,
  1418. startTime: this.getdataListParm.parammaps.startTime,
  1419. stopTime: this.getdataListParm.parammaps.stopTime,
  1420. loginId: Cookies.get('employeid'),
  1421. menu: 'Subscribe',
  1422. logindeptId: Cookies.get('departmentid'),
  1423. loginpastureId: Cookies.get('pastureid'),
  1424. empId: Cookies.get('employeid'),
  1425. pastureId: Cookies.get('pastureid'),
  1426. deptId: Cookies.get('departmentid')
  1427. }
  1428. this.get_table_data()
  1429. }
  1430. },
  1431. statue: function(cellValue) {
  1432. // console.log(cellValue)
  1433. // departmentName
  1434. // purchase_type
  1435. if(cellValue.purchase_type == 1){
  1436. // 特殊申购-暂估
  1437. if(cellValue.statue == 2 || cellValue.statue == 3 || cellValue.statue == 5 || cellValue.statue == 7 || cellValue.statue == 9 || cellValue.statue == 11 ){
  1438. return '审核中'
  1439. }else if(cellValue.statue == 13){
  1440. return '已通过'
  1441. }else{
  1442. return '未通过'
  1443. }
  1444. }else if(cellValue.purchase_type == 3){
  1445. // 特殊申购-赠品
  1446. return '已通过'
  1447. }else{
  1448. // 采购
  1449. if(cellValue.statue == 2 || cellValue.statue == 3 || cellValue.statue == 5 || cellValue.statue == 9 || cellValue.statue == 11 || cellValue.statue == 13 ){
  1450. return '审核中'
  1451. }else if(cellValue.statue == 7){
  1452. return '已通过'
  1453. }else{
  1454. return '未通过'
  1455. }
  1456. }
  1457. },
  1458. form_search() {
  1459. console.log('点击了table搜索')
  1460. if (this.getdataListParm.parammaps.inputDatetime === null) {
  1461. this.getdataListParm.parammaps.inputDatetime = ''
  1462. }
  1463. this.getdataListParm.offset = 1
  1464. this.listLoading = true
  1465. this.get_table_data()
  1466. this.getPendingList()
  1467. },
  1468. resetCreateTemp() {
  1469. this.createTemp.pastureId = parseInt(Cookies.get('pastureid'))
  1470. this.createTemp.departmentId = parseInt(Cookies.get('departmentid'))
  1471. this.createTemp.departmentName = Cookies.get('departmentname')
  1472. this.createTemp.employeId = parseInt(Cookies.get('employeid'))
  1473. this.createTemp.createTime = parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}')
  1474. this.createTemp.orderNumber = ''
  1475. this.createTemp.providerId = ''
  1476. this.createTemp.funderId = ''
  1477. this.createTemp.partCode = ''
  1478. // this.requestSparePart.parammaps['partCode'] = ''
  1479. this.$set(this.createTemp,'partCode','')
  1480. // this.$set(this.requestSparePart.parammaps,'partCode','')
  1481. this.createTemp.purchaseType = '1'
  1482. this.listAdd = []
  1483. },
  1484. form_add() {
  1485. this.getdataListSee.parammaps.id = ''
  1486. this.textMap.create = '新增'
  1487. this.isMilk = false
  1488. this.seepart.getdataListParm.parammaps.partName = ''
  1489. this.resetCreateTemp()
  1490. this.edit = 1
  1491. this.getDepartParam.parammaps.pastureId = this.createTemp.pastureId
  1492. this.getCreateDepartDownList()
  1493. this.dialogStatus = 'create'
  1494. this.dialogFormVisible = true
  1495. this.dialogFormVisible_seepart = false
  1496. this.$nextTick(() => {
  1497. this.$refs['createTemp'].clearValidate()
  1498. })
  1499. this.getBigPartpurchase(0)
  1500. },
  1501. getBigPartpurchase(type){
  1502. let data = {
  1503. name:'getBigPartpurchase',
  1504. parammaps:{
  1505. purchaseType:type,
  1506. pastureId:parseInt(Cookies.get('pastureid'))
  1507. }
  1508. }
  1509. GetDataByName(data).then(response => {
  1510. console.log(response,'response=====')
  1511. if(response.data.list && response.data.list.length > 0){
  1512. this.createTemp.markBackend = true
  1513. this.createTemp.pastureId = response.data.list[0].pastureId
  1514. this.createTemp.orderNumber = response.data.list[0].orderNumber
  1515. this.createTemp.createTime = parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}')
  1516. this.createTemp.bigId = response.data.list[0].id
  1517. this.getdataListSee.parammaps.id = response.data.list[0].id
  1518. if(this.dialogStatus == 'create'){
  1519. this.getdataListSee.parammaps.purchaseType = 0
  1520. }else if(this.dialogStatus == 'special'){
  1521. if(this.createTemp.purchaseType == '1'){
  1522. this.getdataListSee.parammaps.purchaseType = 1
  1523. }
  1524. }
  1525. this.getdataListSee.parammaps.empId = Cookies.get('employeid')
  1526. this.getSeeList()
  1527. }else{
  1528. this.createTemp.markBackend = false
  1529. this.getCreateNumber()
  1530. if(this.dialogStatus == 'create'){
  1531. this.getdataListSee.parammaps.purchaseType = 0
  1532. this.getdataListSee.parammaps.empId = Cookies.get('employeid')
  1533. this.getSeeList()
  1534. }else if(this.dialogStatus == 'special'){
  1535. if(this.createTemp.purchaseType == '1'){
  1536. this.getdataListSee.parammaps.purchaseType = 1
  1537. this.getdataListSee.parammaps.empId = Cookies.get('employeid')
  1538. this.getSeeList()
  1539. }
  1540. }
  1541. }
  1542. })
  1543. },
  1544. getCreateNumber() {
  1545. GetDataByName(this.getParmCreateNumber).then(response => {
  1546. this.$nextTick(() => {
  1547. console.log('新增申购单号', response.data.list[0].orderCode,this.dialogStatus)
  1548. if(this.createTemp.purchaseType == 3){
  1549. console.log(111)
  1550. this.createTemp.orderNumber = response.data.list[0].orderCode
  1551. this.modifyTemp.orderNumber = response.data.list[0].orderCode
  1552. this.$forceUpdate()
  1553. } else if(this.createTemp.purchaseType == 1){
  1554. console.log(222)
  1555. if(this.createTemp.orderNumber == ''){
  1556. this.createTemp.orderNumber = response.data.list[0].orderCode
  1557. this.modifyTemp.orderNumber = response.data.list[0].orderCode
  1558. this.$forceUpdate()
  1559. }
  1560. }else{
  1561. console.log(333)
  1562. // this.textMap.create = '新增'
  1563. // this.dialogStatus = 'create'
  1564. this.createTemp.orderNumber = response.data.list[0].orderCode
  1565. this.modifyTemp.orderNumber = response.data.list[0].orderCode
  1566. this.$forceUpdate()
  1567. }
  1568. })
  1569. })
  1570. },
  1571. // getPartsListSG
  1572. changeProvider(item) {
  1573. console.log(item,'item')
  1574. if (item !== '') {
  1575. this.createTemp.providerName = this.onlineSubscriptionList.find(obj => obj.id == item).providerName
  1576. }else{
  1577. this.$set(this.createTemp,'providerName','')
  1578. this.$set(this.createTemp,'providerId','')
  1579. }
  1580. // this.listAdd = []
  1581. },
  1582. sparePartSearch(queryString, cb) {
  1583. console.log('备件模糊查询输入值', queryString)
  1584. if(this.dialogStatus==='special'){
  1585. if(this.createTemp.purchaseType == 1 || this.createTemp.purchaseType == '3'){
  1586. if(this.createTemp.providerId == ''){
  1587. this.$message({ type: 'warning', message: '请选择供应商' })
  1588. return false;
  1589. }else{
  1590. if(this.createTemp.purchaseType == '3'){
  1591. this.requestSparePart.name = 'getStockListByGiveaway'
  1592. this.requestSparePart.parammaps['providerName'] = this.providerList.find(obj => obj.id == this.createTemp.providerId).providerName
  1593. this.requestSparePart.parammaps['providerId'] = this.createTemp.providerId
  1594. this.requestSparePart.parammaps['pastureId'] = this.createTemp.pastureId
  1595. }else if(this.createTemp.purchaseType == '1'){
  1596. this.requestSparePart.name = 'getPartsListSGFlex'
  1597. this.requestSparePart.parammaps.providerId = this.createTemp.providerId
  1598. this.requestSparePart.parammaps['providerName'] = this.providerList.find(obj => obj.id == this.createTemp.providerId).providerName
  1599. this.requestSparePart.parammaps.providerName = this.createTemp.providerName
  1600. }else{
  1601. this.requestSparePart.name = 'getPartsListSG'
  1602. this.requestSparePart.parammaps['providerId'] = this.createTemp.providerId
  1603. }
  1604. }
  1605. }
  1606. }else{
  1607. if (this.createTemp.providerId == '') {
  1608. this.requestSparePart.name = 'getPartsListSG'
  1609. this.requestSparePart.parammaps['providerName'] = ''
  1610. this.requestSparePart.parammaps['providerId'] = ''
  1611. } else {
  1612. this.requestSparePart.name = 'getPartsListSGFlex'
  1613. this.requestSparePart.parammaps.providerId = this.createTemp.providerId
  1614. this.requestSparePart.parammaps.providerName = this.createTemp.providerName
  1615. }
  1616. }
  1617. this.requestSparePart.parammaps['partCode'] = queryString
  1618. // this.createTemp.partCode = queryString
  1619. this.$set(this.requestSparePart.parammaps,'partCode',queryString)
  1620. this.$set(this.createTemp,'partCode',queryString)
  1621. GetDataByName(this.requestSparePart).then(response => {
  1622. console.log('备件模糊查询搜索data', response.data.list)
  1623. if (response.data.list == null) {
  1624. cb([])
  1625. } else {
  1626. cb(response.data.list)
  1627. }
  1628. })
  1629. },
  1630. brandSearch(queryString, cb) {
  1631. console.log('品牌模糊查询输入值', queryString)
  1632. this.requestBrand.parammaps['brandName'] = queryString
  1633. GetDataByName(this.requestBrand).then(response => {
  1634. console.log('品牌模糊查询搜索data', response.data.list)
  1635. this.BrandList = response.data.list
  1636. cb(this.BrandList)
  1637. })
  1638. },
  1639. handleSelectBrand(item,row) {
  1640. console.log('品牌模糊查询选中值', item)
  1641. this.$set(row, 'brandName', item.brandName)
  1642. this.$set(row, 'brandId', item.brandId)
  1643. this.$forceUpdate()
  1644. },
  1645. handleSelectSparePart(item) {
  1646. console.log('备件模糊查询选中值', item)
  1647. console.log('备件模糊查询选中值', item.partId)
  1648. console.log(this.listAdd)
  1649. if(this.dialogStatus==='special' && this.createTemp.purchaseType == '1' && this.createTemp.providerId == ''){
  1650. this.createTemp.providerId = item.providerId
  1651. }
  1652. this.public_select(item)
  1653. },
  1654. apply_subscribe(){
  1655. this.dialogStatus = 'seepart'
  1656. this.seepartList = []
  1657. console.log(this.seepartList.length,'===')
  1658. this.dialogFormVisible_seepart = true
  1659. // this.apply_subscribeData = item
  1660. },
  1661. seepart_search(){
  1662. this.get_seepart_data()
  1663. },
  1664. get_seepart_data() {
  1665. this.seepart.listLoading = true
  1666. GetDataByName(this.seepart.getdataListParm).then(response => {
  1667. if (response.data.list !== null) {
  1668. console.log('table数据', response.data.list)
  1669. this.seepartList = response.data.list
  1670. this.seepart.pageNum = response.data.pageNum
  1671. this.seepart.pageSize = response.data.pageSize
  1672. } else {
  1673. this.seepartList = []
  1674. }
  1675. this.seepart.total = response.data.total
  1676. setTimeout(() => {
  1677. this.seepart.listLoading = false
  1678. }, 100)
  1679. })
  1680. },
  1681. public_select(item){
  1682. this.$set(item,'myId',Date.parse(new Date()))
  1683. if (this.createTemp.providerId == '') {
  1684. if (this.listAdd.length > 0) {
  1685. if (this.listAdd.find(obj => obj.partId == item.partId)) {
  1686. this.$message({ type: 'warning', message: '此备件已存在,请重新选择备件' })
  1687. } else {
  1688. this.getParmCreateAmount.parammaps.partCode = item.partCode
  1689. partslistSGv2(this.getParmCreateAmount).then(response => {
  1690. this.$nextTick(() => {
  1691. console.log('新增根据编号获取备件库存数量', response.data.list[0])
  1692. item = response.data.list[0]
  1693. this.$set(item,'myId',Date.parse(new Date()))
  1694. if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
  1695. this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
  1696. this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
  1697. } else {
  1698. item.srcpath = ''
  1699. item.picpath = ''
  1700. }
  1701. this.$set(item, 'amount', '')
  1702. this.$set(item, 'purpose', '')
  1703. if(this.dialogStatus==='special' && this.createTemp.purchaseType == '2'){
  1704. this.$set(item,'price','')
  1705. }else if(this.dialogStatus==='special' && this.createTemp.purchaseType == '3'){
  1706. this.$set(item,'price','0')
  1707. this.$set(item,'amount','0')
  1708. }
  1709. if(item.price){
  1710. var pricearr = item.price.split(",")
  1711. this.$set(item,'pricearr',pricearr)
  1712. }else{
  1713. this.$set(item,'pricearr',[])
  1714. }
  1715. if(item.contractId){
  1716. var contractId = item.contractId
  1717. this.$set(item,'contractId',contractId)
  1718. }else{
  1719. this.$set(item,'contractId',0)
  1720. }
  1721. if(item.lifeCycle){
  1722. var lifeCyclearr = item.lifeCycle.split(",")
  1723. this.$set(item,'lifeCyclearr',lifeCyclearr)
  1724. }
  1725. if(item.contractVarianceItem){
  1726. var contractVarianceItemarr = item.contractVarianceItem.split(",")
  1727. this.$set(item,'contractVarianceItemarr',contractVarianceItemarr)
  1728. }
  1729. this.listAdd.unshift(item)
  1730. this.$forceUpdate()
  1731. })
  1732. })
  1733. }
  1734. } else {
  1735. this.getParmCreateAmount.parammaps.partCode = item.partCode
  1736. partslistSGv2(this.getParmCreateAmount).then(response => {
  1737. this.$nextTick(() => {
  1738. console.log('新增根据编号获取备件库存数量', response.data.list[0])
  1739. item = response.data.list[0]
  1740. this.$set(item,'myId',Date.parse(new Date()))
  1741. if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
  1742. this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
  1743. this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
  1744. } else {
  1745. item.srcpath = ''
  1746. item.picpath = ''
  1747. }
  1748. this.$set(item, 'amount', '')
  1749. this.$set(item, 'purpose', '')
  1750. if(this.dialogStatus==='special' && this.createTemp.purchaseType == '2'){
  1751. this.$set(item,'price','')
  1752. }else if(this.dialogStatus==='special' && this.createTemp.purchaseType == '3'){
  1753. this.$set(item,'price','0')
  1754. this.$set(item,'amount','0')
  1755. }
  1756. if(item.price){
  1757. var pricearr = item.price.split(",")
  1758. this.$set(item,'pricearr',pricearr)
  1759. }else{
  1760. this.$set(item,'pricearr',[])
  1761. }
  1762. if(item.lifeCycle){
  1763. var lifeCyclearr = item.lifeCycle.split(",")
  1764. this.$set(item,'lifeCyclearr',lifeCyclearr)
  1765. }
  1766. if(item.contractVarianceItem){
  1767. var contractVarianceItemarr = item.contractVarianceItem.split(",")
  1768. this.$set(item,'contractVarianceItemarr',contractVarianceItemarr)
  1769. }
  1770. if(item.contractId){
  1771. var contractId = item.contractId
  1772. this.$set(item,'contractId',contractId)
  1773. }else{
  1774. this.$set(item,'contractId',0)
  1775. }
  1776. this.listAdd.unshift(item)
  1777. this.$forceUpdate()
  1778. })
  1779. })
  1780. }
  1781. this.$forceUpdate()
  1782. } else {
  1783. if (this.listAdd.length > 0) {
  1784. if (this.listAdd.find(obj => obj.partId == item.partId)) {
  1785. this.$message({ type: 'warning', message: '此备件已存在,请重新选择备件' })
  1786. } else {
  1787. if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
  1788. this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
  1789. this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
  1790. } else {
  1791. item.srcpath = ''
  1792. item.picpath = ''
  1793. }
  1794. this.$set(item, 'amount', '')
  1795. this.$set(item, 'purpose', '')
  1796. if(this.dialogStatus==='special' && this.createTemp.purchaseType == '3'){
  1797. this.$set(item,'price','0')
  1798. this.$set(item,'amount','0')
  1799. }
  1800. if(item.price){
  1801. var pricearr = item.price.split(",")
  1802. this.$set(item,'pricearr',pricearr)
  1803. }else{
  1804. this.$set(item,'pricearr',[])
  1805. }
  1806. if(item.lifeCycle){
  1807. var lifeCyclearr = item.lifeCycle.split(",")
  1808. this.$set(item,'lifeCyclearr',lifeCyclearr)
  1809. }
  1810. if(item.contractVarianceItem){
  1811. var contractVarianceItemarr = item.contractVarianceItem.split(",")
  1812. this.$set(item,'contractVarianceItemarr',contractVarianceItemarr)
  1813. }
  1814. if(item.contractId){
  1815. var contractId = item.contractId
  1816. this.$set(item,'contractId',contractId)
  1817. }else{
  1818. this.$set(item,'contractId',0)
  1819. }
  1820. this.listAdd.unshift(item)
  1821. }
  1822. } else {
  1823. if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
  1824. this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
  1825. this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
  1826. } else {
  1827. item.srcpath = ''
  1828. item.picpath = ''
  1829. }
  1830. this.$set(item, 'amount', '')
  1831. this.$set(item, 'purpose', '')
  1832. if(this.dialogStatus==='special' && this.createTemp.purchaseType == '3'){
  1833. this.$set(item,'price','0')
  1834. this.$set(item,'amount','0')
  1835. }
  1836. if(item.contractId){
  1837. var contractId = item.contractId
  1838. this.$set(item,'contractId',contractId)
  1839. }else{
  1840. this.$set(item,'contractId',0)
  1841. }
  1842. if(this.dialogStatus !=='special' && this.createTemp.providerId == ''){
  1843. var pricearr = item.price.split(",")
  1844. this.$set(item,'pricearr',pricearr)
  1845. var lifeCyclearr = item.lifeCycle.split(",")
  1846. this.$set(item,'lifeCyclearr',lifeCyclearr)
  1847. var contractVarianceItemarr = item.contractVarianceItem.split(",")
  1848. this.$set(item,'contractVarianceItemarr',contractVarianceItemarr)
  1849. }
  1850. if(this.createTemp.providerId == ''){
  1851. if(item.price){
  1852. var pricearr = item.price.split(",")
  1853. this.$set(item,'pricearr',pricearr)
  1854. }else{
  1855. this.$set(item,'pricearr',[])
  1856. }
  1857. if(item.lifeCycle){
  1858. var lifeCyclearr = item.lifeCycle.split(",")
  1859. this.$set(item,'lifeCyclearr',lifeCyclearr)
  1860. }
  1861. if(item.contractVarianceItem){
  1862. var contractVarianceItemarr = item.contractVarianceItem.split(",")
  1863. this.$set(item,'contractVarianceItemarr',contractVarianceItemarr)
  1864. }
  1865. }
  1866. this.listAdd.unshift(item)
  1867. this.$forceUpdate()
  1868. }
  1869. this.$forceUpdate()
  1870. }
  1871. },
  1872. add_dialog_save() {
  1873. this.isokDisable = true
  1874. setTimeout(() => {
  1875. this.isokDisable = false
  1876. }, 1000)
  1877. this.$refs['createTemp'].validate(valid => {
  1878. if (valid) {
  1879. console.log(this.listAdd)
  1880. if (this.createTemp.orderNumber == '' || this.createTemp.orderNumber == null || this.createTemp.orderNumber == undefined) {
  1881. GetDataByName(this.getParmCreateNumber).then(response => {
  1882. this.$nextTick(() => {
  1883. console.log('新增申购单号', response.data.list[0].orderCode)
  1884. this.createTemp.orderNumber = response.data.list[0].orderCode
  1885. this.$forceUpdate()
  1886. this.add_dialog_saveSave()
  1887. })
  1888. })
  1889. } else {
  1890. this.add_dialog_saveSave()
  1891. }
  1892. }
  1893. })
  1894. },
  1895. add_dialog_saveSave() {
  1896. if (this.listAdd.length !== 0) {
  1897. for (var j = 0; j < this.listAdd.length; j++) {
  1898. console.log(this.listAdd[j].amount)
  1899. if (this.listAdd[j].amount == null || this.listAdd[j].amount === '') {
  1900. this.$message({ type: 'warning', message: '请检查申购数量是否未填写', duration: 2000 })
  1901. return false
  1902. } else {
  1903. var rulesAmount = /^[1-9]\d*$/
  1904. if (!rulesAmount.test(this.listAdd[j].amount)) {
  1905. this.$message({ type: 'error', message: '申购数量请输入正整数', duration: 2000 })
  1906. return false
  1907. }
  1908. }
  1909. }
  1910. if(this.createTemp.markBackend){
  1911. console.log('有数据-走新保存')
  1912. let url = 'authdata/partpurchase/edit'
  1913. let dataArr = []
  1914. for(let i =0 ;i<this.listAdd.length;i++){
  1915. if(this.listAdd[i].myId !== undefined){
  1916. this.listAdd[i].id = 0
  1917. }
  1918. let obj = {
  1919. "id": parseFloat(this.listAdd[i].id),
  1920. "contractId": this.listAdd[i].contractId,
  1921. "bigId": parseFloat(this.createTemp.bigId),
  1922. "pastureId": parseFloat(this.listAdd[i].pastureId),
  1923. "partId": parseFloat(this.listAdd[i].partId),
  1924. "partCode": this.listAdd[i].partCode.toString(),
  1925. "partName": this.listAdd[i].partName.toString(),
  1926. "specification": this.listAdd[i].specification,
  1927. "amount": parseFloat(this.listAdd[i].amount),
  1928. "unit": this.listAdd[i].unit.toString(),
  1929. "brandId": parseFloat(this.listAdd[i].brandId),
  1930. "purpose": this.listAdd[i].purpose.toString(),
  1931. "price": this.listAdd[i].price.toString(),
  1932. "lifeCycle": this.listAdd[i].lifeCycle.toString(),
  1933. "contractVarianceItem": this.listAdd[i].contractVarianceItem.toString(),
  1934. "departmentId": this.createTemp.departmentId.toString(),
  1935. "date": parseTime(this.createTemp.createTime, '{y}-{m}-{d} {h}:{i}:{s}').toString(),
  1936. "employeId": parseFloat(this.createTemp.employeId)
  1937. }
  1938. if(this.listAdd[i].contractId){
  1939. this.$set(this.listAdd[i],'contractId',this.listAdd[i].contractId.toString())
  1940. }else{
  1941. this.$set(this.listAdd[i],'contractId','')
  1942. }
  1943. if(this.listAdd[i].storageAmount){
  1944. obj.storageAmount = parseFloat(this.listAdd[i].storageAmount)
  1945. }else{
  1946. obj.storageAmount = 0
  1947. }
  1948. if(this.listAdd[i].reject){
  1949. obj.reject = this.listAdd[i].reject.toString()
  1950. }else{
  1951. obj.reject = ''
  1952. }
  1953. if(this.listAdd[i].explain){
  1954. obj.explain = this.listAdd[i].explain.toString()
  1955. }else{
  1956. obj.explain = ''
  1957. }
  1958. dataArr.push(obj)
  1959. }
  1960. let data = dataArr
  1961. postJson(url, data).then(response => {
  1962. if (response.msg !== 'fail') {
  1963. this.get_table_data()
  1964. this.dialogFormVisible = false
  1965. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  1966. } else {
  1967. failproccess(response, this.$notify)
  1968. }
  1969. })
  1970. }else{
  1971. console.log('无数据-走原有保存')
  1972. for (var j = 0; j < this.listAdd.length; j++) {
  1973. console.log(this.listAdd[j].amount)
  1974. if (this.listAdd[j].amount == null || this.listAdd[j].amount === '') {
  1975. this.$message({ type: 'warning', message: '请检查申购数量是否未填写', duration: 2000 })
  1976. return false
  1977. } else {
  1978. var rulesAmount = /^[1-9]\d*$/
  1979. if (!rulesAmount.test(this.listAdd[j].amount)) {
  1980. this.$message({ type: 'error', message: '申购数量请输入正整数', duration: 2000 })
  1981. return false
  1982. }
  1983. }
  1984. if (this.listAdd[j].price == '') {
  1985. this.$message({ type: 'warning', message: '请检查单价是否为空', duration: 2000 })
  1986. return false
  1987. } else {
  1988. if(this.listAdd[j].contractId == '' || this.listAdd[j].contractId == undefined || parseFloat(this.listAdd[j].contractId) == 0 || parseFloat(this.listAdd[j].contractId) < 0){
  1989. if (parseFloat(this.listAdd[j].price) == 0) {
  1990. this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后五位', duration: 2000 })
  1991. return false
  1992. } else {
  1993. if(this.listAdd[j].contractId == '' || this.listAdd[j].contractId == undefined || parseFloat(this.listAdd[j].contractId) == 0 || parseFloat(this.listAdd[j].contractId) < 0){
  1994. // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
  1995. var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
  1996. if (rulesPrice.test(this.listAdd[j].price) == false) {
  1997. this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后五位', duration: 2000 })
  1998. return false
  1999. }
  2000. }
  2001. }
  2002. }
  2003. }
  2004. }
  2005. for(let i=0;i<this.listAdd.length;i++){
  2006. this.$set(this.listAdd[i],'date',parseTime(this.createTemp.createTime, '{y}-{m}-{d} {h}:{i}:{s}'))
  2007. this.$set(this.listAdd[i],'employeId',this.createTemp.employeId)
  2008. if(this.listAdd[i].reject){
  2009. this.$set(this.listAdd[i],'reject',this.listAdd[i].reject)
  2010. }else{
  2011. this.$set(this.listAdd[i],'reject',0)
  2012. }
  2013. }
  2014. this.postDataPramas.common = { 'returnmap': '0' }
  2015. this.postDataPramas.data = []
  2016. this.postDataPramas.data[0] = { 'name': 'insertBigPartpurchase', 'type': 'e', 'parammaps': {
  2017. pastureId: this.createTemp.pastureId,
  2018. departmentId: this.createTemp.departmentId,
  2019. orderNumber: this.createTemp.orderNumber,
  2020. useType: this.createTemp.useType,
  2021. createTime: parseTime(this.createTemp.createTime, '{y}-{m}-{d} {h}:{i}:{s}'),
  2022. employeId: this.createTemp.employeId,
  2023. providerId: this.createTemp.providerId
  2024. }}
  2025. // eslint-disable-next-line no-irregular-whitespace
  2026. this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
  2027. this.postDataPramas.data[1].children = []
  2028. this.postDataPramas.data[1].children[0] = { 'name': 'insertPartpurchase', 'type': 'e', 'parammaps': {
  2029. bigId: '@insertBigPartpurchase.LastInsertId',
  2030. pastureId: '@insertSpotList.pastureId',
  2031. partId: '@insertSpotList.partId',
  2032. partCode: '@insertSpotList.partCode',
  2033. partName: '@insertSpotList.partName',
  2034. specification: '@insertSpotList.specification',
  2035. unit: '@insertSpotList.unit',
  2036. brandId: '@insertSpotList.brandId',
  2037. storageAmount: '@insertSpotList.reportery',
  2038. purpose: '@insertSpotList.purpose',
  2039. amount: '@insertSpotList.amount',
  2040. price: '@insertSpotList.price',
  2041. contractId: '@insertSpotList.contractId',
  2042. lifeCycle: '@insertSpotList.lifeCycle',
  2043. date: '@insertSpotList.date',
  2044. employeId: '@insertSpotList.employeId',
  2045. reject: '@insertSpotList.reject',
  2046. departmentId: this.createTemp.departmentId,
  2047. contractVarianceItem: '@insertSpotList.contractVarianceItem',
  2048. contractId: '@insertSpotList.contractId'
  2049. }}
  2050. ExecDataByConfig(this.postDataPramas).then(response => {
  2051. console.log('新增保存发送参数', this.postDataPramas)
  2052. if (response.msg === 'fail') {
  2053. this.$notify({
  2054. title: '保存失败',
  2055. message: response.data,
  2056. type: 'warning',
  2057. duration: 2000
  2058. })
  2059. } else {
  2060. this.dialogFormVisible = false
  2061. this.getdataListParm.parammaps.inputDatetime = ''
  2062. this.get_table_data()
  2063. this.getPendingList()
  2064. this.$notify({
  2065. title: '',
  2066. message: '保存成功',
  2067. type: 'success',
  2068. duration: 2000
  2069. })
  2070. }
  2071. })
  2072. return true
  2073. }
  2074. } else {
  2075. this.$message({
  2076. title: '',
  2077. message: '请选择备件',
  2078. type: 'warning',
  2079. duration: 2000
  2080. })
  2081. return false
  2082. }
  2083. },
  2084. partDelete(row) {
  2085. console.log(this.listAdd)
  2086. MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
  2087. confirmButtonText: '确认',
  2088. cancelButtonText: '取消',
  2089. type: 'warning'
  2090. }).then(() => {
  2091. // console.log(this.list2)
  2092. for (var i = 0; i < this.listAdd.length; i++) {
  2093. console.log(this.listAdd[i])
  2094. if (this.listAdd[i].id === row.id) {
  2095. var listAddIndex = this.listAdd.indexOf(this.listAdd[i])
  2096. }
  2097. if (listAddIndex > -1) {
  2098. this.listAdd.splice(listAddIndex, 1)
  2099. return
  2100. }
  2101. }
  2102. })
  2103. },
  2104. // 查看
  2105. form_see(row) {
  2106. // 查看/特殊申购
  2107. if(row.purchase_type == 1 || row.purchase_type == 3){
  2108. this.textMap.see = '特殊申购'
  2109. }else{
  2110. this.textMap.see = '查看'
  2111. }
  2112. this.dialogStatus = 'see'
  2113. // this.dialogFormVisibleSee = true
  2114. this.dialogFormVisibleSee1 = true
  2115. this.seeTemp = Object.assign({}, row)
  2116. this.seeTemp.purchaseType = String(row.purchase_type)
  2117. console.log('查看上方数据(从table读取)', this.seeTemp)
  2118. this.listSee = []
  2119. this.getdataListSee.parammaps.id = this.seeTemp.id
  2120. this.getdataListSee.parammaps.empId = ''
  2121. this.isApplyEx4 = false
  2122. this.getSeeList()
  2123. },
  2124. getFlowPath(){
  2125. // 流程图
  2126. var reason = '未通过原因:' + this.seeTemp.workflowNote
  2127. if(this.seeTemp.purchase_type == 1){
  2128. // 特殊申购-暂估
  2129. if (this.seeTemp.statue === 2) {
  2130. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '场长审核' },{ title: '采购审核' },{ title: '财务审核' },]
  2131. this.active = 1
  2132. }else if (this.seeTemp.statue === 3) {
  2133. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '场长审核' }, { title: '采购审核' },{ title: '财务审核' }, ]
  2134. this.active = 2
  2135. }else if (this.seeTemp.statue === 4) {
  2136. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson, status: 'error', reason: reason },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '场长审核' },{ title: '采购审核' },{ title: '财务审核' }]
  2137. this.active = 2
  2138. }else if (this.seeTemp.statue === 9) {
  2139. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核' }, { title: '场长审核' },{ title: '采购审核' },{ title: '财务审核' }]
  2140. this.active = 3
  2141. } else if (this.seeTemp.statue === 10) {
  2142. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson, status: 'error', reason: reason }, { title: '供应主管审核' }, { title: '场长审核' },{ title: '采购审核' }, { title: '财务审核' }]
  2143. this.active = 3
  2144. } else if (this.seeTemp.statue === 5) {
  2145. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '场长审核' }, { title: '采购审核' }, { title: '财务审核' }]
  2146. this.active = 4
  2147. } else if (this.seeTemp.statue === 6) {
  2148. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason },{ title: '场长审核' }, { title: '采购审核' }, { title: '财务审核' }]
  2149. this.active = 4
  2150. } else if (this.seeTemp.statue === 11) {
  2151. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson }, { title: '采购审核' }, { title: '财务审核' }]
  2152. this.active = 5
  2153. } else if (this.seeTemp.statue === 12) {
  2154. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson},{ title: '场长审核' ,date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson, status: 'error', reason: reason }, { title: '采购审核' }, { title: '财务审核' }]
  2155. this.active = 5
  2156. } else if (this.seeTemp.statue === 7) {
  2157. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson }, { title: '采购审核',date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }, { title: '财务审核' }]
  2158. this.active = 6
  2159. } else if (this.seeTemp.statue === 8) {
  2160. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson},{ title: '场长审核' ,date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson}, { title: '采购审核',date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }, { title: '财务审核' }]
  2161. this.active = 6
  2162. } else if (this.seeTemp.statue === 13) {
  2163. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson }, { title: '采购审核',date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }, { title: '财务审核',date: this.seeTemp.financedate, name: this.seeTemp.financeName }]
  2164. this.active = 7
  2165. } else if (this.seeTemp.statue === 14) {
  2166. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson},{ title: '场长审核' ,date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson}, { title: '采购审核',date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson}, { title: '财务审核',date: this.seeTemp.financedate, name: this.seeTemp.financeName, status: 'error', reason: reason }]
  2167. this.active = 7
  2168. }
  2169. }else if(this.seeTemp.purchase_type == 3){
  2170. // 赠品
  2171. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }]
  2172. this.active = 1
  2173. } else if(this.seeTemp.purchase_type < 0 || this.seeTemp.purchase_type == 0){
  2174. if(this.seeTemp.departmentName == '挤奶处'){
  2175. // 奶厅申购审核流程
  2176. if(this.seeTemp.examine == 1){
  2177. console.log(11111111111)
  2178. if (this.seeTemp.statue === 2) {
  2179. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' },{ title: '场长审核' },{ title: '职能中心审核' },{ title: '采购审核' }]
  2180. this.active = 1
  2181. }else if (this.seeTemp.statue === 3) {
  2182. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },{ title: '设备主管审核' }, { title: '供应主管审核' },{ title: '场长审核' },{ title: '职能中心审核' }, { title: '采购审核' }]
  2183. this.active = 2
  2184. } else if (this.seeTemp.statue === 4) {
  2185. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson, status: 'error', reason: reason },{ title: '设备主管审核' }, { title: '供应主管审核' },{ title: '场长审核' },{ title: '职能中心审核' }, { title: '采购审核' }]
  2186. this.active = 2
  2187. } else if (this.seeTemp.statue === 9) {
  2188. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核' },{ title: '场长审核' },{ title: '职能中心审核' }, { title: '采购审核' }]
  2189. this.active = 3
  2190. } else if (this.seeTemp.statue === 10) {
  2191. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson, status: 'error', reason: reason }, { title: '供应主管审核' },{ title: '场长审核' },{ title: '职能中心审核' }, { title: '采购审核' }]
  2192. this.active = 3
  2193. } else if (this.seeTemp.statue === 5) {
  2194. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '场长审核' },{ title: '职能中心审核' }, { title: '采购审核' }]
  2195. this.active = 4
  2196. } else if (this.seeTemp.statue === 6) {
  2197. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason },{ title: '场长审核' },{ title: '职能中心审核' },{ title: '采购审核' }]
  2198. this.active = 4
  2199. } else if (this.seeTemp.statue === 11) {
  2200. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson },{ title: '职能中心审核' }, { title: '采购审核' }]
  2201. this.active = 5
  2202. } else if (this.seeTemp.statue === 12) {
  2203. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson, status: 'error', reason: reason },{ title: '职能中心审核' },{ title: '采购审核' }]
  2204. this.active = 5
  2205. } else if (this.seeTemp.statue === 15) {
  2206. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson },{ title: '职能中心审核', name:this.seeTemp.positionName , date: this.seeTemp.positiondate }, { title: '采购审核' }]
  2207. this.active = 6
  2208. } else if (this.seeTemp.statue === 16) {
  2209. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson },{ title: '职能中心审核', name:this.seeTemp.positionName , date: this.seeTemp.positiondate, status: 'error', reason: reason }, { title: '采购审核' }]
  2210. this.active = 6
  2211. } else if (this.seeTemp.statue === 7) {
  2212. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson },{ title: '职能中心审核', name:this.seeTemp.positionName , date: this.seeTemp.positiondate }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }]
  2213. this.active = 7
  2214. } else if (this.seeTemp.statue === 8) {
  2215. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson },{ title: '职能中心审核', name:this.seeTemp.positionName , date: this.seeTemp.positiondate }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
  2216. this.active = 7
  2217. }
  2218. }else{
  2219. if (this.seeTemp.statue === 2) {
  2220. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' },{ title: '职能中心审核' },{ title: '采购审核' }]
  2221. this.active = 1
  2222. }else if (this.seeTemp.statue === 3) {
  2223. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },{ title: '设备主管审核' }, { title: '供应主管审核' },{ title: '职能中心审核' }, { title: '采购审核' }]
  2224. this.active = 2
  2225. } else if (this.seeTemp.statue === 4) {
  2226. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson, status: 'error', reason: reason },{ title: '设备主管审核' }, { title: '供应主管审核' },{ title: '职能中心审核' }, { title: '采购审核' }]
  2227. this.active = 2
  2228. } else if (this.seeTemp.statue === 9) {
  2229. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核' },{ title: '职能中心审核' }, { title: '采购审核' }]
  2230. this.active = 3
  2231. } else if (this.seeTemp.statue === 10) {
  2232. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson, status: 'error', reason: reason }, { title: '供应主管审核' },{ title: '职能中心审核' }, { title: '采购审核' }]
  2233. this.active = 3
  2234. } else if (this.seeTemp.statue === 5) {
  2235. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '职能中心审核' }, { title: '采购审核' }]
  2236. this.active = 4
  2237. } else if (this.seeTemp.statue === 6) {
  2238. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason },{ title: '职能中心审核' },{ title: '采购审核' }]
  2239. this.active = 4
  2240. } else if (this.seeTemp.statue === 15) {
  2241. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '职能中心审核', name:this.seeTemp.positionName , date: this.seeTemp.positiondate }, { title: '采购审核' }]
  2242. this.active = 5
  2243. } else if (this.seeTemp.statue === 16) {
  2244. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '职能中心审核', name:this.seeTemp.positionName , date: this.seeTemp.positiondate, status: 'error', reason: reason }, { title: '采购审核' }]
  2245. this.active = 5
  2246. } else if (this.seeTemp.statue === 7) {
  2247. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '职能中心审核', name:this.seeTemp.positionName , date: this.seeTemp.positiondate }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }]
  2248. this.active = 6
  2249. } else if (this.seeTemp.statue === 8) {
  2250. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '职能中心审核', name:this.seeTemp.positionName , date: this.seeTemp.positiondate }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
  2251. this.active = 6
  2252. }
  2253. }
  2254. }else{
  2255. // 申购合单审核流程
  2256. if (this.seeTemp.statue === 2) {
  2257. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' },{ title: '场长审核' },{ title: '采购审核' }]
  2258. this.active = 1
  2259. }else if (this.seeTemp.statue === 3) {
  2260. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },{ title: '设备主管审核' }, { title: '供应主管审核' },{ title: '场长审核' }, { title: '采购审核' }]
  2261. this.active = 2
  2262. } else if (this.seeTemp.statue === 4) {
  2263. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson, status: 'error', reason: reason },{ title: '设备主管审核' }, { title: '供应主管审核' },{ title: '场长审核' }, { title: '采购审核' }]
  2264. this.active = 2
  2265. } else if (this.seeTemp.statue === 9) {
  2266. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核' },{ title: '场长审核' }, { title: '采购审核' }]
  2267. this.active = 3
  2268. } else if (this.seeTemp.statue === 10) {
  2269. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson, status: 'error', reason: reason }, { title: '供应主管审核' },{ title: '场长审核' }, { title: '采购审核' }]
  2270. this.active = 3
  2271. } else if (this.seeTemp.statue === 5) {
  2272. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '场长审核' }, { title: '采购审核' }]
  2273. this.active = 4
  2274. } else if (this.seeTemp.statue === 6) {
  2275. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason },{ title: '场长审核' },{ title: '采购审核' }]
  2276. this.active = 4
  2277. } else if (this.seeTemp.statue === 11) {
  2278. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson }, { title: '采购审核' }]
  2279. this.active = 5
  2280. } else if (this.seeTemp.statue === 12) {
  2281. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson, status: 'error', reason: reason },{ title: '采购审核' }]
  2282. this.active = 5
  2283. } else if (this.seeTemp.statue === 7) {
  2284. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }]
  2285. this.active = 6
  2286. } else if (this.seeTemp.statue === 8) {
  2287. this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson },{ title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson, },{ title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
  2288. this.active = 6
  2289. }
  2290. }
  2291. }
  2292. },
  2293. getSeeList() {
  2294. this.listLoadingSee = true
  2295. console.log(this.dialogStatus,'======')
  2296. if(this.dialogStatus == 'create'){
  2297. console.log(this.dialogStatus,'======')
  2298. this.getdataListSee.parammaps.reject = 1
  2299. }else{
  2300. this.getdataListSee.parammaps.reject = 0
  2301. if(this.dialogStatus == 'special'){
  2302. if(this.createTemp.purchaseType == '1' || this.createTemp.purchaseType == '3'){
  2303. this.getdataListSee.parammaps.reject = 1
  2304. }
  2305. }
  2306. }
  2307. this.getdataListSee.parammaps.pastureId = Cookies.get('pastureid')
  2308. GetDataByName(this.getdataListSee).then(response => {
  2309. if (response.data.list !== null) {
  2310. console.log('查看下方table数据', response.data.list)
  2311. response.data.list.forEach((item)=>{
  2312. console.log(item,'item')
  2313. var pricearr = item.price.split(",")
  2314. this.$set(item,'pricearr',pricearr)
  2315. var lifeCyclearr = item.lifeCycle.split(",")
  2316. this.$set(item,'lifeCyclearr',lifeCyclearr)
  2317. var contractVarianceItemarr = item.contractVarianceItem.split(",")
  2318. this.$set(item,'contractVarianceItemarr',contractVarianceItemarr)
  2319. })
  2320. this.listSee = response.data.list
  2321. this.listAdd = response.data.list
  2322. this.modifylist = response.data.list
  2323. var sumPrices = 0
  2324. response.data.list.forEach(function(i,j){
  2325. sumPrices = sumPrices + (parseFloat(i.price1) *parseFloat(i.amount) )
  2326. })
  2327. console.log("总价sumPrices",sumPrices)
  2328. var priceObj = false
  2329. var priceArr = []
  2330. response.data.list.forEach(function(i,j){
  2331. if(parseFloat(i.price1) >= 500){
  2332. priceArr.push(true)
  2333. }else{
  2334. priceArr.push(false)
  2335. }
  2336. })
  2337. if (priceArr.includes(true)) {
  2338. priceObj = true
  2339. } else {
  2340. priceObj = false
  2341. }
  2342. console.log("priceObj",priceObj)
  2343. //总价大于2000 或单价>500
  2344. if(sumPrices >= 2000 || priceObj){
  2345. if(this.isMilk){
  2346. this.isApplyEx4 = true
  2347. }else{
  2348. this.isApplyEx4 = false
  2349. }
  2350. this.getFlowPath()
  2351. } else {
  2352. this.isApplyEx4 = false
  2353. this.getFlowPath()
  2354. }
  2355. for (let i = 0; i < response.data.list.length; i++) {
  2356. if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
  2357. console.log(process.env.VUE_APP_BASE_API + response.data.list[i].srcpath, '=======1')
  2358. this.listSee[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
  2359. this.listSee[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
  2360. this.listAdd[i].srcpath = this.listSee[i].srcpath
  2361. this.listAdd[i].picpath = this.listSee[i].picpath
  2362. // this.seeTemp.providerName = response.data.list.providerName
  2363. this.pageNumSee = response.data.pageNum
  2364. this.pageSizeSee = response.data.pageSize
  2365. } else {
  2366. this.listSee[i].srcpath = ''
  2367. this.listSee[i].picpath = ''
  2368. this.listAdd[i].srcpath = ''
  2369. this.listAdd[i].picpath = ''
  2370. }
  2371. }
  2372. }
  2373. if (response.data.total) {
  2374. this.totalSee = response.data.total
  2375. }
  2376. setTimeout(() => {
  2377. this.listLoadingSee = false
  2378. }, 100)
  2379. })
  2380. },
  2381. form_edit(row) {
  2382. this.isMilk = false
  2383. this.edit = 0
  2384. this.getDepartParam.parammaps.pastureId = row.pastureId
  2385. this.getCreateDepartDownList()
  2386. if (row.providerId == undefined) {
  2387. row.providerId = ''
  2388. row.providerName = ''
  2389. }
  2390. this.createTemp = Object.assign({}, row) // copy obj
  2391. this.createTemp.createTime = row.inputTime
  2392. this.dialogStatus = 'update'
  2393. this.dialogFormVisible = true
  2394. this.$nextTick(() => {
  2395. this.$refs['createTemp'].clearValidate()
  2396. })
  2397. this.getdataListSee.parammaps.id = this.createTemp.id
  2398. this.getSeeList()
  2399. },
  2400. edit_dialog_save() {
  2401. this.isokDisable = true
  2402. setTimeout(() => {
  2403. this.isokDisable = false
  2404. }, 1000)
  2405. this.$refs['createTemp'].validate(valid => {
  2406. if (valid) {
  2407. this.edit_dialog_saveSave()
  2408. }
  2409. })
  2410. },
  2411. edit_dialog_saveSave() {
  2412. if (this.listAdd.length !== 0) {
  2413. for (var j = 0; j < this.listAdd.length; j++) {
  2414. console.log(this.listAdd[j].amount)
  2415. // eslint-disable-next-line use-isnan
  2416. if (this.listAdd[j].amount == null || this.listAdd[j].amount === '') {
  2417. this.$message({ type: 'warning', message: '请检查申购数量是否未填写', duration: 2000 })
  2418. return false
  2419. } else {
  2420. var rulesAmount = /^[1-9]\d*$/
  2421. if (!rulesAmount.test(this.listAdd[j].amount)) {
  2422. this.$message({ type: 'error', message: '申购数量请输入正整数', duration: 2000 })
  2423. return false
  2424. }
  2425. }
  2426. if (this.listAdd[j].price == '') {
  2427. this.$message({ type: 'warning', message: '请检查单价是否为空', duration: 2000 })
  2428. return false
  2429. } else {
  2430. if (parseFloat(this.listAdd[j].price) == 0) {
  2431. this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后五位', duration: 2000 })
  2432. return false
  2433. } else {
  2434. console.log(this.listAdd)
  2435. if(this.listAdd[j].contractId == '' || this.listAdd[j].contractId == undefined || parseFloat(this.listAdd[j].contractId) == 0 || parseFloat(this.listAdd[j].contractId) < 0){
  2436. // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
  2437. var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
  2438. if (rulesPrice.test(this.listAdd[j].price) == false) {
  2439. this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后五位', duration: 2000 })
  2440. return false
  2441. }
  2442. }
  2443. }
  2444. }
  2445. }
  2446. for(let i=0;i<this.listAdd.length;i++){
  2447. this.$set(this.listAdd[i],'date',parseTime(this.createTemp.createTime, '{y}-{m}-{d} {h}:{i}:{s}'))
  2448. this.$set(this.listAdd[i],'employeId',this.createTemp.employeId)
  2449. if(this.listAdd[i].reject){
  2450. this.$set(this.listAdd[i],'reject',this.listAdd[i].reject)
  2451. }else{
  2452. this.$set(this.listAdd[i],'reject',0)
  2453. }
  2454. }
  2455. this.postDataPramas.common = { 'returnmap': '0' }
  2456. this.postDataPramas.data = []
  2457. this.postDataPramas.data[0] = { 'name': 'updatepartpurchaseCharge', 'type': 'e', 'parammaps': {
  2458. id: this.createTemp.id
  2459. }}
  2460. this.postDataPramas.data[1] = { 'name': 'deletePartpurchase', 'type': 'e', 'parammaps': {
  2461. bigId: this.createTemp.id
  2462. }}
  2463. // eslint-disable-next-line no-irregular-whitespace
  2464. this.postDataPramas.data[2] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
  2465. this.postDataPramas.data[2].children = []
  2466. this.postDataPramas.data[2].children[0] = { 'name': 'insertPartpurchase', 'type': 'e', 'parammaps': {
  2467. bigId: this.createTemp.id,
  2468. pastureId: '@insertSpotList.pastureId',
  2469. partId: '@insertSpotList.partId',
  2470. partCode: '@insertSpotList.partCode',
  2471. partName: '@insertSpotList.partName',
  2472. specification: '@insertSpotList.specification',
  2473. unit: '@insertSpotList.unit',
  2474. brandId: '@insertSpotList.brandId',
  2475. storageAmount: '@insertSpotList.reportery',
  2476. purpose: '@insertSpotList.purpose',
  2477. amount: '@insertSpotList.amount',
  2478. price: '@insertSpotList.price',
  2479. contractId: '@insertSpotList.contractId',
  2480. lifeCycle: '@insertSpotList.lifeCycle',
  2481. reject: '@insertSpotList.reject',
  2482. departmentId: this.createTemp.departmentId,
  2483. date: this.createTemp.inputTime,
  2484. employeId:this.createTemp.employeId,
  2485. contractVarianceItem: '@insertSpotList.contractVarianceItem',
  2486. // partpurchase:''
  2487. }}
  2488. ExecDataByConfig(this.postDataPramas).then(response => {
  2489. console.log('编辑保存发送参数', this.postDataPramas)
  2490. if (response.msg === 'fail') {
  2491. this.$notify({
  2492. title: '保存失败',
  2493. message: response.data,
  2494. type: 'warning',
  2495. duration: 2000
  2496. })
  2497. } else {
  2498. this.dialogFormVisible = false
  2499. this.getdataListParm.parammaps.inputDatetime = ''
  2500. this.get_table_data()
  2501. this.$notify({
  2502. title: '',
  2503. message: '保存成功',
  2504. type: 'success',
  2505. duration: 2000
  2506. })
  2507. }
  2508. })
  2509. return true
  2510. } else {
  2511. this.$message({
  2512. title: '',
  2513. message: '请选择备件',
  2514. type: 'warning',
  2515. duration: 2000
  2516. })
  2517. return false
  2518. }
  2519. },
  2520. get_select_list() {
  2521. GetDataByNames(this.requestParams).then(response => {
  2522. this.findAllProvider = response.data.findAllProvider.list
  2523. this.findAllPasture = response.data.findAllPasture.list
  2524. this.findAllEmploye = response.data.findAllEmploye.list
  2525. this.onlineSubscriptionList = response.data.getflexProviderList.list
  2526. this.getDepartDownList()
  2527. })
  2528. },
  2529. getDepartDownList() {
  2530. GetDataByName(this.getDepartParam).then(response => {
  2531. this.findAllDepart = response.data.list
  2532. })
  2533. },
  2534. changePastureName(item) {
  2535. this.getDepartParam.parammaps.pastureId = this.findAllPasture.find(obj => obj.name == item).id
  2536. this.getdataListParm.parammaps.departmentId = ''
  2537. this.getDepartDownList()
  2538. },
  2539. getCreateDepartDownList() {
  2540. GetDataByName(this.getDepartParam).then(response => {
  2541. this.createDepartList = response.data.list
  2542. if (this.edit == 1) {
  2543. if (this.createDepartList.find(obj => obj.id == Cookies.get('departmentid'))) {
  2544. this.createTemp.departmentId = parseInt(Cookies.get('departmentid'))
  2545. this.createTemp.departmentName = this.createDepartList.find(obj => obj.id == Cookies.get('departmentid')).name
  2546. } else {
  2547. this.createTemp.departmentId = response.data.list[0].id
  2548. this.createTemp.departmentName = response.data.list[0].name
  2549. }
  2550. if(this.isMilk){
  2551. console.log('milk')
  2552. this.createTemp.departmentName = '挤奶处'
  2553. this.createTemp.departmentId = this.createDepartList.find(obj => obj.name == this.createTemp.departmentName).id
  2554. }
  2555. }
  2556. })
  2557. },
  2558. changePasture(item) {
  2559. this.getDepartParam.parammaps.pastureId = item
  2560. this.edit = 1
  2561. this.getCreateDepartDownList()
  2562. },
  2563. changeDepart(item) {
  2564. this.createTemp.departmentName = this.createDepartList.find(obj => obj.id == item).name
  2565. },
  2566. handleDownload() {
  2567. console.log('点击了下载')
  2568. this.$alert('备件申购正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
  2569. this.isPercentage = true
  2570. this.percentage = 1
  2571. var timer = setInterval(() => {
  2572. this.percentage += 5
  2573. if (this.percentage > 95) {
  2574. this.percentage = 99
  2575. clearInterval(timer)
  2576. }
  2577. this.percentage = this.percentage
  2578. }, 1000)
  2579. this.downloadParam.name = 'downloadPartpurchaseList'
  2580. this.downloadParam.parammaps = this.getdataListParm.parammaps
  2581. GetAccount(this.downloadParam).then(response => {
  2582. if (response.data.list !== '') {
  2583. this.percentage = 99
  2584. setTimeout(() => {
  2585. this.isPercentage = false
  2586. }, 2000)
  2587. }
  2588. this.$nextTick(() => {
  2589. const ExcelDatas = [
  2590. {
  2591. tHeader: ['牧场', '申购单号', '申购时间', '备件编号', '备件名称', '规格型号', '品牌', '单位', '申购数量', '申购部门', '申购人', '备注'],
  2592. filterVal: ['pastureName', 'orderNumber', 'inputTime', 'partCode', 'partName', 'specification', 'brandName', 'unit', 'amount', 'departmentName', 'empname', 'purpose'],
  2593. tableDatas: response.data.list,
  2594. sheetName: '备件申购'
  2595. }
  2596. ]
  2597. json2excel(ExcelDatas, '备件申购', true, 'xlsx')
  2598. })
  2599. })
  2600. },
  2601. form_delete(row) {
  2602. console.log('点击了删除')
  2603. MessageBox.confirm('确认删除此条信息?', {
  2604. confirmButtonText: '确认',
  2605. cancelButtonText: '取消',
  2606. type: 'warning'
  2607. }).then(() => {
  2608. this.postDataPramas.common = { 'returnmap': '0' }
  2609. this.postDataPramas.data = []
  2610. this.postDataPramas.data[0] = { 'name': 'deleteBigPartpurchase', 'type': 'e', 'parammaps': {
  2611. id: row.id
  2612. }}
  2613. this.postDataPramas.data[1] = { 'name': 'deletePartpurchase', 'type': 'e', 'parammaps': {
  2614. bigId: row.id
  2615. }}
  2616. ExecDataByConfig(this.postDataPramas).then(response => {
  2617. this.get_table_data()
  2618. this.$notify({
  2619. title: '成功',
  2620. message: '删除成功',
  2621. type: 'success',
  2622. duration: 2000
  2623. })
  2624. })
  2625. }).catch(() => {
  2626. this.$message({
  2627. type: 'info',
  2628. message: '已取消删除'
  2629. })
  2630. })
  2631. },
  2632. handleExamine1(row) {
  2633. console.log('点击了库管审核')
  2634. if (row == undefined) {
  2635. this.examineTemp = this.seeTemp
  2636. this.$set(this.seeTemp, 'statue', 1)
  2637. this.$set(this.seeTemp, 'workflowNote', '')
  2638. } else {
  2639. this.examineTemp = Object.assign({}, row)
  2640. this.$set(this.examineTemp, 'statue', 1)
  2641. this.$set(this.examineTemp, 'workflowNote', '')
  2642. }
  2643. this.dialogStatus = 'examine1'
  2644. this.dialogFormVisible_Examine = true
  2645. this.statueReason = false
  2646. },
  2647. changeStatue(val) {
  2648. if (val == 2) {
  2649. this.statueReason = true
  2650. } else {
  2651. this.statueReason = false
  2652. }
  2653. },
  2654. createExamineData1() {
  2655. console.log('点击了库管审核')
  2656. this.isokDisable = true
  2657. setTimeout(() => {
  2658. this.isokDisable = false
  2659. }, 1000)
  2660. this.$refs['examineTemp'].validate(valid => {
  2661. if (valid) {
  2662. this.requestParam = {}
  2663. this.requestParam.name = 'partpurchaseCharge'
  2664. this.requestParam.parammaps = {}
  2665. this.requestParam.parammaps.id = this.examineTemp.id
  2666. if (this.examineTemp.statue == 1) {
  2667. this.requestParam.parammaps.statue = 3
  2668. } else if (this.examineTemp.statue == 2) {
  2669. this.requestParam.parammaps.statue = 4
  2670. }
  2671. this.requestParam.parammaps.empId = Cookies.get('employeid')
  2672. this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
  2673. PostDataByName(this.requestParam).then(response => {
  2674. console.log('审核确认发送参数', this.requestParam)
  2675. this.isokDisable = false
  2676. if (response.msg !== 'fail') {
  2677. this.get_table_data()
  2678. this.dialogFormVisible_Examine = false
  2679. this.dialogFormVisible_See = false
  2680. this.statueReason = false
  2681. this.$notify({
  2682. title: '成功',
  2683. message: '审核成功',
  2684. type: 'success',
  2685. duration: 2000
  2686. })
  2687. } else {
  2688. failproccess(response, this.$notify)
  2689. }
  2690. })
  2691. }
  2692. })
  2693. },
  2694. handleExamine2(row) {
  2695. console.log('点击了设备主管审核')
  2696. if (row == undefined) {
  2697. this.examineTemp = this.seeTemp
  2698. this.$set(this.seeTemp, 'statue', 1)
  2699. this.$set(this.seeTemp, 'workflowNote', '')
  2700. } else {
  2701. this.examineTemp = Object.assign({}, row)
  2702. this.$set(this.examineTemp, 'statue', 1)
  2703. this.$set(this.examineTemp, 'workflowNote', '')
  2704. }
  2705. this.dialogStatus = 'examine2'
  2706. this.dialogFormVisible_Examine = true
  2707. this.statueReason = false
  2708. },
  2709. createExamineData2() {
  2710. console.log('点击了设备主管审核')
  2711. this.isokDisable = true
  2712. setTimeout(() => {
  2713. this.isokDisable = false
  2714. }, 1000)
  2715. this.$refs['examineTemp'].validate(valid => {
  2716. if (valid) {
  2717. this.requestParam = {}
  2718. this.requestParam.name = 'partpurchaseEquipment'
  2719. this.requestParam.parammaps = {}
  2720. this.requestParam.parammaps.id = this.examineTemp.id
  2721. if (this.examineTemp.statue == 1) {
  2722. this.requestParam.parammaps.statue = 9
  2723. } else if (this.examineTemp.statue == 2) {
  2724. this.requestParam.parammaps.statue = 10
  2725. }
  2726. this.requestParam.parammaps.empId = Cookies.get('employeid')
  2727. this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
  2728. PostDataByName(this.requestParam).then(response => {
  2729. this.isokDisable = false
  2730. console.log('审核确认发送参数', this.requestParam)
  2731. if (response.msg !== 'fail') {
  2732. this.get_table_data()
  2733. this.dialogFormVisible_Examine = false
  2734. this.dialogFormVisible_See = false
  2735. this.statueReason = false
  2736. this.$notify({
  2737. title: '成功',
  2738. message: '审核成功',
  2739. type: 'success',
  2740. duration: 2000
  2741. })
  2742. } else {
  2743. failproccess(response, this.$notify)
  2744. }
  2745. })
  2746. }
  2747. })
  2748. },
  2749. handleExamine3(row) {
  2750. console.log('点击了供应主管审核')
  2751. if (row == undefined) {
  2752. this.examineTemp = this.seeTemp
  2753. this.$set(this.seeTemp, 'statue', 1)
  2754. this.$set(this.seeTemp, 'workflowNote', '')
  2755. this.getdataListSee.parammaps.id = this.seeTemp.id
  2756. } else {
  2757. this.examineTemp = Object.assign({}, row)
  2758. this.getdataListSee.parammaps.id = this.examineTemp.id
  2759. this.$set(this.examineTemp, 'statue', 1)
  2760. this.$set(this.examineTemp, 'workflowNote', '')
  2761. }
  2762. this.getSeeList()
  2763. this.dialogStatus = 'examine3'
  2764. this.dialogFormVisible_Examine = true
  2765. this.statueReason = false
  2766. },
  2767. createExamineData3() {
  2768. console.log('点击了供应主管审核',this.examineTemp.statue)
  2769. console.log(this.examineTemp.purchase_type,'=====')
  2770. console.log(this.isApplyEx4,'=====')
  2771. this.isokDisable = true
  2772. setTimeout(() => {
  2773. this.isokDisable = false
  2774. }, 1000)
  2775. this.$refs['examineTemp'].validate(valid => {
  2776. if (valid) {
  2777. this.requestParam = {}
  2778. this.requestParam.name = 'partpurchaseCharge3'
  2779. this.requestParam.parammaps = {}
  2780. this.requestParam.parammaps.id = this.examineTemp.id
  2781. if (this.examineTemp.statue == 1) {
  2782. this.requestParam.parammaps.statue = 5
  2783. // if(this.examineTemp.purchase_type !== 1 && this.examineTemp.purchase_type !== 3){
  2784. // console.log(this.isApplyEx4,'=====')
  2785. // if(this.isApplyEx4 == true){
  2786. // this.requestParam.parammaps.statue = 5
  2787. // }else{
  2788. // this.requestParam.parammaps.statue = 11
  2789. // }
  2790. // }else{
  2791. // this.requestParam.parammaps.statue = 5
  2792. // }
  2793. } else if (this.examineTemp.statue == 2) {
  2794. // if(this.examineTemp.purchase_type !== 1 && this.examineTemp.purchase_type !== 3){
  2795. // if(this.isApplyEx4 == true){
  2796. // this.requestParam.parammaps.statue = 6
  2797. // }else{
  2798. // this.requestParam.parammaps.statue = 12
  2799. // }
  2800. // }else{
  2801. // this.requestParam.parammaps.statue = 6
  2802. // }
  2803. this.requestParam.parammaps.statue = 6
  2804. }
  2805. this.requestParam.parammaps.empId = Cookies.get('employeid')
  2806. this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
  2807. // return false
  2808. PostDataByName(this.requestParam).then(response => {
  2809. console.log('审核确认发送参数', this.requestParam)
  2810. this.isokDisable = false
  2811. if (response.msg !== 'fail') {
  2812. this.get_table_data()
  2813. this.dialogFormVisible_Examine = false
  2814. this.dialogFormVisible_See = false
  2815. this.statueReason = false
  2816. this.$notify({
  2817. title: '成功',
  2818. message: '审核成功',
  2819. type: 'success',
  2820. duration: 2000
  2821. })
  2822. } else {
  2823. failproccess(response, this.$notify)
  2824. }
  2825. })
  2826. }
  2827. })
  2828. },
  2829. handleExamine4(row) {
  2830. console.log('点击了场长审核')
  2831. if (row == undefined) {
  2832. this.examineTemp = this.seeTemp
  2833. this.$set(this.seeTemp, 'statue', 1)
  2834. this.$set(this.seeTemp, 'workflowNote', '')
  2835. } else {
  2836. this.examineTemp = Object.assign({}, row)
  2837. this.$set(this.examineTemp, 'workflowNote', '')
  2838. this.$set(this.examineTemp, 'statue', 1)
  2839. }
  2840. this.dialogStatus = 'examine4'
  2841. this.dialogFormVisible_Examine = true
  2842. this.statueReason = false
  2843. },
  2844. createExamineData4() {
  2845. console.log('点击了场长审核')
  2846. this.isokDisable = true
  2847. setTimeout(() => {
  2848. this.isokDisable = false
  2849. }, 1000)
  2850. this.$refs['examineTemp'].validate(valid => {
  2851. if (valid) {
  2852. this.requestParam = {}
  2853. this.requestParam.parammaps = {}
  2854. this.requestParam.common = { 'returnmap': '0' }
  2855. this.requestParam.data = []
  2856. // 通过
  2857. if (this.examineTemp.statue == 1) {
  2858. this.requestParam.data[0] = { 'name': 'partpurchaseField', 'type': 'e', 'parammaps': {
  2859. id: this.examineTemp.id,
  2860. statue: 11,
  2861. field: Cookies.get('employeid'),
  2862. workflowNote: this.examineTemp.workflowNote
  2863. }}
  2864. this.requestParam.data[1] = { 'name': 'createBuydetailBySG', 'type': 'e', 'parammaps': {
  2865. id: this.examineTemp.id,
  2866. pastureId: this.examineTemp.pastureId
  2867. }}
  2868. //不通过
  2869. } else if (this.examineTemp.statue == 2) {
  2870. this.requestParam.data[0] = { 'name': 'partpurchaseField', 'type': 'e', 'parammaps': {
  2871. id: this.examineTemp.id,
  2872. statue: 12,
  2873. field: Cookies.get('employeid'),
  2874. workflowNote: this.examineTemp.workflowNote
  2875. }}
  2876. }
  2877. ExecDataByConfig(this.requestParam).then(response => {
  2878. this.isokDisable = false
  2879. if (response.msg !== 'fail') {
  2880. this.get_table_data()
  2881. this.dialogFormVisible_Examine = false
  2882. this.dialogFormVisible_See = false
  2883. this.statueReason = false
  2884. this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
  2885. } else {
  2886. failproccess(response, this.$notify)
  2887. }
  2888. })
  2889. }
  2890. })
  2891. },
  2892. handleExamine5(row) {
  2893. console.log('点击了采购审核')
  2894. if (row == undefined) {
  2895. this.examineTemp = this.seeTemp
  2896. this.$set(this.seeTemp, 'statue', 1)
  2897. this.$set(this.seeTemp, 'workflowNote', '')
  2898. } else {
  2899. this.examineTemp = Object.assign({}, row)
  2900. this.$set(this.examineTemp, 'workflowNote', '')
  2901. this.$set(this.examineTemp, 'statue', 1)
  2902. }
  2903. this.dialogStatus = 'examine5'
  2904. this.dialogFormVisible_Examine = true
  2905. this.statueReason = false
  2906. },
  2907. createExamineData5() {
  2908. console.log('点击了采购审核')
  2909. this.isokDisable = true
  2910. setTimeout(() => {
  2911. this.isokDisable = false
  2912. }, 10000)
  2913. this.$refs['examineTemp'].validate(valid => {
  2914. if (valid) {
  2915. this.requestParam = {}
  2916. this.requestParam.parammaps = {}
  2917. this.requestParam.common = { 'returnmap': '0' }
  2918. this.requestParam.data = []
  2919. if (this.examineTemp.statue == 1) {
  2920. this.requestParam.data[0] = { 'name': 'partpurchaseCharge1', 'type': 'e', 'parammaps': {
  2921. id: this.examineTemp.id,
  2922. statue: 7,
  2923. empId: Cookies.get('employeid'),
  2924. workflowNote: this.examineTemp.workflowNote
  2925. }}
  2926. this.requestParam.data[1] = { 'name': 'createBuydetailBySG', 'type': 'e', 'parammaps': {
  2927. id: this.examineTemp.id,
  2928. pastureId: this.examineTemp.pastureId
  2929. }}
  2930. } else if (this.examineTemp.statue == 2) {
  2931. this.requestParam.data[0] = { 'name': 'partpurchaseCharge1', 'type': 'e', 'parammaps': {
  2932. id: this.examineTemp.id,
  2933. statue: 8,
  2934. empId: Cookies.get('employeid'),
  2935. workflowNote: this.examineTemp.workflowNote
  2936. }}
  2937. }
  2938. ExecDataByConfig(this.requestParam).then(response => {
  2939. this.isokDisable = false
  2940. if (response.msg !== 'fail') {
  2941. this.get_table_data()
  2942. this.dialogFormVisible_Examine = false
  2943. this.dialogFormVisible_See = false
  2944. this.statueReason = false
  2945. this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
  2946. } else {
  2947. failproccess(response, this.$notify)
  2948. }
  2949. })
  2950. }
  2951. })
  2952. },
  2953. handleExamine6(row) {
  2954. console.log('点击了财务审核')
  2955. if (row == undefined) {
  2956. this.examineTemp = this.seeTemp
  2957. this.$set(this.seeTemp, 'statue', 1)
  2958. this.$set(this.seeTemp, 'workflowNote', '')
  2959. } else {
  2960. this.examineTemp = Object.assign({}, row)
  2961. this.$set(this.examineTemp, 'workflowNote', '')
  2962. this.$set(this.examineTemp, 'statue', 1)
  2963. }
  2964. this.dialogStatus = 'examine6'
  2965. this.dialogFormVisible_Examine = true
  2966. this.statueReason = false
  2967. },
  2968. createExamineData6() {
  2969. console.log('点击了财务审核')
  2970. this.isokDisable = true
  2971. setTimeout(() => {
  2972. this.isokDisable = false
  2973. }, 10000)
  2974. this.$refs['examineTemp'].validate(valid => {
  2975. if (valid) {
  2976. this.requestParam = {}
  2977. this.requestParam.name = 'partpurchaseFinanceId'
  2978. this.requestParam.parammaps = {}
  2979. this.requestParam.parammaps.id = this.examineTemp.id
  2980. if (this.examineTemp.statue == 1) {
  2981. this.requestParam.parammaps.statue = 13
  2982. } else if (this.examineTemp.statue == 2) {
  2983. this.requestParam.parammaps.statue = 14
  2984. }
  2985. this.requestParam.parammaps.financeId = Cookies.get('employeid')
  2986. this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
  2987. PostDataByName(this.requestParam).then(response => {
  2988. console.log('审核确认发送参数', this.requestParam)
  2989. this.isokDisable = false
  2990. if (response.msg !== 'fail') {
  2991. this.get_table_data()
  2992. this.dialogFormVisible_Examine = false
  2993. this.dialogFormVisible_See = false
  2994. this.statueReason = false
  2995. this.$notify({
  2996. title: '成功',
  2997. message: '审核成功',
  2998. type: 'success',
  2999. duration: 2000
  3000. })
  3001. } else {
  3002. failproccess(response, this.$notify)
  3003. }
  3004. })
  3005. }
  3006. })
  3007. },
  3008. handleExamine7(row) {
  3009. console.log('点击了奶厅职能中心审核')
  3010. if (row == undefined) {
  3011. this.examineTemp = this.seeTemp
  3012. this.$set(this.seeTemp, 'statue', 1)
  3013. this.$set(this.seeTemp, 'workflowNote', '')
  3014. } else {
  3015. this.examineTemp = Object.assign({}, row)
  3016. this.$set(this.examineTemp, 'workflowNote', '')
  3017. this.$set(this.examineTemp, 'statue', 1)
  3018. }
  3019. this.dialogStatus = 'examine7'
  3020. this.dialogFormVisible_Examine = true
  3021. this.statueReason = false
  3022. },
  3023. createExamineData7() {
  3024. console.log('点击了奶厅职能中心审核')
  3025. this.isokDisable = true
  3026. setTimeout(() => {
  3027. this.isokDisable = false
  3028. }, 10000)
  3029. this.$refs['examineTemp'].validate(valid => {
  3030. if (valid) {
  3031. this.requestParam = {}
  3032. this.requestParam.name = 'partpurchasePosition'
  3033. this.requestParam.parammaps = {}
  3034. this.requestParam.parammaps.id = this.examineTemp.id
  3035. if (this.examineTemp.statue == 1) {
  3036. this.requestParam.parammaps.statue = 15
  3037. } else if (this.examineTemp.statue == 2) {
  3038. this.requestParam.parammaps.statue = 16
  3039. }
  3040. this.requestParam.parammaps.empId = Cookies.get('employeid')
  3041. this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
  3042. PostDataByName(this.requestParam).then(response => {
  3043. console.log('审核确认发送参数', this.requestParam)
  3044. this.isokDisable = false
  3045. if (response.msg !== 'fail') {
  3046. this.get_table_data()
  3047. this.dialogFormVisible_Examine = false
  3048. this.dialogFormVisible_See = false
  3049. this.statueReason = false
  3050. this.$notify({
  3051. title: '成功',
  3052. message: '审核成功',
  3053. type: 'success',
  3054. duration: 2000
  3055. })
  3056. } else {
  3057. failproccess(response, this.$notify)
  3058. }
  3059. })
  3060. }
  3061. })
  3062. },
  3063. handle_specialSubscription(){
  3064. this.getdataListSee.parammaps.id = ''
  3065. this.resetCreateTemp()
  3066. this.listAdd = []
  3067. this.createTemp.purchaseType = '1'
  3068. this.edit = 1
  3069. this.getDepartParam.parammaps.pastureId = this.createTemp.pastureId
  3070. this.getCreateDepartDownList()
  3071. this.dialogStatus = 'special'
  3072. this.createTemp.purchaseType = '3'
  3073. this.dialogFormVisible2 = true
  3074. this.$nextTick(() => {
  3075. this.$refs['createTemp'].clearValidate()
  3076. })
  3077. if(this.createTemp.purchaseType == 1){
  3078. this.getBigPartpurchase(parseInt(this.createTemp.purchaseType))
  3079. }else{
  3080. this.getCreateNumber()
  3081. }
  3082. },
  3083. getProviderList(){
  3084. let data = {
  3085. "name":"getProviderList",
  3086. "page":1,"offset":1,"pagecount":0,
  3087. "returntype":"Map","parammaps":{"providerName":""}
  3088. }
  3089. GetDataByName(data).then(response => {
  3090. if (response.data.list !== null) {
  3091. this.providerList = response.data.list
  3092. }else{
  3093. this.providerList = []
  3094. }
  3095. })
  3096. },
  3097. changeType(){
  3098. if(this.createTemp.purchaseType == 1){
  3099. // setTimeout(()=>{
  3100. this.getBigPartpurchase(parseInt(this.createTemp.purchaseType))
  3101. // },30000)
  3102. }else{
  3103. this.createTemp.orderNumber = ''
  3104. this.getCreateNumber()
  3105. }
  3106. this.listAdd = []
  3107. this.$set(this.createTemp,'providerId','')
  3108. this.$set(this.createTemp,'providerName','')
  3109. },
  3110. special_dialog_save(){
  3111. console.log('特殊申购保存')
  3112. this.isokDisable = true
  3113. setTimeout(() => {
  3114. this.isokDisable = false
  3115. }, 1000)
  3116. this.$refs['createTemp'].validate(valid => {
  3117. if (valid) {
  3118. console.log(this.listAdd)
  3119. if (this.createTemp.orderNumber == '' || this.createTemp.orderNumber == null || this.createTemp.orderNumber == undefined) {
  3120. GetDataByName(this.getParmCreateNumber).then(response => {
  3121. this.$nextTick(() => {
  3122. console.log('新增申购单号', response.data.list[0].orderCode)
  3123. this.createTemp.orderNumber = response.data.list[0].orderCode
  3124. this.$forceUpdate()
  3125. this.special_dialog_saveSave()
  3126. })
  3127. })
  3128. } else {
  3129. this.special_dialog_saveSave()
  3130. }
  3131. }
  3132. })
  3133. },
  3134. special_dialog_saveSave(){
  3135. if (this.listAdd.length !== 0) {
  3136. for (var j = 0; j < this.listAdd.length; j++) {
  3137. console.log(this.listAdd[j].amount)
  3138. if (this.listAdd[j].amount == null || this.listAdd[j].amount === '') {
  3139. this.$message({ type: 'warning', message: '请检查申购数量是否未填写', duration: 2000 })
  3140. return false
  3141. } else {
  3142. var rulesAmount = /^[1-9]\d*$/
  3143. if (!rulesAmount.test(this.listAdd[j].amount)) {
  3144. this.$message({ type: 'error', message: '申购数量请输入正整数', duration: 2000 })
  3145. return false
  3146. }
  3147. }
  3148. if(this.createTemp.purchaseType == '2'){
  3149. if (this.listAdd[j].price == '') {
  3150. this.$message({ type: 'warning', message: '请检查单价是否为空', duration: 2000 })
  3151. return false
  3152. } else {
  3153. if (parseFloat(this.listAdd[j].price) == 0) {
  3154. this.$message({ type: 'warning', message: '价格请输入正数,最多保留小数点后五位', duration: 2000 })
  3155. return false
  3156. } else {
  3157. if(this.listAdd[j].contractId == '' || this.listAdd[j].contractId == undefined || parseFloat(this.listAdd[j].contractId) == 0 || parseFloat(this.listAdd[j].contractId) < 0){
  3158. // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
  3159. var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
  3160. if (rulesPrice.test(this.listAdd[j].price) == false) {
  3161. this.$message({ type: 'error', message: '价格请输入正数,最多保留小数点后五位', duration: 2000 })
  3162. return false
  3163. }
  3164. }
  3165. }
  3166. }
  3167. }
  3168. }
  3169. if(this.createTemp.purchaseType == '1' || this.createTemp.purchaseType == '3' ){
  3170. if(this.createTemp.providerId == ''){
  3171. this.$message({ type: 'error', message: '请选择供应商', duration: 2000 })
  3172. return false
  3173. }
  3174. }else{
  3175. // if(this.createTemp.providerId == ''){
  3176. // this.$message({ type: 'error', message: '请选择供应商', duration: 2000 })
  3177. // return false
  3178. // }
  3179. if(this.createTemp.funderId == ''){
  3180. this.$message({ type: 'error', message: '请选择垫付人', duration: 2000 })
  3181. return false
  3182. }
  3183. }
  3184. if(this.createTemp.purchaseType == 1){
  3185. if(this.createTemp.markBackend){
  3186. console.log('有数据-走新保存',this.listAdd)
  3187. let url = 'authdata/partpurchase/edit'
  3188. let dataArr = []
  3189. for(let i =0 ;i<this.listAdd.length;i++){
  3190. if(this.listAdd[i].myId !== undefined){
  3191. this.listAdd[i].id = 0
  3192. }
  3193. let obj = {
  3194. "id": parseFloat(this.listAdd[i].id),
  3195. "bigId": parseFloat(this.createTemp.bigId),
  3196. "pastureId": parseFloat(this.listAdd[i].pastureId),
  3197. "partId": parseFloat(this.listAdd[i].partId),
  3198. "partCode": this.listAdd[i].partCode.toString(),
  3199. "partName": this.listAdd[i].partName.toString(),
  3200. "specification": this.listAdd[i].specification,
  3201. "amount": parseFloat(this.listAdd[i].amount),
  3202. "unit": this.listAdd[i].unit.toString(),
  3203. "brandId": parseFloat(this.listAdd[i].brandId),
  3204. "purpose": this.listAdd[i].purpose.toString(),
  3205. "price": this.listAdd[i].price.toString(),
  3206. "lifeCycle": this.listAdd[i].lifeCycle.toString(),
  3207. "contractVarianceItem": this.listAdd[i].contractVarianceItem.toString(),
  3208. "departmentId": this.createTemp.departmentId.toString(),
  3209. "date": parseTime(this.createTemp.createTime, '{y}-{m}-{d} {h}:{i}:{s}').toString(),
  3210. "employeId": parseFloat(this.createTemp.employeId)
  3211. }
  3212. if(this.listAdd[i].contractId){
  3213. this.$set(this.listAdd[i],'contractId',this.listAdd[i].contractId.toString())
  3214. }else{
  3215. this.$set(this.listAdd[i],'contractId','')
  3216. }
  3217. if(this.listAdd[i].storageAmount){
  3218. obj.storageAmount = parseFloat(this.listAdd[i].storageAmount)
  3219. }else{
  3220. obj.storageAmount = 0
  3221. }
  3222. if(this.listAdd[i].reject){
  3223. obj.reject = this.listAdd[i].reject.toString()
  3224. }else{
  3225. obj.reject = ''
  3226. }
  3227. if(this.listAdd[i].explain){
  3228. obj.explain = this.listAdd[i].explain.toString()
  3229. }else{
  3230. obj.explain = ''
  3231. }
  3232. dataArr.push(obj)
  3233. }
  3234. let data = dataArr
  3235. postJson(url, data).then(response => {
  3236. if (response.msg !== 'fail') {
  3237. this.get_table_data()
  3238. this.dialogFormVisible2 = false
  3239. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  3240. } else {
  3241. failproccess(response, this.$notify)
  3242. }
  3243. })
  3244. }else{
  3245. console.log('无数据-走原有保存')
  3246. this.special_saveSave()
  3247. }
  3248. }else{
  3249. console.log('赠品-走原有保存')
  3250. this.special_saveSave()
  3251. }
  3252. } else {
  3253. this.$message({
  3254. title: '',
  3255. message: '请选择备件',
  3256. type: 'warning',
  3257. duration: 2000
  3258. })
  3259. return false
  3260. }
  3261. },
  3262. special_saveSave(){
  3263. let url = 'authdata/spare/parts/requisitions'
  3264. for(let i=0;i<this.listAdd.length;i++){
  3265. this.$set(this.listAdd[i],'contractId',String(this.listAdd[i].contractId))
  3266. this.$set(this.listAdd[i],'departmentId',String(this.createTemp.departmentId))
  3267. this.$set(this.listAdd[i],'date',parseTime(this.createTemp.createTime, '{y}-{m}-{d} {h}:{i}:{s}'))
  3268. this.$set(this.listAdd[i],'employeId',String(this.createTemp.employeId))
  3269. }
  3270. let data = {
  3271. "pastureId": parseInt(this.createTemp.pastureId),
  3272. "departmentId": parseInt(this.createTemp.departmentId),
  3273. 'departmentName':this.createTemp.departmentName,
  3274. "orderNumber": this.createTemp.orderNumber,
  3275. "createTime": parseTime(this.createTemp.createTime, '{y}-{m}-{d} {h}:{i}:{s}'),
  3276. "employeId": this.createTemp.employeId,
  3277. "providerName": this.createTemp.providerName,
  3278. "purchaseType": parseInt(this.createTemp.purchaseType),
  3279. "spot_list":this.listAdd
  3280. }
  3281. if(this.createTemp.purchaseType == '1' || this.createTemp.purchaseType == '3'){
  3282. data.providerId = this.createTemp.providerId
  3283. data.providerName = this.providerList.find(obj => obj.id == this.createTemp.providerId).providerName
  3284. }
  3285. if(this.createTemp.funderId){
  3286. data.funderId = this.createTemp.funderId
  3287. }
  3288. postJson(url, data).then(response => {
  3289. if (response.msg !== 'fail') {
  3290. this.get_table_data()
  3291. this.dialogFormVisible2 = false
  3292. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  3293. } else {
  3294. failproccess(response, this.$notify)
  3295. }
  3296. })
  3297. return true
  3298. },
  3299. // 合单
  3300. form_edit1(row){
  3301. this.modifyTemp = Object.assign({}, row) // copy obj
  3302. this.dialogStatus = 'update'
  3303. this.dialogFormVisible_modify = true
  3304. this.modifylist = []
  3305. this.getdataListSee.parammaps.id = row.id
  3306. this.getSeeList()
  3307. },
  3308. partReject(row){
  3309. // 驳回
  3310. this.$prompt('请输入驳回原因:', '驳回', {
  3311. confirmButtonText: '确定',
  3312. cancelButtonText: '取消',
  3313. inputValidator:value =>{
  3314. if(value === 'null' || value === null || value === 'undefined' || value === undefined || value === ''){
  3315. return false
  3316. }
  3317. },
  3318. // inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
  3319. inputErrorMessage: '请输入驳回原因'
  3320. }).then(({ value }) => {
  3321. let data = {
  3322. name:'editPartpurchaseReject',
  3323. parammaps:{
  3324. reject:1,
  3325. explain:value,
  3326. id:row.id
  3327. }
  3328. }
  3329. PostDataByName(data).then(response => {
  3330. console.log('审核确认发送参数', this.requestParam)
  3331. this.isokDisable = false
  3332. if (response.msg !== 'fail') {
  3333. this.get_table_data()
  3334. this.$notify({
  3335. title: '成功',
  3336. message: '驳回成功',
  3337. type: 'success',
  3338. duration: 2000
  3339. })
  3340. this.getdataListSee.parammaps.id = this.modifyTemp.id
  3341. this.getSeeList()
  3342. } else {
  3343. failproccess(response, this.$notify)
  3344. }
  3345. })
  3346. }).catch(() => {
  3347. this.$message({
  3348. type: 'info',
  3349. message: '取消输入'
  3350. })
  3351. })
  3352. },
  3353. form_modify(){
  3354. // 提交
  3355. console.log('点击了库管审核')
  3356. this.isokDisable = true
  3357. setTimeout(() => {
  3358. this.isokDisable = false
  3359. }, 1000)
  3360. this.requestParam = {}
  3361. this.requestParam.name = 'partpurchaseCharge'
  3362. this.requestParam.parammaps = {}
  3363. this.requestParam.parammaps.id = this.modifyTemp.id
  3364. this.requestParam.parammaps.statue = 3
  3365. this.requestParam.parammaps.empId = Cookies.get('employeid')
  3366. PostDataByName(this.requestParam).then(response => {
  3367. console.log('提交确认发送参数', this.requestParam)
  3368. this.isokDisable = false
  3369. if (response.msg !== 'fail') {
  3370. this.get_table_data()
  3371. this.dialogFormVisible_modify = false
  3372. this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
  3373. } else {
  3374. failproccess(response, this.$notify)
  3375. }
  3376. })
  3377. },
  3378. form_modify1(row){
  3379. // 提交
  3380. this.$confirm('确认提交吗?', '', {
  3381. confirmButtonText: '确定',
  3382. cancelButtonText: '取消',
  3383. type: 'warning'
  3384. }).then(() => {
  3385. console.log('点击了库管审核')
  3386. this.isokDisable = true
  3387. setTimeout(() => {
  3388. this.isokDisable = false
  3389. }, 1000)
  3390. this.requestParam = {}
  3391. this.requestParam.name = 'partpurchaseCharge'
  3392. this.requestParam.parammaps = {}
  3393. this.requestParam.parammaps.id = row.id
  3394. this.requestParam.parammaps.statue = 3
  3395. this.requestParam.parammaps.empId = Cookies.get('employeid')
  3396. PostDataByName(this.requestParam).then(response => {
  3397. console.log('提交确认发送参数', this.requestParam)
  3398. this.isokDisable = false
  3399. if (response.msg !== 'fail') {
  3400. this.get_table_data()
  3401. this.dialogFormVisible_modify = false
  3402. this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
  3403. } else {
  3404. failproccess(response, this.$notify)
  3405. }
  3406. })
  3407. }).catch(() => {
  3408. this.$message({
  3409. type: 'info',
  3410. message: '已取消'
  3411. });
  3412. })
  3413. },
  3414. handle_milkSubscription(){
  3415. // 奶厅申购
  3416. this.textMap.create = '奶厅申购'
  3417. this.dialogStatus = 'create'
  3418. this.isMilk = true
  3419. this.seepart.getdataListParm.parammaps.partName = ''
  3420. this.resetCreateTemp()
  3421. this.edit = 1
  3422. this.getDepartParam.parammaps.pastureId = this.createTemp.pastureId
  3423. this.getCreateDepartDownList()
  3424. this.dialogStatus = 'create'
  3425. this.dialogFormVisible = true
  3426. this.dialogFormVisible_seepart = false
  3427. this.getCreateNumber()
  3428. this.createTemp.markBackend = false
  3429. this.$nextTick(() => {
  3430. this.$refs['createTemp'].clearValidate()
  3431. })
  3432. }
  3433. }
  3434. }
  3435. </script>
  3436. <style lang="scss" scoped>
  3437. .pagination-container{
  3438. display: block !important;
  3439. }
  3440. /deep/ .el-badge__content.is-fixed{
  3441. z-index: 1;
  3442. }
  3443. </style>
  3444. <style lang="scss">
  3445. .el-step__head.is-success {
  3446. color: #409EFF;
  3447. border-color: #409EFF;
  3448. }
  3449. .el-step__title.is-success{
  3450. color: #409EFF;
  3451. }
  3452. .el-step__head.is-process{
  3453. color: #409EFF;
  3454. border-color: #409EFF;
  3455. .el-step__icon.is-text{
  3456. background: #409EFF;
  3457. color: #fff;
  3458. }
  3459. }
  3460. .step-row{
  3461. color: #000;
  3462. }
  3463. </style>