验收管理模式
This commit is contained in:
parent
f6bad9b43d
commit
499dd3fe78
|
|
@ -1,8 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
<el-form
|
||||||
<el-form-item label="类型规格:" prop="typeId" >
|
:model="queryParams"
|
||||||
<el-select v-model="queryParams.typeId" placeholder="请选择类型规格" clearable>
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="90px"
|
||||||
|
>
|
||||||
|
<el-form-item label="类型规格:" prop="typeId">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.typeId"
|
||||||
|
placeholder="请选择类型规格"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in materialModelList"
|
v-for="dict in materialModelList"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
|
|
@ -26,14 +37,22 @@
|
||||||
v-model="queryParams.productionTime"
|
v-model="queryParams.productionTime"
|
||||||
placeholder="请选择出厂日期"
|
placeholder="请选择出厂日期"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
type="datetime">
|
type="datetime"
|
||||||
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
<el-button
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
|
@ -48,50 +67,140 @@
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="success" @click="batchPass"
|
type="success"
|
||||||
icon="el-icon-check" v-show="!isView"
|
@click="batchPass"
|
||||||
size="mini" :disabled="multiple"
|
icon="el-icon-check"
|
||||||
>合格</el-button>
|
v-show="!isView"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
>合格</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="danger" @click="batchReject"
|
type="danger"
|
||||||
icon="el-icon-close" v-show="!isView"
|
@click="batchReject"
|
||||||
size="mini" :disabled="multiple"
|
icon="el-icon-close"
|
||||||
>不合格</el-button>
|
v-show="!isView"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
>不合格</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="typeId" @selection-change="handleSelectionChange">
|
<el-table
|
||||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" v-if="!isView"/>
|
v-loading="loading"
|
||||||
|
:data="tableList"
|
||||||
|
ref="multipleTable"
|
||||||
|
row-key="typeId"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="55"
|
||||||
|
align="center"
|
||||||
|
:reserve-selection="true"
|
||||||
|
v-if="!isView"
|
||||||
|
/>
|
||||||
<el-table-column label="序号" align="center" width="80" type="index">
|
<el-table-column label="序号" align="center" width="80" type="index">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="物资名称" align="center" prop="maTypeName" :show-overflow-tooltip="true"/>
|
<el-table-column
|
||||||
<el-table-column label="规格型号" align="center" prop="typeName" :show-overflow-tooltip="true"/>
|
label="物资名称"
|
||||||
<el-table-column label="单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
|
align="center"
|
||||||
<el-table-column label="采购数量" align="center" prop="purchaseNum" :show-overflow-tooltip="true"/>
|
prop="maTypeName"
|
||||||
<el-table-column label="购置单价(元含税)" align="center" prop="purchaseTaxPrice" :show-overflow-tooltip="true"/>
|
:show-overflow-tooltip="true"
|
||||||
<el-table-column label="购置单价(元不含税)" align="center" prop="purchasePrice" :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="purchaseNum"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="购置单价(元含税)"
|
||||||
|
align="center"
|
||||||
|
prop="purchaseTaxPrice"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="购置单价(元不含税)"
|
||||||
|
align="center"
|
||||||
|
prop="purchasePrice"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
<!-- <el-table-column label="供应商" align="center" prop="supplierName" /> -->
|
<!-- <el-table-column label="供应商" align="center" prop="supplierName" /> -->
|
||||||
<el-table-column label="是否未固定资产" align="center" prop="fixCodeStr" :show-overflow-tooltip="true"/>
|
<el-table-column
|
||||||
<el-table-column label="出厂日期" align="center" prop="productionTime" :show-overflow-tooltip="true"/>
|
label="是否未固定资产"
|
||||||
<el-table-column label="相关配套资料" align="center" prop="" :show-overflow-tooltip="true">
|
align="center"
|
||||||
|
prop="fixCodeStr"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="出厂日期"
|
||||||
|
align="center"
|
||||||
|
prop="productionTime"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="相关配套资料"
|
||||||
|
align="center"
|
||||||
|
prop=""
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div style="color: rgb(2, 167, 240);cursor: pointer;" @click="openFileDialog(scope.row)">报告管理</div>
|
<div
|
||||||
|
style="color: rgb(2, 167, 240); cursor: pointer"
|
||||||
|
@click="openFileDialog(scope.row)"
|
||||||
|
>
|
||||||
|
报告管理
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
|
<el-table-column
|
||||||
|
label="状态"
|
||||||
|
align="center"
|
||||||
|
prop="status"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.purchase_task_status" :value="scope.row.status"/>
|
<dict-tag
|
||||||
|
:options="dict.type.purchase_task_status"
|
||||||
|
:value="scope.row.status"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="验收结论" align="center" prop="checkResult" :show-overflow-tooltip="true"/>
|
<el-table-column
|
||||||
|
label="验收结论"
|
||||||
|
align="center"
|
||||||
|
prop="checkResult"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
<el-table-column label="操作" align="center" width="180">
|
<el-table-column label="操作" align="center" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="success" @click="pass(scope.row)">
|
<el-button size="mini" type="success" @click="pass(scope.row)">
|
||||||
|
|
@ -112,26 +221,60 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/> -->
|
/> -->
|
||||||
|
|
||||||
<el-dialog title="报告管理" :visible.sync="open" width="900px" append-to-body>
|
<el-dialog
|
||||||
<el-table v-loading="dialogLoading" :data="fileDataList" width="100%" height="350px">
|
title="报告管理"
|
||||||
<el-table-column label="序号" type="index" width="55" align="center"/>
|
:visible.sync="open"
|
||||||
<el-table-column label="报告类型" align="center" prop="dictLabel" :show-overflow-tooltip="true"/>
|
width="900px"
|
||||||
<el-table-column label="文件名称" align="center" prop="name" :show-overflow-tooltip="true"/>
|
append-to-body
|
||||||
<el-table-column label="类型名称" align="center" :show-overflow-tooltip="true">
|
>
|
||||||
|
<el-table
|
||||||
|
v-loading="dialogLoading"
|
||||||
|
:data="fileDataList"
|
||||||
|
width="100%"
|
||||||
|
height="350px"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" type="index" width="55" align="center" />
|
||||||
|
<el-table-column
|
||||||
|
label="报告类型"
|
||||||
|
align="center"
|
||||||
|
prop="dictLabel"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="文件名称"
|
||||||
|
align="center"
|
||||||
|
prop="name"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="类型名称"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
<template>
|
<template>
|
||||||
<div>{{this.rowData.maTypeName}}</div>
|
<div>{{ this.rowData.maTypeName }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="规格型号" align="center" :show-overflow-tooltip="true">
|
<el-table-column
|
||||||
|
label="规格型号"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
<template>
|
<template>
|
||||||
<div>{{this.rowData.typeName}}</div>
|
<div>{{ this.rowData.typeName }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="报告日期" align="center" prop="orgName" :show-overflow-tooltip="true"/>
|
<!-- <el-table-column label="报告日期" align="center" prop="orgName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="截止有效期" align="center" prop="orgName" :show-overflow-tooltip="true"/> -->
|
<el-table-column label="截止有效期" align="center" prop="orgName" :show-overflow-tooltip="true"/> -->
|
||||||
<el-table-column label="操作" align="center" width="100">
|
<el-table-column label="操作" align="center" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div style="display: flex;align-items: center;justify-content: center;">
|
<div
|
||||||
|
style="
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
"
|
||||||
|
>
|
||||||
<!-- <el-upload ref="upload" :limit="1" :headers="upload.headers" v-show="!isView"
|
<!-- <el-upload ref="upload" :limit="1" :headers="upload.headers" v-show="!isView"
|
||||||
:action="upload.url" :show-file-list="false" accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
:action="upload.url" :show-file-list="false" accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
||||||
:on-success="handleFileSuccess" :auto-upload="true"
|
:on-success="handleFileSuccess" :auto-upload="true"
|
||||||
|
|
@ -141,50 +284,73 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-upload> -->
|
</el-upload> -->
|
||||||
|
|
||||||
<el-button size="mini" type="text" @click="picturePreview(scope.row)" v-if="scope.row.url" style="margin-left: 10px;">
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="picturePreview(scope.row)"
|
||||||
|
v-if="scope.row.url"
|
||||||
|
style="margin-left: 10px"
|
||||||
|
>
|
||||||
查看
|
查看
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 图片查看弹窗 -->
|
<!-- 图片查看弹窗 -->
|
||||||
<el-dialog :visible.sync="dialogVisible" width="500px" height="500px" >
|
<el-dialog :visible.sync="dialogVisible" width="500px" height="500px">
|
||||||
<img width="100%" height="500px" :src="dialogImageUrl" />
|
<img width="100%" height="500px" :src="dialogImageUrl" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 验收弹窗 -->
|
<!-- 验收弹窗 -->
|
||||||
<el-dialog :visible.sync="confirmShow" width="500px" height="300px" >
|
<el-dialog :visible.sync="confirmShow" width="500px" height="300px">
|
||||||
<div style="width: 100%;height: 80%;display: flex;">
|
<div style="width: 100%; height: 80%; display: flex">
|
||||||
<div>验收结论</div>
|
<div>验收结论</div>
|
||||||
<el-input type="textarea" :rows="2" placeholder="请输入结论" v-model="checkResult" maxlength="100">
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
:rows="2"
|
||||||
|
placeholder="请输入结论"
|
||||||
|
v-model="checkResult"
|
||||||
|
maxlength="100"
|
||||||
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 100%;height: 20%;display: flex;justify-content: flex-end;align-items: center;">
|
<div
|
||||||
|
style="
|
||||||
|
width: 100%;
|
||||||
|
height: 20%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
|
"
|
||||||
|
>
|
||||||
<el-button type="primary" @click="confirmCheck">确认</el-button>
|
<el-button type="primary" @click="confirmCheck">确认</el-button>
|
||||||
<el-button size="mini" @click="confirmShow=false">取消</el-button>
|
<el-button size="mini" @click="confirmShow = false">取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getDeviceType} from "@/api/ma/device";
|
import { getDeviceType } from "@/api/ma/device";
|
||||||
import { getManufacturerSelect} from "@/api/ma/supplier";
|
import { getManufacturerSelect } from "@/api/ma/supplier";
|
||||||
import { getPurchaseDetailsList,acceptInnerVerifyer,getPurchaseFileList,uploadPurchaseFile } from "@/api/purchase/goodsAccept";
|
import {
|
||||||
import { downloadFile } from '@/utils/download'
|
getPurchaseDetailsList,
|
||||||
import { getToken } from '@/utils/auth'
|
acceptInnerVerifyer,
|
||||||
export default {
|
getPurchaseFileList,
|
||||||
|
uploadPurchaseFile,
|
||||||
|
} from "@/api/purchase/goodsAccept";
|
||||||
|
import { downloadFile } from "@/utils/download";
|
||||||
|
import { getToken } from "@/utils/auth";
|
||||||
|
export default {
|
||||||
name: "GoodsAcceptDetail",
|
name: "GoodsAcceptDetail",
|
||||||
dicts: ['purchase_task_status'],
|
dicts: ["purchase_task_status"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
Id:'',
|
Id: "",
|
||||||
taskId:'',
|
taskId: "",
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: false,
|
loading: false,
|
||||||
dialogLoading: false,
|
dialogLoading: false,
|
||||||
|
|
@ -196,76 +362,75 @@
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
showHouse: false,
|
showHouse: false,
|
||||||
materialModelList:[],//规格型号下拉
|
materialModelList: [], //规格型号下拉
|
||||||
supplierList:[],//厂家下拉
|
supplierList: [], //厂家下拉
|
||||||
ids:[],
|
ids: [],
|
||||||
checkList:[],
|
checkList: [],
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
//表格数据
|
//表格数据
|
||||||
tableList: [],
|
tableList: [],
|
||||||
fixCodeList:["否","是"],
|
fixCodeList: ["否", "是"],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
rowData:{},
|
rowData: {},
|
||||||
fileDataList: [
|
fileDataList: [
|
||||||
{dictLabel:"合格证",fileType:"0",name:"",url:""},
|
{ dictLabel: "合格证", fileType: "0", name: "", url: "" },
|
||||||
{dictLabel:"型式试验报告",fileType:"1",name:"",url:""},
|
{ dictLabel: "型式试验报告", fileType: "1", name: "", url: "" },
|
||||||
{dictLabel:"出厂检测报告",fileType:"2",name:"",url:""},
|
{ dictLabel: "出厂检测报告", fileType: "2", name: "", url: "" },
|
||||||
{dictLabel:"第三方监测报告",fileType:"3",name:"",url:""},
|
{ dictLabel: "第三方监测报告", fileType: "3", name: "", url: "" },
|
||||||
{dictLabel:"其他报告",fileType:"4",name:"",url:""},
|
{ dictLabel: "其他报告", fileType: "4", name: "", url: "" },
|
||||||
],
|
],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
// pageNum: 1,
|
// pageNum: 1,
|
||||||
// pageSize: 10,
|
// pageSize: 10,
|
||||||
typeId:undefined,
|
typeId: undefined,
|
||||||
supplierId:undefined,
|
supplierId: undefined,
|
||||||
productionTime:undefined,
|
productionTime: undefined,
|
||||||
},
|
},
|
||||||
//确认弹窗
|
//确认弹窗
|
||||||
confirmShow: false,
|
confirmShow: false,
|
||||||
taskStatus:"",//3合格、1不合格
|
taskStatus: "", //3合格、1不合格
|
||||||
checkResult:"",
|
checkResult: "",
|
||||||
//图片查看弹窗
|
//图片查看弹窗
|
||||||
dialogImageUrl: '',
|
dialogImageUrl: "",
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
//上传
|
//上传
|
||||||
upload: {
|
upload: {
|
||||||
// 设置上传的请求头部
|
// 设置上传的请求头部
|
||||||
headers: { Authorization: 'Bearer ' + getToken() },
|
headers: { Authorization: "Bearer " + getToken() },
|
||||||
// 上传的地址
|
// 上传的地址
|
||||||
url: process.env.VUE_APP_BASE_API + '/file/upload'
|
url: process.env.VUE_APP_BASE_API + "/file/upload",
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const taskId = this.$route.query && this.$route.query.taskId
|
const taskId = this.$route.query && this.$route.query.taskId;
|
||||||
const Id = this.$route.query && this.$route.query.Id
|
const Id = this.$route.query && this.$route.query.Id;
|
||||||
const isView = this.$route.query && this.$route.query.isView
|
const isView = this.$route.query && this.$route.query.isView;
|
||||||
this.taskId = taskId;
|
this.taskId = taskId;
|
||||||
this.Id = Id;
|
this.Id = Id;
|
||||||
if(isView=='true'){
|
if (isView == "true") {
|
||||||
this.isView=true;
|
this.isView = true;
|
||||||
}else{
|
} else {
|
||||||
this.isView=false;
|
this.isView = false;
|
||||||
}
|
}
|
||||||
this.getDeviceType()
|
this.getDeviceType();
|
||||||
// this.getSupplierList()
|
// this.getSupplierList()
|
||||||
console.log(this.isView)
|
console.log(this.isView);
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 返回列表页
|
// 返回列表页
|
||||||
jumpList() {
|
jumpList() {
|
||||||
const obj = { path: '/purchase/goodsAccept' }
|
const obj = { path: "/purchase/goodsAccept" };
|
||||||
this.$tab.closeOpenPage(obj)
|
this.$tab.closeOpenPage(obj);
|
||||||
},
|
},
|
||||||
getDeviceType(){
|
getDeviceType() {
|
||||||
getDeviceType({level:4,skipPermission:1}).then(response => {
|
getDeviceType({ level: 4, skipPermission: 1 }).then((response) => {
|
||||||
let matModelRes = response.data;
|
let matModelRes = response.data;
|
||||||
this.materialModelList = matModelRes.map((item) => {
|
this.materialModelList = matModelRes.map((item) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -275,8 +440,8 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getSupplierList(){
|
getSupplierList() {
|
||||||
getManufacturerSelect().then(response => {
|
getManufacturerSelect().then((response) => {
|
||||||
let arrRes = response.rows;
|
let arrRes = response.rows;
|
||||||
this.supplierList = arrRes.map((item) => {
|
this.supplierList = arrRes.map((item) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -289,15 +454,15 @@
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.queryParams.id=this.Id
|
this.queryParams.id = this.Id;
|
||||||
this.queryParams.taskId=this.taskId
|
this.queryParams.taskId = this.taskId;
|
||||||
this.queryParams.taskStatus=2
|
this.queryParams.taskStatus = 2;
|
||||||
this.queryParams.statusList=[2,12]
|
this.queryParams.statusList = [2, 12];
|
||||||
getPurchaseDetailsList(this.queryParams).then(response => {
|
getPurchaseDetailsList(this.queryParams).then((response) => {
|
||||||
this.tableList = response.data.purchaseCheckDetailsList;
|
this.tableList = response.data.purchaseCheckDetailsList;
|
||||||
this.tableList.forEach((item) => {
|
this.tableList.forEach((item) => {
|
||||||
item.fixCodeStr = this.fixCodeList[Number(item.fixCode)]
|
item.fixCodeStr = this.fixCodeList[Number(item.fixCode)];
|
||||||
})
|
});
|
||||||
// this.total = response.total;
|
// this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
|
@ -305,7 +470,7 @@
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.queryParams.keyWord=null;
|
this.queryParams.keyWord = null;
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
|
|
@ -315,179 +480,191 @@
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection
|
this.ids = selection;
|
||||||
this.single = selection.length != 1
|
this.single = selection.length != 1;
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
//合格
|
//合格
|
||||||
pass(row){
|
pass(row) {
|
||||||
this.taskStatus='3';
|
this.taskStatus = "3";
|
||||||
this.checkResult="合格";
|
this.checkResult = "合格";
|
||||||
let obj = {
|
let obj = {
|
||||||
taskId:row.taskId,
|
taskId: row.taskId,
|
||||||
typeId:row.typeId,
|
typeId: row.typeId,
|
||||||
status:this.taskStatus,
|
status: this.taskStatus,
|
||||||
checkResult:this.checkResult
|
checkResult: this.checkResult,
|
||||||
}
|
};
|
||||||
this.checkList=[]
|
this.checkList = [];
|
||||||
this.checkList.push(obj)
|
this.checkList.push(obj);
|
||||||
this.confirmShow=true;
|
this.confirmShow = true;
|
||||||
},
|
},
|
||||||
//不合格
|
//不合格
|
||||||
reject(row){
|
reject(row) {
|
||||||
this.taskStatus='1';
|
this.taskStatus = "1";
|
||||||
this.checkResult="不合格";
|
this.checkResult = "不合格";
|
||||||
let obj = {
|
let obj = {
|
||||||
taskId:row.taskId,
|
taskId: row.taskId,
|
||||||
typeId:row.typeId,
|
typeId: row.typeId,
|
||||||
status:this.taskStatus,
|
status: this.taskStatus,
|
||||||
checkResult:this.checkResult
|
checkResult: this.checkResult,
|
||||||
}
|
};
|
||||||
this.checkList=[]
|
this.checkList = [];
|
||||||
this.checkList.push(obj)
|
this.checkList.push(obj);
|
||||||
this.confirmShow=true;
|
this.confirmShow = true;
|
||||||
},
|
},
|
||||||
//批量合格
|
//批量合格
|
||||||
batchPass(){
|
batchPass() {
|
||||||
this.taskStatus='3';
|
this.taskStatus = "3";
|
||||||
this.checkResult="合格";
|
this.checkResult = "合格";
|
||||||
this.checkList=[]
|
this.checkList = [];
|
||||||
this.checkList=this.ids.map(item=>{
|
this.checkList = this.ids.map((item) => {
|
||||||
let obj = {
|
let obj = {
|
||||||
taskId:item.taskId,
|
taskId: item.taskId,
|
||||||
typeId:item.typeId,
|
typeId: item.typeId,
|
||||||
status:this.taskStatus,
|
status: this.taskStatus,
|
||||||
checkResult:this.checkResult
|
checkResult: this.checkResult,
|
||||||
}
|
managerType: item.managerType,
|
||||||
return obj
|
};
|
||||||
})
|
return obj;
|
||||||
this.confirmShow=true;
|
});
|
||||||
|
this.confirmShow = true;
|
||||||
},
|
},
|
||||||
//批量不合格
|
//批量不合格
|
||||||
batchReject(){
|
batchReject() {
|
||||||
this.taskStatus='1';
|
this.taskStatus = "1";
|
||||||
this.checkResult="不合格";
|
this.checkResult = "不合格";
|
||||||
this.checkList=[]
|
this.checkList = [];
|
||||||
this.checkList=this.ids.map(item=>{
|
this.checkList = this.ids.map((item) => {
|
||||||
let obj = {
|
let obj = {
|
||||||
taskId:item.taskId,
|
taskId: item.taskId,
|
||||||
typeId:item.typeId,
|
typeId: item.typeId,
|
||||||
status:this.taskStatus,
|
status: this.taskStatus,
|
||||||
checkResult:this.checkResult
|
checkResult: this.checkResult,
|
||||||
}
|
managerType: item.checkList,
|
||||||
return obj
|
};
|
||||||
})
|
return obj;
|
||||||
this.confirmShow=true;
|
});
|
||||||
|
this.confirmShow = true;
|
||||||
},
|
},
|
||||||
//验收确认请求
|
//验收确认请求
|
||||||
confirmCheck(){
|
confirmCheck() {
|
||||||
this.checkList.forEach(item=>{
|
this.checkList.forEach((item) => {
|
||||||
item.checkResult=this.checkResult
|
item.checkResult = this.checkResult;
|
||||||
})
|
});
|
||||||
console.log(this.checkList)
|
console.log(this.checkList);
|
||||||
acceptInnerVerifyer(this.checkList).then(response => {
|
acceptInnerVerifyer(this.checkList).then((response) => {
|
||||||
if(response.code==200){
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess('验收成功')
|
this.$modal.msgSuccess("验收成功");
|
||||||
this.confirmShow=false;
|
this.confirmShow = false;
|
||||||
this.getList()
|
this.getList();
|
||||||
this.$refs.multipleTable.clearSelection()
|
this.$refs.multipleTable.clearSelection();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//文件管理
|
//文件管理
|
||||||
openFileDialog(row){
|
openFileDialog(row) {
|
||||||
this.rowData=row;
|
this.rowData = row;
|
||||||
this.fileDataList = [{dictLabel:"合格证",fileType:"0",name:"",url:""},
|
this.fileDataList = [
|
||||||
{dictLabel:"型式试验报告",fileType:"1",name:"",url:""},
|
{ dictLabel: "合格证", fileType: "0", name: "", url: "" },
|
||||||
{dictLabel:"出厂检测报告",fileType:"2",name:"",url:""},
|
{ dictLabel: "型式试验报告", fileType: "1", name: "", url: "" },
|
||||||
{dictLabel:"第三方监测报告",fileType:"3",name:"",url:""},
|
{ dictLabel: "出厂检测报告", fileType: "2", name: "", url: "" },
|
||||||
{dictLabel:"其他报告",fileType:"4",name:"",url:""}]
|
{ dictLabel: "第三方监测报告", fileType: "3", name: "", url: "" },
|
||||||
this.getFileData()
|
{ dictLabel: "其他报告", fileType: "4", name: "", url: "" },
|
||||||
this.open=true
|
];
|
||||||
|
this.getFileData();
|
||||||
|
this.open = true;
|
||||||
},
|
},
|
||||||
//获取已上传文件
|
//获取已上传文件
|
||||||
getFileData(){
|
getFileData() {
|
||||||
let param = {
|
let param = {
|
||||||
modelId:this.rowData.typeId,
|
modelId: this.rowData.typeId,
|
||||||
taskType:0,
|
taskType: 0,
|
||||||
taskId:this.rowData.taskId
|
taskId: this.rowData.taskId,
|
||||||
|
};
|
||||||
|
getPurchaseFileList(param)
|
||||||
|
.then((response) => {
|
||||||
|
if (response.rows.length > 0) {
|
||||||
|
response.rows.forEach((item) => {
|
||||||
|
let index = this.fileDataList.findIndex(
|
||||||
|
(v) => v.fileType == item.fileType
|
||||||
|
);
|
||||||
|
this.fileDataList[index].name = item.name;
|
||||||
|
this.fileDataList[index].url = item.url;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
getPurchaseFileList(param).then((response) => {
|
|
||||||
if(response.rows.length>0){
|
|
||||||
response.rows.forEach(item=>{
|
|
||||||
let index = this.fileDataList.findIndex(v=>v.fileType==item.fileType)
|
|
||||||
this.fileDataList[index].name = item.name
|
|
||||||
this.fileDataList[index].url = item.url
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
//上传
|
//上传
|
||||||
beforeFileUpload(row){
|
beforeFileUpload(row) {
|
||||||
this.rowData.fileType=row.fileType;
|
this.rowData.fileType = row.fileType;
|
||||||
// this.rowData.dictLabel=row.dictLabel;
|
// this.rowData.dictLabel=row.dictLabel;
|
||||||
},
|
},
|
||||||
// 文件上传成功处理
|
// 文件上传成功处理
|
||||||
handleFileSuccess(response, file, fileList) {
|
handleFileSuccess(response, file, fileList) {
|
||||||
if(response.code==200){
|
if (response.code == 200) {
|
||||||
let param = {
|
let param = {
|
||||||
"taskId": this.taskId,
|
taskId: this.taskId,
|
||||||
"taskType": "0",
|
taskType: "0",
|
||||||
"name": response.data.name,
|
name: response.data.name,
|
||||||
"url": response.data.url,
|
url: response.data.url,
|
||||||
"modelId": this.rowData.typeId,
|
modelId: this.rowData.typeId,
|
||||||
"fileType": this.rowData.fileType,
|
fileType: this.rowData.fileType,
|
||||||
}
|
};
|
||||||
console.log(param)
|
console.log(param);
|
||||||
uploadPurchaseFile(param).then((response) => {
|
uploadPurchaseFile(param)
|
||||||
this.$modal.msgSuccess('上传成功')
|
.then((response) => {
|
||||||
this.getFileData()
|
this.$modal.msgSuccess("上传成功");
|
||||||
}).catch(() => {
|
this.getFileData();
|
||||||
this.$modal.msgError('上传失败')
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$modal.msgError("上传失败");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//图片查看
|
//图片查看
|
||||||
picturePreview(file) {
|
picturePreview(file) {
|
||||||
this.dialogImageUrl = file.url;
|
this.dialogImageUrl = file.url;
|
||||||
const parts = file.name.split('.');
|
const parts = file.name.split(".");
|
||||||
const extension = parts.pop();
|
const extension = parts.pop();
|
||||||
if(extension === 'doc'||extension === 'docx'||extension === 'pdf'){
|
if (extension === "doc" || extension === "docx" || extension === "pdf") {
|
||||||
const windowName = file.name;
|
const windowName = file.name;
|
||||||
window.open(file.url,windowName)
|
window.open(file.url, windowName);
|
||||||
}else{
|
} else {
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('/material/purchase_check_info/exportDetails',{taskId:this.taskId},`新购到货详情_${new Date().getTime()}.xlsx`)
|
this.download(
|
||||||
|
"/material/purchase_check_info/exportDetails",
|
||||||
|
{ taskId: this.taskId },
|
||||||
|
`新购到货详情_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
},
|
||||||
}
|
};
|
||||||
};
|
</script>
|
||||||
</script>
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.uploadImg {
|
.uploadImg {
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.deviceCode {
|
.deviceCode {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
::v-deep.el-table .fixed-width .el-button--mini {
|
::v-deep.el-table .fixed-width .el-button--mini {
|
||||||
width: 60px !important;
|
width: 60px !important;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
//隐藏图片上传框的css
|
//隐藏图片上传框的css
|
||||||
::v-deep.disabled {
|
::v-deep.disabled {
|
||||||
.el-upload--picture-card {
|
.el-upload--picture-card {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Loading…
Reference in New Issue