index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <div class="app-container">
  3. <el-table v-loading="loading" :data="stockDate">
  4. <el-table-column type="index" label="序号" align="center" />
  5. <el-table-column label="货主" align="center" prop="fcorpid" />
  6. <el-table-column label="提单号" align="center">
  7. <template slot-scope="scope">
  8. <div @click="goPage(scope.row)">{{ scope.row.fMblno }}</div>
  9. </template>
  10. </el-table-column>
  11. <el-table-column label="货物属性" align="center" prop="fBusinessType" />
  12. <el-table-column label="属性详情" align="center" prop="fMarks" />
  13. <el-table-column label="业务类型" align="center" prop="fBilltype" />
  14. <el-table-column label="业务日期" align="center" prop="fBsdate" />
  15. <el-table-column label="贸易方式" align="center" prop="fTrademodeid" />
  16. <el-table-column label="件数" align="center">
  17. <template slot-scope="scope">
  18. <div v-if="scope.row.fBilltype == '入库'">{{ scope.row.fQtyRK }}</div>
  19. <div v-if="scope.row.fBilltype == '出库'">{{ scope.row.fQtyCK }}</div>
  20. <div v-if="scope.row.fBilltype == '调拨'">{{ scope.row.fQtyDB }}</div>
  21. <div v-if="scope.row.fBilltype == '货权转移'">
  22. {{ scope.row.fQtyHZ }}
  23. </div>
  24. <div v-if="scope.row.fBilltype == '货物通关'">
  25. {{ scope.row.fQtyTG }}
  26. </div>
  27. </template>
  28. </el-table-column>
  29. <el-table-column label="毛重" align="center">
  30. <template slot-scope="scope">
  31. <div v-if="scope.row.fBilltype == '入库'">
  32. {{ scope.row.fGrossweightRK }}
  33. </div>
  34. <div v-if="scope.row.fBilltype == '出库'">
  35. {{ scope.row.fGrossweightCK }}
  36. </div>
  37. <div v-if="scope.row.fBilltype == '调拨'">
  38. {{ scope.row.fGrossweightDB }}
  39. </div>
  40. <div v-if="scope.row.fBilltype == '货权转移'">
  41. {{ scope.row.fGrossweightHZ }}
  42. </div>
  43. <div v-if="scope.row.fBilltype == '货物通关'">
  44. {{ scope.row.fGrossweightTG }}
  45. </div>
  46. </template>
  47. </el-table-column>
  48. <el-table-column label="净重" align="center">
  49. <template slot-scope="scope">
  50. <div v-if="scope.row.fBilltype == '入库'">
  51. {{ scope.row.fNetweightRK }}
  52. </div>
  53. <div v-if="scope.row.fBilltype == '出库'">
  54. {{ scope.row.fNetweightCK }}
  55. </div>
  56. <div v-if="scope.row.fBilltype == '调拨'">
  57. {{ scope.row.fNetweightDB }}
  58. </div>
  59. <div v-if="scope.row.fBilltype == '货权转移'">
  60. {{ scope.row.fNetweightHZ }}
  61. </div>
  62. <div v-if="scope.row.fBilltype == '货物通关'">
  63. {{ scope.row.fNetweightTG }}
  64. </div>
  65. </template>
  66. </el-table-column>
  67. </el-table>
  68. </div>
  69. </template>
  70. <script>
  71. import { detailStock } from "@/api/warehouseBusiness/warehouseInStock";
  72. import { listCorps } from "@/api/basicdata/corps";
  73. import { listWarehouse } from "@/api/basicdata/warehouse";
  74. import { listGoods } from "@/api/basicdata/goods";
  75. import { listUser, queryUserVal } from "@/api/system/user";
  76. export default {
  77. name: "Warehousebills",
  78. components: {},
  79. data() {
  80. return {
  81. stockDate: [],
  82. // 遮罩层
  83. loading: true,
  84. };
  85. },
  86. created() {
  87. detailStock({
  88. fWarehouseLocationid: this.$route.query.fWarehouseLocationid,
  89. fTrademodeids: this.$route.query.fTrademodeids,
  90. fBusinessType: this.$route.query.fBusinessType,
  91. fGoodsid: this.$route.query.fGoodsid,
  92. fCorpIds: this.$route.query.fCorpIds,
  93. fMarks: this.$route.query.fMarks,
  94. fMblno: this.$route.query.fMblno,
  95. }).then((response) => {
  96. this.loading = false;
  97. console.log(response);
  98. this.stockDate = response.rows;
  99. });
  100. },
  101. methods: {
  102. //跳转审批页面
  103. goPage(row) {
  104. switch (row.fBilltype) {
  105. case "入库": {
  106. this.$router.push({
  107. path: "/business/inStock",
  108. query: { id: row.fId },
  109. });
  110. break;
  111. }
  112. case "出库": {
  113. this.$router.push({
  114. path: "/business/outStock",
  115. query: { id: row.fId },
  116. });
  117. break;
  118. }
  119. case "调拨": {
  120. this.$router.push({
  121. path: "/business/stockTransfer",
  122. });
  123. break;
  124. }
  125. case "货权转移": {
  126. this.$router.push({
  127. path: "/business/stockTransfer",
  128. });
  129. break;
  130. }
  131. case "货物通关": {
  132. this.$router.push({
  133. path: "/business/cargoClearance",
  134. });
  135. break;
  136. }
  137. default: {
  138. return this.$message.error("未知错误,无状态");
  139. }
  140. }
  141. },
  142. },
  143. };
  144. </script>