装备配置率配置

This commit is contained in:
jiang 2026-01-27 17:35:16 +08:00
parent c2f64313fe
commit d10a41ef8c
3 changed files with 1247 additions and 1258 deletions

View File

@ -366,14 +366,12 @@ export default {
//3.6.7.8. //3.6.7.8.
// \n // \n
this.dialogRow = this.dialogRow =
`装备名称:${row.name}\r\n` + `${row.name}\r\n` +
`装备编码:${row.code}\r\n` + `${row.code}\r\n` +
`规格型号:${row.specificationModel}\r\n` + `${row.specificationModel}\r\n` +
`产权单位:${row.propertyUnit}\r\n` + `${row.propertyUnit}\r\n` +
`装备小类:${row.subCategory}\r\n` + `${row.manufacturer}\r\n` +
`生产厂家:${row.manufacturer}\r\n` + `${row.productionDate}\r\n`
`出厂日期:${row.productionDate}\r\n` +
`特征属性:{${property}}`
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.qr3?.refreshQrcode() this.$refs.qr3?.refreshQrcode()
}) })

View File

@ -1,4 +1,4 @@
<template> <template>
<!-- 弹窗内容区域 --> <!-- 弹窗内容区域 -->
<el-dialog <el-dialog
:title="pageTitle" :title="pageTitle"
@ -517,10 +517,10 @@
</div> </div>
</el-dialog> </el-dialog>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { import {
addInterDevice, addInterDevice,
getEquipmentAddIdApi, getEquipmentAddIdApi,
firstLevel, firstLevel,
@ -530,15 +530,15 @@
equipmentEditApiNew, equipmentEditApiNew,
getEquipmentPropertyTypeApi, getEquipmentPropertyTypeApi,
getConfigApi getConfigApi
} from '@/api/EquipmentEntryApply' } from '@/api/EquipmentEntryApply'
import { getManufacturerSelectApi } from '@/api/EquipmentLedger/index.js' import { getManufacturerSelectApi } from '@/api/EquipmentLedger/index.js'
import ImageUpload from '@/components/ImageUpload' import ImageUpload from '@/components/ImageUpload'
import FileUpload from '@/components/FileImageUpload' import FileUpload from '@/components/FileImageUpload'
import { handlePositiveNumberInput } from '@/utils/bonus.js' import { handlePositiveNumberInput } from '@/utils/bonus.js'
import { addFacturer } from '@/api/ma/supplier' import { addFacturer } from '@/api/ma/supplier'
import { deptTreeSelect } from '@/api/system/user' import { deptTreeSelect } from '@/api/system/user'
export default { export default {
name: 'EquipmentEntryEditDialog', // name: 'EquipmentEntryEditDialog', //
emits: ['update:isVisible', 'submit', 'getOrderId'], // emits: ['update:isVisible', 'submit', 'getOrderId'], //
dicts: ['dev_unit_type'], dicts: ['dev_unit_type'],
@ -618,8 +618,8 @@
// mainFileList: [{ required: true, message: '', trigger: 'change' }], // mainFileList: [{ required: true, message: '', trigger: 'change' }],
}, },
propertyVoList: [], // propertyVoList: [], //
isSystem:[], // isSystem: [], //
config:[], // config: [], //
systemFieldMap: {} systemFieldMap: {}
} }
}, },
@ -737,7 +737,6 @@
}) })
}, },
parseSelectOptions(value) { parseSelectOptions(value) {
if (!value) return [] if (!value) return []
// 1 // 1
@ -783,7 +782,7 @@
await this.getDeptTreeSelect() await this.getDeptTreeSelect()
if (type === 'edit') { if (type === 'edit') {
this.pageTitle = '编辑装备' this.pageTitle = '编辑装备'
this.isEdit = true this.isEdit = false
this.maId = id this.maId = id
this.getInfo() this.getInfo()
} else { } else {
@ -806,19 +805,19 @@
Object.assign(this.form, res.data) Object.assign(this.form, res.data)
if (res.data) { if (res.data) {
let row = res.data let row = res.data
if(row.fieldVoList){ if (row.fieldVoList) {
this.config = row.fieldVoList this.config = row.fieldVoList
// fieldVoList form // fieldVoList form
this.config.forEach(item => { this.config.forEach(item => {
if (!item.propertyCode) return; // if (!item.propertyCode) return //
if (item.inputType == 'SELECT' && item.value) { if (item.inputType == 'SELECT' && item.value) {
// //
this.$set(this.form, item.propertyCode, item.propertyValue ? item.propertyValue.split(',') : []); this.$set(this.form, item.propertyCode, item.propertyValue ? item.propertyValue.split(',') : [])
} else { } else {
this.$set(this.form, item.propertyCode, item.propertyValue ?? ''); this.$set(this.form, item.propertyCode, item.propertyValue ?? '')
} }
}); })
} }
const propertyList = row.propertyVoList || [] const propertyList = row.propertyVoList || []
@ -831,14 +830,12 @@
.join(',') .join(',')
//3.6.7.8. //3.6.7.8.
this.dialogRow = this.dialogRow =
`装备名称:${row.name}\r\n` + `${row.name}\r\n` +
`装备编码:${row.code}\r\n` + `${row.code}\r\n` +
`规格型号:${row.specificationModel}\r\n` + `${row.specificationModel}\r\n` +
`产权单位:${row.propertyUnit}\r\n` + `${row.propertyUnit}\r\n` +
`装备小类:${row.subCategory}\r\n` + `${row.manufacturer}\r\n` +
`生产厂家:${row.manufacturer}\r\n` + `${row.productionDate}\r\n`
`出厂日期:${row.productionDate}\r\n` +
`特征属性:{${property}}`
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.qr3?.refreshQrcode() this.$refs.qr3?.refreshQrcode()
@ -1036,7 +1033,7 @@
this.isSubmit = true this.isSubmit = true
const loading = this.$loading() const loading = this.$loading()
try { try {
var fieldVoList = []; var fieldVoList = []
// //
if (this.config && this.config.length > 0) { if (this.config && this.config.length > 0) {
this.config.forEach(item => { this.config.forEach(item => {
@ -1047,9 +1044,6 @@
}) })
} }
if (!this.form.orderId && !this.isEdit) { if (!this.form.orderId && !this.isEdit) {
const result = await getEquipmentAddIdApi() const result = await getEquipmentAddIdApi()
this.orderId = result.data.id this.orderId = result.data.id
@ -1142,7 +1136,7 @@
inspectionReports, inspectionReports,
purchaseInvoices, purchaseInvoices,
propertyVoList: this.propertyVoList, propertyVoList: this.propertyVoList,
fieldVoList:fieldVoList fieldVoList: fieldVoList
} }
if (this.maId) { if (this.maId) {
params.maId = this.maId params.maId = this.maId
@ -1232,15 +1226,15 @@
}) })
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.dialog-content { .dialog-content {
padding: 20px; padding: 20px;
} }
.page-header { .page-header {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 20px; margin-bottom: 20px;
@ -1255,29 +1249,29 @@
margin-left: 15px; margin-left: 15px;
color: #303133; color: #303133;
} }
} }
.dialog-content { .dialog-content {
padding: 10px 0; padding: 10px 0;
min-height: 200px; // min-height: 200px; //
} }
.goBack-btn:hover { .goBack-btn:hover {
cursor: pointer; cursor: pointer;
color: #33b5a0; color: #33b5a0;
} }
.dialog-footer { .dialog-footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
gap: 10px; // gap: 10px; //
} }
::v-deep .el-input-number.is-without-controls .el-input__inner { ::v-deep .el-input-number.is-without-controls .el-input__inner {
text-align: left; text-align: left;
} }
.select-box { .select-box {
width: 100%; width: 100%;
height: 260px; height: 260px;
border: 1px solid #dcdcdc; border: 1px solid #dcdcdc;
@ -1300,28 +1294,28 @@
text-align: center; text-align: center;
color: #c0c4cc; color: #c0c4cc;
} }
} }
/* 紧凑表单行距 */ /* 紧凑表单行距 */
::v-deep .el-form-item { ::v-deep .el-form-item {
margin-bottom: 16px; margin-bottom: 16px;
} }
::v-deep.el-tag.el-tag--info { ::v-deep.el-tag.el-tag--info {
background-color: #F5F5F5; background-color: #F5F5F5;
border-color: #B3B3B3; border-color: #B3B3B3;
color: #B3B3B3; color: #B3B3B3;
} }
::v-deep.el-tag.el-tag--warn { ::v-deep.el-tag.el-tag--warn {
background-color: rgba(255, 171, 41, 0.1);; background-color: rgba(255, 171, 41, 0.1);;
border: #FFAB29; border: #FFAB29;
color: #FFAB29; color: #FFAB29;
} }
::v-deep.el-tag.el-tag--success { ::v-deep.el-tag.el-tag--success {
background-color: rgba(52, 226, 199, 0.1); background-color: rgba(52, 226, 199, 0.1);
border-color: #34E2C7; border-color: #34E2C7;
color: #34E2C7; color: #34E2C7;
} }
</style> </style>

View File

@ -380,33 +380,29 @@
<el-form :inline="true" :model="searchForm.own" class="demo-form-inline"> <el-form :inline="true" :model="searchForm.own" class="demo-form-inline">
<el-form-item label="装备名称"> <el-form-item label="装备名称">
<el-input <el-input
v-model="searchForm.own.equipmentName" v-model="searchForm.own.name"
placeholder="请输入装备名称" placeholder="请输入装备名称"
clearable clearable
size="small"
/> />
</el-form-item> </el-form-item>
<el-form-item label="装备类型"> <el-form-item label="装备类型">
<el-select <el-select v-model="searchForm.own.type" placeholder="请选择分类"
v-model="searchForm.own.equipmentType" style="width: 100%;"
placeholder="请选择装备类型" clearable filterable @change="handleCategoryChange"
clearable
size="small"
> >
<el-option <el-option
v-for="item in equipmentTypeOptions" v-for="item in categoryList"
:key="item.value" :key="item.uniqueKey"
:label="item.label" :label="`${item.equipmentName}(${item.devType})`"
:value="item.value" :value="item.equipmentName"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="规格型号"> <el-form-item label="规格型号">
<el-input <el-input
v-model="searchForm.own.specModel" v-model="searchForm.own.specificationModel"
placeholder="请输入规格型号" placeholder="请输入规格型号"
clearable clearable
size="small"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -904,9 +900,9 @@ export default {
// //
searchForm: { searchForm: {
own: { own: {
equipmentName: '', name: '',
equipmentType: '', type: '',
specModel: '' specificationModel: ''
}, },
sharing: { sharing: {
equipmentName: '', equipmentName: '',
@ -1387,15 +1383,16 @@ export default {
async handleInstanceTableOwn() { async handleInstanceTableOwn() {
// //
this.searchForm.own = { this.searchForm.own = {
equipmentName: '', name: '',
equipmentType: '', type: '',
specModel: '' specificationModel: ''
} }
this.selectedOwnRows = [] this.selectedOwnRows = []
// //
this.tableData.own.pageNum = 1 this.tableData.own.pageNum = 1
// //
await this.loadOwnEquipmentData() await this.loadOwnEquipmentData()
await this.getCategoryList()
this.ownOpen = true this.ownOpen = true
}, },
async loadOwnEquipmentData() { async loadOwnEquipmentData() {
@ -1427,9 +1424,9 @@ export default {
}, },
resetOwnSearch() { resetOwnSearch() {
this.searchForm.own = { this.searchForm.own = {
equipmentName: '', name: '',
equipmentType: '', type: '',
specModel: '' specificationModel: ''
} }
this.tableData.own.pageNum = 1 this.tableData.own.pageNum = 1
this.loadOwnEquipmentData() this.loadOwnEquipmentData()