Merge pull request '修改bug' (#74) from zwq into develop
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: #74
This commit is contained in:
朱文强 2022-03-18 09:50:40 +08:00
commit 114bfeccf3
2 changed files with 33 additions and 24 deletions

View File

@ -2,7 +2,7 @@
* @Author: gtz
* @Date: 2022-03-03 09:16:10
* @LastEditors: zwq
* @LastEditTime: 2022-03-17 10:56:14
* @LastEditTime: 2022-03-18 09:25:04
* @Description: file content
* @FilePath: \mt-ck-wms-ui\src\views\basicData\Warehouse\components\processStorageLink.vue
-->
@ -151,17 +151,15 @@
}"
/>
<div
:class="
v-if="
StorageList.some(
StorageItem =>
StorageItem.id ===
z.portVoList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].id
)
? 'dashboard-layout-item-horn'
: ''
"
)"
class="dashboard-layout-item-horn"
/>
{{
z.portVoList[
@ -282,17 +280,15 @@
}"
/>
<div
:class="
v-if="
StorageList.some(
StorageItem =>
StorageItem.id ===
z.portVoList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].id
)
? 'dashboard-layout-item-horn'
: ''
"
)"
class="dashboard-layout-item-horn"
/>
{{
z.portVoList[
@ -376,17 +372,15 @@
}"
/>
<div
:class="
v-if="
StorageList.some(
StorageItem =>
StorageItem.id ===
z.portVoList[
(current - 1) * 80 + (item - 1) * 20 + (x - 1)
].id
)
? 'dashboard-layout-item-horn'
: ''
"
)"
class="dashboard-layout-item-horn"
/>
{{
z.portVoList[
@ -457,7 +451,7 @@ export default {
if (response.data.records) {
this.StorageList = response.data.records
} else {
this.StorageList.splice(0, this.list.length)
this.StorageList.splice(0, this.StorageList.length)
}
})
this.selectStorageList.splice(0, this.selectStorageList.length)
@ -476,9 +470,13 @@ export default {
1
)
} else {
const isExist = this.StorageList.some(
StorageItem =>
StorageItem.id === item.id
)
this.typeVisible = true
this.$nextTick(() => {
this.$refs.typeRef.init(item.id, item.name)
this.$refs.typeRef.init(item.id, item.name, item.attribute, isExist)
})
}
}

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2020-12-29 16:37:56
* @LastEditors: zwq
* @LastEditTime: 2022-03-16 09:47:01
* @LastEditTime: 2022-03-18 09:39:09
* @Description:
-->
<template>
@ -18,9 +18,9 @@
label-position="left"
>
<el-form-item :label="$t('module.basicData.Warehouse.SelectStorageType')" prop="portAttrId">
<el-radio v-model="dataForm.portAttrId" :label="1">Working Port</el-radio>
<el-radio v-model="dataForm.portAttrId" :label="2">Buffer Port</el-radio>
<el-radio v-model="dataForm.portAttrId" :label="3">Exception Port</el-radio>
<el-radio v-model="dataForm.portAttrId" label="1">Working Port</el-radio>
<el-radio v-model="dataForm.portAttrId" label="2">Buffer Port</el-radio>
<el-radio v-model="dataForm.portAttrId" label="3">Exception Port</el-radio>
</el-form-item>
<el-form-item :label="$t('module.basicData.storageBox.name')" prop="storageId">
<el-select v-model="dataForm.storageId" filterable :placeholder="$i18nForm(['placeholder.input', $t('module.basicData.storageBox.name')])" clearable>
@ -41,6 +41,7 @@
</template>
<script>
import { getPortDetail } from '@/api/dashboard'
import { storageBoxList } from '@/api/basicData/Cache/storageBox'
export default {
@ -50,7 +51,7 @@ export default {
locationId: '',
locationName: '',
dataForm: {
portAttrId: 1,
portAttrId: '1',
storageId: ''
},
dataRule: {
@ -65,7 +66,7 @@ export default {
}
},
methods: {
init(id, name) {
init(id, name, attribute, isExist) {
this.locationId = id
this.locationName = name
const listQuery = {
@ -81,6 +82,16 @@ export default {
})
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (attribute) {
this.dataForm.portAttrId = attribute
} else {
this.dataForm.portAttrId = '1'
}
if (isExist) {
getPortDetail(id).then(res => {
if (res.code === 0) { this.dataForm.storageId = res.data.storageBoxId }
})
}
})
this.visible = true
},