|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <hc-new-dialog is-table widths="95%" :show="isShow" :title="`中间计量${dataId ? '修改' : '新增'}`" @save="addModalSave" @close="addModalClose">
|
|
|
+ <hc-new-dialog is-table widths="95%" :show="isShow" :title="`中间计量${dataId ? '修改' : '新增'}`" :footer="!isView " @save="addModalSave" @close="addModalClose">
|
|
|
<div v-loading="isLoading" class="relative h-full flex">
|
|
|
<div v-if="!dataId" :id="`hc_tree_card_${uuid}`" class="hc_tree_card_border relative">
|
|
|
<hc-body scrollbar padding="0px">
|
|
@@ -10,7 +10,7 @@
|
|
|
<hc-body scrollbar padding="0px">
|
|
|
<!-- 基础表单 -->
|
|
|
<hc-card-item>
|
|
|
- <el-form ref="baseFormRef" :model="baseForm" :rules="baseFormRules" label-position="left" label-width="auto">
|
|
|
+ <el-form ref="baseFormRef" :model="baseForm" :rules="baseFormRules" label-position="left" label-width="auto" :disabled="isView">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="计量期:" prop="contractPeriodId">
|
|
@@ -61,7 +61,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="16">
|
|
|
<el-form-item label="草图文件:">
|
|
|
- <hc-form-upload :src="baseForm.pictureList" :h-props="uploadFormProps" @upload="formUpload" @change="formUploadChange" />
|
|
|
+ <hc-form-upload :src="baseForm.pictureList" :h-props="uploadFormProps" :disabled="isView" @upload="formUpload" @change="formUploadChange" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
@@ -79,7 +79,7 @@
|
|
|
<span class="text-orange font-400">温馨提示:超计,累计计量量> 变更后数量,分解清单超计整行红色</span>
|
|
|
</template>
|
|
|
<template #extra>
|
|
|
- <el-button type="primary" text @click="addBillBaseModalClick">
|
|
|
+ <el-button type="primary" text :disabled="isView" @click="addBillBaseModalClick">
|
|
|
<HcIcon name="add" />
|
|
|
<span>添加清单</span>
|
|
|
</el-button>
|
|
@@ -92,10 +92,10 @@
|
|
|
<hc-table-input v-model="row.changeTotal" disabled />
|
|
|
</template>
|
|
|
<template #currentMeterTotal="{ row }">
|
|
|
- <hc-table-input v-model="row.currentMeterTotal" @blur="currentMeterTotalBlur(row)" />
|
|
|
+ <hc-table-input v-model="row.currentMeterTotal" :disabled="isView" @blur="currentMeterTotalBlur(row)" />
|
|
|
</template>
|
|
|
<template #containChangeTotal="{ row }">
|
|
|
- <hc-table-input v-model="row.containChangeTotal" @blur="containChangeTotalBlur(row)" />
|
|
|
+ <hc-table-input v-model="row.containChangeTotal" :disabled="isView" @blur="containChangeTotalBlur(row)" />
|
|
|
</template>
|
|
|
<template #currentMeterMoney="{ row }">
|
|
|
<hc-table-input v-model="row.currentMeterMoney" disabled />
|
|
@@ -104,7 +104,7 @@
|
|
|
<hc-table-input v-model="row.allMeterTotal" disabled />
|
|
|
</template>
|
|
|
<template #action="{ index }">
|
|
|
- <el-link type="danger" @click="delAddTableClick(index)">删除</el-link>
|
|
|
+ <el-link type="danger" :disabled="isView" @click="delAddTableClick(index)">删除</el-link>
|
|
|
</template>
|
|
|
</hc-table>
|
|
|
</hc-card-item>
|
|
@@ -115,7 +115,7 @@
|
|
|
</template>
|
|
|
<el-form :model="baseForm" label-position="left" label-width="auto">
|
|
|
<el-form-item label="上传附件">
|
|
|
- <hc-form-upload type="list" :src="baseForm.fileList" :h-props="uploadFormProps" @upload="attachmentUpload" @change="attachmentUploadChange" />
|
|
|
+ <hc-form-upload type="list" :src="baseForm.fileList" :h-props="uploadFormProps" :disabled="isView" @upload="attachmentUpload" @change="attachmentUploadChange" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</hc-card-item>
|
|
@@ -169,6 +169,10 @@ const props = defineProps({
|
|
|
type: [String, Number],
|
|
|
default: '',
|
|
|
},
|
|
|
+ isView:{
|
|
|
+ type:Boolean,
|
|
|
+ default:false, //是否预览
|
|
|
+ },
|
|
|
})
|
|
|
|
|
|
//事件
|
|
@@ -180,6 +184,7 @@ const period_id = ref(props.periodId)
|
|
|
const pid = ref(props.projectId)
|
|
|
const cid = ref(props.contractId)
|
|
|
const isLoading = ref(false)
|
|
|
+const isView = ref(props.isView)
|
|
|
|
|
|
//双向绑定
|
|
|
// eslint-disable-next-line no-undef
|
|
@@ -193,11 +198,13 @@ watch(() => [
|
|
|
props.contractId,
|
|
|
props.allPeriods,
|
|
|
props.periodId,
|
|
|
-], ([projectId, contractId, periods, periodId]) => {
|
|
|
+ props.isView,
|
|
|
+], ([projectId, contractId, periods, periodId, view]) => {
|
|
|
period.value = periods
|
|
|
pid.value = projectId
|
|
|
cid.value = contractId
|
|
|
period_id.value = periodId
|
|
|
+ isView.value = view
|
|
|
setBasePeriodForm(periodId)
|
|
|
}, { deep: true })
|
|
|
|