2022-03-07 09:17:12 +08:00
|
|
|
<!--
|
2022-03-09 14:19:03 +08:00
|
|
|
* @Author: gtz
|
|
|
|
* @Date: 2022-03-03 09:16:10
|
2022-03-17 10:59:00 +08:00
|
|
|
* @LastEditors: zwq
|
|
|
|
* @LastEditTime: 2022-03-17 10:56:14
|
2022-03-09 14:19:03 +08:00
|
|
|
* @Description: file content
|
2022-03-16 20:11:30 +08:00
|
|
|
* @FilePath: \mt-ck-wms-ui\src\views\basicData\Warehouse\components\processStorageLink.vue
|
2022-03-07 09:17:12 +08:00
|
|
|
-->
|
|
|
|
<template>
|
2022-03-09 14:19:03 +08:00
|
|
|
<div class="dashboard-container">
|
|
|
|
<el-card class="dashboard-main">
|
|
|
|
<el-row class="dashboard-title">
|
|
|
|
<div class="dashboard-header-line" />
|
2022-03-17 10:59:00 +08:00
|
|
|
<div class="dashboard-header-title">
|
|
|
|
{{ $t("module.dashboard.title") }}
|
|
|
|
</div>
|
2022-03-09 14:19:03 +08:00
|
|
|
</el-row>
|
|
|
|
<el-row class="dashboard-legend">
|
|
|
|
<div
|
|
|
|
v-for="item in cassetteStatusList"
|
|
|
|
:key="'cassette' + item.id"
|
|
|
|
class="dashboard-legend-cassette"
|
|
|
|
>
|
2022-03-07 09:17:12 +08:00
|
|
|
<div
|
2022-03-09 14:19:03 +08:00
|
|
|
class="dashboard-legend-cassette-cricle"
|
|
|
|
:style="{ background: item.color }"
|
|
|
|
/>
|
|
|
|
{{ item.name }}
|
2022-03-07 09:17:12 +08:00
|
|
|
</div>
|
2022-03-09 14:19:03 +08:00
|
|
|
|
|
|
|
|
<div
|
|
|
|
v-for="item in portAttributeList"
|
|
|
|
:key="'port' + item.id"
|
|
|
|
class="dashboard-legend-port"
|
|
|
|
:style="{ background: item.color }"
|
|
|
|
>
|
|
|
|
{{ item.name }}
|
2022-03-07 09:17:12 +08:00
|
|
|
</div>
|
2022-03-09 14:19:03 +08:00
|
|
|
<div class="dashboard-legend-btn">
|
|
|
|
<el-button type="primary" size="mini" @click="submitLinkList">{{
|
|
|
|
"btn.submit" | i18nFilter
|
|
|
|
}}</el-button>
|
2022-03-17 10:59:00 +08:00
|
|
|
<el-button type="warning" size="mini" @click="init()">{{
|
|
|
|
"btn.reset" | i18nFilter
|
|
|
|
}}</el-button>
|
|
|
|
<el-button type="success" size="mini" @click="goback()">{{
|
|
|
|
"btn.back" | i18nFilter
|
|
|
|
}}</el-button>
|
2022-03-07 09:17:12 +08:00
|
|
|
</div>
|
2022-03-09 14:19:03 +08:00
|
|
|
<div class="dashboard-legend-search">
|
|
|
|
<el-select
|
|
|
|
v-model="current"
|
|
|
|
size="mini"
|
|
|
|
@change="handleChange"
|
2022-03-17 10:59:00 +08:00
|
|
|
><el-option
|
|
|
|
v-for="item in totalPage"
|
|
|
|
:key="'select' + item"
|
|
|
|
:label="
|
|
|
|
$t('module.dashboard.pageHeader') +
|
|
|
|
item +
|
|
|
|
$t('module.dashboard.pageFooter')
|
|
|
|
"
|
|
|
|
:value="item"
|
|
|
|
/>
|
2022-03-09 14:19:03 +08:00
|
|
|
</el-select>
|
2022-03-07 09:17:12 +08:00
|
|
|
</div>
|
2022-03-09 14:19:03 +08:00
|
|
|
</el-row>
|
|
|
|
<el-row
|
2022-03-16 20:11:30 +08:00
|
|
|
v-if="current * 80 < shelfVoList[0].rowVoList[0].portVoList.length"
|
2022-03-09 14:19:03 +08:00
|
|
|
class="dashboard-layout"
|
|
|
|
:gutter="12"
|
|
|
|
>
|
|
|
|
<el-col
|
|
|
|
v-for="item in 4"
|
|
|
|
:key="'shelfbox' + item"
|
|
|
|
class="dashboard-layout-shelf-box"
|
|
|
|
:span="6"
|
|
|
|
>
|
|
|
|
<el-row>
|
|
|
|
<el-col
|
2022-03-16 20:11:30 +08:00
|
|
|
v-for="(i, index) in shelfVoList"
|
2022-03-09 14:19:03 +08:00
|
|
|
:key="item + 'shelf' + i.id"
|
|
|
|
:span="12"
|
|
|
|
class="dashboard-layout-shelf"
|
|
|
|
>
|
|
|
|
<el-row>
|
|
|
|
<el-col
|
2022-03-16 20:11:30 +08:00
|
|
|
v-for="z in i.rowVoList"
|
2022-03-09 14:19:03 +08:00
|
|
|
:key="item + 'shelf' + i + 'row' + z.id"
|
|
|
|
:span="12"
|
|
|
|
class="dashboard-layout-row"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
v-for="x in 20"
|
|
|
|
:key="item + 'shelf' + i + 'row' + z + 'item' + x"
|
|
|
|
class="dashboard-layout-item"
|
|
|
|
:style="{
|
|
|
|
background:
|
|
|
|
portAttributeObj[
|
2022-03-16 20:11:30 +08:00
|
|
|
z.portVoList[
|
2022-03-09 14:19:03 +08:00
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].attribute
|
|
|
|
],
|
|
|
|
cursor:
|
2022-03-16 20:11:30 +08:00
|
|
|
z.portVoList[
|
2022-03-09 14:19:03 +08:00
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].attribute === 3
|
|
|
|
? 'not-allowed'
|
|
|
|
: 'pointer',
|
|
|
|
color:
|
2022-03-16 20:11:30 +08:00
|
|
|
z.portVoList[
|
2022-03-09 14:19:03 +08:00
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].attribute === 3
|
|
|
|
? '#A2A8B5'
|
|
|
|
: '',
|
2022-03-17 10:59:00 +08:00
|
|
|
border: selectStorageList.some(
|
|
|
|
StorageItem =>
|
|
|
|
StorageItem.locationId ===
|
|
|
|
z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].id
|
|
|
|
)
|
|
|
|
? '2px dashed red'
|
|
|
|
: ''
|
2022-03-09 14:19:03 +08:00
|
|
|
}"
|
|
|
|
@click="
|
|
|
|
setType(
|
2022-03-16 20:11:30 +08:00
|
|
|
z.portVoList[
|
2022-03-09 14:19:03 +08:00
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
]
|
|
|
|
)
|
|
|
|
"
|
|
|
|
>
|
2022-03-17 10:59:00 +08:00
|
|
|
<div
|
|
|
|
v-if="
|
|
|
|
z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].attribute !== 3
|
|
|
|
"
|
|
|
|
class="dashboard-layout-item-cricle"
|
|
|
|
:style="{
|
|
|
|
background: z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].cassetteVoList[0]
|
|
|
|
? cassetteStatusObj[
|
|
|
|
z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].cassetteVoList[0].status
|
|
|
|
]
|
|
|
|
: ''
|
|
|
|
}"
|
|
|
|
/>
|
|
|
|
<div
|
|
|
|
:class="
|
|
|
|
StorageList.some(
|
|
|
|
StorageItem =>
|
|
|
|
StorageItem.id ===
|
|
|
|
z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].id
|
|
|
|
)
|
|
|
|
? 'dashboard-layout-item-horn'
|
|
|
|
: ''
|
|
|
|
"
|
|
|
|
/>
|
|
|
|
{{
|
|
|
|
z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].attribute !== 3
|
|
|
|
? z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].name
|
|
|
|
: "XXXX"
|
|
|
|
}}
|
2022-03-09 14:19:03 +08:00
|
|
|
</div>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<div class="dashboard-layout-footer">
|
2022-03-17 10:59:00 +08:00
|
|
|
{{
|
|
|
|
$t(bottomIndex[index]) +
|
|
|
|
"(" +
|
|
|
|
((current - 1) * 4 + item) +
|
|
|
|
")"
|
|
|
|
}}
|
2022-03-09 14:19:03 +08:00
|
|
|
</div>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row v-else class="dashboard-layout" :gutter="12">
|
|
|
|
<el-col
|
|
|
|
v-for="item in Math.ceil(
|
2022-03-17 10:59:00 +08:00
|
|
|
(shelfVoList[0].rowVoList[0].portVoList.length -
|
|
|
|
(current - 1) * 80) /
|
|
|
|
20
|
2022-03-09 14:19:03 +08:00
|
|
|
)"
|
|
|
|
:key="'shelfbox' + item"
|
|
|
|
class="dashboard-layout-shelf-box"
|
|
|
|
:span="6"
|
|
|
|
>
|
|
|
|
<el-row>
|
|
|
|
<el-col
|
2022-03-16 20:11:30 +08:00
|
|
|
v-for="(i, index) in shelfVoList"
|
2022-03-09 14:19:03 +08:00
|
|
|
:key="item + 'shelf' + i.id"
|
|
|
|
:span="12"
|
|
|
|
class="dashboard-layout-shelf"
|
|
|
|
>
|
|
|
|
<el-row
|
|
|
|
v-if="
|
|
|
|
item <
|
|
|
|
Math.ceil(
|
2022-03-16 20:11:30 +08:00
|
|
|
(shelfVoList[0].rowVoList[0].portVoList.length -
|
2022-03-09 14:19:03 +08:00
|
|
|
(current - 1) * 80) /
|
|
|
|
20
|
|
|
|
)
|
|
|
|
"
|
|
|
|
>
|
|
|
|
<el-col
|
2022-03-16 20:11:30 +08:00
|
|
|
v-for="z in i.rowVoList"
|
2022-03-09 14:19:03 +08:00
|
|
|
:key="item + 'shelf' + i + 'row' + z.id"
|
|
|
|
:span="12"
|
|
|
|
class="dashboard-layout-row"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
v-for="x in 20"
|
|
|
|
:key="item + 'shelf' + i + 'row' + z + 'item' + x"
|
|
|
|
class="dashboard-layout-item"
|
|
|
|
:style="{
|
|
|
|
background:
|
|
|
|
portAttributeObj[
|
2022-03-16 20:11:30 +08:00
|
|
|
z.portVoList[
|
2022-03-09 14:19:03 +08:00
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].attribute
|
|
|
|
],
|
|
|
|
cursor:
|
2022-03-16 20:11:30 +08:00
|
|
|
z.portVoList[
|
2022-03-09 14:19:03 +08:00
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].attribute === 3
|
|
|
|
? 'not-allowed'
|
|
|
|
: 'pointer',
|
|
|
|
color:
|
2022-03-16 20:11:30 +08:00
|
|
|
z.portVoList[
|
2022-03-09 14:19:03 +08:00
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].attribute === 3
|
|
|
|
? '#A2A8B5'
|
|
|
|
: '',
|
2022-03-17 10:59:00 +08:00
|
|
|
border: selectStorageList.some(
|
|
|
|
StorageItem =>
|
|
|
|
StorageItem.locationId ===
|
|
|
|
z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].id
|
|
|
|
)
|
|
|
|
? '2px dashed red'
|
|
|
|
: ''
|
2022-03-09 14:19:03 +08:00
|
|
|
}"
|
|
|
|
@click="
|
|
|
|
setType(
|
2022-03-16 20:11:30 +08:00
|
|
|
z.portVoList[
|
2022-03-09 14:19:03 +08:00
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
]
|
|
|
|
)
|
|
|
|
"
|
|
|
|
>
|
2022-03-17 10:59:00 +08:00
|
|
|
<div
|
|
|
|
v-if="
|
|
|
|
z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].attribute !== 3
|
|
|
|
"
|
|
|
|
class="dashboard-layout-item-cricle"
|
|
|
|
:style="{
|
|
|
|
background: z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].cassetteVoList[0]
|
|
|
|
? cassetteStatusObj[
|
|
|
|
z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].cassetteVoList[0].status
|
|
|
|
]
|
|
|
|
: ''
|
|
|
|
}"
|
|
|
|
/>
|
|
|
|
<div
|
|
|
|
:class="
|
|
|
|
StorageList.some(
|
|
|
|
StorageItem =>
|
|
|
|
StorageItem.id ===
|
|
|
|
z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].id
|
|
|
|
)
|
|
|
|
? 'dashboard-layout-item-horn'
|
|
|
|
: ''
|
|
|
|
"
|
|
|
|
/>
|
|
|
|
{{
|
|
|
|
z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].attribute !== 3
|
|
|
|
? z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].name
|
|
|
|
: "XXXX"
|
|
|
|
}}
|
2022-03-09 14:19:03 +08:00
|
|
|
</div>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row v-else>
|
|
|
|
<el-col
|
2022-03-16 20:11:30 +08:00
|
|
|
v-for="z in i.rowVoList"
|
2022-03-09 14:19:03 +08:00
|
|
|
:key="item + 'shelf' + i + 'row' + z.id"
|
|
|
|
:span="12"
|
|
|
|
class="dashboard-layout-row"
|
|
|
|
>
|
|
|
|
<div
|
2022-03-16 20:11:30 +08:00
|
|
|
v-for="x in shelfVoList[0].rowVoList[0].portVoList.length -
|
2022-03-09 14:19:03 +08:00
|
|
|
(item - 1) * 20 -
|
|
|
|
(current - 1) * 80"
|
|
|
|
:key="item + 'shelf' + i + 'row' + z + 'item' + x"
|
|
|
|
class="dashboard-layout-item"
|
|
|
|
:style="{
|
|
|
|
background:
|
|
|
|
portAttributeObj[
|
2022-03-16 20:11:30 +08:00
|
|
|
z.portVoList[
|
2022-03-09 14:19:03 +08:00
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].attribute
|
|
|
|
],
|
|
|
|
cursor:
|
2022-03-16 20:11:30 +08:00
|
|
|
z.portVoList[
|
2022-03-09 14:19:03 +08:00
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].attribute === 3
|
|
|
|
? 'not-allowed'
|
|
|
|
: 'pointer',
|
|
|
|
color:
|
2022-03-16 20:11:30 +08:00
|
|
|
z.portVoList[
|
2022-03-09 14:19:03 +08:00
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].attribute === 3
|
|
|
|
? '#A2A8B5'
|
|
|
|
: '',
|
2022-03-17 10:59:00 +08:00
|
|
|
border: selectStorageList.some(
|
|
|
|
StorageItem =>
|
|
|
|
StorageItem.locationId ===
|
|
|
|
z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].id
|
|
|
|
)
|
|
|
|
? '2px dashed red'
|
|
|
|
: ''
|
2022-03-09 14:19:03 +08:00
|
|
|
}"
|
|
|
|
@click="
|
|
|
|
setType(
|
2022-03-16 20:11:30 +08:00
|
|
|
z.portVoList[
|
2022-03-09 14:19:03 +08:00
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
]
|
|
|
|
)
|
|
|
|
"
|
|
|
|
>
|
2022-03-17 10:59:00 +08:00
|
|
|
<div
|
|
|
|
v-if="
|
|
|
|
z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].attribute !== 3
|
|
|
|
"
|
|
|
|
class="dashboard-layout-item-cricle"
|
|
|
|
:style="{
|
|
|
|
background: z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].cassetteVoList[0]
|
|
|
|
? cassetteStatusObj[
|
|
|
|
z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].cassetteVoList[0].status
|
|
|
|
]
|
|
|
|
: ''
|
|
|
|
}"
|
|
|
|
/>
|
|
|
|
<div
|
|
|
|
:class="
|
|
|
|
StorageList.some(
|
|
|
|
StorageItem =>
|
|
|
|
StorageItem.id ===
|
|
|
|
z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].id
|
|
|
|
)
|
|
|
|
? 'dashboard-layout-item-horn'
|
|
|
|
: ''
|
|
|
|
"
|
|
|
|
/>
|
|
|
|
{{
|
|
|
|
z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].attribute !== 3
|
|
|
|
? z.portVoList[
|
|
|
|
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
|
|
|
|
].name
|
|
|
|
: "XXXX"
|
|
|
|
}}
|
2022-03-09 14:19:03 +08:00
|
|
|
</div>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<div class="dashboard-layout-footer">
|
2022-03-17 10:59:00 +08:00
|
|
|
{{
|
|
|
|
$t(bottomIndex[index]) +
|
|
|
|
"(" +
|
|
|
|
((current - 1) * 4 + item) +
|
|
|
|
")"
|
|
|
|
}}
|
2022-03-09 14:19:03 +08:00
|
|
|
</div>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-card>
|
|
|
|
<process-storage-type
|
|
|
|
v-if="typeVisible"
|
|
|
|
ref="typeRef"
|
|
|
|
@refreshDataList="setStorageList"
|
|
|
|
/>
|
|
|
|
</div>
|
2022-03-07 09:17:12 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2022-03-16 20:11:30 +08:00
|
|
|
import { getPortList } from '@/api/dashboard'
|
2022-03-17 10:59:00 +08:00
|
|
|
import { locationByProcessList } from '@/api/basicData/Warehouse/StorageBoxInfo'
|
2022-03-11 16:38:54 +08:00
|
|
|
import { batchListAdd } from '@/api/basicData/Warehouse/StorageBoxInfo'
|
2022-03-09 14:19:03 +08:00
|
|
|
import testdata from './testdata'
|
|
|
|
import processStorageType from './processStorageType'
|
2022-03-07 09:17:12 +08:00
|
|
|
|
|
|
|
export default {
|
2022-03-15 14:37:40 +08:00
|
|
|
name: 'ProcessStorageLink1',
|
2022-03-09 14:19:03 +08:00
|
|
|
components: { processStorageType },
|
2022-03-07 09:17:12 +08:00
|
|
|
data() {
|
2022-03-09 14:19:03 +08:00
|
|
|
return testdata
|
|
|
|
},
|
|
|
|
created() {
|
2022-03-11 16:38:54 +08:00
|
|
|
this.id = this.$route.query.id
|
2022-03-17 10:59:00 +08:00
|
|
|
this.totalPage = Math.ceil(
|
|
|
|
this.shelfVoList[0].rowVoList[0].portVoList.length / 80
|
|
|
|
)
|
2022-03-09 14:19:03 +08:00
|
|
|
this.init()
|
2022-03-07 09:17:12 +08:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
init() {
|
2022-03-16 20:11:30 +08:00
|
|
|
getPortList().then(res => {
|
|
|
|
this.shelfVoList = res.data[0].shelfVoList
|
2022-03-17 10:59:00 +08:00
|
|
|
this.totalPage = Math.ceil(
|
|
|
|
this.shelfVoList[0].rowVoList[0].portVoList.length / 80
|
|
|
|
)
|
|
|
|
})
|
|
|
|
locationByProcessList({
|
|
|
|
current: 1,
|
|
|
|
size: 990,
|
|
|
|
workSequenId: this.id
|
|
|
|
}).then(response => {
|
|
|
|
if (response.data.records) {
|
|
|
|
this.StorageList = response.data.records
|
|
|
|
} else {
|
|
|
|
this.StorageList.splice(0, this.list.length)
|
|
|
|
}
|
2022-03-16 20:11:30 +08:00
|
|
|
})
|
2022-03-09 14:19:03 +08:00
|
|
|
this.selectStorageList.splice(0, this.selectStorageList.length)
|
|
|
|
},
|
|
|
|
setType(item) {
|
|
|
|
if (item.attribute !== 3) {
|
2022-03-17 10:59:00 +08:00
|
|
|
if (
|
|
|
|
this.selectStorageList.findIndex(
|
|
|
|
StorageItem => StorageItem.locationId === item.id
|
|
|
|
) + 1
|
|
|
|
) {
|
|
|
|
this.selectStorageList.splice(
|
|
|
|
this.selectStorageList.findIndex(
|
|
|
|
StorageItem => StorageItem.locationId === item.id
|
|
|
|
),
|
|
|
|
1
|
|
|
|
)
|
2022-03-09 14:19:03 +08:00
|
|
|
} else {
|
|
|
|
this.typeVisible = true
|
|
|
|
this.$nextTick(() => {
|
2022-03-15 11:20:36 +08:00
|
|
|
this.$refs.typeRef.init(item.id, item.name)
|
2022-03-09 14:19:03 +08:00
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
2022-03-07 09:17:12 +08:00
|
|
|
},
|
2022-03-15 11:20:36 +08:00
|
|
|
setStorageList(locationId, locationName, dataForm) {
|
|
|
|
const obj = Object.assign({ locationId, locationName }, dataForm)
|
2022-03-09 14:19:03 +08:00
|
|
|
this.selectStorageList.push(obj)
|
2022-03-07 09:17:12 +08:00
|
|
|
},
|
2022-03-09 14:19:03 +08:00
|
|
|
handleChange(v) {
|
|
|
|
console.log(v)
|
|
|
|
},
|
|
|
|
submitLinkList() {
|
2022-03-16 10:12:36 +08:00
|
|
|
if (this.selectStorageList.length) {
|
|
|
|
const tipArr = this.selectStorageList.map(item => {
|
|
|
|
return item.locationName
|
|
|
|
})
|
|
|
|
const obj = {
|
|
|
|
workSequenId: this.id,
|
|
|
|
processLocationStorageList: this.selectStorageList
|
|
|
|
}
|
2022-03-17 10:59:00 +08:00
|
|
|
this.$confirm(
|
|
|
|
`${this.$t(
|
|
|
|
'module.basicData.visual.TipsStorageBefore'
|
|
|
|
)}[${tipArr.join(',')}]?`,
|
|
|
|
this.$t('module.basicData.visual.Tips'),
|
|
|
|
{
|
|
|
|
confirmButtonText: this.$t(
|
|
|
|
'module.basicData.visual.confirmButtonText'
|
|
|
|
),
|
|
|
|
cancelButtonText: this.$t(
|
|
|
|
'module.basicData.visual.cancelButtonText'
|
|
|
|
),
|
|
|
|
type: 'warning'
|
|
|
|
}
|
|
|
|
)
|
|
|
|
.then(() => {
|
|
|
|
batchListAdd(obj).then(res => {
|
|
|
|
this.$message({
|
|
|
|
message: this.$t('module.basicData.visual.success'),
|
|
|
|
type: 'success',
|
|
|
|
duration: 1500,
|
|
|
|
onClose: () => {
|
|
|
|
this.init()
|
|
|
|
}
|
|
|
|
})
|
2022-03-16 10:12:36 +08:00
|
|
|
})
|
2022-03-11 16:38:54 +08:00
|
|
|
})
|
2022-03-17 10:59:00 +08:00
|
|
|
.catch(() => {})
|
2022-03-16 10:12:36 +08:00
|
|
|
} else {
|
|
|
|
this.$message({
|
|
|
|
message: this.$t('module.basicData.visual.PleaseAddLocationFirst'),
|
|
|
|
type: 'warning',
|
|
|
|
duration: 1500
|
2022-03-11 16:38:54 +08:00
|
|
|
})
|
2022-03-16 10:12:36 +08:00
|
|
|
}
|
2022-03-11 16:38:54 +08:00
|
|
|
},
|
|
|
|
goback() {
|
|
|
|
this.selectStorageList.splice(0, this.selectStorageList.length)
|
|
|
|
this.$router.go(-1)
|
2022-03-07 09:17:12 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2022-03-09 14:19:03 +08:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
.dashboard-container {
|
|
|
|
background: #f2f4f9;
|
|
|
|
min-height: calc(100vh - 134px);
|
|
|
|
overflow-x: scroll;
|
|
|
|
padding: 0 16px;
|
|
|
|
padding-top: 24px;
|
|
|
|
font-size: 14px;
|
|
|
|
.dashboard-main {
|
|
|
|
width: 100%;
|
|
|
|
min-width: 1380px;
|
|
|
|
background-color: #fff;
|
|
|
|
border-radius: 8px;
|
|
|
|
min-height: calc(100vh - 186px);
|
|
|
|
.dashboard-title {
|
|
|
|
.dashboard-header-line {
|
|
|
|
display: inline-block;
|
|
|
|
width: 4px;
|
|
|
|
height: 16px;
|
|
|
|
background: #0b58ff;
|
|
|
|
border-radius: 1px;
|
|
|
|
position: relative;
|
|
|
|
top: 2px;
|
|
|
|
margin-right: 4px;
|
|
|
|
}
|
|
|
|
.dashboard-header-title {
|
|
|
|
display: inline-block;
|
|
|
|
font-size: 16px;
|
|
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #000000;
|
|
|
|
line-height: 16px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.dashboard-legend {
|
|
|
|
margin-top: 20px;
|
|
|
|
.dashboard-legend-cassette {
|
|
|
|
display: inline-block;
|
|
|
|
margin-right: 24px;
|
|
|
|
.dashboard-legend-cassette-cricle {
|
|
|
|
display: inline-block;
|
|
|
|
width: 12px;
|
|
|
|
height: 12px;
|
|
|
|
border-radius: 6px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.dashboard-legend-port {
|
|
|
|
display: inline-block;
|
|
|
|
height: 24px;
|
|
|
|
line-height: 24px;
|
|
|
|
border-radius: 4px;
|
|
|
|
padding: 0 16px;
|
|
|
|
margin-left: 24px;
|
|
|
|
}
|
|
|
|
.dashboard-legend-btn {
|
|
|
|
margin: 0 20px;
|
|
|
|
float: right;
|
|
|
|
}
|
|
|
|
.dashboard-legend-search {
|
|
|
|
float: right;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.dashboard-layout {
|
|
|
|
margin: 20px 0;
|
|
|
|
.dashboard-layout-shelf-box {
|
|
|
|
.dashboard-layout-footer {
|
|
|
|
text-align: center;
|
|
|
|
margin-top: 12px;
|
|
|
|
}
|
|
|
|
.dashboard-layout-shelf {
|
|
|
|
padding: 0 8px;
|
|
|
|
.dashboard-layout-row {
|
|
|
|
padding: 0 1px;
|
|
|
|
.dashboard-layout-item {
|
|
|
|
width: 100%;
|
|
|
|
text-align: center;
|
|
|
|
height: 32px;
|
|
|
|
box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8);
|
|
|
|
border-radius: 2px 4px 4px 2px;
|
|
|
|
margin-bottom: 8px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2022-03-17 10:59:00 +08:00
|
|
|
position: relative;
|
2022-03-09 14:19:03 +08:00
|
|
|
.dashboard-layout-item-cricle {
|
|
|
|
display: inline-block;
|
|
|
|
width: 12px;
|
|
|
|
height: 12px;
|
|
|
|
border-radius: 6px;
|
|
|
|
margin-right: 6px;
|
|
|
|
}
|
2022-03-17 10:59:00 +08:00
|
|
|
.dashboard-layout-item-horn {
|
|
|
|
position: absolute;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
border-style: solid;
|
|
|
|
border-width: 14px 0px 0px 14px;
|
|
|
|
border-color: #0B58FF transparent transparent transparent;
|
|
|
|
}
|
2022-03-09 14:19:03 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-03-07 09:17:12 +08:00
|
|
|
}
|
|
|
|
</style>
|