index1.vue 131 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904
  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. <el-tabs v-model="activeName" @tab-click="handleClick">
  8. <el-tab-pane label="备件出库" name="first">
  9. <div class="filter-container">
  10. <el-select v-model="getdataListParm.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item" @change="changePastureName">
  11. <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
  12. </el-select>
  13. <el-input v-model="getdataListParm.parammaps.useForm" placeholder="出库单号" style="width: 200px;" class="filter-item" />
  14. <el-select v-model="getdataListParm.parammaps.useType" clearable placeholder="出库方式" class="filter-item" style="width: 120px;">
  15. <el-option v-for="item in useTypes" :key="item.id" :label="item.name" :value="item.id" />
  16. </el-select>
  17. <el-select v-model="getdataListParm.parammaps.departmentId" style="width: 140px;" placeholder="领用部门" class="filter-item" clearable>
  18. <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
  19. </el-select>
  20. <el-select v-model="getdataListParm.parammaps.easStatus" style="width: 150px;" clearable placeholder="EAS同步状态" class="filter-item">
  21. <el-option v-for="item in easStatus.easStatusList" :key="item.id" :label="item.name" :value="item.id" />
  22. </el-select>
  23. <el-date-picker
  24. ref="inputDatetime"
  25. v-model="getdataListParm.parammaps.inputDatetime"
  26. clearable
  27. class="inputDatetime"
  28. type="datetimerange"
  29. style="width: 250px;top:-3px;"
  30. format="yyyy-MM-dd"
  31. value-format="yyyy-MM-dd"
  32. range-separator="至"
  33. start-placeholder="开始日期"
  34. end-placeholder="结束日期"
  35. />
  36. <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
  37. <div>
  38. <el-button v-if="isOutStockAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
  39. <el-button v-if="isReceiveTemplate" v-waves class="filter-item" type="info" icon="el-icon-download" @click="handleDownloadTemp"> 模板 </el-button>
  40. <el-upload style="display: inline-block;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImportExcel" :on-success="handleImportExcelSuccess">
  41. <el-button v-if="isOutStockImport" v-waves class="filter-item" type="warning" icon="el-icon-upload2">导入</el-button>
  42. </el-upload>
  43. <el-button v-if="isOutStockExport" class="filter-item" style="margin-left: 10px;" type="success" icon="el-icon-edit" @click="handleDownload">导出</el-button>
  44. <!-- <el-button class="filter-item" style="margin-left: 10px;" type="danger" icon="el-icon-upload2" @click="handleDownloadEas">导出EAS</el-button> -->
  45. <el-button class="filter-item" style="margin-left: 10px;" type="danger" icon="el-icon-upload2" @click="handleDownloadEas1">导出EAS</el-button>
  46. <el-button v-if="isEasSynchronization" class="filter-item" type="primary" style="float: right;" @click="handleEAS">EAS同步</el-button>
  47. </div>
  48. </div>
  49. <el-table
  50. :key="tableKey"
  51. v-loading="listLoading"
  52. element-loading-text="给我一点时间"
  53. :data="list"
  54. border
  55. fit
  56. highlight-current-row
  57. style="width: 100%;"
  58. :row-style="rowStyle"
  59. :cell-style="cellStyle"
  60. class="elTable table-fixed"
  61. @sort-change="tableSort"
  62. >
  63. <el-table-column label="序号" align="center" type="index" width="50px">
  64. <template slot-scope="scope">
  65. <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
  66. </template>
  67. </el-table-column>
  68. <el-table-column label="出库单号" align="center" min-width="150px">
  69. <template slot-scope="scope">
  70. <span>{{ scope.row.useForm }}</span>
  71. </template>
  72. </el-table-column>
  73. <el-table-column label="领用部门" min-width="100px" align="center">
  74. <template slot-scope="scope">
  75. <span>{{ scope.row.departmentName }}</span><br>
  76. </template>
  77. </el-table-column>
  78. <el-table-column label="牧场" min-width="100px" align="center">
  79. <template slot-scope="scope">
  80. <span>{{ scope.row.pastureName }}</span><br>
  81. </template>
  82. </el-table-column>
  83. <el-table-column sortable prop="partKind" label="备件种类数" align="center" min-width="100px">
  84. <template slot-scope="scope">
  85. <span>{{ scope.row.partKind }}</span>
  86. </template>
  87. </el-table-column>
  88. <el-table-column label="出库方式" align="center" min-width="100px" :formatter="useType" />
  89. <el-table-column label="录入人" min-width="100px" align="center">
  90. <template slot-scope="scope">
  91. <span>{{ scope.row.empname }}</span><br>
  92. </template>
  93. </el-table-column>
  94. <el-table-column label="出库日期" sortable prop="creatTime" min-width="100px" align="center" />
  95. <el-table-column label="EAS同步状态" min-width="130px" align="center">
  96. <template slot-scope="scope">
  97. <span>{{ scope.row.easStatus }}</span><br>
  98. </template>
  99. </el-table-column>
  100. <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width" fixed="right">
  101. <template slot-scope="{row}">
  102. <el-button v-if="isOutStockSee" type="primary" size="mini" @click="form_see(row)">查看</el-button>
  103. <!-- <el-button v-if="isStorageSee" type="success" size="mini" @click="form_edit(row)">编辑</el-button> -->
  104. <el-button v-if="isOutStockDelete && row.useType !== 4" style="display:inline-block" type="danger" size="mini" @click="handleDelate(row)">删除</el-button>
  105. <el-button v-else type="danger" size="mini" style="display:none" @click="handleDelate(row)">删除</el-button>
  106. </template>
  107. </el-table-column>
  108. </el-table>
  109. <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="getList" />
  110. </el-tab-pane>
  111. <el-tab-pane label="出库记录" name="second">
  112. <div class="filter-container">
  113. <el-select v-model="getdataListParm2.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
  114. <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
  115. </el-select>
  116. <el-input v-model="getdataListParm2.parammaps.useForm" placeholder="出库单号" style="width: 200px;" class="filter-item" />
  117. <el-input v-model="getdataListParm2.parammaps.partCode" placeholder="备件编号" style="width: 200px;" class="filter-item" />
  118. <el-input v-model="getdataListParm2.parammaps.partName" placeholder="备件名称" style="width: 200px;" class="filter-item" />
  119. <el-select v-model="getdataListParm2.parammaps.providerId" filterable clearable style="width: 140px;" placeholder="供应商" class="filter-item">
  120. <el-option v-for="item in findAllProvider" :key="item.id" :label="item.name" :value="item.id" />
  121. </el-select>
  122. <el-select v-model="getdataListParm2.parammaps.departmentId" style="width: 140px;" placeholder="领用部门" class="filter-item" clearable>
  123. <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
  124. </el-select>
  125. <tree-select
  126. class="typeSelect"
  127. :height="150"
  128. :width="250"
  129. size="small"
  130. clearable
  131. :data="parentType"
  132. :disabled="disabled2"
  133. :placeholder="placeholder"
  134. style="display:inline-block;"
  135. :default-props="defaultProps"
  136. :node-key="nodeKey"
  137. :checked-keys="defaultCheckedKeys"
  138. @popoverHide="popoverHide"
  139. />
  140. <el-input v-model="getdataListParm2.parammaps.eqName" placeholder="设备名称" style="width: 200px;" class="filter-item" />
  141. <el-date-picker ref="inputDatetime2" v-model="getdataListParm2.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
  142. <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search2">搜索</el-button>
  143. <el-button v-if="isOutStockExport" class="filter-item" style="margin-left: 10px;" type="success" icon="el-icon-edit" @click="handleDownload2">导出</el-button>
  144. </div>
  145. <el-table
  146. :key="tableKey2"
  147. v-loading="listLoading2"
  148. element-loading-text="给我一点时间"
  149. :data="list2"
  150. border
  151. fit
  152. highlight-current-row
  153. style="width: 100%;"
  154. :row-style="rowStyle"
  155. :cell-style="cellStyle"
  156. class="elTable table-fixed"
  157. @sort-change="tableSort"
  158. >
  159. <el-table-column label="序号" align="center" type="index" width="50px">
  160. <template slot-scope="scope">
  161. <span>{{ scope.$index + (pageNum2-1) * pageSize2 + 1 }}</span>
  162. </template>
  163. </el-table-column>
  164. <el-table-column label="牧场" min-width="130px" align="center">
  165. <template slot-scope="scope">
  166. <span>{{ scope.row.pastureName }}</span><br>
  167. </template>
  168. </el-table-column>
  169. <el-table-column label="出库单号" align="center" min-width="150px">
  170. <template slot-scope="scope">
  171. <span>{{ scope.row.useForm }}</span>
  172. </template>
  173. </el-table-column>
  174. <el-table-column label="备件编号" min-width="150px" align="center">
  175. <template slot-scope="scope">
  176. <span>{{ scope.row.partCode }}</span><br>
  177. </template>
  178. </el-table-column>
  179. <el-table-column label="备件名称" align="center" min-width="150px">
  180. <template slot-scope="scope">
  181. <span>{{ scope.row.partName }}</span>
  182. </template>
  183. </el-table-column>
  184. <el-table-column label="备件规格" min-width="130px" align="center">
  185. <template slot-scope="scope">
  186. <span>{{ scope.row.specification }}</span><br>
  187. </template>
  188. </el-table-column>
  189. <el-table-column label="备件品牌" min-width="130px" align="center">
  190. <template slot-scope="scope">
  191. <span>{{ scope.row.brandName }}</span><br>
  192. </template>
  193. </el-table-column>
  194. <el-table-column label="计量单位" align="center" min-width="100px">
  195. <template slot-scope="scope">
  196. <span>{{ scope.row.unit }}</span>
  197. </template>
  198. </el-table-column>
  199. <el-table-column label="供应商" min-width="130px" align="center">
  200. <template slot-scope="scope">
  201. <span>{{ scope.row.providerName }}</span><br>
  202. </template>
  203. </el-table-column>
  204. <el-table-column label="设备名称" align="center" min-width="130px">
  205. <template slot-scope="scope">
  206. <span>{{ scope.row.eqName }}</span>
  207. </template>
  208. </el-table-column>
  209. <el-table-column label="设备内部编号" min-width="90px" align="center">
  210. <template slot-scope="scope">
  211. <span>{{ scope.row.eqCode }}</span><br>
  212. </template>
  213. </el-table-column>
  214. <el-table-column label="费用类型" align="center" min-width="130px">
  215. <template slot-scope="scope">
  216. <span>{{ scope.row.useTypeV }}</span>
  217. </template>
  218. </el-table-column>
  219. <el-table-column label="库位" align="center" min-width="130px">
  220. <template slot-scope="scope">
  221. <span>{{ scope.row.warehoseCode }}</span>
  222. </template>
  223. </el-table-column>
  224. <el-table-column label="期初库存" sortable prop="reportery" align="center" min-width="130px">
  225. <template slot-scope="scope">
  226. <span>{{ scope.row.reportery }}</span>
  227. </template>
  228. </el-table-column>
  229. <el-table-column label="出库数量" sortable prop="checkoutNumber" align="center" min-width="130px">
  230. <template slot-scope="scope">
  231. <span>{{ scope.row.checkoutNumber }}</span>
  232. </template>
  233. </el-table-column>
  234. <el-table-column label="单价" sortable prop="price" min-width="90px" align="center">
  235. <template slot-scope="scope">
  236. <span>{{ scope.row.price }}</span><br>
  237. </template>
  238. </el-table-column>
  239. <el-table-column label="总价" sortable prop="sumPrice" min-width="90px" align="center">
  240. <template slot-scope="scope">
  241. <span>{{ scope.row.sumPrice }}</span><br>
  242. </template>
  243. </el-table-column>
  244. <el-table-column label="领用部门" align="center" min-width="90px">
  245. <template slot-scope="scope">
  246. <span>{{ scope.row.departmentName }}</span>
  247. </template>
  248. </el-table-column>
  249. <el-table-column label="领用人" align="center" min-width="90px">
  250. <template slot-scope="scope">
  251. <span>{{ scope.row.appliname }}</span>
  252. </template>
  253. </el-table-column>
  254. <el-table-column label="录入人" align="center" min-width="90px">
  255. <template slot-scope="scope">
  256. <span>{{ scope.row.empname }}</span>
  257. </template>
  258. </el-table-column>
  259. <el-table-column label="出库日期" sortable prop="creatTime" min-width="120px" align="center" />
  260. <el-table-column label="备注" min-width="130px" align="center">
  261. <template slot-scope="scope">
  262. <span>{{ scope.row.note }}</span><br>
  263. </template>
  264. </el-table-column>
  265. </el-table>
  266. <pagination v-show="total2>0" :total="total2" :page.sync="getdataListParm2.offset" :limit.sync="getdataListParm2.pagecount" @pagination="getList2" />
  267. </el-tab-pane>
  268. </el-tabs>
  269. <!-- 弹出层新增or修改 -->
  270. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="90%">
  271. <div class="app-add">
  272. <el-form
  273. ref="createTemp"
  274. :rules="rules"
  275. :model="createTemp"
  276. label-position="right"
  277. label-width="100px"
  278. style="width: 90%;margin:0 auto;"
  279. >
  280. <el-row>
  281. <el-col :span="8">
  282. <el-form-item label="出库单号:" prop="useForm">
  283. <el-input ref="useForm" v-model="createTemp.useForm" disabled />
  284. </el-form-item>
  285. </el-col>
  286. <el-col :span="8">
  287. <el-form-item label="牧场:" prop="pastureId">
  288. <el-select v-model="createTemp.pastureId" placeholder="牧场" class="filter-item" style="width: 100%;" @change="changePasture">
  289. <el-option
  290. v-for="item in findAllPasture"
  291. :key="item.id"
  292. :label="item.name"
  293. :value="item.id"
  294. />
  295. </el-select>
  296. </el-form-item>
  297. </el-col>
  298. <el-col :span="8">
  299. <el-form-item label="录入人:" prop="empId">
  300. <el-select v-model="createTemp.empId" placeholder="录入人" class="filter-item" style="width: 100%;">
  301. <el-option
  302. v-for="item in findAllEmploye"
  303. :key="item.id"
  304. :label="item.name"
  305. :value="item.id"
  306. />
  307. </el-select>
  308. </el-form-item>
  309. </el-col>
  310. </el-row>
  311. <el-row>
  312. <el-col :span="8">
  313. <el-form-item label="出库方式:" prop="useType">
  314. <el-radio-group v-model="createTemp.useType" @change="changeStorageType">
  315. <el-radio v-if="isOutStockMethod1" v-model="createTemp.useType" :label="0" checked>领用出库</el-radio>
  316. <el-radio v-if="isOutStockMethod2" v-model="createTemp.useType" :label="1">手动出库</el-radio>
  317. <el-radio v-if="isOutStockMethod3" v-model="createTemp.useType" :label="2">调拨出库</el-radio>
  318. <el-radio v-if="isOutStockMethod4" v-model="createTemp.useType" :label="5">报废出库</el-radio>
  319. </el-radio-group>
  320. </el-form-item>
  321. </el-col>
  322. <el-col v-if="No1" :span="8">
  323. <el-form-item label="领用单号:" prop="applyCode">
  324. <el-autocomplete
  325. v-model="orderPart.applyCode"
  326. value-key="name"
  327. class="inline-input"
  328. :fetch-suggestions="getNumber"
  329. placeholder="请输入领用单号"
  330. style="width:100%"
  331. @select="changeApplyCode"
  332. >
  333. <template slot-scope="{ item }">
  334. <div class="name" style="display: inline;">{{ item.applyCode }}</div>
  335. <div class="name" style="display: inline;">{{ item.departmentName }}</div>
  336. </template>
  337. </el-autocomplete>
  338. </el-form-item>
  339. </el-col>
  340. <el-col v-if="No1" :span="8">
  341. <el-form-item label="领用部门:" prop="departmentId">
  342. <el-select v-model="createTemp.departmentId" placeholder="领用部门" class="filter-item" style="width:100%" disabled @change="changeDepart">
  343. <el-option
  344. v-for="item in createDepartList"
  345. :key="item.id"
  346. :label="item.name"
  347. :value="item.id"
  348. />
  349. </el-select>
  350. </el-form-item>
  351. </el-col>
  352. <el-col v-if="No2" :span="8">
  353. <el-form-item label="领用部门:" prop="departmentId">
  354. <el-select v-model="createTemp.departmentId" placeholder="领用部门" class="filter-item" style="width:100%" @change="changeDepart">
  355. <el-option
  356. v-for="item in createDepartList"
  357. :key="item.id"
  358. :label="item.name"
  359. :value="item.id"
  360. />
  361. </el-select>
  362. </el-form-item>
  363. </el-col>
  364. <el-col v-if="isReceiveTime2" :span="8">
  365. <el-form-item label="出库日期:" prop="receiveTime">
  366. <el-date-picker
  367. v-model="createTemp.receiveTime"
  368. :picker-options="pickerOptions2"
  369. type="date"
  370. placeholder="出库日期"
  371. format="yyyy-MM-dd"
  372. value-format="yyyy-MM-dd"
  373. style="width: 100%;"
  374. />
  375. </el-form-item>
  376. </el-col>
  377. <el-col v-if="isReceiveTime2" :span="8">
  378. <el-form-item label="备注:" prop="note">
  379. <el-input ref="note" v-model="createTemp.note" />
  380. </el-form-item>
  381. </el-col>
  382. </el-row>
  383. <el-row>
  384. <el-col v-if="No1" :span="8">
  385. <el-form-item label="领用人:" prop="applicatId">
  386. <el-select ref="applicatId" v-model="createTemp.applicatId" filterable placeholder="领用人" class="filter-item" style="width:100%" disabled>
  387. <el-option
  388. v-for="item in findAllEmploye"
  389. :key="item.id"
  390. :label="item.name"
  391. :value="item.id"
  392. />
  393. </el-select>
  394. </el-form-item>
  395. </el-col>
  396. <el-col v-if="No2" :span="8">
  397. <el-form-item label="领用人:" prop="applicatId">
  398. <el-select ref="applicatId" v-model="createTemp.applicatId" filterable placeholder="领用人" class="filter-item" style="width:100%">
  399. <el-option
  400. v-for="item in findAllEmploye"
  401. :key="item.id"
  402. :label="item.name"
  403. :value="item.id"
  404. />
  405. </el-select>
  406. </el-form-item>
  407. </el-col>
  408. <el-col v-if="isReceiveTime" :span="8">
  409. <el-form-item label="出库日期:" prop="receiveTime">
  410. <el-date-picker
  411. v-model="createTemp.receiveTime"
  412. :picker-options="pickerOptions1"
  413. type="date"
  414. placeholder="出库日期"
  415. format="yyyy-MM-dd"
  416. value-format="yyyy-MM-dd"
  417. style="width: 100%;"
  418. />
  419. </el-form-item>
  420. </el-col>
  421. <el-col v-if="isReceiveTime" :span="8">
  422. <el-form-item label="备注:" prop="note">
  423. <el-input ref="note" v-model="createTemp.note" />
  424. </el-form-item>
  425. </el-col>
  426. </el-row>
  427. <el-row v-if="No2">
  428. <el-col :span="10">
  429. <el-form-item label="备件:" prop="partCode">
  430. <el-autocomplete
  431. v-model="orderPart.partCode"
  432. value-key="name"
  433. class="inline-input"
  434. :fetch-suggestions="sparePartSearch"
  435. placeholder="请输入备件编号或备件名称或备件规格或供应商"
  436. style="width:500px"
  437. @select="handleSelectSparePart"
  438. >
  439. <template slot-scope="{ item }">
  440. <b>编号:</b><span class="name">{{ item.partCode }}</span>
  441. |<b>名称:</b><span class="addr">{{ item.partName }}</span>
  442. |<b>规格:</b><span class="addr">{{ item.specification }}</span><br>
  443. <b style="padding-left:3em;">品牌:</b><span class="addr">{{ item.brand }}</span>
  444. |<b>供应商:</b><span class="addr">{{ item.providerName }}</span>
  445. </template>
  446. </el-autocomplete>
  447. </el-form-item>
  448. </el-col>
  449. </el-row>
  450. <el-row v-if="No3">
  451. <el-col :span="10">
  452. <el-form-item label="调拨单号:" prop="applyCode">
  453. <el-autocomplete
  454. v-model="createTemp.applyCode"
  455. value-key="name"
  456. class="inline-input"
  457. :fetch-suggestions="allocationSearch"
  458. placeholder="请输入调拨单号"
  459. style="width:500px"
  460. @select="handleSelectAllocation"
  461. >
  462. <template slot-scope="{ item }">
  463. <b>调拨单号:</b><span class="name">{{ item.applyCode }}</span>
  464. |<b>调入牧场:</b><span class="addr">{{ item.inPastureName }}</span>
  465. </template>
  466. </el-autocomplete>
  467. </el-form-item>
  468. </el-col>
  469. </el-row>
  470. </el-form>
  471. <h5 style="float:right;">总金额:{{ TotalAmount }}</h5>
  472. <el-table
  473. :key="tableKey"
  474. v-loading="listLoading"
  475. element-loading-text="给我一点时间"
  476. :data="listAdd"
  477. border
  478. fit
  479. highlight-current-row
  480. style="width: 100%;margin-bottom:30px"
  481. :cell-style="tableCellStyle"
  482. class="elTable table-fixed"
  483. :row-style="rowStyle"
  484. >
  485. <!-- table表格 -->
  486. <el-table-column type="index" label="序号" align="center" width="50px" />
  487. <el-table-column :key="1" label="备件编号" min-width="90px" prop="partCode" align="center">
  488. <template slot-scope="scope">
  489. <span>{{ scope.row.partCode }}</span>
  490. </template>
  491. </el-table-column>
  492. <el-table-column :key="2" label="备件名称" min-width="60px" align="center">
  493. <template slot-scope="scope">
  494. <span>{{ scope.row.partName }}</span><br>
  495. </template>
  496. </el-table-column>
  497. <el-table-column :key="3" label="备件规格" prop="specification" align="center" min-width="90">
  498. <template slot-scope="scope">
  499. <span>{{ scope.row.specification }}</span>
  500. </template>
  501. </el-table-column>
  502. <el-table-column :key="4" label="备件图片" align="center" min-width="60">
  503. <template slot-scope="scope">
  504. <el-popover placement="right" title="" trigger="hover">
  505. <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
  506. <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
  507. </el-popover>
  508. </template>
  509. </el-table-column>
  510. <el-table-column :key="5" label="备件品牌" prop="brand" align="center" min-width="60">
  511. <template slot-scope="scope">
  512. <span>{{ scope.row.brand }}</span>
  513. </template>
  514. </el-table-column>
  515. <el-table-column :key="6" label="供应商" prop="providerName" align="center" min-width="60">
  516. <template slot-scope="scope">
  517. <span>{{ scope.row.providerName }}</span>
  518. </template>
  519. </el-table-column>
  520. <el-table-column :key="7" label="计量单位" prop="unit" align="center" min-width="60">
  521. <template slot-scope="scope">
  522. <span>{{ scope.row.unit }}</span>
  523. </template>
  524. </el-table-column>
  525. <el-table-column v-if="allo" :key="19" label="调拨数量" prop="unit" align="center" min-width="60">
  526. <template slot-scope="scope">
  527. <span>{{ scope.row.amount }}</span>
  528. </template>
  529. </el-table-column>
  530. <el-table-column v-if="allo" :key="20" label="出库数量" prop="unit" align="center" min-width="60">
  531. <template slot-scope="scope">
  532. <span>{{ scope.row.amount }}</span>
  533. </template>
  534. </el-table-column>
  535. <el-table-column v-if="No1" :key="8" label="设备名称" prop="eqName" align="center" min-width="60">
  536. <template slot-scope="scope">
  537. <span>{{ scope.row.eqName }}</span>
  538. </template>
  539. </el-table-column>
  540. <el-table-column v-if="No2" :key="9" label="设备名称" prop="eqName" align="center" min-width="200">
  541. <template slot-scope="scope">
  542. <!-- @select="handleSelectEqName" -->
  543. <!-- @select="(value)={handleSelectEqName(value)}" -->
  544. <el-autocomplete
  545. ref="elautocomplete1"
  546. v-model="scope.row.eqName"
  547. :debounce="0"
  548. class="inline-input"
  549. :fetch-suggestions="querySearchEqName"
  550. value-key="eqName"
  551. placeholder="设备名称"
  552. @select="(value)=>
  553. {handleSelectEqName(value, scope.row)}"
  554. @blur="(value)=>
  555. {blurSelectEqName(value, scope.row)}"
  556. >
  557. <template slot-scope="{ item }">
  558. <span class="name">{{ item.eqName }}</span>
  559. <span class="addr" style="margin:0 0 0 5px">{{ item.eqCode }}</span>
  560. </template>
  561. </el-autocomplete>
  562. </template>
  563. </el-table-column>
  564. <el-table-column v-if="No1" :key="10" label="设备内部编号" prop="eqCode" align="center" min-width="60">
  565. <template slot-scope="scope">
  566. <span>{{ scope.row.eqCode }}</span>
  567. </template>
  568. </el-table-column>
  569. <el-table-column v-if="No2" :key="11" label="设备内部编号" prop="eqCode" align="center" min-width="150">
  570. <template slot-scope="scope">
  571. <el-autocomplete
  572. ref="elautocomplete2"
  573. v-model="scope.row.eqCode"
  574. :debounce="0"
  575. class="inline-input"
  576. :fetch-suggestions="querySearchCode"
  577. value-key="eqCode"
  578. placeholder="设备内部编号"
  579. @select="(value)=>
  580. {handleSelectEqCode(value, scope.row)}"
  581. @blur="(value)=>
  582. {blurSelectEqCode(value, scope.row)}"
  583. />
  584. </template>
  585. </el-table-column>
  586. <el-table-column v-if="No4" :key="12" label="费用类型" prop="useTypeV" align="center" min-width="110">
  587. <template slot-scope="scope">
  588. <el-select v-model="scope.row.useTypeV" filterable placeholder="费用类型">
  589. <el-option
  590. v-for="item in getDictByName"
  591. :key="item.id"
  592. :label="item.value"
  593. :value="item.value"
  594. />
  595. </el-select>
  596. </template>
  597. </el-table-column>
  598. <el-table-column v-if="No4" :key="13" label="库位" prop="location" align="center" min-width="80">
  599. <template slot-scope="scope">
  600. <span>{{ scope.row.location }}</span>
  601. </template>
  602. </el-table-column>
  603. <el-table-column v-if="No4" :key="14" label="库位库存数" prop="reportery" align="center" min-width="70">
  604. <template slot-scope="scope">
  605. <span>{{ scope.row.reportery }}</span>
  606. </template>
  607. </el-table-column>
  608. <el-table-column v-if="No1" :key="15" label="领用数量" min-width="90px" align="center">
  609. <template slot-scope="scope">
  610. <el-form :model="scope.row" :rules="rules">
  611. <el-form-item prop="amount">
  612. <el-input
  613. ref="amount"
  614. v-model="scope.row.amount"
  615. style="margin-top:15px"
  616. :disabled="disabled"
  617. @change="(value)=>
  618. {changeUseNumber(value, scope.row)}"
  619. />
  620. </el-form-item>
  621. </el-form>
  622. </template>
  623. </el-table-column>
  624. <el-table-column v-if="No4" :key="16" label="出库数量" min-width="110" align="center">
  625. <template slot-scope="scope">
  626. <el-form :model="scope.row" :rules="rules">
  627. <el-form-item prop="checkoutNumber">
  628. <el-input
  629. ref="checkoutNumber"
  630. v-model="scope.row.checkoutNumber"
  631. style="margin-top:15px"
  632. @change="(value)=> {changeCheckoutNumber(value, scope.row)}"
  633. @blur="(value)=> {blurCheckoutNumber(value, scope.row)}"
  634. />
  635. </el-form-item>
  636. </el-form>
  637. </template>
  638. </el-table-column>
  639. <el-table-column :key="17" label="单价" prop="price" align="center" min-width="60">
  640. <template slot-scope="scope">
  641. <span>{{ scope.row.price }}</span>
  642. </template>
  643. </el-table-column>
  644. <el-table-column v-if="No4" :key="18" label="总价" prop="totalPrice" align="center" min-width="70">
  645. <template slot-scope="scope">
  646. <span>{{ scope.row.price * parseFloat(scope.row.checkoutNumber) | keepTwoNum }}</span>
  647. </template>
  648. </el-table-column>
  649. <el-table-column v-if="allo" :key="21" label="总价" prop="totalPrice" align="center" min-width="70">
  650. <template slot-scope="scope">
  651. <span>{{ scope.row.sumPrice }}</span>
  652. </template>
  653. </el-table-column>
  654. <el-table-column v-if="allo" :key="22" label="费用类型" prop="useTypeV" align="center" min-width="110">
  655. <template slot-scope="scope">
  656. <el-select v-model="scope.row.useTypeV" filterable placeholder="费用类型" :disabled="createTemp.useType == 2">
  657. <el-option
  658. v-for="item in getDictByName"
  659. :key="item.id"
  660. :label="item.value"
  661. :value="item.value"
  662. />
  663. </el-select>
  664. </template>
  665. </el-table-column>
  666. <el-table-column :key="23" label="备注" prop="totalPrice" align="center" min-width="130">
  667. <template slot-scope="scope">
  668. <el-input v-model="scope.row.note" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" style="width:80%;padding:10px 0;" maxlength="32" />
  669. </template>
  670. </el-table-column>
  671. <el-table-column v-if="No4" label="操作" align="center" width="60" class-name="small-padding fixed-width" fixed="right">
  672. <template slot-scope="{row}">
  673. <a class="del" @click="partDelete(row)">删除</a>
  674. </template>
  675. </el-table-column>
  676. </el-table>
  677. <el-form
  678. ref="temp"
  679. :rules="rules"
  680. :model="temp"
  681. label-position="right"
  682. label-width="100px"
  683. style="width: 800px; margin-left:50px;"
  684. />
  685. <div slot="footer" class="dialog-footer" style="bottom:10px">
  686. <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='create'?add_dialog_save():edit_dialog_save()">保存并关闭</el-button>
  687. <el-button @click="dialogFormVisible = false;getList()">取消并关闭</el-button>
  688. </div>
  689. </div>
  690. </el-dialog>
  691. <!-- 查看-->
  692. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_See" :close-on-click-modal="false" width="90%">
  693. <div class="app-see">
  694. <el-form
  695. ref="seeTemp"
  696. :rules="rules"
  697. :model="seeTemp"
  698. label-position="right"
  699. label-width="100px"
  700. style="width: 90%;margin:0 auto"
  701. >
  702. <el-row>
  703. <el-col :span="8">
  704. <el-form-item label="出库单号:" prop="useForm">
  705. <el-input ref="useForm" v-model="seeTemp.useForm" disabled />
  706. </el-form-item>
  707. </el-col>
  708. <el-col :span="8">
  709. <el-form-item label="牧场:" prop="pastureName">
  710. <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
  711. </el-form-item>
  712. </el-col>
  713. <el-col :span="8">
  714. <el-form-item label="录入人:" prop="empname">
  715. <el-input ref="empname" v-model="seeTemp.empname" disabled />
  716. </el-form-item>
  717. </el-col>
  718. </el-row>
  719. <el-row>
  720. <el-col :span="8">
  721. <el-form-item label="出库方式:" prop="useType">
  722. <el-radio-group v-if="seeTemp.useType == 0 ||seeTemp.useType == 1||seeTemp.useType == 4 " v-model="seeTemp.useType" disabled>
  723. <el-radio v-model="seeTemp.useType" :label="0" checked>领用出库</el-radio>
  724. <el-radio v-model="seeTemp.useType" :label="1">手动出库</el-radio>
  725. <el-radio v-model="seeTemp.useType" :label="4">调拨出库</el-radio>
  726. <el-radio v-model="seeTemp.useType" :label="5">报废出库</el-radio>
  727. </el-radio-group>
  728. <el-radio-group v-if="seeTemp.useType == 2" v-model="seeTemp.useType" disabled>
  729. <el-radio v-model="seeTemp.useType" :label="2" checked>领用出库</el-radio>
  730. <el-radio v-model="seeTemp.useType" :label="1">手动出库</el-radio>
  731. <el-radio v-model="seeTemp.useType" :label="4">调拨出库</el-radio>
  732. <el-radio v-model="seeTemp.useType" :label="5">报废出库</el-radio>
  733. </el-radio-group>
  734. <el-radio-group v-if="seeTemp.useType == 3" v-model="seeTemp.useType" disabled>
  735. <el-radio v-model="seeTemp.useType" :label="3" checked>领用出库</el-radio>
  736. <el-radio v-model="seeTemp.useType" :label="1">手动出库</el-radio>
  737. <el-radio v-model="seeTemp.useType" :label="4">调拨出库</el-radio>
  738. <el-radio v-model="seeTemp.useType" :label="5">报废出库</el-radio>
  739. </el-radio-group>
  740. <el-radio-group v-if="seeTemp.useType == 5" v-model="seeTemp.useType" disabled>
  741. <el-radio v-model="seeTemp.useType" :label="3">领用出库</el-radio>
  742. <el-radio v-model="seeTemp.useType" :label="1">手动出库</el-radio>
  743. <el-radio v-model="seeTemp.useType" :label="4">调拨出库</el-radio>
  744. <el-radio v-model="seeTemp.useType" :label="5" checked>报废出库</el-radio>
  745. </el-radio-group>
  746. </el-form-item>
  747. </el-col>
  748. <el-col :span="8">
  749. <el-form-item v-if="oddCodeAllo" label="领用单号:" prop="oddCode">
  750. <el-input ref="oddCode" v-model="seeTemp.oddCode" disabled />
  751. </el-form-item>
  752. </el-col>
  753. <el-col v-if="No5" :span="8">
  754. <el-form-item label="领用部门:" prop="departmentName">
  755. <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled />
  756. </el-form-item>
  757. </el-col>
  758. <el-col v-if="isCreatTimeAllo" :span="8">
  759. <el-form-item label="出库日期:" prop="creatTime">
  760. <el-input ref="creatTime" v-model="seeTemp.creatTime" disabled />
  761. </el-form-item>
  762. </el-col>
  763. <el-col v-if="isCreatTimeAllo" :span="8">
  764. <el-form-item label="备注:" prop="note">
  765. <el-input ref="note" v-model="seeTemp.note" disabled />
  766. </el-form-item>
  767. </el-col>
  768. </el-row>
  769. <el-row v-if="No5">
  770. <el-col :span="8">
  771. <el-form-item label="领用人:" prop="appliname">
  772. <el-input ref="appliname" v-model="seeTemp.appliname" disabled />
  773. </el-form-item>
  774. </el-col>
  775. <el-col :span="8">
  776. <el-form-item label="出库日期:" prop="creatTime">
  777. <el-input ref="creatTime" v-model="seeTemp.creatTime" disabled />
  778. </el-form-item>
  779. </el-col>
  780. <el-col :span="8">
  781. <el-form-item label="备注:" prop="note">
  782. <el-input ref="note" v-model="seeTemp.note" disabled />
  783. </el-form-item>
  784. </el-col>
  785. </el-row>
  786. <el-row v-if="isTableAllo1">
  787. <el-col :span="12">
  788. <el-form-item label="调拨单号:" prop="oddCode">
  789. <el-input ref="oddCode" v-model="seeTemp.oddCode" disabled />
  790. </el-form-item>
  791. </el-col>
  792. </el-row>
  793. </el-form>
  794. <h5 style="float:right;">总金额:{{ TotalAmount }}</h5>
  795. <el-table
  796. :key="tableKey"
  797. v-loading="listLoading"
  798. element-loading-text="给我一点时间"
  799. :data="listSee"
  800. border
  801. fit
  802. highlight-current-row
  803. style="width: 100%;margin-bottom:30px"
  804. :row-style="rowStyle"
  805. :cell-style="cellStyle"
  806. class="elTable table-fixed"
  807. @sort-change="tableSort2"
  808. >
  809. <el-table-column type="index" label="序号" align="center" width="50px" />
  810. <el-table-column :key="1" label="备件编号" min-width="150px" prop="partCode" align="center">
  811. <template slot-scope="scope">
  812. <span>{{ scope.row.partCode }}</span>
  813. </template>
  814. </el-table-column>
  815. <el-table-column :key="2" label="备件名称" min-width="80px" align="center">
  816. <template slot-scope="scope">
  817. <span>{{ scope.row.partName }}</span><br>
  818. </template>
  819. </el-table-column>
  820. <el-table-column :key="3" label="备件规格" prop="specification" align="center" min-width="110">
  821. <template slot-scope="scope">
  822. <span>{{ scope.row.specification }}</span>
  823. </template>
  824. </el-table-column>
  825. <el-table-column :key="4" label="备件图片" prop="specifications" align="center" min-width="80">
  826. <template slot-scope="scope">
  827. <el-popover placement="right" title="" trigger="hover">
  828. <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
  829. <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
  830. </el-popover>
  831. </template>
  832. </el-table-column>
  833. <el-table-column :key="5" label="备件品牌" prop="brandName" align="center" min-width="110">
  834. <template slot-scope="scope">
  835. <span>{{ scope.row.brandName }}</span>
  836. </template>
  837. </el-table-column>
  838. <el-table-column :key="6" label="供应商" prop="providerName" align="center" min-width="100">
  839. <template slot-scope="scope">
  840. <span>{{ scope.row.providerName }}</span>
  841. </template>
  842. </el-table-column>
  843. <el-table-column :key="7" label="计量单位" prop="unit" align="center" min-width="80">
  844. <template slot-scope="scope">
  845. <span>{{ scope.row.unit }}</span>
  846. </template>
  847. </el-table-column>
  848. <el-table-column v-if="isTableAllo" :key="8" label="设备名称" prop="eqName" align="center" min-width="110">
  849. <template slot-scope="scope">
  850. <span>{{ scope.row.eqName }}</span>
  851. </template>
  852. </el-table-column>
  853. <el-table-column v-if="isTableAllo" :key="9" label="设备内部编号" prop="eqCode" align="center" min-width="110">
  854. <template slot-scope="scope">
  855. <span>{{ scope.row.eqCode }}</span>
  856. </template>
  857. </el-table-column>
  858. <el-table-column v-if="isTableAllo" :key="10" label="费用类型" prop="useTypeV" align="center" min-width="110">
  859. <template slot-scope="scope">
  860. <span>{{ scope.row.useTypeV }}</span>
  861. </template>
  862. </el-table-column>
  863. <el-table-column v-if="isTableAllo" :key="11" label="库位" prop="warehoseCode" align="center" min-width="110">
  864. <template slot-scope="scope">
  865. <span>{{ scope.row.warehoseCode }}</span>
  866. </template>
  867. </el-table-column>
  868. <el-table-column v-if="isTableAllo" :key="12" label="库位库存数" sortable prop="reportery" align="center" min-width="110">
  869. <template slot-scope="scope">
  870. <span>{{ scope.row.reportery }}</span>
  871. </template>
  872. </el-table-column>
  873. <el-table-column v-if="No1" :key="13" sortable prop="useNumber" label="领用数量" min-width="80" align="center">
  874. <template slot-scope="scope">
  875. <span>{{ scope.row.useNumber }}</span>
  876. </template>
  877. </el-table-column>
  878. <el-table-column v-if="isTableAllo1" :key="14" sortable prop="checkoutNumber" label="调拨数量" min-width="80" align="center">
  879. <template slot-scope="scope">
  880. <span>{{ scope.row.checkoutNumber }}</span>
  881. </template>
  882. </el-table-column>
  883. <el-table-column :key="15" label="出库数量" sortable prop="checkoutNumber" min-width="80" align="center">
  884. <template slot-scope="scope">
  885. <span>{{ scope.row.checkoutNumber }}</span>
  886. </template>
  887. </el-table-column>
  888. <el-table-column :key="16" label="单价" sortable prop="price" align="center" min-width="60">
  889. <template slot-scope="scope">
  890. <span>{{ scope.row.price }}</span>
  891. </template>
  892. </el-table-column>
  893. <el-table-column :key="17" label="总价" sortable prop="sumPrice" align="center" min-width="60">
  894. <template slot-scope="scope">
  895. <span>{{ scope.row.sumPrice }}</span>
  896. </template>
  897. </el-table-column>
  898. <el-table-column v-if="isTableAllo1" :key="18" label="费用类型" prop="sumPrice" align="center" min-width="80">
  899. <template slot-scope="scope">
  900. <span>{{ scope.row.useTypeV }}</span>
  901. </template>
  902. </el-table-column>
  903. <el-table-column :key="19" label="备注" prop="sumPrice" align="center" min-width="80">
  904. <template slot-scope="scope">
  905. <span>{{ scope.row.note }}</span>
  906. </template>
  907. </el-table-column>
  908. </el-table>
  909. <!-- <pagination
  910. v-show="totalSee>0"
  911. :total="totalSee"
  912. :page.sync="getdataListSee.offset"
  913. :limit.sync="getdataListSee.pagecount"
  914. @pagination="getSeeList"
  915. /> -->
  916. <div slot="footer" class="dialog-footer" style="margin-bottom:-25px;">
  917. <el-button @click="dialogFormVisible_See = false">关闭</el-button>
  918. </div>
  919. </div>
  920. </el-dialog>
  921. <!-- EAS同步 -->
  922. <el-dialog :title="textMap[easStatus.dialogStatus]" :visible.sync="easStatus.dialogFormVisible" :close-on-click-modal="false" width="80%">
  923. <div class="easStatus">
  924. <el-table
  925. :key="easStatus.tableKey"
  926. v-loading="easStatus.listLoading"
  927. element-loading-text="给我一点时间"
  928. :data="easStatus.list"
  929. border
  930. fit
  931. highlight-current-row
  932. style="width: 100%;"
  933. :row-style="rowStyle"
  934. :cell-style="cellStyle"
  935. class="elTable table-fixed"
  936. >
  937. <el-table-column label="序号" align="center" type="index" width="50px">
  938. <template slot-scope="scope">
  939. <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
  940. </template>
  941. </el-table-column>
  942. <el-table-column label="出库单号" min-width="110px" align="center" prop="useForm" />
  943. <el-table-column label="领用部门" min-width="110px" align="center" prop="departmentName" />
  944. <el-table-column label="牧场" min-width="110px" align="center" prop="pastureName" />
  945. <el-table-column label="录入人" min-width="110px" align="center" prop="empName" />
  946. <el-table-column label="出库日期" min-width="110px" align="center" prop="createTime" />
  947. <el-table-column label="失败原因" min-width="110px" align="center" prop="failReason" />
  948. <el-table-column label="操作" align="center" width="300px" class-name="small-padding fixed-width" fixed="right">
  949. <template slot-scope="{row}">
  950. <el-button v-if="isManualSynchronization" type="primary" size="mini" style="width:70px;" @click="handleManual(row)">手动同步</el-button>
  951. <el-button v-if="isCloseSynchronization" type="danger" size="mini" style="width:70px;" @click="handleClose(row)">关闭同步</el-button>
  952. <el-button v-if="isIgnoreSynchronization" type="danger" size="mini" style="width:70px;" @click="handleIgnore(row)">忽略同步</el-button>
  953. </template>
  954. </el-table-column>
  955. </el-table>
  956. <pagination v-show="easStatus.total>0" :total="easStatus.total" :page.sync="easStatus.getdataListParm.offset" :limit.sync="easStatus.getdataListParm.pagecount" @pagination="getListEasStatusLst" />
  957. </div>
  958. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  959. <el-button @click="easStatus.dialogFormVisible = false;getList()">关闭</el-button>
  960. </div>
  961. </el-dialog>
  962. </div>
  963. </template>
  964. <script>
  965. // 引入
  966. import { GetDataByName, GetDataByNames, ExecDataByConfig, checkButtons, GetAccount, transData, PostDataByName, EasSync } from '@/api/common'
  967. import waves from '@/directive/waves' // waves directive
  968. import { parseTime, sortChange } from '@/utils/index.js'
  969. // eslint-disable-next-line no-unused-vars
  970. import { validateEMail } from '@/utils/validate.js'
  971. import Pagination from '@/components/Pagination' // secondary package based on el-pagination
  972. import { MessageBox } from 'element-ui'
  973. import Cookies from 'js-cookie'
  974. import { getToken } from '@/utils/auth'
  975. import TreeSelect from '@/components/TreeSelect'
  976. export default {
  977. name: 'OutStock',
  978. components: { Pagination, TreeSelect },
  979. directives: { waves },
  980. filters: {
  981. keepTwoNum(value) {
  982. value = Number(value)
  983. return value.toFixed(2)
  984. }
  985. },
  986. data() {
  987. return {
  988. totalImportInfo: 0,
  989. listLoadingImportInfo: true,
  990. listImportInfo: [],
  991. // isReceiveImport: [],
  992. // isRetreatMuban: [],
  993. // isStorageAdd: [],
  994. // isStorageExport: [],
  995. // isStorageSee: [],
  996. tableKey: 0,
  997. useTypes: [{ id: '0', name: '领用出库' }, { id: '1', name: '手动出库' }, { id: '4', name: '调拨出库' }, { id: '5', name: '报废出库' }],
  998. // list2: [
  999. // {
  1000. // orderNumber: '04.04.17.01.000069', stockName: '水箱', specifications: 'YC4E140-31', brand: '福田', supplier: '西安开泰门业有限', deviceName: '华农转盘机', equipmentNumber: '8.hnzpj004', unit: '个', storehouse: 'B-01-01', amount: '4', receivedQuantity: '3', currentStockQuantity: '1', price: '200', totalPrice: '600'
  1001. // }
  1002. // ],
  1003. // 1-2:table&搜索传参
  1004. getdataListParmImportInfo: {
  1005. name: 'getImportStockLaidList',
  1006. page: 1,
  1007. offset: 1,
  1008. pagecount: 10,
  1009. returntype: 'Map',
  1010. parammaps: {
  1011. pastureName: '',
  1012. deptName: '',
  1013. useForm: '',
  1014. stockNumber: '',
  1015. stockName: '',
  1016. receiveTime: '',
  1017. providerName: '',
  1018. storageName: '',
  1019. storageTime: ''
  1020. }
  1021. },
  1022. getParmCreateNumber: {
  1023. name: 'autoCreatCode',
  1024. page: 0,
  1025. offset: 0,
  1026. pagecount: 0,
  1027. returntype: 'Map',
  1028. parammaps: {
  1029. pastureId: Cookies.get('pastureid'),
  1030. codeType: 'CK'
  1031. }
  1032. },
  1033. // 2-3:下拉框请求后数据加入[]
  1034. temp: { },
  1035. storage: {
  1036. inputDatetime: parseTime(new Date(), '{y}-{m}-{d}'),
  1037. typeName: '',
  1038. assTypeId: '',
  1039. employeId: this.$store.state.user.employeid,
  1040. departmentId: this.$store.state.user.departmentid,
  1041. pastureId: this.$store.state.user.pastureid,
  1042. laidNumber: ''
  1043. },
  1044. dialogPvVisible: false,
  1045. // 校验规则
  1046. // -----------------------------------------
  1047. isOutStockAdd: [], isReceiveTemplate: [], isOutStockImport: [], isOutStockExport: [], isOutStockSee: [], isOutStockDelete: [], isOutStockMethod1: [], isOutStockMethod2: [], isOutStockMethod3: [],isOutStockMethod4:[],
  1048. isEasSynchronization: [], isManualSynchronization: [], isCloseSynchronization: [], isIgnoreSynchronization: [],
  1049. rules: {},
  1050. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  1051. cellStyle: { padding: 0 + 'px' },
  1052. findAllProvider: [],
  1053. findAllAssetType: [],
  1054. findAllPasture: [],
  1055. findAllDepart: [],
  1056. findAllEmploye: [],
  1057. getDictByName: [], createDepartList: [], edit: 0,
  1058. // 2-1.请求下拉框接口
  1059. requestParams: [
  1060. { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
  1061. { name: 'findAllAssetType', offset: 0, pagecount: 0, params: [] },
  1062. { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
  1063. { name: 'findAllDepart', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
  1064. { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
  1065. { name: 'getDictByName', offset: 0, pagecount: 0, params: ['耗用类别-父'] }
  1066. ],
  1067. getDepartParam: {
  1068. name: 'findAllDepart', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }
  1069. },
  1070. pickerOptions1: {
  1071. disabledDate(time) {
  1072. return time.getTime() > Date.now()// 当天之前的时间可选
  1073. }
  1074. },
  1075. pickerOptions2: {
  1076. disabledDate(time) {
  1077. return time.getTime() > Date.now()// 当天之前的时间可选
  1078. }
  1079. },
  1080. No1: true,
  1081. No2: false,
  1082. No3: false,
  1083. No4: true,
  1084. isReceiveTime: true,
  1085. isReceiveTime2: false,
  1086. allo: false,
  1087. disabled: true,
  1088. isokDisable: false,
  1089. total: 0,
  1090. listLoading: true,
  1091. dialogFormVisible: false,
  1092. dialogFormVisible_See: false,
  1093. dialogStatus: '',
  1094. textMap: {
  1095. see: '查看详情',
  1096. update: '编辑',
  1097. create: '新增',
  1098. easStatus: 'EAS同步—同步失败数据'
  1099. },
  1100. getdataListParm: {
  1101. name: 'getBigPartuseList',
  1102. page: 1,
  1103. offset: 1,
  1104. pagecount: 10,
  1105. returntype: 'Map',
  1106. parammaps: {
  1107. pastureName: Cookies.get('pasturename'),
  1108. departmentId: '',
  1109. inputDatetime: '',
  1110. useForm: '',
  1111. useType: '',
  1112. easStatus: ''
  1113. }
  1114. },
  1115. list: [],
  1116. activeName: 'first',
  1117. tableKey2: 0,
  1118. listLoading2: true,
  1119. total2: 0,
  1120. list2: [],
  1121. getdataListParm2: {
  1122. name: 'getPartuseDetailList',
  1123. page: 1,
  1124. offset: 1,
  1125. pagecount: 10,
  1126. returntype: 'Map',
  1127. parammaps: {
  1128. inputDatetime: '',
  1129. useForm: '',
  1130. startTime: '',
  1131. stopTime: '',
  1132. departmentId: '',
  1133. partCode: '',
  1134. partName: '',
  1135. providerId: '',
  1136. pastureName: Cookies.get('pasturename'),
  1137. assetCode: '',
  1138. eqName: ''
  1139. }
  1140. },
  1141. requestParam: {
  1142. name: 'downloadPartuseList',
  1143. parammaps: {
  1144. pastureName: Cookies.get('pasturename'),
  1145. inputDatetime: ''
  1146. }
  1147. },
  1148. downList: [],
  1149. oddCodeAllo: true,
  1150. No5: true,
  1151. isCreatTimeAllo: false,
  1152. isTableAllo: true,
  1153. isTableAllo1: false,
  1154. seeTemp: {},
  1155. listSee: [],
  1156. totalSee: 0,
  1157. getdataListSee: {
  1158. name: 'getpartUseListBybig',
  1159. returntype: 'Map',
  1160. parammaps: {}
  1161. },
  1162. createTemp: {
  1163. useType: 0,
  1164. empId: Cookies.get('employeid'),
  1165. pastureId: Cookies.get('pastureid'),
  1166. receiveTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1167. applicatId: Cookies.get('employeid'),
  1168. departmentId: Cookies.get('departmentid')
  1169. },
  1170. requestSparePart: {
  1171. name: 'getPartsListCK',
  1172. page: 1,
  1173. offset: 1,
  1174. pagecount: 20,
  1175. returntype: 'Map',
  1176. parammaps: {
  1177. pastureId: Cookies.get('pastureid')
  1178. }
  1179. },
  1180. requestAllocation: {
  1181. name: 'getTransferCodeCK',
  1182. page: 1,
  1183. offset: 1,
  1184. pagecount: 20,
  1185. returntype: 'Map',
  1186. parammaps: {
  1187. applyCode: '',
  1188. pastureId: this.$store.state.user.pastureid
  1189. }
  1190. },
  1191. getAllocationListParm: {
  1192. name: 'getPartTransferbybigid',
  1193. returntype: 'Map',
  1194. parammaps: {}
  1195. },
  1196. orderPart: {},
  1197. listAdd: [],
  1198. EqNameList: [],
  1199. requestEqName: {
  1200. name: 'geteqbyNameCode',
  1201. page: 1,
  1202. offset: 1,
  1203. pagecount: 10,
  1204. returntype: 'Map',
  1205. parammaps: {
  1206. pastureId: Cookies.get('pastureid')
  1207. }
  1208. },
  1209. EqCodeList: [],
  1210. requestUseForm: {
  1211. name: 'getApplyCode',
  1212. returntype: 'Map',
  1213. parammaps: {
  1214. pastureId: Cookies.get('pastureid')
  1215. }
  1216. },
  1217. useForms: [],
  1218. getParmCreateAdd: {
  1219. name: 'getPartApplyByBig',
  1220. returntype: 'Map',
  1221. parammaps: {}
  1222. },
  1223. postDataPramas: {},
  1224. selectedArr: [],
  1225. buttons: [],
  1226. TotalAmount: 0,
  1227. isPercentage: false,
  1228. percentage: 1,
  1229. parentType: [],
  1230. placeholder: '设备类别',
  1231. disabled2: false,
  1232. getParmType: {
  1233. name: 'geteqclasslist'
  1234. },
  1235. defaultProps: {
  1236. children: 'children',
  1237. label: 'typeName'
  1238. },
  1239. nodeKey: 'id',
  1240. defaultCheckedKeys: [],
  1241. // EAS同步
  1242. easStatus: {
  1243. easStatusList: [{ name: '同步成功', id: '1' }, { name: '同步失败', id: '0' }, { name: '关闭同步', id: '2' }],
  1244. dialogStatus: '',
  1245. dialogFormVisible: false,
  1246. tableKey: 0,
  1247. total: 0,
  1248. listLoading: true,
  1249. list: [],
  1250. getdataListParm: {
  1251. name: 'getbigpartuseSync',
  1252. page: 1,
  1253. offset: 1,
  1254. pagecount: 10,
  1255. returntype: 'Map',
  1256. parammaps: {
  1257. pastureid: Cookies.get('pastureid')
  1258. }
  1259. }
  1260. }
  1261. }
  1262. },
  1263. computed: {
  1264. // 设置请求头
  1265. headers() {
  1266. return {
  1267. // 设置token
  1268. // eslint-disable-next-line no-undef
  1269. token: getToken()
  1270. }
  1271. },
  1272. uploadData() {
  1273. return {
  1274. name: 'importStockUse',
  1275. importParams: '牧场,领用单编号,领用日期,物料编码,品名,规格型号,品牌,计量单位,实发数量,单价,总价,库位,供应商,名称,牧场设备编号,具体用处,领用类型,领用部门,领用人,SignColumn',
  1276. sheetname: 'SheetJS'
  1277. }
  1278. },
  1279. uploadData2() {
  1280. return {
  1281. name: 'importStockUseHistory',
  1282. importParams: '牧场,领用单编号,领用日期,物料编码,品名,规格型号,品牌,计量单位,实发数量,单价,总价,库位,供应商,名称,牧场设备编号,具体用处,领用类型,领用部门,领用人,SignColumn',
  1283. sheetname: 'SheetJS'
  1284. }
  1285. },
  1286. // 设置上传地址
  1287. uploadExcelUrl() {
  1288. // process.env.VUE_APP_BASE_API是服务器的路径,也是axios的基本路径
  1289. return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
  1290. }
  1291. },
  1292. created() {
  1293. const that = this
  1294. GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
  1295. that.buttons = response.data.list
  1296. that.get_auto_buttons()
  1297. })
  1298. this.get_select_list()
  1299. this.getList()
  1300. this.getTypeList()
  1301. },
  1302. methods: {
  1303. tableSort(column) {
  1304. if (this.activeName == 'first') {
  1305. sortChange(column, this.list)
  1306. } else if (this.activeName == 'second') {
  1307. sortChange(column, this.list2)
  1308. }
  1309. },
  1310. tableSort2(column) {
  1311. sortChange(column, this.listSee)
  1312. },
  1313. get_auto_buttons() {
  1314. const OutStockAdd = 'customs:outStock:add'
  1315. const isOutStockAdd = checkButtons(this.$store.state.user.buttons, OutStockAdd)
  1316. this.isOutStockAdd = isOutStockAdd
  1317. const ReceiveTemplate = 'customs:outStock:template'
  1318. const isReceiveTemplate = checkButtons(this.$store.state.user.buttons, ReceiveTemplate)
  1319. this.isReceiveTemplate = isReceiveTemplate
  1320. const OutStockImport = 'customs:outStock:import'
  1321. const isOutStockImport = checkButtons(this.$store.state.user.buttons, OutStockImport)
  1322. this.isOutStockImport = isOutStockImport
  1323. const OutStockExport = 'customs:outStock:export'
  1324. const isOutStockExport = checkButtons(this.$store.state.user.buttons, OutStockExport)
  1325. this.isOutStockExport = isOutStockExport
  1326. const OutStockSee = 'customs:outStock:see'
  1327. const isOutStockSee = checkButtons(this.$store.state.user.buttons, OutStockSee)
  1328. this.isOutStockSee = isOutStockSee
  1329. const OutStockDelete = 'customs:outStock:delete'
  1330. const isOutStockDelete = checkButtons(this.$store.state.user.buttons, OutStockDelete)
  1331. this.isOutStockDelete = isOutStockDelete
  1332. const OutStockMethod1 = 'customs:outStock:method1'
  1333. const isOutStockMethod1 = checkButtons(this.$store.state.user.buttons, OutStockMethod1)
  1334. this.isOutStockMethod1 = isOutStockMethod1
  1335. const OutStockMethod2 = 'customs:outStock:method2'
  1336. const isOutStockMethod2 = checkButtons(this.$store.state.user.buttons, OutStockMethod2)
  1337. this.isOutStockMethod2 = isOutStockMethod2
  1338. const OutStockMethod3 = 'customs:outStock:method3'
  1339. const isOutStockMethod3 = checkButtons(this.$store.state.user.buttons, OutStockMethod3)
  1340. this.isOutStockMethod3 = isOutStockMethod3
  1341. const OutStockMethod4 = 'customs:outStock:method4'
  1342. const isOutStockMethod4 = checkButtons(this.$store.state.user.buttons, OutStockMethod4)
  1343. this.isOutStockMethod4 = isOutStockMethod4
  1344. const EasSynchronization = 'customs:outStock:easSynchronization'
  1345. const isEasSynchronization = checkButtons(this.$store.state.user.buttons, EasSynchronization)
  1346. this.isEasSynchronization = isEasSynchronization
  1347. const ManualSynchronization = 'customs:outStock:manualSynchronization'
  1348. const isManualSynchronization = checkButtons(this.$store.state.user.buttons, ManualSynchronization)
  1349. this.isManualSynchronization = isManualSynchronization
  1350. const CloseSynchronization = 'customs:outStock:closeSynchronization'
  1351. const isCloseSynchronization = checkButtons(this.$store.state.user.buttons, CloseSynchronization)
  1352. this.isCloseSynchronization = isCloseSynchronization
  1353. const IgnoreSynchronization = 'customs:outStock:ignoreSynchronization'
  1354. const isIgnoreSynchronization = checkButtons(this.$store.state.user.buttons, IgnoreSynchronization)
  1355. this.isIgnoreSynchronization = isIgnoreSynchronization
  1356. },
  1357. popoverHide(checkedIds, checkedData) {
  1358. console.log('选中值', checkedIds, checkedData)
  1359. // this.dataform.eqClassId = checkedIds
  1360. // this.dataform.typeCode = checkedData.typeCode
  1361. this.getdataListParm2.parammaps.assetCode = checkedData.typeCode
  1362. },
  1363. getTypeList() {
  1364. GetDataByName(this.getParmType).then(response => {
  1365. if (response.data.list !== null) {
  1366. this.parentType = transData(response.data.list, 'id', 'pid', 'children')
  1367. }
  1368. })
  1369. },
  1370. querySearch(queryString, cb) {
  1371. var restaurants = this.restaurants
  1372. var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
  1373. // 调用 callback 返回建议列表的数据
  1374. cb(results)
  1375. },
  1376. createFilter(queryString) {
  1377. return (restaurant) => {
  1378. return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
  1379. }
  1380. },
  1381. handleSelect(item) {
  1382. console.log(item)
  1383. },
  1384. // ---------------------------------------------
  1385. get_select_list() {
  1386. GetDataByNames(this.requestParams).then(response => {
  1387. this.findAllProvider = response.data.findAllProvider.list
  1388. this.findAllAssetType = response.data.findAllAssetType.list
  1389. this.findAllPasture = response.data.findAllPasture.list
  1390. this.findAllEmploye = response.data.findAllEmploye.list
  1391. this.getDictByName = response.data.getDictByName.list
  1392. this.getDepartDownList()
  1393. })
  1394. },
  1395. getDepartDownList() {
  1396. GetDataByName(this.getDepartParam).then(response => {
  1397. this.findAllDepart = response.data.list
  1398. })
  1399. },
  1400. changePastureName(item) {
  1401. this.getDepartParam.parammaps.pastureId = this.findAllPasture.find(obj => obj.name == item).id
  1402. this.getdataListParm.parammaps.departmentId = ''
  1403. this.getDepartDownList()
  1404. },
  1405. getCreateDepartDownList() {
  1406. GetDataByName(this.getDepartParam).then(response => {
  1407. this.createDepartList = response.data.list
  1408. if (this.edit == 1) {
  1409. if (this.createDepartList.find(obj => obj.id == Cookies.get('departmentid'))) {
  1410. this.createTemp.departmentId = parseInt(Cookies.get('departmentid'))
  1411. this.createTemp.departmentName = this.createDepartList.find(obj => obj.id == Cookies.get('departmentid')).name
  1412. } else {
  1413. this.createTemp.departmentId = response.data.list[0].id
  1414. this.createTemp.departmentName = response.data.list[0].name
  1415. }
  1416. console.log(this.createTemp.departmentName, 'this.createTemp.departmentName')
  1417. }
  1418. })
  1419. },
  1420. changePasture(item) {
  1421. this.getDepartParam.parammaps.pastureId = item
  1422. this.edit = 1
  1423. this.getCreateDepartDownList()
  1424. },
  1425. changeDepart(item) {
  1426. this.createTemp.departmentName = this.createDepartList.find(obj => obj.id == item).name
  1427. },
  1428. getList() {
  1429. this.listLoading = true
  1430. console.log(this.$refs['inputDatetime'])
  1431. if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
  1432. this.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
  1433. this.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
  1434. } else {
  1435. this.getdataListParm.parammaps.startTime = ''
  1436. this.getdataListParm.parammaps.stopTime = ''
  1437. }
  1438. GetDataByName(this.getdataListParm).then(response => {
  1439. console.log('table数据', response.data.list)
  1440. this.list = response.data.list
  1441. this.pageNum = response.data.pageNum
  1442. this.pageSize = response.data.pageSize
  1443. if (response.data.total) {
  1444. this.total = response.data.total
  1445. }
  1446. // Just to simulate the time of the request
  1447. setTimeout(() => {
  1448. this.listLoading = false
  1449. }, 100)
  1450. })
  1451. },
  1452. handleClick(tab, event) {
  1453. console.log(tab, event)
  1454. if (tab.name === 'second') {
  1455. this.getList2()
  1456. } else {
  1457. this.getList()
  1458. }
  1459. },
  1460. getList2() {
  1461. this.listLoading2 = true
  1462. if (this.$refs['inputDatetime2'] !== undefined && this.$refs['inputDatetime2'].value !== null) {
  1463. this.getdataListParm2.parammaps.startTime = this.$refs['inputDatetime2'].value[0]
  1464. this.getdataListParm2.parammaps.stopTime = this.$refs['inputDatetime2'].value[1]
  1465. } else {
  1466. this.getdataListParm2.parammaps.startTime = ''
  1467. this.getdataListParm2.parammaps.stopTime = ''
  1468. }
  1469. GetDataByName(this.getdataListParm2).then(response => {
  1470. this.list2 = response.data.list
  1471. this.pageNum2 = response.data.pageNum
  1472. this.pageSize2 = response.data.pageSize
  1473. if (response.data.total) {
  1474. this.total2 = response.data.total
  1475. }
  1476. // Just to simulate the time of the request
  1477. setTimeout(() => {
  1478. this.listLoading2 = false
  1479. }, 100)
  1480. })
  1481. },
  1482. form_search2() {
  1483. this.listLoading2 = true
  1484. if (this.getdataListParm2.parammaps.inputDatetime === null) {
  1485. this.getdataListParm2.parammaps.inputDatetime = ''
  1486. }
  1487. this.getdataListParm2.offset = 1
  1488. this.getList2()
  1489. },
  1490. useType: function(cellValue) {
  1491. // console.log(cellValue.isZeroStock)
  1492. if (cellValue.useType === 0) {
  1493. return '领用出库'
  1494. } else if (cellValue.useType === 2) {
  1495. return '领用出库'
  1496. } else if (cellValue.useType === 3) {
  1497. return '领用出库'
  1498. } else if (cellValue.useType === 1) {
  1499. return '手动出库'
  1500. } else if (cellValue.useType === 4) {
  1501. return '调拨出库'
  1502. } else if (cellValue.useType === 5) {
  1503. return '报废出库'
  1504. }
  1505. },
  1506. form_search() {
  1507. console.log('点击了table搜索')
  1508. this.listLoading = true
  1509. if (this.getdataListParm.parammaps.inputDatetime === null) {
  1510. this.getdataListParm.parammaps.inputDatetime = ''
  1511. }
  1512. this.getdataListParm.offset = 1
  1513. this.getList()
  1514. },
  1515. form_see(row) {
  1516. this.seeTemp = Object.assign({}, row)
  1517. console.log(this.seeTemp)
  1518. // this.temp = Object.assign({}, row) // copy obj
  1519. this.dialogStatus = 'see'
  1520. this.dialogFormVisible_See = true
  1521. this.getdataListSee.parammaps.id = row.id
  1522. this.TotalAmount = 0
  1523. this.getSeeList()
  1524. if (this.seeTemp.useType == 0) {
  1525. this.No1 = true
  1526. this.oddCodeAllo = true
  1527. this.isCreatTimeAllo = false
  1528. this.No5 = true
  1529. this.isTableAllo = true
  1530. this.isTableAllo1 = false
  1531. } else if (this.seeTemp.useType == 2) {
  1532. this.No1 = true
  1533. this.oddCodeAllo = true
  1534. this.isCreatTimeAllo = false
  1535. this.No5 = true
  1536. this.isTableAllo = true
  1537. this.isTableAllo1 = false
  1538. } else if (this.seeTemp.useType == 3) {
  1539. this.No1 = true
  1540. this.oddCodeAllo = true
  1541. this.isCreatTimeAllo = false
  1542. this.No5 = true
  1543. this.isTableAllo = true
  1544. this.isTableAllo1 = false
  1545. } else if (this.seeTemp.useType == 1) {
  1546. this.No1 = false
  1547. this.oddCodeAllo = false
  1548. this.isTableAllo = true
  1549. this.isTableAllo1 = false
  1550. } else if (this.seeTemp.useType == 4) {
  1551. this.oddCodeAllo = false
  1552. this.isCreatTimeAllo = true
  1553. this.No5 = false
  1554. this.No1 = false
  1555. this.isTableAllo = false
  1556. this.isTableAllo1 = true
  1557. } else if (this.seeTemp.useType == 5) {
  1558. this.No1 = false
  1559. this.oddCodeAllo = false
  1560. this.isTableAllo = true
  1561. this.isTableAllo1 = false
  1562. }
  1563. },
  1564. getSeeList() {
  1565. GetDataByName(this.getdataListSee).then(response => {
  1566. console.log('查看下方table数据', response.data.list)
  1567. this.listSee = response.data.list
  1568. if (response.data.list !== null) {
  1569. for (let i = 0; i < response.data.list.length; i++) {
  1570. this.TotalAmount += parseFloat(response.data.list[i].sumPrice)
  1571. 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) {
  1572. this.listSee[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
  1573. this.listSee[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
  1574. } else {
  1575. this.listSee[i].srcpath = ''
  1576. this.listSee[i].picpath = ''
  1577. }
  1578. }
  1579. this.TotalAmount = this.TotalAmount.toFixed(2)
  1580. }
  1581. setTimeout(() => {
  1582. this.listLoadingSee = false
  1583. }, 100)
  1584. })
  1585. },
  1586. resetCreateTemp() {
  1587. this.createTemp.useType = 0
  1588. this.createTemp.empId = parseInt(Cookies.get('employeid'))
  1589. this.createTemp.pastureId = parseInt(Cookies.get('pastureid'))
  1590. this.createTemp.receiveTime = parseTime(new Date(), '{y}-{m}-{d}')
  1591. this.createTemp.departmentId = parseInt(Cookies.get('departmentid'))
  1592. this.createTemp.applicatId = parseInt(Cookies.get('employeid'))
  1593. this.listAdd = []
  1594. this.createTemp.useForm = ''
  1595. this.No1 = true
  1596. this.No2 = false
  1597. this.No3 = false
  1598. this.orderPart = {}
  1599. },
  1600. form_add() {
  1601. this.resetCreateTemp()
  1602. this.edit = 1
  1603. this.getDepartParam.parammaps.pastureId = this.createTemp.pastureId
  1604. this.getCreateDepartDownList()
  1605. this.dialogStatus = 'create'
  1606. this.dialogFormVisible = true
  1607. this.createTemp.useForm = ''
  1608. this.createTemp.pastureName = Cookies.get('pasturename')
  1609. this.createTemp.employeId = Cookies.get('employeid')
  1610. this.TotalAmount = 0
  1611. console.log(this.createTemp)
  1612. this.$nextTick(() => {
  1613. this.$refs['temp'].clearValidate()
  1614. })
  1615. this.getCreateNumber()
  1616. },
  1617. getCreateNumber() {
  1618. GetDataByName(this.getParmCreateNumber).then(response => {
  1619. this.$nextTick(() => {
  1620. console.log('新增领用单号', response.data.list[0].orderCode)
  1621. this.createTemp.useForm = response.data.list[0].orderCode
  1622. })
  1623. this.$forceUpdate()
  1624. })
  1625. },
  1626. changeStorageType(val) {
  1627. console.log(val)
  1628. this.TotalAmount = 0
  1629. if (val === 0) {
  1630. this.No1 = true
  1631. this.No2 = false
  1632. this.No3 = false
  1633. this.disabled = true
  1634. this.listAdd = []
  1635. this.isReceiveTime = true
  1636. this.isReceiveTime2 = false
  1637. this.No4 = true
  1638. // 调拨数量/出库数量
  1639. this.allo = false
  1640. } else if (val === 1) {
  1641. this.No1 = false
  1642. this.No2 = true
  1643. this.No3 = false
  1644. this.disabled = false
  1645. this.listAdd = []
  1646. this.useForms = []
  1647. this.isReceiveTime = true
  1648. this.isReceiveTime2 = false
  1649. this.No4 = true
  1650. // 调拨数量/出库数量
  1651. this.allo = false
  1652. } else if (val === 2) {
  1653. this.listAdd = []
  1654. this.No1 = false
  1655. this.No2 = false
  1656. this.isReceiveTime = false
  1657. this.isReceiveTime2 = true
  1658. this.No3 = true
  1659. // 调拨数量/出库数量显示
  1660. this.allo = true
  1661. this.No4 = false
  1662. }else if(val === 5){
  1663. // 报废出库
  1664. this.No1 = false
  1665. this.No2 = true
  1666. this.No3 = false
  1667. this.disabled = false
  1668. this.listAdd = []
  1669. this.useForms = []
  1670. this.isReceiveTime = true
  1671. this.isReceiveTime2 = false
  1672. this.No4 = true
  1673. // 调拨数量/出库数量
  1674. this.allo = false
  1675. }
  1676. },
  1677. getNumber(queryString, cb) {
  1678. console.log('领用单号模糊查询输入值', queryString)
  1679. this.requestUseForm.parammaps['applyCode'] = queryString
  1680. GetDataByName(this.requestUseForm).then(response => {
  1681. console.log('领用单号模糊查询搜索data', response.data.list)
  1682. // this.useForms = response.data.list
  1683. cb(response.data.list)
  1684. })
  1685. },
  1686. changeApplyCode(item) {
  1687. console.log('领用单号模糊查询选中值', item)
  1688. this.getParmCreateAdd.parammaps.id = item.id
  1689. this.getParmCreateAdd.parammaps.pastureId = Cookies.get('pastureid')
  1690. this.createTemp.departmentId = item.departmentId
  1691. this.createTemp.bid = item.id
  1692. this.createTemp.applicatId = item.empId
  1693. this.orderPart.applyCode = item.applyCode
  1694. this.TotalAmount = 0
  1695. this.getListAdd()
  1696. },
  1697. getListAdd() {
  1698. GetDataByName(this.getParmCreateAdd).then(response => {
  1699. console.log('领用单号list列表', response.data.list)
  1700. this.createTemp.applyType = response.data.list[0].applyType
  1701. this.listAdd = response.data.list
  1702. this.TotalAmount = 0
  1703. if (response.data.list !== null) {
  1704. for (var i = 0; i < response.data.list.length; i++) {
  1705. if (response.data.list[i].applyType == '非维保') {
  1706. response.data.list[i].applyType = '物耗'
  1707. this.getDictByName = [{ 'id': 61, 'label': '物耗', 'value': '物耗' }, { 'id': 62, 'label': '土建', 'value': '土建' }, { 'id': 229, 'label': '工具', 'value': '工具' }]
  1708. } else {
  1709. this.get_select_list()
  1710. }
  1711. // response.data.list[i].useTypeV = response.data.list[i].applyType
  1712. this.$set(response.data.list[i], 'useTypeV', response.data.list[i].applyType)
  1713. if (response.data.list[i].price == '') {
  1714. response.data.list[i].price = 0
  1715. }
  1716. if (response.data.list[i].checkoutNumber == null) {
  1717. var checkoutNumberArray = []
  1718. checkoutNumberArray.push(response.data.list[i].amount, response.data.list[i].reportery)
  1719. response.data.list[i].minNumber = Math.min.apply(null, checkoutNumberArray)
  1720. // response.data.list[i].checkoutNumber = response.data.list[i].minNumber
  1721. this.$set(response.data.list[i], 'checkoutNumber', response.data.list[i].minNumber)
  1722. // this.$set(response.data.list[i], 'sumPrice', parseFloat(response.data.list[i].sumPrice) * parseFloat(response.data.list[i].checkoutNumber))
  1723. }
  1724. console.log(response.data.list[i].sumPrice, '========= ==')
  1725. this.TotalAmount += parseFloat(response.data.list[i].sumPrice)
  1726. 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) {
  1727. this.listAdd[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
  1728. this.listAdd[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
  1729. } else {
  1730. this.listAdd[i].srcpath = ''
  1731. this.listAdd[i].picpath = ''
  1732. }
  1733. }
  1734. this.TotalAmount = this.TotalAmount.toFixed(2)
  1735. }
  1736. })
  1737. },
  1738. sparePartSearch(queryString, cb) {
  1739. console.log('备件模糊查询输入值', queryString)
  1740. this.requestSparePart.parammaps['partCode'] = queryString
  1741. GetDataByName(this.requestSparePart).then(response => {
  1742. console.log('备件模糊查询搜索data', response.data.list)
  1743. if (response.data.list == null) {
  1744. cb([])
  1745. } else {
  1746. for (var i = 0; i < response.data.list.length; i++) {
  1747. response.data.list[i].useTypeV = '维修'
  1748. }
  1749. cb(response.data.list)
  1750. }
  1751. })
  1752. },
  1753. handleSelectSparePart(item) {
  1754. console.log('备件模糊查询选中值', item)
  1755. this.TotalAmount = 0
  1756. if (this.listAdd.length > 0) {
  1757. // eslint-disable-next-line no-redeclare
  1758. if (this.listAdd.find(obj => obj.id === item.id)) {
  1759. this.$message({
  1760. type: 'warning',
  1761. message: '此备件已存在,请重新选择备件'
  1762. })
  1763. for (let i = 0; i < this.listAdd.length; i++) {
  1764. this.TotalAmount += parseFloat(this.listAdd[i].checkoutNumber) * parseFloat(this.listAdd[i].price)
  1765. }
  1766. this.TotalAmount = this.TotalAmount.toFixed(2)
  1767. } else {
  1768. if (item.checkoutNumber == null) {
  1769. this.$set(item, 'checkoutNumber', item.reportery)
  1770. }
  1771. this.TotalAmount = parseFloat(item.checkoutNumber) * parseFloat(item.price)
  1772. if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
  1773. this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
  1774. this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
  1775. } else {
  1776. item.srcpath = ''
  1777. item.picpath = ''
  1778. }
  1779. this.listAdd.unshift(item)
  1780. this.TotalAmount = 0
  1781. for (let i = 0; i < this.listAdd.length; i++) {
  1782. this.TotalAmount += parseFloat(this.listAdd[i].checkoutNumber) * parseFloat(this.listAdd[i].price)
  1783. }
  1784. this.TotalAmount = this.TotalAmount.toFixed(2)
  1785. }
  1786. } else {
  1787. if (item.checkoutNumber == null) {
  1788. this.$set(item, 'checkoutNumber', item.reportery)
  1789. }
  1790. if (item.srcpath !== null && item.picpath !== null && item.srcpath !== undefined && item.picpath !== undefined) {
  1791. this.$set(item, 'srcpath', process.env.VUE_APP_BASE_API + item.srcpath)
  1792. this.$set(item, 'picpath', process.env.VUE_APP_BASE_API + item.picpath)
  1793. } else {
  1794. item.srcpath = ''
  1795. item.picpath = ''
  1796. }
  1797. this.listAdd.unshift(item)
  1798. this.$forceUpdate()
  1799. this.TotalAmount = 0
  1800. for (let i = 0; i < this.listAdd.length; i++) {
  1801. this.TotalAmount += parseFloat(this.listAdd[i].checkoutNumber) * parseFloat(this.listAdd[i].price)
  1802. }
  1803. this.TotalAmount = this.TotalAmount.toFixed(2)
  1804. }
  1805. console.log(this.listAdd)
  1806. // for (let i = 0; i < this.listAdd.length; i++) {
  1807. // this.TotalAmount += parseFloat(this.listAdd[i].checkoutNumber) * parseFloat(this.listAdd[i].price)
  1808. // }
  1809. // this.TotalAmount = this.TotalAmount.toFixed(2)
  1810. },
  1811. allocationSearch(queryString, cb) {
  1812. console.log(queryString)
  1813. this.requestAllocation.parammaps.applyCode = queryString
  1814. GetDataByName(this.requestAllocation).then(response => {
  1815. console.log('调拨单号模糊查询搜索data', response.data.list)
  1816. if (response.data.list !== null) {
  1817. cb(response.data.list)
  1818. } else {
  1819. cb([])
  1820. }
  1821. })
  1822. },
  1823. handleSelectAllocation(item) {
  1824. console.log('调拨单号模糊查询选中值', item)
  1825. this.createTemp.id = item.id
  1826. this.createTemp.oddCode = item.applyCode
  1827. this.getAllocationListParm.parammaps.id = item.id
  1828. this.TotalAmount = 0
  1829. this.getAllocationList()
  1830. },
  1831. getAllocationList() {
  1832. GetDataByName(this.getAllocationListParm).then(response => {
  1833. console.log('调拨单号table-data', response.data.list)
  1834. this.listAdd = response.data.list
  1835. if (response.data.list !== null) {
  1836. for (let i = 0; i < response.data.list.length; i++) {
  1837. this.TotalAmount += parseFloat(response.data.list[i].sumPrice)
  1838. this.$set(this.listAdd[i], 'warehoseCode', '')
  1839. 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) {
  1840. this.listAdd[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
  1841. this.listAdd[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
  1842. } else {
  1843. this.listAdd[i].srcpath = ''
  1844. this.listAdd[i].picpath = ''
  1845. }
  1846. }
  1847. }
  1848. this.$forceUpdate()
  1849. })
  1850. },
  1851. querySearchEqName(queryString, cb) {
  1852. console.log('备件名称/设备内部编号模糊查询输入值', queryString)
  1853. this.requestEqName.parammaps['eqName'] = queryString
  1854. GetDataByName(this.requestEqName).then(response => {
  1855. console.log('备件名称模糊查询搜索data', response.data.list)
  1856. this.EqNameList = response.data.list
  1857. cb(this.EqNameList)
  1858. })
  1859. },
  1860. handleSelectEqName(item, row) {
  1861. console.log('备件名称/设备内部编号模糊查询选中值', item)
  1862. console.log('备件名称/设备内部编号模糊查询选中值所在行', row)
  1863. this.$set(row, 'eqCode', item.eqCode)
  1864. this.$forceUpdate()
  1865. },
  1866. querySearchCode(queryString, cb) {
  1867. console.log('备件名称/设备内部编号模糊查询输入值', queryString)
  1868. this.requestEqName.parammaps['eqCode'] = queryString
  1869. GetDataByName(this.requestEqName).then(response => {
  1870. console.log('备件名称模糊查询搜索data', response.data.list)
  1871. this.EqNameList = response.data.list
  1872. cb(this.EqNameList)
  1873. })
  1874. },
  1875. // handleClear() {
  1876. // this.activated = false
  1877. // this.$emit('clear')
  1878. // },
  1879. handleSelectEqCode(item, row) {
  1880. console.log('备件名称/设备内部编号模糊查询选中值', item)
  1881. console.log('备件名称/设备内部编号模糊查询选中值所在行', row)
  1882. this.$set(row, 'eqName', item.eqName)
  1883. this.$forceUpdate()
  1884. },
  1885. blurSelectEqName(item, row) {
  1886. this.$set(row, 'eqName', '')
  1887. this.$set(row, 'eqCode', '')
  1888. },
  1889. blurSelectEqCode(item, row) {
  1890. this.$set(row, 'eqName', '')
  1891. this.$set(row, 'eqCode', '')
  1892. },
  1893. changeUseNumber(value, row) {
  1894. console.log('领用数量', value)
  1895. for (var i = 0; i < this.listAdd.length; i++) {
  1896. console.log(this.listAdd[i].id)
  1897. if (this.listAdd[i].id === row.id) {
  1898. var useNumberArray = []
  1899. useNumberArray.push(this.listAdd[i].reportery, parseInt(value))
  1900. // this.listAdd[i].checkoutNumber = Math.min.apply(null,useNumberArray)
  1901. }
  1902. }
  1903. },
  1904. changeCheckoutNumber(value, row) {
  1905. console.log('出库数量', value, row)
  1906. for (var i = 0; i < this.listAdd.length; i++) {
  1907. console.log(this.listAdd[i].id)
  1908. console.log(this.listAdd[i])
  1909. if (this.listAdd[i].id === row.id) {
  1910. var checkoutNumberArray = []
  1911. checkoutNumberArray.push(this.listAdd[i].reportery, parseInt(this.listAdd[i].amount), parseInt(value))
  1912. this.listAdd[i].minNumber = Math.min.apply(null, checkoutNumberArray)
  1913. this.$set(this.listAdd[i], 'sumPrice', parseFloat(this.listAdd[i].minNumber) * parseFloat(this.listAdd[i].price))
  1914. // this.listAdd[i].sumPrice = parseFloat(this.listAdd[i].minNumber) * parseFloat(this.listAdd[i].price)
  1915. console.log(this.rules)
  1916. }
  1917. }
  1918. console.log(this.listAdd)
  1919. },
  1920. blurCheckoutNumber(value, row) {
  1921. console.log(value, row)
  1922. this.TotalAmount = 0
  1923. this.$set(row, 'sumPrice', (parseFloat(row.price) * parseFloat(row.checkoutNumber)).toFixed(2))
  1924. console.log(this.listAdd)
  1925. for (let i = 0; i < this.listAdd.length; i++) {
  1926. this.TotalAmount += parseFloat(this.listAdd[i].sumPrice)
  1927. }
  1928. this.TotalAmount = this.TotalAmount.toFixed(2)
  1929. },
  1930. partDelete(row) {
  1931. console.log(this.listAdd)
  1932. MessageBox.confirm('备件名称:' + row.partName, '确认删除?', {
  1933. confirmButtonText: '确认',
  1934. cancelButtonText: '取消',
  1935. type: 'warning'
  1936. }).then(() => {
  1937. this.TotalAmount = 0
  1938. for (var i = 0; i < this.listAdd.length; i++) {
  1939. console.log(this.listAdd[i])
  1940. if (this.listAdd[i].id === row.id) {
  1941. var listAddIndex = this.listAdd.indexOf(this.listAdd[i])
  1942. }
  1943. if (listAddIndex > -1) {
  1944. this.listAdd.splice(listAddIndex, 1)
  1945. console.log(this.listAdd)
  1946. for (let i = 0; i < this.listAdd.length; i++) {
  1947. this.TotalAmount += parseFloat(this.listAdd[i].checkoutNumber) * parseFloat(this.listAdd[i].price)
  1948. }
  1949. return
  1950. }
  1951. }
  1952. console.log(this.listAdd)
  1953. this.TotalAmount = this.TotalAmount.toFixed(2)
  1954. })
  1955. },
  1956. add_dialog_save() {
  1957. this.isokDisable = true
  1958. setTimeout(() => {
  1959. this.isokDisable = false
  1960. }, 1000)
  1961. this.$refs['createTemp'].validate(valid => {
  1962. if (valid) {
  1963. if (this.createTemp.useForm == '' || this.createTemp.useForm == null || this.createTemp.useForm == undefined) {
  1964. GetDataByName(this.getParmCreateNumber).then(response => {
  1965. this.$nextTick(() => {
  1966. console.log('新增领用单号', response.data.list[0].orderCode)
  1967. this.createTemp.useForm = response.data.list[0].orderCode
  1968. this.$forceUpdate()
  1969. this.add_dialog_saveSave()
  1970. })
  1971. })
  1972. } else {
  1973. this.add_dialog_saveSave()
  1974. }
  1975. }
  1976. })
  1977. },
  1978. add_dialog_saveSave() {
  1979. if (this.listAdd.length !== 0) {
  1980. if (this.createTemp.useType === 0) {
  1981. // 领用出库
  1982. this.postDataPramas.common = { 'returnmap': '0' }
  1983. this.postDataPramas.data = []
  1984. for (var j = 0; j < this.listAdd.length; j++) {
  1985. if (this.listAdd[j].useTypeV == null || this.listAdd[j].checkoutNumber == null || this.listAdd[j].checkoutNumber == '') {
  1986. this.$message({
  1987. type: 'warning',
  1988. message: '请检查费用类型或出库数量是否未填写',
  1989. duration: 2000
  1990. })
  1991. return false
  1992. } else {
  1993. var rulesCheckoutNumber = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
  1994. if (!rulesCheckoutNumber.test(parseFloat(this.listAdd[j].checkoutNumber))) {
  1995. this.$message({
  1996. type: 'error',
  1997. message: '出库数量请输入正数,最多保留两位小数点',
  1998. duration: 2000
  1999. })
  2000. return false
  2001. } else {
  2002. if (parseFloat(this.listAdd[j].checkoutNumber) > parseFloat(this.listAdd[j].amount) || parseFloat(this.listAdd[j].checkoutNumber) > parseFloat(this.listAdd[j].reportery)) {
  2003. this.$message({
  2004. type: 'warning',
  2005. message: '出库数量不可大于领用数量或库位库存数',
  2006. duration: 2000
  2007. })
  2008. return false
  2009. }
  2010. }
  2011. this.$set(this.listAdd[j], 'checkoutNumber', (this.listAdd[j].checkoutNumber).toString())
  2012. }
  2013. }
  2014. if (this.createTemp.applyType === '维修') {
  2015. this.createTemp.useType = 0
  2016. } else if (this.createTemp.applyType === '保养') {
  2017. this.createTemp.useType = 2
  2018. } else if (this.createTemp.applyType === '非维保') {
  2019. this.createTemp.useType = 3
  2020. }
  2021. console.log(this.orderPart.applyCode)
  2022. this.postDataPramas.data[0] = { 'name': 'insertBigPartUse', 'type': 'e', 'parammaps': {
  2023. pastureId: this.createTemp.pastureId,
  2024. departmentId: this.createTemp.departmentId,
  2025. useForm: this.createTemp.useForm,
  2026. oddCode: this.orderPart.applyCode,
  2027. useType: this.createTemp.useType,
  2028. applicatId: this.createTemp.applicatId,
  2029. receiveTime: this.createTemp.receiveTime,
  2030. empId: this.createTemp.empId,
  2031. note: this.createTemp.note
  2032. }}
  2033. this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
  2034. this.postDataPramas.data[1].children = []
  2035. this.postDataPramas.data[1].children[0] = { 'name': 'insertPartUse', 'type': 'e', 'parammaps': {
  2036. bigId: '@insertBigPartUse.LastInsertId',
  2037. locationId: '@insertSpotList.locationId',
  2038. departmentId: '@insertSpotList.departmentId',
  2039. partId: '@insertSpotList.partId',
  2040. partCode: '@insertSpotList.partCode',
  2041. partName: '@insertSpotList.partName',
  2042. specification: '@insertSpotList.specification',
  2043. price: '@insertSpotList.price',
  2044. unit: '@insertSpotList.unit',
  2045. brandId: '@insertSpotList.brandId',
  2046. contractId: '@insertSpotList.contractId',
  2047. useNumber: '@insertSpotList.amount',
  2048. checkoutNumber: '@insertSpotList.checkoutNumber',
  2049. eqName: '@insertSpotList.eqName',
  2050. eqCode: '@insertSpotList.eqCode',
  2051. reportery: '@insertSpotList.reportery',
  2052. useTypeV: '@insertSpotList.useTypeV',
  2053. note: '@insertSpotList.note'
  2054. }}
  2055. this.postDataPramas.data[1].children[1] = { 'name': 'insertPartUseRepertory', 'type': 'e', 'parammaps': {
  2056. checkoutNumber: '@insertSpotList.checkoutNumber',
  2057. pastureId: '@insertSpotList.pastureId',
  2058. locationId: '@insertSpotList.locationId',
  2059. location: '@insertSpotList.location',
  2060. partId: '@insertSpotList.partId',
  2061. partCode: '@insertSpotList.partCode',
  2062. partName: '@insertSpotList.partName',
  2063. specification: '@insertSpotList.specification',
  2064. providerId: '@insertSpotList.providerId',
  2065. providerName: '@insertSpotList.providerName',
  2066. brandId: '@insertSpotList.brandId',
  2067. price: '@insertSpotList.price',
  2068. unit: '@insertSpotList.unit',
  2069. contractId: '@insertSpotList.contractId'
  2070. }}
  2071. this.postDataPramas.data[1].children[2] = { 'name': 'updatePartapplyuseAmount', 'type': 'e', 'parammaps': {
  2072. paid: '@insertSpotList.paid',
  2073. checkoutNumber: '@insertSpotList.checkoutNumber'
  2074. }}
  2075. this.postDataPramas.data[2] = { 'name': 'updateBigPartApplystatue', 'type': 'e', 'parammaps': {
  2076. bid: this.createTemp.bid
  2077. }}
  2078. ExecDataByConfig(this.postDataPramas).then(response => {
  2079. console.log('新增保存发送参数', this.postDataPramas)
  2080. if (response.msg === 'fail') {
  2081. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  2082. } else {
  2083. this.getdataListParm.parammaps.inputDatetime = ''
  2084. setTimeout(() => {
  2085. this.getList()
  2086. }, 1000)
  2087. this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  2088. this.dialogFormVisible = false
  2089. }
  2090. })
  2091. return true
  2092. } else if (this.createTemp.useType === 1) {
  2093. // 手动出库
  2094. this.postDataPramas.common = { 'returnmap': '0' }
  2095. this.postDataPramas.data = []
  2096. for (var j = 0; j < this.listAdd.length; j++) {
  2097. if (this.listAdd[j].eqName == '' || this.listAdd[j].eqCode == '' || this.listAdd[j].eqName == null || this.listAdd[j].useTypeV == null || this.listAdd[j].eqCode == null || this.listAdd[j].checkoutNumber == null || this.listAdd[j].checkoutNumber == '') {
  2098. this.$message({
  2099. type: 'warning',
  2100. message: '请检查备件名称或设备内部编号或费用类型或出库数量是否未填写',
  2101. duration: 2000
  2102. })
  2103. return false
  2104. } else {
  2105. // eslint-disable-next-line no-redeclare
  2106. var rulesCheckoutNumber = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
  2107. if (!rulesCheckoutNumber.test(parseFloat(this.listAdd[j].checkoutNumber))) {
  2108. this.$message({
  2109. type: 'error',
  2110. message: '出库数量请输入正数,最多保留两位小数点',
  2111. duration: 2000
  2112. })
  2113. return false
  2114. } else {
  2115. if (parseFloat(this.listAdd[j].checkoutNumber) > parseFloat(this.listAdd[j].reportery)) {
  2116. this.$message({
  2117. type: 'warning',
  2118. message: '出库数量不能大于库位库存数',
  2119. duration: 2000
  2120. })
  2121. this.$set(this.listAdd.find(obj => obj.checkoutNumber == this.listAdd[j].checkoutNumber), 'isNo', 'No')
  2122. return false
  2123. } else {
  2124. this.$set(this.listAdd.find(obj => obj.checkoutNumber == this.listAdd[j].checkoutNumber), 'isNo', 'Yes')
  2125. }
  2126. }
  2127. }
  2128. }
  2129. this.postDataPramas.data[0] = { 'name': 'insertBigPartUse', 'type': 'e', 'parammaps': {
  2130. pastureId: this.createTemp.pastureId,
  2131. departmentId: this.createTemp.departmentId,
  2132. useForm: this.createTemp.useForm,
  2133. useType: this.createTemp.useType,
  2134. applicatId: this.createTemp.applicatId,
  2135. receiveTime: this.createTemp.receiveTime,
  2136. empId: this.createTemp.empId,
  2137. note: this.createTemp.note
  2138. }}
  2139. this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
  2140. this.postDataPramas.data[1].children = []
  2141. this.postDataPramas.data[1].children[0] = { 'name': 'insertPartUse', 'type': 'e', 'parammaps': {
  2142. bigId: '@insertBigPartUse.LastInsertId',
  2143. locationId: '@insertSpotList.locationId',
  2144. departmentId: '@insertSpotList.departmentId',
  2145. partId: '@insertSpotList.partId',
  2146. partCode: '@insertSpotList.partCode',
  2147. partName: '@insertSpotList.partName',
  2148. specification: '@insertSpotList.specification',
  2149. price: '@insertSpotList.price',
  2150. unit: '@insertSpotList.unit',
  2151. brandId: '@insertSpotList.brandId',
  2152. contractId: '@insertSpotList.contractId',
  2153. useNumber: 0,
  2154. checkoutNumber: '@insertSpotList.checkoutNumber',
  2155. eqName: '@insertSpotList.eqName',
  2156. eqCode: '@insertSpotList.eqCode',
  2157. reportery: '@insertSpotList.reportery',
  2158. useTypeV: '@insertSpotList.useTypeV',
  2159. note: '@insertSpotList.note'
  2160. }}
  2161. this.postDataPramas.data[1].children[1] = { 'name': 'insertPartUseRepertory', 'type': 'e', 'parammaps': {
  2162. checkoutNumber: '@insertSpotList.checkoutNumber',
  2163. pastureId: '@insertSpotList.pastureId',
  2164. locationId: '@insertSpotList.locationId',
  2165. location: '@insertSpotList.location',
  2166. partId: '@insertSpotList.partId',
  2167. partCode: '@insertSpotList.partCode',
  2168. partName: '@insertSpotList.partName',
  2169. specification: '@insertSpotList.specification',
  2170. providerId: '@insertSpotList.providerId',
  2171. providerName: '@insertSpotList.providerName',
  2172. brandId: '@insertSpotList.brandId',
  2173. price: '@insertSpotList.price',
  2174. unit: '@insertSpotList.unit',
  2175. contractId: '@insertSpotList.contractId'
  2176. }}
  2177. ExecDataByConfig(this.postDataPramas).then(response => {
  2178. console.log('新增保存发送参数', this.postDataPramas)
  2179. if (response.msg === 'fail') {
  2180. this.$notify({
  2181. title: '保存失败',
  2182. message: response.data,
  2183. type: 'warning',
  2184. duration: 2000
  2185. })
  2186. } else {
  2187. this.getdataListParm.parammaps.inputDatetime = ''
  2188. setTimeout(() => {
  2189. this.getList()
  2190. }, 1000)
  2191. this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  2192. this.dialogFormVisible = false
  2193. }
  2194. })
  2195. return true
  2196. } else if (this.createTemp.useType === 2) {
  2197. // 调拨出库
  2198. this.postDataPramas.common = { 'returnmap': '0' }
  2199. this.postDataPramas.data = []
  2200. // for (var j = 0; j < this.listAdd.length; j++) {
  2201. // if (this.listAdd[j].useTypeV == null) {
  2202. // this.$message({
  2203. // type: 'warning',
  2204. // message: '请检查备费用类型是否未填写',
  2205. // duration: 2000
  2206. // })
  2207. // return false
  2208. // }
  2209. // }
  2210. this.postDataPramas.data[0] = { 'name': 'insertBigPartUse', 'type': 'e', 'parammaps': {
  2211. pastureId: this.createTemp.pastureId,
  2212. departmentId: this.$store.state.user.departmentid,
  2213. useForm: this.createTemp.useForm,
  2214. useType: 4,
  2215. applicatId: this.createTemp.applicatId,
  2216. receiveTime: this.createTemp.receiveTime,
  2217. empId: this.createTemp.empId,
  2218. oddCode: this.createTemp.oddCode,
  2219. note: this.createTemp.note
  2220. }}
  2221. this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
  2222. this.postDataPramas.data[1].children = []
  2223. this.postDataPramas.data[1].children[0] = { 'name': 'insertPartUse', 'type': 'e', 'parammaps': {
  2224. bigId: '@insertBigPartUse.LastInsertId',
  2225. locationId: -1,
  2226. contractId: '@insertSpotList.contractId',
  2227. providerName: '@insertSpotList.providerName',
  2228. providerId: '@insertSpotList.providerId',
  2229. departmentId: '@insertSpotList.departmentId',
  2230. partId: '@insertSpotList.partId',
  2231. partCode: '@insertSpotList.partCode',
  2232. partName: '@insertSpotList.partName',
  2233. specification: '@insertSpotList.specification',
  2234. price: '@insertSpotList.price',
  2235. unit: '@insertSpotList.unit',
  2236. brandId: '@insertSpotList.brandId',
  2237. useNumber: 0,
  2238. checkoutNumber: '@insertSpotList.amount',
  2239. eqName: '@insertSpotList.eqName',
  2240. eqCode: '@insertSpotList.eqCode',
  2241. reportery: 0,
  2242. useTypeV: '@insertSpotList.useTypeV',
  2243. note: '@insertSpotList.note'
  2244. }}
  2245. this.postDataPramas.data[1].children[1] = { 'name': 'updatePartUseRepertory', 'type': 'e', 'parammaps': {
  2246. checkoutNumber: '@insertSpotList.amount',
  2247. partRepId: '@insertSpotList.partRepId'
  2248. }}
  2249. this.postDataPramas.data[2] = { 'name': 'updateBigPartTransfer', 'type': 'e', 'parammaps': {
  2250. id: this.createTemp.id,
  2251. statue: 4,
  2252. useCode: this.createTemp.useForm
  2253. }}
  2254. ExecDataByConfig(this.postDataPramas).then(response => {
  2255. console.log(this.listAdd)
  2256. console.log('新增保存发送参数', this.postDataPramas)
  2257. if (response.msg === 'fail') {
  2258. this.$notify({
  2259. title: '保存失败',
  2260. message: response.data,
  2261. type: 'warning',
  2262. duration: 2000
  2263. })
  2264. } else {
  2265. this.getdataListParm.parammaps.inputDatetime = ''
  2266. setTimeout(() => {
  2267. this.getList()
  2268. }, 1000)
  2269. this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  2270. this.dialogFormVisible = false
  2271. }
  2272. })
  2273. return true
  2274. }else if(this.createTemp.useType === 5){
  2275. // 报废出库
  2276. this.postDataPramas.common = { 'returnmap': '0' }
  2277. this.postDataPramas.data = []
  2278. for (var j = 0; j < this.listAdd.length; j++) {
  2279. if (this.listAdd[j].eqName == '' || this.listAdd[j].eqCode == '' || this.listAdd[j].eqName == null || this.listAdd[j].useTypeV == null || this.listAdd[j].eqCode == null || this.listAdd[j].checkoutNumber == null || this.listAdd[j].checkoutNumber == '') {
  2280. this.$message({
  2281. type: 'warning',
  2282. message: '请检查备件名称或设备内部编号或费用类型或出库数量是否未填写',
  2283. duration: 2000
  2284. })
  2285. return false
  2286. } else {
  2287. // eslint-disable-next-line no-redeclare
  2288. var rulesCheckoutNumber = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
  2289. if (!rulesCheckoutNumber.test(parseFloat(this.listAdd[j].checkoutNumber))) {
  2290. this.$message({
  2291. type: 'error',
  2292. message: '出库数量请输入正数,最多保留两位小数点',
  2293. duration: 2000
  2294. })
  2295. return false
  2296. } else {
  2297. if (parseFloat(this.listAdd[j].checkoutNumber) > parseFloat(this.listAdd[j].reportery)) {
  2298. this.$message({
  2299. type: 'warning',
  2300. message: '出库数量不能大于库位库存数',
  2301. duration: 2000
  2302. })
  2303. this.$set(this.listAdd.find(obj => obj.checkoutNumber == this.listAdd[j].checkoutNumber), 'isNo', 'No')
  2304. return false
  2305. } else {
  2306. this.$set(this.listAdd.find(obj => obj.checkoutNumber == this.listAdd[j].checkoutNumber), 'isNo', 'Yes')
  2307. }
  2308. }
  2309. }
  2310. }
  2311. this.postDataPramas.data[0] = { 'name': 'insertBigPartUse', 'type': 'e', 'parammaps': {
  2312. pastureId: this.createTemp.pastureId,
  2313. departmentId: this.createTemp.departmentId,
  2314. useForm: this.createTemp.useForm,
  2315. useType: this.createTemp.useType,
  2316. applicatId: this.createTemp.applicatId,
  2317. receiveTime: this.createTemp.receiveTime,
  2318. empId: this.createTemp.empId,
  2319. note: this.createTemp.note
  2320. }}
  2321. this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
  2322. this.postDataPramas.data[1].children = []
  2323. this.postDataPramas.data[1].children[0] = { 'name': 'insertPartUse', 'type': 'e', 'parammaps': {
  2324. bigId: '@insertBigPartUse.LastInsertId',
  2325. locationId: '@insertSpotList.locationId',
  2326. departmentId: '@insertSpotList.departmentId',
  2327. partId: '@insertSpotList.partId',
  2328. partCode: '@insertSpotList.partCode',
  2329. partName: '@insertSpotList.partName',
  2330. specification: '@insertSpotList.specification',
  2331. price: '@insertSpotList.price',
  2332. unit: '@insertSpotList.unit',
  2333. brandId: '@insertSpotList.brandId',
  2334. contractId: '@insertSpotList.contractId',
  2335. useNumber: 0,
  2336. checkoutNumber: '@insertSpotList.checkoutNumber',
  2337. eqName: '@insertSpotList.eqName',
  2338. eqCode: '@insertSpotList.eqCode',
  2339. reportery: '@insertSpotList.reportery',
  2340. useTypeV: '@insertSpotList.useTypeV',
  2341. note: '@insertSpotList.note'
  2342. }}
  2343. this.postDataPramas.data[1].children[1] = { 'name': 'insertPartUseRepertory', 'type': 'e', 'parammaps': {
  2344. checkoutNumber: '@insertSpotList.checkoutNumber',
  2345. pastureId: '@insertSpotList.pastureId',
  2346. locationId: '@insertSpotList.locationId',
  2347. location: '@insertSpotList.location',
  2348. partId: '@insertSpotList.partId',
  2349. partCode: '@insertSpotList.partCode',
  2350. partName: '@insertSpotList.partName',
  2351. specification: '@insertSpotList.specification',
  2352. providerId: '@insertSpotList.providerId',
  2353. providerName: '@insertSpotList.providerName',
  2354. brandId: '@insertSpotList.brandId',
  2355. price: '@insertSpotList.price',
  2356. unit: '@insertSpotList.unit',
  2357. contractId: '@insertSpotList.contractId'
  2358. }}
  2359. ExecDataByConfig(this.postDataPramas).then(response => {
  2360. console.log('新增保存发送参数', this.postDataPramas)
  2361. if (response.msg === 'fail') {
  2362. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  2363. } else {
  2364. this.getdataListParm.parammaps.inputDatetime = ''
  2365. setTimeout(() => {
  2366. this.getList()
  2367. }, 1000)
  2368. this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  2369. this.dialogFormVisible = false
  2370. }
  2371. })
  2372. return true
  2373. }
  2374. } else {
  2375. this.$notify({
  2376. title: '',
  2377. message: '请选择备件',
  2378. type: 'warning',
  2379. duration: 2000
  2380. })
  2381. return false
  2382. }
  2383. },
  2384. tableCellStyle({ row, column, rowIndex, columnIndex }) {
  2385. if (row.isNo == 'No' && columnIndex === 13) {
  2386. return {
  2387. background: 'red'
  2388. }
  2389. }
  2390. return {
  2391. background: ''
  2392. }
  2393. },
  2394. // 导入
  2395. beforeImportExcel(file) {
  2396. const isLt2M = file.size / 1024 / 1024 < 10
  2397. if (!isLt2M) {
  2398. this.$message.error('上传文件大小不能超过 10MB!')
  2399. }
  2400. return isLt2M
  2401. },
  2402. handleImportExcelSuccess(res, file) {
  2403. if (res.msg === 'ok') {
  2404. this.$message({
  2405. title: '成功',
  2406. message: '导入成功:' + res.data.success + '条!',
  2407. type: 'success',
  2408. duration: 2000
  2409. })
  2410. if (res.data.err_count > 0) {
  2411. this.$notify({
  2412. title: '失败',
  2413. message: '导入失败:' + res.data.err_count + '条!',
  2414. type: 'danger',
  2415. duration: 2000
  2416. })
  2417. import('@/vendor/Export2Excel').then(excel => {
  2418. const list1 = res.data.result
  2419. const tHeader = [
  2420. '牧场', '领用单编号', '领用日期', '物料编码', '品名', '规格型号', '品牌', '计量单位', '实发数量', '单价', '总价', '库位', '供应商', '名称', '牧场设备编号', '具体用处', '领用类型', '领用部门', '领用人', 'SignColumn', '报错信息'
  2421. ]
  2422. const filterVal = [
  2423. '牧场', '领用单编号', '领用日期', '物料编码', '品名', '规格型号', '品牌', '计量单位', '实发数量', '单价', '总价', '库位', '供应商', '名称', '牧场设备编号', '具体用处', '领用类型', '领用部门', '领用人', 'SignColumn', 'error_msg'
  2424. ]
  2425. const data1 = this.formatJson(filterVal, list1)
  2426. excel.export_json_to_excel({
  2427. header: tHeader,
  2428. data: data1,
  2429. filename: this.requestParam.parammaps.formType,
  2430. autoWidth: true,
  2431. bookType: 'xlsx'
  2432. })
  2433. })
  2434. }
  2435. } else {
  2436. this.$notify({
  2437. title: '失败',
  2438. message: '上传失败',
  2439. type: 'danger',
  2440. duration: 2000
  2441. })
  2442. }
  2443. },
  2444. formatJsonTemp(filterVal, jsonData) {
  2445. return jsonData.map(v =>
  2446. filterVal.map(j => {
  2447. if (j === 'timestamp') {
  2448. return parseTime(v[j])
  2449. } else {
  2450. return v[j]
  2451. }
  2452. })
  2453. )
  2454. },
  2455. // 导出
  2456. handleDownload() {
  2457. this.$alert('备件出库信息正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
  2458. this.isPercentage = true
  2459. this.percentage = 1
  2460. var timer = setInterval(() => {
  2461. this.percentage += 5
  2462. if (this.percentage > 95) {
  2463. this.percentage = 99
  2464. clearInterval(timer)
  2465. }
  2466. this.percentage = this.percentage
  2467. }, 1000)
  2468. this.requestParam.parammaps.formType = '备件出库信息'
  2469. this.requestParam.parammaps.inputDatetime = this.getdataListParm.parammaps.inputDatetime
  2470. this.requestParam.parammaps.pastureName = this.getdataListParm.parammaps.pastureName
  2471. this.requestParam.parammaps.departmentId = this.getdataListParm.parammaps.departmentId
  2472. this.requestParam.parammaps.useForm = this.getdataListParm.parammaps.useForm
  2473. this.requestParam.parammaps.useType = this.getdataListParm.parammaps.useType
  2474. this.requestParam.parammaps.startTime = this.getdataListParm.parammaps.startTime
  2475. this.requestParam.parammaps.stopTime = this.getdataListParm.parammaps.stopTime
  2476. GetAccount(this.requestParam).then(response => {
  2477. this.$nextTick(() => {
  2478. import('@/vendor/Export2Excel').then(excel => {
  2479. const list1 = response.data.list
  2480. if (response.data.list !== '') {
  2481. this.percentage = 99
  2482. setTimeout(() => {
  2483. this.isPercentage = false
  2484. }, 2000)
  2485. }
  2486. const tHeader = [
  2487. '牧场', '领用单编号', '领用日期', '物料编码', '品名', '规格型号', '品牌', '计量单位', '实发数量', '单价', '总价', '库位', '供应商', '名称', '牧场设备编号', '领用类型', '领用部门', '领用人', '备注']
  2488. const filterVal = [
  2489. 'pastureName', 'useForm', 'creatTime', 'partCode', 'partName', 'specification', 'brandName', 'unit', 'checkoutNumber', 'price', 'sumPrice', 'warehoseCode', 'providerName', 'eqName', 'eqCode', 'useTypeV', 'departmentName', 'appliname', 'note'
  2490. ]
  2491. const data1 = this.formatJson(filterVal, list1)
  2492. excel.export_json_to_excel({ header: tHeader, data: data1, filename: this.requestParam.parammaps.formType, autoWidth: true, bookType: 'xlsx' })
  2493. })
  2494. })
  2495. })
  2496. },
  2497. handleDownload2() {
  2498. this.$alert('备件出库记录正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
  2499. this.isPercentage = true
  2500. this.percentage = 1
  2501. var timer = setInterval(() => {
  2502. this.percentage += 5
  2503. if (this.percentage > 95) {
  2504. this.percentage = 99
  2505. clearInterval(timer)
  2506. }
  2507. this.percentage = this.percentage
  2508. }, 1000)
  2509. this.requestParam = {}
  2510. this.requestParam.name = 'getPartuseDetailList'
  2511. this.requestParam.parammaps = {}
  2512. this.requestParam.parammaps.formType = '备件出库记录'
  2513. this.requestParam.parammaps.inputDatetime = this.getdataListParm2.parammaps.inputDatetime
  2514. this.requestParam.parammaps.pastureName = this.getdataListParm2.parammaps.pastureName
  2515. this.requestParam.parammaps.departmentId = this.getdataListParm2.parammaps.departmentId
  2516. this.requestParam.parammaps.startTime = this.getdataListParm2.parammaps.startTime
  2517. this.requestParam.parammaps.stopTime = this.getdataListParm2.parammaps.stopTime
  2518. this.requestParam.parammaps.useForm = this.getdataListParm2.parammaps.useForm
  2519. this.requestParam.parammaps.partCode = this.getdataListParm2.parammaps.partCode
  2520. this.requestParam.parammaps.partName = this.getdataListParm2.parammaps.partName
  2521. this.requestParam.parammaps.providerId = this.getdataListParm2.parammaps.providerId
  2522. GetAccount(this.requestParam).then(response => {
  2523. this.$nextTick(() => {
  2524. import('@/vendor/Export2Excel').then(excel => {
  2525. const list1 = response.data.list
  2526. if (response.data.list !== '') {
  2527. this.percentage = 99
  2528. setTimeout(() => {
  2529. this.isPercentage = false
  2530. }, 2000)
  2531. }
  2532. const tHeader = [
  2533. '牧场', '出库单号', '备件编号', '备件名称', '备件规格', '备件品牌', '计量单位', ' 供应商', '设备名称', '设备内部编号', '费用类型', '库位', '期初库存', '出库数量', '单价', '总价 ', '领用部门 ', '领用人', '录入人 ', '出库 日期', '备注 '
  2534. ]
  2535. const filterVal = [
  2536. 'pastureName', 'useForm', 'partCode', 'partName', 'specification', 'brandName', 'unit', 'providerName', 'eqName', 'eqCode', 'useTypeV', 'warehoseCode', 'reportery', 'checkoutNumber', 'price', 'sumPrice', 'departmentName', 'appliname', 'empname', 'creatTime', 'note'
  2537. ]
  2538. const data1 = this.formatJson(filterVal, list1)
  2539. excel.export_json_to_excel({ header: tHeader, data: data1, filename: this.requestParam.parammaps.formType, autoWidth: true, bookType: 'xlsx' })
  2540. })
  2541. })
  2542. })
  2543. },
  2544. handleDownloadEas() {
  2545. this.$alert('备件出库EAS信息正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
  2546. this.isPercentage = true
  2547. this.percentage = 1
  2548. var timer = setInterval(() => {
  2549. this.percentage += 5
  2550. if (this.percentage > 95) {
  2551. this.percentage = 99
  2552. clearInterval(timer)
  2553. }
  2554. this.percentage = this.percentage
  2555. }, 1000)
  2556. this.requestParam.name = 'downloadPartUseEAS'
  2557. this.requestParam.parammaps.inputDatetime = this.getdataListParm.parammaps.inputDatetime
  2558. this.requestParam.parammaps.pastureName = this.getdataListParm.parammaps.pastureName
  2559. this.requestParam.parammaps.departmentId = this.getdataListParm.parammaps.departmentId
  2560. this.requestParam.parammaps.useForm = this.getdataListParm.parammaps.useForm
  2561. this.requestParam.parammaps.useType = this.getdataListParm.parammaps.useType
  2562. this.requestParam.parammaps.startTime = this.getdataListParm.parammaps.startTime
  2563. this.requestParam.parammaps.stopTime = this.getdataListParm.parammaps.stopTime
  2564. GetAccount(this.requestParam).then(response => {
  2565. if (response.data.list !== '') {
  2566. this.percentage = 99
  2567. setTimeout(() => {
  2568. this.isPercentage = false
  2569. }, 2000)
  2570. }
  2571. this.$nextTick(() => {
  2572. import('@/vendor/Export2Excel').then(excel => {
  2573. const list1 = response.data.list
  2574. const tHeader = [
  2575. '*单据编号', '业务日期', '领料出库单明细$成本对象_名称_l2', '领料出库单明细$成本对象_编码', '领料出库单明细$仓库_编码', '领料出库单明细$库位_编码', '领料出库单明细$仓管员_编码', '领料出库单体$领料人_编码', '领料出库单明细_批次', '领料出库单明细_数量', '领料出库单明细_辅助数量', '领料出库单明细_单位实际成本', '领料出库单明细_实际成本', '领料出库单明细_生产日期', '领料出库单明细_到期日期', '领料出库单明细$物料_规格型号', '领料出库单明细$物料_名称_l2', '领料出库单明细$物料_编码', '领料出库单明细$辅助属性_编码', '领料出库单明细$计量单位_编码', '领料出库单明细$辅助计量单位_编码', '领料出库单明细_订单单号', '领料出库单明细_备注', '成本中心_编码', '需求方库存组织_编码', '需方库存组织_名称_l2', '部门_编码', '事务类型_名称_l2', '*事务类型_编码', '创建者_用户名', '创建时间', '领料出库单明细$生产线', '领料出库单明细$班组', '领料出库单明细$领料工序', '领料出库单明细$负责人', '领料出库单明细$成本对象组_单据编号', '领料出库单明细$成本对象组_名称_l2', '领料出库单明细$成本项目_编码', '领料出库单明细$成本项目_名称_l2', '领料出库单体$项目号_编码', '领料出库单体$跟踪号_编码', '摘要', '供应方库存组织_编码', '供应方财务组织_编码', '需求方财务组织_编码', '供方仓库_编码', '供方库位_编码', '结算价', '需方仓库_编码', '需方库位_编码', '仓管员_编码', '领料出库单明细$主制部门_编码', '领料出库单明细$主制部门_名称_l2', '领料出库单明细$成本中心_编码', '领料出库单明细$成本中心_名称_l2', '业务类型_编码', '业务类型_名称'
  2576. ]
  2577. const filterVal = [
  2578. '*单据编号', '业务日期', '领料出库单明细$成本对象_名称_l2', '领料出库单明细$成本对象_编码', '领料出库单明细$仓库_编码', '领料出库单明细$库位_编码', '领料出库单明细$仓管员_编码', '领料出库单体$领料人_编码', '领料出库单明细_批次', '领料出库单明细_数量', '领料出库单明细_辅助数量', '领料出库单明细_单位实际成本', '领料出库单明细_实际成本', '领料出库单明细_生产日期', '领料出库单明细_到期日期', '领料出库单明细$物料_规格型号', '领料出库单明细$物料_名称_l2', '领料出库单明细$物料_编码', '领料出库单明细$辅助属性_编码', '领料出库单明细$计量单位_编码', '领料出库单明细$辅助计量单位_编码', '领料出库单明细_订单单号', '领料出库单明细_备注', '成本中心_编码', '需求方库存组织_编码', '需方库存组织_名称_l2', '部门_编码', '事务类型_名称_l2', '*事务类型_编码', '创建者_用户名', '创建时间', '领料出库单明细$生产线', '领料出库单明细$班组', '领料出库单明细$领料工序', '领料出库单明细$负责人', '领料出库单明细$成本对象组_单据编号', '领料出库单明细$成本对象组_名称_l2', '领料出库单明细$成本项目_编码', '领料出库单明细$成本项目_名称_l2', '领料出库单体$项目号_编码', '领料出库单体$跟踪号_编码', '摘要', '供应方库存组织_编码', '供应方财务组织_编码', '需求方财务组织_编码', '供方仓库_编码', '供方库位_编码', '结算价', '需方仓库_编码', '需方库位_编码', '仓管员_编码', '领料出库单明细$主制部门_编码', '领料出库单明细$主制部门_名称_l2', '领料出库单明细$成本中心_编码', '领料出库单明细$成本中心_名称_l2', '业务类型_编码', '业务类型_名称'
  2579. ]
  2580. const tmultiHeader = [['EAS', '7.5.0', '领料出库单',
  2581. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  2582. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  2583. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  2584. '', '', '', '', '', '', '', '', ''],
  2585. ['MaterialReq', '领料出库单', '', '', '', '', '', '', '', '', '', '',
  2586. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  2587. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  2588. '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''],
  2589. ['FNumber', 'FBizDate', 'FEntry$costObject_name_l2', 'FEntry$costObject_number', 'FEntry$warehouse_number', 'FEntry$location_number', 'FEntry$stocker_number', 'FEntry$picker_number', 'FEntry_lot', 'FEntry_qty', 'FEntry_assistQty', 'FEntry_unitActualCost', 'FEntry_actualCost', 'FEntry_mfg', 'FEntry_exp', 'FEntry$material_model', 'FEntry$material_name_l2', 'FEntry$material_number', 'FEntry$assistProperty_number', 'FEntry$unit_number', 'FEntry$assistUnit_number', 'FEntry_OrderNumber', 'FEntry_remark', 'FCostCenterOrgUnit_number', 'FStorageOrgUnit_number', 'FStorageOrgUnit_name_l2', 'FAdminOrgUnit_number', 'FTransactionType_name_l2', 'FTransactionType_number', 'FCreator_number', 'FCreateTime', 'FEntry$ProductLine_number', 'FEntry$ClassGroup_number', 'FEntry$ProductLineWPEntry_number', 'FEntry$person_number', 'FEntry$costObjectSuite_number', 'FEntry$costObjectSuite_name_l2', 'FEntry$costItem_number', 'FEntry$costItem_name_l2', 'FEntry$project_number', 'FEntry$trackNumber_number', 'FDescription', 'FSupplyStoreOrgUnit_number', 'FSupplyCompanyOrgUnit_number', 'FDemandCompanyOrgUnit_number', 'FEntry$SupplyWarehouse_number', 'FEntry$SupplyLocation_number', 'FEntry$SettlePrice', 'FEntry$Warehouse_number', 'FEntry$Location_number', 'FEntry$Stocker_number', 'FEntry$AdminOrgUnit1_number', 'FEntry$AdminOrgUnit1_name', 'FEntry$CostCenterOrgUnit1_number', 'FEntry$CostCenterOrgUnit1_name', 'FBizType_number', 'FBizType_name_l2'
  2590. ]]
  2591. // const tmerges=['B1:D2']
  2592. if (list1 !== null) {
  2593. const data1 = this.formatJsonTemp(filterVal, list1)
  2594. excel.export_json_to_excel({
  2595. // merges: tmerges,
  2596. multiHeader: tmultiHeader,
  2597. header: tHeader,
  2598. data: data1,
  2599. filename: '备件出库EAS',
  2600. autoWidth: true,
  2601. bookType: 'xlsx'
  2602. })
  2603. } else {
  2604. this.$notify({
  2605. title: '',
  2606. message: '无备件领用完成信息,无法导出!',
  2607. type: 'warning',
  2608. duration: 2000
  2609. })
  2610. }
  2611. })
  2612. })
  2613. })
  2614. },
  2615. handleDownloadEas1() {
  2616. this.$alert('备件出库EAS信息正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
  2617. this.isPercentage = true
  2618. this.percentage = 1
  2619. var timer = setInterval(() => {
  2620. this.percentage += 5
  2621. if (this.percentage > 95) {
  2622. this.percentage = 99
  2623. clearInterval(timer)
  2624. }
  2625. this.percentage = this.percentage
  2626. }, 1000)
  2627. this.requestParam.name = 'downloadPartUseEASYuan'
  2628. this.requestParam.parammaps.inputDatetime = this.getdataListParm.parammaps.inputDatetime
  2629. this.requestParam.parammaps.pastureName = this.getdataListParm.parammaps.pastureName
  2630. this.requestParam.parammaps.departmentId = this.getdataListParm.parammaps.departmentId
  2631. this.requestParam.parammaps.useForm = this.getdataListParm.parammaps.useForm
  2632. this.requestParam.parammaps.useType = this.getdataListParm.parammaps.useType
  2633. this.requestParam.parammaps.startTime = this.getdataListParm.parammaps.startTime
  2634. this.requestParam.parammaps.stopTime = this.getdataListParm.parammaps.stopTime
  2635. GetAccount(this.requestParam).then(response => {
  2636. if (response.data.list !== '') {
  2637. this.percentage = 99
  2638. setTimeout(() => {
  2639. this.isPercentage = false
  2640. }, 2000)
  2641. }
  2642. this.$nextTick(() => {
  2643. import('@/vendor/Export2Excel').then(excel => {
  2644. const list1 = response.data.list
  2645. const tHeader = [
  2646. '领用部门', '牧场', '领用单编号', '领用日期', '供应商编码', '供应商名称', '出库人', '制单日期', '品名', '物料编码', '计量单位', '单价', '实发数量', '总价', '备注', '领用人', '费用类型'
  2647. ]
  2648. const filterVal = [
  2649. '领用部门', '牧场', '领用单编号', '领用日期', '供应商编码', '供应商名称', '出库人', '制单日期', '品名', '物料编码', '计量单位', '单价', '实发数量', '总价', '备注', '领用人', '费用类型'
  2650. ]
  2651. // const tmerges=['B1:D2']
  2652. if (list1 !== null) {
  2653. const data1 = this.formatJsonTemp(filterVal, list1)
  2654. excel.export_json_to_excel({
  2655. // merges: tmerges,
  2656. // multiHeader: tmultiHeader,
  2657. header: tHeader,
  2658. data: data1,
  2659. filename: '备件出库EAS',
  2660. autoWidth: true,
  2661. bookType: 'xlsx'
  2662. })
  2663. } else {
  2664. this.$notify({
  2665. title: '',
  2666. message: '无备件领用完成信息,无法导出!',
  2667. type: 'warning',
  2668. duration: 2000
  2669. })
  2670. }
  2671. })
  2672. })
  2673. })
  2674. },
  2675. formatJson(filterVal, jsonData) {
  2676. return jsonData.map(v =>
  2677. filterVal.map(j => {
  2678. if (j === 'timestamp') {
  2679. return parseTime(v[j])
  2680. } else {
  2681. return v[j]
  2682. }
  2683. })
  2684. )
  2685. },
  2686. handleDelate(row) {
  2687. console.log('点击了删除')
  2688. this.getdataListSee.parammaps.id = row.id
  2689. this.getSeeList()
  2690. MessageBox.confirm('确认删除此条信息?', {
  2691. confirmButtonText: '确认',
  2692. cancelButtonText: '取消',
  2693. type: 'warning'
  2694. }).then(() => {
  2695. this.postDataPramas.common = { 'returnmap': '0' }
  2696. this.postDataPramas.data = []
  2697. this.postDataPramas.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listSee }}
  2698. this.postDataPramas.data[0].children = []
  2699. this.postDataPramas.data[0].children[0] = { 'name': 'updatePartRepertoryDelCK', 'type': 'e', 'parammaps': {
  2700. id: '@insertSpotList.id',
  2701. contractId: '@insertSpotList.contractId',
  2702. partCode: '@insertSpotList.partCode'
  2703. }}
  2704. this.postDataPramas.data[0].children[1] = { 'name': 'deletePartUse', 'type': 'e', 'parammaps': {
  2705. id: '@insertSpotList.id'
  2706. }}
  2707. this.postDataPramas.data[1] = { 'name': 'updatePartApplyDel', 'type': 'e', 'parammaps': {
  2708. applyCode: row.useForm
  2709. }}
  2710. this.postDataPramas.data[2] = { 'name': 'deleteBigPartUse', 'type': 'e', 'parammaps': {
  2711. id: row.id
  2712. }}
  2713. ExecDataByConfig(this.postDataPramas).then(response => {
  2714. this.getList()
  2715. this.$notify({
  2716. title: '成功',
  2717. message: '删除成功',
  2718. type: 'success',
  2719. duration: 2000
  2720. })
  2721. })
  2722. }).catch(() => {
  2723. this.$message({ type: 'info', message: '已取消删除' })
  2724. })
  2725. },
  2726. // ---------------------------------------
  2727. // 编辑--- 修改保存
  2728. edit_dialog_save() {
  2729. console.log('编辑保存')
  2730. },
  2731. // 导出模板
  2732. handleDownloadTemp() {
  2733. this.requestParam.name = 'stockLaidDownTemp'
  2734. GetDataByName(this.requestParam).then(response => {
  2735. this.$nextTick(() => {
  2736. import('@/vendor/Export2Excel').then(excel => {
  2737. const list1 = response.data.list
  2738. const tHeader = [
  2739. '牧场', '领用单编号', '领用日期', '物料编码', '品名', '规格型号', '品牌', '计量单位', '实发数量', '单价', '总价', '库位', '供应商', '名称', '牧场设备编号', '具体用处', '领用类型', '领用部门', '领用人'
  2740. ]
  2741. const filterVal = [
  2742. '牧场', '领用单编号', '领用日期', '物料编码', '品名', '规格型号', '品牌', '计量单位', '实发数量', '单价', '总价', '库位', '供应商', '名称', '牧场设备编号', '具体用处', '领用类型', '领用部门', '领用人'
  2743. ]
  2744. const data1 = this.formatJsonTemp(filterVal, list1)
  2745. excel.export_json_to_excel({
  2746. header: tHeader,
  2747. data: data1,
  2748. filename: '出库模板',
  2749. autoWidth: true,
  2750. bookType: 'xlsx'
  2751. })
  2752. })
  2753. })
  2754. })
  2755. },
  2756. handleEAS() {
  2757. this.easStatus.dialogStatus = 'easStatus'
  2758. this.easStatus.dialogFormVisible = true
  2759. this.getListEasStatusLst()
  2760. },
  2761. getListEasStatusLst() {
  2762. this.easStatus.listLoading = true
  2763. GetDataByName(this.easStatus.getdataListParm).then(response => {
  2764. if (response.data.list !== null) {
  2765. this.easStatus.list = response.data.list
  2766. } else {
  2767. this.easStatus.list = []
  2768. }
  2769. this.easStatus.pageNum = response.data.pageNum
  2770. this.easStatus.pageSize = response.data.pageSize
  2771. if (response.data.total) {
  2772. this.easStatus.total = response.data.total
  2773. }
  2774. })
  2775. setTimeout(() => {
  2776. this.easStatus.listLoading = false
  2777. }, 100)
  2778. },
  2779. handleClose(row) {
  2780. MessageBox.confirm('是否确认关闭同步此数据?', {
  2781. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  2782. }).then(() => {
  2783. this.requestParam = {}
  2784. this.requestParam.name = 'updatebigpartuseSync'
  2785. this.requestParam.parammaps = {}
  2786. this.requestParam.parammaps.issync = '2'
  2787. this.requestParam.parammaps.id = row.id
  2788. PostDataByName(this.requestParam).then((response) => {
  2789. if (response.msg !== 'fail') {
  2790. this.$notify({ title: '成功', message: '关闭同步成功', type: 'success', duration: 2000 })
  2791. this.getListEasStatusLst()
  2792. this.getList()
  2793. } else {
  2794. this.$notify({ title: '失败', message: response.data, type: 'warning', duration: 2000 })
  2795. this.getListEasStatusLst()
  2796. this.getList()
  2797. }
  2798. })
  2799. }).catch(() => {
  2800. this.$message({ type: 'info', message: '已取消关闭同步' })
  2801. })
  2802. },
  2803. handleManual(row) {
  2804. MessageBox.confirm('是否确认同步此数据至EAS?', {
  2805. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  2806. }).then(() => {
  2807. this.requestParam = {}
  2808. this.requestParam.typeIn = row.typeIn
  2809. this.requestParam.billCode = row.billCode
  2810. EasSync(this.requestParam).then((response) => {
  2811. if (response.msg !== 'fail') {
  2812. this.$notify({ title: '成功', message: '手动同步成功', type: 'success', duration: 2000 })
  2813. this.getListEasStatusLst()
  2814. this.getList()
  2815. } else {
  2816. this.$notify({ title: '失败', message: response.data, type: 'warning', duration: 2000 })
  2817. this.getListEasStatusLst()
  2818. this.getList()
  2819. }
  2820. })
  2821. }).catch(() => {
  2822. this.$message({ type: 'info', message: '已取消手动同步' })
  2823. })
  2824. },
  2825. handleIgnore(row) {
  2826. MessageBox.confirm('是否确认忽略同步此数据?', {
  2827. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  2828. }).then(() => {
  2829. this.requestParam = {}
  2830. this.requestParam.name = 'updatebigpartuseSync'
  2831. this.requestParam.parammaps = {}
  2832. this.requestParam.parammaps.issync = '3'
  2833. this.requestParam.parammaps.id = row.id
  2834. PostDataByName(this.requestParam).then((response) => {
  2835. if (response.msg !== 'fail') {
  2836. this.$notify({ title: '成功', message: '忽略同步成功', type: 'success', duration: 2000 })
  2837. this.getListEasStatusLst()
  2838. this.getList()
  2839. } else {
  2840. this.$notify({ title: '失败', message: response.data, type: 'warning', duration: 2000 })
  2841. this.getListEasStatusLst()
  2842. this.getList()
  2843. }
  2844. })
  2845. }).catch(() => {
  2846. this.$message({ type: 'info', message: '已取消忽略同步' })
  2847. })
  2848. }
  2849. }
  2850. }
  2851. </script>
  2852. <style lang="scss">
  2853. .inputDatetime .el-range-separator{
  2854. padding: 0;
  2855. margin: 0 10px;
  2856. }
  2857. .el-radio__label{
  2858. padding-left: 2px !important;
  2859. }
  2860. .el-form-item__error{padding-top: 0;}
  2861. body .el-table th.gutter {
  2862. display: table-cell !important;
  2863. }
  2864. .el-table{
  2865. width:99.9%;
  2866. }
  2867. </style>
  2868. <style lang="scss" scoped>
  2869. .el-radio{
  2870. margin-right: 5px;
  2871. }
  2872. .el-form-item__content{
  2873. line-height: 0;
  2874. }
  2875. </style>