ly 2 лет назад
Родитель
Сommit
6ae73fe923
1 измененных файлов с 7 добавлено и 3 удалено
  1. 7 3
      ui/src/views/ehs/jobticket/index.vue

+ 7 - 3
ui/src/views/ehs/jobticket/index.vue

@@ -84,7 +84,7 @@
           v-hasPermi="['ehs:jobticket:add']"
         >{{ $t('新增') }}</el-button>
       </el-col>
-      <el-col :span="1.5">
+<!--      <el-col :span="1.5">
         <el-button
           type="success"
           icon="el-icon-edit"
@@ -103,7 +103,7 @@
           @click="handleDelete"
           v-hasPermi="['ehs:jobticket:remove']"
         >{{ $t('删除') }}</el-button>
-      </el-col>
+      </el-col>-->
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -129,7 +129,7 @@
               row-key="id"
               :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
     >
-      <el-table-column :label="$t('开票日期')" align="center" prop="kprq" width="100">
+      <el-table-column :label="$t('开票日期')" align="center" prop="kprq" width="125">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.kprq, '{y}-{m}-{d}') }}</span>
         </template>
@@ -1038,6 +1038,10 @@ export default {
     },
     /** 删除按钮操作 */
     handleDelete(row) {
+      if (row.children!= null && row.children.length > 0) {
+        this.msgError('存在续票,无法删除主票')
+        return
+      }
       const ids = row.id || this.ids;
       this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
           confirmButtonText: this.$t('确定'),