SuppliesInventory.vue 97 KB

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