Browse Source

修改中期申请

duy 1 năm trước cách đây
mục cha
commit
b991185624

+ 23 - 5
src/views/debit-pay/admin/components/middlepay/addModal.vue

@@ -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({})

+ 1 - 1
src/views/debit-pay/admin/middlepay.vue

@@ -13,7 +13,7 @@
         <div :id="`hc_table_card_${uuid}`" class="flex-1">
             <hc-new-card>
                 <template #header>
-                    <div class="text-orange font-400">收方总金额:{{ meterMoney }}元</div>
+                    <div class="text-orange font-400">计量总金额:{{ meterMoney }}元</div>
                 </template>
                 <template #extra>
                     <el-button hc-btn color="red" :disabled="approveStatus !== 0" :loading="autoLoading" @click="autoClick">自动批量计量</el-button>