修试入库外层接口对接

This commit is contained in:
zzyuan 2024-12-13 13:12:37 +08:00
parent 3dd85bd679
commit 7fcc9e3100
1 changed files with 66 additions and 39 deletions

View File

@ -50,7 +50,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
plain plain
@ -59,6 +59,24 @@
@click="handleExport" @click="handleExport"
>导出 >导出
</el-button> </el-button>
</el-col> -->
<el-col :span="1.5">
<el-button
type="success"
plain
size="mini" :disabled="multiple"
@click="handleSuccessAll"
>批量入库
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain :disabled="multiple"
size="mini"
@click="handleFailAll"
>批量驳回
</el-button>
</el-col> </el-col>
<right-toolbar <right-toolbar
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
@ -66,12 +84,8 @@
></right-toolbar> ></right-toolbar>
</el-row> </el-row>
<el-table <el-table v-loading="loading" :data="testedList" ref="multipleTable" row-key="taskId" @selection-change="handleSelectionChange">
v-loading="loading" <el-table-column type="selection" width="55" align="center" :selectable="selectable"/>
:data="testedList"
ref="multipleTable"
row-key="teamId"
>
<el-table-column label="序号" align="center" width="80" type="index"> <el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
@ -128,7 +142,7 @@
<script> <script>
import { import {
getTestedListApi getTestedListApi,repairInputWarehouseApi,rejectWarehouseApi
} from "@/api/repair/testedInBound"; } from "@/api/repair/testedInBound";
export default { export default {
name: "testedInBound", name: "testedInBound",
@ -146,7 +160,6 @@ export default {
showSearch: true, showSearch: true,
// //
showView: false, showView: false,
// //
total: 0, total: 0,
// //
@ -165,7 +178,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}, },
ids:[],
// //
testedList:[], testedList:[],
// //
@ -176,23 +189,7 @@ export default {
this.getList(); this.getList();
}, },
components: {}, components: {},
methods: { methods: {
//
selectable(row) {
if (row.taskStatus == "1" && this.title=="审核") {
return false;
} else {
return true;
}
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
/** 查询修试入库列表 */ /** 查询修试入库列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -202,7 +199,6 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
@ -223,23 +219,54 @@ export default {
handleView(row){ handleView(row){
this.$emit("queryApply",row.id,row); this.$emit("queryApply",row.id,row);
}, },
//
selectable(row) {
// if (row.taskStatus == "1") {
InBoundSuccess(row){ return false;
} else {
}, return true;
// }
InBoundFail(row){
}, },
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.taskId);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
// //
handleSuccessAll(){ handleSuccessAll(){
console.log(this.ids)
// repairInputWarehouseApi
let param = {
taskIdList:this.ids
}
this.$modal.confirm("是否确认入库所选择的设备编码?")
.then(function () {
return repairInputWarehouseApi(param);
}).then((response) => {
if(response.code==200){
this.$modal.msgSuccess("入库成功");
this.getList();
}
})
.catch(() => {});
}, },
// //
handleFailAll(){ handleFailAll(){
console.log(this.ids)
let param = {
taskIdList:this.ids
}
this.$modal.confirm("是否确认驳回所选择的设备编码?")
.then(function () {
return rejectWarehouseApi(param);
}).then((response) => {
if(response.code==200){
this.$modal.msgSuccess("驳回成功");
this.getList();
}
})
.catch(() => {});
}, },
handleExport() { handleExport() {
// this.download( // this.download(