台账管理页面修改

This commit is contained in:
lSun 2026-01-22 20:33:39 +08:00
parent 41d92dd90f
commit 1d070e8054
4 changed files with 1350 additions and 1025 deletions

View File

@ -360,3 +360,11 @@ export const getDevDetailsApi = (data) => {
params: data
})
}
// 获取特征值
export const getConfigApi = (data) => {
return request({
url: `/material-mall/equipment/field/getConfig`,
method: 'GET',
})
}

View File

@ -118,6 +118,14 @@
<el-input v-model="form.propertyUnit" placeholder="产权单位" readonly/>
</el-form-item>
</el-col>
<el-col :span="6" v-for="(item, index) in form.fieldVoList" :key="index">
<el-form-item :label="item.propertyName" >
<el-input v-model="item.propertyValue" readonly/>
</el-form-item>
</el-col>
</el-row>
<div style="display: flex; padding-bottom: 10px">
@ -303,7 +311,7 @@
/>
</el-form-item>
<el-form-item label="装备二维码" prop="">
<el-form-item label="装备二维码111" prop="">
<div class="qrcode-box" style="width: 150px;height: 150px">
<QrcodeGenerator
ref="qr3"

File diff suppressed because it is too large Load Diff

View File

@ -346,6 +346,64 @@
</template>
</el-table-column>
<!-- 动态生成 fieldVoList -->
<el-table-column
v-for="(item, index) in fieldVoList"
:key="index"
align="center"
show-overflow-tooltip
:label="item.propertyName"
:prop="item.propertyCode"
min-width="200px"
>
<!-- <template v-slot="{ row }">
<div
v-if="
(index + 1) % 2 === 0 &&
row.isNew &&
row.fieldVoList.length > 0 &&
row.fieldVoList[(index + 1) / 2 - 1]
"
>
<el-input
v-if="row.fieldVoList[(index + 1) / 2 - 1].inputType == 1"
autocomplete="off"
maxlength="30"
v-model="row.fieldVoList[(index + 1) / 2 - 1].propertyValue"
clearable
/>
<el-select
v-if="row.fieldVoList[(index + 1) / 2 - 1].inputType == 2"
v-model="row.fieldVoList[(index + 1) / 2 - 1].propertyValue"
placeholder="请选择"
clearable
style="width: 100%"
>
<el-option
v-for="(item, index) in row.fieldVoList[(index + 1) / 2 - 1].valueList"
:key="index"
:label="item.value"
:value="item.value"
/>
</el-select>
</div>
<span
v-else-if="
row.isNew &&
row.fieldVoList.length > 0 &&
row.fieldVoList[Math.ceil(index / 2)] &&
row.fieldVoList[Math.ceil(index / 2)].mustHave != 0
"
style="color: red"
>{{ getFeatureValue(row, item.prop) }}</span
>
<span v-else>{{ getFeatureValue(row, item.prop) }}</span>
</template>-->
</el-table-column>
<el-table-column
v-for="(item, index) in columns"
v-if="item.visible"
@ -627,6 +685,9 @@
<script>
import EquipmentEntryEditDialog from '@/views/EquipmentEntryApply/equipmentInput/edit.vue'
import AddEquip from './AddEquip'
import {
getConfigApi
} from '@/api/EquipmentEntryApply'
// 使defineComponent
import {
@ -760,6 +821,8 @@ export default {
{ key: 42, label: `特征项9`, prop: 'featureItem9', visible: true },
{ key: 43, label: `特征值9`, prop: 'featureValue9', visible: true }
],
fieldVoList:[],
dialogVisible: false,
dialogTitle: '',
dialogList: [],
@ -776,6 +839,7 @@ export default {
watch: {
isVisible(val) {
if (val) {
this.getConfig()
this.getList()
}
}
@ -783,6 +847,7 @@ export default {
mounted() {
this.getManufacturerSelectList()
this.getConfig()
},
methods: {
handleNumberInput(key) {
@ -985,6 +1050,14 @@ export default {
}
})
},
getConfig() {
getConfigApi().then(res => {
this.fieldVoList = res.data.config || []
})
},
//
async getList() {
try {
@ -1003,6 +1076,8 @@ export default {
const res = await getDeviceByOrderIdApi(params)
this.tableData = res.data.rows
this.total = res.data.total
} catch (error) {
console.error('获取列表失败:', error)
}