|
@ -58,10 +58,7 @@ |
|
|
<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="itemNumber" required class="disabled"> |
|
@ -70,7 +67,7 @@ |
|
|
</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 class="right-button" @click="chickRightButton"> |
|
|
扫描 |
|
|
扫描 |
|
|
</view> |
|
|
</view> |
|
@ -126,6 +123,7 @@ |
|
|
isShow: false, |
|
|
isShow: false, |
|
|
locationList:[],//备件的库位列表 |
|
|
locationList:[],//备件的库位列表 |
|
|
locationItem:'',//备件账内库 |
|
|
locationItem:'',//备件账内库 |
|
|
|
|
|
isFocus:false |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
@ -165,10 +163,9 @@ |
|
|
// 重置 |
|
|
// 重置 |
|
|
reset() { |
|
|
reset() { |
|
|
if (this.form.id) { |
|
|
if (this.form.id) { |
|
|
this.form.classes = ''; |
|
|
this.form.reverterId = ''; |
|
|
this.form.faultType = '' |
|
|
this.form.itemNumbers = [] |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
|
|
|
this.form = {} |
|
|
this.form = {} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -191,10 +188,10 @@ |
|
|
// 单列模式点击确定之后 |
|
|
// 单列模式点击确定之后 |
|
|
chooseSingleColumn(e) { |
|
|
chooseSingleColumn(e) { |
|
|
this.form[this.field] = e[0].value |
|
|
this.form[this.field] = e[0].value |
|
|
if(this.field == 'reverterId'){ |
|
|
if(this.field == 'reverterId'){ |
|
|
this.choosesingleColumnItem = this.singleColumnList.filter(item => item.id == e[0].value) |
|
|
this.choosesingleColumnItem = this.singleColumnList.filter(item => item.id == e[0].value) |
|
|
this.form.reverterName = this.choosesingleColumnItem[0].name |
|
|
this.form.reverterName = this.choosesingleColumnItem[0].name |
|
|
} |
|
|
} |
|
|
this.getApplyDeviceList() |
|
|
this.getApplyDeviceList() |
|
|
this.singleColumnShow = false |
|
|
this.singleColumnShow = false |
|
|
this.$forceUpdate() |
|
|
this.$forceUpdate() |
|
@ -219,6 +216,7 @@ if(this.field == 'reverterId'){ |
|
|
} |
|
|
} |
|
|
this.isPopupShow = true |
|
|
this.isPopupShow = true |
|
|
this.isShow= false |
|
|
this.isShow= false |
|
|
|
|
|
this.isFocus = true |
|
|
}, |
|
|
}, |
|
|
// 添加备件 |
|
|
// 添加备件 |
|
|
addSpare() { |
|
|
addSpare() { |
|
@ -290,6 +288,10 @@ if(this.field == 'reverterId'){ |
|
|
this.getLocation() |
|
|
this.getLocation() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 扫描设备条码 |
|
|
|
|
|
handelScanMsg() { |
|
|
|
|
|
this.getLocation() |
|
|
|
|
|
}, |
|
|
// 获取备件信息 |
|
|
// 获取备件信息 |
|
|
getSparePartsInfo() { |
|
|
getSparePartsInfo() { |
|
|
sparePartsApi.getSparePartsReturnInfo({ |
|
|
sparePartsApi.getSparePartsReturnInfo({ |
|
@ -332,6 +334,11 @@ if(this.field == 'reverterId'){ |
|
|
this.getSparePartsInfo() |
|
|
this.getSparePartsInfo() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 扫描设备条码 |
|
|
|
|
|
handelScanMsg1() { |
|
|
|
|
|
console.log(this.form1.itemNumber) |
|
|
|
|
|
this.getSparePartsInfo() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
async onLoad(option) { |
|
|
async onLoad(option) { |
|
|