|
@@ -103,7 +103,7 @@
|
|
|
<hc-table-input v-model="row.containChangeTotal" :disabled="isView" @blur="containChangeTotalBlur(row)" />
|
|
|
</template>
|
|
|
<template #payRatio="{ row }">
|
|
|
- <hc-table-input v-model="row.payRatio" :disabled="isView || row.upPayRatio === null" @blur="unPayRatioBlur(row)" />
|
|
|
+ <hc-table-input v-model="row.payRatio" :disabled="isNullES(row.upPayRatio) || isView" @blur="unPayRatioBlur(row)" />
|
|
|
</template>
|
|
|
<template #currentMeterMoney="{ row }">
|
|
|
<hc-table-input v-model="row.currentMeterMoney" disabled />
|
|
@@ -123,7 +123,15 @@
|
|
|
</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" :disabled="isView" @upload="attachmentUpload" @change="attachmentUploadChange" />
|
|
|
+ <hc-form-upload
|
|
|
+ type="list"
|
|
|
+ :src="baseForm.fileList"
|
|
|
+ :disabled="isView"
|
|
|
+ :h-props="uploadFormProps"
|
|
|
+ @del="attachMentDel"
|
|
|
+ @upload="attachmentUpload"
|
|
|
+ @change="attachmentUploadChange"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</hc-card-item>
|
|
@@ -281,10 +289,13 @@ watch(() => baseForm.value.fileList, (list) => {
|
|
|
// 验证数组中的对象是否包含名为 'selectId' 的字段
|
|
|
|
|
|
if (list.length > 0) {
|
|
|
- const fieldName = 'selectId'//是否关联质检资料,已关联变为100
|
|
|
+ const fieldName = 'selectId'//是否关联质检资料,已关联变为100(upPayRatio不等于null)
|
|
|
const containsField = list.some(obj => obj.hasOwnProperty(fieldName))
|
|
|
if (containsField) {
|
|
|
addTableData.value.forEach((ele)=>{
|
|
|
+ if (isNullES(ele.upPayRatio)) {
|
|
|
+ return
|
|
|
+ }
|
|
|
ele.upPayRatio = 100
|
|
|
})
|
|
|
} else {
|
|
@@ -689,12 +700,19 @@ const attachmentUpload = () => {
|
|
|
uploadFileOptions.value.size = null
|
|
|
uploadFileRef.value?.selectFile()
|
|
|
}
|
|
|
-const attachmentUploadChange = (a, b, fileList) => {
|
|
|
+const attachmentUploadChange = (name, index, fileList) => {
|
|
|
+
|
|
|
baseForm.value.fileList = getArrValue(fileList)
|
|
|
ischangeByGetNode.value = false
|
|
|
selectId.value = arrToKey( baseForm.value.fileList, 'selectId', ',')
|
|
|
}
|
|
|
-
|
|
|
+const attachMentDel = ({ index, file })=>{
|
|
|
+ const { selectId } = file
|
|
|
+ if (selectId) {
|
|
|
+ window.$message.warning('该文件不可删除')
|
|
|
+ return
|
|
|
+ }
|
|
|
+}
|
|
|
//文件上传
|
|
|
const uploadFileRef = ref(null)
|
|
|
const uploadFileParams = ref({})
|