|
@@ -72,7 +72,7 @@
|
|
|
<span class="text-[13px] text-orange font-400">温馨提示:超计,累计计量量> 变更后数量,分解清单超计整行红色</span>
|
|
|
</template>
|
|
|
<template #extra>
|
|
|
- <el-link type="primary" @click="addBillModalClick">
|
|
|
+ <el-link type="primary" :disabled="!isEdits" @click="addBillModalClick">
|
|
|
<hc-icon name="add" />
|
|
|
<span>添加清单</span>
|
|
|
</el-link>
|
|
@@ -85,10 +85,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="!isEdits" @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="!isEdits" @blur="containChangeTotalBlur(row)" />
|
|
|
</template>
|
|
|
<template #currentMeterMoney="{ row }">
|
|
|
<hc-table-input v-model="row.currentMeterMoney" disabled />
|
|
@@ -97,7 +97,7 @@
|
|
|
<hc-table-input v-model="row.allMeterTotal" disabled />
|
|
|
</template>
|
|
|
<template #action="{ row, index }">
|
|
|
- <el-link type="danger" @click="delAddTableClick(row, index)">删除</el-link>
|
|
|
+ <el-link type="danger" :disabled="!isEdits" @click="delAddTableClick(row, index)">删除</el-link>
|
|
|
</template>
|
|
|
</hc-table>
|
|
|
</hc-card-item>
|
|
@@ -241,7 +241,7 @@ const tableRowStyle = ({ row }) => {
|
|
|
|
|
|
//计算本期计量金额
|
|
|
const currentMeterTotalBlur = (row) => {
|
|
|
-//如果为空
|
|
|
+ //如果为空
|
|
|
let currentMeterTotal = row.currentMeterTotal
|
|
|
const isMeter = isNumberReg(currentMeterTotal)
|
|
|
if (isNullES(currentMeterTotal) || !isMeter) {
|
|
@@ -337,7 +337,11 @@ const uploadFormProps = {
|
|
|
}
|
|
|
|
|
|
const attachmentUpload = () => {
|
|
|
- uploadFileRef.value?.selectFile()
|
|
|
+ if (isEdits.value) {
|
|
|
+ uploadFileRef.value?.selectFile()
|
|
|
+ } else {
|
|
|
+ window.$message.error('当前状态不可上传')
|
|
|
+ }
|
|
|
}
|
|
|
const attachmentUploadChange = (a, b, fileList) => {
|
|
|
baseForm.value.fileList = getArrValue(fileList)
|
|
@@ -369,6 +373,10 @@ const uploadFileSuccess = async ({ resData }) => {
|
|
|
|
|
|
//删除文件
|
|
|
const attachmentUploadDel = ({ file }, resolve) => {
|
|
|
+ if (!isEdits.value) {
|
|
|
+ window.$message.error('当前状态不可删除')
|
|
|
+ return
|
|
|
+ }
|
|
|
delMessage(async () => {
|
|
|
const { error, code, msg } = await mainApi.removeFile(file.id)
|
|
|
if (!error && code === 200) {
|