配件领用接口对接
This commit is contained in:
parent
aa30d2304c
commit
cd46ab166c
|
|
@ -0,0 +1,41 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询配件领料任务列表
|
||||||
|
export function getPartLeaseInfoListApi(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/part_lease/selectPartLeaseInfoList',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 任务id查询配件领料明细
|
||||||
|
export function getPartLeaseByTaskIdApi(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/part_lease/selectPartLeaseByTaskId',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 配件领料-审核
|
||||||
|
export function auditApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/part_lease/audit',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -27,7 +27,7 @@ export function batchPassApi(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//内层审核批量通过
|
//内层审核批量拒绝
|
||||||
export function batchRejectApi(data) {
|
export function batchRejectApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/material/scrap_apply_details/reject',
|
url: '/material/scrap_apply_details/reject',
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form
|
<el-form :model="maForm" ref="maForm" size="small" :inline="true" label-width="120px">
|
||||||
:model="maForm"
|
<el-form-item label="申请人:" prop="creator">
|
||||||
ref="maForm"
|
|
||||||
size="small"
|
|
||||||
:inline="true"
|
|
||||||
label-width="120px"
|
|
||||||
>
|
|
||||||
<el-form-item label="申请人:" prop="createBy">
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="maForm.createBy"
|
v-model="maForm.creator"
|
||||||
placeholder="请输入申请人"
|
placeholder="请输入申请人"
|
||||||
clearable
|
clearable
|
||||||
maxlength="50"
|
maxlength="50"
|
||||||
|
|
@ -17,9 +11,9 @@
|
||||||
disabled
|
disabled
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="领料单号:" prop="repairNum">
|
<el-form-item label="领料单号:" prop="code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="maForm.repairNum"
|
v-model="maForm.code"
|
||||||
placeholder="请输入领料单号"
|
placeholder="请输入领料单号"
|
||||||
clearable
|
clearable
|
||||||
maxlength="50"
|
maxlength="50"
|
||||||
|
|
@ -62,52 +56,14 @@
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table
|
<el-table v-loading="loading" :data="equipmentList" row-key="id" @selection-change="handleSelectionChange">
|
||||||
v-loading="loading"
|
<el-table-column type="selection" width="55" align="center" :selectable="selectable"/>
|
||||||
:data="equipmentList"
|
|
||||||
row-key="id"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
>
|
|
||||||
<el-table-column
|
|
||||||
type="selection"
|
|
||||||
width="55"
|
|
||||||
align="center"
|
|
||||||
:selectable="selectable"
|
|
||||||
/>
|
|
||||||
<el-table-column label="序号" align="center" type="index" />
|
<el-table-column label="序号" align="center" type="index" />
|
||||||
<el-table-column
|
<el-table-column label="配件类型" align="center" prop="partType" :show-overflow-tooltip="true"/>
|
||||||
label="配件类型"
|
<el-table-column label="配件名称" align="center" prop="partName" :show-overflow-tooltip="true"></el-table-column>
|
||||||
align="center"
|
<el-table-column label="规格型号" align="center" prop="partModel" :show-overflow-tooltip="true"/>
|
||||||
prop="machineTypeName"
|
<el-table-column label="预领数量" align="center" prop="preNum" :show-overflow-tooltip="true"></el-table-column>
|
||||||
:show-overflow-tooltip="true"
|
<el-table-column label="审核状态" align="center" prop="status" :show-overflow-tooltip="true">
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="配件名称"
|
|
||||||
align="center"
|
|
||||||
prop=""
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="规格型号"
|
|
||||||
align="center"
|
|
||||||
prop="specificationType"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
label="预领数量"
|
|
||||||
align="center"
|
|
||||||
prop="repairNum"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="审核状态"
|
|
||||||
align="center"
|
|
||||||
prop="status"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-if="scope.row.status == '0'" style="color: #e6a23c">
|
<div v-if="scope.row.status == '0'" style="color: #e6a23c">
|
||||||
{{ "未审核" }}
|
{{ "未审核" }}
|
||||||
|
|
@ -154,7 +110,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAuditInfo, auditPass } from "@/api/repair/testExamine";
|
import {
|
||||||
|
getPartLeaseByTaskIdApi,auditApi
|
||||||
|
} from "@/api/part/partLease";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
export default {
|
export default {
|
||||||
name: "AddTools",
|
name: "AddTools",
|
||||||
|
|
@ -242,14 +200,10 @@ export default {
|
||||||
this.failTemp = [];
|
this.failTemp = [];
|
||||||
this.ids = selection.map((item) => item.id);
|
this.ids = selection.map((item) => item.id);
|
||||||
selection.forEach((item) => {
|
selection.forEach((item) => {
|
||||||
this.passTemp.push({ id: item.id, status: "1",specificationType: item.specificationType,machineTypeName:item.machineTypeName,
|
this.passTemp.push(item);
|
||||||
unitName:item.unitName,repairNum:item.repairNum,repairedNum:item.repairedNum,typeId:item.typeId,taskId:item.taskId,
|
|
||||||
auditId:item.id,repairId:item.repairId,maId:item.maId, });
|
|
||||||
});
|
});
|
||||||
selection.forEach((item) => {
|
selection.forEach((item) => {
|
||||||
this.failTemp.push({ id: item.id, status: "2",specificationType: item.specificationType,machineTypeName:item.machineTypeName,
|
this.failTemp.push(item);
|
||||||
unitName:item.unitName,repairNum:item.repairNum,repairedNum:item.repairedNum,typeId:item.typeId,taskId:item.taskId,
|
|
||||||
auditId:item.id,repairId:item.repairId,maId:item.maId, });
|
|
||||||
});
|
});
|
||||||
this.single = selection.length != 1;
|
this.single = selection.length != 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
|
|
@ -257,24 +211,24 @@ export default {
|
||||||
},
|
},
|
||||||
//获取任务详情-列表数据
|
//获取任务详情-列表数据
|
||||||
getTaskInfo() {
|
getTaskInfo() {
|
||||||
// this.loading = true;
|
this.loading = true;
|
||||||
// getAuditInfo({ taskId: this.taskId }).then((response) => {
|
getPartLeaseByTaskIdApi({ taskId: this.taskId }).then((response) => {
|
||||||
// this.maForm = this.paramTemp;
|
this.maForm = this.paramTemp;
|
||||||
// this.equipmentList = response.rows;
|
this.equipmentList = response.data;
|
||||||
// this.total = response.total;
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
// });
|
});
|
||||||
},
|
},
|
||||||
//单个通过
|
//单个通过
|
||||||
handlePass(row) {
|
handlePass(row) {
|
||||||
const param = [];
|
let param={
|
||||||
param.push({ id: row.id, status: "1",specificationType: row.specificationType,machineTypeName:row.machineTypeName,
|
taskId:this.taskId,
|
||||||
unitName:row.unitName,repairNum:row.repairNum,repairedNum:row.repairedNum,typeId:row.typeId,taskId:row.taskId,
|
taskStatus:1,
|
||||||
auditId:row.id,repairId:row.repairId,maId:row.maId, });
|
partLeaseDetailsList:[row]
|
||||||
|
}
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("是否确认通过所选择的数据项?")
|
.confirm("是否确认通过所选择的数据项?")
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return auditPass(param);
|
return auditApi(param);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getTaskInfo();
|
this.getTaskInfo();
|
||||||
|
|
@ -284,15 +238,15 @@ export default {
|
||||||
},
|
},
|
||||||
//单个驳回
|
//单个驳回
|
||||||
handleFail(row) {
|
handleFail(row) {
|
||||||
const param = [];
|
let param={
|
||||||
param.push({ id: row.id, status: "2",specificationType: row.specificationType,machineTypeName:row.machineTypeName,
|
taskId:this.taskId,
|
||||||
unitName:row.unitName,repairNum:row.repairNum,repairedNum:row.repairedNum,typeId:row.typeId,taskId:row.taskId,
|
taskStatus:2,
|
||||||
auditId:row.id,repairId:row.repairId,maId:row.maId,
|
partLeaseDetailsList:[row]
|
||||||
});
|
}
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("是否确认驳回所选择的数据项?")
|
.confirm("是否确认驳回所选择的数据项?")
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return auditPass(param);
|
return auditApi(param);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getTaskInfo();
|
this.getTaskInfo();
|
||||||
|
|
@ -309,7 +263,12 @@ export default {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
auditPass(this.passTemp).then((response) => {
|
let param={
|
||||||
|
taskId:this.taskId,
|
||||||
|
taskStatus:1,
|
||||||
|
partLeaseDetailsList:this.passTemp
|
||||||
|
}
|
||||||
|
auditApi(param).then((response) => {
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("通过成功");
|
this.$modal.msgSuccess("通过成功");
|
||||||
}
|
}
|
||||||
|
|
@ -326,7 +285,12 @@ export default {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
auditPass(this.failTemp).then((response) => {
|
let param={
|
||||||
|
taskId:this.taskId,
|
||||||
|
taskStatus:2,
|
||||||
|
partLeaseDetailsList:this.failTemp
|
||||||
|
}
|
||||||
|
auditApi(param).then((response) => {
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("驳回成功");
|
this.$modal.msgSuccess("驳回成功");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
:model="queryParams"
|
|
||||||
ref="queryForm"
|
|
||||||
size="small"
|
|
||||||
:inline="true"
|
|
||||||
v-show="showSearch"
|
|
||||||
label-width="100px"
|
|
||||||
>
|
|
||||||
<el-form-item label="日期">
|
<el-form-item label="日期">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.time"
|
v-model="queryParams.time"
|
||||||
|
|
@ -21,9 +14,9 @@
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="关键字" prop="keyword">
|
<el-form-item label="关键字" prop="keyWord">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.keyword"
|
v-model="queryParams.keyWord"
|
||||||
placeholder="请输入关键字"
|
placeholder="请输入关键字"
|
||||||
clearable
|
clearable
|
||||||
maxlength="50"
|
maxlength="50"
|
||||||
|
|
@ -100,106 +93,32 @@
|
||||||
></right-toolbar>
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table
|
<el-table v-loading="loading" :data="tableList" row-key="id" @selection-change="handleSelectionChange" border>
|
||||||
v-loading="loading"
|
<!-- <el-table-column type="selection" width="55" align="center" :selectable="selectable"/> -->
|
||||||
:data="typeList"
|
|
||||||
row-key="id"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
border
|
|
||||||
>
|
|
||||||
<!-- <el-table-column
|
|
||||||
type="selection"
|
|
||||||
width="55"
|
|
||||||
align="center"
|
|
||||||
:selectable="selectable"
|
|
||||||
/> -->
|
|
||||||
<el-table-column width="60" align="center" label="序号" type="index" :index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"/>
|
<el-table-column width="60" align="center" label="序号" type="index" :index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"/>
|
||||||
<el-table-column
|
<el-table-column label="申请人" align="center" prop="creator" :show-overflow-tooltip="true"/>
|
||||||
label="申请人"
|
<el-table-column label="申请时间" align="center" prop="createTime" width="110px" :show-overflow-tooltip="true"></el-table-column>
|
||||||
align="center"
|
<el-table-column label="申请配件" align="center" prop="partName" :show-overflow-tooltip="true"/>
|
||||||
prop="createBy"
|
<el-table-column label="单号" align="center" prop="code" :show-overflow-tooltip="true"/>
|
||||||
:show-overflow-tooltip="true"
|
<el-table-column label="审核人" align="center" prop="auditor" width="110px" :show-overflow-tooltip="true"/>
|
||||||
/>
|
<el-table-column label="审核时间" align="center" prop="auditTime" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column
|
<el-table-column label="状态" align="center" prop="taskStatusName" :show-overflow-tooltip="true">
|
||||||
label="申请时间"
|
|
||||||
align="center"
|
|
||||||
prop="createTime"
|
|
||||||
width="110px"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="申请配件"
|
|
||||||
align="center"
|
|
||||||
prop="itemType"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="单号"
|
|
||||||
align="center"
|
|
||||||
prop="repairNum"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="审核人"
|
|
||||||
align="center"
|
|
||||||
prop="teamName"
|
|
||||||
width="110px"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="审核时间"
|
|
||||||
align="center"
|
|
||||||
prop="createTime"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="状态"
|
|
||||||
align="center"
|
|
||||||
prop="taskStatus"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
>
|
|
||||||
<!-- <template slot-scope="scope">
|
<!-- <template slot-scope="scope">
|
||||||
<dict-tag
|
<dict-tag :options="dict.type.repair_task_status":value="scope.row.taskStatus"/>
|
||||||
:options="dict.type.repair_task_status"
|
|
||||||
:value="scope.row.taskStatus"
|
|
||||||
/>
|
|
||||||
</template> -->
|
</template> -->
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<!-- <el-table-column label="备注" align="center" width="100" prop="remark" :show-overflow-tooltip="true"/> -->
|
||||||
<el-table-column
|
|
||||||
label="备注"
|
|
||||||
align="center"
|
|
||||||
width="100"
|
|
||||||
prop="remark"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" width="300">
|
<el-table-column label="操作" align="center" width="300">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button size="mini" style="margin-bottom: 10px" type="normal"
|
||||||
size="mini"
|
|
||||||
style="margin-bottom: 10px"
|
|
||||||
type="normal"
|
|
||||||
@click="handleView(scope.row)"
|
@click="handleView(scope.row)"
|
||||||
>查看
|
>查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button size="mini" style="margin-bottom: 10px" type="primary"
|
||||||
size="mini"
|
|
||||||
style="margin-bottom: 10px"
|
|
||||||
type="primary"
|
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-if="scope.row.status != '2'"
|
v-if="scope.row.status != '2'"
|
||||||
>审核
|
>审核
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<!-- <el-button
|
|
||||||
size="mini"
|
|
||||||
type="danger"
|
|
||||||
@click="handleDeletePurchase(scope.row)"
|
|
||||||
v-if="scope.row.status == '0'"
|
|
||||||
>驳回
|
|
||||||
</el-button> -->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -216,21 +135,19 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
getListTestExamineApply,
|
getPartLeaseInfoListApi,
|
||||||
} from "@/api/repair/testExamine";
|
} from "@/api/part/partLease";
|
||||||
// import {
|
// import {
|
||||||
// outerAudit,
|
// outerAudit,
|
||||||
// } from "@/api/repair/repair";
|
// } from "@/api/repair/repair";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
export default {
|
export default {
|
||||||
name: "Home",
|
name: "Home",
|
||||||
dicts: ['repair_task_status'],
|
dicts: [],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
loadingTwo: true,
|
|
||||||
updateTime: "",
|
|
||||||
// 选中数组
|
// 选中数组
|
||||||
ids: [],
|
ids: [],
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
|
|
@ -244,15 +161,7 @@ export default {
|
||||||
//搜索下拉数据
|
//搜索下拉数据
|
||||||
statusList: [{id:"0",name:"待审核"},{id:"1",name:"已审核"},{id:"2",name:"已驳回"}],
|
statusList: [{id:"0",name:"待审核"},{id:"1",name:"已审核"},{id:"2",name:"已驳回"}],
|
||||||
// 字典表格数据
|
// 字典表格数据
|
||||||
typeList: [],
|
tableList: [],
|
||||||
getListPeople: [],
|
|
||||||
configUserList: [],
|
|
||||||
phoneNumbers: [],
|
|
||||||
//选择人员
|
|
||||||
chosenUserList: [],
|
|
||||||
userList: [],
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 日期范围
|
// 日期范围
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
statusDataRange: [],
|
statusDataRange: [],
|
||||||
|
|
@ -261,32 +170,12 @@ export default {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
time: null, //申请时间
|
time: null, //申请时间
|
||||||
name: undefined,
|
|
||||||
taskStatus: "",
|
taskStatus: "",
|
||||||
keyword: "",
|
keyWord: "",
|
||||||
},
|
},
|
||||||
form: {
|
form: {},
|
||||||
remark: "",
|
|
||||||
},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
remark: [
|
|
||||||
{ required: true, message: "通知内容不能为空", trigger: "blur" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
openPrint: false,
|
|
||||||
open: false,
|
|
||||||
printData: {},
|
|
||||||
printTableData: [],
|
|
||||||
// 供应商
|
|
||||||
supplierStr: "",
|
|
||||||
|
|
||||||
//领料单
|
|
||||||
leaseApplyDetails: [],
|
|
||||||
// 领料任务详情数据
|
|
||||||
leaseApplyData: {},
|
|
||||||
passTemp: [],
|
passTemp: [],
|
||||||
faliTemp: [],
|
failTemp: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -317,21 +206,20 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
// this.loading = true;
|
this.loading = true;
|
||||||
// const params = {
|
const params = {
|
||||||
// keyword: this.queryParams.keyword,
|
keyWord: this.queryParams.keyWord,
|
||||||
// startTime: this.queryParams.time && this.queryParams.time[0],
|
startTime: this.queryParams.time && this.queryParams.time[0],
|
||||||
// endTime: this.queryParams.time && this.queryParams.time[1],
|
endTime: this.queryParams.time && this.queryParams.time[1],
|
||||||
// pageSize: this.queryParams.pageSize,
|
pageSize: this.queryParams.pageSize,
|
||||||
// pageNum: this.queryParams.pageNum,
|
pageNum: this.queryParams.pageNum,
|
||||||
// taskStatus: this.queryParams.taskStatus,
|
taskStatus: this.queryParams.taskStatus,
|
||||||
// taskType:5,
|
};
|
||||||
// };
|
getPartLeaseInfoListApi(params).then((response) => {
|
||||||
// getListTestExamineApply(this.addDateRange(params)).then((response) => {
|
this.tableList = response.rows;
|
||||||
// this.typeList = response.rows;
|
this.total = response.total;
|
||||||
// this.total = response.total;
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
// });
|
});
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
|
@ -342,7 +230,7 @@ export default {
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.queryParams.time = [];
|
this.queryParams.time = [];
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.queryParams.keyword = "";
|
this.queryParams.keyWord = "";
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
/** 通过按钮操作 */
|
/** 通过按钮操作 */
|
||||||
|
|
@ -389,134 +277,24 @@ export default {
|
||||||
this.$emit("addTools", row.taskId, row.id,row);
|
this.$emit("addTools", row.taskId, row.id,row);
|
||||||
},
|
},
|
||||||
|
|
||||||
//----消息通知
|
|
||||||
getNowTime() {
|
|
||||||
var today = new Date();
|
|
||||||
var year = today.getFullYear(); //获取年份
|
|
||||||
var month = today.getMonth() + 1; //获取月份
|
|
||||||
var day = today.getDate(); //获取日期
|
|
||||||
return year + "-" + month + "-" + day;
|
|
||||||
},
|
|
||||||
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
taskId: "",
|
|
||||||
remark: "",
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
|
|
||||||
//获取验收单数据
|
|
||||||
getPrintTable(taskId) {
|
|
||||||
getAcceptanceForm({ taskId: taskId }).then((response) => {
|
|
||||||
this.printData = response.data;
|
|
||||||
this.printTableData = response.data.checkDetailsList;
|
|
||||||
|
|
||||||
let supplierList = [];
|
|
||||||
this.printTableData.forEach((e) => {
|
|
||||||
if (e.supplier) {
|
|
||||||
supplierList.push(e.supplier);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
supplierList = [...new Set(supplierList)];
|
|
||||||
|
|
||||||
this.supplierStr = supplierList.join(",");
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//查看验收单
|
|
||||||
handlePrint(row) {
|
|
||||||
// this.query.taskId = row.taskId
|
|
||||||
// this.getPrintTable(row.taskId)
|
|
||||||
this.openPrint = true;
|
|
||||||
this.title = "机具设备到货验收单";
|
|
||||||
},
|
|
||||||
|
|
||||||
//打开领料单
|
|
||||||
async handleLld(row) {
|
|
||||||
this.open = true;
|
|
||||||
var ids = row.id;
|
|
||||||
const res = await getApplyInfo(ids);
|
|
||||||
console.log(res);
|
|
||||||
this.leaseApplyDetails = res.data.leaseApplyDetailsList;
|
|
||||||
this.leaseApplyData = res.data.leaseApplyInfo;
|
|
||||||
console.log(this.leaseApplyData);
|
|
||||||
},
|
|
||||||
|
|
||||||
//打印
|
|
||||||
print() {
|
|
||||||
this.$refs.remarksPrintRef.print();
|
|
||||||
},
|
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDeletePurchase(row) {
|
|
||||||
// console.log(row)
|
|
||||||
let ids = [];
|
|
||||||
ids.push(row.id);
|
|
||||||
console.log("ids", ids);
|
|
||||||
this.$modal
|
|
||||||
.confirm("是否确认删除所选择的数据项?")
|
|
||||||
.then(function () {
|
|
||||||
return applyRemove(ids);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// this.download(
|
this.download(
|
||||||
// "/material/repair_audit_details/export",
|
"/material/part_lease/export",
|
||||||
// {
|
{
|
||||||
// ...this.queryParams,
|
...this.queryParams,
|
||||||
// startTime: this.queryParams.time && this.queryParams.time[0],
|
startTime: this.queryParams.time && this.queryParams.time[0],
|
||||||
// endTime: this.queryParams.time && this.queryParams.time[1],
|
endTime: this.queryParams.time && this.queryParams.time[1],
|
||||||
// },
|
|
||||||
// `修试审核_${new Date().getTime()}.xlsx`
|
|
||||||
// );
|
|
||||||
},
|
},
|
||||||
|
`配件领用_${new Date().getTime()}.xlsx`
|
||||||
//发布按钮
|
);
|
||||||
handleSend(row) {
|
|
||||||
const param = { id: row.id, taskId: row.taskId };
|
|
||||||
this.$modal
|
|
||||||
.confirm("是否确认发布所选择的数据项?")
|
|
||||||
.then(function () {
|
|
||||||
return applySend(param);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("发布成功");
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
|
|
||||||
handleSendAll() {
|
|
||||||
if (this.ids.length == 0) {
|
|
||||||
this.$alert("请至少勾选一个领料申请", "提示", {
|
|
||||||
type: "warning",
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
applySendAll(this.sendTemp).then((response) => {
|
|
||||||
if (response.code == 200) {
|
|
||||||
this.$modal.msgSuccess("发布成功");
|
|
||||||
}
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
$route: {
|
$route: {
|
||||||
handler(to) {
|
handler(to) {
|
||||||
if (to.query.keyword) {
|
if (to.query.keyWord) {
|
||||||
this.queryParams.keyword = to.query.keyword;
|
this.queryParams.keyWord = to.query.keyWord;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
|
|
|
||||||
|
|
@ -1,120 +1,69 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form
|
<el-form :model="maForm" ref="maForm" size="small" :inline="true" label-width="120px">
|
||||||
:model="maForm"
|
<el-form-item label="申请人:" prop="creator">
|
||||||
ref="maForm"
|
|
||||||
size="small"
|
|
||||||
:inline="true"
|
|
||||||
label-width="120px"
|
|
||||||
>
|
|
||||||
<el-form-item label="退料单位" prop="unitName">
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="maForm.unitName"
|
v-model="maForm.creator"
|
||||||
placeholder="请输入退料单位"
|
placeholder="请输入申请人"
|
||||||
clearable
|
clearable
|
||||||
maxlength="50"
|
maxlength="50"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
disabled
|
disabled
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工程名称" prop="projectName">
|
<el-form-item label="领料单号:" prop="code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="maForm.projectName"
|
v-model="maForm.code"
|
||||||
placeholder="请输入工程名称"
|
placeholder="请输入领料单号"
|
||||||
clearable
|
clearable
|
||||||
maxlength="50"
|
maxlength="50"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
disabled
|
disabled
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="维修单号" prop="repairNum">
|
<el-form-item label="备注:" prop="remark">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="maForm.repairNum"
|
v-model="maForm.remark"
|
||||||
placeholder="请输入维修单号"
|
|
||||||
clearable
|
clearable
|
||||||
maxlength="50"
|
maxlength="200"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
disabled
|
disabled
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-table
|
<!-- <el-row :gutter="10" class="mb8">
|
||||||
v-loading="loading"
|
<el-col :span="1.5">
|
||||||
:data="equipmentList"
|
<el-button
|
||||||
row-key="id"
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-check"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handlePassAll"
|
||||||
|
>通过</el-button
|
||||||
>
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-close"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleFailAll"
|
||||||
|
>驳回</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
</el-row> -->
|
||||||
|
<el-table v-loading="loading" :data="equipmentList" row-key="id" @selection-change="handleSelectionChange">
|
||||||
|
<!-- <el-table-column type="selection" width="55" align="center" :selectable="selectable"/> -->
|
||||||
<el-table-column label="序号" align="center" type="index" />
|
<el-table-column label="序号" align="center" type="index" />
|
||||||
<el-table-column
|
<el-table-column label="配件类型" align="center" prop="partType" :show-overflow-tooltip="true"/>
|
||||||
label="类型名称"
|
<el-table-column label="配件名称" align="center" prop="partName" :show-overflow-tooltip="true"></el-table-column>
|
||||||
align="center"
|
<el-table-column label="规格型号" align="center" prop="partModel" :show-overflow-tooltip="true"/>
|
||||||
prop="specificationType"
|
<el-table-column label="预领数量" align="center" prop="preNum" :show-overflow-tooltip="true"></el-table-column>
|
||||||
:show-overflow-tooltip="true"
|
<el-table-column label="审核状态" align="center" prop="status" :show-overflow-tooltip="true">
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="规格型号"
|
|
||||||
align="center"
|
|
||||||
prop="machineTypeName"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="计量单位"
|
|
||||||
align="center"
|
|
||||||
prop="unitName"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="退料数量"
|
|
||||||
align="center"
|
|
||||||
prop="repairNum"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="已修数量"
|
|
||||||
align="center"
|
|
||||||
prop="repairedNum"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="报废数量"
|
|
||||||
align="center"
|
|
||||||
prop="scrapNum"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="待修数量"
|
|
||||||
align="center"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div>
|
|
||||||
{{ scope.row.repairNum - scope.row.repairedNum - scope.row.scrapNum }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="管理模式"
|
|
||||||
align="center"
|
|
||||||
prop="alNum"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<!-- 0编码1数量 -->
|
|
||||||
<div v-if="scope.row.manageType==0">编码管理</div>
|
|
||||||
<div v-if="scope.row.manageType==1">数量管理</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="审核状态"
|
|
||||||
align="center"
|
|
||||||
prop="status"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-if="scope.row.status == '0'" style="color: #e6a23c">
|
<div v-if="scope.row.status == '0'" style="color: #e6a23c">
|
||||||
{{ "未审核" }}
|
{{ "未审核" }}
|
||||||
|
|
@ -133,7 +82,7 @@
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
style="margin-bottom: 10px"
|
style="margin-bottom: 10px"
|
||||||
type="primary"
|
type="success"
|
||||||
v-if="scope.row.status == '0'"
|
v-if="scope.row.status == '0'"
|
||||||
@click="handlePass(scope.row)"
|
@click="handlePass(scope.row)"
|
||||||
>通过
|
>通过
|
||||||
|
|
@ -161,15 +110,17 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAuditInfo, auditPass } from "@/api/repair/testExamine";
|
import {
|
||||||
|
getPartLeaseByTaskIdApi,auditApi
|
||||||
|
} from "@/api/part/partLease";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
export default {
|
export default {
|
||||||
name: "QueryTools",
|
name: "AddTools",
|
||||||
components: {
|
components: {
|
||||||
// UploadImg,
|
// UploadImg,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
isView: {
|
isEdit: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: () => {
|
default: () => {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -249,32 +200,35 @@ export default {
|
||||||
this.failTemp = [];
|
this.failTemp = [];
|
||||||
this.ids = selection.map((item) => item.id);
|
this.ids = selection.map((item) => item.id);
|
||||||
selection.forEach((item) => {
|
selection.forEach((item) => {
|
||||||
this.passTemp.push({ id: item.id, status: "1" });
|
this.passTemp.push(item);
|
||||||
});
|
});
|
||||||
selection.forEach((item) => {
|
selection.forEach((item) => {
|
||||||
this.failTemp.push({ id: item.id, status: "2" });
|
this.failTemp.push(item);
|
||||||
});
|
});
|
||||||
this.single = selection.length != 1;
|
this.single = selection.length != 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
|
console.log(this.multiple)
|
||||||
},
|
},
|
||||||
//获取任务详情-列表数据
|
//获取任务详情-列表数据
|
||||||
getTaskInfo() {
|
getTaskInfo() {
|
||||||
// this.loading = true;
|
this.loading = true;
|
||||||
// getAuditInfo({ taskId: this.taskId }).then((response) => {
|
getPartLeaseByTaskIdApi({ taskId: this.taskId }).then((response) => {
|
||||||
// this.maForm = this.paramTemp;
|
this.maForm = this.paramTemp;
|
||||||
// this.equipmentList = response.rows;
|
this.equipmentList = response.data;
|
||||||
// this.total = response.total;
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
// });
|
});
|
||||||
},
|
},
|
||||||
//单个通过
|
//单个通过
|
||||||
handlePass(row) {
|
handlePass(row) {
|
||||||
const param = [];
|
let param={
|
||||||
param.push({ id: row.id, status: "1" });
|
taskId:this.taskId,
|
||||||
|
taskStatus:1,
|
||||||
|
partLeaseDetailsList:[row]
|
||||||
|
}
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("是否确认通过所选择的数据项?")
|
.confirm("是否确认通过所选择的数据项?")
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return auditPass(param);
|
return auditApi(param);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getTaskInfo();
|
this.getTaskInfo();
|
||||||
|
|
@ -284,12 +238,15 @@ export default {
|
||||||
},
|
},
|
||||||
//单个驳回
|
//单个驳回
|
||||||
handleFail(row) {
|
handleFail(row) {
|
||||||
const param = [];
|
let param={
|
||||||
param.push({ id: row.id, status: "2" });
|
taskId:this.taskId,
|
||||||
|
taskStatus:2,
|
||||||
|
partLeaseDetailsList:[row]
|
||||||
|
}
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("是否确认驳回所选择的数据项?")
|
.confirm("是否确认驳回所选择的数据项?")
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return auditPass(param);
|
return auditApi(param);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getTaskInfo();
|
this.getTaskInfo();
|
||||||
|
|
@ -306,7 +263,12 @@ export default {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
auditPass(this.passTemp).then((response) => {
|
let param={
|
||||||
|
taskId:this.taskId,
|
||||||
|
taskStatus:1,
|
||||||
|
partLeaseDetailsList:this.passTemp
|
||||||
|
}
|
||||||
|
auditApi(param).then((response) => {
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("通过成功");
|
this.$modal.msgSuccess("通过成功");
|
||||||
}
|
}
|
||||||
|
|
@ -323,7 +285,12 @@ export default {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
auditPass(this.failTemp).then((response) => {
|
let param={
|
||||||
|
taskId:this.taskId,
|
||||||
|
taskStatus:2,
|
||||||
|
partLeaseDetailsList:this.failTemp
|
||||||
|
}
|
||||||
|
auditApi(param).then((response) => {
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("驳回成功");
|
this.$modal.msgSuccess("驳回成功");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,9 +32,9 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="taskStatus">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.status"
|
v-model="queryParams.taskStatus"
|
||||||
placeholder="请选择状态"
|
placeholder="请选择状态"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
|
|
@ -211,7 +211,7 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleDeletePurchase(scope.row)"
|
@click="handleDeletePurchase(scope.row)"
|
||||||
v-if="scope.row.status == '0'"
|
v-if="scope.row.taskStatus == '0'"
|
||||||
>驳回
|
>驳回
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -260,7 +260,7 @@ export default {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
time: null,
|
time: null,
|
||||||
keyWord: "",
|
keyWord: "",
|
||||||
status: undefined,
|
taskStatus: undefined,
|
||||||
},
|
},
|
||||||
passTemp: [],
|
passTemp: [],
|
||||||
failTemp: [],
|
failTemp: [],
|
||||||
|
|
@ -297,7 +297,7 @@ export default {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const params = {
|
const params = {
|
||||||
keyWord: this.queryParams.keyWord,
|
keyWord: this.queryParams.keyWord,
|
||||||
status: this.queryParams.status,
|
taskStatus: this.queryParams.taskStatus,
|
||||||
startTime: this.queryParams.time && this.queryParams.time[0],
|
startTime: this.queryParams.time && this.queryParams.time[0],
|
||||||
endTime: this.queryParams.time && this.queryParams.time[1],
|
endTime: this.queryParams.time && this.queryParams.time[1],
|
||||||
pageSize: this.queryParams.pageSize,
|
pageSize: this.queryParams.pageSize,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue