index.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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. allChecked() {
  104. if (this.allCheck == true) {
  105. this.setRowList.map((e) => {
  106. return (e.checked = 0);
  107. });
  108. } else {
  109. this.setRowList.map((e) => {
  110. return (e.checked = 1);
  111. });
  112. }
  113. },
  114. //查询列数据
  115. getRow() {
  116. let that = this;
  117. this.data = {
  118. tableName: "库存总账详情",
  119. userId: Cookies.get("userName"),
  120. };
  121. select(this.data).then((res) => {
  122. if (res.data.length != 0) {
  123. this.getRowList = res.data.filter((e) => e.checked == 0);
  124. this.setRowList = res.data;
  125. this.setRowList = this.setRowList.reduce((res, item) => {
  126. res.push({
  127. surface: item.surface,
  128. label: item.label,
  129. name: item.name,
  130. checked: item.checked,
  131. width: item.width,
  132. fixed: item.fixed,
  133. });
  134. return res;
  135. }, []);
  136. }
  137. });
  138. },
  139. //重置列表
  140. delRow() {
  141. this.data = {
  142. tableName: "库存总账详情",
  143. userId: Cookies.get("userName"),
  144. };
  145. resetModule(this.data).then((res) => {
  146. if (res.code == 200) {
  147. this.showSetting = false;
  148. this.setRowList = this.tableDate;
  149. this.getRowList = this.tableDate;
  150. }
  151. });
  152. },
  153. //保存列设置
  154. save() {
  155. this.showSetting = false;
  156. this.data = {
  157. tableName: "库存总账详情",
  158. userId: Cookies.get("userName"),
  159. sysTableSetList: this.setRowList,
  160. };
  161. addSet(this.data).then((res) => {
  162. if (res.code == 200) {
  163. this.showSetting = false;
  164. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  165. }
  166. });
  167. },
  168. //开始拖拽事件
  169. onStart() {
  170. this.drag = true;
  171. },
  172. //拖拽结束事件
  173. onEnd() {
  174. this.drag = false;
  175. },
  176. //跳转审批页面
  177. goPage(row) {
  178. switch (row.fBilltype) {
  179. case "入库": {
  180. this.$router.push({
  181. path: "/business/inStock",
  182. query: { id: row.fId },
  183. });
  184. break;
  185. }
  186. case "出库": {
  187. this.$router.push({
  188. path: "/business/outStock",
  189. query: { id: row.fId },
  190. });
  191. break;
  192. }
  193. case "调拨": {
  194. this.$router.push({
  195. path: "/business/stockTransfer",
  196. });
  197. break;
  198. }
  199. case "货权转移": {
  200. this.$router.push({
  201. path: "/business/stockTransfer",
  202. });
  203. break;
  204. }
  205. case "货物通关": {
  206. this.$router.push({
  207. path: "/business/cargoClearance",
  208. });
  209. break;
  210. }
  211. default: {
  212. return this.$message.error("未知错误,无状态");
  213. }
  214. }
  215. },
  216. },
  217. };
  218. </script>