merge and update dashboard detail

This commit is contained in:
2022-03-16 20:11:30 +08:00
37 changed files with 678 additions and 666 deletions

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2020-12-29 16:37:56
* @LastEditors: zwq
* @LastEditTime: 2022-03-14 10:55:22
* @LastEditTime: 2022-03-16 09:49:10
* @Description:
-->
<template>
@@ -15,7 +15,7 @@
ref="dataForm"
:model="dataForm"
size="medium"
label-width="110px"
label-width="170px"
label-position="left"
>
<el-col :span="12">

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2020-12-29 16:37:56
* @LastEditors: zwq
* @LastEditTime: 2022-01-14 15:55:39
* @LastEditTime: 2022-03-16 09:50:12
* @Description:
-->
<template>
@@ -15,7 +15,7 @@
ref="dataForm"
:model="dataForm"
size="medium"
label-width="110px"
label-width="160px"
label-position="left"
>
<el-col :span="8">

View File

@@ -2,20 +2,21 @@
* @Author: zwq
* @Date: 2020-12-29 16:37:56
* @LastEditors: zwq
* @LastEditTime: 2022-01-13 16:22:39
* @LastEditTime: 2022-03-16 09:50:58
* @Description:
-->
<template>
<el-dialog
:title="'btn.see' | i18nFilter"
:visible.sync="visible"
width="60%"
>
<el-row :gutter="10">
<el-form
ref="dataForm"
:model="dataForm"
size="medium"
label-width="110px"
label-width="170px"
label-position="left"
>
<el-col :span="8">

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2020-12-29 15:41:11
* @LastEditors: zwq
* @LastEditTime: 2022-03-15 14:15:30
* @LastEditTime: 2022-03-16 09:52:07
* @Description:
-->
<template>
@@ -65,11 +65,6 @@ const tableProps = [
prop: 'name',
label: i18n.t('module.basicData.cache.LocationName'),
align: 'center'
},
{
prop: 'shelfName',
label: i18n.t('module.basicData.cache.locationType'),
align: 'center'
}
]

View File

@@ -1,8 +1,8 @@
<!--
* @Author: gtz
* @Date: 2022-03-12 14:17:55
* @LastEditors: gtz
* @LastEditTime: 2022-03-12 14:23:43
* @LastEditors: zwq
* @LastEditTime: 2022-03-16 14:18:33
* @Description: file content
* @FilePath: \mt-ck-wms-ui\src\views\basicData\Warehouse\components\PublishTask.vue
-->
@@ -21,13 +21,13 @@
label-position="left"
>
<el-form-item :label="$t('module.basicData.Warehouse.startPosition')" prop="startPosition">
<el-input v-model="dataForm.startPosition" readonly :style="{width: '100%'}" />
<el-input v-model="dataForm.startPosition" :style="{width: '100%'}" />
</el-form-item>
<el-form-item :label="$t('module.basicData.Warehouse.endPosition')" prop="endPosition">
<el-input v-model="dataForm.endPosition" readonly :style="{width: '100%'}" />
<el-input v-model="dataForm.endPosition" :style="{width: '100%'}" />
</el-form-item>
<el-form-item :label="$t('module.basicData.Warehouse.taskType')" prop="taskType">
<el-input v-model="dataForm.taskType" readonly :style="{width: '100%'}" />
<el-input v-model="dataForm.taskType" :style="{width: '100%'}" />
</el-form-item>
</el-form>
</el-row>

View File

@@ -1,8 +1,8 @@
<!--
* @Author: zwq
* @Date: 2020-12-29 16:37:56
* @LastEditors: fzq
* @LastEditTime: 2022-03-10 18:44:36
* @LastEditors: zwq
* @LastEditTime: 2022-03-16 09:47:25
* @Description:
-->
<template>
@@ -10,7 +10,7 @@
:title="!dataForm.id ? 'btn.add' : 'btn.edit' | i18nFilter"
:visible.sync="visible"
>
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="120px" @keyup.enter.native="dataFormSubmit()">
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmit()">
<el-form-item :label="$t('module.basicData.Warehouse.LocationName')" prop="currLocationId">
<el-select
v-model="dataForm.currLocationId"

View File

@@ -1,17 +1,17 @@
<!--
* @Author: gtz
* @Date: 2022-03-03 09:16:10
* @LastEditors: zwq
* @LastEditTime: 2022-03-15 14:27:57
* @LastEditors: gtz
* @LastEditTime: 2022-03-16 19:25:19
* @Description: file content
* @FilePath: \mt-ck-wms-ui\src\views\dashboard\index.vue
* @FilePath: \mt-ck-wms-ui\src\views\basicData\Warehouse\components\processStorageLink.vue
-->
<template>
<div class="dashboard-container">
<el-card class="dashboard-main">
<el-row class="dashboard-title">
<div class="dashboard-header-line" />
<div class="dashboard-header-title">WMS库存信息</div>
<div class="dashboard-header-title">{{ $t('module.dashboard.title') }}</div>
</el-row>
<el-row class="dashboard-legend">
<div
@@ -45,20 +45,13 @@
<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-option v-for="item in totalPage" :key="'select' + item" :label="$t('module.dashboard.pageHeader') + item + $t('module.dashboard.pageFooter')" :value="item" />
</el-select>
</div>
</el-row>
<el-row
v-if="current * 80 < shelfList[0].rowList[0].portList.length"
v-if="current * 80 < shelfVoList[0].rowVoList[0].portVoList.length"
class="dashboard-layout"
:gutter="12"
>
@@ -70,14 +63,14 @@
>
<el-row>
<el-col
v-for="(i, index) in shelfList"
v-for="(i, index) in shelfVoList"
:key="item + 'shelf' + i.id"
:span="12"
class="dashboard-layout-shelf"
>
<el-row>
<el-col
v-for="z in i.rowList"
v-for="z in i.rowVoList"
:key="item + 'shelf' + i + 'row' + z.id"
:span="12"
class="dashboard-layout-row"
@@ -89,43 +82,41 @@
:style="{
background:
portAttributeObj[
z.portList[
z.portVoList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute
],
cursor:
z.portList[
z.portVoList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute === 3
? 'not-allowed'
: 'pointer',
color:
z.portList[
z.portVoList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute === 3
? '#A2A8B5'
: '',
border:
selectStorageList.some(StorageItem=>StorageItem.locationId===z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].id)
selectStorageList.some(StorageItem=>StorageItem.locationId===z.portVoList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].id)
? '1px solid red' : ''
}"
@click="
setType(
z.portList[
z.portVoList[
(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: z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].cassetteList[0] ? cassetteStatusObj[z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].cassetteList[0].status] : ''}" />
{{ z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].attribute !== 3 ? z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].name : 'XXXX' }}
<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] : ''}" />
{{ z.portVoList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].attribute !== 3 ? z.portVoList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].name : 'XXXX' }}
</div>
</el-col>
</el-row>
<div class="dashboard-layout-footer">
{{
"第" + bottomIndex[index] + "排(" + ((current - 1) * 4 + item) + ")"
}}
{{ $t(bottomIndex[index]) + '(' + ((current - 1) * 4 + item) + ')' }}
</div>
</el-col>
</el-row>
@@ -134,7 +125,7 @@
<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
(shelfVoList[0].rowVoList[0].portVoList.length - (current - 1) * 80) / 20
)"
:key="'shelfbox' + item"
class="dashboard-layout-shelf-box"
@@ -142,7 +133,7 @@
>
<el-row>
<el-col
v-for="(i, index) in shelfList"
v-for="(i, index) in shelfVoList"
:key="item + 'shelf' + i.id"
:span="12"
class="dashboard-layout-shelf"
@@ -151,14 +142,14 @@
v-if="
item <
Math.ceil(
(shelfList[0].rowList[0].portList.length -
(shelfVoList[0].rowVoList[0].portVoList.length -
(current - 1) * 80) /
20
)
"
>
<el-col
v-for="z in i.rowList"
v-for="z in i.rowVoList"
:key="item + 'shelf' + i + 'row' + z.id"
:span="12"
class="dashboard-layout-row"
@@ -170,48 +161,48 @@
:style="{
background:
portAttributeObj[
z.portList[
z.portVoList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute
],
cursor:
z.portList[
z.portVoList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute === 3
? 'not-allowed'
: 'pointer',
color:
z.portList[
z.portVoList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute === 3
? '#A2A8B5'
: '',
border:
selectStorageList.some(StorageItem=>StorageItem.locationId===z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].id)
selectStorageList.some(StorageItem=>StorageItem.locationId===z.portVoList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].id)
? '1px solid red' : ''
}"
@click="
setType(
z.portList[
z.portVoList[
(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: z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].cassetteList[0] ? cassetteStatusObj[z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].cassetteList[0].status] : ''}" />
{{ z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].attribute !== 3 ? z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].name : 'XXXX' }}
<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] : ''}" />
{{ z.portVoList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].attribute !== 3 ? z.portVoList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].name : 'XXXX' }}
</div>
</el-col>
</el-row>
<el-row v-else>
<el-col
v-for="z in i.rowList"
v-for="z in i.rowVoList"
:key="item + 'shelf' + i + 'row' + z.id"
:span="12"
class="dashboard-layout-row"
>
<div
v-for="x in shelfList[0].rowList[0].portList.length -
v-for="x in shelfVoList[0].rowVoList[0].portVoList.length -
(item - 1) * 20 -
(current - 1) * 80"
:key="item + 'shelf' + i + 'row' + z + 'item' + x"
@@ -219,43 +210,41 @@
:style="{
background:
portAttributeObj[
z.portList[
z.portVoList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute
],
cursor:
z.portList[
z.portVoList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute === 3
? 'not-allowed'
: 'pointer',
color:
z.portList[
z.portVoList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].attribute === 3
? '#A2A8B5'
: '',
border:
selectStorageList.some(StorageItem=>StorageItem.locationId===z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].id)
selectStorageList.some(StorageItem=>StorageItem.locationId===z.portVoList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].id)
? '1px solid red' : ''
}"
@click="
setType(
z.portList[
z.portVoList[
(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: z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].cassetteList[0] ? cassetteStatusObj[z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].cassetteList[0].status] : ''}" />
{{ z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].attribute !== 3 ? z.portList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].name : 'XXXX' }}
<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] : ''}" />
{{ z.portVoList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].attribute !== 3 ? z.portVoList[(current - 1) * 80 + (item - 1) * 20 + (x - 1)].name : 'XXXX' }}
</div>
</el-col>
</el-row>
<div class="dashboard-layout-footer">
{{
"第" + bottomIndex[index] + "排(" + ((current - 1) * 4 + item) + ")"
}}
{{ $t(bottomIndex[index]) + '(' + ((current - 1) * 4 + item) + ')' }}
</div>
</el-col>
</el-row>
@@ -271,6 +260,7 @@
</template>
<script>
import { getPortList } from '@/api/dashboard'
import { batchListAdd } from '@/api/basicData/Warehouse/StorageBoxInfo'
import testdata from './testdata'
import processStorageType from './processStorageType'
@@ -283,13 +273,15 @@ export default {
},
created() {
this.id = this.$route.query.id
this.totalPage = Math.ceil(
this.shelfList[0].rowList[0].portList.length / 80
)
this.totalPage = Math.ceil(this.shelfVoList[0].rowVoList[0].portVoList.length / 80)
this.init()
},
methods: {
init() {
getPortList().then(res => {
this.shelfVoList = res.data[0].shelfVoList
this.totalPage = Math.ceil(this.shelfVoList[0].rowVoList[0].portVoList.length / 80)
})
this.selectStorageList.splice(0, this.selectStorageList.length)
},
setType(item) {
@@ -312,29 +304,37 @@ export default {
console.log(v)
},
submitLinkList() {
const tipArr = this.selectStorageList.map(item => {
return item.locationName
})
const obj = {
workSequenId: this.id,
processLocationStorageList: this.selectStorageList
}
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.selectStorageList.splice(0, this.selectStorageList.length)
}
})
if (this.selectStorageList.length) {
const tipArr = this.selectStorageList.map(item => {
return item.locationName
})
}).catch(() => {})
const obj = {
workSequenId: this.id,
processLocationStorageList: this.selectStorageList
}
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()
}
})
})
}).catch(() => {})
} else {
this.$message({
message: this.$t('module.basicData.visual.PleaseAddLocationFirst'),
type: 'warning',
duration: 1500
})
}
},
goback() {
this.selectStorageList.splice(0, this.selectStorageList.length)

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2020-12-29 16:37:56
* @LastEditors: zwq
* @LastEditTime: 2022-03-15 11:02:46
* @LastEditTime: 2022-03-16 09:47:01
* @Description:
-->
<template>
@@ -15,7 +15,6 @@
:model="dataForm"
size="medium"
:rules="dataRule"
label-width="110px"
label-position="left"
>
<el-form-item :label="$t('module.basicData.Warehouse.SelectStorageType')" prop="portAttrId">

File diff suppressed because it is too large Load Diff