Commit 6f25fd94 authored by dragondean@qq.com's avatar dragondean@qq.com

修复箱明细用途回显异常

parent 9f3fb039
...@@ -40,13 +40,16 @@ ...@@ -40,13 +40,16 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('用途')"> <el-form-item :label="$t('用途')">
<dict-selector <el-checkbox-group v-model="usageIds">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value" :disabled="readonly">{{ $l(item, 'label') }}</el-checkbox>
</el-checkbox-group>
<!-- <dict-selector
v-model="usageIds" v-model="usageIds"
:type="DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE" :type="DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE"
multiple multiple
form-type="checkbox" form-type="checkbox"
:disabled="readonly" :disabled="readonly"
></dict-selector> ></dict-selector>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -101,7 +104,7 @@ ...@@ -101,7 +104,7 @@
import ProductSelector from "@/components/ProductSelector/index.vue" import ProductSelector from "@/components/ProductSelector/index.vue"
import { getProductBrank, getProductBrankPage } from '@/api/ecw/productBrank' import { getProductBrank, getProductBrankPage } from '@/api/ecw/productBrank'
import {getProductAttrList} from "@/api/ecw/productAttr" import {getProductAttrList} from "@/api/ecw/productAttr"
import { DICT_TYPE } from '@/utils/dict' import {DICT_TYPE, getDictDatas} from '@/utils/dict'
export default { export default {
name: "WarehouseRecordDetailItem", name: "WarehouseRecordDetailItem",
...@@ -141,10 +144,10 @@ export default { ...@@ -141,10 +144,10 @@ export default {
boxGauge3: '', boxGauge3: '',
} }
}, },
mounted() { async mounted() {
// 品牌回显 // 品牌回显
if (this.value.brand) { if (this.value.brand) {
getProductBrank(this.value.brand).then(r => { await getProductBrank(this.value.brand).then(r => {
this.brandList = [r.data] this.brandList = [r.data]
}) })
} }
...@@ -155,6 +158,7 @@ export default { ...@@ -155,6 +158,7 @@ export default {
if (this.value.usageIds) { if (this.value.usageIds) {
console.log('this.value.usageIds',this.value.usageIds) console.log('this.value.usageIds',this.value.usageIds)
await this.$nextTick()
this.usageIds = this.value.usageIds.split(',') || [] this.usageIds = this.value.usageIds.split(',') || []
} }
...@@ -168,6 +172,7 @@ export default { ...@@ -168,6 +172,7 @@ export default {
} }
}, },
methods: { methods: {
getDictDatas,
/** 获取产品属性列表 */ /** 获取产品属性列表 */
getAttrList() { getAttrList() {
getProductAttrList().then(response => { getProductAttrList().then(response => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment