SuppliesInventory.vue 87 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141
  1. <template>
  2. <div class="SuppliesInventory-all">
  3. <el-dialog top="10vh" width="1200px" title="入库审核" :visible.sync="Warehousingaudit">
  4. <div class="warehousingaudit-search">
  5. <!-- <div class="warehousingaudit-search-li">
  6. <label>物品类型:</label>
  7. <el-select @change="Warehousingchange" clearable filterable style="width: 180px;" size="small" v-model="WarehousingTypes" placeholder="请选择">
  8. <el-option
  9. v-for="item in RSAuditTypearr"
  10. :key="item.id"
  11. :label="item.name"
  12. :value="item.id">
  13. </el-option>
  14. </el-select>
  15. </div> -->
  16. <div class="warehousingaudit-search-li">
  17. <label>审核状态:</label>
  18. <el-select @change="Warehousingchange" style="width: 120px;" size="small" v-model="WarehousingStatus" placeholder="请选择">
  19. <el-option
  20. v-for="item in WarehousingStatusarr"
  21. :key="item.value"
  22. :label="item.text"
  23. :value="item.value">
  24. </el-option>
  25. </el-select>
  26. </div>
  27. <div class="warehousingaudit-search-li">
  28. <label>物品名称:</label>
  29. <el-input style="width: 160px;" size="small" placeholder="请输入物品名称" v-model="Warehousingname" clearable></el-input>
  30. </div>
  31. <el-button @click="Warehousingchange" style="margin-left: 10px;" size="small" type="primary">查询</el-button>
  32. </div>
  33. <div class="warehousingaudit-table">
  34. <el-table
  35. height="590px"
  36. :data="WarehousingData"
  37. border
  38. style="width: 100%">
  39. <el-table-column
  40. prop="goodsName"
  41. label="物品名称"
  42. width="200">
  43. </el-table-column>
  44. <el-table-column
  45. prop="quantity"
  46. label="数量"
  47. width="50">
  48. </el-table-column>
  49. <el-table-column
  50. prop="createTime"
  51. label="入库时间"
  52. width="150">
  53. </el-table-column>
  54. <el-table-column
  55. prop="createUserName"
  56. label="入库人"
  57. width="70">
  58. </el-table-column>
  59. <el-table-column
  60. prop="statusDesc"
  61. label="审核情况"
  62. width='200'>
  63. <template slot-scope="scope">
  64. <el-popover
  65. placement="top"
  66. width="450"
  67. trigger="hover">
  68. <!-- {{scope.row.statusDesc}} -->
  69. <span v-html="scope.row.statusDesc"></span>
  70. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.statusDesc}}</span>
  71. </el-popover>
  72. </template>
  73. </el-table-column>
  74. <el-table-column
  75. prop="confirmStatusText"
  76. label="审核状态"
  77. width="100">
  78. </el-table-column>
  79. <el-table-column
  80. prop="remark"
  81. label="备注"
  82. width='200'>
  83. <template slot-scope="scope">
  84. <el-popover
  85. placement="top"
  86. width="300"
  87. trigger="hover">
  88. <span v-html="scope.row.remark"></span>
  89. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.remark}}</span>
  90. </el-popover>
  91. </template>
  92. </el-table-column>
  93. <el-table-column
  94. label="操作">
  95. <template slot-scope="scope">
  96. <el-button size="mini" type="primary" title="通过" @click="GoodsStorageConfirmStatusChange(scope.row,2)" >通过</el-button>
  97. <el-button size="mini" title="不通过" type="danger" @click="GoodsStorageConfirmStatusChange(scope.row,3)">不通过</el-button>
  98. </template>
  99. </el-table-column>
  100. </el-table>
  101. <div class="block">
  102. <el-pagination
  103. @size-change="WarehousingSizeChange"
  104. @current-change="WarehousingCurrentChange"
  105. :current-page="WarehousingcurrentPage"
  106. :page-sizes="[10, 15, 20, 40]"
  107. :page-size="Warehousingpagesize"
  108. layout="total, sizes, prev, pager, next, jumper"
  109. :total="Warehousingcount">
  110. </el-pagination>
  111. </div>
  112. </div>
  113. </el-dialog>
  114. <el-dialog top="10vh" width="1740px" title="领用记录" :visible.sync="ReceiptRecord">
  115. <div class="ReceiptRecord-search">
  116. <div class="ReceiptRecord-search-li">
  117. <label style="margin-left: 0px;">关联团组:</label>
  118. <el-select multiple collapse-tags filterable style="width: 235px;" size="small" v-model="groupID" placeholder="请选择">
  119. <el-option
  120. :style="item.id==0||item.id==-1?'color:#67c23a;':''"
  121. v-for="item in groupNameData"
  122. :key="item.id"
  123. :label="item.groupName"
  124. :value="item.id">
  125. </el-option>
  126. </el-select>
  127. </div>
  128. <div class="ReceiptRecord-search-li">
  129. <label>物品类型:</label>
  130. <el-select multiple collapse-tags filterable style="width: 180px;" size="small" v-model="RSAuditTypes" placeholder="请选择">
  131. <el-option
  132. v-for="item in RSAuditTypearr"
  133. :key="item.id"
  134. :label="item.name"
  135. :value="item.id">
  136. </el-option>
  137. </el-select>
  138. </div>
  139. <div class="ReceiptRecord-search-li">
  140. <label>领用人员:</label>
  141. <el-select multiple collapse-tags filterable style="width: 180px;" size="small" v-model="personnelID" placeholder="请选择">
  142. <el-option
  143. v-for="item in userNameData"
  144. :key="item.id"
  145. :label="item.userName"
  146. :value="item.id">
  147. </el-option>
  148. </el-select>
  149. </div>
  150. <div class="ReceiptRecord-search-li">
  151. <label>审核状态:</label>
  152. <el-select style="width: 120px;" size="small" v-model="RSAuditStatus" placeholder="请选择">
  153. <el-option
  154. v-for="item in options"
  155. :key="item.value"
  156. :label="item.label"
  157. :value="item.value">
  158. </el-option>
  159. </el-select>
  160. </div>
  161. <div class="ReceiptRecord-search-li">
  162. <label>物品名称:</label>
  163. <el-input style="width: 160px;" size="small" placeholder="请输入物品名称" v-model="RSAuditname" clearable></el-input>
  164. </div>
  165. <div class="ReceiptRecord-search-li">
  166. <label>领用时间段:</label>
  167. <el-date-picker
  168. size="small"
  169. style="width: 240px;"
  170. v-model="RSAudittime"
  171. type="daterange"
  172. align="right"
  173. unlink-panels
  174. range-separator="至"
  175. start-placeholder="开始日期"
  176. end-placeholder="结束日期"
  177. :picker-options="pickerOptionss">
  178. </el-date-picker>
  179. </div>
  180. <el-button style="margin-left: 10px;" @click="RecordsGoodsReceiveList(false)" size="small" type="primary">查询</el-button>
  181. <el-button style="margin-left: 10px;" @click="RecordsGoodsReceiveList(true)" size="small" type="primary">导出</el-button>
  182. </div>
  183. <div class="ReceiptRecord-table">
  184. <el-table
  185. height="530px"
  186. :data="RSAuditData"
  187. border
  188. style="width: 100%">
  189. <el-table-column
  190. prop="goodsName"
  191. label="物品名称"
  192. width="200">
  193. <template slot-scope="scope">
  194. <el-popover
  195. placement="top"
  196. width="300"
  197. trigger="hover">
  198. {{scope.row.groupName}}
  199. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.goodsName}}</span>
  200. </el-popover>
  201. </template>
  202. </el-table-column>
  203. <el-table-column
  204. prop="quantity"
  205. label="数量"
  206. width="50">
  207. </el-table-column>
  208. <el-table-column
  209. prop="createTime"
  210. label="申请时间"
  211. width="150">
  212. </el-table-column>
  213. <el-table-column
  214. prop="createUserName"
  215. label="申请人"
  216. width="70">
  217. </el-table-column>
  218. <el-table-column
  219. prop="reason"
  220. label="申请原因"
  221. >
  222. <template slot-scope="scope">
  223. <el-popover
  224. placement="top"
  225. width="300"
  226. trigger="hover">
  227. {{scope.row.reason}}
  228. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.reason}}</span>
  229. </el-popover>
  230. </template>
  231. </el-table-column>
  232. <el-table-column
  233. prop="remark"
  234. label="备注">
  235. <template slot-scope="scope">
  236. <el-popover
  237. placement="top"
  238. width="300"
  239. trigger="hover">
  240. {{scope.row.remark}}
  241. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.remark}}</span>
  242. </el-popover>
  243. </template>
  244. </el-table-column>
  245. <el-table-column
  246. prop="auditUserName"
  247. label="审核人"
  248. width="100">
  249. <template slot-scope="scope">
  250. {{ scope.row.auditStatus==0?"":scope.row.auditUserName }}
  251. </template>
  252. </el-table-column>
  253. <el-table-column
  254. prop="auditTime"
  255. label="审核时间"
  256. width="150">
  257. <template slot-scope="scope">
  258. {{ scope.row.auditStatus==0?"":scope.row.auditTime }}
  259. </template>
  260. </el-table-column>
  261. <el-table-column
  262. prop="auditStatusText"
  263. label="审核状态"
  264. width="100">
  265. </el-table-column>
  266. </el-table>
  267. <div v-if="RSAuditcount>RSAuditpagesize" class="block">
  268. <el-pagination
  269. @size-change="RSAuditSizeChange"
  270. @current-change="RSAuditCurrentChange"
  271. :current-page="RSAuditcurrentPage"
  272. :page-sizes="[10, 15, 20, 40]"
  273. :page-size="RSAuditpagesize"
  274. layout="total, sizes, prev, pager, next, jumper"
  275. :total="RSAuditcount">
  276. </el-pagination>
  277. </div>
  278. </div>
  279. </el-dialog>
  280. <el-dialog top="10vh" class="Approval-dialog" width="1350px" title="领用审核" :visible.sync="ApprovalVisible">
  281. <div>
  282. <el-select @change="typevaluechange" style="width: 150px;margin-bottom: 10px;" size="small" v-model="typevalue" placeholder="请选择">
  283. <el-option
  284. v-for="item in receiveStatus"
  285. :key="item.value"
  286. :label="item.text"
  287. :value="item.value">
  288. </el-option>
  289. </el-select>
  290. <el-input clearable size="small" style="width:200px" v-model="Approvalinput" placeholder="请输入内容"></el-input>
  291. <el-button @click="typevaluechange" size="small" type="primary">查 询</el-button>
  292. </div>
  293. <div class="Approval-table">
  294. <el-table
  295. :data="ApprovalData"
  296. border
  297. style="width: 100%">
  298. <el-table-column
  299. prop="goodsName"
  300. label="物品名称"
  301. width="180">
  302. </el-table-column>
  303. <el-table-column
  304. prop="quantity"
  305. label="数量"
  306. width="50">
  307. </el-table-column>
  308. <el-table-column
  309. prop="createTime"
  310. label="申请时间"
  311. width="150">
  312. </el-table-column>
  313. <el-table-column
  314. prop="createUserName"
  315. label="申请人"
  316. width="70">
  317. </el-table-column>
  318. <el-table-column
  319. prop="reason"
  320. label="申请原因"
  321. width="80">
  322. <template slot-scope="scope">
  323. <el-popover
  324. placement="top"
  325. width="300"
  326. trigger="hover">
  327. {{scope.row.reason}}
  328. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.reason}}</span>
  329. </el-popover>
  330. </template>
  331. </el-table-column>
  332. <el-table-column
  333. prop="remark"
  334. label="备注">
  335. <template slot-scope="scope">
  336. <el-popover
  337. placement="top"
  338. width="300"
  339. trigger="hover">
  340. {{scope.row.remark}}
  341. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.remark}}</span>
  342. </el-popover>
  343. </template>
  344. </el-table-column>
  345. <el-table-column
  346. prop="auditStatusText"
  347. label="审核状态"
  348. width="100">
  349. <template slot-scope="scope">
  350. <el-popover
  351. placement="top"
  352. width="300"
  353. trigger="hover">
  354. <span v-html="scope.row.statusDesc"></span>
  355. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.auditStatusText}}</span>
  356. </el-popover>
  357. </template>
  358. </el-table-column>
  359. <el-table-column
  360. label="操作"
  361. width="450">
  362. <template slot-scope="scope">
  363. <el-button size="mini" type="primary" title="通过" @click="GoodsReceiveAudit(scope.row,1)" >通过</el-button>
  364. <el-button size="mini" type="info" title="不通过" @click="GoodsReceiveAudit(scope.row,2)">不通过</el-button>
  365. <!-- <el-button v-if="scope.row.auditStatus==0||scope.row.auditStatus==2" size="mini" type="primary" title="通过" @click="GoodsReceiveAudit(scope.row,1)" >通过</el-button>
  366. <el-button v-if="scope.row.auditStatus==0" size="mini" type="info" title="不通过" @click="GoodsReceiveAudit(scope.row,2)">不通过</el-button>
  367. <el-button v-if="scope.row.auditStatus==1" size="mini" type="warning" title="取消通过" @click="GoodsReceiveAudit(scope.row,0)">取消通过</el-button> -->
  368. <!-- <el-button size="mini" title="删除" type="danger" @click="Deleteintolibraryreceives(scope.row)">删除</el-button> -->
  369. <!-- <el-button size="mini" type="primary" title="通过" @click="GoodsReceiveAudit(scope.row,5)" >出库</el-button>
  370. <el-button size="mini" title="拒绝出库" type="danger" @click="GoodsReceiveAudit(scope.row,6)">拒绝出库</el-button> -->
  371. </template>
  372. </el-table-column>
  373. </el-table>
  374. <div v-if="Approvalcount>Approvalpagesize" class="block">
  375. <el-pagination
  376. @size-change="ApprovalhandleSizeChange"
  377. @current-change="ApprovalhandleCurrentChange"
  378. :current-page="ApprovalcurrentPage"
  379. :page-sizes="[6, 10, 15, 40]"
  380. :page-size="Approvalpagesize"
  381. layout="total, sizes, prev, pager, next, jumper"
  382. :total="Approvalcount">
  383. </el-pagination>
  384. </div>
  385. </div>
  386. </el-dialog>
  387. <el-dialog top="10vh" width="1200px" title="入库物品" :visible.sync="warehousingsVisible">
  388. <el-form :model="warehousingsruleForm" :rules="warehousingsrules" ref="warehousingsruleForm" label-width="100px" class="demo-ruleForm">
  389. <div class="warehousingsrule-input">
  390. <el-form-item label="入库数量" prop="quantity">
  391. <el-input-number @blur="Sumup" size="small" :precision="2" :controls="false" v-model="warehousingsruleForm.quantity"></el-input-number>
  392. </el-form-item>
  393. <el-form-item label="物品单价" prop="unitPrice">
  394. <el-input-number @blur="Sumup" size="small" :precision="1" :controls="false" v-model="warehousingsruleForm.unitPrice"></el-input-number>
  395. </el-form-item>
  396. <el-form-item label="物品总价" prop="totalPrice">
  397. <el-input-number size="small" :precision="2" :controls="false" v-model="warehousingsruleForm.totalPrice"></el-input-number>
  398. </el-form-item>
  399. <el-form-item label="供应商名称" prop="supplierName">
  400. <el-input size="small" placeholder="请输入物资名称" v-model="warehousingsruleForm.supplierName" clearable></el-input>
  401. </el-form-item>
  402. <el-form-item label="供应商电话" prop="supplierTel">
  403. <el-input size="small" placeholder="请输入供应商电话" v-model="warehousingsruleForm.supplierTel" clearable></el-input>
  404. </el-form-item>
  405. <el-form-item label="供应商地址" prop="supplierAddress">
  406. <el-input size="small" placeholder="请输入供应商地址" v-model="warehousingsruleForm.supplierAddress" clearable></el-input>
  407. </el-form-item>
  408. <el-form-item label="供应商来源" prop="supplierSource">
  409. <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.supplierSource" clearable></el-input>
  410. </el-form-item>
  411. <el-form-item label="入库人员" prop="storageUserId">
  412. <el-select size="small" v-model="warehousingsruleForm.storageUserId" clearable filterable
  413. placeholder="请选择">
  414. <el-option v-for="item in userNameData" :key="item.id" :label="item.userName"
  415. :value="item.id">
  416. </el-option>
  417. </el-select>
  418. <!-- <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.storageUserId" clearable></el-input> -->
  419. </el-form-item>
  420. <el-form-item label="入库时间" prop="storageTime">
  421. <el-date-picker
  422. size="small"
  423. style="width:100%"
  424. v-model="warehousingsruleForm.storageTime"
  425. type="datetime"
  426. placeholder="选择日期时间"
  427. align="right"
  428. :picker-options="pickerOptions">
  429. </el-date-picker>
  430. <!-- <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.storageTime" clearable></el-input> -->
  431. </el-form-item>
  432. <el-form-item style="width:100%;" label="备注" prop="remark">
  433. <el-input size="small" placeholder="请输入备注称" v-model="warehousingsruleForm.remark" clearable></el-input>
  434. </el-form-item>
  435. </div>
  436. <el-form-item style="text-align: right;">
  437. <el-button size="small" @click="resetForm('warehousingsruleForm')">清空</el-button>
  438. <el-button size="small" type="primary" @click="submitForm('warehousingsruleForm')">保存</el-button>
  439. </el-form-item>
  440. </el-form>
  441. <div class="warehousingsrule-table">
  442. <el-table
  443. height="400"
  444. :data="warehousingslist"
  445. border
  446. style="width: 100%">
  447. <el-table-column
  448. prop="unitPrice"
  449. label="物品单价"
  450. width="80">
  451. <template slot-scope="scope">
  452. {{townum(scope.row.unitPrice)}}
  453. </template>
  454. </el-table-column>
  455. <el-table-column
  456. prop="quantity"
  457. label="物品数量"
  458. width="70">
  459. </el-table-column>
  460. <el-table-column
  461. prop="totalPrice"
  462. label="物品总价"
  463. width="80">
  464. <template slot-scope="scope">
  465. {{townum(scope.row.totalPrice)}}
  466. </template>
  467. </el-table-column>
  468. <el-table-column
  469. prop="supplierName"
  470. label="供应商名称">
  471. <template slot-scope="scope">
  472. <el-popover
  473. placement="top"
  474. width="300"
  475. trigger="hover">
  476. {{scope.row.supplierName}}
  477. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.supplierName}}</span>
  478. </el-popover>
  479. </template>
  480. </el-table-column>
  481. <el-table-column
  482. prop="supplierTel"
  483. label="供应商电话">
  484. <template slot-scope="scope">
  485. <el-popover
  486. placement="top"
  487. width="300"
  488. trigger="hover">
  489. {{scope.row.supplierTel}}
  490. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.supplierTel}}</span>
  491. </el-popover>
  492. </template>
  493. </el-table-column>
  494. <el-table-column
  495. prop="supplierAddress"
  496. label="供应商地址">
  497. <template slot-scope="scope">
  498. <el-popover
  499. placement="top"
  500. width="300"
  501. trigger="hover">
  502. {{scope.row.supplierAddress}}
  503. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.supplierAddress}}</span>
  504. </el-popover>
  505. </template>
  506. </el-table-column>
  507. <el-table-column
  508. prop="supplierSource"
  509. label="供应商来源">
  510. <template slot-scope="scope">
  511. <el-popover
  512. placement="top"
  513. width="300"
  514. trigger="hover">
  515. {{scope.row.supplierSource}}
  516. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.supplierSource}}</span>
  517. </el-popover>
  518. </template>
  519. </el-table-column>
  520. <el-table-column
  521. prop="storageTime"
  522. label="入库时间"
  523. width="150">
  524. </el-table-column>
  525. <el-table-column
  526. prop="storageUserName"
  527. label="入库人"
  528. width="80">
  529. </el-table-column>
  530. <el-table-column
  531. label="操作"
  532. width="155">
  533. <template slot-scope="scope">
  534. <el-button size="mini" title="编辑" @click="Editentry(scope.row)">编辑</el-button>
  535. <el-button size="mini" title="删除" type="danger" @click="Deleteintolibrary(scope.row)">删除</el-button>
  536. </template>
  537. </el-table-column>
  538. </el-table>
  539. <div v-if="WScount>WSpagesize" class="block">
  540. <el-pagination
  541. @size-change="WShandleSizeChange"
  542. @current-change="WShandleCurrentChange"
  543. :current-page="WScurrentPage"
  544. :page-sizes="[6, 10, 15, 40]"
  545. :page-size="WSpagesize"
  546. layout="total, sizes, prev, pager, next, jumper"
  547. :total="WScount">
  548. </el-pagination>
  549. </div>
  550. </div>
  551. </el-dialog>
  552. <el-dialog width="400px" title="添加物品" :visible.sync="AddItemsVisible">
  553. <div class="additems-ul">
  554. <div class="additems-li">
  555. <label>所属公司:</label>
  556. <el-select style="width:250px" @change="AddMaterialTypechange(0)" v-model="AddMaterialType" clearable filterable
  557. placeholder="请选择">
  558. <el-option v-for="item in AddMaterialTypearr" :key="item.id" :label="item.name"
  559. :value="item.id">
  560. </el-option>
  561. </el-select>
  562. </div>
  563. <div class="additems-li">
  564. <label>物资类型:</label>
  565. <el-select style="width:250px" v-model="AddMaterialinfoType" clearable filterable
  566. placeholder="请选择">
  567. <el-option v-for="item in AddMaterialinfoTypearr" :key="item.id" :label="item.name"
  568. :value="item.id">
  569. </el-option>
  570. </el-select>
  571. </div>
  572. <div class="additems-li">
  573. <label>物资名称:</label>
  574. <el-input
  575. style="width:250px"
  576. placeholder="请输入物资名称"
  577. v-model="AdditemsName"
  578. clearable>
  579. </el-input>
  580. </div>
  581. <div class="additems-li">
  582. <label>单位:</label>
  583. <el-input
  584. style="width:250px"
  585. placeholder="请输入单位"
  586. v-model="unit"
  587. clearable>
  588. </el-input>
  589. </div>
  590. </div>
  591. <div>
  592. <label>备注:</label>
  593. <el-input
  594. style="width:100%;"
  595. type="textarea"
  596. :autosize="{ minRows: 2, maxRows: 4}"
  597. placeholder="请输入内容"
  598. v-model="Additemstextarea">
  599. </el-input>
  600. </div>
  601. <div class="additems-btn">
  602. <el-button @click="AddItemsVisible=false">取消</el-button>
  603. <el-button @click="GoodsOP" type="primary">保存</el-button>
  604. </div>
  605. </el-dialog>
  606. <el-dialog top="10vh" title="领用物品" width="1000px" :visible.sync="ClaimitemVisible">
  607. <label style="display: inline-block;margin-left: 32px;margin-bottom: 10px;">{{Claimitemlabel}}</label>
  608. <el-form :model="ClaimsruleForm" :rules="Claimrules" ref="ClaimsruleForm" label-width="100px" class="demo-ruleForm">
  609. <div class="Claimitem-input">
  610. <el-form-item label="关联团组" prop="groupId">
  611. <el-select size="small" v-model="ClaimsruleForm.groupId" clearable filterable
  612. placeholder="请选择">
  613. <el-option :style="item.id==0||item.id==-1||item.id==-2?'color:#67c23a;':''" v-for="item in groupNameData" :key="item.id" :label="item.groupName"
  614. :value="item.id">
  615. </el-option>
  616. </el-select>
  617. <!-- <el-input-number size="small" :precision="2" :controls="false" v-model="ClaimsruleForm.groupId"></el-input-number> -->
  618. </el-form-item>
  619. <el-form-item label="领用数量" prop="quantity">
  620. <el-input-number size="small" :precision="2" :controls="false" v-model="ClaimsruleForm.quantity"></el-input-number>
  621. </el-form-item>
  622. <el-form-item label="领用原因" prop="reason">
  623. <el-input size="small" placeholder="请输入领用原因" v-model="ClaimsruleForm.reason"></el-input>
  624. </el-form-item>
  625. </div>
  626. <el-form-item label="备注" prop="remark">
  627. <el-input size="small" placeholder="请输入备注" v-model="ClaimsruleForm.remark"></el-input>
  628. </el-form-item>
  629. <el-form-item style="text-align: right;">
  630. <el-button size="small" @click="ClaimresetForm('ClaimsruleForm')">清空</el-button>
  631. <el-button size="small" type="primary" @click="ClaimsubmitForm('ClaimsruleForm')">保存</el-button>
  632. </el-form-item>
  633. </el-form>
  634. <div class="claimitem-table">
  635. <el-table
  636. height="400"
  637. :data="ClaimitemData"
  638. border
  639. style="width: 100%">
  640. <el-table-column
  641. prop="goodsName"
  642. label="物品名称"
  643. width="180">
  644. </el-table-column>
  645. <el-table-column
  646. prop="quantity"
  647. label="数量"
  648. width="45">
  649. </el-table-column>
  650. <el-table-column
  651. prop="createTime"
  652. label="申请时间"
  653. width="150">
  654. </el-table-column>
  655. <el-table-column
  656. prop="createUserName"
  657. label="申请人"
  658. width="70">
  659. </el-table-column>
  660. <el-table-column
  661. prop="reason"
  662. label="申请原因"
  663. width="80">
  664. <template slot-scope="scope">
  665. <el-popover
  666. placement="top"
  667. width="300"
  668. trigger="hover">
  669. {{scope.row.reason}}
  670. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.reason}}</span>
  671. </el-popover>
  672. </template>
  673. </el-table-column>
  674. <el-table-column
  675. prop="remark"
  676. label="备注">
  677. <template slot-scope="scope">
  678. <el-popover
  679. placement="top"
  680. width="300"
  681. trigger="hover">
  682. {{scope.row.remark}}
  683. <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.remark}}</span>
  684. </el-popover>
  685. </template>
  686. </el-table-column>
  687. <el-table-column
  688. prop="auditStatusText"
  689. label="审核状态"
  690. width="80">
  691. </el-table-column>
  692. <el-table-column
  693. label="操作"
  694. width="200">
  695. <template slot-scope="scope">
  696. <el-button size="mini" title="编辑" @click="Editentryreceive(scope.row)">编辑</el-button>
  697. <el-button size="mini" title="删除" type="danger" @click="Deleteintolibraryreceive(scope.row)">删除</el-button>
  698. </template>
  699. </el-table-column>
  700. </el-table>
  701. <div v-if="Claimitemcount>Claimitempagesize" class="block">
  702. <el-pagination
  703. @size-change="ClaimitemhandleSizeChange"
  704. @current-change="ClaimitemhandleCurrentChange"
  705. :current-page="ClaimitemcurrentPage"
  706. :page-sizes="[6, 10, 15, 40]"
  707. :page-size="Claimitempagesize"
  708. layout="total, sizes, prev, pager, next, jumper"
  709. :total="Claimitemcount">
  710. </el-pagination>
  711. </div>
  712. </div>
  713. </el-dialog>
  714. <div class="SuppliesInventory-head">
  715. <div class="SuppliesInventory-head-ul">
  716. <div class="SuppliesInventory-head-li">
  717. <label>所属公司:</label>
  718. <el-select style="width:220px" @change="MaterialTypechange" v-model="MaterialType" clearable filterable
  719. placeholder="请选择">
  720. <el-option v-for="item in MaterialTypearr" :key="item.id" :label="item.name"
  721. :value="item.id">
  722. </el-option>
  723. </el-select>
  724. </div>
  725. <div class="SuppliesInventory-head-li">
  726. <label>物资类型:</label>
  727. <el-select @change="MaterialinfoTypechange" style="width:220px" multiple collapse-tags v-model="MaterialinfoType" clearable filterable
  728. placeholder="请选择">
  729. <el-option v-for="item in MaterialinfoTypearr" :key="item.id" :label="item.name"
  730. :value="item.id">
  731. </el-option>
  732. </el-select>
  733. </div>
  734. <div class="SuppliesInventory-head-li">
  735. <label>物资名称:</label>
  736. <el-input
  737. style="width:220px"
  738. placeholder="请输入内容"
  739. v-model="Materialname"
  740. clearable>
  741. </el-input>
  742. </div>
  743. <div class="SuppliesInventory-head-li">
  744. <el-button @click="GoodsList" type="primary">查 询</el-button>
  745. </div>
  746. </div>
  747. <div>
  748. <el-button v-if="Auditauthority" @click="GoodsStorageExcelDownload" type="primary">入库记录导出</el-button>
  749. <el-button v-if="Auditauthority" @click="inquireRecords" type="primary">领用记录</el-button>
  750. <el-button v-if="Auditauthority" @click="Warehousingwicket" type="primary">入库审核</el-button>
  751. <el-button v-if="Auditauthority" @click="GoodsReceiveLists" type="primary">审核</el-button>
  752. <el-button v-if="Addpermission" @click="addbtnclick" type="primary">新增物品</el-button>
  753. </div>
  754. </div>
  755. <div class="SuppliesInventory-table">
  756. <el-table
  757. :data="tableData"
  758. border
  759. style="width: 100%">
  760. <el-table-column
  761. prop="name"
  762. label="物品名称"
  763. width="180">
  764. </el-table-column>
  765. <el-table-column
  766. prop="typeName"
  767. label="物品类型"
  768. width="180">
  769. </el-table-column>
  770. <el-table-column
  771. prop="stockQuantity"
  772. label="物品数量"
  773. width="80">
  774. </el-table-column>
  775. <el-table-column
  776. prop="unit"
  777. label="单位"
  778. width="60">
  779. </el-table-column>
  780. <el-table-column
  781. prop="lastUpdateUserName"
  782. label="最后录入人"
  783. width="90">
  784. </el-table-column>
  785. <el-table-column
  786. prop="lastUpdateTime"
  787. label="最后录入时间"
  788. width="180">
  789. </el-table-column>
  790. <el-table-column
  791. prop="stockQuantityLabel"
  792. label="状态描述">
  793. </el-table-column>
  794. <el-table-column
  795. prop="remark"
  796. label="备注">
  797. </el-table-column>
  798. <el-table-column
  799. label="操作"
  800. width="300">
  801. <template slot-scope="scope">
  802. <el-button v-if="Editpermission" size="mini" title="编辑" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
  803. <el-button v-if="Addpermission" size="mini" @click="instorage(scope.row)" type="primary">入库</el-button>
  804. <el-button size="mini" @click="GoodsReceiveList(scope.row)" type="success">领用</el-button>
  805. <el-button v-if="Deletepermission" size="mini" title="删除" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
  806. </template>
  807. </el-table-column>
  808. </el-table>
  809. <div v-if="count>pagesize" class="block">
  810. <el-pagination
  811. @size-change="handleSizeChange"
  812. @current-change="handleCurrentChange"
  813. :current-page="currentPage"
  814. :page-sizes="[10, 15, 30, 40]"
  815. :page-size="pagesize"
  816. layout="total, sizes, prev, pager, next, jumper"
  817. :total="count">
  818. </el-pagination>
  819. </div>
  820. </div>
  821. </div>
  822. </template>
  823. <script>
  824. export default {
  825. data() {
  826. return {
  827. pickerOptionss: {
  828. shortcuts: [{
  829. text: '最近一周',
  830. onClick(picker) {
  831. const end = new Date();
  832. const start = new Date();
  833. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  834. picker.$emit('pick', [start, end]);
  835. }
  836. }, {
  837. text: '最近一个月',
  838. onClick(picker) {
  839. const end = new Date();
  840. const start = new Date();
  841. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  842. picker.$emit('pick', [start, end]);
  843. }
  844. }, {
  845. text: '最近三个月',
  846. onClick(picker) {
  847. const end = new Date();
  848. const start = new Date();
  849. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  850. picker.$emit('pick', [start, end]);
  851. }
  852. }]
  853. },
  854. pickerOptions: {
  855. shortcuts: [{
  856. text: '今天',
  857. onClick(picker) {
  858. picker.$emit('pick', new Date());
  859. }
  860. }, {
  861. text: '昨天',
  862. onClick(picker) {
  863. const date = new Date();
  864. date.setTime(date.getTime() - 3600 * 1000 * 24);
  865. picker.$emit('pick', date);
  866. }
  867. }, {
  868. text: '一周前',
  869. onClick(picker) {
  870. const date = new Date();
  871. date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
  872. picker.$emit('pick', date);
  873. }
  874. }]
  875. },
  876. Userid:'',
  877. token:"",
  878. MaterialType:'',
  879. MaterialTypearr:[],
  880. MaterialinfoType:[],
  881. MaterialinfoTypes:'',
  882. MaterialinfoTypearr:[],
  883. Materialname:'',
  884. tableData:[],
  885. AddItemsVisible:false,
  886. currentPage:1,
  887. pagesize:10,
  888. count:0,
  889. WScurrentPage:1,
  890. WSpagesize:6,
  891. WScount:0,
  892. ClaimitemcurrentPage:1,
  893. Claimitempagesize:6,
  894. Claimitemcount:0,
  895. ApprovalcurrentPage:1,
  896. Approvalpagesize:6,
  897. Approvalcount:0,
  898. //新增物品参数
  899. AddMaterialType:"",
  900. AddMaterialTypearr:[],
  901. AddMaterialinfoType:"",
  902. AddMaterialinfoTypearr:[],
  903. AdditemsName:"",
  904. unit:"",
  905. Additemstextarea:"",
  906. ID:0,
  907. groupNameData:[],
  908. //入库参数
  909. userNameData:[],
  910. warehousingslist:[],
  911. warehousingsVisible:false,
  912. warehousingsruleForm: {
  913. id:0,
  914. quantity: 0,
  915. unitPrice: 0,
  916. totalPrice: 0,
  917. supplierName: '',
  918. supplierTel: '',
  919. supplierAddress: '',
  920. supplierSource: '',
  921. storageUserId:'',
  922. storageTime:'',
  923. remark: ''
  924. },
  925. warehousingsrules: {
  926. quantity: [
  927. { required: true, message: '请输入', trigger: 'blur' },
  928. ],
  929. unitPrice: [
  930. { required: true, message: '请输入', trigger: 'blur' },
  931. ],
  932. totalPrice: [
  933. { required: true, message: '请输入', trigger: 'blur' },
  934. ],
  935. supplierName: [
  936. { required: true, message: '请输入', trigger: 'blur' },
  937. ],
  938. supplierTel: [
  939. { required: true, message: '请输入', trigger: 'blur' },
  940. ],
  941. supplierAddress: [
  942. { required: true, message: '请输入', trigger: 'blur' },
  943. ],
  944. supplierSource: [
  945. { required: true, message: '请输入', trigger: 'blur' },
  946. ],
  947. storageUserId: [
  948. { required: true, message: '请选择', trigger: 'change' },
  949. ],
  950. storageTime: [
  951. { required: true, message: '请选择', trigger: 'blur' },
  952. ],
  953. remark: [
  954. { required: true, message: '请输入', trigger: 'blur' },
  955. ],
  956. },
  957. typevalue:-1,
  958. //领用参数
  959. ClaimitemVisible:false,
  960. ClaimitemData:[],
  961. ClaimsruleForm:{
  962. id:0,
  963. groupId:'',
  964. quantity:0,
  965. reason:'',
  966. remark:'',
  967. },
  968. Claimrules:{
  969. groupId: [
  970. { required: true, message: '请选择', trigger: 'change' },
  971. ],
  972. quantity: [
  973. { required: true, message: '请输入', trigger: 'blur' },
  974. ],
  975. reason: [
  976. { required: true, message: '请输入', trigger: 'blur' },
  977. ],
  978. remark: [
  979. { required: true, message: '请输入', trigger: 'blur' },
  980. ],
  981. },
  982. Claimitemlabel:'',
  983. //审核参数
  984. options:[
  985. {
  986. value: '',
  987. label: '全部'
  988. },
  989. {
  990. value: 0,
  991. label: '待审核'
  992. },
  993. {
  994. value: 1,
  995. label: '审核通过'
  996. },
  997. {
  998. value: 2,
  999. label: '未通过'
  1000. },
  1001. ],
  1002. ApprovalVisible:false,
  1003. ApprovalData:[],
  1004. Approvalinput:'',
  1005. receiveStatus:[],
  1006. //shqx
  1007. Auditauthority:false,
  1008. Editpermission:false,
  1009. Addpermission:false,
  1010. Deletepermission:false,
  1011. //领用记录
  1012. ReceiptRecord:false,
  1013. groupID:[],
  1014. groupIDarr:[],
  1015. personnelID:[],
  1016. personnelIDarr:[],
  1017. RSAuditStatus:'',
  1018. RSAuditname:'',
  1019. RSAudittime:'',
  1020. RSAuditTypes:[],
  1021. RSAuditTypearr:[],
  1022. RSAuditData:[],
  1023. RSAuditcurrentPage:1,
  1024. RSAuditpagesize:10,
  1025. RSAuditcount:0,
  1026. //入库审核
  1027. Warehousingaudit:false,
  1028. WarehousingTypes:'',
  1029. WarehousingStatus:-1,
  1030. WarehousingStatusarr:[],
  1031. Warehousingname:'',
  1032. WarehousingData:[],
  1033. WarehousingcurrentPage:1,
  1034. Warehousingpagesize:10,
  1035. Warehousingcount:0,
  1036. }
  1037. },
  1038. methods:{
  1039. //保留两位小数
  1040. townum(val){
  1041. val=Number(val);
  1042. return val.toFixed(2);
  1043. },
  1044. //处理日期
  1045. datetimes(val){
  1046. var date=new Date(val);
  1047. var y=date.getFullYear();
  1048. var m=date.getMonth()+1>=10?date.getMonth()+1:'0'+(date.getMonth()+1).toString();
  1049. var d=date.getDate()>=10?date.getDate():'0'+(date.getDate()).toString();
  1050. var s=date.getHours()>=10?date.getHours():'0'+(date.getHours()).toString();
  1051. var f=date.getMinutes()>=10?date.getMinutes():'0'+(date.getMinutes()).toString();
  1052. var mm=date.getSeconds()>=10?date.getSeconds():'0'+(date.getSeconds()).toString();
  1053. return y+'-'+m+'-'+d
  1054. },
  1055. //处理日期
  1056. datetime(val){
  1057. var date=new Date(val);
  1058. var y=date.getFullYear();
  1059. var m=date.getMonth()+1>=10?date.getMonth()+1:'0'+(date.getMonth()+1).toString();
  1060. var d=date.getDate()>=10?date.getDate():'0'+(date.getDate()).toString();
  1061. var s=date.getHours()>=10?date.getHours():'0'+(date.getHours()).toString();
  1062. var f=date.getMinutes()>=10?date.getMinutes():'0'+(date.getMinutes()).toString();
  1063. var mm=date.getSeconds()>=10?date.getSeconds():'0'+(date.getSeconds()).toString();
  1064. return y+'-'+m+'-'+d+" "+s+':'+f+':'+mm
  1065. },
  1066. //获取
  1067. GoodsInitDataSource() {
  1068. var url = "/api/PersonnelModule/GoodsInitDataSource"
  1069. var that = this
  1070. this.$axios({
  1071. method: 'get',
  1072. url: url,
  1073. headers: {
  1074. Authorization: 'Bearer '
  1075. }
  1076. }).then(function (res) {
  1077. if (res.data.code == 200) {
  1078. that.MaterialTypearr=res.data.data.goodsTypeData;
  1079. that.AddMaterialTypearr=res.data.data.goodsTypeData;
  1080. that.userNameData=res.data.data.userNameData;
  1081. that.groupNameData=res.data.data.groupNameData;
  1082. that.WarehousingStatusarr=res.data.data.stockStatus;
  1083. that.receiveStatus=res.data.data.receiveStatus;
  1084. // that.groupNameData.unshift(
  1085. // {
  1086. // id:0,
  1087. // groupName:"其他物资(公司内部物资)"
  1088. // },
  1089. // {
  1090. // id:-1,
  1091. // groupName:"拜访客户所使用的物资"
  1092. // }
  1093. // )
  1094. // that.MaterialType=that.MaterialTypearr[0].id;
  1095. that.MaterialTypechange();
  1096. for (let k = 0; k < that.MaterialTypearr.length; k++) {
  1097. for (let l = 0; l < that.MaterialTypearr[k].subTypeItems.length; l++) {
  1098. that.RSAuditTypearr.push(that.MaterialTypearr[k].subTypeItems[l])
  1099. }
  1100. }
  1101. } else {
  1102. that.$message.error(res.data.msg);
  1103. }
  1104. })
  1105. },
  1106. //物资类型切换
  1107. MaterialTypechange(val){
  1108. this.MaterialinfoType="";
  1109. this.MaterialinfoTypearr=[];
  1110. for(let i=0;i<this.MaterialTypearr.length;i++){
  1111. if(this.MaterialType==this.MaterialTypearr[i].id){
  1112. this.MaterialinfoTypearr=this.MaterialTypearr[i].subTypeItems;
  1113. }
  1114. }
  1115. if(val==undefined){
  1116. this.GoodsList();
  1117. }
  1118. },
  1119. //物资详情选择
  1120. MaterialinfoTypechange(){
  1121. this.MaterialinfoTypes=""
  1122. for(let i=0;i<this.MaterialinfoType.length;i++){
  1123. this.MaterialinfoTypes+=this.MaterialinfoType[i]+','
  1124. }
  1125. this.MaterialinfoTypes=this.MaterialinfoTypes.substring(0, this.MaterialinfoTypes.length - 1);
  1126. },
  1127. //入库
  1128. Warehousingchange(){
  1129. this.WarehousingcurrentPage=1;
  1130. this.GoodsStorageList();
  1131. },
  1132. //入库审核列表
  1133. GoodsStorageList(val){
  1134. var url = "/api/PersonnelModule/GoodsStorageList"
  1135. var that = this
  1136. this.$axios({
  1137. method: 'post',
  1138. url: url,
  1139. headers: {
  1140. Authorization: 'Bearer '+ that.token
  1141. },
  1142. data:{
  1143. portType:1,
  1144. pageIndex:that.WarehousingcurrentPage,
  1145. pageSize:that.Warehousingpagesize,
  1146. goodsId:that.WarehousingTypes==""?0:that.WarehousingTypes,
  1147. currUserId:that.Userid,
  1148. auditLabel:that.WarehousingStatus+'',
  1149. goodsName:that.Warehousingname,
  1150. batchNo:'',
  1151. }
  1152. }).then(function (res) {
  1153. that.WarehousingData=[];
  1154. if (res.data.code == 200) {
  1155. that.WarehousingData=res.data.data;
  1156. that.Warehousingcount=res.data.count;
  1157. }
  1158. }).catch(function (error) {
  1159. that.$message.error("操作错误,联系信息部!");
  1160. });
  1161. },
  1162. //add物资类型切换
  1163. AddMaterialTypechange(val){
  1164. if(val==0){
  1165. this.AddMaterialinfoType="";
  1166. }
  1167. this.AddMaterialinfoTypearr=[];
  1168. for(let i=0;i<this.AddMaterialTypearr.length;i++){
  1169. if(this.AddMaterialType==this.AddMaterialTypearr[i].id){
  1170. this.AddMaterialinfoTypearr=this.AddMaterialTypearr[i].subTypeItems;
  1171. }
  1172. }
  1173. },
  1174. //入库导出
  1175. GoodsStorageExcelDownload(){
  1176. var url = "/api/PersonnelModule/GoodsStorageExcelDownload"
  1177. var that = this
  1178. this.$axios({
  1179. method: 'post',
  1180. url: url,
  1181. headers: {
  1182. Authorization: 'Bearer '+ that.token
  1183. },
  1184. }).then(function (res) {
  1185. if (res.data.code == 200) {
  1186. window.open(res.data.data.url);
  1187. that.$message({
  1188. type: 'success',
  1189. message: res.data.msg
  1190. });
  1191. }
  1192. }).catch(function (error) {
  1193. that.$message.error("操作错误,联系信息部!");
  1194. });
  1195. },
  1196. //获取列表
  1197. GoodsList() {
  1198. var url = "/api/PersonnelModule/GoodsList"
  1199. var that = this
  1200. this.$axios({
  1201. method: 'post',
  1202. url: url,
  1203. headers: {
  1204. Authorization: 'Bearer '
  1205. },
  1206. data: {
  1207. portType: 1,
  1208. pageIndex: that.currentPage,
  1209. pageSize: that.pagesize,
  1210. typeIds: that.MaterialinfoTypes,
  1211. goodsName: that.Materialname,
  1212. }
  1213. }).then(function (res) {
  1214. if (res.data.code == 200) {
  1215. that.count=res.data.count;
  1216. that.tableData=res.data.data;
  1217. }
  1218. }).catch(function (error) {
  1219. that.$message.error("操作错误,联系信息部!");
  1220. });
  1221. },
  1222. //分页
  1223. handleSizeChange(val) {
  1224. this.currentPage=1;
  1225. this.pagesize=val;
  1226. this.GoodsList();
  1227. },
  1228. handleCurrentChange(val) {
  1229. this.currentPage=val;
  1230. this.GoodsList();
  1231. },
  1232. WShandleSizeChange(val) {
  1233. this.WScurrentPage=1;
  1234. this.WSpagesize=val;
  1235. this.instorage({'id':this.ID});
  1236. },
  1237. WShandleCurrentChange(val) {
  1238. this.WScurrentPage=val;
  1239. this.instorage({'id':this.ID});
  1240. },
  1241. ClaimitemhandleSizeChange(val) {
  1242. this.ClaimitemcurrentPage=1;
  1243. this.Claimitempagesize=val;
  1244. this.GoodsReceiveList({'id':this.ID});
  1245. },
  1246. ClaimitemhandleCurrentChange(val) {
  1247. this.ClaimitemcurrentPage=val;
  1248. this.GoodsReceiveList({'id':this.ID});
  1249. },
  1250. ApprovalhandleSizeChange(val) {
  1251. this.ApprovalcurrentPage=1;
  1252. this.Approvalpagesize=val;
  1253. this.GoodsReceiveLists();
  1254. },
  1255. ApprovalhandleCurrentChange(val) {
  1256. this.ApprovalcurrentPage=val;
  1257. this.GoodsReceiveLists();
  1258. },
  1259. RSAuditSizeChange(val) {
  1260. this.RSAuditcurrentPage=1;
  1261. this.RSAuditpagesize=val;
  1262. this.RecordsGoodsReceiveList(false);
  1263. },
  1264. RSAuditCurrentChange(val) {
  1265. this.RSAuditcurrentPage=val;
  1266. this.RecordsGoodsReceiveList(false);
  1267. },
  1268. WarehousingSizeChange(val) {
  1269. this.WarehousingcurrentPage=1;
  1270. this.Warehousingpagesize=val;
  1271. this.GoodsStorageList();
  1272. },
  1273. WarehousingCurrentChange(val) {
  1274. this.WarehousingcurrentPage=val;
  1275. this.GoodsStorageList();
  1276. },
  1277. Warehousingwicket(){
  1278. this.Warehousingaudit=true;
  1279. this.GoodsStorageList();
  1280. },
  1281. //新增按钮
  1282. addbtnclick(){
  1283. this.ID=0;
  1284. this.AdditemsName="";
  1285. this.AddMaterialType="";
  1286. this.AddMaterialinfoType="";
  1287. this.Additemstextarea="";
  1288. this.unit="";
  1289. this.AddItemsVisible=true;
  1290. },
  1291. //入库审核
  1292. GoodsStorageConfirmStatusChange(val,type){
  1293. var auditDep=0
  1294. for (let i = 0; i < val.auditPers.length; i++) {
  1295. if (val.auditPers[i].auditPer==true) {
  1296. auditDep=val.auditPers[i].auditDep
  1297. }
  1298. }
  1299. if (auditDep==0) {
  1300. return this.$message.error('没有审核权限');
  1301. }
  1302. var url = "/api/PersonnelModule/GoodsStorageConfirmStatusChange"
  1303. var that = this
  1304. this.$axios({
  1305. method: 'post',
  1306. url: url,
  1307. headers: {
  1308. Authorization: 'Bearer ' +that.token
  1309. },
  1310. data:{
  1311. id:val.id,
  1312. auditDep:auditDep,
  1313. confirmStatus:type,
  1314. }
  1315. }).then(function (res) {
  1316. if (res.data.code == 200) {
  1317. that.$message({
  1318. type: 'success',
  1319. message: res.data.msg
  1320. });
  1321. that.GoodsStorageList();
  1322. }else{
  1323. that.$message.error(res.data.msg);
  1324. }
  1325. }).catch(function (error) {
  1326. that.$message.error("操作错误,联系信息部!");
  1327. });
  1328. },
  1329. //编辑
  1330. handleEdit(index,row){
  1331. console.log(row);
  1332. this.ID=row.id;
  1333. var url = "/api/PersonnelModule/GoodsInfo?portType=1&id="+this.ID
  1334. var that = this
  1335. this.$axios({
  1336. method: 'get',
  1337. url: url,
  1338. headers: {
  1339. Authorization: 'Bearer '
  1340. }
  1341. }).then(function (res) {
  1342. if (res.data.code == 200) {
  1343. var datainfo=res.data.data;
  1344. that.Additemstextarea=datainfo.remark;
  1345. that.AdditemsName=datainfo.name;
  1346. that.AddMaterialType=datainfo.parentType;
  1347. that.unit=datainfo.unit;
  1348. that.AddMaterialinfoType=datainfo.type;
  1349. that.AddItemsVisible=true;
  1350. that.AddMaterialTypechange(2);
  1351. }else{
  1352. that.$message.error(res.data.msg);
  1353. }
  1354. }).catch(function (error) {
  1355. that.$message.error("操作错误,联系信息部!");
  1356. });
  1357. },
  1358. //删除
  1359. handleDelete(index,row){
  1360. this.$confirm('此操作将永久删除, 是否继续?', '提示', {
  1361. confirmButtonText: '确定',
  1362. cancelButtonText: '取消',
  1363. type: 'warning'
  1364. }).then(() => {
  1365. var url = "/api/PersonnelModule/GoodsDel/"+row.id
  1366. var that = this
  1367. this.$axios({
  1368. method: 'delete',
  1369. url: url,
  1370. headers: {
  1371. Authorization: 'Bearer ' +that.token
  1372. }
  1373. }).then(function (res) {
  1374. if (res.data.code == 200) {
  1375. that.$message({
  1376. type: 'success',
  1377. message: res.data.msg
  1378. });
  1379. that.GoodsList();
  1380. }else{
  1381. that.$message.error(res.data.msg);
  1382. }
  1383. }).catch(function (error) {
  1384. that.$message.error("操作错误,联系信息部!");
  1385. });
  1386. }).catch(() => {
  1387. this.$message({
  1388. type: 'info',
  1389. message: '已取消删除'
  1390. });
  1391. });
  1392. },
  1393. //计算总价
  1394. Sumup(){
  1395. console.log(123);
  1396. this.warehousingsruleForm.totalPrice=this.warehousingsruleForm.quantity*this.warehousingsruleForm.unitPrice;
  1397. },
  1398. //新增物品api
  1399. GoodsOP() {
  1400. var url = "/api/PersonnelModule/GoodsOP"
  1401. var that = this
  1402. console.log(that.AdditemsName,that.AddMaterialinfoType,that.AddMaterialTypearr,that.unit);
  1403. if (that.AdditemsName==""||that.AddMaterialinfoType==""||that.AddMaterialType==""||that.unit=="") {
  1404. that.$message.error("检查是否填写完全!");
  1405. return
  1406. }
  1407. this.$axios({
  1408. method: 'post',
  1409. url: url,
  1410. headers: {
  1411. Authorization: 'Bearer ' +that.token
  1412. },
  1413. data: {
  1414. currUserId:that.Userid,
  1415. id:that.ID,
  1416. name:that.AdditemsName,
  1417. type:that.AddMaterialinfoType,
  1418. unit:that.unit,
  1419. remark:that.Additemstextarea,
  1420. }
  1421. }).then(function (res) {
  1422. if (res.data.code == 200) {
  1423. that.$message({
  1424. message:res.data.msg ,
  1425. type: 'success',
  1426. offset:50
  1427. });
  1428. that.AddItemsVisible=false;
  1429. that.GoodsList();
  1430. }else{
  1431. that.$message.error(res.data.msg);
  1432. }
  1433. }).catch(function (error) {
  1434. that.$message.error("操作错误,联系信息部!");
  1435. });
  1436. },
  1437. //入库数据初始化
  1438. rkcsh(){
  1439. this.warehousingsruleForm={
  1440. id:0,
  1441. quantity: 0,
  1442. unitPrice: 0,
  1443. totalPrice: 0,
  1444. supplierName: '',
  1445. supplierTel: '',
  1446. supplierAddress: '',
  1447. supplierSource: '',
  1448. storageUserId:'',
  1449. storageTime:'',
  1450. remark: ''
  1451. }
  1452. },
  1453. //入库列表
  1454. instorage(row){
  1455. this.rkcsh();
  1456. this.ID=row.id;
  1457. this.warehousingsVisible=true;
  1458. var url = "/api/PersonnelModule/GoodsStorageList"
  1459. var that = this
  1460. this.$axios({
  1461. method: 'POST',
  1462. url: url,
  1463. headers: {
  1464. Authorization: 'Bearer '
  1465. },
  1466. data:{
  1467. portType:1,
  1468. pageIndex:that.WScurrentPage,
  1469. pageSize:that.WSpagesize,
  1470. goodsId:row.id,
  1471. }
  1472. }).then(function (res) {
  1473. if (res.data.code == 200) {
  1474. that.WScount=res.data.count;
  1475. that.warehousingslist=res.data.data;
  1476. }else{
  1477. that.$message.error(res.data.msg);
  1478. }
  1479. }).catch(function (error) {
  1480. that.$message.error("操作错误,联系信息部!");
  1481. });
  1482. },
  1483. //入库api
  1484. GoodsStorageOP(){
  1485. var url = "/api/PersonnelModule/GoodsStorageOP"
  1486. var that = this
  1487. this.$axios({
  1488. method: 'POST',
  1489. url: url,
  1490. headers: {
  1491. Authorization: 'Bearer ' +that.token
  1492. },
  1493. data:{
  1494. id:that.warehousingsruleForm.id,
  1495. goodsId:that.ID,
  1496. quantity:that.warehousingsruleForm.quantity,
  1497. unitPrice:that.warehousingsruleForm.unitPrice,
  1498. totalPrice:that.warehousingsruleForm.totalPrice,
  1499. supplierName:that.warehousingsruleForm.supplierName,
  1500. supplierTel:that.warehousingsruleForm.supplierTel,
  1501. supplierAddress:that.warehousingsruleForm.supplierAddress,
  1502. supplierSource:that.warehousingsruleForm.supplierSource,
  1503. storageUserId:that.warehousingsruleForm.storageUserId,
  1504. storageTime:that.datetime(that.warehousingsruleForm.storageTime),
  1505. remark:that.warehousingsruleForm.remark,
  1506. }
  1507. }).then(function (res) {
  1508. if (res.data.code == 200) {
  1509. that.$message({
  1510. message:res.data.msg ,
  1511. type: 'success'
  1512. });
  1513. that.instorage({'id':that.ID});
  1514. that.resetForm('warehousingsruleForm');
  1515. that.GoodsList();
  1516. }else{
  1517. that.$message.error(res.data.msg);
  1518. }
  1519. }).catch(function (error) {
  1520. that.$message.error("操作错误,联系信息部!");
  1521. });
  1522. },
  1523. //编辑入库
  1524. Editentry(val){
  1525. var url = "/api/PersonnelModule/GoodsStorageInfo/"+val.id+"?portType=1"
  1526. var that = this
  1527. this.$axios({
  1528. method: 'get',
  1529. url: url,
  1530. headers: {
  1531. Authorization: 'Bearer '
  1532. }
  1533. }).then(function (res) {
  1534. if (res.data.code == 200) {
  1535. var datainfo=res.data.data;
  1536. that.warehousingsruleForm.id=datainfo.id;
  1537. that.warehousingsruleForm.quantity=datainfo.quantity;
  1538. that.warehousingsruleForm.unitPrice=datainfo.unitPrice;
  1539. that.warehousingsruleForm.totalPrice=datainfo.totalPrice;
  1540. that.warehousingsruleForm.supplierName=datainfo.supplierName;
  1541. that.warehousingsruleForm.supplierTel=datainfo.supplierTel;
  1542. that.warehousingsruleForm.supplierAddress=datainfo.supplierAddress;
  1543. that.warehousingsruleForm.supplierSource=datainfo.supplierSource;
  1544. that.warehousingsruleForm.storageUserId=datainfo.storageUserId;
  1545. that.warehousingsruleForm.storageTime=datainfo.storageTime;
  1546. that.warehousingsruleForm.remark=datainfo.remark;
  1547. }else{
  1548. that.$message.error(res.data.msg);
  1549. }
  1550. }).catch(function (error) {
  1551. that.$message.error("操作错误,联系信息部!");
  1552. });
  1553. },
  1554. //删除入裤
  1555. Deleteintolibrary(row){
  1556. this.$confirm('此操作将永久删除, 是否继续?', '提示', {
  1557. confirmButtonText: '确定',
  1558. cancelButtonText: '取消',
  1559. type: 'warning'
  1560. }).then(() => {
  1561. var url = "/api/PersonnelModule/GoodsStorageDel/"+row.id
  1562. var that = this
  1563. this.$axios({
  1564. method: 'delete',
  1565. url: url,
  1566. headers: {
  1567. Authorization: 'Bearer ' +that.token
  1568. }
  1569. }).then(function (res) {
  1570. if (res.data.code == 200) {
  1571. that.$message({
  1572. type: 'success',
  1573. message: res.data.msg
  1574. });
  1575. that.instorage({'id':that.ID});
  1576. }else{
  1577. that.$message.error(res.data.msg);
  1578. }
  1579. }).catch(function (error) {
  1580. that.$message.error("操作错误,联系信息部!");
  1581. });
  1582. }).catch(() => {
  1583. this.$message({
  1584. type: 'info',
  1585. message: '已取消删除'
  1586. });
  1587. });
  1588. },
  1589. //入库
  1590. submitForm(formName) {
  1591. this.$refs[formName].validate((valid) => {
  1592. if (valid) {
  1593. this.GoodsStorageOP();
  1594. } else {
  1595. return false;
  1596. }
  1597. });
  1598. },
  1599. resetForm(formName) {
  1600. this.warehousingsruleForm.id=0;
  1601. this.$refs[formName].resetFields();
  1602. },
  1603. //领用
  1604. ClaimsubmitForm(formName) {
  1605. this.$refs[formName].validate((valid) => {
  1606. if (valid) {
  1607. this.GoodsReceiveOP();
  1608. } else {
  1609. console.log('error submit!!');
  1610. return false;
  1611. }
  1612. });
  1613. },
  1614. ClaimresetForm(formName) {
  1615. this.Claimitemlabel="";
  1616. this.ClaimsruleForm.id=0;
  1617. this.$refs[formName].resetFields();
  1618. },
  1619. //审核状态切换
  1620. typevaluechange(){
  1621. this.ApprovalcurrentPage=1;
  1622. this.GoodsReceiveLists();
  1623. },
  1624. //领用审核列表
  1625. GoodsReceiveLists(){
  1626. this.ApprovalData=[];
  1627. this.ApprovalVisible=true
  1628. var url = "/api/PersonnelModule/GoodsReceiveList"
  1629. var that = this
  1630. this.$axios({
  1631. method: 'POST',
  1632. url: url,
  1633. headers: {
  1634. Authorization: 'Bearer ' +that.token
  1635. },
  1636. data:{
  1637. portType:1,
  1638. pageIndex:that.ApprovalcurrentPage,
  1639. pageSize:that.Approvalpagesize,
  1640. goodsId:0,
  1641. userLabel:'',
  1642. goodsName:that.Approvalinput,
  1643. beginDt:'',
  1644. endDt:'',
  1645. groupLabel:'',
  1646. typeLabel:'',
  1647. auditLabel:that.typevalue+'',
  1648. }
  1649. }).then(function (res) {
  1650. if (res.data.code == 200) {
  1651. that.ApprovalData=res.data.data;
  1652. that.Approvalcount=res.data.count;
  1653. }else{
  1654. that.$message.error(res.data.msg);
  1655. }
  1656. }).catch(function (error) {
  1657. that.$message.error("操作错误,联系信息部!");
  1658. });
  1659. },
  1660. //查询领用记录
  1661. inquireRecords(){
  1662. this.ReceiptRecord=true;
  1663. this.RecordsGoodsReceiveList(false);
  1664. },
  1665. //领用记录
  1666. RecordsGoodsReceiveList(isExcelDownload){
  1667. let groupID="";
  1668. for(let g=0;g<this.groupID.length;g++){
  1669. groupID+=this.groupID[g]+',';
  1670. }
  1671. groupID=groupID.substring(0, groupID.length - 1);
  1672. let personnelID="";
  1673. for (let p = 0; p < this.personnelID.length; p++) {
  1674. personnelID += this.personnelID[p]+',';
  1675. }
  1676. personnelID=personnelID.substring(0, personnelID.length - 1);
  1677. let RSAuditTypes="";
  1678. for (let r = 0; r < this.RSAuditTypes.length; r++) {
  1679. RSAuditTypes += this.RSAuditTypes[r]+",";
  1680. }
  1681. RSAuditTypes=RSAuditTypes.substring(0, RSAuditTypes.length - 1);
  1682. var url = "/api/PersonnelModule/GoodsReceiveList"
  1683. var that = this
  1684. this.$axios({
  1685. method: 'POST',
  1686. url: url,
  1687. headers: {
  1688. Authorization: 'Bearer ' +that.token
  1689. },
  1690. data:{
  1691. portType:1,
  1692. pageIndex:that.RSAuditcurrentPage,
  1693. pageSize:that.RSAuditpagesize,
  1694. goodsId:0,
  1695. userLabel:personnelID,
  1696. goodsName:that.RSAuditname,
  1697. beginDt:that.RSAudittime?that.datetimes(that.RSAudittime[0]):'',
  1698. endDt:that.RSAudittime?that.datetimes(that.RSAudittime[1]):'',
  1699. groupLabel:groupID,
  1700. typeLabel:RSAuditTypes,
  1701. auditLabel:that.RSAuditStatus+"",
  1702. isExcelDownload:isExcelDownload,
  1703. }
  1704. }).then(function (res) {
  1705. if (res.data.code == 200) {
  1706. let Datalist=res.data;
  1707. if (isExcelDownload==true) {
  1708. window.open(Datalist.data.url)
  1709. return
  1710. }
  1711. that.RSAuditData=Datalist.data;
  1712. that.RSAuditcount=Datalist.count;
  1713. }else{
  1714. that.$message.error(res.data.msg);
  1715. }
  1716. }).catch(function (error) {
  1717. that.$message.error("操作错误,联系信息部!");
  1718. });
  1719. },
  1720. //领用列表
  1721. GoodsReceiveList(row){
  1722. this.Claimitemlabel="";
  1723. if(row.stockQuantity<=0){
  1724. this.$message.error("已无库存!");
  1725. return
  1726. }
  1727. this.bjcsh();
  1728. this.ClaimitemData=[];
  1729. this.ID=row.id;
  1730. this.ClaimitemVisible=true;
  1731. var url = "/api/PersonnelModule/GoodsReceiveList"
  1732. var that = this
  1733. this.$axios({
  1734. method: 'POST',
  1735. url: url,
  1736. headers: {
  1737. Authorization: 'Bearer ' +that.token
  1738. },
  1739. data:{
  1740. portType:1,
  1741. pageIndex:that.ClaimitemcurrentPage,
  1742. pageSize:that.Claimitempagesize,
  1743. goodsId:row.id,
  1744. userLabel:that.Userid+'',
  1745. goodsName:'',
  1746. beginDt:'',
  1747. endDt:'',
  1748. groupLabel:'',
  1749. typeLabel:'',
  1750. auditLabel:'',
  1751. isExcelDownload:false,
  1752. }
  1753. }).then(function (res) {
  1754. if (res.data.code == 200) {
  1755. that.ClaimitemData=res.data.data;
  1756. that.Claimitemcount=res.data.count;
  1757. }else{
  1758. that.$message.error(res.data.msg);
  1759. }
  1760. }).catch(function (error) {
  1761. that.$message.error("操作错误,联系信息部!");
  1762. });
  1763. },
  1764. //领用api
  1765. GoodsReceiveOP(){
  1766. var url = "/api/PersonnelModule/GoodsReceiveOP"
  1767. var that = this
  1768. this.$axios({
  1769. method: 'POST',
  1770. url: url,
  1771. headers: {
  1772. Authorization: 'Bearer ' +that.token
  1773. },
  1774. data:{
  1775. id:that.ClaimsruleForm.id,
  1776. groupId:that.ClaimsruleForm.groupId,
  1777. goodsId:that.ID,
  1778. quantity:that.ClaimsruleForm.quantity,
  1779. reason:that.ClaimsruleForm.reason,
  1780. remark:that.ClaimsruleForm.remark,
  1781. }
  1782. }).then(function (res) {
  1783. if (res.data.code == 200) {
  1784. that.$message({
  1785. type: 'success',
  1786. message: res.data.msg
  1787. });
  1788. that.ClaimresetForm("ClaimsruleForm");
  1789. that.GoodsReceiveList({'id':that.ID});
  1790. }else{
  1791. that.$message.error(res.data.msg);
  1792. }
  1793. }).catch(function (error) {
  1794. that.$message.error("操作错误,联系信息部!");
  1795. });
  1796. },
  1797. //编辑初始化
  1798. bjcsh(){
  1799. this.ClaimsruleForm={
  1800. id:0,
  1801. groupId:'',
  1802. quantity:0,
  1803. reason:'',
  1804. remark:'',
  1805. }
  1806. },
  1807. //编辑领用
  1808. Editentryreceive(val){
  1809. var url = "/api/PersonnelModule/GoodsReceiveInfo/"+val.id+"?portType=1"
  1810. var that = this
  1811. this.$axios({
  1812. method: 'get',
  1813. url: url,
  1814. headers: {
  1815. Authorization: 'Bearer ' +that.token
  1816. }
  1817. }).then(function (res) {
  1818. if (res.data.code == 200) {
  1819. var datainfo=res.data.data;
  1820. that.ClaimsruleForm.id=datainfo.id;
  1821. that.ClaimsruleForm.groupId=datainfo.groupId;
  1822. that.ClaimsruleForm.quantity=datainfo.quantity;
  1823. that.ClaimsruleForm.reason=datainfo.reason;
  1824. that.ClaimsruleForm.remark=datainfo.remark;
  1825. that.Claimitemlabel=datainfo.goodsStorageInfoStr;
  1826. }else{
  1827. that.$message.error(res.data.msg);
  1828. }
  1829. }).catch(function (error) {
  1830. that.$message.error("操作错误,联系信息部!");
  1831. });
  1832. },
  1833. //审核列表删除
  1834. Deleteintolibraryreceives(row){
  1835. this.$confirm('此操作将永久删除, 是否继续?', '提示', {
  1836. confirmButtonText: '确定',
  1837. cancelButtonText: '取消',
  1838. type: 'warning'
  1839. }).then(() => {
  1840. var url = "/api/PersonnelModule/GoodsReceiveDel/"+row.id
  1841. var that = this
  1842. this.$axios({
  1843. method: 'delete',
  1844. url: url,
  1845. headers: {
  1846. Authorization: 'Bearer ' +that.token
  1847. }
  1848. }).then(function (res) {
  1849. if (res.data.code == 200) {
  1850. that.$message({
  1851. type: 'success',
  1852. message: res.data.msg
  1853. });
  1854. that.GoodsReceiveLists();
  1855. }else{
  1856. that.$message.error(res.data.msg);
  1857. }
  1858. }).catch(function (error) {
  1859. that.$message.error("操作错误,联系信息部!");
  1860. });
  1861. }).catch(() => {
  1862. this.$message({
  1863. type: 'info',
  1864. message: '已取消删除'
  1865. });
  1866. });
  1867. },
  1868. //删除领用
  1869. Deleteintolibraryreceive(row){
  1870. this.$confirm('此操作将永久删除, 是否继续?', '提示', {
  1871. confirmButtonText: '确定',
  1872. cancelButtonText: '取消',
  1873. type: 'warning'
  1874. }).then(() => {
  1875. var url = "/api/PersonnelModule/GoodsReceiveDel/"+row.id
  1876. var that = this
  1877. this.$axios({
  1878. method: 'delete',
  1879. url: url,
  1880. headers: {
  1881. Authorization: 'Bearer ' +that.token
  1882. }
  1883. }).then(function (res) {
  1884. if (res.data.code == 200) {
  1885. that.$message({
  1886. type: 'success',
  1887. message: res.data.msg
  1888. });
  1889. that.GoodsReceiveList({'id':that.ID});
  1890. }else{
  1891. that.$message.error(res.data.msg);
  1892. }
  1893. }).catch(function (error) {
  1894. that.$message.error("操作错误,联系信息部!");
  1895. });
  1896. }).catch(() => {
  1897. this.$message({
  1898. type: 'info',
  1899. message: '已取消删除'
  1900. });
  1901. });
  1902. },
  1903. //审核领用
  1904. GoodsReceiveAudit(row,val){
  1905. var auditDep=0
  1906. for (let i = 0; i < row.auditPers.length; i++) {
  1907. if (row.auditPers[i].auditPer==true) {
  1908. auditDep=row.auditPers[i].auditDep
  1909. }
  1910. }
  1911. if (auditDep==0) {
  1912. return this.$message.error('没有审核权限');
  1913. }
  1914. var url = "/api/PersonnelModule/GoodsReceiveAudit"
  1915. var that = this
  1916. this.$axios({
  1917. method: 'post',
  1918. url: url,
  1919. headers: {
  1920. Authorization: 'Bearer ' +that.token
  1921. },
  1922. data:{
  1923. label:row.id+'',
  1924. auditEnum:val,
  1925. }
  1926. }).then(function (res) {
  1927. if (res.data.code == 200) {
  1928. that.$message({
  1929. type: 'success',
  1930. message: res.data.msg
  1931. });
  1932. that.GoodsReceiveLists();
  1933. if(that.tableData.length>0){
  1934. that.GoodsList();
  1935. }
  1936. }else{
  1937. that.$message.error(res.data.msg);
  1938. }
  1939. }).catch(function (error) {
  1940. that.$message.error("操作错误,联系信息部!");
  1941. });
  1942. },
  1943. },
  1944. mounted(){
  1945. //权限
  1946. let authData=JSON.parse(localStorage.getItem('userinif')).authData;
  1947. let Permissions=[];
  1948. for(let k=0;k<authData.length;k++){
  1949. for(let m=0;m<authData[k].pageList.length;m++){
  1950. if (authData[k].pageList[m].webUrl=='/SuppliesInventory') {
  1951. Permissions=authData[k].pageList[m].pageAuth;
  1952. }
  1953. }
  1954. }
  1955. for (let r = 0; r < Permissions.length; r++) {
  1956. if (Permissions[r].funid==12) {
  1957. this.Auditauthority=true;
  1958. }
  1959. if (Permissions[r].funid==3) {
  1960. this.Editpermission=true;
  1961. }
  1962. if (Permissions[r].funid==11) {
  1963. this.Addpermission=true;
  1964. }
  1965. if (Permissions[r].funid==2) {
  1966. this.Deletepermission=true;
  1967. }
  1968. }
  1969. this.Userid=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
  1970. this.token=JSON.parse(localStorage.getItem('userinif')).token;
  1971. this.GoodsInitDataSource();
  1972. }
  1973. }
  1974. </script>
  1975. <style>
  1976. .SuppliesInventory-all {
  1977. background-color: #fff;
  1978. padding: 10px;
  1979. box-shadow: 0 0 5px #0005;
  1980. border-radius: 10px;
  1981. min-height: 830px;
  1982. min-width: 1535px;
  1983. }
  1984. .SuppliesInventory-head{
  1985. display: flex;
  1986. justify-content: space-between;
  1987. }
  1988. .SuppliesInventory-head-li{
  1989. margin-right: 15px;
  1990. }
  1991. .SuppliesInventory-head-li label{
  1992. font-size: 14px;
  1993. color: #555;
  1994. }
  1995. .SuppliesInventory-table{
  1996. margin-top: 15px;
  1997. }
  1998. .SuppliesInventory-head-ul{
  1999. display: flex;
  2000. }
  2001. .additems-li{
  2002. margin-bottom: 10px;
  2003. }
  2004. .additems-btn{
  2005. text-align: right;
  2006. margin-top: 20px;
  2007. }
  2008. .warehousingsrule-input{
  2009. display: flex;
  2010. flex-wrap: wrap;
  2011. justify-content: space-between;
  2012. }
  2013. .warehousingsrule-input .el-form-item{
  2014. width: 33%;
  2015. }
  2016. .warehousingsrule-input .el-input-number{
  2017. width: 100%;
  2018. }
  2019. .warehousingsrule-input .el-form-item{
  2020. margin-bottom: 10px;
  2021. }
  2022. .warehousingsrule-input .el-form-item__error{
  2023. top: 82%;
  2024. }
  2025. .warehousingsrule-input .el-select{
  2026. width: 100%;
  2027. }
  2028. .warehousingsrule-table .el-table th.el-table__cell>.cell{
  2029. text-align: center;
  2030. font-size: 12px;
  2031. }
  2032. .warehousingsrule-table .el-table td.el-table__cell div{
  2033. font-size: 12px;
  2034. }
  2035. .SuppliesInventory-table .block{
  2036. text-align: center;
  2037. margin-top: 10px;
  2038. }
  2039. .warehousingsrule-table .block{
  2040. text-align: center;
  2041. margin-top: 10px;
  2042. }
  2043. .additems-li label{
  2044. display: inline-block;
  2045. width: 105px;
  2046. }
  2047. .Claimitem-input{
  2048. display: flex;
  2049. flex-wrap: wrap;
  2050. justify-content: space-between;
  2051. }
  2052. .Claimitem-input .el-form-item{
  2053. width: 33%;
  2054. }
  2055. .Claimitem-input .el-input-number{
  2056. width: 100%;
  2057. }
  2058. .Claimitem-input .el-form-item{
  2059. margin-bottom: 10px;
  2060. }
  2061. .Claimitem-input .el-form-item__error{
  2062. top: 82%;
  2063. }
  2064. .claimitem-table .el-table th.el-table__cell>.cell{
  2065. text-align: center;
  2066. font-size: 12px;
  2067. }
  2068. .claimitem-table .el-table td.el-table__cell div{
  2069. font-size: 12px;
  2070. }
  2071. .claimitem-table .block{
  2072. text-align: center;
  2073. margin-top: 10px;
  2074. }
  2075. .Approval-table .el-table th.el-table__cell>.cell{
  2076. text-align: center;
  2077. font-size: 12px;
  2078. }
  2079. .Approval-table .el-table td.el-table__cell div{
  2080. font-size: 12px;
  2081. }
  2082. .Approval-table .block{
  2083. text-align: center;
  2084. margin-top: 10px;
  2085. }
  2086. .ReceiptRecord-table .el-table th.el-table__cell>.cell{
  2087. text-align: center;
  2088. font-size: 12px;
  2089. }
  2090. .ReceiptRecord-table .el-table td.el-table__cell div{
  2091. font-size: 12px;
  2092. }
  2093. .ReceiptRecord-table .block{
  2094. text-align: center;
  2095. margin-top: 10px;
  2096. }
  2097. .Approval-dialog .el-dialog__body{
  2098. padding-top: 0px;
  2099. }
  2100. .ReceiptRecord-search{
  2101. display: flex;
  2102. }
  2103. .ReceiptRecord-search-li label{
  2104. margin-left: 10px;
  2105. }
  2106. .ReceiptRecord-table{
  2107. margin-top: 15px;
  2108. }
  2109. .ReceiptRecord-search .el-range-editor.el-input__inner{
  2110. margin-bottom:0;
  2111. }
  2112. .warehousingaudit-search{
  2113. display: flex;
  2114. }
  2115. .warehousingaudit-search-li label{
  2116. margin-left: 10px;
  2117. }
  2118. .warehousingaudit-search .el-range-editor.el-input__inner{
  2119. margin-bottom:0;
  2120. }
  2121. .warehousingaudit-table{
  2122. margin-top: 15px;
  2123. }
  2124. .warehousingaudit-table .block{
  2125. text-align: center;
  2126. }
  2127. </style>