修试入库和报废管理接口对接

This commit is contained in:
zzyuan 2024-12-13 15:15:56 +08:00
parent 51a095555d
commit 602eec34a6
6 changed files with 126 additions and 127 deletions

View File

@ -8,8 +8,14 @@ export function getScrapApplyListApi(query) {
params: query
})
}
// 查询报废审核列表
export function getScrapDetailListApi(query) {
return request({
url: '/material/scrap_apply_details/selectRepairQuestListByTaskId',
method: 'get',
params: query
})
}

View File

@ -7,9 +7,9 @@
:inline="true"
label-width="120px"
>
<el-form-item label="退料单位" prop="unitName">
<el-form-item label="退料单位" prop="backUnit">
<el-input
v-model="maForm.unitName"
v-model="maForm.backUnit"
placeholder="请输入退料单位"
clearable
maxlength="50"
@ -18,9 +18,9 @@
disabled
/>
</el-form-item>
<el-form-item label="退料单位" prop="projectName">
<el-form-item label="退料单位" prop="backPro">
<el-input
v-model="maForm.projectName"
v-model="maForm.backPro"
placeholder="请输入退料单位"
clearable
maxlength="50"
@ -29,9 +29,9 @@
disabled
/>
</el-form-item>
<el-form-item label="维修单号" prop="repairNum">
<el-form-item label="报废单号" prop="scrapCode">
<el-input
v-model="maForm.repairNum"
v-model="maForm.scrapCode"
clearable
maxlength="50"
style="width: 240px"
@ -105,23 +105,11 @@
>
</el-table-column>
<el-table-column
label="已修数量"
label="报废数量"
align="center"
prop="repairedNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="待修数量"
align="center"
prop="waitNum"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<div>
{{ scope.row.repairNum - scope.row.repairedNum }}
</div>
</template>
</el-table-column>
<el-table-column
label="管理模式"
align="center"
@ -175,18 +163,19 @@
</template>
</el-table-column>
</el-table>
<pagination
<!-- <pagination
v-show="total > 0"
:total="total"
:page.sync="maForm.pageNum"
:limit.sync="maForm.pageSize"
@pagination="getTaskInfo"
/>
/> -->
</div>
</template>
<script>
import { getAuditInfo, auditPass } from "@/api/repair/testExamine";
// import { getAuditInfo, } from "@/api/repair/testExamine";
import { getScrapDetailListApi } from "@/api/repair/scrapManage";
import { getToken } from "@/utils/auth";
export default {
name: "AddTools",
@ -244,12 +233,10 @@ export default {
//
open: false,
rowData: {},
maForm: {
pageNum: 1,
pageSize: 10,
unitName: undefined,
projectName: undefined,
repairNum: undefined,
maForm: {
backUnit: undefined,
backPro: undefined,
scrapCode: undefined,
},
};
},
@ -257,9 +244,55 @@ export default {
mounted() {
this.taskId = this.queryTaskId;
this.paramTemp = this.param;
this.maForm = this.paramTemp;
this.getTaskInfo();
},
methods: {
methods: {
//-
getTaskInfo() {
this.loading = true;
getScrapDetailListApi({ taskId: this.taskId }).then((response) => {
this.maForm = this.paramTemp;
this.equipmentList = response.data;
// this.total = response.total;
this.loading = false;
});
},
//
handlePass(row) {
const param = [];
param.push({ id: row.id, status: "1",specificationType: row.specificationType,machineTypeName:row.machineTypeName,
unitName:row.unitName,repairNum:row.repairNum,repairedNum:row.repairedNum,typeId:row.typeId,taskId:row.taskId,
auditId:row.id,repairId:row.repairId,maId:row.maId, });
this.$modal
.confirm("是否确认通过所选择的数据项?")
.then(function () {
// return auditPass(param);
})
.then(() => {
this.getTaskInfo();
this.$modal.msgSuccess("通过成功");
})
.catch(() => {});
},
//
handleFail(row) {
const param = [];
param.push({ id: row.id, status: "2",specificationType: row.specificationType,machineTypeName:row.machineTypeName,
unitName:row.unitName,repairNum:row.repairNum,repairedNum:row.repairedNum,typeId:row.typeId,taskId:row.taskId,
auditId:row.id,repairId:row.repairId,maId:row.maId,
});
this.$modal
.confirm("是否确认驳回所选择的数据项?")
.then(function () {
// return auditPass(param);
})
.then(() => {
this.getTaskInfo();
this.$modal.msgSuccess("驳回成功");
})
.catch(() => {});
},
//
selectable(row) {
if (row.status == "0") {
@ -286,51 +319,6 @@ export default {
this.single = selection.length != 1;
this.multiple = !selection.length;
},
//-
getTaskInfo() {
this.loading = true;
getAuditInfo({ taskId: this.taskId }).then((response) => {
this.maForm = this.paramTemp;
this.equipmentList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
handlePass(row) {
const param = [];
param.push({ id: row.id, status: "1",specificationType: row.specificationType,machineTypeName:row.machineTypeName,
unitName:row.unitName,repairNum:row.repairNum,repairedNum:row.repairedNum,typeId:row.typeId,taskId:row.taskId,
auditId:row.id,repairId:row.repairId,maId:row.maId, });
this.$modal
.confirm("是否确认通过所选择的数据项?")
.then(function () {
return auditPass(param);
})
.then(() => {
this.getTaskInfo();
this.$modal.msgSuccess("通过成功");
})
.catch(() => {});
},
//
handleFail(row) {
const param = [];
param.push({ id: row.id, status: "2",specificationType: row.specificationType,machineTypeName:row.machineTypeName,
unitName:row.unitName,repairNum:row.repairNum,repairedNum:row.repairedNum,typeId:row.typeId,taskId:row.taskId,
auditId:row.id,repairId:row.repairId,maId:row.maId,
});
this.$modal
.confirm("是否确认驳回所选择的数据项?")
.then(function () {
return auditPass(param);
})
.then(() => {
this.getTaskInfo();
this.$modal.msgSuccess("驳回成功");
})
.catch(() => {});
},
//
handlePassAll() {
if (this.ids.length == 0) {
@ -340,12 +328,12 @@ export default {
});
return;
} else {
auditPass(this.passTemp).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("通过成功");
}
this.getTaskInfo();
});
// auditPass(this.passTemp).then((response) => {
// if (response.code == 200) {
// this.$modal.msgSuccess("");
// }
// this.getTaskInfo();
// });
}
},
//
@ -357,12 +345,12 @@ export default {
});
return;
} else {
auditPass(this.failTemp).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("驳回成功");
}
this.getTaskInfo();
});
// auditPass(this.failTemp).then((response) => {
// if (response.code == 200) {
// this.$modal.msgSuccess("");
// }
// this.getTaskInfo();
// });
}
},
},

View File

@ -32,23 +32,22 @@
/>
</el-form-item>
<!-- <el-form-item label="状态" prop="taskStatus">
<el-form-item label="状态" prop="status">
<el-select
v-model="queryParams.taskStatus"
v-model="queryParams.status"
placeholder="请选择状态"
clearable
filterable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.repair_task_status"
v-if="dict.value == 10 || dict.value == 11 || dict.value == 12"
v-for="dict in statusList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item> -->
</el-form-item>
<el-form-item>
<el-button
@ -120,38 +119,38 @@
align="center"
width="160"
label="退料单位"
prop="unitName"
prop="backUnit"
:show-overflow-tooltip="true"
/>
<el-table-column
label="退料工程"
width="150"
align="center"
prop="projectName"
prop="backPro"
:show-overflow-tooltip="true"
/>
<el-table-column
label="报废单号"
align="center"
prop="scrapCode"
:show-overflow-tooltip="true"
/>
<el-table-column
label="物资类型"
align="center"
prop="type"
:show-overflow-tooltip="true"
/>
<el-table-column
label="维修单号"
align="center"
prop="repairNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="物资类型"
align="center"
prop="itemType"
:show-overflow-tooltip="true"
/>
<el-table-column
label="维修班组"
align="center"
prop="teamName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="提交人"
align="center"
prop="createBy"
prop="createName"
:show-overflow-tooltip="true"
/>
<el-table-column
@ -223,10 +222,7 @@
</div>
</template>
<script>
import {
getListTestExamineApply,
} from "@/api/repair/testExamine";
<script>
import {
getScrapApplyListApi,
} from "@/api/repair/scrapManage";
@ -254,13 +250,14 @@ export default {
tableList: [],
//
dateRange: [],
statusList: [{value:"0",label:"进行中"},{value:"1",label:"已审核"},{value:"2",label:"驳回"},],
//
queryParams: {
pageNum: 1,
pageSize: 10,
time: null, //
name: undefined,
time: null,
keyWord: "",
status: undefined,
},
passTemp: [],
failTemp: [],
@ -297,6 +294,7 @@ export default {
this.loading = true;
const params = {
keyWord: this.queryParams.keyWord,
status: this.queryParams.status,
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
pageSize: this.queryParams.pageSize,

View File

@ -16,8 +16,7 @@
:param="param"
:isView="isView"
:codingTaskId="codingTaskId"
@addTools="addTools"
@editTools="editTools"
@addTools="addTools"
@queryTools="queryTools"
/>
</div>
@ -50,8 +49,7 @@ export default {
};
},
methods: {
/* 编辑工机具 */
methods: {
addTools(taskId, id,row) {
this.isEdit = true;
this.pageContent = "报废审核";
@ -59,8 +57,7 @@ export default {
this.queryId = id;
this.param = row;
this.isShowComponent = "AddTools";
},
/* 查询工机具 */
},
queryTools(taskId, id, row) {
this.isView = true;
this.pageContent = "详情信息";

View File

@ -64,7 +64,7 @@
<template slot-scope="scope">
<el-button size="mini" style="margin-bottom: 10px" type="success" v-if="scope.row.status == '0'" @click="handlePass(scope.row)">入库</el-button>
<el-button size="mini" type="danger" v-if="scope.row.status == '0'" @click="handleFail(scope.row)">驳回</el-button>
<el-button size="mini" v-if="scope.row.status == '1'&&scope.row.manageType==0" @click="handleViewCode(scope.row)">查看</el-button>
<el-button size="mini" v-if="(scope.row.status == '1'||scope.row.status == '2')&&scope.row.manageType==0" @click="handleViewCode(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
@ -131,8 +131,8 @@
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="codeWarehouse(scope.row)" v-if="!isReject&&scope.row.maStatus!='1'">入库</el-button>
<el-button size="mini" type="danger" @click="rejectCodeWarehouse(scope.row)" v-if="scope.row.maStatus!='1'">驳回</el-button>
<el-button type="primary" size="mini" @click="codeWarehouse(scope.row)" v-if="!isReject&&scope.row.maStatus=='5'">入库</el-button>
<el-button size="mini" type="danger" @click="rejectCodeWarehouse(scope.row)" v-if="scope.row.maStatus=='5'">驳回</el-button>
</template>
</el-table-column>
</el-table>
@ -310,10 +310,11 @@ export default {
}else{
//
let param = {
agreementId:this.rowData.agreementId,
taskId:this.rowData.taskId,
typeId:this.rowData.typeId,
pendingInputNum:this.rowData.pendingInputNum,
inputNum:this.numInput2
rejectNum:this.numInput2
}
rejectWarehouseApi(param).then((response) => {
if(response.code==200){
@ -368,6 +369,7 @@ export default {
if(response.code==200){
this.$modal.msgSuccess("入库成功");
this.queryCodeList();
this.getTaskInfo();
}
})
.catch(() => {});
@ -377,6 +379,7 @@ export default {
console.log(this.rowData)
console.log(codeRow)
let param = {
agreementId:this.rowData.agreementId,
taskId:this.rowData.taskId,
typeId:this.rowData.typeId,
maCodeList:[{maId:codeRow.maId}]
@ -388,6 +391,7 @@ export default {
if(response.code==200){
this.$modal.msgSuccess("驳回成功");
this.queryCodeList();
this.getTaskInfo();
}
})
.catch(() => {});

View File

@ -221,7 +221,7 @@ export default {
},
//
selectable(row) {
if (row.taskStatus == "1") {
if (row.taskStatus == "1"||row.taskStatus == "2") {
return false;
} else {
return true;
@ -229,7 +229,13 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.taskId);
this.ids = selection.map((item) => {
let obj = {
agreementId:item.agreementId,
taskId:item.taskId
}
return obj
});
this.single = selection.length != 1;
this.multiple = !selection.length;
},
@ -255,7 +261,7 @@ export default {
handleFailAll(){
console.log(this.ids)
let param = {
taskIdList:this.ids
outTaskList:this.ids
}
this.$modal.confirm("是否确认驳回所选择的设备编码?")
.then(function () {