Commit 777fc64f by T

首页bug修复

parent 8609e365
<template> <template>
<el-card class="box-card" style="height:548px"> <el-card class="box-card" style="height: 548px">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>出入库列表</span> <span>出入库列表</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="showMore">查看更多</el-button> <el-button
</div> style="float: right; padding: 3px 0"
<el-table :data="data" style="width:100%" border stripe> type="text"
<el-table-column type="index" label="序号" width="50" align="center"/> @click="showMore"
<el-table-column prop="warehouseName" label="仓库名称" align="center" :show-overflow-tooltip="true"/> >查看更多</el-button
<el-table-column prop="actionState" label="业务类型" align="center"> >
<template slot-scope="scope"> </div>
<el-tag v-if="scope.row.actionState == 1" type="success">采购</el-tag> <el-table :data="data" style="width: 100%" border stripe>
<el-tag v-else-if="scope.row.actionState == 2" type="warning">借用</el-tag> <el-table-column type="index" label="序号" width="50" align="center" />
<el-tag v-else-if="scope.row.actionState == 3" type="warning">领用</el-tag> <el-table-column
<el-tag v-else-if="scope.row.actionState == 4" type="warning">调拨</el-tag> prop="warehouseName"
<el-tag v-else-if="scope.row.actionState == 6" type="primary">维修</el-tag> label="仓库名称"
<el-tag v-else-if="scope.row.actionState == 7" type="danger">报废</el-tag> align="center"
<el-tag v-else-if="scope.row.actionState == 13 || scope.row.actionState == 14" type="success">本仓库借用</el-tag> :show-overflow-tooltip="true"
<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-table-column prop="actionState" label="业务类型" align="center">
<el-tag v-else-if="scope.row.actionState == 19" type="success">装备回库</el-tag> <template slot-scope="scope">
</template> <el-tag v-if="scope.row.actionState == 1" type="success">采购</el-tag>
</el-table-column> <el-tag v-else-if="scope.row.actionState == 2" type="warning"
<el-table-column prop="equipmentName" label="装备名称" align="center"/> >借用</el-tag
<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-tag v-else-if="scope.row.actionState == 3" type="warning"
<el-table-column prop="createTime" label="操作时间" width="160" align="center"/> >领用</el-tag
<el-table-column label="类型" fixed="right" align="center" width="80"> >
<template slot-scope="scope"> <el-tag v-else-if="scope.row.actionState == 4" type="warning"
<el-tag v-if="scope.row.outInState == 0" type="warning">出库</el-tag> >调拨</el-tag
<el-tag v-else-if="scope.row.outInState == 1" type="success">入库</el-tag> >
</template> <el-tag v-else-if="scope.row.actionState == 6" type="primary"
</el-table-column> >维修</el-tag
</el-table> >
</el-card> <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> </template>
<script> <script>
import { getAllInOutTop10History } from '@/api/inventory' import { getAllInOutTop10History } from "@/api/inventory";
export default { export default {
data() { data() {
return { return {
data: [], data: [],
orgId: this.$store.state.user.user.baseJpOrganization.id orgId: this.$store.state.user.user.baseJpOrganization.id,
} };
}, },
created() { created() {
this.initInOutList() this.initInOutList();
}, },
methods: { methods: {
initInOutList(orgId) { initInOutList(orgId) {
this.orgId = orgId || this.$store.state.user.user.baseJpOrganization.id this.orgId = orgId || this.$store.state.user.user.baseJpOrganization.id;
getAllInOutTop10History({ orgId: this.orgId, showNumber: 7}).then(res => { getAllInOutTop10History({ orgId: this.orgId, showNumber: 7 }).then(
if(res.code == '10000') { (res) => {
this.data = res.data if (res.code == "10000") {
} else if (res.code === '10030') { this.data = res.data;
this.$message.error('与服务器时间不同步,请调整时间') } 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({ this.$router.push({
path: '/warehouse/inAndOut', path: "/warehouse/inAndOut",
query: { query: {
orgId: this.orgId orgId: this.orgId,
} },
}) });
} },
} },
} };
</script> </script>
<template> <template>
<div> <div>
<el-card class="box-card" style="height:325px"> <el-card class="box-card" style="height: 325px">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>我的任务</span> <span>我的任务</span>
</div> </div>
<el-tabs v-model="activeName" class="InOutOrder" style="margin-top: -25px;" @tab-click="handleClick">
<el-tab-pane label="入库单" name="入库单" >
<el-table :data="data" style="width:100%" @filter-change="filterChangedInOrder" border stripe>
<el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="orderNo" label="订单号" align="center" width="210" :show-overflow-tooltip="true"/>
<el-table-column prop="warehouseName" label="仓库名称" align="center" :show-overflow-tooltip="true"/>
<!-- <el-table-column prop="flowName" label="业务流程" width="160" align="center"/> -->
<el-table-column
prop="flowName"
label="业务流程"
width="160"
column-key="flowName"
:filters="[{ text: '采购入库', value: '采购流程' },{ text: '调拨入库', value: '调拨申请流程' }]"
filter-placement="bottom-end"
align="center"/>
<el-table-column prop="updateTime" sortable label="更新时间" width="160" align="center"/>
<el-table-column label="操作" width="180" align="center" >
<template slot-scope="scope">
<el-button size="mini" type="warning" @click="approval(scope.row)">审批</el-button>
<el-button size="mini" type="primary" @click="show(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination :total="total" :current-page="page + 1" style="margin-top: 8px;" layout="total, prev, pager, next"
:page-size="2" @current-change="postPageChange"/>
</el-tab-pane>
<el-tab-pane label="出库单" name="出库单" > <el-tabs
<el-table :data="data" style="width:100%" @filter-change="filterChangedOutOrder" border stripe> v-model="activeName"
<el-table-column type="index" label="序号" width="50" align="center"/> class="InOutOrder"
<el-table-column prop="orderNo" label="订单号" align="center" width="210" :show-overflow-tooltip="true"/> style="margin-top: -25px"
<el-table-column prop="warehouseName" label="仓库名称" align="center" :show-overflow-tooltip="true"/> @tab-click="handleClick"
<!-- <el-table-column prop="flowName" label="业务流程" width="160" align="center"/> --> >
<el-table-column <el-tab-pane label="入库单" name="入库单">
prop="flowName" <el-table
label="业务流程" :data="data"
width="160" style="width: 100%"
column-key="flowName" @filter-change="filterChangedInOrder"
:filters="[{ text: '借用出库', value: '本库借用流程' }, { text: '调拨出库', value: '调拨下发流程' }, { text: '维修出库', value: '维修流程' }, { text: '报废出库', value: '报废流程' }]" border
filter-placement="bottom-end" stripe
align="center"/> >
<el-table-column
type="index"
label="序号"
width="50"
align="center"
/>
<el-table-column
prop="orderNo"
label="订单号"
align="center"
width="210"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="warehouseName"
label="仓库名称"
align="center"
:show-overflow-tooltip="true"
/>
<!-- <el-table-column prop="flowName" label="业务流程" width="160" align="center"/> -->
<el-table-column
prop="flowName"
label="业务流程"
width="160"
column-key="flowName"
:filters="[
{ text: '采购入库', value: '采购流程' },
{ text: '调拨入库', value: '调拨申请流程' },
]"
filter-placement="bottom-end"
align="center"
/>
<el-table-column prop="updateTime" sortable label="更新时间" width="160" align="center"/> <el-table-column
<el-table-column label="操作" width="180" align="center" > prop="updateTime"
<template slot-scope="scope"> sortable
<el-button size="mini" type="warning" @click="approval(scope.row)">审批</el-button> label="更新时间"
<el-button size="mini" type="primary" @click="show(scope.row)">查看</el-button> width="160"
</template> align="center"
/>
</el-table-column> <el-table-column label="操作" width="180" align="center">
</el-table> <template slot-scope="scope">
<el-pagination :total="total" :current-page="page + 1" style="margin-top: 8px;" layout="total, prev, pager, next" <el-button
:page-size="2" @current-change="postPageChange"/> size="mini"
</el-tab-pane> type="warning"
@click="approval(scope.row)"
</el-tabs> >审批</el-button
<!-- <el-table :data="data" style="width:100%" border stripe> >
<el-button size="mini" type="primary" @click="show(scope.row)"
>查看</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
:total="total"
:current-page="page + 1"
style="margin-top: 8px"
layout="total, prev, pager, next"
:page-size="2"
@current-change="postPageChange"
/>
</el-tab-pane>
<el-tab-pane label="出库单" name="出库单">
<el-table
:data="data"
style="width: 100%"
@filter-change="filterChangedOutOrder"
border
stripe
>
<el-table-column
type="index"
label="序号"
width="50"
align="center"
/>
<el-table-column
prop="orderNo"
label="订单号"
align="center"
width="210"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="warehouseName"
label="仓库名称"
align="center"
:show-overflow-tooltip="true"
/>
<!-- <el-table-column prop="flowName" label="业务流程" width="160" align="center"/> -->
<el-table-column
prop="flowName"
label="业务流程"
width="160"
column-key="flowName"
:filters="[
{ text: '借用出库', value: '本库借用流程' },
{ text: '调拨出库', value: '调拨下发流程' },
{ text: '维修出库', value: '维修流程' },
{ text: '报废出库', value: '报废流程' },
]"
filter-placement="bottom-end"
align="center"
/>
<el-table-column
prop="updateTime"
sortable
label="更新时间"
width="160"
align="center"
/>
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="warning"
@click="approval(scope.row)"
>审批</el-button
>
<el-button size="mini" type="primary" @click="show(scope.row)"
>查看</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
:total="total"
:current-page="page + 1"
style="margin-top: 8px"
layout="total, prev, pager, next"
:page-size="2"
@current-change="postPageChange"
/>
</el-tab-pane>
</el-tabs>
<!-- <el-table :data="data" style="width:100%" border stripe>
<el-table-column type="index" label="序号" width="50" align="center"/> <el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="orderNo" label="订单号" align="center" width="210" :show-overflow-tooltip="true"/> <el-table-column prop="orderNo" label="订单号" align="center" width="210" :show-overflow-tooltip="true"/>
<el-table-column prop="warehouseName" label="仓库名称" align="center" :show-overflow-tooltip="true"/> <el-table-column prop="warehouseName" label="仓库名称" align="center" :show-overflow-tooltip="true"/>
...@@ -80,56 +172,52 @@ ...@@ -80,56 +172,52 @@
</el-table> </el-table>
<el-pagination :total="total" :current-page="page + 1" style="margin-top: 8px;" layout="total, prev, pager, next" <el-pagination :total="total" :current-page="page + 1" style="margin-top: 8px;" layout="total, prev, pager, next"
:page-size="3" @current-change="postPageChange"/> --> :page-size="3" @current-change="postPageChange"/> -->
</el-card> </el-card>
<purse-detail ref="purchase" />
<rm-detail ref="repair" />
<scrap-detail ref="scrap" />
<borrow-detail ref="borrowMy" />
<!-- <borrow-other-detail ref="borrowOther" /> -->
<transfer-detail ref="allocationDown" />
<transfer-detail ref="allocationUp" />
<!-- <return-other-detail ref="returnOther" /> -->
<inventoryReturn-detail ref="inventoryReturn" />
<purse-detail ref="purchase" />
<rm-detail ref="repair" />
<scrap-detail ref="scrap" />
<borrow-detail ref="borrowMy" />
<!-- <borrow-other-detail ref="borrowOther" /> -->
<transfer-detail ref="allocationDown" />
<transfer-detail ref="allocationUp" />
<!-- <return-other-detail ref="returnOther" /> -->
<inventoryReturn-detail ref="inventoryReturn" />
<purse-approval ref="approvalpurchase" @ok="initTask"/> <purse-approval ref="approvalpurchase" @ok="initTask" />
<rm-approval ref="approvalrepair" @ok="initTask"/> <rm-approval ref="approvalrepair" @ok="initTask" />
<scrap-approval ref="approvalscrap" @ok="initTask"/> <scrap-approval ref="approvalscrap" @ok="initTask" />
<borrow-approval ref="approvalborrowMy" @ok="initTask"/> <borrow-approval ref="approvalborrowMy" @ok="initTask" />
<!-- <borrow-other-approval ref="approvalborrowOther" @ok="initTask"/> --> <!-- <borrow-other-approval ref="approvalborrowOther" @ok="initTask"/> -->
<transfer-approval ref="approvalallocationDown" @ok="initTask"/> <transfer-approval ref="approvalallocationDown" @ok="initTask" />
<transfer-approval ref="approvalallocationUp" @ok="initTask"/> <transfer-approval ref="approvalallocationUp" @ok="initTask" />
<!-- <return-other-approval ref="approvalreturnOther" @ok="initTask"/> --> <!-- <return-other-approval ref="approvalreturnOther" @ok="initTask"/> -->
<inventoryReturn-approval ref="approvalallinventoryReturn" @ok="initTask"/> <inventoryReturn-approval ref="approvalallinventoryReturn" @ok="initTask" />
</div>
</div>
</template> </template>
<script> <script>
import { initPdata } from '@/api/data' import { initPdata } from "@/api/data";
import md5 from 'js-md5' import md5 from "js-md5";
// import { getPageAllOrderList } from '@/api/process' // import { getPageAllOrderList } from '@/api/process'
import { getPageAllOrderListHZ } from '@/api/process' import { getPageAllOrderListHZ } from "@/api/process";
import BorrowDetail from '@/views/warehouse/borrow/list/form' import BorrowDetail from "@/views/warehouse/borrow/list/form";
import BorrowOtherDetail from '@/views/warehouse/borrowOther/list/form' import BorrowOtherDetail from "@/views/warehouse/borrowOther/list/form";
import TransferDetail from '@/views/warehouse/transfer/list/form' import TransferDetail from "@/views/warehouse/transfer/list/form";
import RmDetail from '@/views/rms/rm/rmList/form' import RmDetail from "@/views/rms/rm/rmList/form";
import ScrapDetail from '@/views/rms/scrap/scrapList/form' import ScrapDetail from "@/views/rms/scrap/scrapList/form";
import PurseDetail from '@/views/purse/list/form' import PurseDetail from "@/views/purse/list/form";
import ReturnOtherDetail from '@/views/warehouse/returnOther/list/form' import ReturnOtherDetail from "@/views/warehouse/returnOther/list/form";
import InventoryReturnDetail from '@/views/warehouse/inventoryReturn/list/form' import InventoryReturnDetail from "@/views/warehouse/inventoryReturn/list/form";
import BorrowApproval from '@/views/warehouse/borrow/approval/form' import BorrowApproval from "@/views/warehouse/borrow/approval/form";
import BorrowOtherApproval from '@/views/warehouse/borrowOther/approval/form' import BorrowOtherApproval from "@/views/warehouse/borrowOther/approval/form";
import TransferApproval from '@/views/warehouse/transfer/tranApproval/form' import TransferApproval from "@/views/warehouse/transfer/tranApproval/form";
import RmApproval from '@/views/rms/rm/rmApproval/form' import RmApproval from "@/views/rms/rm/rmApproval/form";
import ScrapApproval from '@/views/rms/scrap/scrapApproval/form' import ScrapApproval from "@/views/rms/scrap/scrapApproval/form";
import PurseApproval from '@/views/purse/approval/form' import PurseApproval from "@/views/purse/approval/form";
import ReturnOtherApproval from '@/views/warehouse/returnOther/approval/form' import ReturnOtherApproval from "@/views/warehouse/returnOther/approval/form";
import InventoryReturnApproval from '@/views/warehouse/inventoryReturn/approval/form' import InventoryReturnApproval from "@/views/warehouse/inventoryReturn/approval/form";
export default { export default {
data() { data() {
...@@ -150,31 +238,48 @@ export default { ...@@ -150,31 +238,48 @@ export default {
// "borrowOther": '/api/Transfer/GetByID', // "borrowOther": '/api/Transfer/GetByID',
// "returnOther": '/api/Transfer/GetByID', // "returnOther": '/api/Transfer/GetByID',
// } // }
activeName: '入库单', activeName: "入库单",
data: [], data: [],
orgId: this.$store.state.user.user.baseJpOrganization.id, orgId: this.$store.state.user.user.baseJpOrganization.id,
userId: this.$store.state.user.user.id, userId: this.$store.state.user.user.id,
roleIds: this.$store.state.user.user.roleIds, roleIds: this.$store.state.user.user.roleIds,
page: 0, size: 2, total: 0, page: 0,
size: 2,
total: 0,
type: this.activeName, type: this.activeName,
orderType: this.flowName, orderType: this.flowName,
processUrl: { processUrl: {
"purchase": '/api/PuchaseOrder/GetByID', purchase: "/api/PuchaseOrder/GetByID",
"borrowMy": '/api/Borrow/GetByID', borrowMy: "/api/Borrow/GetByID",
"repair": '/api/FixReceiveApply/GetByID', repair: "/api/FixReceiveApply/GetByID",
"scrap": '/api/FixReceiveApply/GetByID', scrap: "/api/FixReceiveApply/GetByID",
"allocationUp": '/api/Transfer/GetByID', allocationUp: "/api/Transfer/GetByID",
"allocationDown": '/api/Transfer/GetByID', allocationDown: "/api/Transfer/GetByID",
"inventoryReturn":'/api/InventoryReturn/GetByID' inventoryReturn: "/api/InventoryReturn/GetByID",
} },
} };
}, },
components: {BorrowDetail, BorrowOtherDetail, TransferDetail, PurseDetail, RmDetail, ScrapDetail,ReturnOtherDetail,InventoryReturnDetail, components: {
BorrowApproval, BorrowOtherApproval, TransferApproval, PurseApproval, RmApproval, ScrapApproval,ReturnOtherApproval,InventoryReturnApproval BorrowDetail,
BorrowOtherDetail,
TransferDetail,
PurseDetail,
RmDetail,
ScrapDetail,
ReturnOtherDetail,
InventoryReturnDetail,
BorrowApproval,
BorrowOtherApproval,
TransferApproval,
PurseApproval,
RmApproval,
ScrapApproval,
ReturnOtherApproval,
InventoryReturnApproval,
}, },
created() { created() {
this.initTask() this.initTask();
}, },
methods: { methods: {
initTask() { initTask() {
...@@ -190,136 +295,166 @@ export default { ...@@ -190,136 +295,166 @@ export default {
// this.$message.error(res.msg) // this.$message.error(res.msg)
// } // }
// }) // })
getPageAllOrderListHZ({page: this.page, size: this.size, orgId: this.orgId
,userId: this.userId, roleIds: this.roleIds, type: this.activeName, orderType: this.flowName}).then(res => { getPageAllOrderListHZ({
if(res.code == '10000'){ page: this.page,
this.data = res.data.content size: this.size,
this.total = res.data.totalElements orgId: this.orgId,
} else if (res.code === '10030') { userId: this.userId,
this.$message.error('与服务器时间不同步,请调整时间') roleIds: this.roleIds,
} type: this.activeName,
else { orderType: this.flowName,
this.$message.error(res.msg) }).then((res) => {
if (res.code == "10000") {
this.data = res.data.content;
this.total = res.data.totalElements;
} else if (res.code === "10030") {
this.$message.error("与服务器时间不同步,请调整时间");
} else {
this.$message.error(res.msg);
} }
}) });
}, },
handleClick() { handleClick() {
this.flowName = "";
this.flowName=''; this.initTask();
this.initTask() },
},
// 单据筛选 // 单据筛选
//入库单 //入库单
filterChangedInOrder(filterCondition) { filterChangedInOrder(filterCondition) {
//filterCondition是一个对象,其key值为通过在el-table-column中设置的column-key属性,标志哪一个列的过滤条件,可用于区分哪一个列的筛选条件发生了改变。
//filterCondition是一个对象,其key值为通过在el-table-column中设置的column-key属性,标志哪一个列的过滤条件,可用于区分哪一个列的筛选条件发生了改变。 //filterChanged函数和filter-method属性一般而言使用一个,前者可自定义筛选条件,如需要重新查库,则比较适用,filter-method为el-table-column的属性函数,
//filterChanged函数和filter-method属性一般而言使用一个,前者可自定义筛选条件,如需要重新查库,则比较适用,filter-method为el-table-column的属性函数, //其绑定的函数内部逻辑为:遍历表格绑定的数据,匹配表格每一行是否满足筛选条件,然后返回,所以上述示例中的filterTag、filterChanged函数其实会重复执行,不可在其内部调用后端接口,否则会发生调用死循环。
//其绑定的函数内部逻辑为:遍历表格绑定的数据,匹配表格每一行是否满足筛选条件,然后返回,所以上述示例中的filterTag、filterChanged函数其实会重复执行,不可在其内部调用后端接口,否则会发生调用死循环。 if (filterCondition.flowName) {
if (filterCondition.flowName) {
//修改查询条件 //修改查询条件
var str = '' var str = "";
filterCondition.flowName.forEach(element => { filterCondition.flowName.forEach((element) => {
str = element + ',' + str str = element + "," + str;
}) });
this.flowName =str.slice(0,str.length -1 ) this.flowName = str.slice(0, str.length - 1);
//发送http请求,查找新数据 //发送http请求,查找新数据
this.initTask() this.page=0;
} this.size=2;
this.initTask();
}
}, },
//出库单 //出库单
filterChangedOutOrder(filterCondition) { filterChangedOutOrder(filterCondition) {
// console.log(filterConditionOutOrder) // console.log(filterConditionOutOrder)
//filterCondition是一个对象,其key值为通过在el-table-column中设置的column-key属性,标志哪一个列的过滤条件,可用于区分哪一个列的筛选条件发生了改变。 //filterCondition是一个对象,其key值为通过在el-table-column中设置的column-key属性,标志哪一个列的过滤条件,可用于区分哪一个列的筛选条件发生了改变。
//filterChanged函数和filter-method属性一般而言使用一个,前者可自定义筛选条件,如需要重新查库,则比较适用,filter-method为el-table-column的属性函数, //filterChanged函数和filter-method属性一般而言使用一个,前者可自定义筛选条件,如需要重新查库,则比较适用,filter-method为el-table-column的属性函数,
//其绑定的函数内部逻辑为:遍历表格绑定的数据,匹配表格每一行是否满足筛选条件,然后返回,所以上述示例中的filterTag、filterChanged函数其实会重复执行,不可在其内部调用后端接口,否则会发生调用死循环。 //其绑定的函数内部逻辑为:遍历表格绑定的数据,匹配表格每一行是否满足筛选条件,然后返回,所以上述示例中的filterTag、filterChanged函数其实会重复执行,不可在其内部调用后端接口,否则会发生调用死循环。
if (filterCondition.flowName) { if (filterCondition.flowName) {
//修改查询条件 //修改查询条件
var str = '' var str = "";
filterCondition.flowName.forEach(element => { filterCondition.flowName.forEach((element) => {
str = element + ',' + str str = element + "," + str;
}) });
this.flowName =str.slice(0,str.length -1 ) this.flowName = str.slice(0, str.length - 1);
//发送http请求,查找新数据 //发送http请求,查找新数据
this.initTask() this.page=0;
} this.size=2;
this.initTask();
}
}, },
//切换页 //切换页
postPageChange(e) { postPageChange(e) {
this.page = e - 1 this.page = e - 1;
this.initTask() this.initTask();
}, },
show(data) { show(data) {
const _this = this.$refs[data.flowType] const _this = this.$refs[data.flowType];
var params = {id: data.orderId} var params = { id: data.orderId };
if (data.flowType == 'allocationUp' || data.flowType == 'allocationDown') { params.type = '调拨' } if (
data.flowType == "allocationUp" ||
data.flowType == "allocationDown"
) {
params.type = "调拨";
}
// if (data.flowType == 'borrowOther') { params.type = '跨库借用' } // if (data.flowType == 'borrowOther') { params.type = '跨库借用' }
// if (data.flowType == 'returnOther') { params.type = '跨库归还' } // if (data.flowType == 'returnOther') { params.type = '跨库归还' }
var fsdata = { var fsdata = {
appKey: 'odykzzWm1GASj15K1AGxwQ==', appKey: "odykzzWm1GASj15K1AGxwQ==",
orgId: '', orgId: "",
version: '1.0', version: "1.0",
timestamp: parseInt(new Date().getTime()/1000), timestamp: parseInt(new Date().getTime() / 1000),
body: escape(JSON.stringify(params)), body: escape(JSON.stringify(params)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(params))) sign: md5(
} "a1dca4cf35a6d460128f5e4ad401b1c1" +
initPdata( window._CONFIG['serviceURL'] + this.processUrl[data.flowType], fsdata).then(res => { parseInt(new Date().getTime() / 1000) +
if(res.code == '10000') { "1.0" +
_this.form = res.data escape(JSON.stringify(params))
_this.getSteps(res.data.flowType, res.data.orgId) ),
} };
else { initPdata(
this.$message.error(res.msg) window._CONFIG["serviceURL"] + this.processUrl[data.flowType],
fsdata
).then((res) => {
if (res.code == "10000") {
_this.form = res.data;
_this.getSteps(res.data.flowType, res.data.orgId);
} else {
this.$message.error(res.msg);
} }
}) });
_this.dialog = true _this.dialog = true;
}, },
approval(data) { approval(data) {
const _this = this.$refs['approval'+ data.flowType] const _this = this.$refs["approval" + data.flowType];
var params = {id: data.orderId} var params = { id: data.orderId };
if (data.flowType == 'allocationUp' || data.flowType == 'allocationDown') { params.type = '调拨' } if (
data.flowType == "allocationUp" ||
data.flowType == "allocationDown"
) {
params.type = "调拨";
}
// if (data.flowType == 'borrowOther') { params.type = '跨库借用' } // if (data.flowType == 'borrowOther') { params.type = '跨库借用' }
// if (data.flowType == 'returnOther') { params.type = '跨库归还' } // if (data.flowType == 'returnOther') { params.type = '跨库归还' }
var fsdata = { var fsdata = {
appKey: 'odykzzWm1GASj15K1AGxwQ==', appKey: "odykzzWm1GASj15K1AGxwQ==",
orgId: '', orgId: "",
version: '1.0', version: "1.0",
timestamp: parseInt(new Date().getTime()/1000), timestamp: parseInt(new Date().getTime() / 1000),
body: escape(JSON.stringify(params)), body: escape(JSON.stringify(params)),
sign: md5('a1dca4cf35a6d460128f5e4ad401b1c1'+parseInt(new Date().getTime()/1000)+'1.0'+escape(JSON.stringify(params))) sign: md5(
} "a1dca4cf35a6d460128f5e4ad401b1c1" +
initPdata( window._CONFIG['serviceURL'] + this.processUrl[data.flowType], fsdata).then(res => { parseInt(new Date().getTime() / 1000) +
if(res.code == '10000') { "1.0" +
_this.eForm = res.data escape(JSON.stringify(params))
_this.form = res.data ),
_this.getSteps(res.data.flowType, res.data.orgId) };
initPdata(
window._CONFIG["serviceURL"] + this.processUrl[data.flowType],
fsdata
).then((res) => {
if (res.code == "10000") {
_this.eForm = res.data;
_this.form = res.data;
_this.getSteps(res.data.flowType, res.data.orgId);
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg);
} }
}) });
_this.dialog = true _this.dialog = true;
}, },
initPost() { initPost() {
this.initTask() this.initTask();
} },
} },
} };
</script> </script>
<style lang="less" > <style lang="less" >
.el-table__column-filter-trigger i { .el-table__column-filter-trigger i {
color: #fff; color: #fff;
font-size: 14px; font-size: 14px;
-webkit-transform: scale(0.75); -webkit-transform: scale(0.75);
transform: scale(0.75); transform: scale(0.75);
font-weight: 700; font-weight: 700;
background: #1890ff; background: #1890ff;
} }
</style> </style>
\ No newline at end of file
<template> <template>
<el-row :gutter="15" class="panel-group"> <el-row :gutter="15" class="panel-group">
<el-col :xs="12" :sm="12" :lg="{span: '3-4'}" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="{ span: '3-4' }" class="card-panel-col">
<div class="card-panel" @click="nextpage('装备总数')"> <div class="card-panel" @click="nextpage('装备总数')">
<div class="card-panel-icon-wrapper icon-people"> <div class="card-panel-icon-wrapper icon-people">
<svg-icon icon-class="total" class-name="card-panel-icon" /> <svg-icon icon-class="total" class-name="card-panel-icon" />
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text">装备总数</div> <div class="card-panel-text">装备总数</div>
<count-to :start-val="0" :end-val="count.zkTopCount" :duration="2600" class="card-panel-num"/> <count-to
:start-val="0"
:end-val="count.zkTopCount"
:duration="2600"
class="card-panel-num"
/>
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :xs="12" :sm="12" :lg="{span: '3-4'}" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="{ span: '3-4' }" class="card-panel-col">
<div class="card-panel" @click="nextpage('在库数量')"> <div class="card-panel" @click="nextpage('在库数量')">
<div class="card-panel-icon-wrapper icon-money"> <div class="card-panel-icon-wrapper icon-money">
<svg-icon icon-class="zaiku" class-name="card-panel-icon" /> <svg-icon icon-class="zaiku" class-name="card-panel-icon" />
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text">在库数量</div> <div class="card-panel-text">在库数量</div>
<count-to :start-val="0" :end-val="count.zkCount" :duration="2600" class="card-panel-num"/> <count-to
:start-val="0"
:end-val="count.zkCount"
:duration="2600"
class="card-panel-num"
/>
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :xs="12" :sm="12" :lg="{span: '3-4'}" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="{ span: '3-4' }" class="card-panel-col">
<div class="card-panel" @click="nextpage('调拨数量')"> <div class="card-panel" @click="nextpage('调拨数量')">
<div class="card-panel-icon-wrapper icon-message"> <div class="card-panel-icon-wrapper icon-message">
<svg-icon icon-class="available" class-name="card-panel-icon" /> <svg-icon icon-class="available" class-name="card-panel-icon" />
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text">调拨中</div> <div class="card-panel-text">调拨中</div>
<count-to :start-val="0" :end-val="count.houseCount" :duration="2600" class="card-panel-num"/> <count-to
:start-val="0"
:end-val="count.houseCount"
:duration="2600"
class="card-panel-num"
/>
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :xs="12" :sm="12" :lg="{span: '3-4'}" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="{ span: '3-4' }" class="card-panel-col">
<div class="card-panel" @click="nextpage('领用数量')"> <div class="card-panel" @click="nextpage('领用数量')">
<div class="card-panel-icon-wrapper icon-shopping"> <div class="card-panel-icon-wrapper icon-shopping">
<svg-icon icon-class="collecting" class-name="card-panel-icon" /> <svg-icon icon-class="collecting" class-name="card-panel-icon" />
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text">使用中</div> <div class="card-panel-text">使用中</div>
<count-to :start-val="0" :end-val="count.lyCount" :duration="2600" class="card-panel-num"/> <count-to
:start-val="0"
:end-val="count.lyCount"
:duration="2600"
class="card-panel-num"
/>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -57,14 +77,19 @@ ...@@ -57,14 +77,19 @@
</div> </div>
</el-col> --> </el-col> -->
<el-col :xs="12" :sm="12" :lg="{span: '3-4'}" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="{ span: '3-4' }" class="card-panel-col">
<div class="card-panel" @click="nextpage('即将报废数量')"> <div class="card-panel" @click="nextpage('即将报废数量')">
<div class="card-panel-icon-wrapper icon-people"> <div class="card-panel-icon-wrapper icon-people">
<svg-icon icon-class="30天" class-name="card-panel-icon1"/> <svg-icon icon-class="30天" class-name="card-panel-icon1" />
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text">临近报废</div> <div class="card-panel-text">临近报废</div>
<count-to :start-val="0" :end-val="count.jjbfCount" :duration="2600" class="card-panel-num"/> <count-to
:start-val="0"
:end-val="count.jjbfCount"
:duration="2600"
class="card-panel-num"
/>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -79,25 +104,35 @@ ...@@ -79,25 +104,35 @@
</div> </div>
</div> </div>
</el-col> --> </el-col> -->
<el-col :xs="12" :sm="12" :lg="{span: '3-4'}" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="{ span: '3-4' }" class="card-panel-col">
<div class="card-panel" > <div class="card-panel">
<div class="card-panel-icon-wrapper icon-money"> <div class="card-panel-icon-wrapper icon-money">
<svg-icon icon-class="zcku" class-name="card-panel-icon" /> <svg-icon icon-class="zcku" class-name="card-panel-icon" />
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text">今年出库数</div> <div class="card-panel-text">今年出库数</div>
<count-to :start-val="0" :end-val="count.jncksCount" :duration="2600" class="card-panel-num"/> <count-to
:start-val="0"
:end-val="count.jncksCount"
:duration="2600"
class="card-panel-num"
/>
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :xs="12" :sm="12" :lg="{span: '3-4'}" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="{ span: '3-4' }" class="card-panel-col">
<div class="card-panel" > <div class="card-panel">
<div class="card-panel-icon-wrapper icon-people"> <div class="card-panel-icon-wrapper icon-people">
<svg-icon icon-class="garbage" class-name="card-panel-icon" /> <svg-icon icon-class="garbage" class-name="card-panel-icon" />
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text">今年报废数</div> <div class="card-panel-text">今年报废数</div>
<count-to :start-val="0" :end-val="count.jnbfsCount" :duration="2600" class="card-panel-num"/> <count-to
:start-val="0"
:end-val="count.jnbfsCount"
:duration="2600"
class="card-panel-num"
/>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -105,43 +140,56 @@ ...@@ -105,43 +140,56 @@
</template> </template>
<script> <script>
import CountTo from 'vue-count-to' import CountTo from "vue-count-to";
// import { getCountOrg, getCount } from '@/api/view' // import { getCountOrg, getCount } from '@/api/view'
import { getCountOrgHZ, getCount } from '@/api/view' import { getCountOrgHZ, getCount } from "@/api/view";
export default { export default {
components: { components: {
CountTo CountTo,
}, },
data() { data() {
return { return {
count: { zkTopCount: 0, zkCount: 0, bfCount: 0, lyCount: 0, wxCount:0, useCount: 0, houseCount: 0, jjbfCount: 0, jncksCount: 0, jnbfsCount: 0}, count: {
zkTopCount: 0,
zkCount: 0,
bfCount: 0,
lyCount: 0,
wxCount: 0,
useCount: 0,
houseCount: 0,
jjbfCount: 0,
jncksCount: 0,
jnbfsCount: 0,
},
orgId: this.$store.state.user.user.baseJpOrganization.id, orgId: this.$store.state.user.user.baseJpOrganization.id,
findCode: this.$store.state.user.user.baseJpOrganization.findCode findCode: this.$store.state.user.user.baseJpOrganization.findCode,
} };
}, },
mounted() { mounted() {
this.initCountOrg() this.initCountOrg();
}, },
methods: { methods: {
initCountOrg(orgId) { initCountOrg(orgId) {
this.orgId = orgId || this.$store.state.user.user.baseJpOrganization.id this.orgId = orgId || this.$store.state.user.user.baseJpOrganization.id;
if (this.orgId == 'A35F3DB1-80A1-45ED-A458-B7DEA193682G') { // 判断是不是浙江省,如果是浙江省获取的是本级及以下的 if (this.orgId == "A35F3DB1-80A1-45ED-A458-B7DEA193682G") {
getCount({findCode: this.findCode}).then(res => { // 判断是不是浙江省,如果是浙江省获取的是本级及以下的
if (res.code === '10000') { getCount({ findCode: this.findCode }).then((res) => {
this.count.zkTopCount = res.data.zkTopCount if (res.code === "10000") {
this.count.zkCount = res.data.zkCount this.count.zkTopCount = res.data.zkTopCount;
this.count.bfCount = res.data.bfCount this.count.zkCount = res.data.zkCount;
this.count.lyCount = res.data.lyCount this.count.bfCount = res.data.bfCount;
this.count.wxCount = res.data.wxCount this.count.lyCount = res.data.lyCount;
this.count.useCount = res.data.zkTopCount - res.data.wxCount - res.data.bfCount this.count.wxCount = res.data.wxCount;
this.count.houseCount = res.data.houseCount // 调拨 this.count.useCount =
this.count.jjbfCount = res.data.jjbfCount res.data.zkTopCount - res.data.wxCount - res.data.bfCount;
this.count.houseCount = res.data.houseCount; // 调拨
this.count.jjbfCount = res.data.jjbfCount;
// this.count.jncksCount = res.data.jncksCount // this.count.jncksCount = res.data.jncksCount
// this.count.jnbsfCountbfCount = res.data.jnbsfCount // this.count.jnbsfCountbfCount = res.data.jnbsfCount
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg);
} }
}) });
} else { } else {
// getCountOrg({orgId: this.orgId}).then(res => { // getCountOrg({orgId: this.orgId}).then(res => {
// if (res.code === '10000') { // if (res.code === '10000') {
...@@ -158,46 +206,47 @@ export default { ...@@ -158,46 +206,47 @@ export default {
// this.$message.error(res.msg) // this.$message.error(res.msg)
// } // }
// }) // })
getCountOrgHZ({orgId: this.orgId}).then(res => { getCountOrgHZ({ orgId: this.orgId }).then((res) => {
if (res.code === '10000') { if (res.code === "10000") {
this.count.zkTopCount = res.data.zkTopCount this.count.zkTopCount = res.data.zkTopCount;
this.count.zkCount = res.data.zkCount this.count.zkCount = res.data.zkCount;
this.count.lyCount = res.data.lyCount this.count.lyCount = res.data.lyCount;
this.count.useCount = res.data.zkTopCount - res.data.wxCount -res.data.bfCount this.count.useCount =
this.count.houseCount = res.data.houseCount // 调拨 res.data.zkTopCount - res.data.wxCount - res.data.bfCount;
this.count.jjbfCount = res.data.jjbfCount this.count.houseCount = res.data.houseCount; // 调拨
this.count.jncksCount = res.data.jncksCount this.count.jjbfCount = res.data.jjbfCount;
this.count.jnbfsCount = res.data.jnbfsCount this.count.jncksCount = res.data.jncksCount;
eventBus.$emit('fasong', res.data.cqwhCount, res.data.ycqCount) // 超期未还 // 已超期 this.count.jnbfsCount = res.data.jnbfsCount;
eventBus.$emit("fasong", res.data.cqwhCount, res.data.ycqCount); // 超期未还 // 已超期
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg);
} }
}) });
} }
}, },
nextpage(param) { nextpage(param) {
this.$router.push({ this.$router.push({
path: '/warehouse/inventoryList', path: "/warehouse/inventoryList",
query: { query: {
type: param, type: param,
orgId: this.orgId orgId: this.orgId,
} },
}) });
} },
} },
} };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
.panel-group { .panel-group {
margin-top: -10px; margin-top: -10px;
.el-col-lg-3-4 { .el-col-lg-3-4 {
width: 14.28%; width: 14.28%;
} }
// .el-col-lg-3-4 { // .el-col-lg-3-4 {
// width: 20.28%; // width: 20.28%;
// } // }
.card-panel-col{ .card-panel-col {
margin-bottom: 15px; margin-bottom: 15px;
} }
// .card-panel-col{ // .card-panel-col{
...@@ -211,9 +260,9 @@ export default { ...@@ -211,9 +260,9 @@ export default {
overflow: hidden; overflow: hidden;
color: #666; color: #666;
background: #fff; background: #fff;
cursor:pointer; cursor: pointer;
box-shadow: 3px 3px 3px rgba(25, 25, 25, .3); box-shadow: 3px 3px 3px rgba(25, 25, 25, 0.3);
border-color: rgba(0, 0, 0, .05); border-color: rgba(0, 0, 0, 0.05);
.icon-people { .icon-people {
color: #40c9c6; color: #40c9c6;
} }
...@@ -224,7 +273,7 @@ export default { ...@@ -224,7 +273,7 @@ export default {
color: #f4516c; color: #f4516c;
} }
.icon-shopping { .icon-shopping {
color: #34bfa3 color: #34bfa3;
} }
.card-panel-icon-wrapper { .card-panel-icon-wrapper {
float: left; float: left;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论