index.vue 181 KB

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