Commit 777fc64f by T

首页bug修复

parent 8609e365
<template>
<el-card class="box-card" style="height:548px">
<div slot="header" class="clearfix">
<span>出入库列表</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="showMore">查看更多</el-button>
</div>
<el-table :data="data" style="width:100%" border stripe>
<el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="warehouseName" label="仓库名称" align="center" :show-overflow-tooltip="true"/>
<el-table-column prop="actionState" label="业务类型" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.actionState == 1" type="success">采购</el-tag>
<el-tag v-else-if="scope.row.actionState == 2" type="warning">借用</el-tag>
<el-tag v-else-if="scope.row.actionState == 3" type="warning">领用</el-tag>
<el-tag v-else-if="scope.row.actionState == 4" type="warning">调拨</el-tag>
<el-tag v-else-if="scope.row.actionState == 6" type="primary">维修</el-tag>
<el-tag v-else-if="scope.row.actionState == 7" type="danger">报废</el-tag>
<el-tag v-else-if="scope.row.actionState == 13 || scope.row.actionState == 14" type="success">本仓库借用</el-tag>
<el-tag v-else-if="scope.row.actionState == 15 || scope.row.actionState == 16" type="success">跨仓库借用</el-tag>
<el-tag v-else-if="scope.row.actionState == 17 || scope.row.actionState == 18" type="success">跨仓库归还</el-tag>
<el-tag v-else-if="scope.row.actionState == 19" type="success">装备回库</el-tag>
</template>
</el-table-column>
<el-table-column prop="equipmentName" label="装备名称" align="center"/>
<el-table-column prop="sizeName" label="装备型号" align="center" :show-overflow-tooltip="true"/>
<el-table-column prop="policeName" label="操作人员" width="100" align="center" :show-overflow-tooltip="true"/>
<el-table-column prop="createTime" label="操作时间" width="160" align="center"/>
<el-table-column label="类型" fixed="right" align="center" width="80">
<template slot-scope="scope">
<el-tag v-if="scope.row.outInState == 0" type="warning">出库</el-tag>
<el-tag v-else-if="scope.row.outInState == 1" type="success">入库</el-tag>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card class="box-card" style="height: 548px">
<div slot="header" class="clearfix">
<span>出入库列表</span>
<el-button
style="float: right; padding: 3px 0"
type="text"
@click="showMore"
>查看更多</el-button
>
</div>
<el-table :data="data" style="width: 100%" border stripe>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column
prop="warehouseName"
label="仓库名称"
align="center"
:show-overflow-tooltip="true"
/>
<el-table-column prop="actionState" label="业务类型" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.actionState == 1" type="success">采购</el-tag>
<el-tag v-else-if="scope.row.actionState == 2" type="warning"
>借用</el-tag
>
<el-tag v-else-if="scope.row.actionState == 3" type="warning"
>领用</el-tag
>
<el-tag v-else-if="scope.row.actionState == 4" type="warning"
>调拨</el-tag
>
<el-tag v-else-if="scope.row.actionState == 6" type="primary"
>维修</el-tag
>
<el-tag v-else-if="scope.row.actionState == 7" type="danger"
>报废</el-tag
>
<el-tag
v-else-if="
scope.row.actionState == 13 || scope.row.actionState == 14
"
type="success"
>本仓库借用</el-tag
>
<el-tag
v-else-if="
scope.row.actionState == 15 || scope.row.actionState == 16
"
type="success"
>跨仓库借用</el-tag
>
<el-tag
v-else-if="
scope.row.actionState == 17 || scope.row.actionState == 18
"
type="success"
>跨仓库归还</el-tag
>
<el-tag v-else-if="scope.row.actionState == 19" type="success"
>装备回库</el-tag
>
</template>
</el-table-column>
<el-table-column prop="equipmentName" label="装备名称" align="center" />
<el-table-column
prop="sizeName"
label="装备型号"
align="center"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="policeName"
label="操作人员"
width="100"
align="center"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="createTime"
label="操作时间"
width="160"
align="center"
/>
<el-table-column label="类型" fixed="right" align="center" width="80">
<template slot-scope="scope">
<el-tag v-if="scope.row.outInState == 0" type="warning">出库</el-tag>
<el-tag v-else-if="scope.row.outInState == 1" type="success"
>入库</el-tag
>
</template>
</el-table-column>
</el-table>
</el-card>
</template>
<script>
import { getAllInOutTop10History } from '@/api/inventory'
import { getAllInOutTop10History } from "@/api/inventory";
export default {
data() {
return {
data: [],
orgId: this.$store.state.user.user.baseJpOrganization.id
}
orgId: this.$store.state.user.user.baseJpOrganization.id,
};
},
created() {
this.initInOutList()
this.initInOutList();
},
methods: {
initInOutList(orgId) {
this.orgId = orgId || this.$store.state.user.user.baseJpOrganization.id
getAllInOutTop10History({ orgId: this.orgId, showNumber: 7}).then(res => {
if(res.code == '10000') {
this.data = res.data
} else if (res.code === '10030') {
this.$message.error('与服务器时间不同步,请调整时间')
this.orgId = orgId || this.$store.state.user.user.baseJpOrganization.id;
getAllInOutTop10History({ orgId: this.orgId, showNumber: 7 }).then(
(res) => {
if (res.code == "10000") {
this.data = res.data;
} else if (res.code === "10030") {
this.$message.error("与服务器时间不同步,请调整时间");
} else {
this.$message.error(res.msg);
}
}
else {
this.$message.error(res.msg)
}
})
);
},
showMore () {
showMore() {
this.$router.push({
path: '/warehouse/inAndOut',
path: "/warehouse/inAndOut",
query: {
orgId: this.orgId
}
})
}
}
}
orgId: this.orgId,
},
});
},
},
};
</script>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论