This commit is contained in:
bb_pan 2025-06-18 20:07:48 +08:00
parent 98c23b4154
commit 0f73417cc2
7 changed files with 419 additions and 443 deletions

View File

@ -572,11 +572,11 @@ export default {
// }, // },
// ], // ],
phone: [ phone: [
{ // {
required: true, // required: true,
trigger: 'blur', // trigger: 'blur',
message: '请输入退料人的手机号' // message: '退'
}, // },
{ {
pattern: /^1[3456789]\d{9}$/, pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的手机号码', message: '请输入正确的手机号码',

View File

@ -1099,7 +1099,7 @@ export default {
// //
highlightText(text, keyword) { highlightText(text, keyword) {
console.log("yyyyyyyyyyyyy",text,keyword) // console.log("yyyyyyyyyyyyy",text,keyword)
if (!keyword) return text; if (!keyword) return text;
const reg = new RegExp(keyword, 'gi'); const reg = new RegExp(keyword, 'gi');
return text.replace(reg, match => `<span class="highlight-text">${match}</span>`); return text.replace(reg, match => `<span class="highlight-text">${match}</span>`);
@ -1167,9 +1167,8 @@ export default {
if (this.currentMatchIndex === -1 || !this.matchedOptions.length) return; if (this.currentMatchIndex === -1 || !this.matchedOptions.length) return;
const option = this.matchedOptions[this.currentMatchIndex]; const option = this.matchedOptions[this.currentMatchIndex];
const selectDom = this.$el.querySelector('.el-select-dropdown__wrap'); const selectDom = this.$el.querySelector('.type-select-dropdown');
const optionDom = selectDom?.querySelector(`[data-key="${option.typeId}"]`); const optionDom = selectDom?.querySelector(`[data-key="${option.typeId}"]`);
if (optionDom) { if (optionDom) {
optionDom.scrollIntoView({ block: 'center', behavior: 'smooth' }); optionDom.scrollIntoView({ block: 'center', behavior: 'smooth' });
} }
@ -1225,7 +1224,7 @@ export default {
// overflow-y: auto; // overflow-y: auto;
// } // }
.highlight-text { ::v-deep .highlight-text {
background-color: #ffd04b; background-color: #ffd04b;
color: #000; color: #000;
} }

View File

@ -11,17 +11,8 @@
label-width="90px" label-width="90px"
> >
<el-form-item label="类型规格:" prop="partId"> <el-form-item label="类型规格:" prop="partId">
<el-select <el-select v-model="queryParams.partId" placeholder="请选择类型规格" clearable>
v-model="queryParams.partId" <el-option v-for="dict in materialModelList" :key="dict.value" :label="dict.label" :value="dict.value" />
placeholder="请选择类型规格"
clearable
>
<el-option
v-for="dict in materialModelList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item label="机具厂家:" prop="supplierId"> <!-- <el-form-item label="机具厂家:" prop="supplierId">
@ -40,33 +31,18 @@
placeholder="请选择出厂日期" placeholder="请选择出厂日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
type="date" type="date"
> ></el-date-picker>
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
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>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="primary" size="mini" icon="el-icon-back" @click="jumpList">配件验收</el-button>
type="primary"
size="mini"
icon="el-icon-back"
@click="jumpList"
>配件验收</el-button
>
</el-col> </el-col>
<!-- <el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
@ -80,71 +56,31 @@
</el-col> --> </el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="success" @click="batchPass" icon="el-icon-check" v-show="!isView" size="mini">
type="success" 合格
@click="batchPass" </el-button>
icon="el-icon-check"
v-show="!isView"
size="mini"
>合格</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="danger" @click="batchReject" icon="el-icon-close" v-show="!isView" size="mini">
type="danger" 不合格
@click="batchReject" </el-button>
icon="el-icon-close"
v-show="!isView"
size="mini"
>不合格</el-button
>
</el-col> </el-col>
</el-row> </el-row>
<el-table <el-table v-loading="loading" :data="tableList" ref="multipleTable">
v-loading="loading"
:data="tableList"
ref="multipleTable"
>
<!-- <el-table-column <!-- <el-table-column
type="selection" type="selection"
width="55" width="55"
align="center" :selectable="selectable" align="center" :selectable="selectable"
:reserve-selection="true" :reserve-selection="true"
/> --> /> -->
<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="maName" :show-overflow-tooltip="true" />
<el-table-column <el-table-column label="配件名称" align="center" prop="maTypeName" :show-overflow-tooltip="true" />
label="配件类型" <el-table-column label="规格型号" align="center" prop="partName" :show-overflow-tooltip="true" />
align="center" <el-table-column label="到货数量" align="center" prop="purchaseNum" :show-overflow-tooltip="true" />
prop="maName" <el-table-column label="单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
:show-overflow-tooltip="true"
/>
<el-table-column
label="配件名称"
align="center"
prop="maTypeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="partName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="到货数量"
align="center"
prop="purchaseNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="单位"
align="center"
prop="unitName"
:show-overflow-tooltip="true"
/>
<!-- <el-table-column <!-- <el-table-column
label="供应商" label="供应商"
@ -152,34 +88,29 @@
prop="supplier" prop="supplier"
:show-overflow-tooltip="true" :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="">
align="center"
prop="productionTime"
:show-overflow-tooltip="true"
/>
<el-table-column
label="相关配套资料"
align="center"
prop=""
>
<template slot-scope="scope"> <template slot-scope="scope">
<div style="color: #02A7F0;cursor: pointer;" @click="openFileDialog(scope.row)" v-if="scope.row.isExitFile==1">报告管理</div> <div
<div style="color: red;cursor: pointer;" @click="openFileDialog(scope.row)" v-if="scope.row.isExitFile==0">报告管理</div> style="color: #02a7f0; cursor: pointer"
@click="openFileDialog(scope.row)"
v-if="scope.row.isExitFile == 1"
>
报告管理
</div>
<div
style="color: red; cursor: pointer"
@click="openFileDialog(scope.row)"
v-if="scope.row.isExitFile == 0"
>
报告管理
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
label="状态"
align="center"
prop="status"
:show-overflow-tooltip="true"
>
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag :options="dict.type.purchase_task_status" :value="scope.row.status" />
:options="dict.type.purchase_task_status"
:value="scope.row.status"
/>
</template> </template>
</el-table-column> </el-table-column>
@ -238,17 +169,18 @@
<!-- 验收弹窗 --> <!-- 验收弹窗 -->
<el-dialog title="验收" :visible.sync="confirmShow" width="600px" height="300px"> <el-dialog title="验收" :visible.sync="confirmShow" width="600px" height="300px">
<div style="width: 100%; height: 80%; display: flex;margin-bottom: 10px;"> <div style="width: 100%; height: 80%; display: flex; margin-bottom: 10px">
<div style="width:15%;">验收结论</div> <div style="width: 15%">验收结论</div>
<el-input <el-input
type="textarea" type="textarea"
:rows="3" style="width:80%;" :rows="3"
style="width: 80%"
placeholder="请输入结论" placeholder="请输入结论"
v-model="checkResult" v-model="checkResult"
maxlength="100"> 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>
@ -256,23 +188,23 @@
<el-dialog title="报告管理" :visible.sync="open" width="900px" append-to-body> <el-dialog title="报告管理" :visible.sync="open" width="900px" append-to-body>
<el-table :data="fileDataList" width="100%" height="350px"> <el-table :data="fileDataList" width="100%" height="350px">
<el-table-column label="序号" type="index" width="55" align="center"/> <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="dictLabel" :show-overflow-tooltip="true" />
<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.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.partName}}</div> <div>{{ this.rowData.partName }}</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" <!-- <el-upload ref="upload" :limit="1" :headers="upload.headers"
: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"
@ -282,32 +214,33 @@
</el-button> </el-button>
</el-upload> --> </el-upload> -->
<el-button size="mini" type="text" @click="picturePreviewFile(scope.row)" v-if="scope.row.fileListTemp!=0"> <el-button
size="mini"
type="text"
@click="picturePreviewFile(scope.row)"
v-if="scope.row.fileListTemp != 0"
>
查看 查看
</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 title="文件列表" :visible.sync="dialogVisibleFile" width="500px" height="500px" > <el-dialog title="文件列表" :visible.sync="dialogVisibleFile" width="500px" height="500px">
<el-table :data="fileListInfo" width="100%" height="350px"> <el-table :data="fileListInfo" width="100%" height="350px">
<el-table-column label="序号" type="index" width="55" align="center"/> <el-table-column label="序号" type="index" width="55" align="center" />
<el-table-column label="文件名称" align="center" prop="name" :show-overflow-tooltip="true"/> <el-table-column label="文件名称" align="center" prop="name" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" > <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="picturePreview(scope.row)" v-if="scope.row.url" > <el-button size="mini" type="text" @click="picturePreview(scope.row)" v-if="scope.row.url">查看</el-button>
查看
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -315,25 +248,21 @@
</div> </div>
</template> </template>
<script> <script>
import { getManufacturerSelect } from "@/api/ma/supplier"; import { getManufacturerSelect } from '@/api/ma/supplier'
import { import { acceptInnerVerifyer, getPurchaseFileList, uploadPurchaseFile } from '@/api/purchase/goodsAccept'
acceptInnerVerifyer, import { getPartType, partTypeWarehouse, partTypeReject, innerVerify } from '@/api/part/partAccept'
getPurchaseFileList, import { getPartTypeCheckInfo, getPartTypeFileList } from '@/api/part/partArrived'
uploadPurchaseFile, import { downloadFile } from '@/utils/download'
} from "@/api/purchase/goodsAccept"; import { getToken } from '@/utils/auth'
import { getPartType,partTypeWarehouse,partTypeReject,innerVerify } from '@/api/part/partAccept';
import { getPartTypeCheckInfo,getPartTypeFileList } from '@/api/part/partArrived';
import { downloadFile } from "@/utils/download";
import { getToken } from "@/utils/auth";
import { getSignListApi } from '@/api/purchase/goodsAccept' import { getSignListApi } from '@/api/purchase/goodsAccept'
export default { export default {
name: "PartAcceptDetailTwo", name: 'PartAcceptDetailTwo',
dicts: ["purchase_task_status"], dicts: ['purchase_task_status'],
data() { data() {
return { return {
Id: "", Id: '',
taskId: "", taskId: '',
// //
loading: false, loading: false,
dialogLoading: false, dialogLoading: false,
@ -354,18 +283,18 @@ export default {
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: {
@ -373,42 +302,42 @@ export default {
// pageSize: 10, // pageSize: 10,
partId: undefined, partId: undefined,
supplierId: undefined, supplierId: undefined,
productionTime: undefined, productionTime: undefined
}, },
// //
confirmShow: false, confirmShow: false,
taskStatus: "", //31 taskStatus: '', //31
checkResult: "", checkResult: '',
verifyPass: true, //truefalse verifyPass: true, //truefalse
// //
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'
}, },
fileListInfo:[], fileListInfo: [],
dialogVisibleFile: false, dialogVisibleFile: false,
auditingList: [] auditingList: []
}; }
}, },
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.getPartType(); this.getPartType()
console.log(this.isView); console.log(this.isView)
this.getList(); this.getList()
this.getSignList() this.getSignList()
}, },
methods: { methods: {
@ -419,25 +348,42 @@ export default {
console.log('🚀 ~ getSignList ~ res:', res) console.log('🚀 ~ getSignList ~ res:', res)
// auditingList // auditingList
if (res.code === 200 && res.data && res.data.length > 0) { if (res.code === 200 && res.data && res.data.length > 0) {
const kuGuanOrder = ['库管一班', '库管二班', '库管三班'] const length = res.data.length
// deptName this.auditingList = res.data.map((item, index) => {
const map = new Map() return {
res.data.forEach(item => map.set(item.deptName, { ...item })) ...item,
// deptName: index == 0 ? '供应科' : item.deptName || '',
const kuGuanItem = kuGuanOrder.map(name => map.get(name)).find(Boolean) auditStatus: 1
// }
this.auditingList = [ })
// userName '' const list = [
(() => { { deptName: '安全/技术科', auditStatus: 0 },
const item = map.get('供应科') || { deptName: '供应科', auditStatus: 1 } { deptName: '库管班', auditStatus: 0 }
return { ...item, userName: item.userName || '姚士超' }
})(),
//
map.get('技术科') || { deptName: '技术科', auditStatus: 0 },
//
kuGuanItem || { deptName: '库管班', auditStatus: 0 }
] ]
console.log('🚀 ~ getSignList ~ this.auditingList:', this.auditingList) if (length == 1) {
this.auditingList.push(...list)
} else if (length == 2) {
this.auditingList.push(list[1])
}
console.log('🚀 ~ getSignList ~ this.审核:', this.auditingList)
// const kuGuanOrder = ['', '', '']
// // deptName
// const map = new Map()
// res.data.forEach(item => map.set(item.deptName, { ...item }))
// //
// const kuGuanItem = kuGuanOrder.map(name => map.get(name)).find(Boolean)
// //
// this.auditingList = [
// // userName ''
// (() => {
// const item = map.get('') || { deptName: '', auditStatus: 1 }
// return { ...item, userName: item.userName || '' }
// })(),
// //
// map.get('') || { deptName: '', auditStatus: 0 },
// //
// kuGuanItem || { deptName: '', auditStatus: 0 }
// ]
} }
} catch (error) { } catch (error) {
console.log('🚀 ~ getSignList ~ error:', error) console.log('🚀 ~ getSignList ~ error:', error)
@ -446,7 +392,7 @@ export default {
// //
selectable(row) { selectable(row) {
console.log(row) console.log(row)
if (row.status == 2||row.status == 13 ||row.status == 14) { if (row.status == 2 || row.status == 13 || row.status == 14) {
return true return true
} else { } else {
return false return false
@ -454,62 +400,62 @@ export default {
}, },
// //
jumpList() { jumpList() {
const obj = { path: "/part/partAcceptTwo" }; const obj = { path: '/part/partAcceptTwo' }
this.$tab.closeOpenPage(obj); this.$tab.closeOpenPage(obj)
}, },
getPartType() { getPartType() {
getPartType({ level: 3 }).then((response) => { getPartType({ level: 3 }).then(response => {
let matModelRes = response.data; let matModelRes = response.data
this.materialModelList = matModelRes.map((item) => { this.materialModelList = matModelRes.map(item => {
return { return {
label: item.partName, label: item.partName,
value: item.partId, value: item.partId
}; }
}); })
}); })
}, },
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 {
label: item.supplier, label: item.supplier,
value: item.supplierId, value: item.supplierId
}; }
}); })
}); })
}, },
/** 查询列表 */ /** 查询列表 */
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
getPartTypeCheckInfo(this.queryParams).then((response) => { getPartTypeCheckInfo(this.queryParams).then(response => {
this.tableList = response.data.partTypeCheckDetailsList; this.tableList = response.data.partTypeCheckDetailsList
// this.total = response.total; // this.total = response.total;
this.loading = false; this.loading = false
}); })
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm('queryForm')
this.queryParams.keyWord = null; this.queryParams.keyWord = null
this.handleQuery(); this.handleQuery()
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1
this.getList(); this.getList()
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection; this.ids = selection
this.infos = []; this.infos = []
selection.forEach((item) => { selection.forEach(item => {
this.infos.push({id:item.id,partId:item.partId,purchaseNum:item.purchaseNum,taskId:item.taskId}); this.infos.push({ id: item.id, partId: item.partId, purchaseNum: item.purchaseNum, taskId: item.taskId })
}); })
this.single = selection.length != 1; this.single = selection.length != 1
this.multiple = !selection.length; this.multiple = !selection.length
}, },
// //
pass(row) { pass(row) {
@ -518,25 +464,31 @@ export default {
// return; // return;
// } // }
const infos=[{id:row.id,partId:row.partId,purchaseNum:row.purchaseNum,taskId:this.taskId}] const infos = [{ id: row.id, partId: row.partId, purchaseNum: row.purchaseNum, taskId: this.taskId }]
this.$modal.confirm('是否确认入库该配件?') this.$modal
.then(function() { .confirm('是否确认入库该配件?')
.then(function () {
return partTypeWarehouse(infos) return partTypeWarehouse(infos)
}).then(() => { })
.then(() => {
this.$modal.msgSuccess('入库成功') this.$modal.msgSuccess('入库成功')
this.getList() this.getList()
}).catch(() => {}); })
.catch(() => {})
}, },
// //
reject(row) { reject(row) {
const infos=[{id:row.id,partId:row.partId,purchaseNum:row.purchaseNum,taskId:this.taskId}] const infos = [{ id: row.id, partId: row.partId, purchaseNum: row.purchaseNum, taskId: this.taskId }]
this.$modal.confirm('是否确认驳回该配件?') this.$modal
.then(function() { .confirm('是否确认驳回该配件?')
.then(function () {
return partTypeReject(infos) return partTypeReject(infos)
}).then(() => { })
.then(() => {
this.$modal.msgSuccess('驳回成功') this.$modal.msgSuccess('驳回成功')
this.getList() this.getList()
}).catch(() => {}); })
.catch(() => {})
}, },
// //
@ -545,19 +497,19 @@ export default {
// this.$modal.msgError(""); // this.$modal.msgError("");
// return; // return;
// } // }
this.taskStatus = "3"; this.taskStatus = '3'
this.checkResult = "合格"; this.checkResult = '合格'
this.verifyPass = true; this.verifyPass = true
this.checkList = []; this.checkList = []
this.checkList = this.tableList.map((item) => { this.checkList = this.tableList.map(item => {
let obj = { let obj = {
taskId: item.taskId, taskId: item.taskId,
partId: item.partId, partId: item.partId,
checkResult: this.checkResult, checkResult: this.checkResult
}; }
return obj; return obj
}); })
this.confirmShow = true; this.confirmShow = true
}, },
// //
@ -566,81 +518,84 @@ export default {
// this.$modal.msgError(""); // this.$modal.msgError("");
// return; // return;
// } // }
this.taskStatus = "1"; this.taskStatus = '1'
this.checkResult = "不合格"; this.checkResult = '不合格'
this.verifyPass = false; this.verifyPass = false
this.checkList = []; this.checkList = []
this.checkList = this.tableList.map((item) => { this.checkList = this.tableList.map(item => {
let obj = { let obj = {
taskId: item.taskId, taskId: item.taskId,
partId: item.partId, partId: item.partId,
checkResult: this.checkResult, checkResult: this.checkResult
}; }
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
}); })
let param = { let param = {
purchaseCheckDetailsList:this.checkList, purchaseCheckDetailsList: this.checkList,
verifyPass:this.verifyPass verifyPass: this.verifyPass
} }
console.log(param); console.log(param)
innerVerify(param).then((response) => { innerVerify(param).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()
// //
this.jumpList() this.jumpList()
} }
}); })
}, },
// //
openFileDialog(row){ openFileDialog(row) {
this.rowData=row; this.rowData = row
this.fileDataList = [{dictLabel:"合格证",fileType:"0",name:"",url:"",fileList:[],fileListTemp:[]}, this.fileDataList = [
{dictLabel:"型式试验报告",fileType:"1",name:"",url:"",fileList:[],fileListTemp:[]}, { dictLabel: '合格证', fileType: '0', name: '', url: '', fileList: [], fileListTemp: [] },
{dictLabel:"出厂检测报告",fileType:"2",name:"",url:"",fileList:[],fileListTemp:[]}, { dictLabel: '型式试验报告', fileType: '1', name: '', url: '', fileList: [], fileListTemp: [] },
{dictLabel:"第三方检测报告",fileType:"3",name:"",url:"",fileList:[],fileListTemp:[]}, { dictLabel: '出厂检测报告', fileType: '2', name: '', url: '', fileList: [], fileListTemp: [] },
{dictLabel:"其他",fileType:"4",name:"",url:"",fileList:[],fileListTemp:[]}] { dictLabel: '第三方检测报告', fileType: '3', name: '', url: '', fileList: [], fileListTemp: [] },
{ dictLabel: '其他', fileType: '4', name: '', url: '', fileList: [], fileListTemp: [] }
]
this.getFileData() this.getFileData()
this.open=true this.open = true
}, },
getFileData(){ getFileData() {
let param = { let param = {
modelId:this.rowData.partId, modelId: this.rowData.partId,
taskType:13, taskType: 13,
taskId:this.rowData.taskId taskId: this.rowData.taskId
} }
getPartTypeFileList(param).then((response) => { getPartTypeFileList(param)
if(response.data.length>0){ .then(response => {
response.data.forEach(item=>{ if (response.data.length > 0) {
response.data.forEach(item => {
let index = this.fileDataList.findIndex(v => v.fileType == item.fileType) let index = this.fileDataList.findIndex(v => v.fileType == item.fileType)
item.fileDetailList.forEach(item2=>{ item.fileDetailList.forEach(item2 => {
this.fileDataList[index].fileList.push({ this.fileDataList[index].fileList.push({
name:item2.name, name: item2.name,
url:item2.url url: item2.url
}) })
this.fileDataList[index].fileListTemp.push({ this.fileDataList[index].fileListTemp.push({
name:item2.name, name: item2.name,
url:item2.url url: item2.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;
}, },
// //
@ -648,21 +603,21 @@ export default {
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) uploadPurchaseFile(param)
.then((response) => { .then(response => {
this.$modal.msgSuccess("上传成功"); this.$modal.msgSuccess('上传成功')
this.getFileData(); this.getFileData()
}) })
.catch(() => { .catch(() => {
this.$modal.msgError("上传失败"); this.$modal.msgError('上传失败')
}); })
} }
}, },
picturePreviewFile(row) { picturePreviewFile(row) {
@ -672,39 +627,42 @@ export default {
}, },
// //
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 === 'DOC' || extension === 'docx' || extension === 'DOCX' || extension === 'pdf' || extension === 'PDF') { if (
const windowName = file.name; extension === 'doc' ||
window.open(file.url, windowName); extension === 'DOC' ||
extension === 'docx' ||
extension === 'DOCX' ||
extension === 'pdf' ||
extension === 'PDF'
) {
const windowName = file.name
window.open(file.url, windowName)
} else { } else {
this.dialogVisible = true; this.dialogVisible = true
} }
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const formatTime = (date) => { const formatTime = date => {
const year = date.getFullYear(); const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0'); const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0'); const day = String(date.getDate()).padStart(2, '0')
const hours = String(date.getHours()).padStart(2, '0'); const hours = String(date.getHours()).padStart(2, '0')
const minutes = String(date.getMinutes()).padStart(2, '0'); const minutes = String(date.getMinutes()).padStart(2, '0')
const seconds = String(date.getSeconds()).padStart(2, '0'); const seconds = String(date.getSeconds()).padStart(2, '0')
return `${year}${month}${day}_${hours}${minutes}${seconds}`; return `${year}${month}${day}_${hours}${minutes}${seconds}`
}; }
const currentTime = formatTime(new Date()); const currentTime = formatTime(new Date())
this.download( this.download('/material/part_arrived/exportDetails', { taskId: this.taskId }, `新购到货详情_${currentTime}.xlsx`)
"/material/part_arrived/exportDetails", }
{ taskId: this.taskId }, }
`新购到货详情_${currentTime}.xlsx` }
);
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.uploadImg { .uploadImg {
padding-top: 20px; padding-top: 20px;
display: flex; display: flex;
@ -757,7 +715,6 @@ export default {
} }
} }
.btn-container { .btn-container {
margin-top: 10px; margin-top: 10px;
display: flex; display: flex;

View File

@ -395,7 +395,7 @@
<div slot="footer" class="dialog-footer" style="text-align: center"> <div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="addUserOpen">人员添加</el-button> <el-button type="primary" @click="addUserOpen">人员添加</el-button>
<el-button type="primary" @click="configNotice">发起验收</el-button> <el-button type="primary" @click="configNotice" v-loading="btnLoading">发起验收</el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -454,6 +454,7 @@ export default {
// //
loading: true, loading: true,
loadingTwo: true, loadingTwo: true,
btnLoading: false,
updateTime: "", updateTime: "",
// //
ids: [], ids: [],
@ -774,6 +775,8 @@ export default {
isPartFlag: 0, isPartFlag: 0,
}; };
if (this.configUserList.length > 0) { if (this.configUserList.length > 0) {
if (this.btnLoading) return
this.btnLoading = true
bmNoticeInfo(param).then((response) => { bmNoticeInfo(param).then((response) => {
console.log(response); console.log(response);
if (response.code == 200) { if (response.code == 200) {
@ -781,9 +784,12 @@ export default {
message: "操作成功", message: "操作成功",
type: "success", type: "success",
}); });
this.btnLoading = false
this.showPeople = false; this.showPeople = false;
this.getList(); this.getList();
} }
}).catch(() => {
this.btnLoading = false
}); });
} else { } else {
this.$message({ this.$message({

View File

@ -11,7 +11,13 @@
label-width="90px" label-width="90px"
> >
<el-form-item label="类型规格:" prop="typeId"> <el-form-item label="类型规格:" prop="typeId">
<el-select v-model="queryParams.typeId" placeholder="请选择类型规格" clearable filterable style="width: 240px"> <el-select
v-model="queryParams.typeId"
placeholder="请选择类型规格"
clearable
filterable
style="width: 240px"
>
<el-option v-for="dict in materialModelList" :key="dict.value" :label="dict.label" :value="dict.value" /> <el-option v-for="dict in materialModelList" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -364,25 +370,42 @@ export default {
console.log('🚀 ~ getSignList ~ res:', res) console.log('🚀 ~ getSignList ~ res:', res)
// auditingList // auditingList
if (res.code === 200 && res.data && res.data.length > 0) { if (res.code === 200 && res.data && res.data.length > 0) {
const kuGuanOrder = ['库管一班', '库管二班', '库管三班'] const length = res.data.length
// deptName this.auditingList = res.data.map((item, index) => {
const map = new Map() return {
res.data.forEach(item => map.set(item.deptName, { ...item })) ...item,
// deptName: index == 0 ? '供应科' : item.deptName || '',
const kuGuanItem = kuGuanOrder.map(name => map.get(name)).find(Boolean) auditStatus: 1
// }
this.auditingList = [ })
// userName '' const list = [
(() => { { deptName: '安全/技术科', auditStatus: 0 },
const item = map.get('供应科') || { deptName: '供应科', auditStatus: 1 } { deptName: '库管班', auditStatus: 0 }
return { ...item, userName: '姚士超' }
})(),
//
map.get('技术科') || { deptName: '技术科', auditStatus: 0 },
//
kuGuanItem || { deptName: '库管班', auditStatus: 0 }
] ]
console.log('🚀 ~ getSignList ~ this.auditingList:', this.auditingList) if (length == 1) {
this.auditingList.push(...list)
} else if (length == 2) {
this.auditingList.push(list[1])
}
console.log('🚀 ~ getSignList ~ this.审核:', this.auditingList)
// const kuGuanOrder = ['', '', '']
// // deptName
// const map = new Map()
// res.data.forEach(item => map.set(item.deptName, { ...item }))
// //
// const kuGuanItem = kuGuanOrder.map(name => map.get(name)).find(Boolean)
//
// this.auditingList = [
// // userName ''
// (() => {
// const item = map.get('') || { deptName: '', auditStatus: 1 }
// return { ...item, userName: '' }
// })(),
// //
// map.get('') || { deptName: '', auditStatus: 0 },
// //
// kuGuanItem || { deptName: '', auditStatus: 0 }
// ]
} }
} catch (error) { } catch (error) {
console.log('🚀 ~ getSignList ~ error:', error) console.log('🚀 ~ getSignList ~ error:', error)
@ -717,7 +740,6 @@ export default {
} }
} }
.btn-container { .btn-container {
margin-top: 10px; margin-top: 10px;
display: flex; display: flex;

View File

@ -104,7 +104,7 @@
collapse-tags collapse-tags
:filter-method="handleSearchImpl" :filter-method="handleSearchImpl"
:popper-class="'type-select-dropdown'" :popper-class="'type-select-dropdown'"
:popper-append-to-body="true" :popper-append-to-body="false"
@visible-change="handleVisibleChange" @visible-change="handleVisibleChange"
> >
<el-option <el-option
@ -141,20 +141,6 @@
</el-input> </el-input>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-cascader
:key="propsKey"
v-model="deviceType"
:show-all-levels="false"
:options="equipmentTypeList"
:props="deviceTypeTreeProps"
filterable
collapse-tags
style="width: 240px"
placeholder="请选择规格型号"
ref="deviceTypeCascader"
popper-class="popper-select"
@change="deviceTypeChange"
></el-cascader> -->
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
@ -612,6 +598,7 @@ export default {
}, },
watch: {}, watch: {},
mounted() { mounted() {
this.equipmentType()
if (this.isEdit) { if (this.isEdit) {
console.log('isEdit',this.isEdit) console.log('isEdit',this.isEdit)
this.taskId = this.editTaskId this.taskId = this.editTaskId
@ -621,7 +608,7 @@ export default {
this.maForm.arrivalTime = this.formatDate(new Date()); this.maForm.arrivalTime = this.formatDate(new Date());
} }
this.supplierInfoList() this.supplierInfoList()
this.equipmentType()
}, },
methods: { methods: {
handleDateTypeChange(val) { handleDateTypeChange(val) {
@ -1367,9 +1354,8 @@ export default {
if (this.currentMatchIndex === -1 || !this.matchedOptions.length) return if (this.currentMatchIndex === -1 || !this.matchedOptions.length) return
const option = this.matchedOptions[this.currentMatchIndex] const option = this.matchedOptions[this.currentMatchIndex]
const selectDom = this.$el.querySelector('.el-select-dropdown__wrap') const selectDom = this.$el.querySelector('.type-select-dropdown')
const optionDom = selectDom?.querySelector(`[data-key="${option.typeId}"]`) const optionDom = selectDom?.querySelector(`[data-key="${option.typeId}"]`)
if (optionDom) { if (optionDom) {
optionDom.scrollIntoView({ block: 'center', behavior: 'smooth' }) optionDom.scrollIntoView({ block: 'center', behavior: 'smooth' })
} }
@ -1414,7 +1400,7 @@ export default {
// overflow-y: auto; // overflow-y: auto;
// } // }
.highlight-text { ::v-deep .highlight-text {
background-color: #ffd04b; background-color: #ffd04b;
color: #000; color: #000;
} }

View File

@ -354,7 +354,7 @@
<div slot="footer" class="dialog-footer" style="text-align: center"> <div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="addUserOpen">人员添加</el-button> <el-button type="primary" @click="addUserOpen">人员添加</el-button>
<el-button type="primary" @click="configNotice">发起验收</el-button> <el-button type="primary" @click="configNotice" v-loading="btnLoading">发起验收</el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -412,6 +412,7 @@ export default {
// //
loading: true, loading: true,
loadingTwo: true, loadingTwo: true,
btnLoading: false,
updateTime: "", updateTime: "",
// //
ids: [], ids: [],
@ -643,6 +644,8 @@ export default {
content: this.form.remark, content: this.form.remark,
}; };
if (this.configUserList.length > 0) { if (this.configUserList.length > 0) {
if (this.btnLoading) return
this.btnLoading = true
bmNoticeInfo(param).then((response) => { bmNoticeInfo(param).then((response) => {
console.log(response); console.log(response);
if (response.code == 200) { if (response.code == 200) {
@ -650,9 +653,12 @@ export default {
message: "操作成功", message: "操作成功",
type: "success", type: "success",
}); });
this.btnLoading = false
this.showPeople = false; this.showPeople = false;
this.getList(); this.getList();
} }
}).catch(() => {
this.btnLoading = false
}); });
} else { } else {
this.$message({ this.$message({