This commit is contained in:
gtz217 2021-12-17 17:13:28 +08:00
parent 1231ba99c3
commit eb3288b3ed
4 changed files with 170 additions and 122 deletions

View File

@ -1,8 +1,8 @@
<!--
* @Author: zwq
* @Date: 2021-11-17 15:49:18
* @LastEditors: zwq
* @LastEditTime: 2021-11-17 15:58:31
* @LastEditors: gtz
* @LastEditTime: 2021-12-17 17:02:25
* @Description:
-->
<template>
@ -11,7 +11,9 @@
:visible.sync="visible">
<el-table
:data="dataList"
border
v-loading="formLoading"
:stripe="true"
:header-cell-style="{background:'#eef1f6',color:'#606266',height: '56px'}"
style="width: 100%;">
<el-table-column
type="index"
@ -21,19 +23,19 @@
width="50">
</el-table-column>
<el-table-column
prop="id"
prop="idenCardNum"
header-align="center"
align="center"
label="标识卡">
</el-table-column>
<el-table-column
prop="id1"
prop="customer"
header-align="center"
align="center"
label="客户信息">
</el-table-column>
<el-table-column
prop="number"
prop="quantity"
header-align="center"
align="center"
label="数量">
@ -56,24 +58,27 @@
data () {
return {
visible: false,
dataList: []
dataList: [],
formLoading: false
}
},
methods: {
init (id) {
this.visible = true
this.formLoading = true
this.$nextTick(() => {
if (id) {
this.$http({
url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`),
method: 'get',
params: this.$http.adornParams()
url: this.$http.adornUrl(`/outStock/get`),
method: 'post',
data: this.$http.adornData({ id })
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.paramKey = data.config.paramKey
this.dataForm.paramValue = data.config.paramValue
this.dataForm.remark = data.config.remark
this.dataForm = data.data
} else {
this.$message.error(data.msg)
}
this.formLoading = false
})
}
})

View File

@ -1,40 +1,24 @@
<!--
* @Author: zwq
* @Date: 2021-11-15 15:17:30
* @LastEditors: zwq
* @LastEditTime: 2021-11-17 16:07:04
* @LastEditors: gtz
* @LastEditTime: 2021-12-17 17:05:22
* @Description:
-->
<template>
<div>
<div v-loading="dataListLoading">
<div class="mainDiv" style="margin:10px 0 100px">
<div class="flexDiv">
<div
class="wareBox"
:class="[
count > Math.round(Math.random() * 10) ? 'enableBox' : 'disableBox',
{ active: count === isActive }
item.empty === 1 ? 'enableBox' : 'disableBox',
{ active: item.locationId === isActive }
]"
@click="selectBox(count)"
v-for="count in 10"
v-bind:key="count"
@click="selectBox(item.locationId)"
v-for="item in warehouseList"
:key="item.locationId"
>
<div class="plat">库位{{ count }}</div>
</div>
</div>
<div class="flexDiv">
<div
class="wareBox"
:class="[
count > Math.round(Math.random() * 10) ? 'enableBox' : 'disableBox',
{ active: count + 10 === isActive }
]"
@click="selectBox(count + 10)"
v-for="count in 10"
v-bind:key="count"
>
<div class="plat">库位{{ count + 10 }}</div>
</div>
<div class="plat">{{ item.locationName }}</div>
</div>
</div>
<div class="line"></div>
@ -59,31 +43,66 @@ export default {
data () {
return {
isActive: '',
ExWarehouseInfoVisible: false
ExWarehouseInfoVisible: false,
dataListLoading: false,
warehouseList: []
}
},
components: {
ExWarehouseInfo
},
created () {},
created () {
this.getWarehouseList()
},
methods: {
selectBox (count) {
this.isActive = count
getWarehouseList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/outStock/list'),
method: 'post'
}).then(({data}) => {
if (data && data.code === 0) {
this.warehouseList = data.data
} else {
this.warehouseList = []
}
this.dataListLoading = false
})
},
selectBox (id) {
this.isActive = id
this.ExWarehouseInfoVisible = true
this.$nextTick(() => {
this.$refs.ExWarehouseInfoRef.init()
this.$refs.ExWarehouseInfoRef.init(id)
})
},
selectPlat (count) {
if (this.isActive) {
this.$confirm(`确认从库位${this.isActive}出库至提升台${count}?`, '提示', {
this.$confirm(`确认从库位id为[${this.isActive}]出库至提升台${count}?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'info '
}).then(() => {
this.$http({
url: this.$http.adornUrl('/outStock/runOutTask'),
method: 'post',
data: this.$http.adornData({
code: count,
localtionId: this.isActive
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
type: 'success',
message: '出库成功!'
message: '出库成功!',
onClose: () => {
this.getWarehouseList()
}
})
} else {
this.$message.error(data.msg)
}
this.dataListLoading = false
})
}).catch(() => {
this.$message({
@ -132,6 +151,7 @@ export default {
.wareBox {
cursor: pointer;
margin: 10px;
width: 100px;
height: 100px;
padding: 10px;
line-height: 90px;

View File

@ -1,18 +1,18 @@
<template>
<div class="mod-log">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<div class="mod-config">
<el-form style="display: flex; align-items: center; justify-content: right;" :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-select v-model="dataForm.key" filterable placeholder="车辆名称">
<el-select size="small" v-model="dataForm.equipmentId" clearable filterable placeholder="车辆名称">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in carList"
:key="item.id"
:label="item.vehicleName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<!-- <el-form-item>
<el-date-picker
v-model="dataForm.time"
value-format="yyyy-MM-dd"
@ -22,14 +22,15 @@
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
</el-form-item> -->
<el-form-item>
<el-button @click="getDataList()">查询</el-button>
</el-form-item>
</el-form>
<el-table
:data="dataList"
border
:stripe="true"
:header-cell-style="{background:'#eef1f6',color:'#606266',height: '56px'}"
v-loading="dataListLoading"
style="width: 100%">
<el-table-column
@ -40,27 +41,19 @@
width="50">
</el-table-column>
<el-table-column
prop="username"
header-align="center"
align="center"
prop="equipmentName"
label="车辆名称">
</el-table-column>
<el-table-column
prop="operation"
header-align="center"
align="center"
prop="createTime"
label="报警时间">
</el-table-column>
<el-table-column
<!-- <el-table-column
prop="time"
header-align="center"
align="center"
label="报警级别">
</el-table-column>
</el-table-column> -->
<el-table-column
prop="ip"
header-align="center"
align="center"
prop="alarmInfo"
label="报警内容">
</el-table-column>
</el-table>
@ -81,8 +74,7 @@
data () {
return {
dataForm: {
key: '',
time: []
equipmentId: null
},
dataList: [],
options: [],
@ -90,28 +82,49 @@
pageSize: 10,
totalPage: 0,
dataListLoading: false,
selectionDataList: []
selectionDataList: [],
carList: []
}
},
created () {
this.getDataList()
this.getCarList()
},
methods: {
//
getCarList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/vehicle/page'),
method: 'post',
data: this.$http.adornData({
current: 1,
size: 999
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.carList = data.data.records
this.getDataList()
} else {
this.carList = []
}
})
},
//
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/log/list'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize,
'key': this.dataForm.key
url: this.$http.adornUrl('/alarmInfo/page'),
method: 'post',
data: this.$http.adornData({
current: this.pageIndex,
size: this.pageSize,
type: 1,
equipmentId: this.dataForm.equipmentId
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0

View File

@ -1,23 +1,20 @@
<template>
<div class="mod-log">
<el-form
:inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()"
>
<div class="mod-config">
<el-form style="display: flex; align-items: center; justify-content: right;" :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-select v-model="dataForm.key" filterable placeholder="窑炉名称">
<el-select size="small" v-model="dataForm.equipmentId" clearable filterable placeholder="窑炉名称">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in kilnList"
:key="item.id"
:label="item.kilnName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<!-- <el-form-item>
<el-date-picker
size="small"
v-model="dataForm.time"
value-format="yyyy-MM-dd"
type="daterange"
@ -26,14 +23,15 @@
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
</el-form-item> -->
<el-form-item>
<el-button @click="getDataList()">查询</el-button>
</el-form-item>
</el-form>
<el-table
:data="dataList"
border
:stripe="true"
:header-cell-style="{background:'#eef1f6',color:'#606266',height: '56px'}"
v-loading="dataListLoading"
style="width: 100%"
>
@ -46,30 +44,22 @@
>
</el-table-column>
<el-table-column
prop="username"
header-align="center"
align="center"
prop="equipmentName"
label="窑炉名称"
>
</el-table-column>
<el-table-column
prop="operation"
header-align="center"
align="center"
prop="createTime"
label="报警时间"
>
</el-table-column>
<el-table-column
<!-- <el-table-column
prop="time"
header-align="center"
align="center"
label="报警级别"
>
> -->
</el-table-column>
<el-table-column
prop="ip"
header-align="center"
align="center"
prop="alarmInfo"
label="报警内容"
>
</el-table-column>
@ -92,8 +82,7 @@ export default {
data () {
return {
dataForm: {
key: '',
time: []
equipmentId: null
},
dataList: [],
options: [],
@ -101,28 +90,49 @@ export default {
pageSize: 10,
totalPage: 0,
dataListLoading: false,
selectionDataList: []
selectionDataList: [],
kilnList: []
}
},
created () {
this.getDataList()
this.getKilnList()
},
methods: {
//
getKilnList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/kilnInfo/page'),
method: 'post',
data: this.$http.adornData({
current: 1,
size: 999
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.kilnList = data.data.records
this.getDataList()
} else {
this.kilnList = []
}
})
},
//
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/log/list'),
method: 'get',
params: this.$http.adornParams({
page: this.pageIndex,
limit: this.pageSize,
key: this.dataForm.key
url: this.$http.adornUrl('/alarmInfo/page'),
method: 'post',
data: this.$http.adornData({
current: this.pageIndex,
size: this.pageSize,
type: 0,
equipmentId: this.dataForm.equipmentId
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0