Merge remote-tracking branch 'origin/anhui-mall-ui-test' into anhui-mall-ui-test

This commit is contained in:
lizhenhua 2025-12-11 17:55:37 +08:00
commit 0476816d95
7 changed files with 103 additions and 17 deletions

View File

@ -17,6 +17,14 @@ export const getRetireApplyDetailAPI = (id) => {
})
}
// 根据maIds获取设备信息
export const getDeviceByMaIdsAPI = (maIds) => {
return request({
url: `/material-mall/deviceRetireApply/getDetail/${maIds}`,
method: 'GET',
})
}
// 获取在修装备和工具列表(统一接口)
export const getScrapItemListAPI = (data) => {
return request({

View File

@ -147,6 +147,7 @@
border
stripe
height="546"
@row-dblclick="handleDblClick"
>
<el-table-column
label="序号"
@ -538,7 +539,7 @@
type="text"
icon="el-icon-edit"
@click="editRowInfo(row)"
v-if="row.orderStatus == '3' && !isAddVisible"
v-if="row.orderStatus == '3' && !isAddVisible && !row.isNew"
>
编辑
</el-button>
@ -1355,6 +1356,33 @@ export default {
.replace(/\.{2,}/g, '.') // ->
.replace(/^(\d+)\.(.*)\./, '$1.$2') //
},
async handleDblClick(row, column, event) {
this.$set(row, 'majorList', [])
this.$set(row, 'processList', [])
this.$set(row, 'categoryList', [])
this.$set(row, 'process', [String(row.mainProcessId), String(row.subProcessId)])
row.branchId
? this.$set(row, 'category', [String(row.mainCategoryId), String(row.subCategoryId), String(row.branchId)])
: this.$set(row, 'category', [String(row.mainCategoryId), String(row.subCategoryId)])
await this.getFirstLevel(row)
await this.majorChange(row.majorId, row)
await this.processChange(row.process, row)
if (!row.propertyVoList) row.propertyVoList = []
row.propertyVoList.forEach((item) => {
if (item.inputType == 2) {
item.valueList = this.handleData(item.value)
}
if (item.inputType == 3) {
item.valueList2 = this.handleData(item.value)
this.$set(item, 'propertyValues', item.propertyValue ? item.propertyValue.split(',') : [])
}
})
//
console.log('双击的行数据:', row)
this.$set(row, 'isNew', !row.isNew)
},
submitRow(row) {
console.log('🚀 ~ row:', row)
try {

View File

@ -136,14 +136,11 @@
</span>
</template>
</el-table-column>
<!-- <el-table-column align="center" show-overflow-tooltip prop="address" label="操作">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="onHandleRetire(scope.row)">退役</el-button>
&lt;!&ndash; <el-button type="primary" size="mini" @click="onHandleRetireEquipment(scope.row)">
退役装备
</el-button> &ndash;&gt;
</template>
</el-table-column>-->
<el-table-column align="center" show-overflow-tooltip prop="address" label="操作">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="onHandleRetire(scope.row)">退役</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="pagination-wrapper">
@ -219,9 +216,15 @@ export default {
},
// 退
onHandleRetire() {
onHandleRetire(row) {
console.log('退役按钮')
this.$router.push('/equipment/equ-retire')
// this.$router.push('/equipment/equ-retire')
this.$router.push({
path: '/equipment/retire-apply/detail/new',
query: {
maId: row.maId,
}
})
},
//
onHandleReset() {

View File

@ -120,7 +120,7 @@
</template>
<script>
import { getRetireApplyDetailAPI, submitRetireApplyTaskAPI } from '@/api/EquipmentRetireApply/index.js'
import { getRetireApplyDetailAPI, submitRetireApplyTaskAPI, getDeviceByMaIdsAPI } from '@/api/EquipmentRetireApply/index.js'
import AddItemDialog from './components/AddItemDialog'
import { getToken } from '@/utils/auth'
@ -159,6 +159,20 @@ export default {
}
},
methods: {
async getInfo(){
try {
const res = await getDeviceByMaIdsAPI(this.$route.query.maId)
if (!res.data || res.data.length === 0) return
this.detailList = res.data.map(item => ({
...item,
scrapQuantity: item.scrapNum,
retireReason: item.reasonVal,
bmFileInfos: item.bmFileInfos || [],
}))
} catch (error) {
console.log('🚀 ~ error:', error)
}
},
async getDetail() {
const id = this.$route.params.id
if (id === 'new') {
@ -349,7 +363,12 @@ export default {
},
created() {
this.getDetail()
if (this.$route.params.id) {
this.getDetail()
}
if (this.$route.query.maId) {
this.getInfo()
}
}
}
</script>

View File

@ -97,7 +97,7 @@
</el-form>
</el-card>
<el-card style="margin-top: 20px">
<el-card class="content-box" style="margin-top: 20px">
<el-row :gutter="10" class="mb8" style="text-align: right">
<el-col :span="24">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
@ -553,4 +553,18 @@ body {
::v-deep .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
background-color: #8decf1;
}
.content-box {
border-radius: 8px;
height: calc(100vh - 220px);
display: flex;
flex-direction: column;
overflow: hidden;
::v-deep .el-card__body {
display: flex !important;
flex-direction: column !important;
height: 100% !important;
padding: 20px;
}
}
</style>

View File

@ -31,7 +31,7 @@
<!-- 流程列表 -->
<el-card class="box-card">
<el-card class="content-box">
<!-- 操作按钮 -->
<el-row style="float:right;margin-bottom: 10px">
<el-button type="primary" size="small" icon="el-icon-plus" @click="handleAdd">新增流程</el-button>
@ -221,9 +221,23 @@ export default {
}
</script>
<style scoped>
<style scoped lang="scss">
.box-card {
margin-bottom: 20px;
}
.content-box {
border-radius: 8px;
height: calc(100vh - 240px);
display: flex;
flex-direction: column;
overflow: hidden;
::v-deep .el-card__body {
display: flex !important;
flex-direction: column !important;
height: 100% !important;
padding: 20px;
}
}
</style>

View File

@ -96,7 +96,7 @@
<el-table
:data="projectList"
show-overflow-tooltip
border stripe height="646"
border stripe height="550"
@selection-change="handleSelectionChange"
>
<!--复选列-->