更新
This commit is contained in:
parent
732ca54eef
commit
b6763f37aa
28
src/api/asrs/stacker.js
Normal file
28
src/api/asrs/stacker.js
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-22 15:23:58
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-09-23 14:03:46
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
// 更新巷道
|
||||
export function updateStacker(data) {
|
||||
return request({
|
||||
url: '/asrs/stacker/update',
|
||||
method: 'put',
|
||||
data: data,
|
||||
timeout: 100000,
|
||||
})
|
||||
}
|
||||
|
||||
// 获得巷道分页
|
||||
export function getStackerPage(query) {
|
||||
return request({
|
||||
url: '/asrs/stacker/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2024-01-17 09:58:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-02-22 14:07:03
|
||||
* @LastEditTime: 2024-09-23 14:05:14
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -12,18 +12,20 @@
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<div class="tips">
|
||||
<el-tag
|
||||
effect="dark"
|
||||
color="#16DC09"
|
||||
style="border: none">
|
||||
满
|
||||
</el-tag>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
style="margin-right: 50px"
|
||||
@click="stackerBtn">
|
||||
巷道开关
|
||||
</el-button>
|
||||
<el-tag effect="dark" color="#16DC09" style="border: none">满</el-tag>
|
||||
<el-tag effect="dark" color="#d3d3d3" style="border: none">空</el-tag>
|
||||
<el-tag effect="dark" color="#7362F3" style="border: none">锁</el-tag>
|
||||
<el-tag effect="dark" color="#ff0000" style="border: none">不可用</el-tag>
|
||||
</div>
|
||||
<div class="mainbody">
|
||||
<!-- @click="showDia()" -->
|
||||
<!-- @click="showDia()" -->
|
||||
<div v-for="i in listQuery.total" :key="i">
|
||||
<el-row style="margin-bottom: 10px">
|
||||
<el-col :span="24">
|
||||
@ -65,10 +67,10 @@
|
||||
j.deactivate === 0 || j.warehouseStorehouseState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.warehouseStorehouseState]
|
||||
: '#ff0000',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.warehouseStorehouseState]
|
||||
: '#ff0000',
|
||||
}" />
|
||||
</el-popover>
|
||||
</div>
|
||||
@ -108,10 +110,10 @@
|
||||
j.deactivate === 0 || j.warehouseStorehouseState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.warehouseStorehouseState]
|
||||
: '#ff0000',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.warehouseStorehouseState]
|
||||
: '#ff0000',
|
||||
}" />
|
||||
</el-popover>
|
||||
</div>
|
||||
@ -155,10 +157,10 @@
|
||||
j.deactivate === 0 || j.warehouseStorehouseState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.warehouseStorehouseState]
|
||||
: '#ff0000',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.warehouseStorehouseState]
|
||||
: '#ff0000',
|
||||
}" />
|
||||
</el-popover>
|
||||
</div>
|
||||
@ -196,10 +198,10 @@
|
||||
j.deactivate === 0 || j.warehouseStorehouseState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.warehouseStorehouseState]
|
||||
: '#ff0000',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.warehouseStorehouseState]
|
||||
: '#ff0000',
|
||||
}" />
|
||||
</el-popover>
|
||||
</div>
|
||||
@ -213,6 +215,10 @@
|
||||
ref="dialogRef"
|
||||
v-if="diaVisible"
|
||||
@refreshDataList="getDataList"></pot-dialog>
|
||||
<stacker-dialog
|
||||
ref="stackerRef"
|
||||
v-if="stackerVisible"
|
||||
:warehouse-id="listQuery.aId"></stacker-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -223,6 +229,7 @@ import {
|
||||
exportWarehouseStorehouseExcel,
|
||||
} from '@/api/asrs/warehouseStorehouse';
|
||||
import potDialog from './potDialog';
|
||||
import stackerDialog from './stackerDialog';
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
@ -236,6 +243,7 @@ export default {
|
||||
wareLayer: 1,
|
||||
},
|
||||
diaVisible: false,
|
||||
stackerVisible: false,
|
||||
wareData: [],
|
||||
bgColor: ['#d3d3d3', '#7362F3', '#16DC09'], //空,锁,满
|
||||
formConfig: [
|
||||
@ -271,6 +279,7 @@ export default {
|
||||
},
|
||||
components: {
|
||||
potDialog,
|
||||
stackerDialog,
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
@ -302,6 +311,12 @@ export default {
|
||||
this.$refs.dialogRef.init();
|
||||
});
|
||||
},
|
||||
stackerBtn() {
|
||||
this.stackerVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.stackerRef.init();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -357,7 +372,7 @@ export default {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
&:hover {
|
||||
border: 1px #000000 dashed;
|
||||
border: 1px #000000 dashed;
|
||||
transform: scale(1.3);
|
||||
}
|
||||
}
|
||||
|
96
src/views/asrs/warehouseLocationMonitoring/stackerDialog.vue
Normal file
96
src/views/asrs/warehouseLocationMonitoring/stackerDialog.vue
Normal file
@ -0,0 +1,96 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-09-23 14:10:53
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
title="巷道信息"
|
||||
:visible.sync="visible"
|
||||
v-loading="loading"
|
||||
element-loading-text="拼命加载中"
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(0, 0, 0, 0.8)">
|
||||
<el-card shadow="hover" v-for="item in stackerList" :key="item.id">
|
||||
<el-descriptions :column="1" size="mini" border>
|
||||
<el-descriptions-item label="巷道名称">
|
||||
{{ item.stackerName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="巷道状态">
|
||||
<el-tag size="mini" :type="item.stackerState === 1 ? '' : 'warning'">
|
||||
{{ item.stackerState === 1 ? '开启中' : '已关闭' }}
|
||||
</el-tag>
|
||||
<el-switch
|
||||
style="float: right"
|
||||
@change="changeStatus(item)"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
v-model="item.stackerState" />
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateStacker, getStackerPage } from '@/api/asrs/stacker';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
warehouseId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
stackerList: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
const params = {
|
||||
pageNo: 1,
|
||||
pageSize: 100,
|
||||
warehouseId: this.warehouseId,
|
||||
};
|
||||
getStackerPage(params).then((response) => {
|
||||
this.stackerList = response.data.list.reverse();
|
||||
});
|
||||
});
|
||||
},
|
||||
changeStatus(val) {
|
||||
const _this = this
|
||||
let text = val.stackerState === 1 ? '启用' : '关闭';
|
||||
this.$modal
|
||||
.confirm('确认要"' + text + '""' + val.stackerName + '"巷道吗?')
|
||||
.then(function () {
|
||||
_this.loading = true;
|
||||
const data = {
|
||||
id: val.id,
|
||||
stacker: val.stacker,
|
||||
stackerState: val.stackerState,
|
||||
};
|
||||
return updateStacker(data);
|
||||
})
|
||||
.then(() => {
|
||||
_this.loading = false;
|
||||
this.$modal.msgSuccess(text + '成功');
|
||||
})
|
||||
.catch(function () {
|
||||
val.stackerState = val.stackerState === 1 ? 0 : 1;
|
||||
_this.loading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user