仓库-工序存储区管理

This commit is contained in:
朱文强 2022-03-09 14:19:03 +08:00
parent 27786fb197
commit 238d8ba41c
7 changed files with 3465 additions and 159 deletions

View File

@ -2,7 +2,7 @@
* @Author: gtz * @Author: gtz
* @Date: 2021-03-04 16:13:51 * @Date: 2021-03-04 16:13:51
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2022-03-04 15:24:39 * @LastEditTime: 2022-03-09 11:16:12
* @Description: file content * @Description: file content
*/ */
export default { export default {
@ -318,6 +318,7 @@ export default {
LocationName: 'Location Name', LocationName: 'Location Name',
LocationCode: 'Location Code', LocationCode: 'Location Code',
PerformTaskManual: 'Perform Task Manual', PerformTaskManual: 'Perform Task Manual',
processStorageLink: 'Process Storage Link' processStorageLink: 'Process Storage Link',
SelectStorageType: 'Select Storage Type'
} }
} }

View File

@ -2,7 +2,7 @@
* @Author: gtz * @Author: gtz
* @Date: 2021-03-04 16:13:51 * @Date: 2021-03-04 16:13:51
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2022-03-07 09:14:33 * @LastEditTime: 2022-03-09 11:16:02
*/ */
export default { export default {
visual: { visual: {
@ -332,6 +332,7 @@ export default {
LocationName: '库位名', LocationName: '库位名',
LocationCode: '库位编码', LocationCode: '库位编码',
PerformTaskManual: '手动执行任务', PerformTaskManual: '手动执行任务',
processStorageLink: '工序关联库位' processStorageLink: '工序关联库位',
SelectStorageType: '选择库位类型'
} }
} }

View File

@ -313,6 +313,14 @@ export const constantRoutes = [
import('@/views/basicData/Warehouse/components/ProcessStorageManagement-info'), import('@/views/basicData/Warehouse/components/ProcessStorageManagement-info'),
name: 'ProcessStorageManagementInfo', name: 'ProcessStorageManagementInfo',
meta: { title: routerTitle.Warehouse.ProcessStorageManagement?.[language] || routerTitle.Warehouse.ProcessStorageManagement.en, icon: 'form', affix: true, required: true, requireToken: true } meta: { title: routerTitle.Warehouse.ProcessStorageManagement?.[language] || routerTitle.Warehouse.ProcessStorageManagement.en, icon: 'form', affix: true, required: true, requireToken: true }
},
{
path: '/ProcessStorageLink',
hidden: true,
component: () =>
import('@/views/basicData/Warehouse/components/processStorageLink'),
name: 'ProcessStorageLink',
meta: { title: routerTitle.Warehouse.ProcessStorageManagement?.[language] || routerTitle.Warehouse.ProcessStorageManagement.en, icon: 'form', affix: true, required: true, requireToken: true }
} }
] ]
}, },

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2020-12-29 15:41:11 * @Date: 2020-12-29 15:41:11
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2022-03-04 16:01:28 * @LastEditTime: 2022-03-09 09:57:41
* @Description: * @Description:
--> -->
<template> <template>
@ -25,13 +25,11 @@
@clickBtn="handleClick" @clickBtn="handleClick"
/> />
</base-table> </base-table>
<processStorage-link v-if="addOrUpdateVisible" ref="addOrUpdate" :area-id="listQuery.areaId" @refreshDataList="getList" />
</div> </div>
</template> </template>
<script> <script>
import i18n from '@/lang' import i18n from '@/lang'
import processStorageLink from './processStorageLink.vue'
import BaseTable from '@/components/BaseTable' import BaseTable from '@/components/BaseTable'
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn' import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
import { timeFormatter } from '@/filters' import { timeFormatter } from '@/filters'
@ -78,7 +76,7 @@ const tableProps = [
export default { export default {
name: 'Shelf', name: 'Shelf',
components: { BaseTable, MethodBtn, processStorageLink }, components: { BaseTable, MethodBtn },
filters: { filters: {
statusFilter(status) { statusFilter(status) {
const statusMap = { const statusMap = {
@ -91,7 +89,6 @@ export default {
}, },
data() { data() {
return { return {
addOrUpdateVisible: false,
tableBtn, tableBtn,
trueWidth: 200, trueWidth: 200,
tableProps, tableProps,
@ -142,9 +139,11 @@ export default {
}, },
// / // /
addNew(id) { addNew(id) {
this.addOrUpdateVisible = true this.$router.push({
this.$nextTick(() => { name: 'ProcessStorageLink',
this.$refs.addOrUpdate.init(id) query: {
dictTypeId: id
}
}) })
}, },
goback() { goback() {

View File

@ -1,175 +1,472 @@
<!-- <!--
* @Author: zwq * @Author: gtz
* @Date: 2020-12-29 16:37:56 * @Date: 2022-03-03 09:16:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2022-03-04 16:54:51 * @LastEditTime: 2022-03-09 14:17:23
* @Description: * @Description: file content
* @FilePath: \mt-ck-wms-ui\src\views\dashboard\index.vue
--> -->
<template> <template>
<el-dialog <div class="dashboard-container">
:title="$t('module.basicData.visual.stock') | i18nFilter" <el-card class="dashboard-main">
:visible.sync="visible" <el-row class="dashboard-title">
top="5vh" <div class="dashboard-header-line" />
> <div class="dashboard-header-title">WMS库存信息</div>
<div> </el-row>
<div class="mainDiv" style="margin:10px 0 100px"> <el-row class="dashboard-legend">
<div class="title">货架一</div>
<div class="flexDiv">
<div <div
v-for="count in 5" v-for="item in cassetteStatusList"
:key="count" :key="'cassette' + item.id"
class="wareBox" class="dashboard-legend-cassette"
:class="[
count > Math.round(Math.random() * 10) ? 'enableBox' : 'disableBox',
{ active: count === isActive }
]"
@click="selectBox(count)"
> >
<div class="plat">库位{{ count }}</div>
</div>
</div>
<div class="flexDiv">
<div <div
v-for="count in 5" class="dashboard-legend-cassette-cricle"
:key="count" :style="{ background: item.color }"
class="wareBox" />
:class="[ {{ item.name }}
count > Math.round(Math.random() * 10) ? 'enableBox' : 'disableBox',
{ active: count + 5 === isActive }
]"
@click="selectBox(count + 5)"
>
<div class="plat">库位{{ count + 5 }}</div>
</div> </div>
</div> |
</div>
<div class="line" />
<div class="mainDiv" style="margin:100px 0 10px">
<div class="title">货架二</div>
<div class="flexDiv">
<div <div
v-for="count in 5" v-for="item in portAttributeList"
:key="count" :key="'port' + item.id"
class="wareBox" class="dashboard-legend-port"
:class="[ :style="{ background: item.color }"
count > Math.round(Math.random() * 10) ? 'enableBox' : 'disableBox',
{ active: count+10 === isActive }
]"
@click="selectBox(count+10)"
> >
<div class="plat">库位{{ count+10 }}</div> {{ item.name }}
</div> </div>
<div class="dashboard-legend-btn">
<el-button type="primary" size="mini" @click="submitLinkList">{{
"btn.submit" | i18nFilter
}}</el-button>
</div> </div>
<div class="flexDiv"> <div class="dashboard-legend-search">
<el-select
v-model="current"
size="mini"
placeholder="请选择库存范围"
@change="handleChange"
>
<el-option
v-for="item in totalPage"
:key="'select' + item"
:label="'第' + item + '页'"
:value="item"
/>
</el-select>
</div>
</el-row>
<el-row
v-if="current * 80 < shelfList[0].rowList[0].portList.length"
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
v-for="(i, index) in shelfList"
:key="item + 'shelf' + i.id"
:span="12"
class="dashboard-layout-shelf"
>
<el-row>
<el-col
v-for="z in i.rowList"
:key="item + 'shelf' + i + 'row' + z.id"
:span="12"
class="dashboard-layout-row"
>
<div <div
v-for="count in 5" v-for="x in 20"
:key="count" :key="item + 'shelf' + i + 'row' + z + 'item' + x"
class="wareBox" class="dashboard-layout-item"
:class="[ :style="{
count > Math.round(Math.random() * 10) ? 'enableBox' : 'disableBox', background:
{ active: count+15 === isActive } portAttributeObj[
]" z.portList[
@click="selectBox(count+15)" (current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute
],
cursor:
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute === 3
? 'not-allowed'
: 'pointer',
color:
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute === 3
? '#A2A8B5'
: '',
border:
selectStorageList.some(StorageItem=>StorageItem.id===z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].id)
? '1px solid red' : ''
}"
@click="
setType(
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
]
)
"
> >
<div class="plat">库位{{ count+15 }}</div> <div
v-if="
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute !== 3
"
class="dashboard-layout-item-cricle"
:style="{
background:
cassetteStatusObj[
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].cassetteList[0].status
]
}"
/>
{{
z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)]
.name
}}
</div> </div>
</el-col>
</el-row>
<div class="dashboard-layout-footer">
{{
"第" + (index + 1) + "排(" + ((current - 1) * 4 + item) + ")"
}}
</div> </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(
(shelfList[0].rowList[0].portList.length - (current - 1) * 80) / 20
)"
:key="'shelfbox' + item"
class="dashboard-layout-shelf-box"
:span="6"
>
<el-row>
<el-col
v-for="(i, index) in shelfList"
:key="item + 'shelf' + i.id"
:span="12"
class="dashboard-layout-shelf"
>
<el-row
v-if="
item <
Math.ceil(
(shelfList[0].rowList[0].portList.length -
(current - 1) * 80) /
20
)
"
>
<el-col
v-for="z in i.rowList"
: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[
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute
],
cursor:
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute === 3
? 'not-allowed'
: 'pointer',
color:
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute === 3
? '#A2A8B5'
: '',
border:
selectStorageList.some(StorageItem=>StorageItem.id===z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].id)
? '1px solid red' : ''
}"
@click="
setType(
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
]
)
"
>
<div
v-if="
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute !== 3
"
class="dashboard-layout-item-cricle"
:style="{
background:
cassetteStatusObj[
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].cassetteList[0].status
]
}"
/>
{{
z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)]
.name
}}
</div> </div>
</el-col>
</el-row>
<el-row v-else>
<el-col
v-for="z in i.rowList"
:key="item + 'shelf' + i + 'row' + z.id"
:span="12"
class="dashboard-layout-row"
>
<div
v-for="x in shelfList[0].rowList[0].portList.length -
(item - 1) * 20 -
(current - 1) * 80"
:key="item + 'shelf' + i + 'row' + z + 'item' + x"
class="dashboard-layout-item"
:style="{
background:
portAttributeObj[
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute
],
cursor:
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute === 3
? 'not-allowed'
: 'pointer',
color:
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute === 3
? '#A2A8B5'
: '',
border:
selectStorageList.some(StorageItem=>StorageItem.id===z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].id)
? '1px solid red' : ''
}"
@click="
setType(
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
]
)
"
>
<div
v-if="
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute !== 3
"
class="dashboard-layout-item-cricle"
:style="{
background:
cassetteStatusObj[
z.portList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].cassetteList[0].status
]
}"
/>
{{
z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)]
.name
}}
</div>
</el-col>
</el-row>
<div class="dashboard-layout-footer">
{{
"第" + (index + 1) + "排(" + ((current - 1) * 4 + item) + ")"
}}
</div>
</el-col>
</el-row>
</el-col>
</el-row>
</el-card>
<process-storage-type
v-if="typeVisible"
ref="typeRef"
@refreshDataList="setStorageList"
/>
</div> </div>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{ 'btn.cancel' | i18nFilter }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ 'btn.confirm' | i18nFilter }}</el-button>
</span>
</el-dialog>
</template> </template>
<script> <script>
import testdata from './testdata'
import processStorageType from './processStorageType'
export default { export default {
name: 'Dashboard',
components: { processStorageType },
data() { data() {
return { return testdata
visible: false, },
isActiveArr: [] created() {
} console.log(this.shelfList)
this.totalPage = Math.ceil(
this.shelfList[0].rowList[0].portList.length / 80
)
this.init()
}, },
methods: { methods: {
init() { init() {
this.visible = true this.selectStorageList.splice(0, this.selectStorageList.length)
}, },
selectBox(count) { setType(item) {
this.isActive.push(count) if (item.attribute !== 3) {
if (this.selectStorageList.findIndex(StorageItem => StorageItem.id === item.id) + 1) {
this.selectStorageList.splice(this.selectStorageList.findIndex(StorageItem => StorageItem.id === item.id), 1)
} else {
this.typeVisible = true
this.$nextTick(() => {
this.$refs.typeRef.init(item.id)
})
}
}
}, },
// setStorageList(id, type) {
dataFormSubmit() { const obj = {
this.visible = false id,
type
}
this.selectStorageList.push(obj)
},
handleChange(v) {
console.log(v)
},
submitLinkList() {
console.log('submitLinkList')
} }
} }
} }
</script> </script>
<style scoped> <style lang="scss" scoped>
.mainDiv { .dashboard-container {
border: 2px solid rgb(145, 174, 255); background: #f2f4f9;
padding: 20px 0; min-height: calc(100vh - 134px);
} overflow-x: scroll;
.flexDiv { padding: 0 16px;
display: -webkit-flex; padding-top: 24px;
display: flex; font-size: 14px;
-webkit-justify-content: space-around; .dashboard-main {
justify-content: space-around; width: 100%;
} min-width: 1380px;
.title { background-color: #fff;
float: left; border-radius: 8px;
width: 50px; min-height: calc(100vh - 186px);
font-size: 40px; .dashboard-title {
line-height: 45px; .dashboard-header-line {
} display: inline-block;
/* 边框特效 */ width: 4px;
.wareBox:hover { height: 16px;
background: linear-gradient(to left, deepskyblue, deepskyblue) left top background: #0b58ff;
no-repeat, border-radius: 1px;
linear-gradient(to bottom, deepskyblue, deepskyblue) left top no-repeat, position: relative;
linear-gradient(to left, deepskyblue, deepskyblue) right top no-repeat, top: 2px;
linear-gradient(to bottom, deepskyblue, deepskyblue) right top no-repeat, margin-right: 4px;
linear-gradient(to left, deepskyblue, deepskyblue) left bottom no-repeat, }
linear-gradient(to bottom, deepskyblue, deepskyblue) left bottom no-repeat, .dashboard-header-title {
linear-gradient(to left, deepskyblue, deepskyblue) right bottom no-repeat, display: inline-block;
linear-gradient(to left, deepskyblue, deepskyblue) right bottom no-repeat; font-size: 16px;
background-size: 5px 30px, 30px 5px; font-family: PingFangSC-Regular, PingFang SC;
color: black; font-weight: 400;
border-radius: 5px; color: #000000;
background-color: rgb(190, 224, 241); line-height: 16px;
} }
.wareBox { }
cursor: pointer; .dashboard-legend {
margin: 10px; margin-top: 20px;
height: 80px; .dashboard-legend-cassette {
line-height: 70px; display: inline-block;
text-align: center; margin-right: 24px;
border: 2px solid #cdcdc5; .dashboard-legend-cassette-cricle {
border-radius: 5px; display: inline-block;
} width: 12px;
.plat { height: 12px;
min-width: 80px; border-radius: 6px;
} }
.line { }
.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; margin: 20px 0;
height: 2px; .dashboard-layout-shelf-box {
background-color: gray; .dashboard-layout-footer {
border-left: 200px solid #ddd; text-align: center;
border-right: 200px solid #ddd; margin-top: 12px;
} }
.enableBox { .dashboard-layout-shelf {
background: rgb(0, 189, 16); padding: 0 8px;
} .dashboard-layout-row {
.disableBox { padding: 0 1px;
background: #ddd; .dashboard-layout-item {
cursor: not-allowed; width: 100%;
} text-align: center;
.end-plat { height: 32px;
background-color: rgb(195, 246, 255); box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8);
} border-radius: 2px 4px 4px 2px;
.active { margin-bottom: 8px;
border: 2px solid red; display: flex;
align-items: center;
justify-content: center;
.dashboard-layout-item-cricle {
display: inline-block;
width: 12px;
height: 12px;
border-radius: 6px;
margin-right: 6px;
}
}
}
}
}
}
}
} }
</style> </style>

View File

@ -0,0 +1,45 @@
<!--
* @Author: zwq
* @Date: 2020-12-29 16:37:56
* @LastEditors: zwq
* @LastEditTime: 2022-03-09 11:18:51
* @Description:
-->
<template>
<el-dialog
:title="$t('module.basicData.Warehouse.SelectStorageType') | i18nFilter"
:visible.sync="visible"
>
<el-radio v-model="storageType" :label="1">Working Port</el-radio>
<el-radio v-model="storageType" :label="2">Buffer Port</el-radio>
<el-radio v-model="storageType" :label="3">Exception Port</el-radio>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{ 'btn.cancel' | i18nFilter }}</el-button>
<el-button type="primary" @click="dataFormSubmit()">{{ 'btn.confirm' | i18nFilter }}</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data() {
return {
visible: false,
storageId: '',
storageType: 1
}
},
methods: {
init(id) {
this.storageId = id
this.visible = true
},
//
dataFormSubmit() {
this.visible = false
this.$emit('refreshDataList', this.storageId, this.storageType)
}
}
}
</script>

File diff suppressed because it is too large Load Diff