Compare commits

..

No commits in common. "66302849a331904bbb4e9c7fd25af5a35f322783" and "27786fb1972d7038bfa42cd80420801ccfcde1c9" have entirely different histories.

7 changed files with 162 additions and 3468 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-09 11:16:12 * @LastEditTime: 2022-03-04 15:24:39
* @Description: file content * @Description: file content
*/ */
export default { export default {
@ -318,7 +318,6 @@ 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-09 11:16:02 * @LastEditTime: 2022-03-07 09:14:33
*/ */
export default { export default {
visual: { visual: {
@ -332,7 +332,6 @@ export default {
LocationName: '库位名', LocationName: '库位名',
LocationCode: '库位编码', LocationCode: '库位编码',
PerformTaskManual: '手动执行任务', PerformTaskManual: '手动执行任务',
processStorageLink: '工序关联库位', processStorageLink: '工序关联库位'
SelectStorageType: '选择库位类型'
} }
} }

View File

@ -313,14 +313,6 @@ 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-09 09:57:41 * @LastEditTime: 2022-03-04 16:01:28
* @Description: * @Description:
--> -->
<template> <template>
@ -25,11 +25,13 @@
@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'
@ -76,7 +78,7 @@ const tableProps = [
export default { export default {
name: 'Shelf', name: 'Shelf',
components: { BaseTable, MethodBtn }, components: { BaseTable, MethodBtn, processStorageLink },
filters: { filters: {
statusFilter(status) { statusFilter(status) {
const statusMap = { const statusMap = {
@ -89,6 +91,7 @@ export default {
}, },
data() { data() {
return { return {
addOrUpdateVisible: false,
tableBtn, tableBtn,
trueWidth: 200, trueWidth: 200,
tableProps, tableProps,
@ -139,11 +142,9 @@ export default {
}, },
// / // /
addNew(id) { addNew(id) {
this.$router.push({ this.addOrUpdateVisible = true
name: 'ProcessStorageLink', this.$nextTick(() => {
query: { this.$refs.addOrUpdate.init(id)
dictTypeId: id
}
}) })
}, },
goback() { goback() {

View File

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

View File

@ -1,45 +0,0 @@
<!--
* @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