SuppliesInventory.vue 85 KB

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