|
|
@@ -16,6 +16,7 @@
|
|
|
clearable
|
|
|
placeholder="请选择绑定物资柜"
|
|
|
class="!w-348px"
|
|
|
+ @clear="handleClearCabinet"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="dict in cabinets"
|
|
|
@@ -88,12 +89,12 @@
|
|
|
<!-- <h3>{{ property.propertyName }}</h3>-->
|
|
|
<div class="property-values">
|
|
|
<div
|
|
|
- v-for="value in PropertyValueList.filter((v) => v.propertyId === property.id)"
|
|
|
+ v-for="value in PropertyValueList.filter((v) => v.propertyId == property.id)"
|
|
|
:key="value.id"
|
|
|
:class="[
|
|
|
'property-value',
|
|
|
{
|
|
|
- selected: selectedValues[property.id] === value.id
|
|
|
+ selected: selectedValues[property.id] == value.id
|
|
|
}
|
|
|
]"
|
|
|
@click="selectValue(property.id, value.id)"
|
|
|
@@ -269,13 +270,17 @@ onMounted(async () => {
|
|
|
const data = await MaterialTypeApi.listType(params)
|
|
|
materialtypeOptions.value = handleTree(data.list, 'id', 'parentId')
|
|
|
const cabinet = await MaterialCabinetApi.listMaterialsCabinet(params)
|
|
|
- cabinets.value = cabinet.list.map((cabinet) => {
|
|
|
- return {
|
|
|
- value: cabinet.id,
|
|
|
- label: cabinet.cabinetName
|
|
|
- }
|
|
|
- })
|
|
|
+ cabinets.value = cabinet.list.map((cabinet) => ({
|
|
|
+ value: cabinet.id,
|
|
|
+ label: cabinet.cabinetName
|
|
|
+ })).concat({ value: 0, label: '空' })
|
|
|
})
|
|
|
+
|
|
|
+// 清空时执行
|
|
|
+const handleClearCabinet = () => {
|
|
|
+ formData.value.materialsCabinetId = 0
|
|
|
+}
|
|
|
+
|
|
|
// 监听物资类型变化
|
|
|
watch(
|
|
|
() => formData.value.materialsTypeId,
|