Merge branch 'material-ui' of http://192.168.30.2:3000/bonus/bonus-ui into material-ui

This commit is contained in:
zzyuan 2024-11-20 10:07:29 +08:00
commit 6bff12a6de
4 changed files with 2653 additions and 1068 deletions

View File

@ -22,12 +22,13 @@ export function getAppRepairMaTypeList(query) {
//获取配件类型树 //获取配件类型树
export function partTypeTreeList(query) { export function partTypeTreeList(query) {
return request({ return request({
url: '/material/ma_part_type/list', url: '/material/ma_part_type/list',
method: 'get', method: 'get',
params: query, params: query,
}) })
} }
// //维修驳回至退料 // //维修驳回至退料
// export function rejectRepair(data) { // export function rejectRepair(data) {
// return request({ // return request({
@ -44,3 +45,31 @@ export function rejectRepair(taskIds) {
}) })
} }
// 维修保存
export function saveCodeList(data) {
return request({
url: '/material/repair/batchRepairApply',
method: 'post',
data: data,
})
}
//维修提交
export function sendList(data) {
return request({
url: '/material/repair/endRepairTask',
method: 'post',
data: data,
})
}
//维修合格
export function auditPass(data) {
return request({
url: '/material/repair/completeRepair',
method: 'post',
data: data,
})
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,8 @@
placeholder="请选择" placeholder="请选择"
> >
<el-option <el-option
v-for="dict in dict.type.back_task_status" v-for="dict in dict.type.repair_task_status"
v-if="dict.value == 0 || dict.value == 1 || dict.value == 2"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -60,7 +61,7 @@
<el-button type="primary" plain size="mini" @click="handleAdd">新增</el-button> <el-button type="primary" plain size="mini" @click="handleAdd">新增</el-button>
</el-col> --> </el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain size="mini">提交</el-button> <el-button type="warning" plain size="mini" @click="handleSend">提交</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain size="mini" @click="handleReject">退回</el-button> <el-button type="danger" plain size="mini" @click="handleReject">退回</el-button>
@ -89,16 +90,17 @@
<el-table-column label="创建人" align="center" prop="createName" :show-overflow-tooltip="true"/> <el-table-column label="创建人" align="center" prop="createName" :show-overflow-tooltip="true"/>
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/> <el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
<el-table-column label="状态" align="center" :show-overflow-tooltip="true" prop="repairStatusCode"> <el-table-column label="状态" align="center" :show-overflow-tooltip="true" prop="repairStatusCode">
<!-- <template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.back_task_status" :value="scope.row.repairStatusCode"/> <dict-tag :options="dict.type.repair_task_status" :value="scope.row.repairStatusCode"/>
</template> --> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/> <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" plain icon="el-icon-zoom-in" @click="handleSee(scope.row)" >查看</el-button> <el-button size="mini" plain icon="el-icon-zoom-in" @click="handleSee(scope.row)" >查看</el-button>
<el-button size="mini" type="primary" plain icon="el-icon-edit" @click="handleUpdate(scope.row)">维修</el-button> <el-button size="mini" type="primary" plain icon="el-icon-edit" v-if="scope.row.repairStatusCode!='1'" @click="handleUpdate(scope.row)">维修</el-button>
<el-button size="mini" type="danger" icon="el-icon-delete" @click="handleReject(scope.row)">驳回</el-button> <el-button size="mini" type="danger" icon="el-icon-delete" @click="handleReject(scope.row)">驳回</el-button>
<el-button size="mini" type="success" @click="handlePrint(scope.row)">维修任务单</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -109,6 +111,230 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<!-- 维修任务单弹窗 -->
<el-dialog
:title="title"
:visible.sync="openPrint"
width="1100px"
append-to-body
>
<div style="height: 600px; 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: 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
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
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="unitName1" />
<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>
<div
class="tabelAll"
>
<div class="columnAllNum">总计</div>
<div class="columnAll">报修数量</div>
<div class="columnAll">修复数量</div>
<div class="columnAll">报废数量</div>
<div class="columnAll">维修费小计</div>
</div>
<div
class="fillIn"
style="
margin-top: 20px;
display: flex;
justify-content: space-between;
"
>
<div class="item" style="text-align: center;width: 100% ;font-weight: 600; font-size: 14px" >
<div>
<span>维修内容</span>
</div>
</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>
<div
class="tabelAll"
>
<div class="columnAllNum">合计</div>
<div class="columnAll">合计金额</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="item" style="width: 50%">
<div>
<span>负责人</span>
</div>
</div>
<div class="item" style="width: 50%">
<div>
<span>完成日期</span>
</div>
</div>
</div>
<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>
</div> </div>
</template> </template>
@ -116,13 +342,16 @@
import { import {
getRepairTaskList, getRepairTaskList,
rejectRepair rejectRepair,
sendList,
} from '@/api/repair/repair.js' } from '@/api/repair/repair.js'
import { getInfo, h } from '@/api/login' import { getInfo, h } from '@/api/login'
import vueEasyPrint from "vue-easy-print";
export default { export default {
name: '', name: '',
dicts: ['back_task_status'], dicts: ['repair_task_status'],
data() { data() {
return { return {
type: '', type: '',
@ -163,6 +392,12 @@ export default {
companyId: '', companyId: '',
unitList: [], unitList: [],
proList: [], proList: [],
//
openPrint:false,
printData: {},
//taskId
ids:[],
taskList:[],
} }
}, },
created() { created() {
@ -170,6 +405,7 @@ export default {
// this.initSelectData() // this.initSelectData()
// this.InitIGetInfo() // this.InitIGetInfo()
}, },
components: { vueEasyPrint },
methods: { methods: {
// //
InitIGetInfo() { InitIGetInfo() {
@ -208,12 +444,12 @@ export default {
this.$refs.queryForm.resetFields() this.$refs.queryForm.resetFields()
this.handleQuery() this.handleQuery()
}, },
// // //
handleSelectionChange(selection) { // handleSelectionChange(selection) {
this.ids = selection.map((item) => item.taskId) // this.ids = selection.map((item) => item.taskId)
this.single = selection.length != 1 // this.single = selection.length != 1
this.multiple = !selection.length // this.multiple = !selection.length
}, // },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.$emit('handelAdd') this.$emit('handelAdd')
@ -249,7 +485,40 @@ export default {
`维修任务单_${new Date().getTime()}.xlsx`, `维修任务单_${new Date().getTime()}.xlsx`,
) )
}, },
}, //
handlePrint(row) {
this.openPrint = true;
this.title = "机具设备维修任务单";
},
//
handleSend(row){
if (this.ids.length == 0) {
this.$alert("请至少勾选一条要提交的数据", "提示", {
type: "warning",
confirmButtonText: "确定",
});
return;
} else {
sendList(this.taskList).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("通过成功");
}
this.getList()
});
}
},
//
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;
},
},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -300,4 +569,29 @@ export default {
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
} }
.tabelAll {
display: flex;
border: 1px solid #dfe6ec;
margin-bottom: 1px;
width:1000px;
border-bottom: 1px solid #dfe6ec;
border-top: none;
}
.columnAll {
flex: 1;
padding: 5px;
border-left: 1px solid #dfe6ec;
text-align: center;
width:20%;
}
.columnAllNum {
padding: 5px;
text-align: center;
width:50%;
border-left: none;
}
/* 最后一列无右边框 */
.tabelAll .column:last-child {
border-right: none;
}
</style> </style>