liveView.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <template>
  2. <el-drawer v-loading="load" title="查看生命周期" :visible.sync="drawer" @close="close" :direction="direction" size="50%">
  3. <div class="content">
  4. <el-row :gutter="20">
  5. <el-col :span="8">
  6. 名称:{{ liveData.material?.name }}
  7. </el-col>
  8. <el-col :span="8">
  9. 规格:{{ liveData.material?.materialSpec }}
  10. </el-col>
  11. <el-col :span="8">
  12. 编号:{{ liveData.materialSku?.skuCode }}
  13. </el-col>
  14. <el-col :span="8">
  15. 分类:{{ liveData.materialCategory?.name }}
  16. </el-col>
  17. <el-col :span="8">
  18. 仓库:
  19. </el-col>
  20. <el-col :span="8">
  21. 仓位:
  22. </el-col>
  23. <el-col :span="8">
  24. 供应商:
  25. </el-col>
  26. <el-col :span="8">
  27. 供应商编号:
  28. </el-col>
  29. </el-row>
  30. <p>OMS登记环节</p>
  31. <by-table :propConfig="tableConfig1" ref="table1" />
  32. <p>WMS仓储环节</p>
  33. <by-table :propConfig="tableConfig1" ref="table2" />
  34. <p>WMS物流运输环节</p>
  35. <by-table :propConfig="tableConfig1" ref="table3" />
  36. </div>
  37. </el-drawer>
  38. </template>
  39. <script lang="ts">
  40. import { Component, Prop, Vue, Watch } from "vue-property-decorator";
  41. import api from "@/api/currency";
  42. @Component({ components: {} })
  43. export default class LiveView extends Vue {
  44. drawer = false;
  45. direction = 'rtl'
  46. data: any = {};
  47. liveData: any = {};
  48. isSuccess = false;
  49. load = false;
  50. tableConfig1: any = {
  51. attr: {
  52. size: 'mini',
  53. align: 'left',
  54. seq: true
  55. },
  56. columns: [{
  57. title: '事项',
  58. field: 'matter'
  59. }, {
  60. title: '来源',
  61. field: 'source'
  62. }, {
  63. title: '操作人',
  64. field: 'operator'
  65. }, {
  66. title: '时间',
  67. field: 'createTime',
  68. }]
  69. }
  70. setShow(v: boolean) {
  71. this.drawer = v;
  72. }
  73. async setItem(data: any) {
  74. this.data = data
  75. //console.info('data', data, this.data)
  76. const res = await api.showLifeCycle({ id: this.data.id })
  77. if (res.code === 200) {
  78. this.liveData = res.data;
  79. (this.$refs.table2 as any).setValue(this.liveData.warehousingList);
  80. (this.$refs.table3 as any).setValue(this.liveData.logisticsList);
  81. (this.$refs.table1 as any).setValue([
  82. { matter: '创建商品', source: 'OMS', operator: '管理员', time: '2025-07-06 10:01:22' },
  83. { matter: '录入商品编号', source: 'OMS', operator: '管理员', time: '2025-07-06 10:05:43' },
  84. { matter: '设置商品类别', source: 'OMS', operator: '管理员', time: '2025-07-06 10:10:32' },
  85. { matter: '登记供应商', source: 'OMS', operator: '管理员', time: '2025-07-06 10:11:16' },
  86. ]);
  87. } else {
  88. this.$message.error(res.msg)
  89. }
  90. }
  91. close() {
  92. if (this.isSuccess) {
  93. this.$emit('handleSuccess');
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang="scss" scoped>
  99. .content {
  100. width: 100%;
  101. box-sizing: border-box;
  102. padding: 0 16px;
  103. background-color: #FFF;
  104. .order-top {
  105. padding-bottom: 16px;
  106. display: flex;
  107. justify-content: center;
  108. }
  109. }
  110. .deli-footer {
  111. height: 80px;
  112. width: 100%;
  113. box-shadow: 0 -5px 10px #EEE;
  114. padding: 0 16px 8px;
  115. box-sizing: border-box;
  116. display: flex;
  117. justify-content: space-between;
  118. align-items: flex-end;
  119. position: absolute;
  120. background-color: #FFF;
  121. left: 0;
  122. bottom: 0;
  123. z-index: 10;
  124. .d-left {
  125. width: 50%;
  126. .estimate-total {
  127. font-size: 14px;
  128. padding-bottom: 4px;
  129. .total {
  130. font-size: 16px;
  131. color: #F00;
  132. }
  133. .detail {
  134. color: #1684FC;
  135. padding-left: 16px;
  136. cursor: pointer;
  137. }
  138. }
  139. }
  140. .send-btn {
  141. width: 120px;
  142. height: 40px;
  143. line-height: 40px;
  144. margin-left: 16px;
  145. border-radius: 8px;
  146. background: linear-gradient(129.2deg, rgba(22, 132, 252, 1) 9.81%, rgba(93, 167, 249, 1) 97.4%);
  147. color: rgba(255, 255, 255, 100);
  148. font-size: 14px;
  149. text-align: center;
  150. box-shadow: 0px 2px 6px 0px rgba(93, 167, 249, 100);
  151. cursor: pointer;
  152. }
  153. .stopBtn {
  154. opacity: 0.7;
  155. }
  156. .btn-box {
  157. width: 50%;
  158. display: flex;
  159. justify-content: flex-end;
  160. align-items: center;
  161. }
  162. }
  163. .space {
  164. height: 80px;
  165. width: 100%;
  166. margin-top: 16px;
  167. }
  168. </style>