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

stockBatchNumber.vue 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  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. 库存:{{this.$route.query.overCount}}{{packing_unit}} &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. </div>
  42. <el-table
  43. :data="tableList"
  44. border
  45. style="width: 100%">
  46. <el-table-column prop="date" label="序号" width="180" align="center">
  47. <template slot-scope="scope" >
  48. {{scope.$index + 1}}
  49. </template>
  50. </el-table-column>
  51. <el-table-column prop="drug_name" label="入库单据编码" align="center">
  52. <template slot-scope="scope" >
  53. <span >{{scope.row.warehousing_order}}</span>
  54. </template>
  55. </el-table-column>
  56. <el-table-column prop="drug_name" label="操作日期" align="center">
  57. <template slot-scope="scope" >
  58. {{getTime(scope.row.ctime)}}
  59. </template>
  60. </el-table-column>
  61. <el-table-column prop="drug_name" label="有效期" align="center">
  62. <template slot-scope="scope">
  63. <span> {{getTime(scope.row.expiry_date)}}</span>
  64. </template>
  65. </el-table-column>
  66. <el-table-column prop="drug_name" label="批号" align="center">
  67. <template slot-scope="scope" >
  68. <span>{{scope.row.number}} </span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column prop="drug_name" label="入库数量" align="center">
  72. <template slot-scope="scope">
  73. <span> {{scope.row.warehousing_count}}{{packing_unit}}</span>
  74. </template>
  75. </el-table-column>
  76. <el-table-column prop="drug_name" label="进货价" align="center">
  77. <template slot-scope="scope">
  78. <span> {{scope.row.price}}</span>
  79. </template>
  80. </el-table-column>
  81. <el-table-column prop="drug_name" label="零售价" align="center">
  82. <template slot-scope="scope">
  83. <span v-if="scope.row.packing_price > 0"> {{scope.row.packing_price}}</span>
  84. </template>
  85. </el-table-column>
  86. </el-table>
  87. <el-pagination
  88. @size-change="handleSizeChange"
  89. @current-change="handleCurrentChange"
  90. :page-sizes="[10, 50, 100,500,1000]"
  91. :page-size="10"
  92. background
  93. align="right"
  94. style="margin-top:20px;"
  95. layout="total, sizes, prev, pager, next, jumper"
  96. :total="total"
  97. >
  98. </el-pagination>
  99. </div>
  100. </div>
  101. </template>
  102. <script>
  103. import { uParseTime } from '@/utils/tools'
  104. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  105. import {getStockInList} from "@/api/drug/drug_stock";
  106. import {getStockDrugCount} from "@/api/stock"
  107. export default {
  108. name: 'stockIn',
  109. created() {
  110. var nowDate = new Date();
  111. var nowYear = nowDate.getFullYear();
  112. var nowMonth = nowDate.getMonth() + 1;
  113. var nowDay = nowDate.getDate();
  114. this.end_time =
  115. nowYear +
  116. "-" +
  117. (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
  118. "-" +
  119. (nowDay < 10 ? "0" + nowDay : nowDay);
  120. nowDate.setMonth(nowDate.getMonth() - 1);
  121. nowYear = nowDate.getFullYear();
  122. nowMonth = nowDate.getMonth() + 1;
  123. nowDay = nowDate.getDate();
  124. this.start_time =
  125. nowYear +
  126. "-" +
  127. (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
  128. "-" +
  129. (nowDay < 10 ? "0" + nowDay : nowDay);
  130. this.getlist()
  131. // this.getStockDrugCount()
  132. this.packing_unit = this.$route.query.packing_unit
  133. },
  134. components: {
  135. BreadCrumb
  136. },
  137. data() {
  138. return {
  139. crumbs: [
  140. { path: false, name: '库存管理' },
  141. { path: '/stock/drugs/stock/query', name: '耗材库存查询' },
  142. { path:'/drugstock/in/drugstockflow',name:'库存流水'}
  143. ],
  144. keywords: '',
  145. total: 0,
  146. multipleSelection: [],
  147. signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
  148. start_time: '',
  149. end_time: '',
  150. page: 1,
  151. limit: 10,
  152. goodType: [],
  153. goodInfo: [],
  154. tempArr: [],
  155. sameRowArr: [],
  156. WarehouseInfo: {
  157. loading: false,
  158. warehouseInfoDate: []
  159. },
  160. tableData:[],
  161. drug_category:0,
  162. stock_type:0,
  163. drugCategory:[
  164. {id:0,name:"全部"}
  165. ],
  166. drugTypeList:[],
  167. tableList:[],
  168. manufacturerList:[],
  169. stockType:[
  170. {id:0,name:"全部"},
  171. {id:1,name:"手动出库"},
  172. {id:2,name:"自动出库"},
  173. {id:3,name:"入库"},
  174. ],
  175. countList:[],
  176. outCountList:[],
  177. autoCountList:[],
  178. keywords:"",
  179. packing_unit:"",
  180. cancelCountList:[],
  181. }
  182. },
  183. methods:{
  184. handleSizeChange(val) {
  185. this.limit = val
  186. this.getlist()
  187. },
  188. handleCurrentChange(val) {
  189. this.page = val
  190. this.getlist()
  191. },
  192. startTimeChange: function(val) {
  193. var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
  194. if (time > 0) {
  195. this.$message.error("开始时间不能大于结束时间");
  196. this.start_time = "";
  197. } else {
  198. this.getlist()
  199. }
  200. },
  201. endTimeChange: function(val) {
  202. var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
  203. if (time < 0) {
  204. this.$message.error("结束时间不能小于开始时间");
  205. this.end_time = "";
  206. } else {
  207. this.getlist()
  208. }
  209. },
  210. changeDrug(){},
  211. getManufacturer(id){
  212. var name = ""
  213. for(let i=0;i<this.manufacturerList.length;i++){
  214. if(id == this.manufacturerList[i].id){
  215. name = this.manufacturerList[i].name
  216. }
  217. }
  218. return name
  219. },
  220. getTime(val) {
  221. if(val < 0){
  222. return ""
  223. }
  224. if(val == ""){
  225. return ""
  226. }else {
  227. return uParseTime(val, '{y}-{m}-{d}')
  228. }
  229. },
  230. //入库详情
  231. getlist(){
  232. var params= {
  233. limit:this.limit,
  234. page:this.page,
  235. id:this.$route.query.id,
  236. start_time:this.start_time,
  237. end_time:this.end_time,
  238. }
  239. getStockInList(params).then(response=>{
  240. if(response.data.state == 1){
  241. var list = response.data.data.list
  242. console.log("入库数据",list)
  243. // for(let i=0;i<list.length;i++){
  244. // list[i].stock_way = 4
  245. // }
  246. this.tableList = list
  247. var total = response.data.data.total
  248. this.total = total
  249. console.log("入库数据",this.tableList)
  250. var manufacturerList = response.data.data.manufacturerList
  251. this.manufacturerList = manufacturerList
  252. }
  253. })
  254. },
  255. getInCount(id){
  256. var count= ""
  257. for(let i=0;i<this.countList.length;i++){
  258. if(id == this.countList[i].good_id){
  259. count = this.countList[i].count
  260. }
  261. }
  262. return count
  263. },
  264. getOutCount(id){
  265. console.log("id222",id)
  266. var count = ""
  267. for(let i=0;i<this.outCountList.length;i++){
  268. if(id == this.outCountList[i].good_id){
  269. count = this.outCountList[i].count
  270. }
  271. }
  272. return count
  273. },
  274. getAutoCount(id){
  275. var count= ""
  276. for(let i=0;i<this.autoCountList.length;i++){
  277. if(id == this.autoCountList[i].good_id){
  278. count = this.autoCountList[i].count
  279. }
  280. }
  281. return count
  282. },
  283. getCancelCount(id){
  284. var count = 0
  285. for(let i=0;i<this.cancelCountList.length;i++){
  286. if(id == this.cancelCountList[i].good_id){
  287. count = this.cancelCountList[i].count
  288. }
  289. }
  290. return count
  291. },
  292. getTimestamp(time) {
  293. // 把时间日期转成时间戳
  294. return new Date(time).getTime() / 1000;
  295. },
  296. getStockDrugCount(){
  297. var params ={
  298. keywords: this.keywords,
  299. start_time:this.start_time,
  300. end_time:this.end_time,
  301. }
  302. getStockDrugCount(params).then(response=>{
  303. if(response.data.state == 1){
  304. var count = response.data.data.count
  305. console.log("详情入库统计",count)
  306. this.countList = count
  307. var outlist = response.data.data.outList
  308. console.log("详情出库数量",outlist)
  309. this.outCountList = outlist
  310. var autoCount = response.data.data.autoCount
  311. console.log("详情自动出库",autoCount)
  312. this.autoCountList = autoCount
  313. var totalCount = response.data.data.totalCount
  314. console.log("totalcount",totalCount)
  315. this.cancelCountList = totalCount
  316. }
  317. })
  318. },
  319. getStockCount(id){
  320. var stock_count = 0
  321. for(let i=0;i<this.countList.length;i++){
  322. if(id == this.countList[i].good_id){
  323. stock_count = this.countList[i].stock_count
  324. }
  325. }
  326. return stock_count
  327. }
  328. }
  329. }
  330. </script>
  331. <style rel="stylesheet/css" lang="scss" scoped>
  332. .information {
  333. border: 1px #dcdfe6 solid;
  334. padding: 30px 20px 30px 20px;
  335. .border {
  336. border-bottom: 1px #dcdfe6 solid;
  337. margin: 0px 0 20px 0;
  338. }
  339. }
  340. .title {
  341. background: #409eff;
  342. height: 44px;
  343. line-height: 44px;
  344. padding: 0 0 0 10px;
  345. color: #fff;
  346. margin: 0 0 10px 0;
  347. }
  348. .edit_separater {
  349. border-top: 1px solid rgb(233, 233, 233);
  350. margin-top: 15px;
  351. margin-bottom: 15px;
  352. }
  353. </style>
  354. <style>
  355. .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
  356. font-size: 12px;
  357. }
  358. .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
  359. background: #6fb5fa;
  360. }
  361. .count {
  362. color: #bd2c00;
  363. }
  364. .el-table td,
  365. .el-table th.is-leaf,
  366. .el-table--border,
  367. .el-table--group {
  368. border-color: #d0d3da;
  369. }
  370. .el-table--border::after,
  371. .el-table--group::after,
  372. .el-table::before {
  373. background-color: #d0d3da;
  374. }
  375. </style>