|
|
@ -58,16 +58,16 @@ |
|
|
|
<u-form :model="form1" ref="form1Ref" label-width="160rpx"> |
|
|
|
<u-form-item :label="`备件编号`" prop="itemNumber" required> |
|
|
|
<view class="select"> |
|
|
|
<u-input v-model="form1.itemNumber" placeholder="请选择备件" @blur='blur1()' @confirm="handelScanMsg1" :focus='isFocus'/> |
|
|
|
<u-input v-model="form1.itemNumber" placeholder="请输入备件" @blur='blur1()' @confirm="handelScanMsg1" :focus='isFocus'/> |
|
|
|
</view> |
|
|
|
</u-form-item> |
|
|
|
<u-form-item :label="`备件名称`" prop="itemNumber" required class="disabled"> |
|
|
|
<view class="select"> |
|
|
|
<u-input v-model="form1.itemName" placeholder="请选择备件" disabled /> |
|
|
|
<u-input v-model="form1.itemName" placeholder="根据备件编号获取" disabled /> |
|
|
|
</view> |
|
|
|
</u-form-item> |
|
|
|
<u-form-item label="库位" prop="locationNumber" required v-if="isShow"> |
|
|
|
<u-input v-model="form1.locationNumber" placeholder="请选择库位" @blur="blur()" @confirm="handelScanMsg"/> |
|
|
|
<u-input v-model="form1.locationNumber" placeholder="请输入库位" @blur="blur()" @confirm="handelScanMsg"/> |
|
|
|
<view class="right-button" @click="chickRightButton"> |
|
|
|
扫描 |
|
|
|
</view> |
|
|
@ -130,6 +130,7 @@ const singleColumnShow = ref(false) |
|
|
|
|
|
|
|
const choosesingleColumnItem = ref() |
|
|
|
const itemNumber = ref() |
|
|
|
const msg = ref() |
|
|
|
|
|
|
|
// 触发提交表单 |
|
|
|
function submit() { |
|
|
@ -170,7 +171,8 @@ const singleColumnShow = ref(false) |
|
|
|
form.value.reverterId = ''; |
|
|
|
form.value.itemNumbers = [] |
|
|
|
} else { |
|
|
|
form.value = {} |
|
|
|
form.value.reverterId = ''; |
|
|
|
form.value.itemNumbers = [] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -228,7 +230,7 @@ const singleColumnShow = ref(false) |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!form1.value.itemName) { |
|
|
|
proxy.$modal.showToast('找不到该备件') |
|
|
|
proxy.$modal.showToast(msg.value) |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!form1.value.locationNumber) { |
|
|
@ -240,7 +242,7 @@ const singleColumnShow = ref(false) |
|
|
|
return; |
|
|
|
} |
|
|
|
if (itemNumber.value) { |
|
|
|
proxy.$modal.showToast('该库位已绑定过备件') |
|
|
|
proxy.$modal.showToast(msg.value) |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!form1.value.qty) { |
|
|
@ -265,7 +267,8 @@ const singleColumnShow = ref(false) |
|
|
|
function getLocation() { |
|
|
|
locationApi.getLocation(form1.value.locationNumber).then(res => { |
|
|
|
if(!res.data){ |
|
|
|
proxy.$modal.showToast('找不到该库位') |
|
|
|
proxy.$modal.showToast(res.msg) |
|
|
|
msg.value = res.msg |
|
|
|
return; |
|
|
|
} |
|
|
|
locationItem.value = res.data |
|
|
@ -300,7 +303,8 @@ const singleColumnShow = ref(false) |
|
|
|
number: form1.value.itemNumber, |
|
|
|
}).then(res => { |
|
|
|
if(!res.data){ |
|
|
|
proxy.$modal.showToast('找不到该备件') |
|
|
|
proxy.$modal.showToast(res.msg) |
|
|
|
msg.value = res.msg |
|
|
|
itemNumber.value = '' |
|
|
|
form1.value.areaNumber = '' |
|
|
|
form1.value.locationNumber = ''; |
|
|
@ -323,6 +327,7 @@ const singleColumnShow = ref(false) |
|
|
|
isShow.value =true |
|
|
|
} |
|
|
|
}).catch((err)=>{ |
|
|
|
msg.value = res.msg |
|
|
|
itemNumber.value = '' |
|
|
|
form1.value.areaNumber = '' |
|
|
|
form1.value.itemName = '' |
|
|
|