|
@ -99,7 +99,7 @@ |
|
|
<view class="popup"> |
|
|
<view class="popup"> |
|
|
<u-form :model="form1" ref="form1Ref" label-width="160rpx"> |
|
|
<u-form :model="form1" ref="form1Ref" label-width="160rpx"> |
|
|
<u-form-item :label="`备件`" prop="number" required> |
|
|
<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'> |
|
|
<view class="input" v-if='form1.number'> |
|
|
{{form1.name}} |
|
|
{{form1.name}} |
|
|
</view> |
|
|
</view> |
|
@ -371,9 +371,23 @@ const form = ref({ |
|
|
} else { |
|
|
} else { |
|
|
singleColumnDefaultValue.value = [] |
|
|
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; |
|
|
isShowSelectItem.value = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 单列模式点击确定之后 |
|
|
// 单列模式点击确定之后 |
|
|
function chooseSingleColumn(e) { |
|
|
function chooseSingleColumn(e) { |
|
|
if(whichForm.value == 'form'){ |
|
|
if(whichForm.value == 'form'){ |
|
|