修试后入库

This commit is contained in:
jjLv 2024-11-22 10:18:37 +08:00
parent 10ca309ef6
commit 6c95b8e2c3
3 changed files with 718 additions and 67 deletions

View File

@ -73,3 +73,10 @@ export function auditPass(data) {
})
}
//获取维修任务单信息
export function getRepairInfo(taskId) {
return request({
url: '/material/repair/getRepairTicketInfo/?taskId=' + taskId,
method: 'get',
})
}

View File

@ -141,6 +141,7 @@
"
>
<span>日期</span>
{{ repairTicketlLevelOne.createTime }}
</div>
<div
class="item"
@ -152,6 +153,7 @@
"
>
<span>单号</span>
{{ repairTicketlLevelOne.repairCode }}
</div>
<div
class="item"
@ -163,6 +165,7 @@
"
>
<span>承修单位</span>
{{ repairTicketlLevelOne.backUnit }}
</div>
<div
@ -175,6 +178,7 @@
"
>
<span>操作人</span>
{{ repairTicketlLevelOne.repairer }}
</div>
<div
@ -187,6 +191,7 @@
"
>
<span>项目名称</span>
{{ repairTicketlLevelOne.backPro }}
</div>
<div
@ -199,45 +204,63 @@
"
>
<span>委托单位</span>
{{ repairTicketlLevelOne.backUnit }}
</div>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px;">
<span>验收人</span>
</div>
</div>
<el-table
:data="printTableData"
:data="repairTicketDevice"
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="unitName1" />
<el-table-column label="名称" align="center" prop="typeName" />
<el-table-column label="型号" align="center" prop="type"/>
<el-table-column label="编号" align="center" prop="code" >
<template slot-scope="scope">
<div v-if="scope.row.manageType==1" >计数</div>
<div v-if="scope.row.manageType==0" style="color: blue;" @click="handleView(scope.row)">详见附件</div>
</template>
</el-table-column>
<el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="报修数量" align="center" prop="unitName2" />
<el-table-column label="修复数量" align="center" prop="unitName3" />
<el-table-column label="报废数量" align="center" prop="unitName4" />
<el-table-column label="维修费小计" align="center" prop="unitName5" />
<el-table-column label="报修数量" align="center" prop="repairNum" />
<el-table-column label="修复数量" align="center" prop="repairedNum" />
<el-table-column label="报废数量" align="center" prop="scrapNum" />
<el-table-column label="维修费小计" align="center" prop="totalCost" >
<template slot-scope="scope">
<div >{{"¥"+" "+scope.row.totalCost}}</div>
</template>
</el-table-column>
<el-table-column label="报废图片" align="center" >
<template slot-scope="scope">
<div v-if="scope.row.fileList.length==0" >0</div>
<div v-if="scope.row.fileList.length!=0" style="color: blue;" @click="picturesPreview(scope.row)">{{scope.row.fileList.length}}</div>
</template>
</el-table-column>
</el-table>
<div
class="tabelAll"
>
<div class="columnAllNum">总计</div>
<div class="columnAll">报修数量</div>
<div class="columnAll">修复数量</div>
<div class="columnAll">报废数量</div>
<div class="columnAll">维修费小计</div>
<div class="columnAll">
{{ repairNum1 }}
</div>
<div class="columnAll">
{{ repairNum2 }}
</div>
<div class="columnAll">
{{ repairNum3 }}
</div>
<div class="columnAll">
{{ "¥"+" "+repairNum4 }}
</div>
<div class="columnAll">
</div>
</div>
<div
class="fillIn"
@ -255,38 +278,32 @@
</div>
<el-table
:data="printTableData"
:data="repairTicketPart"
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="repairName" >
<template slot-scope="scope">
<div>{{ scope.row.maTypeName }}-{{ scope.row.typeName }}</div>
</template>
</el-table-column>
<el-table-column label="配件名称 * 数量 / 单价" align="center" prop="specificationType" >
<template slot-scope="scope">
<div>{{ scope.row.partName + " " }}*{{ " "+scope.row.partNum + " " }}/{{" ¥"+" "}}{{ scope.row.partPrice }}</div>
</template>
</el-table-column>
</el-table>
<div
class="tabelAll"
>
<div class="columnAllNum">合计</div>
<div class="columnAll">合计金额</div>
<div class="columnAllNumTwo">合计</div>
<div class="columnAllNumThree">
{{ "¥"+" "+acountAll }}
</div>
</div>
<div
class="tabelAll"
>
<div class="columnAllNum">报废图片</div>
<div class="columnAll">试验记录</div>
</div>
<div
class="fillIn"
style="
margin-top: 20px;
display: flex;
justify-content: space-between;
"
>
<div class="fillIn" style=" margin-top: 20px; display: flex; justify-content: space-between;">
<div class="item" style="width: 50%">
<div>
<span>负责人</span>
@ -296,19 +313,13 @@
<div class="item" style="width: 50%">
<div>
<span>完成日期</span>
{{ repairTicketlLevelOne.finishTime }}
</div>
</div>
</div>
<div
class="fillIn"
style="
margin-top: 20px;
display: flex;
justify-content: space-between;
"
>
<div class="fillIn" style="margin-top: 20px; display: flex; justify-content: space-between;">
<div class="item" style="width: 33%">
<div>
<span>维修人员</span>
@ -334,6 +345,77 @@
<el-button type="primary" @click="print"> </el-button>
<el-button @click="openPrint = false"> </el-button>
</div>
</el-dialog>
<!-- 查看弹窗 -->
<el-dialog
:title="titleView"
:visible.sync="showView"
width="1000px"
append-to-body
>
<div style="overflow-y: scroll">
<vue-easy-print tableShow ref="remarksPrintRefView" class="print">
<div
class="title"
style="text-align: center; font-weight: 600; font-size: 16px; margin-bottom:20px"
>
维修任务单编号明细
</div>
<el-table :data="getListViewInfo" width="600px" height="450">
<el-table-column align="center" label="序号" type="index" width="55" />
<el-table-column
label="类型名称"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="type"
:show-overflow-tooltip="true"
/>
<el-table-column
label="设备编码"
align="center"
prop="code"
:show-overflow-tooltip="true"
/>
<el-table-column
label="状态"
align="center"
prop="status"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<div v-if="scope.row.status=='1'" >已完成</div>
<div v-if="scope.row.status=='0'">未完成</div>
</template>
</el-table-column>
</el-table>
</vue-easy-print>
</div>
<div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="printView"> </el-button>
<el-button @click="showView = false"> </el-button>
</div>
</el-dialog>
<!--多图片查看弹窗 -->
<el-dialog :visible.sync="dialogVisibles">
<div style="width: 100%;height: 600px;display: flex;justify-content: space-between;align-items: center;">
<div style="width: 5%;height: 100%;display: flex;align-items: center;justify-content: center;" >
<i class="el-icon-caret-left" style="font-size: 32px;" @click="imgIndex=imgIndex-1" v-show="imgIndex>0"></i>
</div>
<div style="width: 90%;height: 100%;overflow: hidden;">
<img v-for="(item,index) of dialogImageUrls" :key="index" v-show="imgIndex==index" width="100%" height="500px" :src="item.url" alt />
</div>
<div style="width: 5%;height: 100%;display: flex;align-items: center;" >
<i class="el-icon-caret-right" style="font-size: 32px;" @click="imgIndex=imgIndex+1" v-show="(imgIndex+1)<(dialogImageUrls.length)"></i>
</div>
</div>
</el-dialog>
</div>
</template>
@ -344,6 +426,7 @@ import {
getRepairTaskList,
rejectRepair,
sendList,
getRepairInfo,
} from '@/api/repair/repair.js'
import { getInfo, h } from '@/api/login'
@ -398,6 +481,32 @@ export default {
//taskId
ids:[],
taskList:[],
//
repairTicketlLevelOne:{},
//
repairTicketDevice:[],
//
repairTicketPart:[],
//
repairNum1:0,
//
repairNum2:0,
//
repairNum3:0,
//
repairNum4:0,
//
showView:false,
//
titleView:'',
//
getListViewInfo:[],
//
acountAll:0,
//
dialogImageUrls: [],
dialogVisibles: false,
imgIndex:0,
}
},
created() {
@ -444,12 +553,6 @@ export default {
this.$refs.queryForm.resetFields()
this.handleQuery()
},
// //
// handleSelectionChange(selection) {
// this.ids = selection.map((item) => item.taskId)
// this.single = selection.length != 1
// this.multiple = !selection.length
// },
/** 新增按钮操作 */
handleAdd() {
this.$emit('handelAdd')
@ -486,7 +589,38 @@ export default {
)
},
//
handlePrint(row) {
async handlePrint(row) {
const res = await getRepairInfo(row.taskId);
this.repairTicketlLevelOne = res.data.repairTaskInfo;
this.repairTicketDevice = res.data.repairDeviceArray;
//
if(this.repairTicketDevice.length>0){
let num1 = 0; //
let num2 = 0; //
let num3 = 0; //
let num4 = 0.0; //
this.repairTicketDevice.forEach(item=>{
num1 = num1 + Number(item.repairNum)
num2 = num2 + Number(item.repairedNum)
num3 = num3 + Number(item.scrapNum)
num4 = num4 + item.totalCost
})
this.repairNum1 = num1
this.repairNum2 = num2
this.repairNum3 = num3
this.repairNum4 = num4
}
//
this.repairTicketPart = res.data.repairPartArray;
if(this.repairTicketPart.length>0){
let acount = 0.0 //
this.repairTicketPart.forEach(item=>{
acount = acount + item.partCost
})
this.acountAll = acount;
}
this.openPrint = true;
this.title = "机具设备维修任务单";
},
@ -510,15 +644,45 @@ export default {
//
handleSelectionChange(selection) {
this.taskList = [];
this.ids = selection.map((item) => item.taskId);
selection.forEach((item) => {
this.taskList.push({ taskId: item.taskId });
});
this.single = selection.length != 1;
this.multiple = !selection.length;
this.taskList = [];
this.ids = selection.map((item) => item.taskId);
selection.forEach((item) => {
this.taskList.push({ taskId: item.taskId });
});
this.single = selection.length != 1;
this.multiple = !selection.length;
},
//
print() {
this.$refs.remarksPrintRef.print();
},
},
//
printView() {
this.$refs.remarksPrintRefView.print();
},
handleView(row){
this.getListViewInfo = row.repairDeviceList
console.log('this.getListViewInfo',this.getListViewInfo)
this.titleView = "查看"
this.showView = true;
},
//
picturesPreview(row) {
this.dialogImageUrls = [];
row.fileList.forEach(item => {
this.dialogImageUrls.push({
name: item.name,
url: item.url
})
});
this.imgIndex=0
this.dialogVisibles = true;
},
},
}
</script>
<style lang="scss" scoped>
@ -582,14 +746,29 @@ export default {
padding: 5px;
border-left: 1px solid #dfe6ec;
text-align: center;
width:20%;
width:11.1%;
}
.columnAllNum {
padding: 5px;
text-align: center;
width:44.4%;
border-left: none;
}
.columnAllNumTwo {
flex: 1;
padding: 5px;
border-left: 1px solid #dfe6ec;
text-align: center;
width:50%;
border-left: none;
}
.columnAllNumThree {
flex: 1;
padding: 5px;
border-left: 1px solid #dfe6ec;
text-align: center;
width:50%;
}
/* 最后一列无右边框 */
.tabelAll .column:last-child {
border-right: none;

View File

@ -0,0 +1,465 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="关键字" prop="keyword">
<el-input
v-model="queryParams.keyword"
placeholder="请输入关键字"
clearable
maxlength="50"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="taskStatus">
<el-select
v-model="queryParams.taskStatus"
placeholder="请选择状态"
clearable
filterable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.repair_end_task_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="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="testedList"
ref="multipleTable"
row-key="teamId"
>
<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="repairNum" />
<el-table-column label="物资类型" align="center" prop="itemType" />
<el-table-column label="维修人" align="center" prop="createBy" />
<el-table-column label="维修时间" align="center" prop="createTime" />
<el-table-column label="状态" align="center" prop="taskStatus" >
<template slot-scope="scope">
<dict-tag
:options="dict.type.repair_end_task_status"
:value="scope.row.taskStatus"
/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="180">
<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"
v-if="scope.row.taskStatus==0"
@click="handleUpdate(scope.row)"
>审核
</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="showView"
width="1100px"
append-to-body
>
<el-form
:model="queryInBoundInfo"
ref="queryFormOutInfo"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item prop="typeId">
<el-input
v-model="queryInBoundInfo.typeId"
placeholder="请输入规格型号"
clearable
@keyup.enter.native="handleQueryView"
maxlength="20"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQueryView"
>查询</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQueryView"
>重置</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="success"
plain
size="mini"
@click="handleSuccessAll"
v-if="title=='审核'"
>批量通过
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
size="mini"
@click="handleFailAll"
v-if="title=='审核'"
>批量不通过
</el-button>
</el-col>
</el-row>
<el-table :data="getInBoundInfo" width="600px" height="450" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :selectable="selectable"/>
<el-table-column label="类型名称" align="center" prop="maTypeName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column label="数量" align="center" prop="num" :show-overflow-tooltip="true" />
<el-table-column label="编号" align="center" prop="code" :show-overflow-tooltip="true" />
<el-table-column label="提交人" align="center" prop="createBy" :show-overflow-tooltip="true" />
<el-table-column label="提交时间" align="center" prop="createTime" :show-overflow-tooltip="true" />
<el-table-column label="状态" align="center" prop="taskStatus" >
<template slot-scope="scope">
<dict-tag
:options="dict.type.repair_end_task_status"
:value="scope.row.taskStatus"
/>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200px"
v-if="title=='审核'"
>
<template slot-scope="scope">
<el-button
size="mini"
type="success"
@click="InBoundSuccess(scope.row)"
v-if="scope.row.taskStatus == 0 "
>
通过
</el-button>
<el-button
size="mini"
type="danger"
v-if="scope.row.taskStatus == 0 "
@click="InBoundFail(scope.row)"
>
不通过
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="totalView > 0"
:total="totalView"
:page.sync="queryInBoundInfo.pageNum"
:limit.sync="queryInBoundInfo.pageSize"
@pagination="getListView"
/>
</el-dialog>
</div>
</template>
<script>
import {
getListHouse,
getHouseDetail,
editHouse,
addHouse,
delHouse,
} from "@/api/ma/whHouse";
import { downloadFile } from "@/utils/download";
export default {
name: "testedInBound",
dicts: ["repair_end_task_status"],
data() {
return {
//
loading: false,
//
single: true,
//
multiple: true,
//
showSearch: true,
//
showView: false,
//
total: 0,
//
totalView:0,
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
keyWord: undefined,
},
queryInBoundInfo:{
pageNum: 1,
pageSize: 10,
},
//
testedList:[],
//
getInBoundInfo:[]
};
},
created() {
this.getList();
},
components: {},
methods: {
//
selectable(row) {
if (row.taskStatus == "1" && this.title=="审核") {
return false;
} else {
return true;
}
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
/** 查询修试入库列表 */
getList() {
this.loading = true;
// getListTested(this.queryParams).then((response) => {
// this.testedList = response.rows;
// this.total = response.total;
// this.loading = false;
// });
this.testedList = [
{'repairNum':'X20241121001','taskStatus':0},
{'repairNum':'X20241121002','taskStatus':1}
]
this.total = 2;
this.loading = false;
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams.keyWord = null;
this.handleQuery();
},
//
handleView(){
// this.getListView()
this.title = "查看"
this.getInBoundInfo = [
{'typeName':'p1','taskStatus':0},
{'typeName':'p2','taskStatus':1}
]
this.totalView = 2
this.showView = true;
},
getListView(){
},
//
handleUpdate(){
// this.getListView()
this.title = "审核"
this.getInBoundInfo = [
{'typeName':'p1','taskStatus':0},
{'typeName':'p2','taskStatus':1}
]
this.totalView = 2
this.showView = true;
},
//
InBoundSuccess(row){
},
//
InBoundFail(row){
},
//
handleSuccessAll(){
},
//
handleFailAll(){
},
//
handleQueryView(){
},
//
resetQueryView(){
this.queryInBoundInfo = {};
this.resetForm("queryInBoundInfo");
},
//** */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.houseId != undefined) {
editHouse(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.showHouse = false;
this.getList();
});
} else {
addHouse(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.showHouse = false;
this.getList();
});
}
}
});
},
//
cancel() {
this.showHouse = false;
this.reset();
},
handleExport() {
// this.download(
// "/material/wh_house_info/export",
// {
// ...this.queryParams,
// },
// `_${new Date().getTime()}.xlsx`
// );
},
},
};
</script>
<style lang="scss" scoped>
.uploadImg {
padding-top: 20px;
display: flex;
align-items: center;
justify-content: center;
}
.deviceCode {
margin-top: 10px;
padding-bottom: 20px;
font-size: 18px;
}
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
//css
::v-deep.disabled {
.el-upload--picture-card {
display: none;
}
}
</style>