(no commit message provided)
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
This commit is contained in:
@ -41,7 +41,12 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" style="text-align:right">
|
<el-col :span="12" style="text-align:right">
|
||||||
<el-button type="primary" plain @click="addChildrenToSelection">添加子件到出库选单</el-button>
|
<el-tooltip
|
||||||
|
content="将 BOM 子件对应的库存物料添加到出库选单,用于后续拣货出库"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
|
<el-button type="primary" plain @click="addChildrenToSelection">添加子件到出库选单</el-button>
|
||||||
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
@ -426,6 +431,12 @@ const onBomParentChange = async (val: number) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加 BOM 子件到出库选单
|
||||||
|
* 作用:根据当前选定的 BOM 父件,获取其子件列表,然后根据子件的 child_id 在库存中查找匹配的库存项,
|
||||||
|
* 并将它们添加到出库选单(selectedItems)中,添加的数量受子件所需个数(dosage)的限制。
|
||||||
|
* 每个子件会尝试添加 dosage 个库存项(每个库存项代表一个实物单位),若库存项不足则按实际数量添加。
|
||||||
|
*/
|
||||||
const addChildrenToSelection = () => {
|
const addChildrenToSelection = () => {
|
||||||
if (bomChildren.value.length === 0) {
|
if (bomChildren.value.length === 0) {
|
||||||
ElMessage.warning('当前没有可添加的子件')
|
ElMessage.warning('当前没有可添加的子件')
|
||||||
|
|||||||
Reference in New Issue
Block a user