解决bug:点新增行的时候数量要自动默认为0,防止弹出覆盖

This commit is contained in:
季圣华
2022-05-31 21:18:27 +08:00
parent 585a313182
commit 13655f62df
5 changed files with 8 additions and 5 deletions

View File

@@ -2781,11 +2781,11 @@
})
},
/** 自动选中特殊的key **/
autoSelectBySpecialKey(specialKey) {
autoSelectBySpecialKey(specialKey, orderNum) {
let trs = this.getElement('tbody').getElementsByClassName('tr')
let trEls = []
for (let tr of trs) {
trEls.push(tr)
if(trs && trs.length && orderNum>=1) {
trEls.push(trs[orderNum-1])
}
trEls.forEach(tr => {
let { idx } = tr.dataset

View File

@@ -1,6 +1,6 @@
<template>
<div>
<a-input-search v-if="kind === 'material'" v-model="names" placeholder="请选择" @pressEnter="onPressEnter" @search="onSearch"></a-input-search>
<a-input-search v-if="kind === 'material'" v-model="names" placeholder="条码或名称" @pressEnter="onPressEnter" @search="onSearch"></a-input-search>
<a-input-search v-if="kind === 'batch'||kind === 'sn'" v-model="names" placeholder="请选择" readOnly @search="onSearch"></a-input-search>
<j-select-material-modal v-if="kind === 'material'" ref="selectModal" :rows="rows" :multi="multi" :bar-code="value" @ok="selectOK" @initComp="initComp"/>
<j-select-batch-modal v-if="kind === 'batch'" ref="selectModal" :rows="rows" :multi="multi" :bar-code="value" @ok="selectOK" @initComp="initComp"/>