Prechádzať zdrojové kódy

合同计量单元修改

ZaiZai 1 rok pred
rodič
commit
7405bb13a0

+ 15 - 2
src/views/project/debit/contract/components/unit/row-data.vue

@@ -107,10 +107,11 @@
                         :row-style="tableRowStyle" :is-stripe="false"
                     >
                         <template #buildPictureTotal="{ row }">
-                            <hc-table-input v-model="row.buildPictureTotal" @change="changeBuildPictureTotal(row)" />
+                            <hc-table-input v-model="row.buildPictureTotal" :disabled="row.citeStatus === 1" @change="changeBuildPictureTotal(row)" />
                         </template>
                         <template #action="{ row, index }">
-                            <el-link type="danger" @click="delRow(row, index)">删除</el-link>
+                            <el-link v-if="row.citeStatus === 1" type="info" @click="delNoRow(row)">删除</el-link>
+                            <el-link v-else type="danger" @click="delRow(row, index)">删除</el-link>
                         </template>
                     </hc-table>
                 </div>
@@ -332,6 +333,8 @@ const addCheckFinish = () => {
     })*/
     emit('getDetail', { id: ids.value })
 }
+
+//删除
 const delRow = async (row, index) => {
     delMessageV2(async (action, instance, done) => {
         if (action === 'confirm') {
@@ -344,6 +347,16 @@ const delRow = async (row, index) => {
         }
     })
 }
+
+//禁止删除
+const delNoRow = () => {
+    window.$messageBox({
+        title: '提示',
+        message: '该清单已被引用,不允许删除',
+        type: 'warning',
+    })
+}
+
 const removeCon = async (id, index) => {
     const { error, code } = await unitApi.removeInfo({
         formIds: id,