库存页面 入库页面手动完成和手动作废

This commit is contained in:
liuhanqing
2025-05-24 11:36:18 +08:00
parent 9559511e56
commit 673d836794
20 changed files with 1839 additions and 62 deletions

View File

@@ -208,17 +208,27 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-edit"
size="mini"
@click="handleCompletedManually({type: 'invalid'})"
v-hasPermi="['job:mydoJob:CompletedManually']"
>手动作废</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
@click="handleCompletedManually"
@click="handleCompletedManually({type: 'completed'})"
v-hasPermi="['job:mydoJob:CompletedManually']"
>手动完成</el-button>
</el-col>
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
@@ -227,13 +237,14 @@
@click="handleExport"
v-hasPermi="['job:mydoJob:export']"
>导出</el-button>
</el-col>
</el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="mydoJobList" @selection-change="handleSelectionChange" @row-click="handleRowClick" highlight-current-row :current-row="currentRow">
<el-table v-loading="loading" :data="mydoJobList" @selection-change="handleSelectionChange" @row-click="handleRowClick" highlight-current-row :current-row="currentRow"
max-height="300">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="任务ID" align="center" prop="jobId" />
<el-table-column label="任务ID" align="center" prop="jobId" fixed />
<el-table-column label="任务状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.mydo_job_status" :value="scope.row.status"/>
@@ -292,7 +303,9 @@
@pagination="getList"
/>
<el-table v-loading="detailLoading" :data="mydoJobDetailList" @selection-change="handleSelectionChange">
<el-table v-loading="detailLoading" :data="mydoJobDetailList" @selection-change="handleSelectionChange"
max-height="300"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="子任务ID" align="center" prop="jobDetailId" />
<el-table-column label="任务ID" align="center" prop="jobId" />
@@ -482,14 +495,39 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm")
this.handleQuery()
this.resetForm("queryForm");
// 清空子表数据
this.mydoJobDetailList = [];
this.detailTotal = 0;
this.currentRow = null;
this.queryDetailParams.jobId = null;
// 重新查询主表数据
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.jobId)
this.single = selection.length!==1
this.multiple = !selection.length
// 只处理主表的多选
if (selection.length > 0 && selection[0].hasOwnProperty('jobDetailId')) {
return;
}
this.ids = selection.map(item => item.jobId);
this.single = selection.length!==1;
this.multiple = !selection.length;
},
// 手动完成/作废
handleCompletedManually(row) {
const jobIds = this.ids;
if (jobIds.length === 0) {
this.$modal.msgError("请选择要操作的数据");
return;
}
if (row.type === 'invalid'){
//手动作废
}else if (row.type === 'completed'){
//手动完成
}
},
/** 导出按钮操作 */
handleExport() {
@@ -522,10 +560,6 @@ export default {
this.detailLoading = false;
});
},
//手动完成
handleCompletedManually(row){
const stockinDetailIds = row.stockinDetailId || this.detailIds
}
}
}
</script>

View File

@@ -173,7 +173,7 @@
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
@@ -183,7 +183,7 @@
v-hasPermi="['receive:stockin:export']"
>导出
</el-button>
</el-col>
</el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>

View File

@@ -186,7 +186,7 @@
>单据确认
</el-button>
</el-col>
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
@@ -196,7 +196,7 @@
v-hasPermi="['in:stockIn:export']"
>单据导出
</el-button>
</el-col>
</el-col>-->
<el-col :span="1.5">
<el-button
type="info"