|
@ -87,22 +87,17 @@ |
|
|
<u-form :model="form1" ref="form1" label-width="160rpx"> |
|
|
<u-form :model="form1" ref="form1" label-width="160rpx"> |
|
|
<u-form-item :label="`备件编号`" prop="itemNumber" required> |
|
|
<u-form-item :label="`备件编号`" prop="itemNumber" required> |
|
|
<view class="select"> |
|
|
<view class="select"> |
|
|
<u-input v-model="form1.itemNumber" placeholder="请选择备件" @blur="blur1()" /> |
|
|
<u-input v-model="form1.itemNumber" placeholder="请选择备件" @blur='blur1()' @confirm="handelScanMsg1" :focus='isFocus'/> |
|
|
<view class="right-button" @click="chickRightButton1"> |
|
|
|
|
|
扫描 |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</u-form-item> |
|
|
</u-form-item> |
|
|
<u-form-item :label="`备件名称`" prop="itemNumber" required class="disabled"> |
|
|
<u-form-item :label="`备件名称`" prop="itemName" required class="disabled"> |
|
|
<view class="select"> |
|
|
<view class="select"> |
|
|
<u-input v-model="form1.itemName" placeholder="请选择备件" disabled /> |
|
|
<u-input v-model="form1.itemName" placeholder="请选择备件" disabled /> |
|
|
</view> |
|
|
</view> |
|
|
</u-form-item> |
|
|
</u-form-item> |
|
|
<u-form-item label="库位" prop="locationNumber" required v-if="isShow"> |
|
|
<u-form-item label="库位" prop="locationNumber" required v-if="isShow"> |
|
|
<u-input v-model="form1.locationNumber" placeholder="请选择库位" @blur='blur()' /> |
|
|
<u-input v-model="form1.locationNumber" placeholder="请选择库位" @blur='blur()' @confirm="handelScanMsg" /> |
|
|
<view class="right-button" @click="chickRightButton"> |
|
|
|
|
|
扫描 |
|
|
|
|
|
</view> |
|
|
|
|
|
</u-form-item> |
|
|
</u-form-item> |
|
|
<u-form-item label="采购数量" prop="applyQty" required class="disabled"> |
|
|
<u-form-item label="采购数量" prop="applyQty" required class="disabled"> |
|
|
<u-input v-model="form1.applyQty" type="number" disabled placeholder="请输入采购数量" /> |
|
|
<u-input v-model="form1.applyQty" type="number" disabled placeholder="请输入采购数量" /> |
|
@ -156,6 +151,7 @@ |
|
|
isShow: false, |
|
|
isShow: false, |
|
|
locationList: [], //备件的库位列表 |
|
|
locationList: [], //备件的库位列表 |
|
|
locationItem: '', //备件账内库 |
|
|
locationItem: '', //备件账内库 |
|
|
|
|
|
isFocus:false |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
@ -195,8 +191,8 @@ |
|
|
// 重置 |
|
|
// 重置 |
|
|
reset() { |
|
|
reset() { |
|
|
if (this.form.id) { |
|
|
if (this.form.id) { |
|
|
this.form.classes = ''; |
|
|
this.form.supplierName = '' |
|
|
this.form.faultType = '' |
|
|
this.form.itemNumbers=[] |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
|
|
|
this.form = {} |
|
|
this.form = {} |
|
@ -221,6 +217,7 @@ |
|
|
} |
|
|
} |
|
|
this.isPopupShow = true |
|
|
this.isPopupShow = true |
|
|
this.isShow = false |
|
|
this.isShow = false |
|
|
|
|
|
this.isFocus = true |
|
|
}, |
|
|
}, |
|
|
// 添加备件 |
|
|
// 添加备件 |
|
|
addSpare() { |
|
|
addSpare() { |
|
@ -301,6 +298,11 @@ |
|
|
if (this.form1.locationNumber) { |
|
|
if (this.form1.locationNumber) { |
|
|
this.getLocation() |
|
|
this.getLocation() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
// 扫描设备条码 |
|
|
|
|
|
handelScanMsg() { |
|
|
|
|
|
this.getLocation() |
|
|
}, |
|
|
}, |
|
|
// 获取备件信息 |
|
|
// 获取备件信息 |
|
|
getSparePartsInfo() { |
|
|
getSparePartsInfo() { |
|
@ -308,6 +310,7 @@ |
|
|
number: this.form1.itemNumber, |
|
|
number: this.form1.itemNumber, |
|
|
id: this.form.id |
|
|
id: this.form.id |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
|
|
|
|
console.log(res) |
|
|
if (!res.data) { |
|
|
if (!res.data) { |
|
|
this.$modal.showToast('找不到该备件') |
|
|
this.$modal.showToast('找不到该备件') |
|
|
this.itemNumber = '' |
|
|
this.itemNumber = '' |
|
@ -333,6 +336,7 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}).catch((err) => { |
|
|
}).catch((err) => { |
|
|
|
|
|
console.log(err) |
|
|
this.itemNumber = '' |
|
|
this.itemNumber = '' |
|
|
this.form1.areaNumber = '' |
|
|
this.form1.areaNumber = '' |
|
|
this.form1.itemName = '' |
|
|
this.form1.itemName = '' |
|
@ -346,6 +350,11 @@ |
|
|
this.getSparePartsInfo() |
|
|
this.getSparePartsInfo() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 扫描设备条码 |
|
|
|
|
|
handelScanMsg1() { |
|
|
|
|
|
console.log(this.form1.itemNumber) |
|
|
|
|
|
this.getSparePartsInfo() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
async onLoad(option) { |
|
|
async onLoad(option) { |
|
|