Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

drguStockQuery.vue 9.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. </div>
  6. <div class="app-container ">
  7. <div class="cell clearfix">
  8. <el-input
  9. size="small"
  10. style="width: 400px;"
  11. class="filter-item"
  12. v-model.trim="keywords"
  13. placeholder="商品编码/商品名称/规格名称"
  14. />
  15. <el-button
  16. size="small"
  17. class="filter-item"
  18. type="primary"
  19. icon="el-icon-search"
  20. @click="search"
  21. >搜索</el-button
  22. >
  23. </div>
  24. <el-table
  25. :row-style="{ color: '#303133' }"
  26. :header-cell-style="{
  27. backgroundColor: 'rgb(245, 247, 250)',
  28. color: '#606266'
  29. }"
  30. :data="WarehouseInfo.warehouseInfoDate"
  31. :class="signAndWeighBoxPatients"
  32. border
  33. v-loading="WarehouseInfo.loading"
  34. >
  35. <el-table-column label="商品编码" align="center">
  36. <template slot-scope="scope">
  37. {{ scope.row.good_code }}
  38. </template>
  39. </el-table-column>
  40. <el-table-column label="商品类型" align="center">
  41. <template slot-scope="scope">
  42. <span>{{ scope.row.type.type_name }}</span>
  43. </template>
  44. </el-table-column>
  45. <el-table-column label="规格名称" align="center">
  46. <template slot-scope="scope">
  47. <span>{{ scope.row.specification_name }}</span>
  48. </template>
  49. </el-table-column>
  50. <el-table-column label="入库数量" align="center">
  51. <template slot-scope="scope">
  52. <span
  53. @click="showStockInDetailDialog(scope.row.good_id)"
  54. >{{ stockInCount(scope.row) }}</span
  55. >
  56. </template>
  57. </el-table-column>
  58. <el-table-column label="入库退货" align="center">
  59. <template slot-scope="scope">
  60. <span
  61. @click="showSaleReturnDetailDialog(scope.row)"
  62. >{{ salesReturnCount(scope.row) }}</span
  63. >
  64. </template>
  65. </el-table-column>
  66. <el-table-column label="实际入库" align="center">
  67. <template slot-scope="scope">
  68. {{ stockInCount(scope.row) - salesReturnCount(scope.row) }}
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="出库数量" align="center">
  72. <template slot-scope="scope">
  73. <span
  74. @click="showStockOutDetailDialog(scope.row.good_id)"
  75. >{{ stockOutCount(scope.row) }}</span
  76. >
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="出库退库" align="center">
  80. <template slot-scope="scope">
  81. <span
  82. @click="showCancelStockDetailDialog(scope.row)"
  83. >{{ cancelStockCount(scope.row) }}</span
  84. >
  85. </template>
  86. </el-table-column>
  87. <el-table-column label="实际出库" align="center">
  88. <template slot-scope="scope">
  89. {{ stockOutCount(scope.row) - cancelStockCount(scope.row) }}
  90. </template>
  91. </el-table-column>
  92. <el-table-column label="剩余库存" align="center">
  93. <template slot-scope="scope">
  94. <span>{{
  95. stockInCount(scope.row) -
  96. salesReturnCount(scope.row) -
  97. stockOutCount(scope.row) +
  98. cancelStockCount(scope.row)
  99. }}</span>
  100. </template>
  101. </el-table-column>
  102. </el-table>
  103. <el-pagination
  104. @size-change="handleSizeChange"
  105. @current-change="handleCurrentChange"
  106. :page-sizes="[10, 50, 100]"
  107. :page-size="10"
  108. background
  109. align="right"
  110. style="margin-top:20px;"
  111. layout="total, sizes, prev, pager, next, jumper"
  112. :total="total"
  113. >
  114. </el-pagination>
  115. </div>
  116. </div>
  117. </template>
  118. <script>
  119. import { uParseTime } from "@/utils/tools";
  120. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  121. import {
  122. GetAllGoodInfo,
  123. GetAllGoodType,
  124. getAllStockQueryList
  125. } from "@/api/stock";
  126. export default {
  127. name: "stockIn",
  128. created() {
  129. this.GetAllStockQuery();
  130. this.GetAllGoodInfo();
  131. this.GetAllGoodType();
  132. },
  133. components: {
  134. BreadCrumb
  135. },
  136. data() {
  137. return {
  138. crumbs: [
  139. { path: false, name: "库存管理" },
  140. { path: "/stock/query", name: "库存查询" }
  141. ],
  142. keywords: "",
  143. total: 0,
  144. multipleSelection: [],
  145. signAndWeighBoxPatients: "sign-and-weigh-box-patients",
  146. start_time: "",
  147. end_time: "",
  148. page: 1,
  149. limit: 10,
  150. goodType: [],
  151. goodInfo: [],
  152. WarehouseInfo: {
  153. loading: false,
  154. warehouseInfoDate: []
  155. }
  156. };
  157. },
  158. methods: {
  159. GetAllStockQuery: function() {
  160. console.log(this.keywords);
  161. const Params = {
  162. page: this.page,
  163. limit: this.limit,
  164. keyword: this.keywords
  165. };
  166. this.WarehouseInfo.loading = true;
  167. this.WarehouseInfo.warehouseInfoDate = [];
  168. getAllStockQueryList(Params).then(response => {
  169. if (response.data.state == 0) {
  170. this.WarehouseInfo.loading = false;
  171. this.$message.error(response.data.msg);
  172. return false;
  173. } else {
  174. this.WarehouseInfo.loading = false;
  175. this.total = response.data.data.total;
  176. for (let i = 0; i < response.data.data.list.length; i++) {
  177. this.WarehouseInfo.warehouseInfoDate.push(
  178. response.data.data.list[i]
  179. );
  180. }
  181. }
  182. });
  183. },
  184. getSpecificationName: function(id) {
  185. let name = "";
  186. for (let i = 0; i < this.goodInfo.length; i++) {
  187. if (this.goodInfo[i].id == id) {
  188. name = this.goodInfo[i].specification_name;
  189. }
  190. }
  191. return name;
  192. },
  193. getTypeName: function(id) {
  194. let name = "";
  195. for (let i = 0; i < this.goodType.length; i++) {
  196. if (this.goodType[i].id == id) {
  197. name = this.goodType[i].type_name;
  198. }
  199. }
  200. return name;
  201. },
  202. GetAllGoodType: function() {
  203. GetAllGoodType().then(response => {
  204. if (response.data.state == 0) {
  205. this.$message.error(response.data.msg);
  206. return false;
  207. } else {
  208. for (let i = 0; i < response.data.data.goodType.length; i++) {
  209. this.goodType.push(response.data.data.goodType[i]);
  210. }
  211. }
  212. });
  213. },
  214. GetAllGoodInfo: function() {
  215. GetAllGoodInfo().then(response => {
  216. if (response.data.state == 0) {
  217. this.$message.error(response.data.msg);
  218. return false;
  219. } else {
  220. for (let i = 0; i < response.data.data.goodInfo.length; i++) {
  221. this.goodInfo.push(response.data.data.goodInfo[i]);
  222. }
  223. }
  224. });
  225. },
  226. handleBack: function() {
  227. this.$router.go(-1);
  228. },
  229. handleSizeChange(val) {
  230. this.limit = val;
  231. this.GetAllStockQuery();
  232. },
  233. handleCurrentChange(val) {
  234. this.page = val;
  235. this.GetAllStockQuery();
  236. },
  237. calculate: function(val) {
  238. return Math.round(parseFloat(val) * 100) / 100;
  239. },
  240. startTimeChange: function() {
  241. this.GetAllStockQuery();
  242. },
  243. endTimeChange: function() {
  244. this.GetAllStockQuery();
  245. },
  246. stockInCount: function(row) {
  247. let total = 0;
  248. for (let i = 0; i < row.query_warehousing_info.length; i++) {
  249. total = total + row.query_warehousing_info[i].warehousing_count;
  250. }
  251. return total;
  252. },
  253. salesReturnCount: function(row) {
  254. let total = 0;
  255. for (let i = 0; i < row.query_sales_return_info.length; i++) {
  256. total = total + row.query_sales_return_info[i].count;
  257. }
  258. return total;
  259. },
  260. stockOutCount: function(row) {
  261. let total = 0;
  262. for (let i = 0; i < row.query_warehouseout_info.length; i++) {
  263. total = total + row.query_warehouseout_info[i].count;
  264. }
  265. return total;
  266. },
  267. cancelStockCount: function(row) {
  268. let total = 0;
  269. for (let i = 0; i < row.query_cancel_stock_info.length; i++) {
  270. total = total + row.query_cancel_stock_info[i].count;
  271. }
  272. return total;
  273. },
  274. showStockInDetailDialog: function(val) {},
  275. showSaleReturnDetailDialog: function() {},
  276. showStockOutDetailDialog: function() {},
  277. showCancelStockDetailDialog: function() {},
  278. search: function() {
  279. this.GetAllStockQuery();
  280. }
  281. }
  282. };
  283. </script>
  284. <style rel="stylesheet/css" lang="scss" scoped>
  285. .information {
  286. border: 1px #dcdfe6 solid;
  287. padding: 30px 20px 30px 20px;
  288. .border {
  289. border-bottom: 1px #dcdfe6 solid;
  290. margin: 0px 0 20px 0;
  291. }
  292. }
  293. .title {
  294. background: #409eff;
  295. height: 44px;
  296. line-height: 44px;
  297. padding: 0 0 0 10px;
  298. color: #fff;
  299. margin: 0 0 10px 0;
  300. }
  301. .edit_separater {
  302. border-top: 1px solid rgb(233, 233, 233);
  303. margin-top: 15px;
  304. margin-bottom: 15px;
  305. }
  306. </style>
  307. <style>
  308. .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
  309. font-size: 12px;
  310. }
  311. .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
  312. background: #6fb5fa;
  313. }
  314. .count {
  315. color: #bd2c00;
  316. }
  317. .el-table td,
  318. .el-table th.is-leaf,
  319. .el-table--border,
  320. .el-table--group {
  321. border-color: #d0d3da;
  322. }
  323. .el-table--border::after,
  324. .el-table--group::after,
  325. .el-table::before {
  326. background-color: #d0d3da;
  327. }
  328. </style>