This commit is contained in:
Vinjor 2024-11-21 11:52:08 +08:00
commit 31c124ff1f
2 changed files with 12 additions and 5 deletions

View File

@ -78,7 +78,7 @@
<view class="content"> <view class="content">
<view @click="changeChoose(item)" v-for="item in groupItem.twItemList" :key="item.id" class="repairItem" > <view @click="changeChoose(item)" v-for="item in groupItem.twItemList" :key="item.id" class="repairItem" >
<view class="repairName"> <view class="repairName">
<radio v-if="canOperate" :value="item.id" :checked="item.selected"/> <radio v-if="canOperate && item.waresStatus === ''" :value="item.id" :checked="item.selected"/>
{{ item.waresName }}×{{ item.waresCount }}{{ item.unitText }} {{ item.waresName }}×{{ item.waresCount }}{{ item.unitText }}
</view> </view>
<view class="grid"> <view class="grid">

View File

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