Commit 963e445d by T

报表、页面调整及bug修复

parent a1e21668
...@@ -4,7 +4,9 @@ import { transform } from '@/utils/index' ...@@ -4,7 +4,9 @@ import { transform } from '@/utils/index'
// 添加或修改警员信息 // 添加或修改警员信息
export function addOrUpdatePoliceman(data) { export function addOrUpdatePoliceman(data) {
return request({ return request({
url: window._CONFIG['serviceURL'] + '/api/Policeman/AddOrUpdatePoliceman', //url: window._CONFIG['serviceURL'] + '/api/Policeman/AddOrUpdatePoliceman',
//区分第三方的接口,下面接口自己用
url: window._CONFIG['serviceURL'] + '/api/Policeman/AddOrUpdatePolicemanFromHost',
method: 'post', method: 'post',
data: transform(data) data: transform(data)
}) })
......
import Vue from 'vue';
export default new Vue();
\ No newline at end of file
<template>
<div class="app-container">
<!--表单组件-->
<eForm ref="form" @warehouseChange="warehouseChange"/>
<hForm ref="hForm" @controlDev="humidityChange"/>
<el-row :gutter="10" style="margin-top: -10px;">
<el-col :xs="24" :sm="24" :md="10" :lg="14" :xl="14">
<el-card class="box-card" style="height:330px">
<div slot="header" class="clearfix">
<span>业务单激活</span>
<el-switch v-model="isLocked" active-text="解库" inactive-text="锁库" active-color="#409EFF" inactive-color="#F56C6C" style="float: right" @change="changeLocked"></el-switch>
</div>
<el-table :data="orderData" style="width:100%" stripe border>
<el-table-column type="index" align="center" width="50" label="序号"/>
<el-table-column prop='orderType' align="center" label="业务类型" width="150" />
<el-table-column prop='equNames' align="center" label="装备名称" :show-overflow-tooltip="true" />
<el-table-column prop='createTime' align="center" label="创建时间" />
<el-table-column prop='isWork' align="center" label="是否激活" width="100">
<template slot-scope="scope">
<el-switch
v-model="scope.row.isWork"
active-color="#409EFF"
inactive-color="#F56C6C"
@change="changeWorked(scope.row, scope.row.isWork)"/>
</template>
</el-table-column>
<el-table-column label="操作" width="150" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="showDetail(scope.row)">查看</el-button>
<el-button size="mini" type="warning" @click="stop(scope.row)" v-if="scope.row.orderType==='库存调拨' || scope.row.orderType==='借用' || scope.row.orderType === '领用' || scope.row.orderType === '销毁'">终止</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="3" @current-change="postPageChange"/>
</el-card >
<el-card class="box-card" style="margin-top:10px;">
<div slot="header" class="clearfix">
<span>出入库记录</span>
<el-button size="mini" type="primary" v-if="warehouseList.length > 1" style="float: right;" @click="getListOrgWarehouse">切换仓库</el-button>
</div>
<el-table :data="inAndOutList" style="width:100%" stripe border>
<el-table-column type="index" label="序号" width="50" align="center"/>
<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="info">领用</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="danger">维修</el-tag>
<el-tag v-else-if="scope.row.actionState == 7" type="info">报废</el-tag>
<el-tag v-else-if="scope.row.actionState == 25" 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"/>
<el-table-column label="安全等级" align="center" width="150px">
<template slot-scope="scope">
<el-tag v-if="scope.row.safeLevel == 0" type="success">质保期内</el-tag>
<el-tag v-else-if="scope.row.safeLevel == 1" type="warning">即将过期</el-tag>
<el-tag v-else-if="scope.row.safeLevel == 2" type="danger">已过质保期</el-tag>
</template>
</el-table-column>
<el-table-column prop="policeName" label="操作人员" width="100" align="center" :show-overflow-tooltip="true"/>
<el-table-column prop="createTime" label="操作时间" align="center" :show-overflow-tooltip="true"/>
<el-table-column label="出入库类型" fixed="right" align="center" width="100">
<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-col>
<el-col :xs="24" :sm="24" :md="10" :lg="10" :xl="10">
<el-card class="box-card" style="height:430px">
<div slot="header" class="clearfix" >
<span>{{ radio }}</span>
<el-radio-group v-model="radio" size="small" @change="radioChange" style="float: right;margin-top:-7px;margin-bottom:-10px;">
<!-- <el-radio-button label="库存状态"></el-radio-button>
<el-radio-button label="装备库存"></el-radio-button> -->
<!-- <el-radio-button label="温湿度" v-if="isShow"></el-radio-button> -->
</el-radio-group>
<el-select v-if="devList.length!=0" v-model="devIp" filterable placeholder="请选择除湿机" @change="humidityChange" style="width:200px; float: right;">
<el-option v-for="item in devList" :key="item.devId" :label="item.devName" :value="item.devIp"/>
</el-select>
</div>
<!-- <v-chart height="300" :data="chartData" :scale="scale" :padding="padding" style="margin-top:25px" key='1' v-if="radio != '温湿度'">
<v-tooltip :showTitle="false" dataKey="item*percent"/>
<v-axis/>
<v-legend :useHtml="true" position="right-center" :containerTpl="containerTplLegend" :itemTpl="itemTplLegend" :offset="offset"/>
<v-guide :type="guideOpts.type" :position="guideOpts.position" :content="guideOpts.content" :v-style="guideOpts.style" />
<v-guide :type="guideOpts1.type" :position="guideOpts1.position" :content="guideOpts1.content" :v-style="guideOpts1.style" />
<v-pie position="percent" color="item" :v-style="pieStyle" :label="labelConfig"/>
<v-coord type="theta" :radius="0.75" :innerRadius="0.7"/>
</v-chart> -->
<!-- <div v-else> -->
<div>
<el-row :gutter="10" v-if="devList.length!=0" style="margin-left:-40px;margin-right: -5px;">
<el-col :span="16">
<v-chart :forceFit="true" height="330" :data="curveData" :scale="curveScale">
<v-tooltip />
<v-axis :xAxis='xAxis' />
<v-legend />
<v-smooth-line position="updateTime*count" color="type" shape="smooth" />
<v-point position="updateTime*count" color="type" shape="circle" />
</v-chart>
</el-col>
<el-col :span="8">
<div style="float:right; margin-left: 10px;">
<!-- <el-select v-model="devIp" filterable placeholder="请选择除湿机" @change="humidityChange" style="width:100%">
<el-option v-for="item in devList" :key="item.devId" :label="item.devName" :value="item.devIp"/>
</el-select> -->
<div style="border:1px solid #e8e8e8;margin-top:10px;">
<table style="table-layout:auto; width:100%;border-collapse:collapse;box-sizing:border-box;">
<tbody>
<tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">Ip</th>
<td class="textContent">{{ devIp }}</td>
</tr>
<tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">温度</th>
<td class="textContent">{{ warehouseWd }}℃</td>
</tr>
<tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">设置湿度</th>
<td class="textContent">{{ setSd }}%</td>
</tr>
<tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">当前湿度</th>
<td class="textContent">{{ warehouseSd }}%</td>
</tr>
<tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader" >状态</th>
<td class="textContent"><el-tag style="margin-top:-10px;margin-bottom:-10px;">{{ devState == 0 ? '未运行' : '运行中'  }}</el-tag></td>
</tr>
<tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">操作</th>
<td class="textContent" style="margin-top:-10px;"><el-button type="primary" size="small"
@click="setHumidity" style="margin-top:-10px;margin-bottom:-10px;">设置</el-button></td>
</tr>
</tbody>
</table>
</div>
</div>
</el-col>
</el-row>
<el-row :gutter="10" v-else style="margin-left:-40px;margin-right: -5px;">
<div>
<el-empty :image-size="200" description="未配置温湿度记录设备,请联系相关运维人员配置" :image="csjpng" v-if="showVideo"></el-empty>
</div>
</el-row>
</div>
</el-card>
<el-card class="box-card" style="margin-top:10px;height:502px">
<div slot="header" class="clearfix" style="text-align:center;">
<span style="float: left;">视频影像</span>
<el-button style="padding: 3px 0" type="text" @click="remoteOpenDoor">远程开门</el-button>
<el-button style="float: right; padding: 3px 0" type="text" @click="$router.push('/video/list')">查看更多</el-button>
</div>
<iframe :src="src" frameborder="no" style="width:100%;height:410px;margin-top:-8px;" v-if="showVideo"/>
</el-card>
</el-col>
</el-row>
<destruction-detail ref="销毁" />
<borrow-detail ref="借用" />
<borrow-other-detail ref="跨库借用" />
<transfer-detail ref="库存调拨" />
<receive-detail ref="领用" />
<return-other-detail ref="跨库归还" />
<remote-door ref="door"/>
</div>
</template>
<script>
import csj from '@/assets/images/csj.png'
import initData from '@/mixins/initData'
import { initPdata } from '@/api/data'
import DataSet from '@antv/data-set'
import { getListDev } from '@/api/warehouseDev'
import { getListOrgWarehouse, getGroupByCount } from '@/api/warehouse'
import { getAllInOutTop10History, getOrderInfo, changeOrderIsWork, setWarehouseState, closeOrder } from '@/api/inventory'
import { getWarehouseInfo } from '@/api/warehouseDev'
import eForm from './form'
import hForm from './hForm'
import { mapState } from 'vuex'
import BorrowDetail from '@/views/warehouse/borrow/list/form'
import DestructionDetail from '@/views/warehouse/destruction/list/form'
import BorrowOtherDetail from '@/views/warehouse/borrowOther/list/form'
import TransferDetail from '@/views/warehouse/transfer/list/form'
import ReceiveDetail from '@/views/warehouse/receive/apply/detailForm'
import ReturnOtherDetail from '@/views/warehouse/returnOther/list/form'
import RemoteDoor from './remoteDoor'
import { transform } from '@/utils/index'
export default {
name: 'HouseBaseInfo',
components: { eForm, hForm, BorrowDetail,DestructionDetail, BorrowOtherDetail, TransferDetail, ReceiveDetail, ReturnOtherDetail, RemoteDoor },
mixins: [initData],
data() {
return {
csjpng:csj,
isLocked: true,
showVideo: true,
timer: null,
inAndOutList: [],
// radio: '库存状态',
radio: '温湿度',
pieList: [],
dataSource: [],
scale: [{
dataKey: 'percent',
min: 0,
formatter: '.0%'
}],
curveScale: [{
type: 'timeCat',
dataKey: 'updateTime',
// mask: 'MM/DD HH时',
tickCount: 12,
mask: 'HH时',
interval: '12h'
}],
sourceData: [],
offset: [15, 0],
padding: [0, 70, 0, 0],
containerTplLegend:`<div class="g2-legend"> <table class="g2-legend-list" style="width: 100%"></table> </div>`,
guideOpts: {
type: 'text',
position: [ '50%', '40%' ],
content: '',
style: {
lineHeight: '240px',
fontSize: '16',
fill: 'rgba(0,0,0,.45)',
textAlign: 'center'
}
},
guideOpts1: {
type: 'text',
position: [ '50%', '55%' ],
content: '',
style: {
lineHeight: '240px',
fontSize: '40',
fill: 'rgba(0,0,0,.85)',
textAlign: 'center'
}
},
pieStyle: {
stroke: '#fff',
lineWidth: 2
},
labelConfig: ['percent', {
formatter: (val, item) => {
return item.point.item + ': ' + item.point.count + ' '
}
}],
warehouseSd: 0,
warehouseWd: 0,
setSd: 0,
devIp: '',
// startTime: new Date().getFullYear().getMonth().getDate()+' '+'00:00:00' ,
// endTime:new Date().getDate+' '+'23:59:00',
nowtime: new Date(),
orderData: [],
page: 0, size: 3, total: 0,
humidity: 20,
isShow: false,
src: 'http://127.0.0.1:8080/ckzp.html',
temperatureValue:0,humidityValue:0,devList: [],devId: '', devState: '0',
orgId : this.$store.state.user.user.baseJpOrganization.id, warehouseList: [], warehouseId: null,
processUrl: {
"借用": '/api/Borrow/GetByID',
"跨库借用": '/api/Transfer/GetByID',
"库存调拨": '/api/Transfer/GetByID',
"领用": '/api/Borrow/GetByID',
"销毁": '/api/Borrow/GetByID',
"跨库归还": '/api/Transfer/GetByID'
}
}
},
computed: {
chartData() {
let dv = new DataSet.View().source(this.dataSource)
// 计算数据百分比
dv.transform({
type: 'percent',
field: 'count',
dimension: 'item',
as: 'percent'
})
return dv.rows
},
curveData() {
let dv = new DataSet.View().source(this.sourceData);
dv.transform({
type: 'fold',
fields: ['湿度', '温度'],
key: 'type',
value: 'count',
});
return dv.rows
},
...mapState({
sidebar: state => state.app.sidebar,
})
},
created() {
var docElm = document.documentElement
docElm.webkitRequestFullScreen()
this.$store.commit('TOGGLE_SIDEBAR')
this.getListOrgWarehouse()
},
mounted(){//生命周期模板挂载之后
let _this = this;
// this.timer = setInterval(()=>{
// this.initInAndOutList()
// this.getPieInfo()
// this.initOrderInfo()
// this.getListDev()
// },1000 * 30)
},
beforeDestroy(){//生命周期实例销毁之前
if(this.timer){
clearInterval(this.timer);
}
},
methods: {
stop(row) {
this.$confirm('此操作将强制终止单据,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
closeOrder({id: row.id, organizationId: row.orgId, userId: this.$store.state.user.user.id, type: row.orderType === '库存调拨' ? 'Transfer' : row.orderType === '借用' ? 'Borrow' : row.orderType === '销毁' ? 'Destruction': row.orderType === '领用' ? 'Consume' : ''}).then(res => {
if (res.code === '10000') {
this.initOrderInfo()
this.$message.success(res.msg)
} else {
this.$message.error(res.msg)
}
})
})
},
changeLocked(value) {
setWarehouseState({ warehouseId: this.warehouseId, isLocked: (value ? 0 : 1) }).then(res => {
if (res.code === '10000') {
this.$message.success(res.msg)
} else {
this.$message.error(res.msg)
}
})
},
getPieInfo() {
getGroupByCount({warehouseCode:this.warehouseId}).then(res => {
if (res.code == "10000") {
this.pieList = res.data
// this.dataSource = res.data.tjList
// this.guideOpts.content = '装备总数'
// this.guideOpts1.content = this.dataSource.map(item => item.count).reduce((total, num) => total + num)
// 法2slice:截取需要的部分,取当前的数组
this.newDataSource = res.data.tjList.slice(0,2);
this.dataSource = this.newDataSource
this.guideOpts.content = '装备总数'
this.guideOpts1.content = this.dataSource.map(item => item.count).reduce((total, num) => total + num)
}
})
},
getListOrgWarehouse() { //获取组织机构本级仓库
getListOrgWarehouse({orgizationId:this.orgId}).then(res=> {
this.warehouseList = res.data
if (this.warehouseList.length == 1){
//单个库房直接显示库房
this.warehouseId = this.warehouseList[0].id
this.isLocked = !this.warehouseList[0].isLocked
this.src = 'http://'+ this.warehouseList[0].cameraUrl +':8080/ckzp.html'
this.devList = []
this.devId = ''
this.devState = 0
this.getListDev()
this.initInAndOutList()
this.getPieInfo()
this.initOrderInfo()
} else if (this.warehouseList.length > 1){
//多个库房显示库房选择
this.showWarehouseList()
} else {
this.$notify({
title: '您的账号当前并无仓库可查看!',
type: 'warning',
duration:2500
})
}
})
},
initInAndOutList() {
getAllInOutTop10History({warehouseId:this.warehouseId}).then(res => {
if(res.code == '10000') {
this.inAndOutList = res.data
} else {
this.$message.error(res.msg)
}
})
},
initOrderInfo() {
getOrderInfo({page: this.page, size: this.size, warehouseId: this.warehouseId}).then(res => {
if (res.code == '10000'){
this.orderData = res.data.content
this.total = res.data.totalElements
} else {
this.$message.error(res.msg)
}
})
},
warehouseChange(data) {
this.warehouseId = data.id
this.isLocked = !data.isLocked
this.showVideo = true
let obj = this.warehouseList.find(i => i.id === this.warehouseId)
this.src = 'http://'+ obj.cameraUrl +':8080/ckzp.html'
this.initInAndOutList()
this.getPieInfo()
this.getListDev()
this.initOrderInfo()
},
itemTplLegend: function itemTpl(value, color, checked, index) {
const obj = this.chartData[index];
var percent = '0%';
var objCount = 0;
if(obj){
percent=(obj.percent * 100).toFixed(2) +'%';
objCount=obj.count;
}
checked = checked ? 'checked' : 'unChecked';
return '<tr class="g2-legend-list-item item-' + index + ' ' + checked + '" data-value="' + value + '" data-color=' + color + ' >' + '<td style="width:120px;height:35px;line-height:35px;"><i class="g2-legend-marker" style="width:10px;height:10px;display:inline-block;margin-right:20px;background-color:' + color + ';"></i>' + '<span class="g2-legend-text" style="color: #666">' + value + '</span></td>' + '<td style="text-align: right;width:30px">' + percent + '</td>' + '<td style="text-align: right;color: #666;width:30px">' + objCount + '</td>' + '</tr>';
},
radioChange(value) {
if (value == '库存状态') {
// this.dataSource = this.pieList.tjList
this.dataSource = this.pieList.tjList.slice(0,2);
this.guideOpts.content = '装备总数'
}
if (value == '装备库存') {
// this.dataSource = this.pieList.typeList
this.dataSource = this.pieList.typeList
this.guideOpts.content = '在库数量'
}
//this.guideOpts.content = '装备总数'
this.guideOpts1.content = this.dataSource.map(item => item.count).reduce((total, num) => total + num)
},
humidityChange() {
// getWarehouseInfo({warehouseId: this.warehouseId, devIp: this.devIp,startTime: this.startTime,endTime: this.endTime}).then(res => {
getWarehouseInfo({warehouseId: this.warehouseId, devIp: this.devIp}).then(res => {
if (res.data.list.length > 0) {
this.sourceData = res.data.list
} else {
this.sourceData = this.getMockData()
}
this.warehouseSd = res.data.warehouseSd
this.setSd = res.data.setSd
this.warehouseWd = res.data.warehouseWd
this.devState = res.data.devState
})
},
getListDev() { //获取仓库下所有除湿机
getListDev({warehouseId:this.warehouseId}).then(res=> {
this.devList = res.data
if(this.devList.length > 0){
this.devId = this.devList[0].devId //默认显示第一个
this.devIp = res.data[0].devIp
this.isShow = true
getWarehouseInfo({warehouseId: this.warehouseId, devIp: res.data[0].devIp}).then(res => {
if (res.data.list.length > 0) {
this.sourceData = res.data.list
} else {
this.sourceData = this.getMockData()
}
this.warehouseSd = res.data.warehouseSd
this.setSd = res.data.setSd
this.warehouseWd = res.data.warehouseWd
this.devState = res.data.devState
})
}
})
},
getMockData() {
let list = []
for(var a=0; a<12; a++) {
// list.push({updateTime: new Date().setHours(new Date().getHours() - a),'温度': 0, '湿度': 0 })
list.push({updateTime: new Date().setHours(new Date().getHours() - a),'温度': 0, '湿度': 0 })
}
return list
},
showWarehouseList() {
const _this = this.$refs.form
this.showVideo = false
_this.form = {
warehouseList : this.warehouseList
}
_this.dialog = true
},
remoteOpenDoor() {
const _this = this.$refs.door
_this.initChannel(this.warehouseId)
_this.dialog = true
},
changeWorked(row, isWork) {
changeOrderIsWork({id: row.id,warehouseId: row.warehouseId, type: row.orderType, isWork: isWork}).then(res => {
if (res.code == '10000') {
this.$notify({
title: '设置成功',
type: 'success',
duration: 2500
})
this.initOrderInfo()
} else {
row.isWork = !row.isWork
this.$message.error(res.msg)
}
})
},
setHumidity() {
const _this = this.$refs.hForm
_this.form = {
devId: this.devId,
OpenState: this.devState + '',
Humid: this.setSd
}
_this.dialog = true
},
postPageChange(e) {
this.page = e - 1
this.initOrderInfo()
},
showDetail(row) {
console.log('555:'+row.applyId);
//第三发导入数据applyId为空提示第三方生成
if(row.applyId !==null){
const _this = this.$refs[row.orderType]
var params = {id: row.applyId}
if (row.orderType == '库存调拨') { params.type = '调拨' }
if (row.orderType == '跨库借用') { params.type = '跨库借用' }
if (row.orderType == '跨库归还') { params.type = '跨库归还' }
initPdata( window._CONFIG['serviceURL'] + this.processUrl[row.orderType] , transform(params)).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
}else{
this.$message.warning('该数据为第三方生成');
}
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/.el-card .el-card__header{
background:#ffffff;
color:#000000;
font-size: 16px;
}
.link_style{
float: right;
padding: 4px 10px;
color:white
}
.textHeader{
background-color:#fafafa;
padding:16px 10px;
font-size: 14px;
border-right:1px solid #e8e8e8;
text-align:center;
}
.textContent{
background-color:#ffffff;
padding: 8px 8px;
text-align:left;
}
/deep/ .el-dialog{
display: flex;
flex-direction: column;
margin:0 !important;
position:absolute;
top:40%;
left:50%;
transform:translate(-50%,-50%);
/*height:600px;*/
max-height:calc(100% - 30px);
max-width:calc(100% - 30px);
}
/deep/ .el-dialog .el-dialog__body{
flex:1;
overflow: auto;
}
</style>
...@@ -80,46 +80,35 @@ ...@@ -80,46 +80,35 @@
</el-col> </el-col>
<el-col :xs="24" :sm="24" :md="10" :lg="10" :xl="10"> <el-col :xs="24" :sm="24" :md="10" :lg="10" :xl="10">
<el-card class="box-card" style="height:430px"> <el-card class="box-card" style="height:430px">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix" >
<span>{{ radio }}</span> <span>{{ radio }}</span>
<el-radio-group v-model="radio" size="small" @change="radioChange" style="float: right;margin-top:-7px;margin-bottom:-10px;"> <el-radio-group v-model="radio" size="small" @change="radioChange" style="float: right;margin-top:-7px;margin-bottom:-10px;">
<el-radio-button label="库存状态"></el-radio-button>
<el-radio-button label="装备库存"></el-radio-button>
<el-radio-button label="温湿度" v-if="isShow"></el-radio-button>
</el-radio-group> </el-radio-group>
<el-select v-if="devList.length!=0" v-model="devIp" filterable placeholder="请选择除湿机" @change="humidityChange" style="width:200px; float: right;">
<el-option v-for="item in devList" :key="item.devId" :label="item.devName" :value="item.devIp"/>
</el-select>
</div> </div>
<v-chart height="300" :data="chartData" :scale="scale" :padding="padding" style="margin-top:25px" key='1' v-if="radio != '温湿度'"> <div>
<v-tooltip :showTitle="false" dataKey="item*percent"/> <span><h5 style="margin-top: -15px;">当前时间:{{currentTime}}</h5></span>
<v-axis/> <el-row :gutter="10" v-if="devList.length!=0" style="margin-left:-40px;margin-right: -5px;">
<v-legend :useHtml="true" position="right-center" :containerTpl="containerTplLegend" :itemTpl="itemTplLegend" :offset="offset"/>
<v-guide :type="guideOpts.type" :position="guideOpts.position" :content="guideOpts.content" :v-style="guideOpts.style" />
<v-guide :type="guideOpts1.type" :position="guideOpts1.position" :content="guideOpts1.content" :v-style="guideOpts1.style" />
<v-pie position="percent" color="item" :v-style="pieStyle" :label="labelConfig"/>
<v-coord type="theta" :radius="0.75" :innerRadius="0.7"/>
</v-chart>
<div v-else>
<el-row :gutter="10" style="margin-left:-40px;margin-right: -5px;">
<el-col :span="16"> <el-col :span="16">
<v-chart :forceFit="true" height="330" :data="curveData" :scale="curveScale"> <v-chart :forceFit="true" height="330" :data="curveData" :scale="curveScale">
<v-tooltip /> <v-tooltip />
<v-axis /> <v-axis />
<v-legend /> <v-legend />
<v-smooth-line position="updateTime*count" color="type" shape="smooth" /> <v-smooth-line position="updateTime*count" :color="['type', ['#409eff', '#ff3434']]" shape="smooth" />
<v-point position="updateTime*count" color="type" shape="circle" /> <v-point position="updateTime*count" :color="['type', ['#409eff', '#ff3434']]" shape="circle" />
</v-chart> </v-chart>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div style="float:right; margin-left: 10px;"> <div style="float:right; margin-left: 10px;">
<el-select v-model="devIp" filterable placeholder="请选择除湿机" @change="humidityChange" style="width:100%">
<el-option v-for="item in devList" :key="item.devId" :label="item.devName" :value="item.devIp"/>
</el-select>
<div style="border:1px solid #e8e8e8;margin-top:10px;"> <div style="border:1px solid #e8e8e8;margin-top:10px;">
<table style="table-layout:auto; width:100%;border-collapse:collapse;box-sizing:border-box;"> <table style="table-layout:auto; width:100%;border-collapse:collapse;box-sizing:border-box;">
<tbody> <tbody>
<tr style="border-bottom:1px solid #e8e8e8;"> <!-- <tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">Ip</th> <th class="textHeader">Ip</th>
<td class="textContent">{{ devIp }}</td> <td class="textContent">{{ devIp }}</td>
</tr> </tr> -->
<tr style="border-bottom:1px solid #e8e8e8;"> <tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">温度</th> <th class="textHeader">温度</th>
<td class="textContent">{{ warehouseWd }}℃</td> <td class="textContent">{{ warehouseWd }}℃</td>
...@@ -147,7 +136,13 @@ ...@@ -147,7 +136,13 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10" v-else style="margin-left:-40px;margin-right: -5px;">
<div>
<el-empty :image-size="200" description="未配置温湿度记录设备,请联系相关运维人员配置" :image="csjpng" v-if="showVideo"></el-empty>
</div>
</el-row>
</div> </div>
</el-card> </el-card>
<el-card class="box-card" style="margin-top:10px;height:502px"> <el-card class="box-card" style="margin-top:10px;height:502px">
<div slot="header" class="clearfix" style="text-align:center;"> <div slot="header" class="clearfix" style="text-align:center;">
...@@ -172,7 +167,7 @@ ...@@ -172,7 +167,7 @@
</template> </template>
<script> <script>
import csj from '@/assets/images/csj.png'
import initData from '@/mixins/initData' import initData from '@/mixins/initData'
import { initPdata } from '@/api/data' import { initPdata } from '@/api/data'
import DataSet from '@antv/data-set' import DataSet from '@antv/data-set'
...@@ -197,11 +192,13 @@ export default { ...@@ -197,11 +192,13 @@ export default {
mixins: [initData], mixins: [initData],
data() { data() {
return { return {
csjpng:csj,
isLocked: true, isLocked: true,
showVideo: true, showVideo: true,
timer: null, timer: null,
inAndOutList: [], inAndOutList: [],
radio: '库存状态', // radio: '库存状态',
radio: '温湿度',
pieList: [], pieList: [],
dataSource: [], dataSource: [],
scale: [{ scale: [{
...@@ -212,7 +209,13 @@ export default { ...@@ -212,7 +209,13 @@ export default {
curveScale: [{ curveScale: [{
type: 'timeCat', type: 'timeCat',
dataKey: 'updateTime', dataKey: 'updateTime',
mask: 'MM/DD HH时' mask: 'HH时',
tickCount: 12
}],
ILineStyle: [{
'#67C23A': '#409EFF',
}], }],
sourceData: [], sourceData: [],
offset: [15, 0], offset: [15, 0],
...@@ -253,6 +256,8 @@ export default { ...@@ -253,6 +256,8 @@ export default {
warehouseWd: 0, warehouseWd: 0,
setSd: 0, setSd: 0,
devIp: '', devIp: '',
currentTime: null,
intervalId: null,
nowtime: new Date(), nowtime: new Date(),
orderData: [], orderData: [],
page: 0, size: 3, total: 0, page: 0, size: 3, total: 0,
...@@ -311,13 +316,34 @@ export default { ...@@ -311,13 +316,34 @@ export default {
// this.initOrderInfo() // this.initOrderInfo()
// this.getListDev() // this.getListDev()
// },1000 * 30) // },1000 * 30)
this.startAutoUpdate();
}, },
beforeDestroy(){//生命周期实例销毁之前 beforeDestroy(){//生命周期实例销毁之前
if(this.timer){ if(this.timer){
clearInterval(this.timer); clearInterval(this.timer);
} }
this.stopAutoUpdate();
}, },
methods: { methods: {
startAutoUpdate() {
this.currentTime = new Date(); // 初始化当前时间
this.intervalId = setInterval(() => {
this.currentTime = this.getFormattedTime(); // 更新当前时间
}, 1000); // 每秒更新一次
},
stopAutoUpdate() {
clearInterval(this.intervalId); // 清除定时器
},
getFormattedTime() {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0'); // 补齐两位数
const day = String(now.getDate()).padStart(2, '0'); // 补齐两位数
const hour = String(now.getHours()).padStart(2, '0'); // 补齐两位数
const minute = String(now.getMinutes()).padStart(2, '0'); // 补齐两位数
const second = String(now.getSeconds()).padStart(2, '0'); // 补齐两位数
return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
},
stop(row) { stop(row) {
this.$confirm('此操作将强制终止单据,是否继续?', '提示', { this.$confirm('此操作将强制终止单据,是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -441,9 +467,54 @@ export default { ...@@ -441,9 +467,54 @@ export default {
this.guideOpts1.content = this.dataSource.map(item => item.count).reduce((total, num) => total + num) this.guideOpts1.content = this.dataSource.map(item => item.count).reduce((total, num) => total + num)
}, },
humidityChange() { humidityChange() {
//getWarehouseInfo({warehouseId: this.warehouseId, devIp: this.devIp,startTime: this.startTime,endTime: this.endTime}).then(res => {
getWarehouseInfo({warehouseId: this.warehouseId, devIp: this.devIp}).then(res => { getWarehouseInfo({warehouseId: this.warehouseId, devIp: this.devIp}).then(res => {
if (res.data.list.length > 0) { if (res.data.list.length > 0) {
if(res.data.list.length < 13){
const date = new Date();
const year = date.getFullYear();
const month = `0${date.getMonth() + 1}`.slice(-2);
const day = `0${date.getDate()}`.slice(-2);
const hour = `0${date.getHours()}`.slice(-2);
let a = [
{updateTime: `${year}/${month}/${day} ${hour-11}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-10}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-9}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-8}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-7}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-6}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-5}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-4}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-3}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-2}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-1}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour}:00:00`, 湿度: 0, 温度: 0},
]
let b = res.data.list
// 用一个对象记录数组a中的各个元素对应的updateTime
const aMap = {};
a.forEach(item => {
aMap[item.updateTime] = item;
});
// 遍历数组b,将对应updateTime下的温度和湿度赋值到a数组中
b.forEach(item => {
const aItem = aMap[item.updateTime];
if (aItem) {
aItem.温度 = item.温度;
aItem.湿度 = item.湿度;
} else {
a.push(item);
}
});
//console.log(a)
this.sourceData = a.slice(0, 12);
}else{
this.sourceData = res.data.list this.sourceData = res.data.list
}
if(res.data.list> 13){
this.sourceData =res.data.list.slice(0, 12);
}
} else { } else {
this.sourceData = this.getMockData() this.sourceData = this.getMockData()
} }
...@@ -462,7 +533,55 @@ export default { ...@@ -462,7 +533,55 @@ export default {
this.isShow = true this.isShow = true
getWarehouseInfo({warehouseId: this.warehouseId, devIp: res.data[0].devIp}).then(res => { getWarehouseInfo({warehouseId: this.warehouseId, devIp: res.data[0].devIp}).then(res => {
if (res.data.list.length > 0) { if (res.data.list.length > 0) {
if(res.data.list.length < 13){
const date = new Date();
const year = date.getFullYear();
const month = `0${date.getMonth() + 1}`.slice(-2);
const day = `0${date.getDate()}`.slice(-2);
const hour = `0${date.getHours()}`.slice(-2);
let a = [
{updateTime: `${year}/${month}/${day} ${hour-11}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-10}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-9}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-8}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-7}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-6}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-5}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-4}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-3}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-2}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour-1}:00:00`, 湿度: 0, 温度: 0},
{updateTime: `${year}/${month}/${day} ${hour}:00:00`, 湿度: 0, 温度: 0},
]
//console.log(a)
let b = res.data.list
// 用一个对象记录数组a中的各个元素对应的updateTime
const aMap = {};
a.forEach(item => {
aMap[item.updateTime] = item;
});
// 遍历数组b,将对应updateTime下的温度和湿度赋值到a数组中
b.forEach(item => {
const aItem = aMap[item.updateTime];
if (aItem) {
aItem.温度 = item.温度;
aItem.湿度 = item.湿度;
} else {
a.push(item);
}
});
//console.log(a)
this.sourceData = a.slice(0, 12);
}else{
this.sourceData = res.data.list this.sourceData = res.data.list
}
if(res.data.list> 13){
this.sourceData =res.data.list.slice(0, 12);
}
} else { } else {
this.sourceData = this.getMockData() this.sourceData = this.getMockData()
} }
...@@ -476,7 +595,7 @@ export default { ...@@ -476,7 +595,7 @@ export default {
}, },
getMockData() { getMockData() {
let list = [] let list = []
for(var a=0; a<9; a++) { for(var a=0; a<12; a++) {
list.push({updateTime: new Date().setHours(new Date().getHours() - a),'温度': 0, '湿度': 0 }) list.push({updateTime: new Date().setHours(new Date().getHours() - a),'温度': 0, '湿度': 0 })
} }
return list return list
...@@ -523,7 +642,7 @@ export default { ...@@ -523,7 +642,7 @@ export default {
this.initOrderInfo() this.initOrderInfo()
}, },
showDetail(row) { showDetail(row) {
console.log('555:'+row.applyId); //console.log('555:'+row.applyId);
//第三发导入数据applyId为空提示第三方生成 //第三发导入数据applyId为空提示第三方生成
if(row.applyId !==null){ if(row.applyId !==null){
......
...@@ -42,13 +42,13 @@ ...@@ -42,13 +42,13 @@
{{ item.label }} {{ item.label }}
</el-checkbox> </el-checkbox>
</el-popover> </el-popover>
<el-select v-model="query.isCurrentLevel" clearable placeholder="是否本级" class="filter-item" style="width: 160px" @change="toPostQuery">
<el-option v-for="item in levelOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
</el-select>
<el-input v-model="query.value" clearable placeholder="柜号" style="width: 200px;" class="filter-item" @keyup.enter.native="toPostQuery"/> <el-input v-model="query.value" clearable placeholder="柜号" style="width: 200px;" class="filter-item" @keyup.enter.native="toPostQuery"/>
<!-- <el-select v-model="query.state" clearable placeholder="状态" class="filter-item" style="width: 90px" @change="toPostQuery"> <!-- <el-select v-model="query.state" clearable placeholder="状态" class="filter-item" style="width: 90px" @change="toPostQuery">
<el-option v-for="item in stateOptions" :key="item.key" :label="item.display_name" :value="item.key"/> <el-option v-for="item in stateOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
</el-select> --> </el-select> -->
<el-select v-model="query.isCurrentLevel" clearable placeholder="是否本级" class="filter-item" style="width: 160px" @change="toPostQuery">
<el-option v-for="item in levelOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
</el-select>
<el-button class="filter-item" type="success" icon="el-icon-search" @click="toPostQuery">搜索</el-button> <el-button class="filter-item" type="success" icon="el-icon-search" @click="toPostQuery">搜索</el-button>
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="add">新增</el-button> <el-button class="filter-item" type="primary" icon="el-icon-plus" @click="add">新增</el-button>
</div> </div>
...@@ -135,6 +135,7 @@ export default { ...@@ -135,6 +135,7 @@ export default {
filterText: '', filterText: '',
selection: '', selection: '',
organizationId: '', organizationId: '',
query:{isCurrentLevel:true},
columns: [], columns: [],
allColumnsSelected: true, allColumnsSelected: true,
allColumnsSelectedIndeterminate: false, allColumnsSelectedIndeterminate: false,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<el-card style="height:350px"> <el-card style="height:350px">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>{{radio}}</span> <span>{{radio}}</span>
<el-radio-group v-model="radio" size="small" @change="radioChange" style="float: right;margin-top:-7px;margin-bottom:-10px;"> <el-radio-group v-model="radio" size="small" @change="radioChange" :disabled="!canClick" style="float: right;margin-top:-7px;margin-bottom:-10px;">
<el-radio-button label="使用次数"></el-radio-button> <el-radio-button label="使用次数"></el-radio-button>
<el-radio-button label="维修次数"></el-radio-button> <el-radio-button label="维修次数"></el-radio-button>
<el-radio-button label="报废数"></el-radio-button> <el-radio-button label="报废数"></el-radio-button>
...@@ -13,10 +13,11 @@ ...@@ -13,10 +13,11 @@
<v-axis /> <v-axis />
<v-bar position="year*sales" /> <v-bar position="year*sales" />
</v-chart> --> </v-chart> -->
<v-chart :forceFit="true" :height="300" :data="chartData" style="margin-left: -50px"> <v-chart :forceFit="true" :height="300" :data="chartData" style="margin-left: -50px" v-if="dom">
<v-tooltip /> <v-tooltip />
<v-axis data-key='维修次数' :line="line" :label="label" /> <!-- <v-axis data-key='维修次数' :line="line" :label="label" v-if="dom"/>
<v-axis data-key='报废次数' :line="line" :label="label" /> <v-axis data-key='报废次数' :line="line" :label="label" v-if="dom"/> -->
<v-axis />
<v-legend /> <v-legend />
<v-bar :position="position" color="parentName" :adjust="adjust" /> <v-bar :position="position" color="parentName" :adjust="adjust" />
</v-chart> </v-chart>
...@@ -48,9 +49,11 @@ export default { ...@@ -48,9 +49,11 @@ export default {
type: 'dodge', type: 'dodge',
marginRatio: 1 / 32, marginRatio: 1 / 32,
}], }],
dom:true,
canClick: true,
chartData: [], chartData: [],
line, line,
label, //label,
position: '装备类型*使用量' position: '装备类型*使用量'
} }
}, },
...@@ -90,9 +93,14 @@ export default { ...@@ -90,9 +93,14 @@ export default {
}) })
}, },
radioChange(value) { radioChange(value) {
this.dom=false
//防点,不然请求未返回结果会出现渲染显示问题
this.canClick = false;
if (value == '使用次数') { if (value == '使用次数') {
this.dom=false
getSyPOrg({orgId: this.orgId}).then(res => { getSyPOrg({orgId: this.orgId}).then(res => {
if (res.code == "10000") { if (res.code == "10000") {
this.dom=true
this.dataSource = res.data this.dataSource = res.data
let dv = new DataSet.View().source(this.dataSource) let dv = new DataSet.View().source(this.dataSource)
dv.transform({ dv.transform({
...@@ -106,10 +114,13 @@ export default { ...@@ -106,10 +114,13 @@ export default {
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)
} }
this.canClick = true;
}) })
} else if (value == '维修次数') { }
else if (value == '维修次数') {
getWxPOrg({orgId: this.orgId}).then(res => { getWxPOrg({orgId: this.orgId}).then(res => {
if (res.code == "10000") { if (res.code == "10000") {
this.dom=true
this.dataSource = res.data this.dataSource = res.data
let dv = new DataSet.View().source(this.dataSource) let dv = new DataSet.View().source(this.dataSource)
dv.transform({ dv.transform({
...@@ -123,16 +134,18 @@ export default { ...@@ -123,16 +134,18 @@ export default {
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)
} }
this.canClick = true;
}) })
} }
else if (value == '报废数') { else if (value == '报废数') {
getBfPOrg({orgId: this.orgId}).then(res => { getBfPOrg({orgId: this.orgId}).then(res => {
if (res.code == "10000") { if (res.code == "10000") {
this.dom=true
this.dataSource = res.data this.dataSource = res.data
let dv = new DataSet.View().source(this.dataSource) let dv = new DataSet.View().source(this.dataSource)
dv.transform({ dv.transform({
type: 'fold', type: 'fold',
fields: ['近三个月报废数', '近半年使报废数'], fields: ['近三个月报废数', '近半年报废数'],
key: '装备类型', key: '装备类型',
value: '报废次数', value: '报废次数',
}); });
...@@ -141,6 +154,7 @@ export default { ...@@ -141,6 +154,7 @@ export default {
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)
} }
this.canClick = true;
}) })
} }
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</div> </div>
<v-chart :forceFit="true" :height="300" :data="chartData" style="margin-left: -50px"> <v-chart :forceFit="true" :height="300" :data="chartData" style="margin-left: -50px">
<v-tooltip /> <v-tooltip />
<v-axis data-key='维修次数' :line="line" :label="label" /> <v-axis data-key='维修次数' :line="line" :label="label" :lineStyle="{stroke: 'red'}" :v-style="style"/>
<v-axis data-key='报废次数' :line="line" :label="label" /> <v-axis data-key='报废次数' :line="line" :label="label" />
<v-legend /> <v-legend />
<v-line :position="position" color="parentName" /> <v-line :position="position" color="parentName" />
......
<template>
<el-card style="height:350px">
<div slot="header" class="clearfix">
<span>{{radio}}</span>
<el-radio-group v-model="radio" size="small" @change="radioChange" style="float: right;margin-top:-7px;margin-bottom:-10px;">
<el-radio-button label="使用次数"></el-radio-button>
<el-radio-button label="维修次数"></el-radio-button>
<el-radio-button label="报废数"></el-radio-button>
</el-radio-group>
</div>
<!-- <v-chart :forceFit="true" :height="height" :data="chartData" :scale="scale">
<v-tooltip />
<v-axis />
<v-bar position="year*sales" />
</v-chart> -->
<v-chart :forceFit="true" :height="300" :data="chartData" style="margin-left: -50px">
<v-tooltip />
<v-axis data-key='维修次数' :line="line" :label="label" />
<v-axis data-key='报废次数' :line="line" :label="label" />
<v-legend />
<v-bar :position="position" color="parentName" :adjust="adjust" />
</v-chart>
</el-card>
</template>
<script>
import { getSyPOrg } from '@/api/view'
import { getWxPOrg } from '@/api/view'
import { getBfPOrg } from '@/api/view'
import DataSet from '@antv/data-set'
export default {
data() {
const label = {
offset: -620,
textStyle: {
textAlign: 'left',
}
}
const line = {
textAlign: 'left'
}
return {
orgId: this.$store.state.user.user.baseJpOrganization.id,
radio: '使用次数',
dataSource: [],
adjust: [{
type: 'dodge',
marginRatio: 1 / 32,
}],
chartData: [],
line,
label,
position: '装备类型*使用量'
}
},
computed: {
// chartData() {
// let dv = new DataSet.View().source(this.dataSource)
// dv.transform({
// type: 'fold',
// fields: ['近七天使用次数', '近三十天使用次数'],
// key: '装备类型',
// value: '使用量',
// });
// return dv.rows
// },
},
mounted() {
this.init()
},
methods: {
init(orgId) {
this.orgId = orgId || this.$store.state.user.user.baseJpOrganization.id
getSyPOrg({orgId: this.orgId}).then(res => {
if (res.code == "10000") {
console.log(res.data)
let a =[
{parentName: "指挥信通装备", 近七天使用次数: 0, 近三十天使用次数: 0},
{parentName: "刑事技术装备", 近七天使用次数: 0, 近三十天使用次数: 0},
{parentName: "侦查技术装备", 近七天使用次数: 0, 近三十天使用次数: 0},
{parentName: "武器警械", 近七天使用次数: 0, 近三十天使用次数: 0},
{parentName: "防护装备", 近七天使用次数: 0, 近三十天使用次数: 0},
{parentName: "警用车辆及船艇", 近七天使用次数: 0, 近三十天使用次数: 0},
{parentName: "反恐救援装备", 近七天使用次数: 0, 近三十天使用次数: 0},
{parentName: "警用航空装备", 近七天使用次数: 0, 近三十天使用次数: 0},
{parentName: "其他装备", 近七天使用次数: 0, 近三十天使用次数: 0},
]
this.dataSource = a
let dv = new DataSet.View().source(this.dataSource)
dv.transform({
type: 'fold',
fields: ['近七天使用次数', '近三十天使用次数'],
key: '装备类型',
value: '使用量',
});
this.chartData = dv
this.position = '装备类型*使用量'
} else {
this.$message.error(res.msg)
}
})
},
radioChange(data) {
// 清空数据
// this.dataSource = [];
// this.chartData = [];
if (data == '使用次数') {
getSyPOrg({orgId: this.orgId}).then(res => {
if (res.code == "10000") {
let a=[
{parentName: "指挥信通装备", 近七天使用次数: 0, 近三十天使用次数: 0},
{parentName: "刑事技术装备", 近七天使用次数: 0, 近三十天使用次数: 0},
{parentName: "侦查技术装备", 近七天使用次数: 0, 近三十天使用次数: 0},
{parentName: "武器警械", 近七天使用次数: 0, 近三十天使用次数: 0},
{parentName: "防护装备", 近七天使用次数: 0, 近三十天使用次数: 0},
{parentName: "警用车辆及船艇", 近七天使用次数: 0, 近三十天使用次数: 0},
{parentName: "反恐救援装备", 近七天使用次数: 0, 近三十天使用次数: 0},
{parentName: "警用航空装备", 近七天使用次数: 0, 近三十天使用次数: 0},
{parentName: "其他装备", 近七天使用次数: 0, 近三十天使用次数: 0},
]
this.dataSource = a
let dv = new DataSet.View().source(this.dataSource)
dv.transform({
type: 'fold',
fields: ['近七天使用次数', '近三十天使用次数'],
key: '装备类型',
value: '使用量',
});
this.chartData = dv
this.position = '装备类型*使用量'
} else {
this.$message.error(res.msg)
}
})
} else if (data == '维修次数') {
getWxPOrg({orgId: this.orgId}).then(res => {
if (res.code == "10000") {
let a=[
{parentName: "指挥信通装备", 近三个月维修次数: 0, 近半年维修次数: 0},
{parentName: "刑事技术装备", 近三个月维修次数: 0, 近半年维修次数: 0},
{parentName: "侦查技术装备", 近三个月维修次数: 0, 近半年维修次数: 0},
{parentName: "武器警械", 近三个月维修次数: 0, 近半年维修次数: 0},
{parentName: "防护装备", 近三个月维修次数: 0, 近半年维修次数: 0},
{parentName: "警用车辆及船艇", 近三个月维修次数: 0, 近半年维修次数: 0},
{parentName: "反恐救援装备", 近三个月维修次数: 0, 近半年维修次数: 0},
{parentName: "警用航空装备", 近三个月维修次数: 0, 近半年维修次数: 0},
{parentName: "其他装备", 近三个月维修次数: 0, 近半年维修次数: 0},
]
this.dataSource = a
let dv = new DataSet.View().source(this.dataSource)
dv.transform({
type: 'fold',
fields: ['近三个月维修次数', '近半年维修次数'],
key: '装备类型',
value: '维修次数',
});
this.chartData = dv
this.position = '装备类型*维修次数'
} else {
this.$message.error(res.msg)
}
})
}
else if (data == '报废数') {
getBfPOrg({orgId: this.orgId}).then(res => {
if (res.code == "10000") {
let a=[
{parentName: "指挥信通装备", 近三个月报废数: 0, 近半年报废数: 0},
{parentName: "刑事技术装备", 近三个月报废数: 0, 近半年报废数: 0},
{parentName: "侦查技术装备", 近三个月报废数: 0, 近半年报废数: 0},
{parentName: "武器警械", 近三个月报废数: 0, 近半年报废数: 0},
{parentName: "防护装备", 近三个月报废数: 0, 近半年报废数: 0},
{parentName: "警用车辆及船艇", 近三个月报废数: 0, 近半年报废数: 0},
{parentName: "反恐救援装备", 近三个月报废数: 0, 近半年报废数: 0},
{parentName: "警用航空装备", 近三个月报废数: 0, 近半年报废数: 0},
{parentName: "其他装备", 近三个月报废数: 0, 近半年报废数: 0},
]
this.dataSource = a
let dv = new DataSet.View().source(this.dataSource)
dv.transform({
type: 'fold',
fields: ['近三个月报废数', '近半年报废数'],
key: '装备类型',
value: '报废次数',
});
this.chartData = dv
this.position = '装备类型*报废次数'
} else {
this.$message.error(res.msg)
}
})
}
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/.el-card .el-card__header{
background:#ffffff;
color:#000000;
font-size: 16px;
}
</style>
\ No newline at end of file
...@@ -42,6 +42,9 @@ ...@@ -42,6 +42,9 @@
{{ item.label }} {{ item.label }}
</el-checkbox> </el-checkbox>
</el-popover> </el-popover>
<el-select v-model="query.level" clearable placeholder="是否本级" class="filter-item" style="width: 160px" @change="toPostQuery">
<el-option v-for="item in levelOptions" :key="item.key" :label="item.display_name" :value="item.display_name"/>
</el-select>
<el-input v-model="query.devName" clearable placeholder="设备名称" style="width: 200px;" class="filter-item" @keyup.enter.native="toPostQuery"/> <el-input v-model="query.devName" clearable placeholder="设备名称" style="width: 200px;" class="filter-item" @keyup.enter.native="toPostQuery"/>
<el-input v-model="query.devCode" clearable placeholder="设备编号" style="width: 200px;" class="filter-item" @keyup.enter.native="toPostQuery"/> <el-input v-model="query.devCode" clearable placeholder="设备编号" style="width: 200px;" class="filter-item" @keyup.enter.native="toPostQuery"/>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toPostQuery">搜索</el-button> <el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toPostQuery">搜索</el-button>
...@@ -113,6 +116,7 @@ export default { ...@@ -113,6 +116,7 @@ export default {
columns: [], columns: [],
allColumnsSelected: true, allColumnsSelected: true,
allColumnsSelectedIndeterminate: false, allColumnsSelectedIndeterminate: false,
query:{level:'本级'},
show: true, show: true,
tData: [], tData: [],
defaultProps:{ defaultProps:{
...@@ -123,6 +127,10 @@ export default { ...@@ -123,6 +127,10 @@ export default {
{ key: 1, display_name: '启用' }, { key: 1, display_name: '启用' },
{ key: 0, display_name: '禁用' } { key: 0, display_name: '禁用' }
], ],
levelOptions: [
{ key: true, display_name: '本级' },
{ key: false, display_name: '全部' }
],
delLoading: false delLoading: false
} }
}, },
...@@ -159,8 +167,10 @@ export default { ...@@ -159,8 +167,10 @@ export default {
const query = this.query const query = this.query
const devName = query.devName const devName = query.devName
const devCode = query.devCode const devCode = query.devCode
const level = query.level
if (devName) { this.params['devName'] = devName } if (devName) { this.params['devName'] = devName }
if (devCode) { this.params['devCode'] = devCode } if (devCode) { this.params['devCode'] = devCode }
if (level) { this.params['level'] = level }
return true return true
}, },
initTree() { initTree() {
......
...@@ -278,6 +278,7 @@ export default { ...@@ -278,6 +278,7 @@ export default {
}, },
cancel() { cancel() {
this.resetForm() this.resetForm()
this.$parent.initPost()
}, },
doSubmit() { doSubmit() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
......
...@@ -174,13 +174,24 @@ export default { ...@@ -174,13 +174,24 @@ export default {
var backMessObj = JSON.parse(e.data); var backMessObj = JSON.parse(e.data);
if(backMessObj.CmdType == 2) { if(backMessObj.CmdType == 2) {
getWzByEpc({epc : backMessObj.Content}).then(res => { getWzByEpc({epc : backMessObj.Content}).then(res => {
if (res.code === "10000") { if (res.code === "10000"){
if (!this.epsList.includes(backMessObj.Content)) { if (!this.epsList.includes(backMessObj.Content)) {
if(res.data.orgId == this.$store.state.user.user.baseJpOrganization.id) {
if (res.data.warehouseId == this.form.warehouseId || res.data.warehouseId == null || res.data.warehouseId == '') { if (res.data.warehouseId == this.form.warehouseId || res.data.warehouseId == null || res.data.warehouseId == '') {
this.epsList.unshift(backMessObj.Content) this.epsList.unshift(backMessObj.Content)
this.handleAdd(res.data) this.handleAdd(res.data)
} }
}else{
this.$message.warning('组织机构不匹配')
}
if (res.data.warehouseId == this.form.warehouseId) {
this.epsList.unshift(backMessObj.Content)
this.handleAdd(res.data)
}
} }
}else{
this.$message.warning(res.msg)
} }
}) })
} else if(![0,1,2,5].includes(backMessObj.CmdType)) { } else if(![0,1,2,5].includes(backMessObj.CmdType)) {
...@@ -230,9 +241,15 @@ export default { ...@@ -230,9 +241,15 @@ export default {
getWzByEpc({epc : this.eqEpc}).then(res => { getWzByEpc({epc : this.eqEpc}).then(res => {
if(res.code === "10000"){ if(res.code === "10000"){
if (!this.epsList.includes(this.eqEpc)) { if (!this.epsList.includes(this.eqEpc)) {
if (res.data.warehouseId == this.form.warehouseId) { // if (res.data.warehouseId == this.form.warehouseId) {
// this.epsList.push(this.eqEpc)
// this.handleAdd(res.data)
// }
if (res.data.orgId == this.$store.state.user.user.baseJpOrganization.id ) {
this.epsList.push(this.eqEpc) this.epsList.push(this.eqEpc)
this.handleAdd(res.data) this.handleAdd(res.data)
} else {
this.$message.warning('组织机构不匹配')
} }
} }
} else { } else {
...@@ -248,6 +265,7 @@ export default { ...@@ -248,6 +265,7 @@ export default {
}, },
cancel() { cancel() {
this.resetForm() this.resetForm()
this.$parent.initPost()
}, },
doSubmit() { doSubmit() {
this.form.orgCode = this.$store.state.user.user.baseJpOrganization.code.substring(0,6) this.form.orgCode = this.$store.state.user.user.baseJpOrganization.code.substring(0,6)
......
...@@ -175,12 +175,23 @@ export default { ...@@ -175,12 +175,23 @@ export default {
getWzByEpc({epc : backMessObj.Content}).then(res => { getWzByEpc({epc : backMessObj.Content}).then(res => {
if (res.code === "10000"){ if (res.code === "10000"){
if (!this.epsList.includes(backMessObj.Content)) { if (!this.epsList.includes(backMessObj.Content)) {
if(res.data.orgId == this.$store.state.user.user.baseJpOrganization.id) {
if (res.data.warehouseId == this.form.warehouseId || res.data.warehouseId == null || res.data.warehouseId == '') { if (res.data.warehouseId == this.form.warehouseId || res.data.warehouseId == null || res.data.warehouseId == '') {
this.epsList.unshift(backMessObj.Content) this.epsList.unshift(backMessObj.Content)
this.handleAdd(res.data) this.handleAdd(res.data)
} }
}else{
this.$message.warning('组织机构不匹配')
}
if (res.data.warehouseId == this.form.warehouseId) {
this.epsList.unshift(backMessObj.Content)
this.handleAdd(res.data)
} }
} }
}else{
this.$message.warning(res.msg)
}
}) })
}else if (![0,1,2,5].includes(backMessObj.CmdType)){ }else if (![0,1,2,5].includes(backMessObj.CmdType)){
this.$message.error(backMessObj.Content) this.$message.error(backMessObj.Content)
...@@ -231,9 +242,15 @@ export default { ...@@ -231,9 +242,15 @@ export default {
getWzByEpc({epc : this.eqEpc}).then(res => { getWzByEpc({epc : this.eqEpc}).then(res => {
if(res.code === "10000"){ if(res.code === "10000"){
if (!this.epsList.includes(this.eqEpc)) { if (!this.epsList.includes(this.eqEpc)) {
if (res.data.warehouseId == this.form.warehouseId) { // if (res.data.warehouseId == this.form.warehouseId) {
// this.epsList.push(this.eqEpc)
// this.handleAdd(res.data)
// }
if (res.data.orgId == this.$store.state.user.user.baseJpOrganization.id ) {
this.epsList.push(this.eqEpc) this.epsList.push(this.eqEpc)
this.handleAdd(res.data) this.handleAdd(res.data)
} else {
this.$message.warning('组织机构不匹配')
} }
} }
} else { } else {
...@@ -248,6 +265,7 @@ export default { ...@@ -248,6 +265,7 @@ export default {
}, },
cancel() { cancel() {
this.resetForm() this.resetForm()
this.$parent.initPost()
}, },
doSubmit() { doSubmit() {
this.form.orgCode = this.$store.state.user.user.baseJpOrganization.code.substring(0,6) this.form.orgCode = this.$store.state.user.user.baseJpOrganization.code.substring(0,6)
......
...@@ -203,6 +203,7 @@ export default { ...@@ -203,6 +203,7 @@ export default {
}) })
}, },
handleConfirm() { handleConfirm() {
this.form.applyOrgId = this.form.targetOrgId
let form = { ...this.form, ...this.processForm } let form = { ...this.form, ...this.processForm }
if (!form.policeId) { if (!form.policeId) {
this.loading = false this.loading = false
......
...@@ -156,6 +156,8 @@ export default { ...@@ -156,6 +156,8 @@ export default {
this.$refs.applyForm.initOrgTree() this.$refs.applyForm.initOrgTree()
this.$refs.applyForm.initPolicemanList() this.$refs.applyForm.initPolicemanList()
this.$refs.applyForm.getProcess() this.$refs.applyForm.getProcess()
const _this = this.$refs.applyForm
_this.detailList = []
this.$refs.applyForm.dialog = true this.$refs.applyForm.dialog = true
}, },
edit(data) { edit(data) {
......
<template>
<div>
<!--表格渲染-->
<el-table ref="table" :data="data" border style="width: 94%;margin:auto;">
<el-table-column label="序号" align="center" width="50">
<template slot-scope="props">
{{ props.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="equipmentName" label="装备名称" align="center"/>
<el-table-column prop="sizeName" label="装备型号名称" align="center"/>
<el-table-column prop="warehouseName" label="仓库名称" width="160" align="center">
<template slot-scope="data">
{{ data.row.warehouseName || data.row.name+'单警柜' }}
</template>
</el-table-column>
<el-table-column prop="supplierName" label="供应商名称" width="180" align="center"/>
<!-- <el-table-column label="生产日期" align="center">
<template slot-scope="scope">
{{ parseTimes(scope.row.productTime) }}
</template>
</el-table-column> -->
<el-table-column :show-overflow-tooltip="true" prop="address" label="位置" align="center">
<template slot-scope="props">
<span v-if="[3,7].includes(props.row.currentState)"> {{props.row.cabinetNum}}-{{props.row.cabinetChildNum}}</span>
<span v-else> {{ props.row.shelfName ? props.row.shelfName + (props.row.range ? ('-' + props.row.range) : (props.row.column ? '-X' : (props.row.row ? '-X' : ''))) + (props.row.column ? ('-' + props.row.column) : (props.row.row ? '-X' : '')) + (props.row.row ? ('-' + props.row.row) : '') : '' }}</span>
</template>
</el-table-column>
<el-table-column label="安全等级" align="center" width="150px">
<template slot-scope="scope">
<el-tag v-if="scope.row.safeLevel == 0" type="success">质保期内</el-tag>
<el-tag v-else-if="scope.row.safeLevel == 1" type="warning">即将过期</el-tag>
<el-tag v-else-if="scope.row.safeLevel == 2" type="danger">已过质保期</el-tag>
</template>
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<el-tag v-if="[0,3].includes(scope.row.currentState)" type="success">在库</el-tag>
<el-tag v-else-if="[6].includes(scope.row.currentState)&& orgCode != '330200000000'" type="danger">已报废</el-tag>
<el-tag v-else-if="[6].includes(scope.row.currentState)&& orgCode == '330200000000'" type="danger">已销毁</el-tag>
<el-tag v-else type="warning">出库</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="150" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="show(scope.row.id)">查看</el-button>
<el-button size="mini" type="warning" :disabled="[6].includes(scope.row.currentState)" @click="edit(scope.row.id)">编辑</el-button>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination style="margin-top: 8px;" layout="total, prev, pager, next" :total="total"
:page-size="5" :current-page="page + 1" @current-change="postPageChange"></el-pagination>
<!--表单组件-->
<eForm ref="form" />
<eqInformation ref="equipment" @ok="refresh"/>
</div>
</template>
<script>
import initData from '@/mixins/initData'
import { initPdata } from '@/api/data'
import { transform } from '@/utils/index'
import eForm from '@/views/warehouse/maintenance/form'
import eqInformation from '@/views/warehouse/maintenance/eqInformation'
import { getInfoByID } from '@/api/inventory'
import { parseTimes } from '@/utils/index'
export default {
name: 'EquipmentSize',
props: {
orgId: {
type: String
},
warehouseId: {
type: String
},
equipmentSizeId: {
type: String
},
shelfId: {
type: String
},
range: {
type: String
},
row: {
type: String
},
column: {
type: String
}
},
components: { eForm, eqInformation },
mixins: [initData],
data() {
return {
orgCode: this.$store.state.user.user.baseJpOrganization.code,
selection: '',
size: 5
}
},
created() {
this.initPost()
},
methods: {
parseTimes,
initPost() {
//var url = window._CONFIG['serviceURL'] + '/api/Inventory/GetListEquipmentByOrgSize'
var url = window._CONFIG['serviceURL'] + '/api/Inventory/GetListEquipmentByOrgSizeV2'
var params = { page: this.page, size: this.size, orgId: this.orgId || this.$store.state.user.user.baseJpOrganization.id,
warehouseId: this.warehouseId, equipmentSizeId: this.equipmentSizeId, shelfId: this.shelfId, range: this.range, row: this.row, column: this.column }
initPdata(url, transform(params)).then(res => {
if (res.code === '10000') {
this.total = res.data.totalElements
this.data = res.data.content
} else this.$message.error(res.msg)
})
},
show(id) {
const _this = this.$refs.form
getInfoByID({id: id}).then(res => {
if(res.code == '10000') {
_this.form = res.data
_this.stateList = res.data.stateList.slice(0, 3)
_this.total = res.data.stateList.length
} else {
this.$message.error(res.msg)
}
})
_this.dialog = true
},
async edit(id) {
const _this = this.$refs.equipment
await getInfoByID({id: id}).then(res => {
if(res.code == '10000') {
_this.initShelfList(res.data.warehouseCode)
_this.form = {
id: res.data.id,
epc: res.data.epc,
name: res.data.name,
warehouseName: res.data.warehouseName,
equipmentName: res.data.equipmentName,
sizeName: res.data.sizeName,
supplierName: res.data.supplierName,
currentState: res.data.currentState,
repairCycle: res.data.repairCycle,
price: res.data.price,
warrantyCycle: res.data.warrantyCycle,
useTime: res.data.useTime,
productTime: res.data.productTime,
shelfId: res.data.shelfId,
range: res.data.range,
row: res.data.row,
column: res.data.column
}
} else {
this.$message.error(res.msg)
}
})
_this.dialog = true
},
refresh() {
this.$emit('refresh')
}
}
}
</script>
<style scoped>
.dev-type-main-left {
overflow: auto;
padding: 10px;
}
.right-menu {
z-index: 1;
position: absolute;
height: 100px;
width: 100px;
position: absolute;
border-radius: 5px;
border: 1px solid #ccc;
background-color: white;
}
.menu-item {
line-height: 20px;
text-align: left;
margin-top: 10px;
font-size: 14px;
color: #606266;
}
li:hover {
background-color: #edf6ff;
color: #606266;
}
</style>
<style rel="stylesheet/scss" lang="scss" scoped>
.dashboard-editor-container {
padding: 7px 7px 7px 7px;
background-color: rgb(240, 242, 245);
.chart-wrapper {
background: #fff;
padding: 16px 16px 0;
height : 650px
}
}
</style>
<template> <template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" ref="form" :visible.sync="dialog" :title="'查看装备库存状态'" width="1200px"> <el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" ref="form" :visible.sync="dialog" :title="'查看装备库存状态'" width="1200px">
<!-- 搜索 -->
<div class="head-container">
<el-cascader v-model="id" :options="orgList"
:props="{ value: 'id', label: 'name', checkStrictly: true, emitPath: false }" filterable
class="filter-item" style="width: 300px;margin-left:0px" placeholder="请选择本级或下级的组织机构" @change="orgChange"/>
<el-select v-model="sizeId"
v-if="id!==''"
style="width:240px "
class="filter-item"
:filterable="true"
placeholder="请选择装备型号"
@change="orgChangeSizeFind">
<el-option v-for="item in equipmentSizeList" :key="item.id" :label="item.sizeName" :value="item.id"/>
</el-select>
<el-select v-model="sizeId"
v-if="id==''"
style="width:240px "
class="filter-item"
:filterable="true"
placeholder="请选择装备型号"
@change="orgChangeSizeFind2">
<el-option v-for="item in equipmentSizeList" :key="item.id" :label="item.sizeName" :value="item.id"/>
</el-select>
<el-button type="warning" @click="clearSelected" class="filter-item" size="small" style="margin-left:5px">重置</el-button>
</div>
<!--表格渲染--> <!--表格渲染-->
<el-table ref="table" v-loading="loading" :row-key="getRowKeys" :data="data" style="width: 100%;" stripe border> <el-table ref="table" v-loading="loading" :row-key="getRowKeys" :data="data" style="width: 100%;" max-height="530" stripe border>
<el-table-column type="expand" width="50"> <el-table-column type="expand" width="50">
<template slot-scope="props"> <template slot-scope="props">
<detail-form :orgId="props.row.orgId" :warehouseId="props.row.warehouseCode" :equipmentSizeId="props.row.equipmentSizecode"/> <detail-form :orgId="props.row.orgId" :warehouseId="props.row.warehouseCode" :equipmentSizeId="props.row.equipmentSizecode"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column type="index" label="序号" width="50" align="center"/> <el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="warehouseName" label="仓库名称" align="center"/>
<el-table-column prop="equipmentName" label="装备名称" align="center"/> <el-table-column prop="equipmentName" label="装备名称" align="center"/>
<el-table-column prop="sizeName" label="装备型号名称" align="center"/> <el-table-column prop="sizeName" label="装备型号名称" align="center"/>
<el-table-column prop="orgName" label="组织机构名称" width="300" align="center"/>
<el-table-column prop="zsCount" label="装备总数" align="center"/> <el-table-column prop="zsCount" label="装备总数" align="center"/>
<el-table-column prop="zkCount" label="在库数" align="center"/> <el-table-column prop="zkCount" label="在库数" align="center"/>
<el-table-column prop="ckCount" label="出库数" align="center"/> <el-table-column prop="ckCount" label="出库数" align="center"/>
...@@ -26,7 +51,9 @@ ...@@ -26,7 +51,9 @@
</template> </template>
<script> <script>
import detailForm from '@/views/warehouse/stock/detail' import { getListOrg, getOrgById } from '@/api/org'
import { getListEquipmentSize } from '@/api/equipmentSize'
import detailForm from './detail'
import { initData, initPdata, initGdata } from '@/api/data' import { initData, initPdata, initGdata } from '@/api/data'
import { transform } from '@/utils/index' import { transform } from '@/utils/index'
export default { export default {
...@@ -35,22 +62,112 @@ export default { ...@@ -35,22 +62,112 @@ export default {
}, },
data() { data() {
return { return {
//orgId: this.$store.state.user.user.baseJpOrganization.id,
orgCode: this.$store.state.user.user.baseJpOrganization.code, orgCode: this.$store.state.user.user.baseJpOrganization.code,
dialog:false, dialog:false,
data: [], data: [],
orgList: [],
id:'',
orgId:'',
findCode:'',
equipmentId:'',
equipmentSizeList:[],
selected: [],
sizeId:'',
loading: true, loading: true,
url: '', url: '',
params: {} params: {}
} }
}, },
methods: { methods: {
initTable(equipmentId, findCode, orgCode, code) { initTable(equipmentId, findCode, orgCode, code, orgId) {
this.equipmentId = equipmentId
this.findCode= findCode
this.orgId = orgId
this.url = window._CONFIG['serviceURL'] + '/api/Inventory/GetListEquByFindCode' this.url = window._CONFIG['serviceURL'] + '/api/Inventory/GetListEquByFindCode'
this.params = { findCode: findCode, equipmentId: equipmentId, orgCode: orgCode.substring(6,8) === '00' ? (orgCode === code ? orgCode: '') : orgCode } // 先判断是不是 派出所还是上级,派出所直接传orgCode,上级会包含本级及下级的,相等的话传本级 this.params = { findCode: findCode, equipmentId: equipmentId, orgCode: orgCode.substring(6,8) === '00' ? (orgCode === code ? orgCode: '') : orgCode } // 先判断是不是 派出所还是上级,派出所直接传orgCode,上级会包含本级及下级的,相等的话传本级
this.initPost() this.initPost()
this.initOrgList()
getListEquipmentSize({detailId : this.equipmentId}).then(res => {
this.equipmentSizeList = res.data
//号型重新排序
// let newData = res.data.sort(function(x, y) {
// return x.sizeName.localeCompare(y.sizeName);
// });
// this.equipmentSizeList = newData
})
},
orgChange(id) {
getOrgById({id:id}).then(res => {
this.orgName = res.data.name
this.orgId = res.data.id
this.initPost2()
})
},
clearSelected() {
this.id = '';
this.sizeId ='';
this.initPost();
console.log(1111111)
},
async initPost2() {
return new Promise((resolve, reject) => {
this.loading = true
initPdata(this.url, transform({findCode: this.findCode, equipmentId: this.equipmentId, sizeId: this.sizeId, orgId: this.orgId})).then(res => {
if (res.code === '10000') {
this.data = res.data
//按号型重新排序
// let newData = res.data.sort(function(x, y) {
// return x.sizeName.localeCompare(y.sizeName);
// });
// this.data = newData
// console.log(this.data)
setTimeout(() => {
this.loading = false
}, this.time)
resolve(res)
} else this.$message.error(res.msg)
}).catch(err => {
this.loading = false
reject(err)
})
})
},
orgChangeSizeFind(){
this.findCode=this.findCode,
this.initPost2()
},
orgChangeSizeFind2(sizeId){
this.sizeId =sizeId
this.findCode=this.findCode,
this.initPost3()
//console.log('2222')
},
async initPost3() {
return new Promise((resolve, reject) => {
this.loading = true
initPdata(this.url, transform({findCode: this.findCode, equipmentId: this.equipmentId, sizeId: this.sizeId})).then(res => {
if (res.code === '10000') {
this.data = res.data
//按号型重新排序
// let newData = res.data.sort(function(x, y) {
// return x.sizeName.localeCompare(y.sizeName);
// });
// this.data = newData
//console.log(this.data)
setTimeout(() => {
this.loading = false
}, this.time)
resolve(res)
} else this.$message.error(res.msg)
}).catch(err => {
this.loading = false
reject(err)
})
})
}, },
getRowKeys(row) { getRowKeys(row) {
return row.equipmentCode + row.equipmentSizecode + row.warehouseCode return row.equipmentCode + row.equipmentSizecode + row.warehouseCode + row.orgId
}, },
async initPost() { async initPost() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -58,6 +175,12 @@ export default { ...@@ -58,6 +175,12 @@ export default {
initPdata(this.url, transform(this.params)).then(res => { initPdata(this.url, transform(this.params)).then(res => {
if (res.code === '10000') { if (res.code === '10000') {
this.data = res.data this.data = res.data
//按号型重新排序
// let newData = res.data.sort(function(x, y) {
// return x.sizeName.localeCompare(y.sizeName);
// });
// this.data = newData
//console.log(this.data)
setTimeout(() => { setTimeout(() => {
this.loading = false this.loading = false
}, this.time) }, this.time)
...@@ -69,11 +192,21 @@ export default { ...@@ -69,11 +192,21 @@ export default {
}) })
}) })
}, },
initOrgList() {
getListOrg({id: this.orgId}).then(res => {
this.orgList = res.data
console.log(this.orgList)
});
},
cancel() { cancel() {
this.resetForm() this.resetForm()
}, },
resetForm() { resetForm() {
this.dialog = false this.dialog = false
this.orgId =''
this.findCode =''
this.equipmentId =''
this.sizeId =''
} }
} }
} }
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<el-table-column prop="bfCount" label="报废数" sortable align="center" v-if="$store.state.user.user.baseJpOrganization.code !== '330200000000'"/> <el-table-column prop="bfCount" label="报废数" sortable align="center" v-if="$store.state.user.user.baseJpOrganization.code !== '330200000000'"/>
<el-table-column label="操作" width="80" align="center" fixed="right"> <el-table-column label="操作" width="80" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" @click="show(scope.row.id, props.row.findCode, props.row.orgCode)">查看</el-button> <el-button size="mini" type="primary" @click="show(scope.row.id, props.row.findCode, props.row.orgCode,props.row.orgId)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -319,9 +319,9 @@ export default { ...@@ -319,9 +319,9 @@ export default {
return sums; return sums;
}, },
show(equipmentId, findCode, orgCode) { show(equipmentId, findCode, orgCode, orgId) {
const _this = this.$refs.form const _this = this.$refs.form
_this.initTable(equipmentId, findCode, orgCode, this.code) _this.initTable(equipmentId, findCode, orgCode, this.code, orgId)
_this.dialog = true _this.dialog = true
} }
} }
......
...@@ -160,22 +160,19 @@ export default { ...@@ -160,22 +160,19 @@ export default {
typeList: [ typeList: [
{name:"全部装备",value:"装备总数"}, {name:"全部装备",value:"装备总数"},
{name:"在库装备",value:"在库数量"}, {name:"在库装备",value:"在库数量"},
{name:"仓库装备",value:"仓库装备"},
{name:"调拨中",value:"调拨数量"}, {name:"调拨中",value:"调拨数量"},
{name:"使用中",value:"领用数量"}, {name:"使用中",value:"领用数量"},
{name:"维修装备",value:"维修数量"}, {name:"维修装备",value:"维修数量"},
{name:"报废装备",value:"报废数量"},
{name:"单警柜装备",value:"单警柜装备"}, {name:"单警柜装备",value:"单警柜装备"},
], ],
typeListNb: [ typeListNb: [
{name:"全部装备",value:"装备总数"}, {name:"全部装备",value:"装备总数"},
{name:"在库装备",value:"在库数量"}, {name:"在库装备",value:"在库数量"},
{name:"仓库装备",value:"仓库装备"},
{name:"调拨中",value:"调拨数量"}, {name:"调拨中",value:"调拨数量"},
{name:"使用中",value:"领用数量"}, {name:"使用中",value:"领用数量"},
{name:"维修装备",value:"维修数量"}, {name:"维修装备",value:"维修数量"},
{name:"报废装备",value:"报废区数量"}, // {name:"报废装备",value:"报废区数量"},
{name:"销毁装备",value:"销毁数量"}, // {name:"销毁装备",value:"销毁数量"},
{name:"单警柜装备",value:"单警柜装备"}, {name:"单警柜装备",value:"单警柜装备"},
], ],
orgCode: this.$store.state.user.user.baseJpOrganization.code, orgCode: this.$store.state.user.user.baseJpOrganization.code,
......
...@@ -174,19 +174,22 @@ export default { ...@@ -174,19 +174,22 @@ export default {
getWzByEpc({epc : backMessObj.Content}).then(res => { getWzByEpc({epc : backMessObj.Content}).then(res => {
if (res.code === "10000"){ if (res.code === "10000"){
if (!this.epsList.includes(backMessObj.Content)) { if (!this.epsList.includes(backMessObj.Content)) {
if (res.data.warehouseId == null || res.data.warehouseId == '') {
if(res.data.orgId == this.$store.state.user.user.baseJpOrganization.id) { if(res.data.orgId == this.$store.state.user.user.baseJpOrganization.id) {
if (res.data.warehouseId == this.form.warehouseId || res.data.warehouseId == null || res.data.warehouseId == '') {
this.epsList.unshift(backMessObj.Content) this.epsList.unshift(backMessObj.Content)
this.handleAdd(res.data) this.handleAdd(res.data)
} else {
this.$message.warning('组织机构不匹配')
} }
}else{
this.$message.warning('组织机构不匹配')
} }
if (res.data.warehouseId == this.form.warehouseId) { if (res.data.warehouseId == this.form.warehouseId) {
this.epsList.unshift(backMessObj.Content) this.epsList.unshift(backMessObj.Content)
this.handleAdd(res.data) this.handleAdd(res.data)
} }
} }
}else{
this.$message.warning(res.msg)
} }
}) })
}else if (![0,1,2,5].includes(backMessObj.CmdType)){ }else if (![0,1,2,5].includes(backMessObj.CmdType)){
...@@ -238,11 +241,17 @@ export default { ...@@ -238,11 +241,17 @@ export default {
getWzByEpc({epc : this.eqEpc}).then(res => { getWzByEpc({epc : this.eqEpc}).then(res => {
if(res.code === "10000"){ if(res.code === "10000"){
if (!this.epsList.includes(this.eqEpc)) { if (!this.epsList.includes(this.eqEpc)) {
if (res.data.warehouseId == this.form.warehouseId) { // if (res.data.warehouseId == this.form.warehouseId ) {
// this.epsList.push(this.eqEpc)
// this.handleAdd(res.data)
// } else {
// this.$message.warning('仓库未匹配成功')
// }
if (res.data.orgId == this.$store.state.user.user.baseJpOrganization.id ) {
this.epsList.push(this.eqEpc) this.epsList.push(this.eqEpc)
this.handleAdd(res.data) this.handleAdd(res.data)
} else { } else {
this.$message.warning('仓库未匹配成功') this.$message.warning('组织机构不匹配')
} }
} }
} else { } else {
...@@ -257,6 +266,7 @@ export default { ...@@ -257,6 +266,7 @@ export default {
}, },
cancel() { cancel() {
this.resetForm() this.resetForm()
this.$parent.initPost()
}, },
doSubmit() { doSubmit() {
this.form.orgCode = this.$store.state.user.user.baseJpOrganization.code.substring(0,6) this.form.orgCode = this.$store.state.user.user.baseJpOrganization.code.substring(0,6)
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
<el-tab-pane style="margin-left: 20px"> <el-tab-pane style="margin-left: 20px">
<span slot="label"><i class="el-icon-document"></i>&nbsp;报废信息</span> <span slot="label"><i class="el-icon-document"></i>&nbsp;报废信息</span>
<el-collapse v-model="collapseNum"> <el-collapse v-model="collapseNum">
<el-collapse-item name="1"> <el-collapse-item name="1" >
<template slot="title"> <el-tag>仓库</el-tag></template> <template slot="title"> <el-tag>仓库</el-tag></template>
<el-form-item prop="warehouseId" label-width="6px"> <el-form-item prop="warehouseId" label-width="6px" v-if="this.form.warehouseId==null">
<el-select v-model="form.warehouseId" style="width:240px" filterable placeholder="请选择目标仓库" :disabled="true"> <el-select v-model="form.warehouseId" style="width:240px" filterable placeholder="请选择目标仓库" :disabled="true">
<el-option <el-option
v-for="item in warehouseList" v-for="item in warehouseList"
...@@ -17,6 +17,17 @@ ...@@ -17,6 +17,17 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="warehouseId" label-width="6px" v-if="this.form.warehouseId!=null">
<el-select v-model="form.warehouseId" style="width:240px" filterable placeholder="请选择目标仓库" >
<el-option
v-for="item in warehouseList"
:key="item.name"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-collapse-item> </el-collapse-item>
<el-collapse-item name="2"> <el-collapse-item name="2">
<template slot="title"> <el-tag>遗失装备信息</el-tag></template> <template slot="title"> <el-tag>遗失装备信息</el-tag></template>
...@@ -74,6 +85,8 @@ import { addOrUpdateFixed,getWzByEpc } from '@/api/fixReceiveApply' ...@@ -74,6 +85,8 @@ import { addOrUpdateFixed,getWzByEpc } from '@/api/fixReceiveApply'
import {getListOrgWarehouse } from '@/api/warehouse' import {getListOrgWarehouse } from '@/api/warehouse'
import { getProcess, getAllProcess } from '@/api/process' import { getProcess, getAllProcess } from '@/api/process'
import { deleteTxt, addTxt, getListTxt } from '@/api/policeman' import { deleteTxt, addTxt, getListTxt } from '@/api/policeman'
import { Message } from 'element-ui';
import EventBus from '@/utils/event-bus.js'
export default { export default {
data() { data() {
return { return {
...@@ -113,9 +126,19 @@ export default { ...@@ -113,9 +126,19 @@ export default {
}, },
texts: [], texts: [],
inputVisible: false, inputVisible: false,
inputValue: '' inputValue: '',
//message: ''
} }
}, },
mounted() {
// if (EventBus) {
// EventBus.$on('show-message', message => {
// Message.warning(message);
// });
// } else {
// console.error('EventBus not defined');
// }
},
methods: { methods: {
//获取仓库列表 //获取仓库列表
getListOrgWarehouse() { getListOrgWarehouse() {
...@@ -152,7 +175,7 @@ export default { ...@@ -152,7 +175,7 @@ export default {
if(res.code === "10000"){ if(res.code === "10000"){
this.resetForm() this.resetForm()
this.$notify({ this.$notify({
title: '成功', title: '操作成功',
type: 'success', type: 'success',
duration: 2500 duration: 2500
}) })
...@@ -242,7 +265,7 @@ export default { ...@@ -242,7 +265,7 @@ export default {
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped >
/deep/ .el-input-number .el-input__inner { /deep/ .el-input-number .el-input__inner {
text-align: left; text-align: left;
} }
......
...@@ -76,6 +76,7 @@ import { getInfoByID, setLostEquipment } from '@/api/inventory' ...@@ -76,6 +76,7 @@ import { getInfoByID, setLostEquipment } from '@/api/inventory'
import eForm from '../maintenance/form' import eForm from '../maintenance/form'
import applyForm from './form' import applyForm from './form'
import initData from '@/mixins/initData' import initData from '@/mixins/initData'
import EventBus from '@/utils/event-bus'
export default { export default {
name: 'Loss', name: 'Loss',
components: { eForm, applyForm }, components: { eForm, applyForm },
...@@ -143,11 +144,27 @@ export default { ...@@ -143,11 +144,27 @@ export default {
quantity : 1 quantity : 1
} }
const _this = this.$refs.applyForm const _this = this.$refs.applyForm
_this.form.warehouseId = data.warehouseId
_this.getListOrgWarehouse() _this.getListOrgWarehouse()
_this.getProcess() _this.getProcess()
_this.form.detailList.push(row) _this.form.detailList.push(row)
_this.dialog = true _this.dialog = true
// if (data.warehouseId != null) {
// _this.form.warehouseId = data.warehouseId;
// } else {
// EventBus.$emit('show-message', '无所属仓库,请为其选择所属仓库');
// }
if(data.warehouseId!=null){
_this.form.warehouseId = data.warehouseId
}else{
this.$nextTick(() => {
_this.$message.warning({
message :'该装备无所属仓库,请为其选择所属仓库',
customClass:'messageboxIndex'
})
});
}
// this.$confirm('是否确认遗失?', '确认操作', { // this.$confirm('是否确认遗失?', '确认操作', {
// confirmButtonText: '确定', // confirmButtonText: '确定',
// cancelButtonText: '取消', // cancelButtonText: '取消',
...@@ -171,9 +188,12 @@ export default { ...@@ -171,9 +188,12 @@ export default {
} }
</script> </script>
<style scoped> <style lang="less" >
.dashboard-editor-container { .dashboard-editor-container {
padding: 10px 12px 12px 12px; padding: 10px 12px 12px 12px;
background-color: rgb(240, 242, 245); background-color: rgb(240, 242, 245);
} }
.messageboxIndex {
z-index: 9999 !important;
}
</style> </style>
...@@ -49,9 +49,11 @@ ...@@ -49,9 +49,11 @@
<th class="textHeader">生产日期</th> <th class="textHeader">生产日期</th>
<td class="textContent">{{ parseTimes(form.productTime) }}</td> <td class="textContent">{{ parseTimes(form.productTime) }}</td>
<th class="textHeader">质保周期</th> <th class="textHeader">质保周期</th>
<td class="textContent">{{form.warrantyCycle}}个月{{ form.safeLevel === 0 ? '(质保期内)' : form.safeLevel === 1 ? '(即将过期)' : '(已过质保期)' }}</td> <!-- <td class="textContent">{{form.warrantyCycle}}个月{{ form.safeLevel === 0 ? '(质保期内)' : form.safeLevel === 1 ? '(即将过期)' : '(已过质保期)' }}</td> -->
<td class="textContent">{{form.warrantyCycle !== 0 ? (form.warrantyCycle + '个月') : '无'}}{{form.warrantyCycle !== 0 ? (form.safeLevel === 0 ? '(质保期内)' : form.safeLevel === 1 ? '(即将过期)' : '(已过质保期)') : ''}}</td>
<th class="textHeader">截止日期</th> <th class="textHeader">截止日期</th>
<td class="textContentLast">{{ parseTimes(new Date(form.productTime).getTime() + 86400*1000*form.warrantyCycle/12*365) }}</td> <!-- <td class="textContentLast">{{ parseTimes(new Date(form.productTime).getTime() + 86400*1000*form.warrantyCycle/12*365) }}</td> -->
<td class="textContentLast">{{ form.warrantyCycle !== 0 ? parseTimes(new Date(form.productTime).getTime() + 86400 * 1000 * form.warrantyCycle / 12 * 365) : '无' }}</td>
</tr> </tr>
<tr style="border-bottom:1px solid #e8e8e8;"> <tr style="border-bottom:1px solid #e8e8e8;">
<th class="textHeader">价格</th> <th class="textHeader">价格</th>
...@@ -102,9 +104,9 @@ ...@@ -102,9 +104,9 @@
{{scope.row.outInState == 0 ? '出库': '入库'}} {{scope.row.outInState == 0 ? '出库': '入库'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" fixed="right"> <el-table-column label="抓拍记录" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="warning" v-if="scope.row.picUrl" @click="previewPic(encodeURI(baseApi2 + scope.row.picUrl))">预览</el-button> <el-button size="mini" type="warning" :disabled="scope.row.picUrl==null ||scope.row.picUrl===''" @click="previewPic(encodeURI(baseApi2 + scope.row.picUrl))">预览</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -131,9 +133,9 @@ ...@@ -131,9 +133,9 @@
{{scope.row.outInState == 0 ? '出库': '入库'}} {{scope.row.outInState == 0 ? '出库': '入库'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" fixed="right"> <el-table-column label="抓拍记录" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="warning" v-if="scope.row.picUrl" @click="previewPic(encodeURI(baseApi2 + scope.row.picUrl))">预览</el-button> <el-button size="mini" type="warning" :disabled="scope.row.picUrl==null ||scope.row.picUrl===''" @click="previewPic(encodeURI(baseApi2 + scope.row.picUrl))">预览</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -104,7 +104,7 @@ export default { ...@@ -104,7 +104,7 @@ export default {
parseTimes, parseTimes,
initPost() { initPost() {
var url = window._CONFIG['serviceURL'] + '/api/Inventory/GetGroupListEquipmentByOrgAndTypeDetailV2' var url = window._CONFIG['serviceURL'] + '/api/Inventory/GetGroupListEquipmentByOrgAndTypeDetailV2'
var params = { page: this.page, size: this.size, orgId: this.orgId || this.$store.state.user.user.baseJpOrganization.id, var params = { page: this.page, size: this.size, orgId: this.orgId ,
type: this.type, level: this.level, name: this.name, topTypeName: this.topTypeName, safeLevel: this.safeLevel, equipmentSizeId: this.equipmentSizeId } type: this.type, level: this.level, name: this.name, topTypeName: this.topTypeName, safeLevel: this.safeLevel, equipmentSizeId: this.equipmentSizeId }
const type = this.type const type = this.type
const level = this.level const level = this.level
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<el-table ref="table" v-loading="loading" row-key="id" :data="data" show-summary :summary-method="getSummaries" highlight-current-row border style="width: 100%;" :expand-row-keys="expandedRowKeys" @row-click="rowClick" @expand-change="expandChange"> <el-table ref="table" v-loading="loading" row-key="id" :data="data" show-summary :summary-method="getSummaries" highlight-current-row border style="width: 100%;" :expand-row-keys="expandedRowKeys" @row-click="rowClick" @expand-change="expandChange">
<el-table-column type="expand" width="50" align="center"> <el-table-column type="expand" width="50" align="center">
<template slot-scope="props"> <template slot-scope="props">
<detail-form :orgId="orgId" :type="type" :level="level" :name="props.row.equipmentName" :topTypeName="topTypeName" :safeLevel="safeLevel" :equipmentSizeId="props.row.equipmentSizecode" <detail-form :orgId="props.row.orgizationId" :type="type" :level="level" :name="props.row.equipmentName" :topTypeName="topTypeName" :safeLevel="safeLevel" :equipmentSizeId="props.row.equipmentSizecode"
:row="row" :column="column" @refresh="handleRefresh"/> :row="row" :column="column" @refresh="handleRefresh"/>
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -111,7 +111,11 @@ ...@@ -111,7 +111,11 @@
<el-table-column prop="warehouseName" label="仓库名称" align="center" width="300"/> <el-table-column prop="warehouseName" label="仓库名称" align="center" width="300"/>
<el-table-column prop="equipmentName" label="装备名称" align="center"/> <el-table-column prop="equipmentName" label="装备名称" align="center"/>
<el-table-column prop="equipmentSizeName" label="装备型号名称" align="center"/> <el-table-column prop="equipmentSizeName" label="装备型号名称" align="center"/>
<el-table-column prop="sumCount" label="装备总数" align="center" sortable/> <el-table-column label="装备总数" align="center" sortable>
<template slot-scope="scope">
{{scope.row.sumCount - scope.row.bfCount}}
</template>
</el-table-column>
<el-table-column prop="zkCount" label="在库数" align="center" sortable/> <el-table-column prop="zkCount" label="在库数" align="center" sortable/>
<el-table-column prop="ckCount" label="出库数" align="center" sortable/> <el-table-column prop="ckCount" label="出库数" align="center" sortable/>
<el-table-column prop="baofeiquCount" label="报废数" align="center" sortable v-if="$store.state.user.user.baseJpOrganization.code === '330200000000'"/> <el-table-column prop="baofeiquCount" label="报废数" align="center" sortable v-if="$store.state.user.user.baseJpOrganization.code === '330200000000'"/>
......
...@@ -262,6 +262,7 @@ export default { ...@@ -262,6 +262,7 @@ export default {
}, },
cancel() { cancel() {
this.resetForm() this.resetForm()
this.$parent.initPost()
}, },
doSubmit() { doSubmit() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论