盘点入库修正
This commit is contained in:
parent
d4a414ded2
commit
423fd360e6
|
|
@ -713,13 +713,13 @@
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
prop="num"
|
prop="num"
|
||||||
label="当前库存"
|
label="当前库存"
|
||||||
align="center"
|
align="center"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="num"
|
prop="num"
|
||||||
label="入库数量"
|
label="入库数量"
|
||||||
|
|
@ -733,7 +733,6 @@
|
||||||
@blur="handlePutBlur(row)"
|
@blur="handlePutBlur(row)"
|
||||||
clearable
|
clearable
|
||||||
:controls="false"
|
:controls="false"
|
||||||
:min="1"
|
|
||||||
style="width: 10vw"
|
style="width: 10vw"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -1416,10 +1415,26 @@ export default {
|
||||||
},
|
},
|
||||||
// 入库数量输入框失去焦点
|
// 入库数量输入框失去焦点
|
||||||
handlePutBlur(row) {
|
handlePutBlur(row) {
|
||||||
|
console.log('🚀 ~ handlePutBlur ~ rowxxxxxxxxxxxxxxxxx:', row)
|
||||||
if (!row.putInStoreNum) {
|
if (!row.putInStoreNum) {
|
||||||
this.$message.warning('入库数量不能为空')
|
this.$message.warning('入库数量不能为空')
|
||||||
row.putInStoreNum = 1
|
row.putInStoreNum = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据计量单位类型决定是否允许小数
|
||||||
|
if (row.unitValue == 1) {
|
||||||
|
console.log("yyyyyyyyyyyyyy")
|
||||||
|
// 允许小数:移除非数字和小数点的字符
|
||||||
|
row.putInStoreNum = Number(String(row.putInStoreNum).replace(/[^\d.]/g, ''))
|
||||||
|
} else {
|
||||||
|
console.log("zzzzzzzzzzzzzz")
|
||||||
|
// 不允许小数:只保留数字字符
|
||||||
|
row.putInStoreNum = Number(String(row.putInStoreNum).replace(/[^\d]/g, ''))
|
||||||
|
}
|
||||||
|
// 确保数量不小于0
|
||||||
|
if (row.putInStoreNum <= 0) {
|
||||||
|
row.putInStoreNum = 1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 删除行
|
// 删除行
|
||||||
handleDeleteRow(index) {
|
handleDeleteRow(index) {
|
||||||
|
|
@ -1541,6 +1556,7 @@ export default {
|
||||||
template.unitCn = node.data.unitName
|
template.unitCn = node.data.unitName
|
||||||
template.typeCn = node.pathLabels[2]
|
template.typeCn = node.pathLabels[2]
|
||||||
template.guigeCn = node.pathLabels[3]
|
template.guigeCn = node.pathLabels[3]
|
||||||
|
template.unitValue = node.data.unitValue
|
||||||
template.putInStoreNum = 1
|
template.putInStoreNum = 1
|
||||||
|
|
||||||
if (this.taskId) {
|
if (this.taskId) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue