出库模块国际化

This commit is contained in:
liuhanqing
2025-07-29 11:50:06 +08:00
parent ebd4bff71c
commit 25f6861077
4 changed files with 29 additions and 359 deletions

View File

@@ -30,14 +30,6 @@
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="客户编码" prop="customerNo">-->
<!-- <el-input-->
<!-- v-model="queryParams.customerNo"-->
<!-- placeholder="请输入客户编码"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item :label="$t('outStockoutManage.customerName')" prop="customerName">
<el-input
v-model="queryParams.inputCustomerName"
@@ -251,7 +243,7 @@ export default {
// 审核表单验证规则
auditRules: {
exitId: [
{ required: true, message: '请选择出口', trigger: 'change' }
{ required: true, message: this.$t('outStockoutManage.pleaseSelectExit'), trigger: 'change' }
]
},
// 出口选项
@@ -361,13 +353,13 @@ export default {
/** 单据状态修改按钮操作 */
handleAudit(status) {
if (this.selectedRows.length === 0) {
this.$modal.msgError("请选择至少一条数据")
this.$modal.msgError(this.$t('outStockoutManage.pleaseSelectData'))
return
}
for(var i=0;i<this.selectedRows.length;i++){
if (this.selectedRows[i].status != "1" && status == "2") {
this.$modal.msgError(this.selectedRows[i].stockoutId+"单据已审核,请勿重复审核")
this.$modal.msgError(this.selectedRows[i].stockoutId+this.$t('outStockoutManage.alreadyAudited'))
return
}
@@ -376,7 +368,7 @@ export default {
// return
// }
if (this.selectedRows[i].status != "1" && status == "5"){
this.$modal.msgError(this.selectedRows[i].stockoutId+"单据已审核,无法作废")
this.$modal.msgError(this.selectedRows[i].stockoutId+this.$t('outStockoutManage.alreadyCancelFail'))
return;
}
}
@@ -408,18 +400,17 @@ export default {
/** 自动分配按钮操作 */
handleAutoAllot() {
if (this.selectedRows.length === 0) {
this.$modal.msgError("请选择一条数据")
this.$modal.msgError(this.$t('outStockoutManage.pleaseSelectData'))
return
}
if (this.selectedRows.length > 1) {
this.$modal.msgError("请选择一条数据")
this.$modal.msgError(this.$t('outStockoutManage.onlyOneCanAutoAllocation'))
return
}
const stockoutIds = this.selectedRows.map(row => row.stockoutId)
console.log("自动分配:", stockoutIds)
let outstock = this.selectedRows[0]
if (outstock.status !== "2") {
this.$modal.msgError("请选择审核状态为审核通过单据")
this.$modal.msgError(this.$t('outStockoutManage.auditStockOut'))
return
}
let data = {
@@ -437,17 +428,15 @@ export default {
/** 手动分配按钮操作 */
handleManualAllot() {
if (this.selectedRows.length === 0) {
this.$modal.msgError("请选择至少一条数据")
this.$modal.msgError(this.$t('outStockoutManage.pleaseSelectData'))
return
}
const stockoutIds = this.selectedRows.map(row => row.stockoutId)
let outstock = this.selectedRows[0]
if (outstock.status !== "1") {
this.$modal.msgError("单据已审核")
this.$modal.msgError(this.$t('outStockoutManage.alreadyAuditStockOut'))
return
}
// TODO: 调用手动分配接口
console.log("手动分配:", stockoutIds)
},
/** 提交审核 */
@@ -460,7 +449,7 @@ export default {
newStatus: this.currentAuditStatus,
exitId: this.auditForm.exitId
}
console.log("单据状态修改(含出口信息):", params)
// console.log("单据状态修改(含出口信息):", params)
//调用单据状态改变接口
updateOutStockStatus(params).then(response => {
@@ -489,12 +478,12 @@ export default {
.filter(id => id !== null && id !== undefined && id !== '')
)]
console.log("仓库ID集合:", warehouseIds)
//console.log("仓库ID集合:", warehouseIds)
// 如果没有有效的仓库ID,清空出口选项
if (warehouseIds.length === 0) {
this.exitOptions = []
console.warn('没有找到有效的仓库ID,已清空出口选项')
//console.warn('没有找到有效的仓库ID,已清空出口选项')
return
}
@@ -505,7 +494,7 @@ export default {
// 如果没有对应key的默认为空数组,并给出提示
if (!this.allExitOptions[warehouseId]) {
console.warn(`仓库ID ${warehouseId} 没有配置出口选项,已设置为空数组`)
//console.warn(`仓库ID ${warehouseId} 没有配置出口选项,已设置为空数组`)
}
}