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

stockBatchNumber.vue 9.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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. 耗材名称:{{this.$route.query.good_name}} &nbsp;
  9. 库存:{{getInCount(this.$route.query.id)}} &nbsp;
  10. 规格:{{this.$route.query.specification_name}} &nbsp;
  11. 厂家:{{this.$route.query.manufacturer}}
  12. </div>
  13. <div class="cell clearfix">
  14. <span>日期查询:</span>
  15. <el-date-picker
  16. size="small"
  17. v-model="start_time"
  18. prefix-icon="el-icon-date"
  19. :editable="false"
  20. style="width: 196px;"
  21. type="date"
  22. placeholder="选择日期时间"
  23. align="right"
  24. format="yyyy-MM-dd"
  25. value-format="yyyy-MM-dd"
  26. @change="startTimeChange"
  27. ></el-date-picker>-
  28. <el-date-picker
  29. size="small"
  30. v-model="end_time"
  31. prefix-icon="el-icon-date"
  32. :editable="false"
  33. style="width: 196px;margin-right:10px;"
  34. type="date"
  35. placeholder="选择日期时间"
  36. align="right"
  37. format="yyyy-MM-dd"
  38. value-format="yyyy-MM-dd"
  39. @change="endTimeChange"
  40. ></el-date-picker>
  41. <!-- <span>出入库方式:</span>
  42. <el-select v-model="stock_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
  43. <el-option
  44. v-for="(item,index) in stockType"
  45. :key="index"
  46. :label="item.name"
  47. :value="item.id">
  48. </el-option>
  49. </el-select> -->
  50. </div>
  51. <el-table
  52. :data="tableList"
  53. border
  54. style="width: 100%">
  55. <el-table-column prop="date" label="序号" width="180" align="center">
  56. <template slot-scope="scope" >
  57. {{scope.$index + 1}}
  58. </template>
  59. </el-table-column>
  60. <el-table-column prop="drug_name" label="入库单据编码" align="center">
  61. <template slot-scope="scope" >
  62. <span v-if="scope.row.stock_way == 2"> {{scope.row.warehouse_out_order_number}}</span>
  63. <span v-if="scope.row.stock_way == 4">{{scope.row.warehousing_order}}</span>
  64. </template>
  65. </el-table-column>
  66. <el-table-column prop="drug_name" label="操作日期" align="center">
  67. <template slot-scope="scope" >
  68. {{getTime(scope.row.ctime)}}
  69. </template>
  70. </el-table-column>
  71. <el-table-column prop="drug_name" label="有效期" align="center">
  72. <template slot-scope="scope">
  73. <span v-if="scope.row.stock_way == 4 && scope.row.warehousing_count!=0"> {{scope.row.warehousing_count}}</span>
  74. <span v-if="scope.row.stock_way == 2 && scope.row.count!=0">{{scope.row.count}}</span>
  75. </template>
  76. </el-table-column>
  77. <el-table-column prop="drug_name" label="批号" align="center">
  78. <template slot-scope="scope" >
  79. <span v-if="scope.row.stock_way == 4">{{scope.row.number}} </span>
  80. </template>
  81. </el-table-column>
  82. <el-table-column prop="drug_name" label="入库数量" align="center">
  83. <template slot-scope="scope">
  84. <span v-if="scope.row.stock_way == 4"> {{scope.row.warehousing_count}}</span>
  85. <span v-if="scope.row.stock_way == 2">{{scope.row.count}}</span>
  86. </template>
  87. </el-table-column>
  88. <el-table-column prop="drug_name" label="进货价" align="center">
  89. <template slot-scope="scope">
  90. <span v-if="scope.row.stock_way == 4"> {{scope.row.price}}</span>
  91. <span v-if="scope.row.stock_way == 2">{{scope.row.price}}</span>
  92. </template>
  93. </el-table-column>
  94. </el-table>
  95. <el-pagination
  96. @size-change="handleSizeChange"
  97. @current-change="handleCurrentChange"
  98. :page-sizes="[10, 50, 100,500,1000]"
  99. :page-size="10"
  100. background
  101. align="right"
  102. style="margin-top:20px;"
  103. layout="total, sizes, prev, pager, next, jumper"
  104. :total="total"
  105. >
  106. </el-pagination>
  107. </div>
  108. </div>
  109. </template>
  110. <script>
  111. import { uParseTime } from '@/utils/tools'
  112. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  113. import {getStockInList} from "@/api/drug/drug_stock";
  114. import {getStockDrugCount} from "@/api/stock"
  115. export default {
  116. name: 'stockIn',
  117. created() {
  118. this.getlist()
  119. this.getStockDrugCount()
  120. },
  121. components: {
  122. BreadCrumb
  123. },
  124. data() {
  125. return {
  126. crumbs: [
  127. { path: false, name: '库存管理' },
  128. { path: '/stock/drugs/stock/query', name: '药品库存查询' },
  129. { path:'/drugstock/in/drugstockflow',name:'库存流水'}
  130. ],
  131. keywords: '',
  132. total: 0,
  133. multipleSelection: [],
  134. signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
  135. start_time: '',
  136. end_time: '',
  137. page: 1,
  138. limit: 10,
  139. goodType: [],
  140. goodInfo: [],
  141. tempArr: [],
  142. sameRowArr: [],
  143. WarehouseInfo: {
  144. loading: false,
  145. warehouseInfoDate: []
  146. },
  147. tableData:[],
  148. drug_category:0,
  149. stock_type:0,
  150. drugCategory:[
  151. {id:0,name:"全部"}
  152. ],
  153. drugTypeList:[],
  154. tableList:[],
  155. manufacturerList:[],
  156. stockType:[
  157. {id:0,name:"全部"},
  158. {id:1,name:"手动出库"},
  159. {id:2,name:"自动出库"},
  160. {id:3,name:"入库"},
  161. ],
  162. countList:[],
  163. outCountList:[],
  164. autoCountList:[],
  165. keywords:"",
  166. }
  167. },
  168. methods:{
  169. handleSizeChange(val) {
  170. this.limit = val
  171. this.getlist()
  172. },
  173. handleCurrentChange(val) {
  174. this.page = val
  175. this.getlist()
  176. },
  177. startTimeChange: function(val) {
  178. var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
  179. if (time > 0) {
  180. this.$message.error("开始时间不能大于结束时间");
  181. this.start_time = "";
  182. } else {
  183. this.getlist()
  184. }
  185. },
  186. endTimeChange: function(val) {
  187. var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
  188. if (time < 0) {
  189. this.$message.error("结束时间不能小于开始时间");
  190. this.end_time = "";
  191. } else {
  192. this.getlist()
  193. }
  194. },
  195. changeDrug(){},
  196. getManufacturer(id){
  197. var name = ""
  198. for(let i=0;i<this.manufacturerList.length;i++){
  199. if(id == this.manufacturerList[i].id){
  200. name = this.manufacturerList[i].name
  201. }
  202. }
  203. return name
  204. },
  205. getTime(val) {
  206. if(val < 0){
  207. return ""
  208. }
  209. if(val == ""){
  210. return ""
  211. }else {
  212. return uParseTime(val, '{y}-{m}-{d}')
  213. }
  214. },
  215. //入库详情
  216. getlist(){
  217. var params= {
  218. limit:this.limit,
  219. page:this.page,
  220. id:this.$route.query.id,
  221. start_time:this.start_time,
  222. end_time:this.end_time,
  223. }
  224. getStockInList(params).then(response=>{
  225. if(response.data.state == 1){
  226. var list = response.data.data.list
  227. console.log("入库数据",list)
  228. for(let i=0;i<list.length;i++){
  229. list[i].stock_way = 4
  230. }
  231. this.tableList = list
  232. var total = response.data.data.total
  233. this.total = total
  234. console.log("入库数据",this.tableList)
  235. var manufacturerList = response.data.data.manufacturerList
  236. this.manufacturerList = manufacturerList
  237. }
  238. })
  239. },
  240. getInCount(id){
  241. var count= ""
  242. for(let i=0;i<this.countList.length;i++){
  243. if(id == this.countList[i].good_id){
  244. count = this.countList[i].count
  245. }
  246. }
  247. return count
  248. },
  249. getTimestamp(time) {
  250. // 把时间日期转成时间戳
  251. return new Date(time).getTime() / 1000;
  252. },
  253. getStockDrugCount(){
  254. var params ={
  255. keywords: this.keywords,
  256. start_time:this.start_time,
  257. end_time:this.end_time,
  258. }
  259. getStockDrugCount(params).then(response=>{
  260. if(response.data.state == 1){
  261. var count = response.data.data.count
  262. console.log("详情入库统计",count)
  263. this.countList = count
  264. var outlist = response.data.data.outList
  265. console.log("详情出库数量",outlist)
  266. this.outCountList = outlist
  267. var autoCount = response.data.data.autoCount
  268. console.log("详情自动出库",autoCount)
  269. this.autoCountList = autoCount
  270. }
  271. })
  272. },
  273. }
  274. }
  275. </script>
  276. <style rel="stylesheet/css" lang="scss" scoped>
  277. .information {
  278. border: 1px #dcdfe6 solid;
  279. padding: 30px 20px 30px 20px;
  280. .border {
  281. border-bottom: 1px #dcdfe6 solid;
  282. margin: 0px 0 20px 0;
  283. }
  284. }
  285. .title {
  286. background: #409eff;
  287. height: 44px;
  288. line-height: 44px;
  289. padding: 0 0 0 10px;
  290. color: #fff;
  291. margin: 0 0 10px 0;
  292. }
  293. .edit_separater {
  294. border-top: 1px solid rgb(233, 233, 233);
  295. margin-top: 15px;
  296. margin-bottom: 15px;
  297. }
  298. </style>
  299. <style>
  300. .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
  301. font-size: 12px;
  302. }
  303. .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
  304. background: #6fb5fa;
  305. }
  306. .count {
  307. color: #bd2c00;
  308. }
  309. .el-table td,
  310. .el-table th.is-leaf,
  311. .el-table--border,
  312. .el-table--group {
  313. border-color: #d0d3da;
  314. }
  315. .el-table--border::after,
  316. .el-table--group::after,
  317. .el-table::before {
  318. background-color: #d0d3da;
  319. }
  320. </style>