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

goodNewQuery.vue 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705
  1. <template>
  2. <div class="main-contain">
  3. <div class="app-container "
  4. v-loading="loading"
  5. element-loading-text="拼命加载中">
  6. <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
  7. <div>
  8. <span>仓库:</span>
  9. <el-select v-model="storehouse_id" style="width:200px;margin-right:10px;" placeholder="请选择"
  10. filterable
  11. @change="changeStorehouseName">
  12. <el-option
  13. v-for="item in houseList"
  14. :key="item.id"
  15. :label="item.storehouse_name"
  16. :value="item.id">
  17. </el-option>
  18. </el-select>
  19. <span>库存预警:</span>
  20. <el-select v-model="good_type" style="width:250px;margin-right:10px;" placeholder="请选择"
  21. filterable
  22. @change="changeGoodName">
  23. <el-option
  24. v-for="item in goodList"
  25. :key="item.id"
  26. :label="item.name"
  27. :value="item.id">
  28. </el-option>
  29. </el-select>
  30. <el-input v-model="keyword" style="width:200px" placeholder="请输入耗材名称或生产厂商" ></el-input>
  31. <el-button type="primary" icon="el-icon-search" @click="seach">搜索</el-button>
  32. </div>
  33. </div>
  34. <el-table
  35. :row-style="{ color: '#303133' }"
  36. :header-cell-style="{
  37. backgroundColor: 'rgb(245, 247, 250)',
  38. color: '#606266'
  39. }"
  40. :data="tableList"
  41. :class="signAndWeighBoxPatients"
  42. border
  43. >
  44. <el-table-column label="耗材类型" align="center">
  45. <template slot-scope="scope">
  46. {{getGoodTypeName(scope.row.good_type_id)}}
  47. </template>
  48. </el-table-column>
  49. <el-table-column label="耗材名称" align="center">
  50. <template slot-scope="scope">
  51. {{scope.row.good_name}}
  52. </template>
  53. </el-table-column>
  54. <el-table-column label="规格&单位" align="center">
  55. <template slot-scope="scope">
  56. {{scope.row.specification_name}}
  57. </template>
  58. </el-table-column>
  59. <el-table-column label="生产厂商" align="center">
  60. <template slot-scope="scope">
  61. {{getManufacturName(scope.row.manufacturer)}}
  62. </template>
  63. </el-table-column>
  64. <el-table-column label="国家编码" align="center">
  65. <template slot-scope="scope">
  66. {{scope.row.social_security_directory_code}}
  67. </template>
  68. </el-table-column>
  69. <el-table-column label="仓库名称" align="center">
  70. <template slot-scope="scope">
  71. <tr style="background: none" v-for="(item,index) in scope.row.warehouse_info" :key="index">
  72. <td style="border-right: none; border-inline-end: none;text-align: center" >
  73. {{getHouseName(item.storehouse_id)}}
  74. </td>
  75. </tr>
  76. </template>
  77. </el-table-column>
  78. <el-table-column label="入库量" align="center">
  79. <template slot-scope="scope">
  80. <tr style="background: none" v-for="(item,index) in scope.row.warehouse_info" :key="index">
  81. <td style="border-right: none; border-inline-end: none;text-align: center">
  82. {{getWareInfoCount(scope.row.xt_warehouse_info,item.storehouse_id)}}&nbsp;
  83. </td>
  84. </tr>
  85. </template>
  86. </el-table-column>
  87. <el-table-column label="出库量" align="center">
  88. <template slot-scope="scope">
  89. <span v-if="org_id == 3907 || org_id == 9583">{{ getAutoCount(scope.row.id) + getOutCount(scope.row.id) }}</span>
  90. <span v-if="org_id!=3907 && org_id!=9583">
  91. <tr style="background: none" v-for="(item,index) in scope.row.warehouse_out_info" :key="index">
  92. <td style="border-right: none; border-inline-end: none;text-align: center">
  93. <span style="color:#0099FF" @click="toDialogClick(scope.row.id,scope.row.good_name,scope.row.specification_name)"> {{getWareOutInfoCount(scope.row.warehouse_out_info,item.storehouse_id)}}</span>&nbsp;
  94. </td>
  95. </tr>
  96. </span>
  97. </template>
  98. </el-table-column>
  99. <el-table-column label="退库数量" align="center">
  100. <template slot-scope="scope">
  101. <tr style="background: none" v-for="(item,index) in scope.row.cancel_stock_info" :key="index">
  102. <td style="border-right: none; border-inline-end: none;text-align: center">
  103. {{getCancelCountInfo(scope.row.cancel_stock_info,item.storehouse_id)}}&nbsp;
  104. </td>
  105. </tr>
  106. </template>
  107. </el-table-column>
  108. <el-table-column label="实际出库" align="center">
  109. <template slot-scope="scope">
  110. <span v-if="org_id == 3907 || org_id == 9583">{{ getAutoCount(scope.row.id) + getOutCount(scope.row.id) }}</span>
  111. <span v-if="org_id!=3907 && org_id!=9583">
  112. <tr style="background: none" v-for="(item,index) in scope.row.warehouse_info" :key="index">
  113. <td style="border-right: none; border-inline-end: none;text-align: center">
  114. {{getWareInfoCount(scope.row.xt_warehouse_info,item.storehouse_id) - getWareInfoCountOne(scope.row.xt_warehouse_info,item.storehouse_id)}}&nbsp;
  115. </td>
  116. </tr>
  117. </span>
  118. </template>
  119. </el-table-column>
  120. <el-table-column label="剩余库存" align="center">
  121. <template slot-scope="scope">
  122. <span v-if="org_id == 3907 || org_id == 9583">
  123. {{
  124. getWareInfo(scope.row.xt_warehouse_info) -
  125. getAutoCount(scope.row.id) -
  126. getOutCount(scope.row.id) +
  127. getCancelCount(scope.row.id)
  128. }}
  129. </span>
  130. <span v-if="org_id!=3907 && org_id!=9583">
  131. <tr style="background: none" v-for="(item,index) in scope.row.warehouse_info" :key="index">
  132. <td style="border-right: none; border-inline-end: none;text-align: center">
  133. {{getWareInfoCountOne(scope.row.xt_warehouse_info,item.storehouse_id)}}&nbsp;&nbsp;
  134. </td>
  135. </tr>
  136. </span>
  137. </template>
  138. </el-table-column>
  139. <el-table-column label="总库存量" align="center">
  140. <template slot-scope="scope">
  141. <span v-if="org_id == 3907 || org_id == 9583">
  142. {{getWareInfo(scope.row.xt_warehouse_info) - getAutoCount(scope.row.id) -getOutCount(scope.row.id) +getCancelCount(scope.row.id)}}
  143. </span>
  144. <span v-if="org_id != 3907 && org_id != 9583">
  145. <span v-if="getOverFlushInfo(scope.row.xt_warehouse_info) <= scope.row.stock_warn_count" style="color:red"> {{getOverFlushInfo(scope.row.xt_warehouse_info)}}</span>
  146. <span v-if="getOverFlushInfo(scope.row.xt_warehouse_info) > scope.row.stock_warn_count"> {{getOverFlushInfo(scope.row.xt_warehouse_info)}}</span>
  147. </span>
  148. </template>
  149. </el-table-column>
  150. <el-table-column label="操作" align="center" width="200px">
  151. <template slot-scope="scope">
  152. <el-button
  153. size="small"
  154. type="primary"
  155. @click="toClick(scope.row)"
  156. >库存流水
  157. </el-button>
  158. <el-button
  159. size="small"
  160. type="primary"
  161. @click="toClickOne(scope.row)"
  162. >批次
  163. </el-button>
  164. </template>
  165. </el-table-column>
  166. </el-table>
  167. <el-pagination
  168. @size-change="handleSizeChange"
  169. @current-change="handleCurrentChange"
  170. :page-sizes="[10, 50, 100,200,500,1000]"
  171. :page-size="10"
  172. background
  173. align="right"
  174. style="margin-top:20px;"
  175. layout="total, sizes, prev, pager, next, jumper"
  176. :total="total"
  177. >
  178. </el-pagination>
  179. </div>
  180. <el-dialog
  181. title="出库详情"
  182. :visible.sync="dialogVisible"
  183. width="70%">
  184. <span>
  185. 耗材名称:{{good_name}}
  186. 规格&单位:{{specification_name}}
  187. 查询日期:
  188. <el-date-picker
  189. size="small"
  190. v-model="start_first_time"
  191. prefix-icon="el-icon-date"
  192. :editable="false"
  193. style="width: 150px;"
  194. type="date"
  195. placeholder="选择日期时间"
  196. align="right"
  197. format="yyyy-MM-dd"
  198. value-format="yyyy-MM-dd"
  199. @change="startFirstTimeChange"
  200. ></el-date-picker>
  201. <span>-</span>
  202. <el-date-picker
  203. size="small"
  204. v-model="end_first_time"
  205. prefix-icon="el-icon-date"
  206. :editable="false"
  207. style="width: 150px;"
  208. type="date"
  209. placeholder="选择日期时间"
  210. align="right"
  211. format="yyyy-MM-dd"
  212. value-format="yyyy-MM-dd"
  213. @change="endEndTimeChange"
  214. ></el-date-picker>
  215. </span>
  216. <el-divider></el-divider>
  217. <el-table
  218. :row-style="{ color: '#303133' }"
  219. :header-cell-style="{
  220. backgroundColor: 'rgb(245, 247, 250)',
  221. color: '#606266'
  222. }"
  223. :data="tableData"
  224. :class="signAndWeighBoxPatients"
  225. border
  226. >
  227. <el-table-column label="单据编号" align="center">
  228. <template slot-scope="scope">
  229. {{scope.row.warehouse_out_order_number}}
  230. </template>
  231. </el-table-column>
  232. <el-table-column label="操作时间" align="center">
  233. <template slot-scope="scope">
  234. {{getTime(scope.row.ctime)}}
  235. </template>
  236. </el-table-column>
  237. <el-table-column label="出库数量" align="center">
  238. <template slot-scope="scope">
  239. {{scope.row.count}}
  240. </template>
  241. </el-table-column>
  242. <el-table-column label="库存数量" align="center">
  243. <template slot-scope="scope">
  244. </template>
  245. </el-table-column>
  246. <el-table-column label="使用人" align="center">
  247. <template slot-scope="scope">
  248. {{getName(scope.row.patient_id)}}
  249. </template>
  250. </el-table-column>
  251. <el-table-column label="备注" align="center">
  252. <template slot-scope="scope">
  253. {{scope.row.remark}}
  254. </template>
  255. </el-table-column>
  256. </el-table>
  257. <el-pagination
  258. @size-change="handleSizeChangeOne"
  259. @current-change="handleCurrentChangeOne"
  260. :page-sizes="[10, 50, 100,200,500,1000]"
  261. :page-size="10"
  262. background
  263. align="right"
  264. style="margin-top:20px;"
  265. layout="total, sizes, prev, pager, next, jumper"
  266. :total="totalone"
  267. >
  268. </el-pagination>
  269. <span slot="footer" class="dialog-footer">
  270. <el-button @click="dialogVisible = false">取 消</el-button>
  271. <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  272. </span>
  273. </el-dialog>
  274. </div>
  275. </template>
  276. <script>
  277. import { getStorehouseList,getGoodNewQuery,getGoodWarehouseOutInfoById } from "@/api/drug/drug"
  278. import {
  279. getStockDrugCount
  280. } from "@/api/stock";
  281. import { uParseTime } from '@/utils/tools'
  282. export default {
  283. data(){
  284. return{
  285. tableList:[],
  286. goodList:[
  287. {id:1,name:"全部耗材"},
  288. {id:2,name:"库存预警"},
  289. ],
  290. houseList:[],
  291. storehouse_id:0,
  292. good_type:1,
  293. multipleSelection: [],
  294. signAndWeighBoxPatients: "sign-and-weigh-box-patients",
  295. manufacturerList:[],
  296. limit:10,
  297. page:1,
  298. total:0,
  299. limitone:10,
  300. pageone:1,
  301. totalone:0,
  302. keyword:"",
  303. goodTypeList:[],
  304. start_time:"",
  305. end_time:"",
  306. countList:[],
  307. outCountList:[],
  308. autoCountList:[],
  309. cancelCountList:[],
  310. org_id:this.$store.getters.xt_user.org_id,
  311. dialogVisible:false,
  312. start_first_time:"",
  313. end_first_time:"",
  314. tableData:[],
  315. good_id:0,
  316. patientList:[],
  317. good_name:"",
  318. specification_name:"",
  319. loading:false,
  320. }
  321. },
  322. methods:{
  323. changeStorehouseName(){
  324. },
  325. changeGoodName(){
  326. this.getlist()
  327. },
  328. toClick(val){
  329. var manufacturer_name = ""
  330. var specification_name = ""
  331. for(let i=0;i<this.manufacturerList.length;i++){
  332. if(val.manufacturer == this.manufacturerList[i].id){
  333. manufacturer_name = this.manufacturerList[i].manufacturer_name
  334. }
  335. }
  336. specification_name = val.specification_name + "/" + val.packing_unit
  337. var overCount = this.getOverplus(val.xt_warehouse_info)
  338. // window.sessionStorage.setItem('start_time',this.start_time)
  339. // window.sessionStorage.setItem('end_time',this.end_time)
  340. this.$router.push({path:"/stock/in/stockflow?id="+val.id+"&manufacturer="+manufacturer_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
  341. },
  342. toClickOne(val){
  343. var manufacturer_name = ""
  344. var specification_name = ""
  345. for(let i=0;i<this.manufacturerList.length;i++){
  346. if(val.manufacturer == this.manufacturerList[i].id){
  347. manufacturer_name = this.manufacturerList[i].manufacturer_name
  348. }
  349. }
  350. specification_name = val.specification_name + "/" + val.packing_unit
  351. var overCount = this.getOverplus(val.xt_warehouse_info)
  352. // window.sessionStorage.setItem('start_time',this.start_time)
  353. // window.sessionStorage.setItem('end_time',this.end_time)
  354. this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.id+"&manufacturer="+manufacturer_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
  355. },
  356. getStorehouseList(){
  357. getStorehouseList().then(response=>{
  358. if(response.data.state == 1){
  359. var houseList = response.data.data.list
  360. var obj = {id:0,storehouse_name:"全部"}
  361. this.houseList.push(obj)
  362. for(let i=0;i<houseList.length;i++){
  363. this.houseList.push(houseList[i])
  364. }
  365. this.manufacturerList = response.data.data.manufacturerList
  366. this.goodTypeList = response.data.data.goodTypeList
  367. this.patientList = response.data.data.patientList
  368. }
  369. })
  370. },
  371. getlist(){
  372. this.loading = true
  373. var params = {
  374. storehouse_id:this.storehouse_id,
  375. good_type:this.good_type,
  376. keyword:this.keyword,
  377. page:this.page,
  378. limit:this.limit,
  379. start_time:this.start_time,
  380. end_time:this.end_time,
  381. }
  382. getGoodNewQuery(params).then(response=>{
  383. if(response.data.state == 1){
  384. var list = response.data.data.list
  385. this.loading = false
  386. if(list.length > 0){
  387. var arr = []
  388. for(let i=0;i<list.length;i++){
  389. if(list[i].xt_warehouse_info.length > 0){
  390. arr.push(list[i])
  391. }
  392. }
  393. this.tableList = arr
  394. }
  395. this.total = response.data.data.total
  396. }
  397. })
  398. },
  399. getManufacturName(id){
  400. var manufacturer_name = ""
  401. for(let i=0;i<this.manufacturerList.length;i++){
  402. if(id == this.manufacturerList[i].id){
  403. manufacturer_name = this.manufacturerList[i].manufacturer_name
  404. }
  405. }
  406. return manufacturer_name
  407. },
  408. handleSizeChange(val) {
  409. this.limit = val;
  410. this.getlist()
  411. },
  412. handleCurrentChange(val) {
  413. this.page = val;
  414. this.getlist()
  415. },
  416. handleSizeChangeOne(val) {
  417. this.limitone = val;
  418. this.toDialogClick(this.good_id,this.good_name,this.specification_name)
  419. },
  420. handleCurrentChangeOne(val) {
  421. this.pageone = val;
  422. this.toDialogClick(this.good_id,this.good_name,this.specification_name)
  423. },
  424. seach(){
  425. this.getlist()
  426. },
  427. getGoodTypeName(id){
  428. var type_name = ""
  429. for(let i=0;i<this.goodTypeList.length;i++){
  430. if(id == this.goodTypeList[i].id){
  431. type_name = this.goodTypeList[i].type_name
  432. }
  433. }
  434. return type_name
  435. },
  436. getHouseName(id){
  437. var storehouse_name = ""
  438. for(let i=0;i<this.houseList.length;i++){
  439. if(id == this.houseList[i].id){
  440. storehouse_name = this.houseList[i].storehouse_name
  441. }
  442. }
  443. return storehouse_name
  444. },
  445. getWareInfoCount(val,storehouse_id){
  446. var count = 0
  447. if(val.length > 0){
  448. for(let i=0;i<val.length;i++){
  449. if(val[i].storehouse_id == storehouse_id){
  450. count +=val[i].warehousing_count
  451. }
  452. }
  453. }
  454. if(count > 0){
  455. return count
  456. }else{
  457. return ""
  458. }
  459. },
  460. getStockDrugCount(){
  461. var params ={
  462. keywords: this.keywords,
  463. start_time:this.start_time,
  464. end_time:this.end_time,
  465. }
  466. getStockDrugCount(params).then(response=>{
  467. if(response.data.state == 1){
  468. var outlist = response.data.data.outList
  469. this.outCountList = outlist
  470. var autoCount = response.data.data.autoCount
  471. this.autoCountList = autoCount
  472. var totalCount = response.data.data.totalCount
  473. this.cancelCountList = totalCount
  474. }
  475. })
  476. },
  477. getWareInfoCountOne(val,storehouse_id){
  478. var count = 0
  479. if(val.length > 0){
  480. for(let i=0;i<val.length;i++){
  481. if(val[i].storehouse_id == storehouse_id){
  482. count +=val[i].stock_count
  483. }
  484. }
  485. }
  486. if(count > 0){
  487. return count
  488. }else{
  489. return ""
  490. }
  491. },
  492. getOutCount(id){
  493. var count = 0
  494. for(let i=0;i<this.outCountList.length;i++){
  495. if(id == this.outCountList[i].good_id){
  496. count = this.outCountList[i].count
  497. }
  498. }
  499. return count
  500. },
  501. getAutoCount(id){
  502. var count= 0
  503. for(let i=0;i<this.autoCountList.length;i++){
  504. if(id == this.autoCountList[i].good_id){
  505. count = this.autoCountList[i].count
  506. }
  507. }
  508. return count
  509. },
  510. getCancelCount(id){
  511. var count = 0
  512. for(let i=0;i<this.cancelCountList.length;i++){
  513. if(id == this.cancelCountList[i].good_id){
  514. count = this.cancelCountList[i].count
  515. }
  516. }
  517. return count
  518. },
  519. getCancelCountInfo(cancel_stock_info,storehouse_id){
  520. var count = 0
  521. if(cancel_stock_info.length >0){
  522. for(let i=0;i<cancel_stock_info.length;i++){
  523. if(storehouse_id == cancel_stock_info[i].storehouse_id){
  524. count += cancel_stock_info[i].count
  525. }
  526. }
  527. }
  528. return count
  529. },
  530. getWareOutInfoCount(warehouse_out_info,storehouse_id){
  531. var count = 0
  532. if(warehouse_out_info.length > 0){
  533. for(let i=0;i<warehouse_out_info.length;i++){
  534. if(storehouse_id == warehouse_out_info[i].storehouse_id){
  535. count +=warehouse_out_info[i].count
  536. }
  537. }
  538. }
  539. return count
  540. },
  541. getInCount(id){
  542. var count= 0
  543. for(let i=0;i<this.countList.length;i++){
  544. if(id == this.countList[i].good_id){
  545. count = this.countList[i].count
  546. }
  547. }
  548. return count
  549. },
  550. getOutCount(id){
  551. var count = 0
  552. for(let i=0;i<this.outCountList.length;i++){
  553. if(id == this.outCountList[i].good_id){
  554. count = this.outCountList[i].count
  555. }
  556. }
  557. return count
  558. },
  559. getAutoCount(id){
  560. var count= 0
  561. for(let i=0;i<this.autoCountList.length;i++){
  562. if(id == this.autoCountList[i].good_id){
  563. count = this.autoCountList[i].count
  564. }
  565. }
  566. return count
  567. },
  568. getCancelCount(id){
  569. var count = 0
  570. for(let i=0;i<this.cancelCountList.length;i++){
  571. if(id == this.cancelCountList[i].good_id){
  572. count = this.cancelCountList[i].count
  573. }
  574. }
  575. return count
  576. },
  577. getStockCount(id){
  578. var stock_count = 0
  579. for(let i=0;i<this.countList.length;i++){
  580. if(id == this.countList[i].good_id){
  581. stock_count = this.countList[i].stock_count
  582. }
  583. }
  584. return stock_count
  585. },
  586. getWareInfo(arr){
  587. var total = 0
  588. if(arr.length > 0){
  589. for(let i=0;i<arr.length;i++){
  590. total += parseInt(arr[i].warehousing_count)
  591. }
  592. }else{
  593. total = ""
  594. }
  595. return total
  596. },
  597. getOverplus(arr){
  598. var total = 0
  599. if(arr.length > 0){
  600. for(let i=0;i<arr.length;i++){
  601. total += arr[i].stock_count
  602. }
  603. }else{
  604. total = ""
  605. }
  606. return total
  607. },
  608. getCancelInfo(arr){
  609. var total = 0
  610. if(arr.length > 0){
  611. for(let i=0;i<arr.length;i++){
  612. total += arr[i].count
  613. }
  614. }else{
  615. total = ""
  616. }
  617. return total
  618. },
  619. getOverFlushInfo(arr){
  620. var total = 0
  621. if(arr.length >0){
  622. for(let i=0;i<arr.length;i++){
  623. total += arr[i].stock_count
  624. }
  625. }
  626. return total
  627. },
  628. toDialogClick(id,good_name,specification_name){
  629. this.good_id = id
  630. this.good_name = good_name
  631. this.specification_name = specification_name
  632. var params = {
  633. good_id:id,
  634. limit:this.limitone,
  635. page:this.pageone,
  636. start_first_time:this.start_first_time,
  637. end_first_time:this.end_first_time,
  638. }
  639. getGoodWarehouseOutInfoById(params).then(response=>{
  640. if(response.data.state == 1){
  641. var list = response.data.data.list
  642. console.log("list23233233232w",list)
  643. this.tableData = list
  644. this.totalone = response.data.data.total
  645. this.dialogVisible = true
  646. }
  647. })
  648. },
  649. startFirstTimeChange(){
  650. },
  651. endEndTimeChange(){
  652. },
  653. getTime(val) {
  654. if(val < 0){
  655. return ""
  656. }
  657. if(val == ""){
  658. return ""
  659. }else {
  660. return uParseTime(val, '{y}-{m}-{d}')
  661. }
  662. },
  663. getName(id){
  664. var name = ""
  665. for(let i=0;i<this.patientList.length;i++){
  666. if(id == this.patientList[i].id){
  667. name = this.patientList[i].name
  668. }
  669. }
  670. return name
  671. }
  672. },
  673. created(){
  674. this.getStorehouseList()
  675. this.getlist()
  676. this.getStockDrugCount()
  677. }
  678. }
  679. </script>