SuppliesInventory.vue 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433
  1. <template>
  2. <div class="SuppliesInventory-all">
  3. <el-dialog top="10vh" class="Approval-dialog" width="1100px" title="领用审核" :visible.sync="ApprovalVisible">
  4. <div class="Approval-table">
  5. <el-table
  6. :data="ApprovalData"
  7. border
  8. style="width: 100%">
  9. <el-table-column
  10. prop="goodsName"
  11. label="物品名称"
  12. width="180">
  13. </el-table-column>
  14. <el-table-column
  15. prop="quantity"
  16. label="数量"
  17. width="50">
  18. </el-table-column>
  19. <el-table-column
  20. prop="createTime"
  21. label="申请时间"
  22. width="150">
  23. </el-table-column>
  24. <el-table-column
  25. prop="createUserName"
  26. label="申请人"
  27. width="70">
  28. </el-table-column>
  29. <el-table-column
  30. prop="reason"
  31. label="申请原因"
  32. width="80">
  33. <template slot-scope="scope">
  34. <el-popover
  35. placement="top"
  36. width="300"
  37. trigger="hover">
  38. {{scope.row.reason}}
  39. <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>
  40. </el-popover>
  41. </template>
  42. </el-table-column>
  43. <el-table-column
  44. prop="remark"
  45. label="备注">
  46. <template slot-scope="scope">
  47. <el-popover
  48. placement="top"
  49. width="300"
  50. trigger="hover">
  51. {{scope.row.remark}}
  52. <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>
  53. </el-popover>
  54. </template>
  55. </el-table-column>
  56. <el-table-column
  57. prop="auditStatusText"
  58. label="审核状态"
  59. width="100">
  60. </el-table-column>
  61. <el-table-column
  62. label="操作"
  63. width="250">
  64. <template slot-scope="scope">
  65. <el-button v-if="scope.row.auditStatus==0||scope.row.auditStatus==2" size="mini" type="primary" title="通过" @click="GoodsReceiveAudit(scope.row.id,1)" >通过</el-button>
  66. <el-button v-if="scope.row.auditStatus==0" size="mini" type="info" title="不通过" @click="GoodsReceiveAudit(scope.row.id,2)">不通过</el-button>
  67. <el-button v-if="scope.row.auditStatus==1" size="mini" type="warning" title="取消通过" @click="GoodsReceiveAudit(scope.row.id,0)">取消通过</el-button>
  68. <el-button size="mini" title="删除" type="danger" @click="Deleteintolibraryreceives(scope.row)">删除</el-button>
  69. </template>
  70. </el-table-column>
  71. </el-table>
  72. <div v-if="Approvalcount>Approvalpagesize" class="block">
  73. <el-pagination
  74. @size-change="ApprovalhandleSizeChange"
  75. @current-change="ApprovalhandleCurrentChange"
  76. :current-page="ApprovalcurrentPage"
  77. :page-sizes="[6, 10, 15, 40]"
  78. :page-size="Approvalpagesize"
  79. layout="total, sizes, prev, pager, next, jumper"
  80. :total="Approvalcount">
  81. </el-pagination>
  82. </div>
  83. </div>
  84. </el-dialog>
  85. <el-dialog top="10vh" width="1200px" title="入库物品" :visible.sync="warehousingsVisible">
  86. <el-form :model="warehousingsruleForm" :rules="warehousingsrules" ref="warehousingsruleForm" label-width="100px" class="demo-ruleForm">
  87. <div class="warehousingsrule-input">
  88. <el-form-item label="入库数量" prop="quantity">
  89. <el-input-number @blur="Sumup" size="small" :precision="2" :controls="false" v-model="warehousingsruleForm.quantity"></el-input-number>
  90. </el-form-item>
  91. <el-form-item label="物品单价" prop="unitPrice">
  92. <el-input-number @blur="Sumup" size="small" :precision="1" :controls="false" v-model="warehousingsruleForm.unitPrice"></el-input-number>
  93. </el-form-item>
  94. <el-form-item label="物品总价" prop="totalPrice">
  95. <el-input-number size="small" :precision="2" :controls="false" v-model="warehousingsruleForm.totalPrice"></el-input-number>
  96. </el-form-item>
  97. <el-form-item label="供应商名称" prop="supplierName">
  98. <el-input size="small" placeholder="请输入物资名称" v-model="warehousingsruleForm.supplierName" clearable></el-input>
  99. </el-form-item>
  100. <el-form-item label="供应商电话" prop="supplierTel">
  101. <el-input size="small" placeholder="请输入供应商电话" v-model="warehousingsruleForm.supplierTel" clearable></el-input>
  102. </el-form-item>
  103. <el-form-item label="供应商地址" prop="supplierAddress">
  104. <el-input size="small" placeholder="请输入供应商地址" v-model="warehousingsruleForm.supplierAddress" clearable></el-input>
  105. </el-form-item>
  106. <el-form-item label="供应商来源" prop="supplierSource">
  107. <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.supplierSource" clearable></el-input>
  108. </el-form-item>
  109. <el-form-item label="入库人员" prop="storageUserId">
  110. <el-select size="small" v-model="warehousingsruleForm.storageUserId" clearable filterable
  111. placeholder="请选择">
  112. <el-option v-for="item in userNameData" :key="item.id" :label="item.userName"
  113. :value="item.id">
  114. </el-option>
  115. </el-select>
  116. <!-- <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.storageUserId" clearable></el-input> -->
  117. </el-form-item>
  118. <el-form-item label="入库时间" prop="storageTime">
  119. <el-date-picker
  120. size="small"
  121. style="width:100%"
  122. v-model="warehousingsruleForm.storageTime"
  123. type="datetime"
  124. placeholder="选择日期时间"
  125. align="right"
  126. :picker-options="pickerOptions">
  127. </el-date-picker>
  128. <!-- <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.storageTime" clearable></el-input> -->
  129. </el-form-item>
  130. <el-form-item style="width:100%;" label="备注" prop="remark">
  131. <el-input size="small" placeholder="请输入备注称" v-model="warehousingsruleForm.remark" clearable></el-input>
  132. </el-form-item>
  133. </div>
  134. <el-form-item style="text-align: right;">
  135. <el-button size="small" @click="resetForm('warehousingsruleForm')">清空</el-button>
  136. <el-button size="small" type="primary" @click="submitForm('warehousingsruleForm')">保存</el-button>
  137. </el-form-item>
  138. </el-form>
  139. <div class="warehousingsrule-table">
  140. <el-table
  141. height="400"
  142. :data="warehousingslist"
  143. border
  144. style="width: 100%">
  145. <el-table-column
  146. prop="unitPrice"
  147. label="物品单价"
  148. width="80">
  149. <template slot-scope="scope">
  150. {{townum(scope.row.unitPrice)}}
  151. </template>
  152. </el-table-column>
  153. <el-table-column
  154. prop="quantity"
  155. label="物品数量"
  156. width="70">
  157. </el-table-column>
  158. <el-table-column
  159. prop="totalPrice"
  160. label="物品总价"
  161. width="80">
  162. <template slot-scope="scope">
  163. {{townum(scope.row.totalPrice)}}
  164. </template>
  165. </el-table-column>
  166. <el-table-column
  167. prop="supplierName"
  168. label="供应商名称">
  169. <template slot-scope="scope">
  170. <el-popover
  171. placement="top"
  172. width="300"
  173. trigger="hover">
  174. {{scope.row.supplierName}}
  175. <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>
  176. </el-popover>
  177. </template>
  178. </el-table-column>
  179. <el-table-column
  180. prop="supplierTel"
  181. label="供应商电话">
  182. <template slot-scope="scope">
  183. <el-popover
  184. placement="top"
  185. width="300"
  186. trigger="hover">
  187. {{scope.row.supplierTel}}
  188. <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>
  189. </el-popover>
  190. </template>
  191. </el-table-column>
  192. <el-table-column
  193. prop="supplierAddress"
  194. label="供应商地址">
  195. <template slot-scope="scope">
  196. <el-popover
  197. placement="top"
  198. width="300"
  199. trigger="hover">
  200. {{scope.row.supplierAddress}}
  201. <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>
  202. </el-popover>
  203. </template>
  204. </el-table-column>
  205. <el-table-column
  206. prop="supplierSource"
  207. label="供应商来源">
  208. <template slot-scope="scope">
  209. <el-popover
  210. placement="top"
  211. width="300"
  212. trigger="hover">
  213. {{scope.row.supplierSource}}
  214. <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>
  215. </el-popover>
  216. </template>
  217. </el-table-column>
  218. <el-table-column
  219. prop="storageTime"
  220. label="入库时间"
  221. width="150">
  222. </el-table-column>
  223. <el-table-column
  224. prop="storageUserName"
  225. label="入库人"
  226. width="80">
  227. </el-table-column>
  228. <el-table-column
  229. label="操作"
  230. width="155">
  231. <template slot-scope="scope">
  232. <el-button size="mini" title="编辑" @click="Editentry(scope.row)">编辑</el-button>
  233. <el-button size="mini" title="删除" type="danger" @click="Deleteintolibrary(scope.row)">删除</el-button>
  234. </template>
  235. </el-table-column>
  236. </el-table>
  237. <div v-if="WScount>WSpagesize" class="block">
  238. <el-pagination
  239. @size-change="WShandleSizeChange"
  240. @current-change="WShandleCurrentChange"
  241. :current-page="WScurrentPage"
  242. :page-sizes="[6, 10, 15, 40]"
  243. :page-size="WSpagesize"
  244. layout="total, sizes, prev, pager, next, jumper"
  245. :total="WScount">
  246. </el-pagination>
  247. </div>
  248. </div>
  249. </el-dialog>
  250. <el-dialog width="400px" title="添加物品" :visible.sync="AddItemsVisible">
  251. <div class="additems-ul">
  252. <div class="additems-li">
  253. <label>物资类型:</label>
  254. <el-select style="width:250px" @change="AddMaterialTypechange(0)" v-model="AddMaterialType" clearable filterable
  255. placeholder="请选择">
  256. <el-option v-for="item in AddMaterialTypearr" :key="item.id" :label="item.name"
  257. :value="item.id">
  258. </el-option>
  259. </el-select>
  260. </div>
  261. <div class="additems-li">
  262. <label>物资详细类型:</label>
  263. <el-select style="width:250px" v-model="AddMaterialinfoType" clearable filterable
  264. placeholder="请选择">
  265. <el-option v-for="item in AddMaterialinfoTypearr" :key="item.id" :label="item.name"
  266. :value="item.id">
  267. </el-option>
  268. </el-select>
  269. </div>
  270. <div class="additems-li">
  271. <label>物资名称:</label>
  272. <el-input
  273. style="width:250px"
  274. placeholder="请输入物资名称"
  275. v-model="AdditemsName"
  276. clearable>
  277. </el-input>
  278. </div>
  279. </div>
  280. <div>
  281. <label>备注:</label>
  282. <el-input
  283. style="width:100%;"
  284. type="textarea"
  285. :autosize="{ minRows: 2, maxRows: 4}"
  286. placeholder="请输入内容"
  287. v-model="Additemstextarea">
  288. </el-input>
  289. </div>
  290. <div class="additems-btn">
  291. <el-button @click="AddItemsVisible=false">取消</el-button>
  292. <el-button @click="GoodsOP" type="primary">保存</el-button>
  293. </div>
  294. </el-dialog>
  295. <el-dialog title="领用物品" width="1000px" :visible.sync="ClaimitemVisible">
  296. <el-form :model="ClaimsruleForm" :rules="Claimrules" ref="ClaimsruleForm" label-width="100px" class="demo-ruleForm">
  297. <div class="Claimitem-input">
  298. <el-form-item label="关联团组" prop="groupId">
  299. <el-select size="small" v-model="ClaimsruleForm.groupId" clearable filterable
  300. placeholder="请选择">
  301. <el-option v-for="item in groupNameData" :key="item.id" :label="item.groupName"
  302. :value="item.id">
  303. </el-option>
  304. </el-select>
  305. <!-- <el-input-number size="small" :precision="2" :controls="false" v-model="ClaimsruleForm.groupId"></el-input-number> -->
  306. </el-form-item>
  307. <el-form-item label="领用数量" prop="quantity">
  308. <el-input-number size="small" :precision="2" :controls="false" v-model="ClaimsruleForm.quantity"></el-input-number>
  309. </el-form-item>
  310. <el-form-item label="领用原因" prop="reason">
  311. <el-input size="small" placeholder="请输入领用原因" v-model="ClaimsruleForm.reason"></el-input>
  312. </el-form-item>
  313. </div>
  314. <el-form-item label="备注" prop="remark">
  315. <el-input size="small" placeholder="请输入备注" v-model="ClaimsruleForm.remark"></el-input>
  316. </el-form-item>
  317. <el-form-item style="text-align: right;">
  318. <el-button size="small" @click="ClaimresetForm('ClaimsruleForm')">清空</el-button>
  319. <el-button size="small" type="primary" @click="ClaimsubmitForm('ClaimsruleForm')">保存</el-button>
  320. </el-form-item>
  321. </el-form>
  322. <div class="claimitem-table">
  323. <el-table
  324. height="400"
  325. :data="ClaimitemData"
  326. border
  327. style="width: 100%">
  328. <el-table-column
  329. prop="goodsName"
  330. label="物品名称"
  331. width="180">
  332. </el-table-column>
  333. <el-table-column
  334. prop="quantity"
  335. label="数量"
  336. width="45">
  337. </el-table-column>
  338. <el-table-column
  339. prop="createTime"
  340. label="申请时间"
  341. width="150">
  342. </el-table-column>
  343. <el-table-column
  344. prop="createUserName"
  345. label="申请人"
  346. width="70">
  347. </el-table-column>
  348. <el-table-column
  349. prop="reason"
  350. label="申请原因"
  351. width="80">
  352. <template slot-scope="scope">
  353. <el-popover
  354. placement="top"
  355. width="300"
  356. trigger="hover">
  357. {{scope.row.reason}}
  358. <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>
  359. </el-popover>
  360. </template>
  361. </el-table-column>
  362. <el-table-column
  363. prop="remark"
  364. label="备注">
  365. <template slot-scope="scope">
  366. <el-popover
  367. placement="top"
  368. width="300"
  369. trigger="hover">
  370. {{scope.row.remark}}
  371. <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>
  372. </el-popover>
  373. </template>
  374. </el-table-column>
  375. <el-table-column
  376. prop="auditStatusText"
  377. label="审核状态"
  378. width="80">
  379. </el-table-column>
  380. <el-table-column
  381. label="操作"
  382. width="200">
  383. <template slot-scope="scope">
  384. <el-button size="mini" title="编辑" @click="Editentryreceive(scope.row)">编辑</el-button>
  385. <el-button size="mini" title="删除" type="danger" @click="Deleteintolibraryreceive(scope.row)">删除</el-button>
  386. </template>
  387. </el-table-column>
  388. </el-table>
  389. <div v-if="Claimitemcount>Claimitempagesize" class="block">
  390. <el-pagination
  391. @size-change="ClaimitemhandleSizeChange"
  392. @current-change="ClaimitemhandleCurrentChange"
  393. :current-page="ClaimitemcurrentPage"
  394. :page-sizes="[6, 10, 15, 40]"
  395. :page-size="Claimitempagesize"
  396. layout="total, sizes, prev, pager, next, jumper"
  397. :total="Claimitemcount">
  398. </el-pagination>
  399. </div>
  400. </div>
  401. </el-dialog>
  402. <div class="SuppliesInventory-head">
  403. <div class="SuppliesInventory-head-ul">
  404. <div class="SuppliesInventory-head-li">
  405. <label>物资类型:</label>
  406. <el-select style="width:220px" @change="MaterialTypechange" v-model="MaterialType" clearable filterable
  407. placeholder="请选择">
  408. <el-option v-for="item in MaterialTypearr" :key="item.id" :label="item.name"
  409. :value="item.id">
  410. </el-option>
  411. </el-select>
  412. </div>
  413. <div class="SuppliesInventory-head-li">
  414. <label>物资详细类型:</label>
  415. <el-select @change="MaterialinfoTypechange" style="width:220px" multiple collapse-tags v-model="MaterialinfoType" clearable filterable
  416. placeholder="请选择">
  417. <el-option v-for="item in MaterialinfoTypearr" :key="item.id" :label="item.name"
  418. :value="item.id">
  419. </el-option>
  420. </el-select>
  421. </div>
  422. <div class="SuppliesInventory-head-li">
  423. <label>物资名称:</label>
  424. <el-input
  425. style="width:220px"
  426. placeholder="请输入内容"
  427. v-model="Materialname"
  428. clearable>
  429. </el-input>
  430. </div>
  431. <div class="SuppliesInventory-head-li">
  432. <el-button @click="GoodsList" type="primary">查 询</el-button>
  433. </div>
  434. </div>
  435. <div>
  436. <el-button v-if="evocationdownloadqx" @click="GoodsReceiveLists" type="primary">审核</el-button>
  437. <el-button @click="addbtnclick" type="primary">新增物品</el-button>
  438. </div>
  439. </div>
  440. <div class="SuppliesInventory-table">
  441. <el-table
  442. :data="tableData"
  443. border
  444. style="width: 100%">
  445. <el-table-column
  446. prop="name"
  447. label="物品名称"
  448. width="180">
  449. </el-table-column>
  450. <el-table-column
  451. prop="typeName"
  452. label="物品类型"
  453. width="180">
  454. </el-table-column>
  455. <el-table-column
  456. prop="stockQuantity"
  457. label="物品数量"
  458. width="100">
  459. </el-table-column>
  460. <el-table-column
  461. prop="lastUpdateUserName"
  462. label="录入人"
  463. width="100">
  464. </el-table-column>
  465. <el-table-column
  466. prop="lastUpdateTime"
  467. label="录入时间"
  468. width="180">
  469. </el-table-column>
  470. <el-table-column
  471. prop="remark"
  472. label="备注">
  473. </el-table-column>
  474. <el-table-column
  475. label="操作"
  476. width="300">
  477. <template slot-scope="scope">
  478. <el-button size="mini" title="编辑" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
  479. <el-button size="mini" @click="instorage(scope.row)" type="primary">入库</el-button>
  480. <el-button size="mini" @click="GoodsReceiveList(scope.row)" type="success">领用</el-button>
  481. <el-button size="mini" title="删除" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
  482. </template>
  483. </el-table-column>
  484. </el-table>
  485. <div v-if="count>pagesize" class="block">
  486. <el-pagination
  487. @size-change="handleSizeChange"
  488. @current-change="handleCurrentChange"
  489. :current-page="currentPage"
  490. :page-sizes="[10, 15, 30, 40]"
  491. :page-size="pagesize"
  492. layout="total, sizes, prev, pager, next, jumper"
  493. :total="count">
  494. </el-pagination>
  495. </div>
  496. </div>
  497. </div>
  498. </template>
  499. <script>
  500. export default {
  501. data() {
  502. return {
  503. pickerOptions: {
  504. shortcuts: [{
  505. text: '今天',
  506. onClick(picker) {
  507. picker.$emit('pick', new Date());
  508. }
  509. }, {
  510. text: '昨天',
  511. onClick(picker) {
  512. const date = new Date();
  513. date.setTime(date.getTime() - 3600 * 1000 * 24);
  514. picker.$emit('pick', date);
  515. }
  516. }, {
  517. text: '一周前',
  518. onClick(picker) {
  519. const date = new Date();
  520. date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
  521. picker.$emit('pick', date);
  522. }
  523. }]
  524. },
  525. Userid:'',
  526. token:"",
  527. MaterialType:'',
  528. MaterialTypearr:[],
  529. MaterialinfoType:[],
  530. MaterialinfoTypes:'',
  531. MaterialinfoTypearr:[],
  532. Materialname:'',
  533. tableData:[],
  534. AddItemsVisible:false,
  535. currentPage:1,
  536. pagesize:10,
  537. count:0,
  538. WScurrentPage:1,
  539. WSpagesize:6,
  540. WScount:0,
  541. ClaimitemcurrentPage:1,
  542. Claimitempagesize:6,
  543. Claimitemcount:0,
  544. ApprovalcurrentPage:1,
  545. Approvalpagesize:6,
  546. Approvalcount:0,
  547. //新增物品参数
  548. AddMaterialType:"",
  549. AddMaterialTypearr:[],
  550. AddMaterialinfoType:"",
  551. AddMaterialinfoTypearr:[],
  552. AdditemsName:"",
  553. Additemstextarea:"",
  554. ID:0,
  555. groupNameData:[],
  556. //入库参数
  557. userNameData:[],
  558. warehousingslist:[],
  559. warehousingsVisible:false,
  560. warehousingsruleForm: {
  561. id:0,
  562. quantity: 0,
  563. unitPrice: 0,
  564. totalPrice: 0,
  565. supplierName: '',
  566. supplierTel: '',
  567. supplierAddress: '',
  568. supplierSource: '',
  569. storageUserId:'',
  570. storageTime:'',
  571. remark: ''
  572. },
  573. warehousingsrules: {
  574. quantity: [
  575. { required: true, message: '请输入', trigger: 'blur' },
  576. ],
  577. unitPrice: [
  578. { required: true, message: '请输入', trigger: 'blur' },
  579. ],
  580. totalPrice: [
  581. { required: true, message: '请输入', trigger: 'blur' },
  582. ],
  583. supplierName: [
  584. { required: true, message: '请输入', trigger: 'blur' },
  585. ],
  586. supplierTel: [
  587. { required: true, message: '请输入', trigger: 'blur' },
  588. ],
  589. supplierAddress: [
  590. { required: true, message: '请输入', trigger: 'blur' },
  591. ],
  592. supplierSource: [
  593. { required: true, message: '请输入', trigger: 'blur' },
  594. ],
  595. storageUserId: [
  596. { required: true, message: '请选择', trigger: 'change' },
  597. ],
  598. storageTime: [
  599. { required: true, message: '请选择', trigger: 'blur' },
  600. ],
  601. remark: [
  602. { required: true, message: '请输入', trigger: 'blur' },
  603. ],
  604. },
  605. //领用参数
  606. ClaimitemVisible:false,
  607. ClaimitemData:[],
  608. ClaimsruleForm:{
  609. id:0,
  610. groupId:'',
  611. quantity:0,
  612. reason:'',
  613. remark:'',
  614. },
  615. Claimrules:{
  616. groupId: [
  617. { required: true, message: '请选择', trigger: 'change' },
  618. ],
  619. quantity: [
  620. { required: true, message: '请输入', trigger: 'blur' },
  621. ],
  622. reason: [
  623. { required: true, message: '请输入', trigger: 'blur' },
  624. ],
  625. remark: [
  626. { required: true, message: '请输入', trigger: 'blur' },
  627. ],
  628. },
  629. //审核参数
  630. ApprovalVisible:false,
  631. ApprovalData:[],
  632. //shqx
  633. evocationdownloadqx:false,
  634. }
  635. },
  636. methods:{
  637. //保留两位小数
  638. townum(val){
  639. val=Number(val);
  640. return val.toFixed(2);
  641. },
  642. //处理日期
  643. datetime(val){
  644. var date=new Date(val);
  645. var y=date.getFullYear();
  646. var m=date.getMonth()+1>=10?date.getMonth()+1:'0'+(date.getMonth()+1).toString();
  647. var d=date.getDate()>=10?date.getDate():'0'+(date.getDate()).toString();
  648. var s=date.getHours()>=10?date.getHours():'0'+(date.getHours()).toString();
  649. var f=date.getMinutes()>=10?date.getMinutes():'0'+(date.getMinutes()).toString();
  650. var mm=date.getSeconds()>=10?date.getSeconds():'0'+(date.getSeconds()).toString();
  651. return y+'-'+m+'-'+d+' '+s+':'+f+':'+mm
  652. },
  653. //获取
  654. GoodsInitDataSource() {
  655. var url = "/api/PersonnelModule/GoodsInitDataSource"
  656. var that = this
  657. this.$axios({
  658. method: 'get',
  659. url: url,
  660. headers: {
  661. Authorization: 'Bearer '
  662. }
  663. }).then(function (res) {
  664. if (res.data.code == 200) {
  665. that.MaterialTypearr=res.data.data.goodsTypeData;
  666. that.AddMaterialTypearr=res.data.data.goodsTypeData;
  667. that.userNameData=res.data.data.userNameData;
  668. that.groupNameData=res.data.data.groupNameData;
  669. that.MaterialType=that.MaterialTypearr[0].id;
  670. that.MaterialTypechange();
  671. } else {
  672. that.$message.error(res.data.msg);
  673. }
  674. })
  675. },
  676. //物资类型切换
  677. MaterialTypechange(){
  678. this.MaterialinfoType="";
  679. this.MaterialinfoTypearr=[];
  680. for(let i=0;i<this.MaterialTypearr.length;i++){
  681. if(this.MaterialType==this.MaterialTypearr[i].id){
  682. this.MaterialinfoTypearr=this.MaterialTypearr[i].subTypeItems;
  683. }
  684. }
  685. },
  686. //物资详情选择
  687. MaterialinfoTypechange(){
  688. this.MaterialinfoTypes=""
  689. for(let i=0;i<this.MaterialinfoType.length;i++){
  690. this.MaterialinfoTypes+=this.MaterialinfoType[i]+','
  691. }
  692. this.MaterialinfoTypes=this.MaterialinfoTypes.substring(0, this.MaterialinfoTypes.length - 1);
  693. },
  694. //add物资类型切换
  695. AddMaterialTypechange(val){
  696. if(val==0){
  697. this.AddMaterialinfoType="";
  698. }
  699. this.AddMaterialinfoTypearr=[];
  700. for(let i=0;i<this.AddMaterialTypearr.length;i++){
  701. if(this.AddMaterialType==this.AddMaterialTypearr[i].id){
  702. this.AddMaterialinfoTypearr=this.AddMaterialTypearr[i].subTypeItems;
  703. }
  704. }
  705. },
  706. //获取列表
  707. GoodsList() {
  708. var url = "/api/PersonnelModule/GoodsList"
  709. var that = this
  710. this.$axios({
  711. method: 'post',
  712. url: url,
  713. headers: {
  714. Authorization: 'Bearer '
  715. },
  716. data: {
  717. portType: 1,
  718. pageIndex: that.currentPage,
  719. pageSize: that.pagesize,
  720. typeIds: that.MaterialinfoTypes,
  721. goodsName: that.Materialname,
  722. }
  723. }).then(function (res) {
  724. if (res.data.code == 200) {
  725. that.count=res.data.count;
  726. that.tableData=res.data.data;
  727. }
  728. }).catch(function (error) {
  729. that.$message.error("操作错误,联系信息部!");
  730. });
  731. },
  732. //分页
  733. handleSizeChange(val) {
  734. this.currentPage=1;
  735. this.pagesize=val;
  736. this.GoodsList();
  737. },
  738. handleCurrentChange(val) {
  739. this.currentPage=val;
  740. this.GoodsList();
  741. },
  742. WShandleSizeChange(val) {
  743. this.WScurrentPage=1;
  744. this.WSpagesize=val;
  745. this.instorage({'id':this.ID});
  746. },
  747. WShandleCurrentChange(val) {
  748. this.WScurrentPage=val;
  749. this.instorage({'id':this.ID});
  750. },
  751. ClaimitemhandleSizeChange(val) {
  752. this.ClaimitemcurrentPage=1;
  753. this.Claimitempagesize=val;
  754. this.GoodsReceiveList({'id':this.ID});
  755. },
  756. ClaimitemhandleCurrentChange(val) {
  757. this.ClaimitemcurrentPage=val;
  758. this.GoodsReceiveList({'id':this.ID});
  759. },
  760. ApprovalhandleSizeChange(val) {
  761. this.ApprovalcurrentPage=1;
  762. this.Approvalpagesize=val;
  763. this.GoodsReceiveLists();
  764. },
  765. ApprovalhandleCurrentChange(val) {
  766. this.ApprovalcurrentPage=val;
  767. this.GoodsReceiveLists();
  768. },
  769. //新增按钮
  770. addbtnclick(){
  771. this.ID=0;
  772. this.AdditemsName="";
  773. this.AddMaterialType="";
  774. this.AddMaterialinfoType="";
  775. this.Additemstextarea="";
  776. this.AddItemsVisible=true;
  777. },
  778. //编辑
  779. handleEdit(index,row){
  780. console.log(row);
  781. this.ID=row.id;
  782. var url = "/api/PersonnelModule/GoodsInfo?portType=1&id="+this.ID
  783. var that = this
  784. this.$axios({
  785. method: 'get',
  786. url: url,
  787. headers: {
  788. Authorization: 'Bearer '
  789. }
  790. }).then(function (res) {
  791. if (res.data.code == 200) {
  792. var datainfo=res.data.data;
  793. that.Additemstextarea=datainfo.remark;
  794. that.AdditemsName=datainfo.name;
  795. that.AddMaterialType=datainfo.parentType;
  796. that.AddMaterialinfoType=datainfo.type;
  797. that.AddItemsVisible=true;
  798. that.AddMaterialTypechange(2);
  799. }else{
  800. that.$message.error(res.data.msg);
  801. }
  802. }).catch(function (error) {
  803. that.$message.error("操作错误,联系信息部!");
  804. });
  805. },
  806. //删除
  807. handleDelete(index,row){
  808. this.$confirm('此操作将永久删除, 是否继续?', '提示', {
  809. confirmButtonText: '确定',
  810. cancelButtonText: '取消',
  811. type: 'warning'
  812. }).then(() => {
  813. var url = "/api/PersonnelModule/GoodsDel/"+row.id
  814. var that = this
  815. this.$axios({
  816. method: 'delete',
  817. url: url,
  818. headers: {
  819. Authorization: 'Bearer ' +that.token
  820. }
  821. }).then(function (res) {
  822. if (res.data.code == 200) {
  823. that.$message({
  824. type: 'success',
  825. message: res.data.msg
  826. });
  827. that.GoodsList();
  828. }else{
  829. that.$message.error(res.data.msg);
  830. }
  831. }).catch(function (error) {
  832. that.$message.error("操作错误,联系信息部!");
  833. });
  834. }).catch(() => {
  835. this.$message({
  836. type: 'info',
  837. message: '已取消删除'
  838. });
  839. });
  840. },
  841. //计算总价
  842. Sumup(){
  843. console.log(123);
  844. this.warehousingsruleForm.totalPrice=this.warehousingsruleForm.quantity*this.warehousingsruleForm.unitPrice;
  845. },
  846. //新增物品api
  847. GoodsOP() {
  848. var url = "/api/PersonnelModule/GoodsOP"
  849. var that = this
  850. if (that.AdditemsName==""||that.AddMaterialinfoType==""||that.Additemstextarea=="") {
  851. that.$message.error("检查是否填写完全!");
  852. return
  853. }
  854. this.$axios({
  855. method: 'post',
  856. url: url,
  857. headers: {
  858. Authorization: 'Bearer ' +that.token
  859. },
  860. data: {
  861. currUserId:that.Userid,
  862. id:that.ID,
  863. name:that.AdditemsName,
  864. type:that.AddMaterialinfoType,
  865. remark:that.Additemstextarea,
  866. }
  867. }).then(function (res) {
  868. if (res.data.code == 200) {
  869. that.$message({
  870. message:res.data.msg ,
  871. type: 'success',
  872. offset:50
  873. });
  874. that.AddItemsVisible=false;
  875. that.GoodsList();
  876. }else{
  877. that.$message.error(res.data.msg);
  878. }
  879. }).catch(function (error) {
  880. that.$message.error("操作错误,联系信息部!");
  881. });
  882. },
  883. //入库数据初始化
  884. rkcsh(){
  885. this.warehousingsruleForm={
  886. id:0,
  887. quantity: 0,
  888. unitPrice: 0,
  889. totalPrice: 0,
  890. supplierName: '',
  891. supplierTel: '',
  892. supplierAddress: '',
  893. supplierSource: '',
  894. storageUserId:'',
  895. storageTime:'',
  896. remark: ''
  897. }
  898. },
  899. //入库列表
  900. instorage(row){
  901. this.rkcsh();
  902. this.ID=row.id;
  903. this.warehousingsVisible=true;
  904. var url = "/api/PersonnelModule/GoodsStorageList"
  905. var that = this
  906. this.$axios({
  907. method: 'POST',
  908. url: url,
  909. headers: {
  910. Authorization: 'Bearer '
  911. },
  912. data:{
  913. portType:1,
  914. pageIndex:that.WScurrentPage,
  915. pageSize:that.WSpagesize,
  916. goodsId:row.id,
  917. }
  918. }).then(function (res) {
  919. if (res.data.code == 200) {
  920. that.WScount=res.data.count;
  921. that.warehousingslist=res.data.data;
  922. }else{
  923. that.$message.error(res.data.msg);
  924. }
  925. }).catch(function (error) {
  926. that.$message.error("操作错误,联系信息部!");
  927. });
  928. },
  929. //入库api
  930. GoodsStorageOP(){
  931. var url = "/api/PersonnelModule/GoodsStorageOP"
  932. var that = this
  933. this.$axios({
  934. method: 'POST',
  935. url: url,
  936. headers: {
  937. Authorization: 'Bearer ' +that.token
  938. },
  939. data:{
  940. id:that.warehousingsruleForm.id,
  941. goodsId:that.ID,
  942. quantity:that.warehousingsruleForm.quantity,
  943. unitPrice:that.warehousingsruleForm.unitPrice,
  944. totalPrice:that.warehousingsruleForm.totalPrice,
  945. supplierName:that.warehousingsruleForm.supplierName,
  946. supplierTel:that.warehousingsruleForm.supplierTel,
  947. supplierAddress:that.warehousingsruleForm.supplierAddress,
  948. supplierSource:that.warehousingsruleForm.supplierSource,
  949. storageUserId:that.warehousingsruleForm.storageUserId,
  950. storageTime:that.datetime(that.warehousingsruleForm.storageTime),
  951. remark:that.warehousingsruleForm.remark,
  952. }
  953. }).then(function (res) {
  954. if (res.data.code == 200) {
  955. that.$message({
  956. message:res.data.msg ,
  957. type: 'success'
  958. });
  959. that.instorage({'id':that.ID});
  960. that.resetForm('warehousingsruleForm');
  961. }else{
  962. that.$message.error(res.data.msg);
  963. }
  964. }).catch(function (error) {
  965. that.$message.error("操作错误,联系信息部!");
  966. });
  967. },
  968. //编辑入库
  969. Editentry(val){
  970. var url = "/api/PersonnelModule/GoodsStorageInfo/"+val.id+"?portType=1"
  971. var that = this
  972. this.$axios({
  973. method: 'get',
  974. url: url,
  975. headers: {
  976. Authorization: 'Bearer '
  977. }
  978. }).then(function (res) {
  979. if (res.data.code == 200) {
  980. var datainfo=res.data.data;
  981. that.warehousingsruleForm.id=datainfo.id;
  982. that.warehousingsruleForm.quantity=datainfo.quantity;
  983. that.warehousingsruleForm.unitPrice=datainfo.unitPrice;
  984. that.warehousingsruleForm.totalPrice=datainfo.totalPrice;
  985. that.warehousingsruleForm.supplierName=datainfo.supplierName;
  986. that.warehousingsruleForm.supplierTel=datainfo.supplierTel;
  987. that.warehousingsruleForm.supplierAddress=datainfo.supplierAddress;
  988. that.warehousingsruleForm.supplierSource=datainfo.supplierSource;
  989. that.warehousingsruleForm.storageUserId=datainfo.storageUserId;
  990. that.warehousingsruleForm.storageTime=datainfo.storageTime;
  991. that.warehousingsruleForm.remark=datainfo.remark;
  992. }else{
  993. that.$message.error(res.data.msg);
  994. }
  995. }).catch(function (error) {
  996. that.$message.error("操作错误,联系信息部!");
  997. });
  998. },
  999. //删除入裤
  1000. Deleteintolibrary(row){
  1001. this.$confirm('此操作将永久删除, 是否继续?', '提示', {
  1002. confirmButtonText: '确定',
  1003. cancelButtonText: '取消',
  1004. type: 'warning'
  1005. }).then(() => {
  1006. var url = "/api/PersonnelModule/GoodsStorageDel/"+row.id
  1007. var that = this
  1008. this.$axios({
  1009. method: 'delete',
  1010. url: url,
  1011. headers: {
  1012. Authorization: 'Bearer ' +that.token
  1013. }
  1014. }).then(function (res) {
  1015. if (res.data.code == 200) {
  1016. that.$message({
  1017. type: 'success',
  1018. message: res.data.msg
  1019. });
  1020. that.instorage({'id':that.ID});
  1021. }else{
  1022. that.$message.error(res.data.msg);
  1023. }
  1024. }).catch(function (error) {
  1025. that.$message.error("操作错误,联系信息部!");
  1026. });
  1027. }).catch(() => {
  1028. this.$message({
  1029. type: 'info',
  1030. message: '已取消删除'
  1031. });
  1032. });
  1033. },
  1034. //入库
  1035. submitForm(formName) {
  1036. this.$refs[formName].validate((valid) => {
  1037. if (valid) {
  1038. this.GoodsStorageOP();
  1039. } else {
  1040. console.log(this.datetime(this.warehousingsruleForm.storageTime));
  1041. return false;
  1042. }
  1043. });
  1044. },
  1045. resetForm(formName) {
  1046. this.warehousingsruleForm.id=0;
  1047. this.$refs[formName].resetFields();
  1048. },
  1049. //领用
  1050. ClaimsubmitForm(formName) {
  1051. this.$refs[formName].validate((valid) => {
  1052. if (valid) {
  1053. this.GoodsReceiveOP();
  1054. } else {
  1055. console.log('error submit!!');
  1056. return false;
  1057. }
  1058. });
  1059. },
  1060. ClaimresetForm(formName) {
  1061. this.ClaimsruleForm.id=0;
  1062. this.$refs[formName].resetFields();
  1063. },
  1064. //领用审核列表
  1065. GoodsReceiveLists(){
  1066. this.ApprovalData=[];
  1067. this.ApprovalVisible=true
  1068. var url = "/api/PersonnelModule/GoodsReceiveList"
  1069. var that = this
  1070. this.$axios({
  1071. method: 'POST',
  1072. url: url,
  1073. headers: {
  1074. Authorization: 'Bearer ' +that.token
  1075. },
  1076. data:{
  1077. portType:1,
  1078. pageIndex:that.ApprovalcurrentPage,
  1079. pageSize:that.Approvalpagesize,
  1080. goodsId:0,
  1081. currUserId:0,
  1082. }
  1083. }).then(function (res) {
  1084. if (res.data.code == 200) {
  1085. that.ApprovalData=res.data.data;
  1086. that.Approvalcount=res.data.count;
  1087. }else{
  1088. that.$message.error(res.data.msg);
  1089. }
  1090. }).catch(function (error) {
  1091. that.$message.error("操作错误,联系信息部!");
  1092. });
  1093. },
  1094. //领用列表
  1095. GoodsReceiveList(row){
  1096. this.bjcsh();
  1097. this.ClaimitemData=[];
  1098. this.ID=row.id;
  1099. this.ClaimitemVisible=true;
  1100. var url = "/api/PersonnelModule/GoodsReceiveList"
  1101. var that = this
  1102. this.$axios({
  1103. method: 'POST',
  1104. url: url,
  1105. headers: {
  1106. Authorization: 'Bearer ' +that.token
  1107. },
  1108. data:{
  1109. portType:1,
  1110. pageIndex:that.ClaimitemcurrentPage,
  1111. pageSize:that.Claimitempagesize,
  1112. goodsId:row.id,
  1113. currUserId:that.Userid,
  1114. }
  1115. }).then(function (res) {
  1116. if (res.data.code == 200) {
  1117. that.ClaimitemData=res.data.data;
  1118. that.Claimitemcount=res.data.count;
  1119. }else{
  1120. that.$message.error(res.data.msg);
  1121. }
  1122. }).catch(function (error) {
  1123. that.$message.error("操作错误,联系信息部!");
  1124. });
  1125. },
  1126. //领用api
  1127. GoodsReceiveOP(){
  1128. var url = "/api/PersonnelModule/GoodsReceiveOP"
  1129. var that = this
  1130. this.$axios({
  1131. method: 'POST',
  1132. url: url,
  1133. headers: {
  1134. Authorization: 'Bearer ' +that.token
  1135. },
  1136. data:{
  1137. id:that.ClaimsruleForm.id,
  1138. groupId:that.ClaimsruleForm.groupId,
  1139. goodsId:that.ID,
  1140. quantity:that.ClaimsruleForm.quantity,
  1141. reason:that.ClaimsruleForm.reason,
  1142. remark:that.ClaimsruleForm.remark,
  1143. }
  1144. }).then(function (res) {
  1145. if (res.data.code == 200) {
  1146. that.$message({
  1147. type: 'success',
  1148. message: res.data.msg
  1149. });
  1150. that.ClaimresetForm("ClaimsruleForm");
  1151. that.GoodsReceiveList({'id':that.ID});
  1152. }else{
  1153. that.$message.error(res.data.msg);
  1154. }
  1155. }).catch(function (error) {
  1156. that.$message.error("操作错误,联系信息部!");
  1157. });
  1158. },
  1159. //编辑初始化
  1160. bjcsh(){
  1161. this.ClaimsruleForm={
  1162. id:0,
  1163. groupId:'',
  1164. quantity:0,
  1165. reason:'',
  1166. remark:'',
  1167. }
  1168. },
  1169. //编辑领用
  1170. Editentryreceive(val){
  1171. var url = "/api/PersonnelModule/GoodsReceiveInfo/"+val.id+"?portType=1"
  1172. var that = this
  1173. this.$axios({
  1174. method: 'get',
  1175. url: url,
  1176. headers: {
  1177. Authorization: 'Bearer ' +that.token
  1178. }
  1179. }).then(function (res) {
  1180. if (res.data.code == 200) {
  1181. var datainfo=res.data.data;
  1182. that.ClaimsruleForm.id=datainfo.id;
  1183. that.ClaimsruleForm.groupId=datainfo.groupId;
  1184. that.ClaimsruleForm.quantity=datainfo.quantity;
  1185. that.ClaimsruleForm.reason=datainfo.reason;
  1186. that.ClaimsruleForm.remark=datainfo.remark;
  1187. }else{
  1188. that.$message.error(res.data.msg);
  1189. }
  1190. }).catch(function (error) {
  1191. that.$message.error("操作错误,联系信息部!");
  1192. });
  1193. },
  1194. //审核列表删除
  1195. Deleteintolibraryreceives(row){
  1196. this.$confirm('此操作将永久删除, 是否继续?', '提示', {
  1197. confirmButtonText: '确定',
  1198. cancelButtonText: '取消',
  1199. type: 'warning'
  1200. }).then(() => {
  1201. var url = "/api/PersonnelModule/GoodsReceiveDel/"+row.id
  1202. var that = this
  1203. this.$axios({
  1204. method: 'delete',
  1205. url: url,
  1206. headers: {
  1207. Authorization: 'Bearer ' +that.token
  1208. }
  1209. }).then(function (res) {
  1210. if (res.data.code == 200) {
  1211. that.$message({
  1212. type: 'success',
  1213. message: res.data.msg
  1214. });
  1215. that.GoodsReceiveLists();
  1216. }else{
  1217. that.$message.error(res.data.msg);
  1218. }
  1219. }).catch(function (error) {
  1220. that.$message.error("操作错误,联系信息部!");
  1221. });
  1222. }).catch(() => {
  1223. this.$message({
  1224. type: 'info',
  1225. message: '已取消删除'
  1226. });
  1227. });
  1228. },
  1229. //删除领用
  1230. Deleteintolibraryreceive(row){
  1231. this.$confirm('此操作将永久删除, 是否继续?', '提示', {
  1232. confirmButtonText: '确定',
  1233. cancelButtonText: '取消',
  1234. type: 'warning'
  1235. }).then(() => {
  1236. var url = "/api/PersonnelModule/GoodsReceiveDel/"+row.id
  1237. var that = this
  1238. this.$axios({
  1239. method: 'delete',
  1240. url: url,
  1241. headers: {
  1242. Authorization: 'Bearer ' +that.token
  1243. }
  1244. }).then(function (res) {
  1245. if (res.data.code == 200) {
  1246. that.$message({
  1247. type: 'success',
  1248. message: res.data.msg
  1249. });
  1250. that.GoodsReceiveList({'id':that.ID});
  1251. }else{
  1252. that.$message.error(res.data.msg);
  1253. }
  1254. }).catch(function (error) {
  1255. that.$message.error("操作错误,联系信息部!");
  1256. });
  1257. }).catch(() => {
  1258. this.$message({
  1259. type: 'info',
  1260. message: '已取消删除'
  1261. });
  1262. });
  1263. },
  1264. //审核领用
  1265. GoodsReceiveAudit(row,val){
  1266. var url = "/api/PersonnelModule/GoodsReceiveAudit"
  1267. var that = this
  1268. this.$axios({
  1269. method: 'post',
  1270. url: url,
  1271. headers: {
  1272. Authorization: 'Bearer ' +that.token
  1273. },
  1274. data:{
  1275. label:row+'',
  1276. auditEnum:val,
  1277. }
  1278. }).then(function (res) {
  1279. if (res.data.code == 200) {
  1280. that.$message({
  1281. type: 'success',
  1282. message: res.data.msg
  1283. });
  1284. that.GoodsReceiveLists();
  1285. }else{
  1286. that.$message.error(res.data.msg);
  1287. }
  1288. }).catch(function (error) {
  1289. that.$message.error("操作错误,联系信息部!");
  1290. });
  1291. },
  1292. },
  1293. mounted(){
  1294. //权限
  1295. let authData=JSON.parse(localStorage.getItem('userinif')).authData;
  1296. let Permissions=[];
  1297. for(let k=0;k<authData.length;k++){
  1298. for(let m=0;m<authData[k].pageList.length;m++){
  1299. if (authData[k].pageList[m].webUrl=='/SuppliesInventory') {
  1300. Permissions=authData[k].pageList[m].pageAuth;
  1301. }
  1302. }
  1303. }
  1304. for (let r = 0; r < Permissions.length; r++) {
  1305. if (Permissions[r].funid==12) {
  1306. this.evocationdownloadqx=true;
  1307. }
  1308. }
  1309. this.Userid=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
  1310. this.token=JSON.parse(localStorage.getItem('userinif')).token;
  1311. this.GoodsInitDataSource();
  1312. }
  1313. }
  1314. </script>
  1315. <style>
  1316. .SuppliesInventory-all {
  1317. background-color: #fff;
  1318. padding: 10px;
  1319. box-shadow: 0 0 5px #0005;
  1320. border-radius: 10px;
  1321. min-height: 830px;
  1322. min-width: 900px;
  1323. }
  1324. .SuppliesInventory-head{
  1325. display: flex;
  1326. justify-content: space-between;
  1327. }
  1328. .SuppliesInventory-head-li{
  1329. margin-right: 15px;
  1330. }
  1331. .SuppliesInventory-head-li label{
  1332. font-size: 14px;
  1333. color: #555;
  1334. }
  1335. .SuppliesInventory-table{
  1336. margin-top: 15px;
  1337. }
  1338. .SuppliesInventory-head-ul{
  1339. display: flex;
  1340. }
  1341. .additems-li{
  1342. margin-bottom: 10px;
  1343. }
  1344. .additems-btn{
  1345. text-align: right;
  1346. margin-top: 20px;
  1347. }
  1348. .warehousingsrule-input{
  1349. display: flex;
  1350. flex-wrap: wrap;
  1351. justify-content: space-between;
  1352. }
  1353. .warehousingsrule-input .el-form-item{
  1354. width: 33%;
  1355. }
  1356. .warehousingsrule-input .el-input-number{
  1357. width: 100%;
  1358. }
  1359. .warehousingsrule-input .el-form-item{
  1360. margin-bottom: 10px;
  1361. }
  1362. .warehousingsrule-input .el-form-item__error{
  1363. top: 82%;
  1364. }
  1365. .warehousingsrule-input .el-select{
  1366. width: 100%;
  1367. }
  1368. .warehousingsrule-table .el-table th.el-table__cell>.cell{
  1369. text-align: center;
  1370. font-size: 12px;
  1371. }
  1372. .warehousingsrule-table .el-table td.el-table__cell div{
  1373. font-size: 12px;
  1374. }
  1375. .SuppliesInventory-table .block{
  1376. text-align: center;
  1377. margin-top: 10px;
  1378. }
  1379. .warehousingsrule-table .block{
  1380. text-align: center;
  1381. margin-top: 10px;
  1382. }
  1383. .additems-li label{
  1384. display: inline-block;
  1385. width: 105px;
  1386. }
  1387. .Claimitem-input{
  1388. display: flex;
  1389. flex-wrap: wrap;
  1390. justify-content: space-between;
  1391. }
  1392. .Claimitem-input .el-form-item{
  1393. width: 33%;
  1394. }
  1395. .Claimitem-input .el-input-number{
  1396. width: 100%;
  1397. }
  1398. .Claimitem-input .el-form-item{
  1399. margin-bottom: 10px;
  1400. }
  1401. .Claimitem-input .el-form-item__error{
  1402. top: 82%;
  1403. }
  1404. .claimitem-table .el-table th.el-table__cell>.cell{
  1405. text-align: center;
  1406. font-size: 12px;
  1407. }
  1408. .claimitem-table .el-table td.el-table__cell div{
  1409. font-size: 12px;
  1410. }
  1411. .claimitem-table .block{
  1412. text-align: center;
  1413. margin-top: 10px;
  1414. }
  1415. .Approval-table .el-table th.el-table__cell>.cell{
  1416. text-align: center;
  1417. font-size: 12px;
  1418. }
  1419. .Approval-table .el-table td.el-table__cell div{
  1420. font-size: 12px;
  1421. }
  1422. .Approval-table .block{
  1423. text-align: center;
  1424. margin-top: 10px;
  1425. }
  1426. </style>