去掉采购单处的选择按钮、补正第一次进入采购时不显示问题

This commit is contained in:
xiaofajia 2024-11-21 11:10:35 +08:00
parent bdd4df2890
commit 30a896274a

View File

@ -39,7 +39,7 @@
<uni-card v-for="(item, index) in value" :key="index">
<template>
<view class="card-header">
<radio :checked="item.isSelected" @click="chooseItem(item)"/>
<radio v-if="isInput" :checked="item.isSelected" @click="chooseItem(item)"/>
<text class="card-title">{{ item.wares.name }}</text>
</view>
</template>
@ -192,10 +192,17 @@ export default {
this.getSoiId()
},
getUnitName(id) {
if (this.unitList && this.unitList.length > 0) {
console.log("我第一次就拿到了")
const index = this.unitList.findIndex(item => item.value === id)
if (index !== -1) {
return this.unitList[index].label
}else {
return "请选择"
}
}
console.log("我是重新去拿的")
this.listUnit()
return "请选择"
},
bindUnitChange(e, row) {