feat(inventory): 更新出库单状态处理逻辑

- 修改退回到按钮调用新的状态变更方法
- 新增 handleStatusChange 方法处理出库单状态变更
- 引入 changeOuterStatus API 方法支持状态更新
- 添加确认对话框提升用户操作安全性
- 优化侧边栏样式,增强菜单标题可读性
dev_1.0.0
chenhao 2025-12-04 16:31:17 +08:00
parent 7afab80e0c
commit 86de8e2b0a
3 changed files with 22 additions and 2 deletions

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1764836070482" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4880" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M480 480m-160 0a2.5 2.5 0 1 0 320 0 2.5 2.5 0 1 0-320 0Z" p-id="4881"></path></svg>

After

Width:  |  Height:  |  Size: 416 B

View File

@ -97,3 +97,9 @@ export default {
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-submenu__title {
font-size: 17px;
font-weight: bold;
}
</style>

View File

@ -82,14 +82,14 @@
<delivery-detail :delivery-id="deliveryId" :visible.sync="viewOpen" />
<div slot="footer" class="dialog-footer">
<el-button v-if="showReturn" type="danger" @click="handleCancel">退 </el-button>
<el-button v-if="showReturn" type="danger" @click="handleStatusChange(this.form, '4')">退 </el-button>
<el-button @click="handleCancel"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getOuter, queryInfo } from '@/api/inventory/outer';
import {changeOuterStatus, getOuter, queryInfo} from '@/api/inventory/outer';
import { removeDelivery, updateDeliveryStatus } from '@/api/inventory/delivery';
import GenerateDeliveryForm from './GenerateDeliveryForm.vue';
import DeliveryDetail from '@/views/inventory/delivery/Detail.vue';
@ -181,6 +181,19 @@ export default {
handleViewDelivery(deliveryId) {
this.deliveryId = deliveryId;
this.viewOpen = true;
},
handleStatusChange(row, status) {
const actionText = status === '3' ? '确认接收' : '退回';
this.$confirm(`确认要"${actionText}"该出库单吗?`, '系统提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
return changeOuterStatus(row.id, status, row.orderCode);
}).then(() => {
this.$message.success(`${actionText}成功`);
this.getList();
}).catch(() => {});
}
}
};