|
@@ -33,6 +33,8 @@
|
|
|
:min="0.01"
|
|
|
:max="999999"
|
|
|
placeholder="请输入省级价"
|
|
|
+ ref="afterProvincePrice"
|
|
|
+ @keydown.enter.native="nextFocus('afterProvincePrice', 'afterCityPrice', $event)"
|
|
|
style="width: 100%;" />
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="市级价" prop="afterCityPrice">
|
|
@@ -43,6 +45,8 @@
|
|
|
:min="0.01"
|
|
|
:max="999999"
|
|
|
placeholder="请输入市级价"
|
|
|
+ ref="afterCityPrice"
|
|
|
+ @keydown.enter.native="nextFocus('afterCityPrice', 'afterSpecialPrice', $event)"
|
|
|
style="width: 100%;" />
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="特约价" prop="afterSpecialPrice">
|
|
@@ -53,6 +57,8 @@
|
|
|
:min="0.01"
|
|
|
:max="999999"
|
|
|
placeholder="请输入特约价"
|
|
|
+ ref="afterSpecialPrice"
|
|
|
+ @keydown.enter.native="nextFocus('afterSpecialPrice', 'afterTerminalPrice', $event)"
|
|
|
style="width: 100%;" />
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="终端价" prop="afterTerminalPrice">
|
|
@@ -63,6 +69,8 @@
|
|
|
:min="0.01"
|
|
|
:max="999999"
|
|
|
placeholder="请输入终端价"
|
|
|
+ ref="afterTerminalPrice"
|
|
|
+ @keydown.enter.native="nextFocus('afterTerminalPrice', 'afterCarOwnersPrice', $event)"
|
|
|
style="width: 100%;" />
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="车主价" prop="afterCarOwnersPrice">
|
|
@@ -73,6 +81,8 @@
|
|
|
:min="0.01"
|
|
|
:max="999999"
|
|
|
placeholder="请输入车主价"
|
|
|
+ ref="afterCarOwnersPrice"
|
|
|
+ @keydown.enter.native="nextFocus('afterCarOwnersPrice', 'changeReason', $event, 'vSelect')"
|
|
|
style="width: 100%;" />
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="变更原因" prop="changeReason">
|
|
@@ -82,6 +92,8 @@
|
|
|
v-model="form.changeReason"
|
|
|
allowClear
|
|
|
placeholder="请选择变更原因"
|
|
|
+ ref="changeReason"
|
|
|
+ @keydown.enter.native="nextFocus('changeReason', '', $event)"
|
|
|
></v-select>
|
|
|
</a-form-model-item>
|
|
|
</a-form-model>
|
|
@@ -185,6 +197,22 @@ export default {
|
|
|
return false
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ // 回车键快捷定位表单下一项
|
|
|
+ nextFocus (nowRef, nextRef, event, isComponent) {
|
|
|
+ const _this = this
|
|
|
+ if (_this.$refs[nowRef]) {
|
|
|
+ _this.$nextTick(() => {
|
|
|
+ if (_this.$refs[nextRef]) {
|
|
|
+ event.target.blur()
|
|
|
+ if (isComponent == 'vSelect') {
|
|
|
+ _this.$refs[nextRef].$children[0].focus()
|
|
|
+ } else {
|
|
|
+ _this.$refs[nextRef].focus()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -198,6 +226,14 @@ export default {
|
|
|
this.$emit('close')
|
|
|
this.costPrice = ''
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
+ }else{
|
|
|
+ // 默认首项获取焦点
|
|
|
+ const _this = this
|
|
|
+ setTimeout(()=>{
|
|
|
+ if(_this.$refs['afterProvincePrice']){
|
|
|
+ _this.$refs['afterProvincePrice'].focus()
|
|
|
+ }
|
|
|
+ }, 300)
|
|
|
}
|
|
|
},
|
|
|
itemSn (newValue, oldValue) {
|