|
|
|
@ -26,10 +26,10 @@
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
|
|
|
|
v-hasPermi="['wms:outorder:add']">新增</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- <el-col :span="1.5">-->
|
|
|
|
|
<!-- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"-->
|
|
|
|
|
<!-- v-hasPermi="['wms:outorder:add']">新增</el-button>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="danger"
|
|
|
|
@ -953,7 +953,7 @@ export default {
|
|
|
|
|
async submitForm() {
|
|
|
|
|
const payload = this.addoutorderList.map(item => ({
|
|
|
|
|
id: item.id,
|
|
|
|
|
qty: item.qty,
|
|
|
|
|
qty: item.qty,//操作数量
|
|
|
|
|
selectedBatch: item.selectedBatch,
|
|
|
|
|
produceCode: item.produceCode,
|
|
|
|
|
materialDesc: item.materialDesc,
|
|
|
|
@ -965,6 +965,14 @@ export default {
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
console.log("payload:", payload); // 使用逗号分隔符来打印对象
|
|
|
|
|
// 输入校验:检查所有项目的数量是否大于零
|
|
|
|
|
const invalidItems = payload.filter(item => item.qty <= 0);
|
|
|
|
|
if (invalidItems.length > 0) {
|
|
|
|
|
// 提示用户哪些物料的数量无效
|
|
|
|
|
// const invalidMaterialDescs = invalidItems.map(item => item.materialDesc).join(', ');
|
|
|
|
|
this.$message.error(`数量必须大于零`);
|
|
|
|
|
return; // 终止操作
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
await this.$confirm('确认提交退货单吗?', '确认', {
|
|
|
|
|