盘点流程测试

This commit is contained in:
liuhanqing
2025-06-23 17:33:59 +08:00
parent b7beba8b0f
commit 3add052259
8 changed files with 42 additions and 24 deletions

View File

@@ -143,7 +143,7 @@
<el-table v-loading="loading" :data="differenceList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('checkDifference.checkGuid')" align="center" prop="checkGuid" /> <!-- 盘点id -->
<!-- <el-table-column :label="$t('checkDifference.checkGuid')" align="center" prop="checkGuid" /> &lt;!&ndash; 盘点id &ndash;&gt;-->
<el-table-column :label="$t('checkDifference.checkStockDetailId')" align="center" prop="checkStockDetailId" /> <!-- 盘点单据id -->
<el-table-column :label="$t('checkDifference.stockId')" align="center" prop="stockId" /> <!-- 库存id -->
<el-table-column :label="$t('checkDifference.trayCode')" align="center" prop="trayCode" /> <!-- 托盘 -->
@@ -155,8 +155,9 @@
<el-table-column :label="$t('checkDifference.oldQuantity')" align="center" prop="oldQuantity" /> <!-- 原值 -->
<el-table-column :label="$t('checkDifference.newQuantity')" align="center" prop="newQuantity" /> <!-- 新值 -->
<el-table-column :label="$t('checkDifference.recordType')" align="center" prop="recordType" /> <!-- 操作方式 -->
<el-table-column :label="$t('checkDifference.productGuid')" align="center" prop="productGuid" /> <!-- 物料guid -->
<el-table-column :label="$t('checkDifference.operation')" align="center" class-name="small-padding fixed-width"> <!-- 操作 -->
<el-table-column :label="$t('checkDifference.createTime')" align="center" prop="createTime" /> <!-- 创建时间 -->
<!-- <el-table-column :label="$t('checkDifference.productGuid')" align="center" prop="productGuid" /> &lt;!&ndash; 物料guid &ndash;&gt;-->
<!-- <el-table-column :label="$t('checkDifference.operation')" align="center" class-name="small-padding fixed-width"> &lt;!&ndash; 操作 &ndash;&gt;
<template slot-scope="scope">
<el-button
size="mini"
@@ -164,16 +165,16 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['check:difference:edit']"
>{{$t('checkDifference.edit')}}</el-button> <!-- 修改 -->
>{{$t('checkDifference.edit')}}</el-button> &lt;!&ndash; 修改 &ndash;&gt;
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['check:difference:remove']"
>{{$t('checkDifference.delete')}}</el-button> <!-- 删除 -->
>{{$t('checkDifference.delete')}}</el-button> &lt;!&ndash; 删除 &ndash;&gt;
</template>
</el-table-column>
</el-table-column>-->
</el-table>
<pagination

View File

@@ -215,8 +215,8 @@
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleManualVoid"
v-hasPermi="['job:checkMydoJob:manualInvalidation']"
@click="handleCompletedManually({type: 'invalid'})"
v-hasPermi="['job:mydoJob:manualInvalidation']"
>{{$t('checkJobIn.manualVoid')}}</el-button> <!--手动作废-->
</el-col>
<el-col :span="1.5">
@@ -226,8 +226,8 @@
icon="el-icon-edit"
size="mini"
:disabled="multiple"
@click="handleManualFinish"
v-hasPermi="['job:checkMydoJob:manualCompleted']"
@click="handleCompletedManually({type: 'completed'})"
v-hasPermi="['job:mydoJob:manualCompleted']"
>{{$t('checkJobIn.manualFinish')}}</el-button> <!--手动完成-->
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -336,7 +336,15 @@
</template>
<script>
import { listMydoJob, getMydoJob, delMydoJob, addMydoJob, updateMydoJob } from "@/api/job/inmydoJob"
import {
listMydoJob,
getMydoJob,
delMydoJob,
addMydoJob,
updateMydoJob,
manualInvalidation,
manualCompleted
} from "@/api/job/inmydoJob"
import { listMydoJobDetail } from "@/api/job/mydoJobDetail"
export default {
@@ -506,15 +514,29 @@ export default {
// 手动完成/作废
handleCompletedManually(row) {
console.log("1111")
const jobIds = this.ids;
if (jobIds.length === 0) {
this.$modal.msgError(this.$t('checkJobIn.selectData'));
this.$modal.msgError("请选择要操作的数据");
return;
}
if (jobIds.length > 1) {
this.$modal.msgError("请选择一条任务");
return;
}
var data = {
"jobId": jobIds[0],
}
if (row.type === 'invalid'){
//手动作废
manualInvalidation(data).then(response => {
this.$modal.msgSuccess("操作成功");
})
}else if (row.type === 'completed'){
//手动完成
manualCompleted(data).then(response => {
this.$modal.msgSuccess("操作成功");
})
}
},
/** 导出按钮操作 */