解决bug:点新增行的时候数量要自动默认为0,防止弹出覆盖
This commit is contained in:
@@ -2781,11 +2781,11 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
/** 自动选中特殊的key **/
|
/** 自动选中特殊的key **/
|
||||||
autoSelectBySpecialKey(specialKey) {
|
autoSelectBySpecialKey(specialKey, orderNum) {
|
||||||
let trs = this.getElement('tbody').getElementsByClassName('tr')
|
let trs = this.getElement('tbody').getElementsByClassName('tr')
|
||||||
let trEls = []
|
let trEls = []
|
||||||
for (let tr of trs) {
|
if(trs && trs.length && orderNum>=1) {
|
||||||
trEls.push(tr)
|
trEls.push(trs[orderNum-1])
|
||||||
}
|
}
|
||||||
trEls.forEach(tr => {
|
trEls.forEach(tr => {
|
||||||
let { idx } = tr.dataset
|
let { idx } = tr.dataset
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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>
|
<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-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"/>
|
<j-select-batch-modal v-if="kind === 'batch'" ref="selectModal" :rows="rows" :multi="multi" :bar-code="value" @ok="selectOK" @initComp="initComp"/>
|
||||||
|
|||||||
@@ -319,6 +319,7 @@ export const BillModalMixin = {
|
|||||||
},
|
},
|
||||||
onAdded(event) {
|
onAdded(event) {
|
||||||
const { row, target } = event
|
const { row, target } = event
|
||||||
|
target.setValues([{rowKey: row.id, values: {operNumber:0}}])
|
||||||
getAction('/depot/findDepotByCurrentUser').then((res) => {
|
getAction('/depot/findDepotByCurrentUser').then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
let arr = res.data
|
let arr = res.data
|
||||||
@@ -394,7 +395,7 @@ export const BillModalMixin = {
|
|||||||
target.setValues(mArr);
|
target.setValues(mArr);
|
||||||
target.recalcAllStatisticsColumns()
|
target.recalcAllStatisticsColumns()
|
||||||
that.autoChangePrice(target)
|
that.autoChangePrice(target)
|
||||||
target.autoSelectBySpecialKey('operNumber')
|
target.autoSelectBySpecialKey('operNumber', row.orderNum)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,7 @@
|
|||||||
:actionButton="rowCanEdit"
|
:actionButton="rowCanEdit"
|
||||||
:dragSort="rowCanEdit"
|
:dragSort="rowCanEdit"
|
||||||
@valueChange="onValueChange"
|
@valueChange="onValueChange"
|
||||||
|
@added="onAdded"
|
||||||
@deleted="onDeleted">
|
@deleted="onDeleted">
|
||||||
<template #buttonAfter>
|
<template #buttonAfter>
|
||||||
<a-row v-if="rowCanEdit" :gutter="24" style="float:left;padding-bottom: 5px;" data-step="4" data-title="扫码录入" data-intro="此功能支持扫码枪扫描商品条码进行录入">
|
<a-row v-if="rowCanEdit" :gutter="24" style="float:left;padding-bottom: 5px;" data-step="4" data-title="扫码录入" data-intro="此功能支持扫码枪扫描商品条码进行录入">
|
||||||
|
|||||||
@@ -69,6 +69,7 @@
|
|||||||
:actionButton="true"
|
:actionButton="true"
|
||||||
:dragSort="true"
|
:dragSort="true"
|
||||||
@valueChange="onValueChange"
|
@valueChange="onValueChange"
|
||||||
|
@added="onAdded"
|
||||||
@deleted="onDeleted">
|
@deleted="onDeleted">
|
||||||
<template #buttonAfter>
|
<template #buttonAfter>
|
||||||
<a-row :gutter="24" style="float:left;" data-step="4" data-title="扫码录入" data-intro="此功能支持扫码枪扫描商品条码进行录入">
|
<a-row :gutter="24" style="float:left;" data-step="4" data-title="扫码录入" data-intro="此功能支持扫码枪扫描商品条码进行录入">
|
||||||
|
|||||||
Reference in New Issue
Block a user