index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. <template>
  2. <div class="app-container">
  3. <div class="hezi">
  4. <div class="tji">库房统计</div>
  5. <div style="display: flex; flex-wrap: wrap; padding: 11px 20px">
  6. <div
  7. style="width: 25%; display: flex; align-items: center; height: 100px"
  8. v-for="item in tongJiList"
  9. :key="item.name"
  10. >
  11. <div
  12. class="div-l"
  13. style="flex: 1.5; text-align: left; margin-left:20px; margin-right: 30px"
  14. >
  15. <span>{{ item.name }}:</span>
  16. </div>
  17. <div class="div-r" style="flex: 2; text-align: left; margin-right: 120px">
  18. <span>
  19. <span style="font-size: 25px; margin-right: 18px">{{ item.num }}</span>
  20. </span>
  21. </div>
  22. </div>
  23. </div>
  24. </div>
  25. <div>
  26. <ul>
  27. <li v-for="(item, i) in lieList" :key="i + ' '">
  28. <div class="names">{{ item.dictLabel }}</div>
  29. <div class="btn">
  30. <el-button size="btJS" @click="chuku(item.dictValue)">出库</el-button>
  31. <el-button size="btJS" @click="ruku(item.dictLabel)">入库</el-button>
  32. </div>
  33. </li>
  34. </ul>
  35. </div>
  36. <!-- 添加或修改物资入库登记对话框 -->
  37. <el-dialog
  38. :title="title"
  39. :visible.sync="open"
  40. width="1300px"
  41. append-to-body
  42. :close-on-click-modal="false"
  43. >
  44. <el-table
  45. :data="materialRegistrationList"
  46. :header-cell-style="{ background: '#003C69', color: 'white', }"
  47. v-if="jilunum==1"
  48. >
  49. <el-table-column type="selection" width="55" align="center" />
  50. <el-table-column label="序号" type="index" width="50" align="center">
  51. <template scope="scope">
  52. <span>
  53. {{
  54. (queryParams.pageNum - 1) * queryParams.pageSize +
  55. scope.$index +
  56. 1
  57. }}
  58. </span>
  59. </template>
  60. </el-table-column>
  61. <!-- <el-table-column label="物品类型" align="center" prop="wuPinType">
  62. <template slot-scope="scope">
  63. <dict-tag
  64. :options="dict.type.category"
  65. :value="scope.row.wuPinType"
  66. />
  67. </template>
  68. </el-table-column>-->
  69. <el-table-column label="物品名称" align="center" prop="name" />
  70. <el-table-column label="条形码编号" align="center" prop="barcode" />
  71. <el-table-column label="物品规格" align="center" prop="materialSpecification" />
  72. <el-table-column label="物品型号" align="center" prop="materialXh" />
  73. <!-- <el-table-column label="营具类型" align="center" prop="yingJuType">
  74. <template slot-scope="scope">
  75. <dict-tag
  76. :options="dict.type.camp_equipment"
  77. :value="scope.row.yingJuType"
  78. />
  79. </template>
  80. </el-table-column>-->
  81. <!-- <el-table-column
  82. label="责任单位"
  83. align="center"
  84. prop="responsibilityUnit"
  85. />-->
  86. <el-table-column label="库房" align="center" prop="warehouse" />
  87. <el-table-column label="价值" align="center" prop="price" />
  88. <el-table-column label="入库数量" align="center" prop="putInt" />
  89. <!-- <el-table-column label="创建人" align="center" prop="createName" /> -->
  90. <el-table-column label="入库时间" align="center" prop="storageTime" width="180">
  91. <template slot-scope="scope">
  92. <span>{{ parseTime(scope.row.storageTime, "{y}-{m}-{d}") }}</span>
  93. </template>
  94. </el-table-column>
  95. <!-- <el-table-column label="入库编号" align="center" prop="inboundNo" /> -->
  96. <!-- <el-table-column label="存放位置" align="center" prop="storageLocation" /> -->
  97. <el-table-column label="购买时间" align="center" prop="buyingTime" width="180">
  98. <template slot-scope="scope">
  99. <span>{{ parseTime(scope.row.buyingTime, "{y}-{m}-{d}") }}</span>
  100. </template>
  101. </el-table-column>
  102. <!-- <el-table-column label="备注" align="center" prop="remark" /> -->
  103. <!-- <el-table-column label="库房" align="center" prop="warehouse">
  104. <template slot-scope="scope">
  105. <dict-tag
  106. :options="dict.type.storage_room"
  107. :value="scope.row.warehouse"
  108. />
  109. </template>
  110. </el-table-column>-->
  111. <!-- <el-table-column label="档案id" align="center" prop="archivesId" /> -->
  112. <!-- <el-table-column
  113. label="操作"
  114. align="center"
  115. class-name="small-padding fixed-width"
  116. width="150px"
  117. >
  118. <template slot-scope="scope">
  119. <el-button
  120. size="btu"
  121. type="text"
  122. @click="handleUpdate(scope.row)"
  123. v-hasPermi="['materialManagement:materialRegistration:edit']"
  124. >修改</el-button
  125. >
  126. <el-button
  127. size="btd"
  128. type="text"
  129. @click="handleDelete(scope.row)"
  130. v-hasPermi="['materialManagement:materialRegistration:remove']"
  131. >删除</el-button
  132. >
  133. </template>
  134. </el-table-column>-->
  135. </el-table>
  136. <el-table
  137. :data="distributionList"
  138. v-if="jilunum==2"
  139. :header-cell-style="{ background: '#003C69', color: 'white' }"
  140. >
  141. <el-table-column type="selection" width="55" align="center" />
  142. <el-table-column label="序号" align="center">
  143. <template scope="scope">
  144. <span>
  145. {{
  146. (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
  147. }}
  148. </span>
  149. </template>
  150. </el-table-column>
  151. <!-- <el-table-column label="物品类别" align="center" prop="wuPinType">
  152. <template slot-scope="scope">
  153. <dict-tag
  154. :options="dict.type.category"
  155. :value="scope.row.wuPinType"
  156. />
  157. </template>
  158. </el-table-column>-->
  159. <el-table-column label="物品名称" align="center" prop="name" />
  160. <el-table-column label="条形码编号" align="center" prop="barcode" />
  161. <el-table-column label="物品规格" align="center" prop="materialSpecification" />
  162. <el-table-column label="物品型号" align="center" prop="materialXh" />
  163. <el-table-column label="营具类型" align="center" prop="yingJuType">
  164. <!-- <template slot-scope="scope">
  165. <dict-tag :options="dict.type.camp_equipment" :value="scope.row.yingJuType" />
  166. </template>-->
  167. </el-table-column>
  168. <!-- <el-table-column
  169. label="责任单位"
  170. align="center"
  171. prop="responsibilityUnit"
  172. />-->
  173. <el-table-column label="出库数量" align="center" prop="putOut" />
  174. <el-table-column label="价值" align="center" prop="price" />
  175. <el-table-column label="发放时间" align="center" prop="putOutTime" width="120">
  176. <template slot-scope="scope">
  177. <span>{{ parseTime(scope.row.putOutTime, "{y}-{m}-{d}") }}</span>
  178. </template>
  179. </el-table-column>
  180. <el-table-column label="发放单位" align="center" prop="responsibilityUnit" width="150px" />
  181. <el-table-column label="发放对象" align="center" prop="outPeople"></el-table-column>
  182. <el-table-column label="接收单位" align="center" prop="outUnit" width="150px" />
  183. <el-table-column label="接收人" align="center" prop="recipient" />
  184. <el-table-column label="存放位置" align="center" prop="storageLocation" />
  185. <!-- <el-table-column label="备注" align="center" prop="remark" /> -->
  186. <el-table-column label="库房" align="center" prop="warehouse">
  187. <template slot-scope="scope">
  188. <dict-tag :options="dict.type.storage_room" :value="scope.row.warehouse" />
  189. </template>
  190. </el-table-column>
  191. <el-table-column label="库存数量" align="center" prop="total" />
  192. <!-- <el-table-column
  193. label="操作"
  194. align="center"
  195. class-name="small-padding fixed-width"
  196. width="120"
  197. >
  198. <template slot-scope="scope">
  199. <el-button
  200. size="btu"
  201. type="text"
  202. @click="handleUpdate(scope.row)"
  203. v-hasPermi="['materialManagement:distribution:edit']"
  204. >修改</el-button>
  205. <el-button
  206. size="btd"
  207. type="text"
  208. @click="handleDelete(scope.row)"
  209. v-hasPermi="['materialManagement:distribution:remove']"
  210. >删除</el-button>
  211. </template>
  212. </el-table-column>-->
  213. </el-table>
  214. <pagination
  215. v-show="total > 0"
  216. v-if="distributionList.length>=1"
  217. :total="total"
  218. :page.sync="queryParams.pageNum"
  219. :limit.sync="queryParams.pageSize"
  220. @pagination="getchulist"
  221. />
  222. <pagination
  223. v-show="total > 0"
  224. v-if="materialRegistrationList.length>=1"
  225. :total="total"
  226. :page.sync="queryParams.pageNum"
  227. :limit.sync="queryParams.pageSize"
  228. @pagination="getrulist"
  229. />
  230. <div slot="footer" class="dialog-footer">
  231. <!-- <el-button type="primary" @click="submitForm">确 定</el-button> -->
  232. <el-button @click="cancel" size="btn">取 消</el-button>
  233. </div>
  234. </el-dialog>
  235. </div>
  236. </template>
  237. <script>
  238. import { listArchives } from "@/api/materialManagement/WarehouseStatistics";
  239. import { listMaterialRegistration } from "@/api/materialManagement/materialRegistration";
  240. import { listDistribution } from "@/api/materialManagement/distribution";
  241. export default {
  242. dicts: ["category", "camp_equipment", "storage_room", "distribution_object"],
  243. data() {
  244. return {
  245. lieList: [
  246. { deptName: "fdb" },
  247. { deptName: "fdb" },
  248. { deptName: "fdb" },
  249. { deptName: "fdb" },
  250. { deptName: "fdb" }
  251. ],
  252. tongJiList: [],
  253. open: false,
  254. title: "",
  255. // 总条数
  256. total: 0,
  257. queryParams: {
  258. pageNum: 1,
  259. pageSize: 10,
  260. wuPinType: null,
  261. name: null,
  262. materialSpecification: null,
  263. materialXh: null,
  264. yingJuType: null,
  265. responsibilityUnit: null,
  266. personLiable: null,
  267. putInt: null,
  268. createName: null,
  269. storageTime: null,
  270. inboundNo: null,
  271. storageLocation: null,
  272. buyingTime: null,
  273. price: null,
  274. warehouse: null,
  275. archivesId: null
  276. },
  277. materialRegistrationList: [],
  278. distributionList: [],
  279. jilunum: 0
  280. };
  281. },
  282. created() {
  283. listArchives().then(res => {
  284. this.lieList = res.data.date;
  285. this.tongJiList = [{ name: "总库房数", num: res.data.number }];
  286. console.log(res.data, 111);
  287. });
  288. },
  289. methods: {
  290. ruku(e) {
  291. this.queryParams.warehouse = e;
  292. this.getrulist();
  293. this.open = true;
  294. this.title = "入库记录";
  295. this.jilunum = 1;
  296. this.queryParams.pageNum = 1;
  297. this.queryParams.pageSize = 10;
  298. },
  299. getrulist() {
  300. this.distributionList = [];
  301. listMaterialRegistration(this.queryParams).then(response => {
  302. this.materialRegistrationList = response.rows;
  303. this.total = response.total;
  304. this.loading = false;
  305. });
  306. },
  307. chuku(e) {
  308. this.queryParams.warehouse = e;
  309. this.getchulist();
  310. this.jilunum = 2;
  311. this.title = "出库记录";
  312. this.open = true;
  313. this.queryParams.pageNum = 1;
  314. this.queryParams.pageSize = 10;
  315. },
  316. getchulist() {
  317. this.materialRegistrationList = [];
  318. listDistribution(this.queryParams).then(response => {
  319. this.distributionList = response.rows;
  320. this.total = response.total;
  321. this.loading = false;
  322. this.jilunum = 2;
  323. this.title = "出库记录";
  324. this.open = true;
  325. });
  326. },
  327. // 取消按钮
  328. cancel() {
  329. this.open = false;
  330. }
  331. }
  332. };
  333. </script>
  334. <style scoped>
  335. .names {
  336. color: #fff;
  337. font-size: 14px;
  338. text-align: center;
  339. padding: 26px 26px 38px 26px;
  340. letter-spacing: 1px;
  341. }
  342. .btn {
  343. text-align: center;
  344. }
  345. ul {
  346. /* justify-content: space-between; */
  347. padding: 0 22px;
  348. display: flex;
  349. flex-wrap: wrap;
  350. }
  351. .span {
  352. display: flex;
  353. flex-wrap: wrap;
  354. }
  355. li {
  356. list-style: none;
  357. background: url("../../../assets/images/book.png") no-repeat;
  358. height: 140px;
  359. width: 222px;
  360. /* margin: 20px 0; */
  361. margin-bottom: 20px;
  362. background-size: 100% 100%;
  363. flex: 0 0 16%;
  364. margin-right: 10px;
  365. }
  366. .hezi {
  367. margin-bottom: 13px;
  368. margin-top: 15px;
  369. position: relative;
  370. background: rgb(0, 60, 105);
  371. color: #fff;
  372. font-size: 18px;
  373. font-weight: 600;
  374. }
  375. .tji {
  376. width: 176px;
  377. height: 36px;
  378. text-align: center;
  379. line-height: 36px;
  380. position: absolute;
  381. top: -18px;
  382. right: 87px;
  383. color: #fff;
  384. font-size: 18px;
  385. font-weight: 600;
  386. background: #004d86;
  387. }
  388. /* 对话框背景颜色 */
  389. ::v-deep .el-dialog {
  390. background: #004d86 !important;
  391. }
  392. ::v-deep .el-textarea__inner {
  393. width: 965px;
  394. height: 104px;
  395. }
  396. ::v-deep .el-dialog__header {
  397. border-bottom: 1px solid #718a9d;
  398. }
  399. ::v-deep .el-dialog__title {
  400. color: #fff;
  401. font: 18px;
  402. }
  403. ::v-deep .el-dialog__headerbtn .el-dialog__close {
  404. color: #fff;
  405. }
  406. ::v-deep .el-dialog__body {
  407. overflow: auto;
  408. }
  409. ::v-deep .pagination-container {
  410. margin-top: 20px;
  411. height: 50px;
  412. }
  413. </style>