detail.vue 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <div class='replenishment-picking-detail fs-14'>
  3. <div class="list bgc-fff">
  4. <div class="row kitbox">
  5. <div class="box-flex-1 pl10">药品名称</div>
  6. <div class="tc">领料数量</div>
  7. </div>
  8. <div class="row kitbox" v-for="(item, i) in drugList" :key="i">
  9. <div class="box-flex-1 pl10 ellipsis">{{item.drugName}}</div>
  10. <div class="tc">{{item.claim || item.quantity}}</div>
  11. </div>
  12. </div>
  13. </div>
  14. </template>
  15. <script>
  16. import medicineAbinetApi from '@/api/api-medicineAbinet'
  17. export default{
  18. name: 'replenishmentPickingDetail',
  19. data(){
  20. return {
  21. entity: '',
  22. drugList: [],
  23. idUp: this.$route.query.idUp,
  24. idOut: this.$route.query.idOut,
  25. }
  26. },
  27. created() {
  28. this.findById()
  29. },
  30. methods:{
  31. findById(){
  32. this.$loading('加载中..')
  33. if(this.idUp){
  34. let p = {
  35. idUp: this.idUp
  36. }
  37. medicineAbinetApi
  38. .getUpDetailById(p)
  39. .then(res=>{
  40. this.$toast.clear()
  41. console.log('getUpDetailById', res)
  42. if(res.status == 200){
  43. this.drugList = res.obj.list
  44. } else {
  45. this.drugList = []
  46. }
  47. })
  48. .catch(err=>{
  49. console.error(err)
  50. })
  51. } else {
  52. let p = {
  53. idOut: this.idOut
  54. }
  55. medicineAbinetApi
  56. .getOutDetailById(p)
  57. .then(res=>{
  58. this.$toast.clear()
  59. console.log('getOutDetailById', res)
  60. if(res.status == 200){
  61. this.drugList = res.obj.list
  62. } else {
  63. this.drugList = []
  64. }
  65. })
  66. .catch(err=>{
  67. console.error(err)
  68. })
  69. }
  70. }
  71. },
  72. }
  73. </script>
  74. <style lang='scss' scoped>
  75. .replenishment-picking-detail{
  76. .list{
  77. .row{
  78. padding: 10px 0;
  79. border-bottom: 1px solid #e1e1e1;
  80. >div:nth-child(2){
  81. width: 80px;
  82. }
  83. &:last-child{
  84. border-bottom: 0;
  85. }
  86. }
  87. }
  88. }
  89. </style>