|
|
@ -99,7 +99,7 @@ |
|
|
|
<view class="popup"> |
|
|
|
<u-form :model="form1" ref="form1Ref" label-width="160rpx"> |
|
|
|
<u-form-item :label="`备件`" prop="number" required> |
|
|
|
<view class="select" @click="openSingleColumn('number',form1.number,sparePartsList,'form1')"> |
|
|
|
<view class="select" @click="openSingleColumnItem('number',form1.number,sparePartsList,'form1')"> |
|
|
|
<view class="input" v-if='form1.number'> |
|
|
|
{{form1.name}} |
|
|
|
</view> |
|
|
@ -371,9 +371,23 @@ const form = ref({ |
|
|
|
} else { |
|
|
|
singleColumnDefaultValue.value = [] |
|
|
|
} |
|
|
|
//singleColumnShow.value = true |
|
|
|
singleColumnShow.value = true |
|
|
|
} |
|
|
|
|
|
|
|
// 单列模式 |
|
|
|
function openSingleColumnItem(fieldName, val, list, from) { |
|
|
|
if (fieldName == 'deviceNumber' && form.value.id) return; |
|
|
|
whichForm.value = from |
|
|
|
singleColumnList.value = list |
|
|
|
field.value = fieldName |
|
|
|
if (val) { |
|
|
|
singleColumnDefaultValue.value = [list.findIndex(item => item.value == val)] |
|
|
|
} else { |
|
|
|
singleColumnDefaultValue.value = [] |
|
|
|
} |
|
|
|
isShowSelectItem.value = true; |
|
|
|
} |
|
|
|
|
|
|
|
// 单列模式点击确定之后 |
|
|
|
function chooseSingleColumn(e) { |
|
|
|
if(whichForm.value == 'form'){ |
|
|
|