配件领用页面代码
This commit is contained in:
parent
56d4919ab9
commit
d2a5fc4ce0
|
|
@ -0,0 +1,367 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-form
|
||||
:model="maForm"
|
||||
ref="maForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="申请人:" prop="createBy">
|
||||
<el-input
|
||||
v-model="maForm.createBy"
|
||||
placeholder="请输入申请人"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="领料单号:" prop="repairNum">
|
||||
<el-input
|
||||
v-model="maForm.repairNum"
|
||||
placeholder="请输入领料单号"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注:" prop="remark">
|
||||
<el-input
|
||||
v-model="maForm.remark"
|
||||
clearable
|
||||
maxlength="200"
|
||||
style="width: 240px"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
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"
|
||||
prop="machineTypeName"
|
||||
: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">
|
||||
<div v-if="scope.row.status == '0'" style="color: #e6a23c">
|
||||
{{ "未审核" }}
|
||||
</div>
|
||||
<div v-if="scope.row.status == '1'" style="color: #67c23a">
|
||||
{{ "已审核" }}
|
||||
</div>
|
||||
<div v-if="scope.row.status == '2'" style="color: #f56c6c">
|
||||
{{ "驳回" }}
|
||||
</div>
|
||||
<!-- <div v-else style="color: red;"></div> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<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"
|
||||
@click="handleFail(scope.row)"
|
||||
v-if="scope.row.status == '0'"
|
||||
>驳回
|
||||
</el-button>
|
||||
<div v-if="scope.row.status != '0'">-</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<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 { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
name: "AddTools",
|
||||
components: {
|
||||
// UploadImg,
|
||||
},
|
||||
props: {
|
||||
isEdit: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return false;
|
||||
},
|
||||
},
|
||||
queryTaskId: {
|
||||
type: [String, Number],
|
||||
default: () => {
|
||||
return "";
|
||||
},
|
||||
},
|
||||
queryId: {
|
||||
type: [String, Number],
|
||||
default: () => {
|
||||
return "";
|
||||
},
|
||||
},
|
||||
param: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return "";
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
paramTemp: {},
|
||||
//任务ID
|
||||
taskId: "",
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
total: 0,
|
||||
//租赁单位
|
||||
uniteList: [],
|
||||
//租赁工程
|
||||
projectList: [],
|
||||
// 表格数据
|
||||
equipmentList: [],
|
||||
passTemp: [],
|
||||
faliTemp: [],
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
rowData: {},
|
||||
maForm: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
unitName: undefined,
|
||||
projectName: undefined,
|
||||
repairNum: undefined,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
mounted() {
|
||||
this.taskId = this.queryTaskId;
|
||||
this.paramTemp = this.param;
|
||||
this.getTaskInfo();
|
||||
},
|
||||
methods: {
|
||||
//是否可用勾选框
|
||||
selectable(row) {
|
||||
if (row.status == "0") {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.passTemp = [];
|
||||
this.failTemp = [];
|
||||
this.ids = selection.map((item) => item.id);
|
||||
selection.forEach((item) => {
|
||||
this.passTemp.push({ id: item.id, status: "1",specificationType: item.specificationType,machineTypeName:item.machineTypeName,
|
||||
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) => {
|
||||
this.failTemp.push({ id: item.id, status: "2",specificationType: item.specificationType,machineTypeName:item.machineTypeName,
|
||||
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.multiple = !selection.length;
|
||||
console.log(this.multiple)
|
||||
},
|
||||
//获取任务详情-列表数据
|
||||
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) {
|
||||
this.$alert("请至少勾选一条审核数据", "提示", {
|
||||
type: "warning",
|
||||
confirmButtonText: "确定",
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
auditPass(this.passTemp).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("通过成功");
|
||||
}
|
||||
this.getTaskInfo();
|
||||
});
|
||||
}
|
||||
},
|
||||
//多个驳回
|
||||
handleFailAll() {
|
||||
if (this.ids.length == 0) {
|
||||
this.$alert("请至少勾选一条审核数据", "提示", {
|
||||
type: "warning",
|
||||
confirmButtonText: "确定",
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
auditPass(this.failTemp).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("驳回成功");
|
||||
}
|
||||
this.getTaskInfo();
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
//隐藏图片上传框的css
|
||||
::v-deep.disabled {
|
||||
.el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.custom-textarea {
|
||||
width: 300px;
|
||||
height: 100px;
|
||||
}
|
||||
.accept-img {
|
||||
color: #409eff;
|
||||
|
||||
.a-two {
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.left-tip {
|
||||
font-size: 16px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,533 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="日期">
|
||||
<el-date-picker
|
||||
v-model="queryParams.time"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 240px"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="关键字" prop="keyword">
|
||||
<el-input
|
||||
v-model="queryParams.keyword"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="状态" prop="taskStatus">
|
||||
<el-select
|
||||
v-model="queryParams.taskStatus"
|
||||
placeholder="请选择状态"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="handlePassAll"
|
||||
>通过
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-close"
|
||||
size="mini"
|
||||
@click="handleFailAll"
|
||||
>驳回
|
||||
</el-button>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
: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
|
||||
label="申请人"
|
||||
align="center"
|
||||
prop="createBy"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
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">
|
||||
<dict-tag
|
||||
:options="dict.type.repair_task_status"
|
||||
:value="scope.row.taskStatus"
|
||||
/>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
width="100"
|
||||
prop="remark"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
style="margin-bottom: 10px"
|
||||
type="normal"
|
||||
@click="handleView(scope.row)"
|
||||
>查看
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
style="margin-bottom: 10px"
|
||||
type="primary"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-if="scope.row.status != '2'"
|
||||
>审核
|
||||
</el-button>
|
||||
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="handleDeletePurchase(scope.row)"
|
||||
v-if="scope.row.status == '0'"
|
||||
>驳回
|
||||
</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getListTestExamineApply,
|
||||
} from "@/api/repair/testExamine";
|
||||
import {
|
||||
outerAudit,
|
||||
} from "@/api/repair/repair";
|
||||
import router from "@/router";
|
||||
export default {
|
||||
name: "Home",
|
||||
dicts: ['repair_task_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
loadingTwo: true,
|
||||
updateTime: "",
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
//搜索下拉数据
|
||||
statusList: [{id:"0",name:"待审核"},{id:"1",name:"已审核"},{id:"2",name:"已驳回"}],
|
||||
// 字典表格数据
|
||||
typeList: [],
|
||||
getListPeople: [],
|
||||
configUserList: [],
|
||||
phoneNumbers: [],
|
||||
//选择人员
|
||||
chosenUserList: [],
|
||||
userList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
statusDataRange: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
time: null, //申请时间
|
||||
name: undefined,
|
||||
taskStatus: "",
|
||||
keyword: "",
|
||||
},
|
||||
form: {
|
||||
remark: "",
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
remark: [
|
||||
{ required: true, message: "通知内容不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
openPrint: false,
|
||||
open: false,
|
||||
printData: {},
|
||||
printTableData: [],
|
||||
// 供应商
|
||||
supplierStr: "",
|
||||
|
||||
//领料单
|
||||
leaseApplyDetails: [],
|
||||
// 领料任务详情数据
|
||||
leaseApplyData: {},
|
||||
passTemp: [],
|
||||
faliTemp: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.passTemp = [];
|
||||
this.failTemp = [];
|
||||
this.ids = selection.map((item) => item.taskId);
|
||||
selection.forEach((item) => {
|
||||
this.passTemp.push({ status: "1",taskId:item.taskId, });
|
||||
});
|
||||
selection.forEach((item) => {
|
||||
this.failTemp.push({ status: "2",taskId:item.taskId, });
|
||||
});
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
|
||||
//是否可用勾选框
|
||||
selectable(row) {
|
||||
if (row.taskStatus == "10" || row.taskStatus == "6") {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const params = {
|
||||
keyword: this.queryParams.keyword,
|
||||
startTime: this.queryParams.time && this.queryParams.time[0],
|
||||
endTime: this.queryParams.time && this.queryParams.time[1],
|
||||
pageSize: this.queryParams.pageSize,
|
||||
pageNum: this.queryParams.pageNum,
|
||||
taskStatus: this.queryParams.taskStatus,
|
||||
taskType:5,
|
||||
};
|
||||
getListTestExamineApply(this.addDateRange(params)).then((response) => {
|
||||
this.typeList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams.time = [];
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams.keyword = "";
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 通过按钮操作 */
|
||||
handlePassAll() {
|
||||
if (this.ids.length == 0) {
|
||||
this.$alert("请至少勾选一条审核数据", "提示", {
|
||||
type: "warning",
|
||||
confirmButtonText: "确定",
|
||||
});
|
||||
} else {
|
||||
outerAudit(this.passTemp).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("通过成功");
|
||||
router.go(0); // 刷新页面
|
||||
}
|
||||
this.getTaskInfo();
|
||||
});
|
||||
}
|
||||
},
|
||||
/** 驳回按钮操作 */
|
||||
handleFailAll() {
|
||||
if (this.ids.length == 0) {
|
||||
this.$alert("请至少勾选一条审核数据", "提示", {
|
||||
type: "warning",
|
||||
confirmButtonText: "确定",
|
||||
});
|
||||
} else {
|
||||
outerAudit(this.failTemp).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("驳回成功");
|
||||
router.go(0); // 刷新页面
|
||||
}
|
||||
this.getTaskInfo();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/** 查看按钮操作 */
|
||||
handleView(row) {
|
||||
this.$emit("queryTools", row.taskId, row.id, row);
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(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() {
|
||||
this.download(
|
||||
"/material/repair_audit_details/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
startTime: this.queryParams.time && this.queryParams.time[0],
|
||||
endTime: this.queryParams.time && this.queryParams.time[1],
|
||||
},
|
||||
`修试审核_${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: {
|
||||
$route: {
|
||||
handler(to) {
|
||||
if (to.query.keyword) {
|
||||
this.queryParams.keyword = to.query.keyword;
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 70px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,364 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-form
|
||||
:model="maForm"
|
||||
ref="maForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="退料单位" prop="unitName">
|
||||
<el-input
|
||||
v-model="maForm.unitName"
|
||||
placeholder="请输入退料单位"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工程名称" prop="projectName">
|
||||
<el-input
|
||||
v-model="maForm.projectName"
|
||||
placeholder="请输入工程名称"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="维修单号" prop="repairNum">
|
||||
<el-input
|
||||
v-model="maForm.repairNum"
|
||||
placeholder="请输入维修单号"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="equipmentList"
|
||||
row-key="id"
|
||||
>
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<el-table-column
|
||||
label="类型名称"
|
||||
align="center"
|
||||
prop="specificationType"
|
||||
: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">
|
||||
<div v-if="scope.row.status == '0'" style="color: #e6a23c">
|
||||
{{ "未审核" }}
|
||||
</div>
|
||||
<div v-if="scope.row.status == '1'" style="color: #67c23a">
|
||||
{{ "已审核" }}
|
||||
</div>
|
||||
<div v-if="scope.row.status == '2'" style="color: #f56c6c">
|
||||
{{ "驳回" }}
|
||||
</div>
|
||||
<!-- <div v-else style="color: red;"></div> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
style="margin-bottom: 10px"
|
||||
type="primary"
|
||||
v-if="scope.row.status == '0'"
|
||||
@click="handlePass(scope.row)"
|
||||
>通过
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="handleFail(scope.row)"
|
||||
v-if="scope.row.status == '0'"
|
||||
>驳回
|
||||
</el-button>
|
||||
<div v-if="scope.row.status != '0'">-</div>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
<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 { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
name: "QueryTools",
|
||||
components: {
|
||||
// UploadImg,
|
||||
},
|
||||
props: {
|
||||
isView: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return false;
|
||||
},
|
||||
},
|
||||
queryTaskId: {
|
||||
type: [String, Number],
|
||||
default: () => {
|
||||
return "";
|
||||
},
|
||||
},
|
||||
queryId: {
|
||||
type: [String, Number],
|
||||
default: () => {
|
||||
return "";
|
||||
},
|
||||
},
|
||||
param: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return "";
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
paramTemp: {},
|
||||
//任务ID
|
||||
taskId: "",
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
total: 0,
|
||||
//租赁单位
|
||||
uniteList: [],
|
||||
//租赁工程
|
||||
projectList: [],
|
||||
// 表格数据
|
||||
equipmentList: [],
|
||||
passTemp: [],
|
||||
faliTemp: [],
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
rowData: {},
|
||||
maForm: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
unitName: undefined,
|
||||
projectName: undefined,
|
||||
repairNum: undefined,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
mounted() {
|
||||
this.taskId = this.queryTaskId;
|
||||
this.paramTemp = this.param;
|
||||
this.getTaskInfo();
|
||||
},
|
||||
methods: {
|
||||
//是否可用勾选框
|
||||
selectable(row) {
|
||||
if (row.status == "0") {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.passTemp = [];
|
||||
this.failTemp = [];
|
||||
this.ids = selection.map((item) => item.id);
|
||||
selection.forEach((item) => {
|
||||
this.passTemp.push({ id: item.id, status: "1" });
|
||||
});
|
||||
selection.forEach((item) => {
|
||||
this.failTemp.push({ id: item.id, status: "2" });
|
||||
});
|
||||
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" });
|
||||
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" });
|
||||
this.$modal
|
||||
.confirm("是否确认驳回所选择的数据项?")
|
||||
.then(function () {
|
||||
return auditPass(param);
|
||||
})
|
||||
.then(() => {
|
||||
this.getTaskInfo();
|
||||
this.$modal.msgSuccess("驳回成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
//多个通过
|
||||
handlePassAll() {
|
||||
if (this.ids.length == 0) {
|
||||
this.$alert("请至少勾选一条审核数据", "提示", {
|
||||
type: "warning",
|
||||
confirmButtonText: "确定",
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
auditPass(this.passTemp).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("通过成功");
|
||||
}
|
||||
this.getTaskInfo();
|
||||
});
|
||||
}
|
||||
},
|
||||
//多个驳回
|
||||
handleFailAll() {
|
||||
if (this.ids.length == 0) {
|
||||
this.$alert("请至少勾选一条审核数据", "提示", {
|
||||
type: "warning",
|
||||
confirmButtonText: "确定",
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
auditPass(this.failTemp).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("驳回成功");
|
||||
}
|
||||
this.getTaskInfo();
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
//隐藏图片上传框的css
|
||||
::v-deep.disabled {
|
||||
.el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.custom-textarea {
|
||||
width: 300px;
|
||||
height: 100px;
|
||||
}
|
||||
.accept-img {
|
||||
color: #409eff;
|
||||
|
||||
.a-two {
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.left-tip {
|
||||
font-size: 16px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<!-- 配件领用 -->
|
||||
<div class="app-container">
|
||||
<PageHeaderApply
|
||||
v-if="isShowComponent != 'Home'"
|
||||
:pageContent="pageContent"
|
||||
@goBack="goBack"
|
||||
/>
|
||||
<component
|
||||
:is="isShowComponent"
|
||||
:isEdit="isEdit"
|
||||
:editTaskId="editTaskId"
|
||||
:editId="editId"
|
||||
:queryTaskId="queryTaskId"
|
||||
:queryId="queryId"
|
||||
:param="param"
|
||||
:isView="isView"
|
||||
:codingTaskId="codingTaskId"
|
||||
@addTools="addTools"
|
||||
@queryTools="queryTools"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PageHeaderApply from "@/components/pageHeaderApply";
|
||||
import Home from "./component/homeApply.vue"; // 主列表
|
||||
import AddTools from "./component/addToolsApply.vue"; // 新增 和 修改
|
||||
import QueryTools from "./component/queryToolsApply.vue"; // 查询
|
||||
export default {
|
||||
components: {
|
||||
Home,
|
||||
PageHeaderApply,
|
||||
AddTools,
|
||||
QueryTools,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isShowComponent: "Home",
|
||||
pageContent: "",
|
||||
isEdit: false,
|
||||
editTaskId: "",
|
||||
editId: "",
|
||||
queryId: "",
|
||||
queryTaskId: "",
|
||||
param: {},
|
||||
isView: false,
|
||||
codingTaskId: "",
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
/* 编辑 */
|
||||
addTools(taskId, id,row) {
|
||||
this.isEdit = true;
|
||||
this.pageContent = "审核";
|
||||
this.queryTaskId = taskId;
|
||||
this.queryId = id;
|
||||
this.param = row;
|
||||
this.isShowComponent = "AddTools";
|
||||
},
|
||||
/* 查询 */
|
||||
queryTools(taskId, id, row) {
|
||||
this.isView = true;
|
||||
this.pageContent = "详情信息";
|
||||
this.queryTaskId = taskId;
|
||||
this.queryId = id;
|
||||
this.param = row;
|
||||
this.isShowComponent = "QueryTools";
|
||||
},
|
||||
/* 返回按钮 */
|
||||
goBack() {
|
||||
this.isShowComponent = "Home";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -81,13 +81,13 @@
|
|||
<el-table-column
|
||||
label="类型名称"
|
||||
align="center"
|
||||
prop="specificationType"
|
||||
prop="machineTypeName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="machineTypeName"
|
||||
prop="specificationType"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@
|
|||
align="center"
|
||||
:selectable="selectable"
|
||||
/>
|
||||
<el-table-column width="60" align="center" label="序号" type="index" />
|
||||
<el-table-column width="60" align="center" label="序号" type="index" :index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"/>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
|
|
|
|||
Loading…
Reference in New Issue