装备配置率配置
This commit is contained in:
parent
c2f64313fe
commit
d10a41ef8c
|
|
@ -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()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue