lsun 维修管理

This commit is contained in:
lSun 2024-11-14 10:38:52 +08:00
parent 0e8ebc3559
commit 67f2029cd8
4 changed files with 907 additions and 502 deletions

View File

@ -0,0 +1,820 @@
<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="typeId">
<el-select
v-model="queryParams.typeId"
placeholder="请选择状态"
clearable
filterable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.lease_apply_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></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="primary"
plain
icon="el-icon-user-solid"
size="mini"
@click="handleAdd"
>通过
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-close"
size="mini"
@click="handleSendAll"
>驳回
</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" />
<el-table-column
align="center"
width="160"
label="退料单位"
prop="createTime"
:show-overflow-tooltip="true"
/>
<el-table-column
label="工程名称"
width="150"
align="center"
prop="createBy"
:show-overflow-tooltip="true"
/>
<el-table-column
label="维修单号"
align="center"
prop="leaseUnit"
:show-overflow-tooltip="true"
/>
<el-table-column
label="物资类型"
align="center"
prop="leaseProject"
:show-overflow-tooltip="true"
/>
<el-table-column
label="维修班组"
align="center"
prop="leaseType"
width="110px"
:show-overflow-tooltip="true"
/>
<el-table-column
label="提交"
align="center"
prop="agreementCode"
:show-overflow-tooltip="true"
/>
<el-table-column
label="提交时间"
align="center"
prop="code"
width="110px"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
label="状态"
align="center"
prop="status"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.lease_apply_status"
:value="scope.row.status"
/>
</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"
/>
<!-- 验收单弹窗 -->
<el-dialog
:title="title"
:visible.sync="openPrint"
width="1100px"
append-to-body
>
<div style="height: 500px; overflow-y: scroll">
<vue-easy-print tableShow ref="remarksPrintRef" class="print">
<div
class="title"
style="text-align: center; font-weight: 600; font-size: 16px"
>
机具设备到货验收单
</div>
<div
class="info"
style="margin-top: 10px; display: flex; flex-wrap: wrap"
>
<div
class="item"
style="
width: 100%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>单据编号</span>
</div>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>生产厂家供应商</span>
</div>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>到货日期</span>
</div>
</div>
<el-table
:data="printTableData"
class="table"
style="margin-top: 20px; width: 1000px; padding-bottom: 1px"
border
>
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="序号" align="center" type="index" row="2" />
<el-table-column
label="物资名称"
align="center"
prop="machineTypeName"
/>
<el-table-column
label="规格型号"
align="center"
prop="specificationType"
/>
<el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="配送信息" align="center">
<el-table-column
label="到货数量"
align="center"
prop="purchaseNum"
/>
<el-table-column
label="验收结论"
align="center"
prop="purchaseNum"
/>
<el-table-column label="质保质量" align="center">
<el-table-column
label="实收份数"
align="center"
prop="purchaseNum"
/>
<el-table-column
label="符合要求"
align="center"
prop="purchaseNum"
/>
</el-table-column>
</el-table-column>
<el-table-column label="备注" align="center" prop="unitName" />
<!-- <el-table-column-->
<!-- label="合格证及技术资料"-->
<!-- align="center"-->
<!-- prop=""-->
<!-- />-->
<!-- <el-table-column label="包装" align="center" prop="" />-->
</el-table>
<div
class="fillIn"
style="
margin-top: 20px;
display: flex;
justify-content: space-between;
"
>
<div class="item" style="width: 33%">
<div>
<span>供应科</span>
</div>
</div>
<div class="item" style="width: 33%">
<div>
<span>生产技术科</span>
</div>
</div>
<div class="item" style="width: 33%">
<div>
<span>库管班</span>
</div>
</div>
</div>
</vue-easy-print>
</div>
<div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="print"> </el-button>
<el-button @click="openPrint = false"> </el-button>
</div>
</el-dialog>
<!-- 领料单弹窗 -->
<el-dialog :visible.sync="open" width="800px" append-to-body>
<div style="height: 500px; overflow-y: scroll; padding: 0 20px">
<vue-easy-print tableShow ref="remarksPrintRef" class="print">
<div
class="title"
style="text-align: center; font-weight: 600; font-size: 16px"
>
领料单
</div>
<div
class="info"
style="margin-top: 10px; display: flex; flex-wrap: wrap"
>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>领料单位</span>
{{ leaseApplyData.leaseUnit }}
</div>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>工程名称</span>
{{ leaseApplyData.leaseProject }}
</div>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>时间</span>
{{ leaseApplyData.createTime }}
</div>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>编号</span>
{{ leaseApplyData.code }}
</div>
</div>
<el-table
:data="leaseApplyDetails"
class="table"
border
style="margin-top: 20px; padding: 1px"
>
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="类型名称" align="center" prop="typeName" />
<!-- <el-table-column type="expand">
<template slot-scope="scope">
<div class="nested-table-container">
<el-table :data="scope.row.maTypeDetails" style="width: 100%">
&lt;!&ndash; 子表格的列 &ndash;&gt;
<el-table-column label="序号" align="center" type="index"/>
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column
label="规格型号"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="单位"
align="center"
prop="unitName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="预领数量"
align="center"
prop="preNum"
:show-overflow-tooltip="true"
/>
</el-table>
</div>
</template>
</el-table-column>-->
<el-table-column label="规格型号" align="center" prop="typeName" />
<el-table-column label="计量单位" align="center" prop="unitName" />
<el-table-column label="预领数量" align="center" prop="preNum" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column
label="出库方式"
align="center"
prop="manageTypeName"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.ma_type_manage_type"
:value="scope.row.manageType"
/>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- label="出库方式"-->
<!-- align="center"-->
<!-- prop="manageTypeName"-->
<!-- />-->
</el-table>
<div
class="fillIn"
style="
margin-top: 30px;
display: flex;
justify-content: space-between;
"
>
<div class="item" style="width: 25%">
<span>审核</span>
</div>
<div class="item" style="width: 25%">
<span>领料</span>
</div>
<div class="item" style="width: 25%">
<span>仓库</span>
</div>
<div class="item" style="width: 25%">
<span>操作人</span>
</div>
</div>
</vue-easy-print>
</div>
<div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="print"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
// getListLeaseApply,
// getPurchaseCheckInfo,
// getAcceptanceForm,
// purchaseCheckInfoRemove,
// queryStatusDataApi,
// getApplyInfo,
// applyRemove,
// applySend,
// applySendAll,
} from "@/api/repair/testExamine";
import vueEasyPrint from "vue-easy-print";
export default {
name: "Home",
dicts: ["lease_apply_status", "ma_type_manage_type"],
// components: { vueEasyPrint },
data() {
return {
//
loading: true,
loadingTwo: true,
updateTime: "",
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
showPeople: false,
peopleOpen: false,
//
total: 0,
totalTwo: 0,
//
typesList: [],
modelList: [],
//
typeList: [],
getListPeople: [],
configUserList: [],
phoneNumbers: [],
//
chosenUserList: [],
userList: [],
//
title: "",
//
dateRange: [],
statusDataRange: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
time: null, //
name: undefined,
typeId: "",
keyWord: "",
},
form: {
remark: "",
},
//
rules: {
remark: [
{ required: true, message: "通知内容不能为空", trigger: "blur" },
],
},
openPrint: false,
open: false,
printData: {},
printTableData: [],
//
supplierStr: "",
//
leaseApplyDetails: [],
//
leaseApplyData: {},
sendTemp: [],
};
},
created() {
// this.getStatusList();
this.getList();
// this.getTypeList()
},
components: { vueEasyPrint },
methods: {
// getTypeList() {
// getTypeList({ level: '3' }).then((response) => {
// this.typesList = response.data
// })
// getTypeList({ level: '4' }).then((response) => {
// this.modelList = response.data
// })
// },
//
handleSelectionChange(selection) {
this.sendTemp = [];
this.ids = selection.map((item) => item.id);
selection.forEach((item) => {
this.sendTemp.push({ id: item.id, taskId: item.taskId });
});
this.single = selection.length != 1;
this.multiple = !selection.length;
},
//
selectable(row) {
if (row.status == "1") {
return false;
} else {
return true;
}
},
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],
typeId: this.queryParams.typeId,
pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum,
};
getListLeaseApply(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();
},
/** 新增按钮操作 */
handleAdd() {
this.$emit("addTools");
},
/** 查看按钮操作 */
handleView(row) {
this.$emit("queryTools", row.taskId, row.id);
},
/** 修改按钮操作 */
handleUpdate(row) {
this.$emit("editTools", row.taskId, row.id);
},
//----
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/lease_apply_info/export",
{ ...this.queryParams },
`领料申请_${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>

View File

@ -0,0 +1,87 @@
<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"
:isView="isView"
:codingTaskId="codingTaskId"
@addTools="addTools"
@editTools="editTools"
@addToolsSuccess="addToolsSuccess"
@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: "",
isView: false,
codingTaskId: "",
};
},
methods: {
/* 新增工机具 */
addTools() {
this.isEdit = false;
this.editTaskId = "";
this.queryTaskId = "";
this.pageContent = "领料申请";
this.isShowComponent = "AddTools";
},
/* 新增成功 */
addToolsSuccess() {
this.isShowComponent = "Home";
},
/* 编辑工机具 */
editTools(taskId, id) {
this.isEdit = true;
this.pageContent = "领料编辑";
this.editTaskId = taskId;
this.editId = id;
this.isShowComponent = "AddTools";
},
/* 查询工机具 */
queryTools(taskId, id) {
this.isView = true;
this.pageContent = "详情信息";
this.queryTaskId = taskId;
this.queryId = id;
this.isShowComponent = "QueryTools";
},
/* 返回按钮 */
goBack() {
this.isShowComponent = "Home";
},
},
};
</script>

View File

@ -1,502 +0,0 @@
<template>
<div class="app-container" id="testExamine">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="100px"
>
<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="任务创建时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</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="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="checkClick"-->
<!-- >通过</el-button-->
<!-- >-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="checkClick"-->
<!-- >驳回</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"
@selection-change="handleSelectionChange"
border
>
<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>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column
label="修试审核单号"
align="center"
prop="scrapNum"
show-overflow-tooltip
/>
<el-table-column
label="单位名称"
align="center"
prop="unitName"
show-overflow-tooltip
/>
<el-table-column
label="工程名称"
align="center"
prop="projectName"
show-overflow-tooltip
/>
<el-table-column
label="机具类型"
align="center"
prop="itemType"
show-overflow-tooltip
/>
<el-table-column
label="任务创建人"
align="center"
prop="createBy"
show-overflow-tooltip
/>
<el-table-column
label="任务创建时间"
align="center"
prop="createTime"
show-overflow-tooltip
/>
<el-table-column
label="维修单号"
align="center"
prop="repairNum"
show-overflow-tooltip
/>
<el-table-column
label="审核状态"
align="center"
prop="taskStatusName"
show-overflow-tooltip
/>
<el-table-column
label="不通过原因"
align="center"
prop="remark"
show-overflow-tooltip
/>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-zoom-in"
@click="handleSee(scope.row, 'see')"
>查看</el-button
>
<!-- -->
<el-button
size="mini"
type="text"
icon="el-icon-circle-check"
:disabled="scope.row.taskStatus !== 46"
@click="handleUpdate(scope.row, 'update')"
>审核</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 {
getQuestListApi,
getRepairAuditListApi,
addDetailsAuditApi,
getRepairRecord,
getPartRecord,
} from '@/api/repairTest/testExamine'
export default {
name: 'TestExamine',
dicts: ['sys_normal_disable'],
data() {
return {
checkResultOne: false,
selectionList: [],
dialogList: [],
rowObj: {},
openOne: false,
openTwo: false,
openFour: false,
openTextOne: '',
openTextTwo: '',
openTextThree: '',
type: '',
//
loading: false,
//
ids: [],
dialogIds: [],
//
single: true,
//
multiple: true,
//
dialogSingle: true,
//
dialogMultiple: true,
//
showSearch: true,
//
total: 0,
dialogTotal: 0,
//
typeList: [],
//
title: '',
dialogTitle: '',
//
open: false,
//
dateRange: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
keyword: '',
backUnit: '',
backPro: '',
type: '',
backCode: '',
taskStatus: '',
},
dialogQueryParams: {
pageNum: 1,
pageSize: 10,
},
//
form: {},
//
rules: {
remark: [
{
required: true,
message: '原因不能为空',
trigger: 'blur',
},
],
},
repairId: '',
openRepairRecord: false,
repairRecordList: [],
repairRecordParams: {
pageNum: 1,
pageSize: 10,
},
repairRecordTotal: 0,
openPartRecord: false,
partRecordList: [],
partRecordParams: {
pageNum: 1,
pageSize: 10,
},
partRecordTotal: 0,
}
},
created() {
this.getList()
},
methods: {
/** 查询字典类型列表 */
getList() {
this.loading = true
getQuestListApi(
this.addDateRange(this.queryParams, this.dateRange),
).then((response) => {
this.typeList = response.rows
this.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
dictId: undefined,
dictName: undefined,
dictType: undefined,
status: '0',
remark: undefined,
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = []
this.queryParams.backUnit = ''
this.queryParams.backPro = ''
this.resetForm('queryForm')
this.$refs.mychildSon.inputValue = ''
this.queryParams.type = ''
this.handleQuery()
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '新建'
},
selectable(row) {
if (row.taskStatus == 46) {
return true
} else {
return false
}
},
//
handleSelectionChange(selection) {
this.selectionList = selection
this.checkResultOne = selection.every(
(item) => item.taskStatus == 46,
)
this.ids = selection.map((item) => item.dictId)
this.single = selection.length != 1
this.multiple = !selection.length
// console.log(this.checkResultOne)
console.log(this.checkResultOne)
},
handleSee(row, type) {
this.dialogTitle = '查看'
this.rowObj = row
this.reset()
this.type = type
this.getdialogList()
},
/** 修改按钮操作 */
handleUpdate(row, type) {
this.dialogTitle = '审核'
this.rowObj = row
this.reset()
this.type = type
this.getdialogList()
},
/** 提交按钮 */
submitForm(val) {
// val 1 2
this.checkResult = val
this.openOne = true
this.openFour = false
this.openTextOne = '确定审批通过么?'
this.openTextTwo = '确定审批通过么?'
},
submitOpenOneForm() {
this.openOne = false
this.open = false
// val 1 2
if (this.checkResult == 1) {
let taskIdList = []
taskIdList.push(this.rowObj.taskId)
let params = {
checkResult: '通过',
taskIdList: taskIdList,
auditDetailList: this.dialogIds,
}
// console.log(params)
addDetailsAuditApi(params)
.then((res) => {
this.openTwo = true
this.open = false
this.openTextThree = '审批通过!'
this.getList()
})
.catch(() => {})
}
if (this.checkResult == 2) {
let taskIdList = []
this.selectionList.map((item) => {
taskIdList.push(item.taskId)
})
let params = {
checkResult: '通过',
taskIdList: taskIdList,
}
addDetailsAuditApi(params)
.then((res) => {
this.openTwo = true
this.openTextThree = '审批通过!'
this.getList()
})
.catch(() => {})
}
},
/** 导出按钮操作 */
handleExport() {
this.download(
'material/details/export',
{
...this.queryParams,
},
`试验检验单_${new Date().getTime()}.xlsx`,
)
},
},
}
</script>
<style lang="scss" scoped>
.submit_box {
display: flex;
justify-content: flex-start;
align-items: center;
.submit_box_title {
display: flex;
flex-direction: column;
margin-left: 15px;
:first-child {
font-size: 14px;
font-weight: 600;
}
:last-child {
margin-top: 6px;
font-size: 12px;
}
}
}
.submit_box_two {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
margin-left: 40%;
.submit_box_title {
display: flex;
flex-direction: column;
margin-left: 10px;
font-size: 18px;
font-weight: 600;
}
}
::v-deep.el-table .fixed-width .el-button--mini {
width: 70px !important;
margin-bottom: 6px;
}
.dialog-footer-btn {
display: flex;
align-items: center;
justify-content: flex-end;
}
.submit_box_openFour {
display: flex;
justify-content: center;
align-content: center;
font-size: 18px;
}
</style>