123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 |
- <template>
- <div class="app-container">
- <el-table v-loading="loading" :data="stockDate">
- <el-table-column type="index" label="序号" align="center" />
- <el-table-column label="货主" align="center" prop="fcorpid" />
- <el-table-column label="提单号" align="center">
- <template slot-scope="scope">
- <div @click="goPage(scope.row)">{{ scope.row.fMblno }}</div>
- </template>
- </el-table-column>
- <el-table-column label="货物属性" align="center" prop="fBusinessType" />
- <el-table-column label="属性详情" align="center" prop="fMarks" />
- <el-table-column label="业务类型" align="center" prop="fBilltype" />
- <el-table-column label="业务日期" align="center" prop="fBsdate" />
- <el-table-column label="贸易方式" align="center" prop="fTrademodeid" />
- <el-table-column label="件数" align="center">
- <template slot-scope="scope">
- <div v-if="scope.row.fBilltype == '入库'">{{ scope.row.fQtyRK }}</div>
- <div v-if="scope.row.fBilltype == '出库'">{{ scope.row.fQtyCK }}</div>
- <div v-if="scope.row.fBilltype == '调拨'">{{ scope.row.fQtyDB }}</div>
- <div v-if="scope.row.fBilltype == '货权转移'">
- {{ scope.row.fQtyHZ }}
- </div>
- <div v-if="scope.row.fBilltype == '货物通关'">
- {{ scope.row.fQtyTG }}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="毛重" align="center">
- <template slot-scope="scope">
- <div v-if="scope.row.fBilltype == '入库'">
- {{ scope.row.fGrossweightRK }}
- </div>
- <div v-if="scope.row.fBilltype == '出库'">
- {{ scope.row.fGrossweightCK }}
- </div>
- <div v-if="scope.row.fBilltype == '调拨'">
- {{ scope.row.fGrossweightDB }}
- </div>
- <div v-if="scope.row.fBilltype == '货权转移'">
- {{ scope.row.fGrossweightHZ }}
- </div>
- <div v-if="scope.row.fBilltype == '货物通关'">
- {{ scope.row.fGrossweightTG }}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="净重" align="center">
- <template slot-scope="scope">
- <div v-if="scope.row.fBilltype == '入库'">
- {{ scope.row.fNetweightRK }}
- </div>
- <div v-if="scope.row.fBilltype == '出库'">
- {{ scope.row.fNetweightCK }}
- </div>
- <div v-if="scope.row.fBilltype == '调拨'">
- {{ scope.row.fNetweightDB }}
- </div>
- <div v-if="scope.row.fBilltype == '货权转移'">
- {{ scope.row.fNetweightHZ }}
- </div>
- <div v-if="scope.row.fBilltype == '货物通关'">
- {{ scope.row.fNetweightTG }}
- </div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </template>
- <script>
- import { detailStock } from "@/api/warehouseBusiness/warehouseInStock";
- import { listCorps } from "@/api/basicdata/corps";
- import { listWarehouse } from "@/api/basicdata/warehouse";
- import { listGoods } from "@/api/basicdata/goods";
- import { listUser, queryUserVal } from "@/api/system/user";
- export default {
- name: "Warehousebills",
- components: {},
- data() {
- return {
- stockDate: [],
- // 遮罩层
- loading: true,
- };
- },
- created() {
- detailStock({
- fWarehouseLocationid: this.$route.query.fWarehouseLocationid,
- fTrademodeids: this.$route.query.fTrademodeids,
- fBusinessType: this.$route.query.fBusinessType,
- fGoodsid: this.$route.query.fGoodsid,
- fCorpIds: this.$route.query.fCorpIds,
- fMarks: this.$route.query.fMarks,
- fMblno: this.$route.query.fMblno,
- }).then((response) => {
- this.loading = false;
- console.log(response);
- this.stockDate = response.rows;
- });
- },
- methods: {
- //列设置全选
- allChecked() {
- if (this.allCheck == true) {
- this.setRowList.map((e) => {
- return (e.checked = 0);
- });
- } else {
- this.setRowList.map((e) => {
- return (e.checked = 1);
- });
- }
- },
- //查询列数据
- getRow() {
- let that = this;
- this.data = {
- tableName: "库存总账详情",
- userId: Cookies.get("userName"),
- };
- select(this.data).then((res) => {
- if (res.data.length != 0) {
- this.getRowList = res.data.filter((e) => e.checked == 0);
- this.setRowList = res.data;
- this.setRowList = this.setRowList.reduce((res, item) => {
- res.push({
- surface: item.surface,
- label: item.label,
- name: item.name,
- checked: item.checked,
- width: item.width,
- fixed: item.fixed,
- });
- return res;
- }, []);
- }
- });
- },
- //重置列表
- delRow() {
- this.data = {
- tableName: "库存总账详情",
- userId: Cookies.get("userName"),
- };
- resetModule(this.data).then((res) => {
- if (res.code == 200) {
- this.showSetting = false;
- this.setRowList = this.tableDate;
- this.getRowList = this.tableDate;
- }
- });
- },
- //保存列设置
- save() {
- this.showSetting = false;
- this.data = {
- tableName: "库存总账详情",
- userId: Cookies.get("userName"),
- sysTableSetList: this.setRowList,
- };
- addSet(this.data).then((res) => {
- if (res.code == 200) {
- this.showSetting = false;
- this.getRowList = this.setRowList.filter((e) => e.checked == 0);
- }
- });
- },
- //开始拖拽事件
- onStart() {
- this.drag = true;
- },
- //拖拽结束事件
- onEnd() {
- this.drag = false;
- },
- //跳转审批页面
- goPage(row) {
- switch (row.fBilltype) {
- case "入库": {
- this.$router.push({
- path: "/business/inStock",
- query: { id: row.fId },
- });
- break;
- }
- case "出库": {
- this.$router.push({
- path: "/business/outStock",
- query: { id: row.fId },
- });
- break;
- }
- case "调拨": {
- this.$router.push({
- path: "/business/stockTransfer",
- });
- break;
- }
- case "货权转移": {
- this.$router.push({
- path: "/business/stockTransfer",
- });
- break;
- }
- case "货物通关": {
- this.$router.push({
- path: "/business/cargoClearance",
- });
- break;
- }
- default: {
- return this.$message.error("未知错误,无状态");
- }
- }
- },
- },
- };
- </script>
|