问题清单修复
This commit is contained in:
parent
3a18b18490
commit
9003ac1b3c
|
|
@ -17,8 +17,6 @@ declare module 'vue' {
|
|||
ElCascader: typeof import('element-plus/es')['ElCascader']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElCol: typeof import('element-plus/es')['ElCol']
|
||||
ElCollapse: typeof import('element-plus/es')['ElCollapse']
|
||||
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
|
||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||
|
|
@ -35,8 +33,6 @@ declare module 'vue' {
|
|||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
||||
ElProgress: typeof import('element-plus/es')['ElProgress']
|
||||
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
ElStep: typeof import('element-plus/es')['ElStep']
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ const onSelectItem = (type: number) => {
|
|||
style="font-size: 14px; font-weight: normal"
|
||||
@click.stop="onSharedHall(3, son.id, son.name)"
|
||||
>
|
||||
{{ son.name }}
|
||||
{{ son.name }} ( {{ son.maCount }} )
|
||||
</a>
|
||||
</span>
|
||||
|
||||
|
|
|
|||
|
|
@ -1172,7 +1172,7 @@ const onPreviewImg = (fileUrl: any) => {
|
|||
<el-table-column label="序号" align="center" width="80" type="index"></el-table-column>
|
||||
<el-table-column align="center" label="装备名称">
|
||||
<template #default="{ row }">
|
||||
{{ `${row.deviceName} ${row.identifyCode}` }}
|
||||
{{ `${row.deviceName}` }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="code" label="装备编号" />
|
||||
|
|
@ -1974,6 +1974,9 @@ const onPreviewImg = (fileUrl: any) => {
|
|||
.el-dialog__body {
|
||||
flex: 1;
|
||||
overflow-y: scroll !important;
|
||||
.el-table__header-wrapper .el-checkbox {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
.dialog-content {
|
||||
padding: 20px;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<!-- 新增修改对话框 -->
|
||||
<el-dialog
|
||||
width="90%"
|
||||
width="70%"
|
||||
@close="onClose"
|
||||
destroy-on-close
|
||||
:title="dialogTitle"
|
||||
|
|
@ -42,13 +42,21 @@
|
|||
background: '#f2f2f2',
|
||||
color: '#333',
|
||||
}"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column align="center" label="装备信息" width="320">
|
||||
<el-table-column
|
||||
align="center"
|
||||
width="55"
|
||||
type="selection"
|
||||
:selectable="selectable"
|
||||
/>
|
||||
<el-table-column align="center" label="装备信息">
|
||||
<template #default="{ row }">
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
width: 100%;
|
||||
|
|
@ -57,7 +65,7 @@
|
|||
<div>
|
||||
<el-image
|
||||
:src="row.url"
|
||||
style="width: 90px; height: 60px"
|
||||
style="width: 110px; height: 70px"
|
||||
fit="cover"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -88,7 +96,7 @@
|
|||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="维修费用">
|
||||
<!-- <el-table-column align="center" label="维修费用">
|
||||
<template #default="{ row }">
|
||||
<el-input
|
||||
inputmode="numeric"
|
||||
|
|
@ -188,10 +196,10 @@
|
|||
编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
|
||||
<!-- <TitleTip :titleText="`维修费用`" />
|
||||
<TitleTip :titleText="`维修费用`" />
|
||||
<el-form
|
||||
:model="item"
|
||||
:key="item.newId"
|
||||
|
|
@ -218,6 +226,7 @@
|
|||
v-model="item.maId"
|
||||
placeholder="请选择关联装备"
|
||||
@change="onChangeRepair($event, index)"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
:key="item.device"
|
||||
|
|
@ -334,6 +343,7 @@
|
|||
style="width: 100%"
|
||||
v-model="item.maId"
|
||||
placeholder="请选择关联装备"
|
||||
disabled
|
||||
@change="onChangeScrap($event, index)"
|
||||
>
|
||||
<el-option
|
||||
|
|
@ -455,6 +465,7 @@
|
|||
style="width: 100%"
|
||||
v-model="item.maId"
|
||||
placeholder="请选择关联装备"
|
||||
disabled
|
||||
@change="onChangeLoss($event, index)"
|
||||
>
|
||||
<el-option
|
||||
|
|
@ -545,7 +556,7 @@
|
|||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
</el-row>
|
||||
|
||||
<div style="text-align: right; margin-top: 10px">
|
||||
<el-button type="primary" class="primary-lease" @click="onCancel">取消</el-button>
|
||||
|
|
@ -726,6 +737,7 @@ const overhaulDetails = ref<any>({})
|
|||
const scrapFormRefList = ref<any>([])
|
||||
const viewFileInfoList = ref<any>([])
|
||||
const repairFormRefList = ref<any>([])
|
||||
const selectList = ref<any>([])
|
||||
const uploadUrl = import.meta.env.VITE_API_URL + '/file/upload'
|
||||
|
||||
const lossFormList: any = ref([])
|
||||
|
|
@ -829,10 +841,17 @@ const scrapFormRules = reactive({
|
|||
|
||||
// 增加维修设备
|
||||
const onAddRepair = () => {
|
||||
if (selectList.value.length === 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请勾选设备!',
|
||||
})
|
||||
return
|
||||
}
|
||||
const newId = Date.now()
|
||||
repairFormList.value.push({
|
||||
newId,
|
||||
maId: '',
|
||||
maId: selectList.value[0].maId,
|
||||
num: '',
|
||||
typeId: '',
|
||||
repairNum: 0,
|
||||
|
|
@ -843,10 +862,17 @@ const onAddRepair = () => {
|
|||
}
|
||||
// 增加丢失设备
|
||||
const onAddLoss = () => {
|
||||
if (selectList.value.length === 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请勾选设备!',
|
||||
})
|
||||
return
|
||||
}
|
||||
const newId = Date.now()
|
||||
lossFormList.value.push({
|
||||
newId,
|
||||
maId: '',
|
||||
maId: selectList.value[0].maId,
|
||||
num: '',
|
||||
typeId: '',
|
||||
lossNum: 0,
|
||||
|
|
@ -857,10 +883,17 @@ const onAddLoss = () => {
|
|||
}
|
||||
// 增加报废设备
|
||||
const onAddScrap = () => {
|
||||
if (selectList.value.length === 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请勾选设备!',
|
||||
})
|
||||
return
|
||||
}
|
||||
const newId = Date.now()
|
||||
scrapFormList.value.push({
|
||||
newId,
|
||||
maId: '',
|
||||
maId: selectList.value[0].maId,
|
||||
num: '',
|
||||
typeId: '',
|
||||
scrapNum: 0,
|
||||
|
|
@ -1136,6 +1169,27 @@ const onViewFileImg = (row: any, index: number) => {
|
|||
innerVisible.value = true
|
||||
}
|
||||
|
||||
const selectable = (row: any) => {
|
||||
let isDisabled = true
|
||||
if (selectList.value.length === 0) return true
|
||||
if (selectList.value.length > 0) {
|
||||
selectList.value.forEach((e: any) => {
|
||||
if (e.maId === row.maId) {
|
||||
isDisabled = true
|
||||
} else {
|
||||
isDisabled = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return isDisabled
|
||||
}
|
||||
|
||||
const handleSelectionChange = (list: any) => {
|
||||
selectList.value = []
|
||||
selectList.value = list
|
||||
}
|
||||
|
||||
// const onEditDeviceInfo
|
||||
|
||||
watch(
|
||||
|
|
@ -1147,6 +1201,18 @@ watch(
|
|||
},
|
||||
{ deep: true, immediate: true },
|
||||
)
|
||||
watch(
|
||||
() => selectList,
|
||||
(newValue) => {
|
||||
if (newValue.value.length == 0) {
|
||||
console.log('已取消勾选--')
|
||||
lossFormList.value = []
|
||||
scrapFormList.value = []
|
||||
repairFormList.value = []
|
||||
}
|
||||
},
|
||||
{ deep: true },
|
||||
)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
@ -1219,4 +1285,8 @@ h1 {
|
|||
:deep.upload-tip .el-form-item__label {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
:deep(.el-table__header-wrapper) .el-checkbox {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue