修试入库外层接口对接

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>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
@ -59,6 +59,24 @@
@click="handleExport"
>导出
</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>
<right-toolbar
:showSearch.sync="showSearch"
@ -66,12 +84,8 @@
></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="testedList"
ref="multipleTable"
row-key="teamId"
>
<el-table v-loading="loading" :data="testedList" ref="multipleTable" row-key="taskId" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :selectable="selectable"/>
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{
@ -128,7 +142,7 @@
<script>
import {
getTestedListApi
getTestedListApi,repairInputWarehouseApi,rejectWarehouseApi
} from "@/api/repair/testedInBound";
export default {
name: "testedInBound",
@ -146,7 +160,6 @@ export default {
showSearch: true,
//
showView: false,
//
total: 0,
//
@ -165,7 +178,7 @@ export default {
pageNum: 1,
pageSize: 10,
},
ids:[],
//
testedList:[],
//
@ -176,23 +189,7 @@ export default {
this.getList();
},
components: {},
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;
},
methods: {
/** 查询修试入库列表 */
getList() {
this.loading = true;
@ -202,7 +199,6 @@ export default {
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
@ -223,23 +219,54 @@ export default {
handleView(row){
this.$emit("queryApply",row.id,row);
},
//
InBoundSuccess(row){
},
//
InBoundFail(row){
//
selectable(row) {
if (row.taskStatus == "1") {
return false;
} else {
return true;
}
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.taskId);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
//
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(){
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() {
// this.download(