站台监控增加是否允许装载机、是否允许平地机。
This commit is contained in:
parent
02c3d6d7eb
commit
a698ec0e84
|
|
@ -1,6 +1,6 @@
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
axios.defaults.baseURL = 'https://login.microsoftonline.com/caterpillar.onmicrosoft.com'
|
axios.defaults.baseURL = 'https://login.microsoftonline.com/caterpillar.onmicrosoft.com'
|
||||||
axios.defaults.timeout = 5000;
|
axios.defaults.timeout = 50000;
|
||||||
// axios.defaults.withCredentials = true
|
// axios.defaults.withCredentials = true
|
||||||
|
|
||||||
const postToGetToken = (params) => {
|
const postToGetToken = (params) => {
|
||||||
|
|
|
||||||
|
|
@ -1,374 +1,433 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="margin-bottom: 10px; height: 100%; padding-left: 1%; padding-right: 1%;">
|
<div style="margin-bottom: 10px; height: 100%; padding-left: 1%; padding-right: 1%;">
|
||||||
<el-config-provider :locale="zhCn">
|
<el-config-provider :locale="zhCn">
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-input v-model="standIdQuery" style="width: 158px; margin-right: 10px;" placeholder="站台号"
|
<el-input v-model="standIdQuery" style="width: 158px; margin-right: 10px;" placeholder="站台号"
|
||||||
:suffix-icon="Search" />
|
:suffix-icon="Search"/>
|
||||||
<el-select-v2 v-model="standTypeQuery" style="width: 158px; margin-right: 10px;"
|
<el-select-v2 v-model="standTypeQuery" style="width: 158px; margin-right: 10px;"
|
||||||
placeholder="请选择站台类型" :options="standTypeOptions" @change="search()"></el-select-v2>
|
placeholder="请选择站台类型" :options="standTypeOptions" @change="search()"></el-select-v2>
|
||||||
<el-button type="primary" @click="search()">搜索</el-button>
|
<el-select-v2 v-model="allowMwlQuery" style="width: 158px; margin-right: 10px;"
|
||||||
<el-button type="warning" @click="reset()">重置</el-button>
|
placeholder="是否允许装载机" :options="yesOrNoOptions" @change="search()"></el-select-v2>
|
||||||
</el-row>
|
<el-select-v2 v-model="allowMgQuery" style="width: 158px; margin-right: 10px;"
|
||||||
</div>
|
placeholder="是否允许平地机" :options="yesOrNoOptions" @change="search()"></el-select-v2>
|
||||||
<br />
|
<el-button type="primary" @click="search()">搜索</el-button>
|
||||||
<el-table :data="standList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
<el-button type="warning" @click="reset()">重置</el-button>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
<el-table :data="standList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||||
max-height="650px" @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
max-height="650px" @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
||||||
:cell-style="{ 'text-align': 'center' }">
|
:cell-style="{ 'text-align': 'center' }">
|
||||||
<el-table-column width="65px" fixed="left">
|
<el-table-column width="65px" fixed="left">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-radio :label="scope.row.standId" v-model="standId"> </el-radio>
|
<el-radio :label="scope.row.standId" v-model="standId"> </el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="standId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="standId" label="id" fixed="left" min-width="120px" show-overflow-tooltip/>
|
||||||
<el-table-column prop="allowIn" label="允许入库" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="allowIn" label="允许入库" :formatter="yesOrNoFormat" min-width="120px"
|
||||||
<el-table-column prop="allowOut" label="允许出库" min-width="120px" show-overflow-tooltip />
|
show-overflow-tooltip/>
|
||||||
<el-table-column prop="isLock" label="锁定" :formatter="isLockFormat" min-width="120px"
|
<el-table-column prop="allowOut" label="允许出库" :formatter="yesOrNoFormat" min-width="120px"
|
||||||
show-overflow-tooltip />
|
show-overflow-tooltip/>
|
||||||
<el-table-column prop="standStatus" label="状态" :formatter="standStatusFormat" show-overflow-tooltip
|
<el-table-column prop="allowMwl" label="允许装载机" :formatter="yesOrNoFormat" min-width="120px"
|
||||||
min-width="120px" />
|
show-overflow-tooltip/>
|
||||||
<el-table-column prop="equipmentId" label="设备号" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="allowMg" label="允许平地机" :formatter="yesOrNoFormat" min-width="120px"
|
||||||
<el-table-column prop="areaId" label="区域" min-width="120px" />
|
show-overflow-tooltip/>
|
||||||
<el-table-column prop="standType" label="类型" :formatter="standTypeFormat" min-width="120px" />
|
<el-table-column prop="isLock" label="锁定" :formatter="isLockFormat" min-width="120px"
|
||||||
<el-table-column prop="standIp" label="电脑ip地址" min-width="120px" />
|
show-overflow-tooltip/>
|
||||||
<el-table-column prop="outerId" label="外部编号" min-width="120px" />
|
<el-table-column prop="standStatus" label="状态" :formatter="standStatusFormat" show-overflow-tooltip
|
||||||
<el-table-column prop="lastUseTime" label="上次使用时间" :formatter="timeFormat" min-width="120px"
|
min-width="120px"/>
|
||||||
show-overflow-tooltip />
|
<el-table-column prop="equipmentId" label="设备号" min-width="120px" show-overflow-tooltip/>
|
||||||
<el-table-column prop="pickGoods" label="拣选料号" show-overflow-tooltip min-width="120px" />
|
<el-table-column prop="areaId" label="区域" min-width="120px"/>
|
||||||
<el-table-column prop="pickVehicle" label="拣选箱号" show-overflow-tooltip min-width="120px" />
|
<el-table-column prop="standType" label="类型" :formatter="standTypeFormat" min-width="120px"/>
|
||||||
<el-table-column prop="pickTip" label="提示" show-overflow-tooltip min-width="120px" />
|
<el-table-column prop="standIp" label="电脑ip地址" min-width="120px"/>
|
||||||
<el-table-column prop="pickVehicleCount" label="站台料箱数量" min-width="120px" />
|
<el-table-column prop="outerId" label="外部编号" min-width="120px"/>
|
||||||
<el-table-column prop="allowNoPlan" label="非计划" :formatter="allowNoPlanFormat" show-overflow-tooltip
|
<el-table-column prop="lastUseTime" label="上次使用时间" :formatter="timeFormat" min-width="120px"
|
||||||
min-width="120px" />
|
show-overflow-tooltip/>
|
||||||
<el-table-column fixed="right" label="操作" width="120px">
|
<el-table-column prop="pickGoods" label="拣选料号" show-overflow-tooltip min-width="120px"/>
|
||||||
<template v-slot="scope">
|
<el-table-column prop="pickVehicle" label="拣选箱号" show-overflow-tooltip min-width="120px"/>
|
||||||
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
<el-table-column prop="pickTip" label="提示" show-overflow-tooltip min-width="120px"/>
|
||||||
</template>
|
<el-table-column prop="pickVehicleCount" label="站台料箱数量" min-width="120px"/>
|
||||||
</el-table-column>
|
<el-table-column prop="allowNoPlan" label="非计划" :formatter="allowNoPlanFormat" show-overflow-tooltip
|
||||||
</el-table>
|
min-width="120px"/>
|
||||||
<br />
|
<el-table-column fixed="right" label="操作" width="120px">
|
||||||
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
|
<template v-slot="scope">
|
||||||
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
||||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
</template>
|
||||||
@current-change="search" />
|
</el-table-column>
|
||||||
<el-dialog v-model="dialogVisible" title="编辑站台信息" width="40%" draggable :show-close="false">
|
</el-table>
|
||||||
<div
|
<br/>
|
||||||
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
|
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
|
||||||
<el-form ref="standFormRef" :model="standFormEntity" :label-position="labelPosition"
|
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
||||||
label-width="100px" style="width: 95%;" :rules="rules" status-icon>
|
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
||||||
<el-row :gutter="16">
|
@current-change="search"/>
|
||||||
<el-col :span="12" :offset="0">
|
<el-dialog v-model="dialogVisible" title="编辑站台信息" width="40%" draggable :show-close="false">
|
||||||
<el-form-item label="站台号" prop="standId">
|
<div
|
||||||
<el-input v-model="standFormEntity.standId" disabled />
|
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
|
||||||
</el-form-item>
|
<el-form ref="standFormRef" :model="standFormEntity" :label-position="labelPosition"
|
||||||
</el-col>
|
label-width="100px" style="width: 95%;" :rules="rules" status-icon>
|
||||||
<el-col :span="12">
|
<el-row :gutter="16">
|
||||||
<el-form-item label="类型" prop="isLock">
|
<el-col :span="12" :offset="0">
|
||||||
<el-select-v2 v-model="standFormEntity.standType" placeholder="请选择类型"
|
<el-form-item label="站台号" prop="standId">
|
||||||
:options="standTypeOptions" disabled></el-select-v2>
|
<el-input v-model="standFormEntity.standId" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="12">
|
||||||
<el-row :gutter="16">
|
<el-form-item label="类型" prop="isLock">
|
||||||
<el-col :span="12" :offset="0">
|
<el-select-v2 v-model="standFormEntity.standType" placeholder="请选择类型"
|
||||||
<el-form-item label="锁定" prop="isLock">
|
:options="standTypeOptions" disabled></el-select-v2>
|
||||||
<el-select-v2 v-model="standFormEntity.isLock" placeholder="请选择是否锁定"
|
</el-form-item>
|
||||||
:options="isLockOptions"></el-select-v2>
|
</el-col>
|
||||||
</el-form-item>
|
</el-row>
|
||||||
</el-col>
|
<el-row :gutter="16">
|
||||||
<el-col :span="12">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="状态" prop="standStatus">
|
<el-form-item label="锁定" prop="isLock">
|
||||||
<el-select-v2 v-model="standFormEntity.standStatus" placeholder="请选择站台状态"
|
<el-select-v2 v-model="standFormEntity.isLock" placeholder="请选择是否锁定"
|
||||||
:options="standStatusOptions"></el-select-v2>
|
:options="isLockOptions"></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="12">
|
||||||
<el-row :gutter="16">
|
<el-form-item label="状态" prop="standStatus">
|
||||||
<el-col :span="12" :offset="0">
|
<el-select-v2 v-model="standFormEntity.standStatus" placeholder="请选择站台状态"
|
||||||
<el-form-item label="上次使用时间" prop="lastUseTime">
|
:options="standStatusOptions"></el-select-v2>
|
||||||
<el-input v-model="standFormEntity.lastUseTime" />
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
</el-row>
|
||||||
<el-col :span="12">
|
<el-row :gutter="16">
|
||||||
<el-form-item label="站台料箱数量" prop="pickVehicleCount">
|
<el-col :span="12" :offset="0">
|
||||||
<el-input-number v-model.number="standFormEntity.pickVehicleCount"
|
<el-form-item label="允许装载机" prop="allowMwl">
|
||||||
controls-position="right" :disabled="standFormEntity.standType != 2"
|
<el-select-v2 v-model="standFormEntity.allowMwl" placeholder="是否允许装载机"
|
||||||
clearable />
|
:options="yesOrNoOptions" :disabled="standFormEntity.standType != 2"></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="12">
|
||||||
<el-row :gutter="16">
|
<el-form-item label="允许平地机" prop="allowMg">
|
||||||
<el-col :span="12" :offset="0">
|
<el-select-v2 v-model="standFormEntity.allowMg" placeholder="是否允许平地机"
|
||||||
<el-form-item label="非计划" prop="allowNoPlan">
|
:options="yesOrNoOptions" :disabled="standFormEntity.standType != 2"></el-select-v2>
|
||||||
<el-select-v2 v-model="standFormEntity.allowNoPlan" placeholder="请选择是否允许非计划领料"
|
</el-form-item>
|
||||||
:options="allowNoPlanOptions"
|
</el-col>
|
||||||
:disabled="standFormEntity.standType != 2"></el-select-v2>
|
</el-row>
|
||||||
</el-form-item>
|
<el-row :gutter="16">
|
||||||
</el-col>
|
<el-col :span="12" :offset="0">
|
||||||
</el-row>
|
<el-form-item label="上次使用时间" prop="lastUseTime">
|
||||||
</el-form>
|
<el-input v-model="standFormEntity.lastUseTime"/>
|
||||||
</div>
|
</el-form-item>
|
||||||
<template #footer>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="站台料箱数量" prop="pickVehicleCount">
|
||||||
|
<el-input-number v-model.number="standFormEntity.pickVehicleCount"
|
||||||
|
controls-position="right" :disabled="standFormEntity.standType != 2"
|
||||||
|
clearable/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="非计划" prop="allowNoPlan">
|
||||||
|
<el-select-v2 v-model="standFormEntity.allowNoPlan" placeholder="请选择是否允许非计划领料"
|
||||||
|
:options="allowNoPlanOptions"
|
||||||
|
:disabled="standFormEntity.standType != 2"></el-select-v2>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="submitInfo(standFormEntity)">
|
<el-button type="primary" @click="submitInfo(standFormEntity)">
|
||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-config-provider>
|
</el-config-provider>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { getStandsByPage, updateStandInfo } from '@/api/stand.js'
|
import {getStandsByPage, updateStandInfo} from '@/api/stand.js'
|
||||||
import { errorBox } from '@/utils/myMessageBox.js'
|
import {errorBox} from '@/utils/myMessageBox.js'
|
||||||
import { ElMessage } from 'element-plus'
|
import {ElMessage} from 'element-plus'
|
||||||
import { ref, reactive } from 'vue'
|
import {ref, reactive} from 'vue'
|
||||||
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
import {dateFormatter, timeFormatter} from '@/utils/formatter.js'
|
||||||
import { Search } from '@element-plus/icons-vue'
|
import {Search} from '@element-plus/icons-vue'
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'standSettings',
|
name: 'standSettings',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
standList: [],
|
standList: [],
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
standIdQuery: '',
|
standIdQuery: '',
|
||||||
standTypeQuery: -99,
|
standTypeQuery: -99,
|
||||||
loading: true,
|
allowMwlQuery: -99,
|
||||||
dialogVisible: false,
|
allowMgQuery: -99,
|
||||||
standId: '',
|
loading: true,
|
||||||
standFormEntity: reactive({}),
|
dialogVisible: false,
|
||||||
standFormRef: ref(),
|
standId: '',
|
||||||
labelPosition: 'top',
|
standFormEntity: reactive({}),
|
||||||
rules: reactive({}),
|
standFormRef: ref(),
|
||||||
standTypeOptions: [
|
labelPosition: 'top',
|
||||||
{
|
rules: reactive({}),
|
||||||
value: -99,
|
standTypeOptions: [
|
||||||
label: '全部'
|
{
|
||||||
},
|
value: -99,
|
||||||
{
|
label: '全部'
|
||||||
value: 1,
|
},
|
||||||
label: '入库站台'
|
{
|
||||||
},
|
value: 1,
|
||||||
{
|
label: '入库站台'
|
||||||
value: 2,
|
},
|
||||||
label: '备料站台'
|
{
|
||||||
},
|
value: 2,
|
||||||
{
|
label: '备料站台'
|
||||||
value: 3,
|
},
|
||||||
label: '堆垛机'
|
{
|
||||||
}
|
value: 3,
|
||||||
],
|
label: '堆垛机'
|
||||||
isLockOptions: [
|
|
||||||
{
|
|
||||||
value: 0,
|
|
||||||
label: '未锁定'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 1,
|
|
||||||
label: '已锁定'
|
|
||||||
},
|
|
||||||
],
|
|
||||||
standStatusOptions: [
|
|
||||||
{
|
|
||||||
value: 0,
|
|
||||||
label: '可用'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 1,
|
|
||||||
label: '不可用'
|
|
||||||
},
|
|
||||||
],
|
|
||||||
allowNoPlanOptions: [
|
|
||||||
{
|
|
||||||
value: 1,
|
|
||||||
label: '允许'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 0,
|
|
||||||
label: '不允许'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
isLockOptions: [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '未锁定'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '已锁定'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
yesOrNoOptions: [
|
||||||
|
{
|
||||||
|
value: -99,
|
||||||
|
label: '全部'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '否'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '是'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
standStatusOptions: [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '可用'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '不可用'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
allowNoPlanOptions: [
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '允许'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '不允许'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.search()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
search() {
|
||||||
|
this.loading = true
|
||||||
|
const request = {
|
||||||
|
pageNo: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
standId: this.standIdQuery.trim(),
|
||||||
|
standType: this.standTypeQuery === -99 ? null : this.standTypeQuery,
|
||||||
|
allowMwl: this.allowMwlQuery === -99 ? null : this.allowMwlQuery,
|
||||||
|
allowMg: this.allowMgQuery === -99 ? null : this.allowMgQuery,
|
||||||
|
userName: store.getters.getUserName
|
||||||
|
}
|
||||||
|
getStandsByPage(request).then(res => {
|
||||||
|
const tableResponse = res.data
|
||||||
|
if (tableResponse.code == 0) {
|
||||||
|
this.standList = tableResponse.returnData.lists
|
||||||
|
this.total = tableResponse.returnData.total
|
||||||
|
} else {
|
||||||
|
errorBox(tableResponse.message)
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
errorBox('查询站台信息错误')
|
||||||
|
})
|
||||||
|
this.loading = false
|
||||||
},
|
},
|
||||||
mounted() {
|
dateFormat: (row, column, cellValue, index) => {
|
||||||
this.search()
|
return dateFormatter(cellValue)
|
||||||
},
|
},
|
||||||
methods: {
|
timeFormat: (row, column, cellValue, index) => {
|
||||||
search() {
|
return timeFormatter(cellValue)
|
||||||
this.loading = true
|
|
||||||
const request = {
|
|
||||||
pageNo: this.currentPage,
|
|
||||||
pageSize: this.pageSize,
|
|
||||||
standId: this.standIdQuery.trim(),
|
|
||||||
standType: this.standTypeQuery == -99 ? null : this.standTypeQuery,
|
|
||||||
userName: store.getters.getUserName
|
|
||||||
}
|
|
||||||
getStandsByPage(request).then(res => {
|
|
||||||
const tableResponse = res.data
|
|
||||||
if (tableResponse.code == 0) {
|
|
||||||
this.standList = tableResponse.returnData.lists
|
|
||||||
this.total = tableResponse.returnData.total
|
|
||||||
} else {
|
|
||||||
errorBox(tableResponse.message)
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
console.log(err)
|
|
||||||
errorBox('查询站台信息错误')
|
|
||||||
})
|
|
||||||
this.loading = false
|
|
||||||
},
|
|
||||||
dateFormat: (row, column, cellValue, index) => {
|
|
||||||
return dateFormatter(cellValue)
|
|
||||||
},
|
|
||||||
timeFormat: (row, column, cellValue, index) => {
|
|
||||||
return timeFormatter(cellValue)
|
|
||||||
},
|
|
||||||
standTypeFormat: (row, column, cellValue, index) => {
|
|
||||||
switch (cellValue) {
|
|
||||||
case 1:
|
|
||||||
return '入库站台'
|
|
||||||
case 2:
|
|
||||||
return '备料站台'
|
|
||||||
case 3:
|
|
||||||
return '堆垛机'
|
|
||||||
default:
|
|
||||||
return '未知'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isLockFormat: (row, column, cellValue, index) => {
|
|
||||||
switch (cellValue) {
|
|
||||||
case 0:
|
|
||||||
return '未锁定'
|
|
||||||
case 1:
|
|
||||||
return '已锁定'
|
|
||||||
default:
|
|
||||||
return '未知'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
standStatusFormat: (row, column, cellValue, index) => {
|
|
||||||
switch (cellValue) {
|
|
||||||
case 0:
|
|
||||||
return '可用'
|
|
||||||
case 1:
|
|
||||||
return '不可用'
|
|
||||||
default:
|
|
||||||
return '未知'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
allowNoPlanFormat: (row, column, cellValue, index) => {
|
|
||||||
switch (cellValue) {
|
|
||||||
case 0:
|
|
||||||
return '不允许'
|
|
||||||
case 1:
|
|
||||||
return '允许'
|
|
||||||
default:
|
|
||||||
return '无效'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
reset() {
|
|
||||||
this.standIdQuery = ''
|
|
||||||
this.standTypeQuery = -99
|
|
||||||
this.search()
|
|
||||||
},
|
|
||||||
editCurrentRow(row) {
|
|
||||||
this.standId = row.standId
|
|
||||||
this.standFormEntity = {
|
|
||||||
standId: row.standId,
|
|
||||||
standType: row.standType,
|
|
||||||
isLock: row.isLock,
|
|
||||||
standStatus: row.standStatus,
|
|
||||||
lastUseTime: row.lastUseTime,
|
|
||||||
pickVehicleCount: row.pickVehicleCount,
|
|
||||||
allowNoPlan: row.allowNoPlan
|
|
||||||
}
|
|
||||||
this.dialogVisible = true
|
|
||||||
},
|
|
||||||
submitInfo(formData) {
|
|
||||||
if (formData.standType == 3) {
|
|
||||||
return errorBox('堆垛机不允许非计划。')
|
|
||||||
}
|
|
||||||
const params = {
|
|
||||||
standId: formData.standId,
|
|
||||||
standType: formData.standType,
|
|
||||||
isLock: formData.isLock,
|
|
||||||
standStatus: formData.standStatus,
|
|
||||||
lastUseTime: formData.lastUseTime,
|
|
||||||
pickVehicleCount: formData.pickVehicleCount,
|
|
||||||
allowNoPlan: formData.allowNoPlan,
|
|
||||||
userName: store.getters.getUserName
|
|
||||||
}
|
|
||||||
updateStandInfo(params).then(res => {
|
|
||||||
if (res.data.code == 0) {
|
|
||||||
this.dialogVisible = false
|
|
||||||
ElMessage.success('更新站台信息成功。')
|
|
||||||
this.search()
|
|
||||||
} else {
|
|
||||||
errorBox(res.data.message)
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
console.log(err)
|
|
||||||
errorBox('更新站台信息失败。')
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getCurrentRow(row) {
|
|
||||||
this.standId = row.standId
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
standTypeFormat: (row, column, cellValue, index) => {
|
||||||
|
switch (cellValue) {
|
||||||
|
case 1:
|
||||||
|
return '入库站台'
|
||||||
|
case 2:
|
||||||
|
return '备料站台'
|
||||||
|
case 3:
|
||||||
|
return '堆垛机'
|
||||||
|
default:
|
||||||
|
return '未知'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isLockFormat: (row, column, cellValue, index) => {
|
||||||
|
switch (cellValue) {
|
||||||
|
case 0:
|
||||||
|
return '未锁定'
|
||||||
|
case 1:
|
||||||
|
return '已锁定'
|
||||||
|
default:
|
||||||
|
return '未知'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
yesOrNoFormat: (row, column, cellValue, index) => {
|
||||||
|
switch (cellValue) {
|
||||||
|
case 0:
|
||||||
|
return '否'
|
||||||
|
case 1:
|
||||||
|
return '是'
|
||||||
|
default:
|
||||||
|
return '未知'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
standStatusFormat: (row, column, cellValue, index) => {
|
||||||
|
switch (cellValue) {
|
||||||
|
case 0:
|
||||||
|
return '可用'
|
||||||
|
case 1:
|
||||||
|
return '不可用'
|
||||||
|
default:
|
||||||
|
return '未知'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
allowNoPlanFormat: (row, column, cellValue, index) => {
|
||||||
|
switch (cellValue) {
|
||||||
|
case 0:
|
||||||
|
return '不允许'
|
||||||
|
case 1:
|
||||||
|
return '允许'
|
||||||
|
default:
|
||||||
|
return '无效'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
this.standIdQuery = ''
|
||||||
|
this.standTypeQuery = -99
|
||||||
|
this.search()
|
||||||
|
},
|
||||||
|
editCurrentRow(row) {
|
||||||
|
this.standId = row.standId
|
||||||
|
this.standFormEntity = {
|
||||||
|
standId: row.standId,
|
||||||
|
standType: row.standType,
|
||||||
|
isLock: row.isLock,
|
||||||
|
standStatus: row.standStatus,
|
||||||
|
lastUseTime: row.lastUseTime,
|
||||||
|
pickVehicleCount: row.pickVehicleCount,
|
||||||
|
allowNoPlan: row.allowNoPlan,
|
||||||
|
allowMwl: row.allowMwl,
|
||||||
|
allowMg: row.allowMg,
|
||||||
|
}
|
||||||
|
this.dialogVisible = true
|
||||||
|
},
|
||||||
|
submitInfo(formData) {
|
||||||
|
if (formData.standType == 3 && formData.allowNoPlan == 1) {
|
||||||
|
return errorBox('堆垛机不允许非计划。')
|
||||||
|
}
|
||||||
|
if (formData.allowMwl == -99 || formData.allowMg == -99) {
|
||||||
|
return errorBox('必须确定是否允许装载机与是否允许平地机。')
|
||||||
|
}
|
||||||
|
const params = {
|
||||||
|
standId: formData.standId,
|
||||||
|
standType: formData.standType,
|
||||||
|
isLock: formData.isLock,
|
||||||
|
standStatus: formData.standStatus,
|
||||||
|
lastUseTime: formData.lastUseTime,
|
||||||
|
pickVehicleCount: formData.pickVehicleCount,
|
||||||
|
allowNoPlan: formData.allowNoPlan,
|
||||||
|
allowMwl: formData.allowMwl,
|
||||||
|
allowMg: formData.allowMg,
|
||||||
|
userName: store.getters.getUserName
|
||||||
|
}
|
||||||
|
updateStandInfo(params).then(res => {
|
||||||
|
if (res.data.code == 0) {
|
||||||
|
this.dialogVisible = false
|
||||||
|
ElMessage.success('更新站台信息成功。')
|
||||||
|
this.search()
|
||||||
|
} else {
|
||||||
|
errorBox(res.data.message)
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
errorBox('更新站台信息失败。')
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getCurrentRow(row) {
|
||||||
|
this.standId = row.standId
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.el-pagination {
|
.el-pagination {
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-row .el-button {
|
.el-row .el-button {
|
||||||
width: 72px;
|
width: 72px;
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-class {
|
.table-class {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-row .el-form-item {
|
.el-row .el-form-item {
|
||||||
width: 10% inherit;
|
width: 10% inherit;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-row .el-form-item .el-select-v2 {
|
.el-row .el-form-item .el-select-v2 {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-row .el-form-item .el-input-number {
|
.el-row .el-form-item .el-input-number {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-row .el-form-item .el-button {
|
.el-row .el-form-item .el-button {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-area {
|
.title-area {
|
||||||
display: flex;
|
display: flex;
|
||||||
/* min-height: 10%; */
|
/* min-height: 10%; */
|
||||||
max-height: max-content;
|
max-height: max-content;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
min-width: inherit;
|
min-width: inherit;
|
||||||
border: solid 1px;
|
border: solid 1px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
box-shadow: 0px 15px 10px -15px #000;
|
box-shadow: 0px 15px 10px -15px #000;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user