Explorar o código

园区重点项目的删除

lcmxs hai 1 ano
pai
achega
249256ec3c
Modificáronse 1 ficheiros con 17 adicións e 6 borrados
  1. 17 6
      src/views/ARTICLE/index.vue

+ 17 - 6
src/views/ARTICLE/index.vue

@@ -97,7 +97,7 @@
     </el-row>
 
     <el-table :data="ARTICLEList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection"></el-table-column>
+      <el-table-column type="selection" :selectable="selected"></el-table-column>
       <el-table-column label="保税区名称" align="center" prop="deptName">
         <template slot-scope="scope">
           {{ scope.row.deptName }}
@@ -193,6 +193,14 @@
             v-hasPermi="['business:ARTICLE:edit']"
             >数据填报</el-button
           >
+          <el-button
+            size="mini"
+            type="text"
+            v-if="scope.row.status == 0"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['business:ARTICLE:remove']"
+          >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
@@ -338,6 +346,14 @@ export default {
     this.getqueryArticleDate();
   },
   methods: {
+    //选择规则
+    selected(row, index) {
+      if (row.status != 0) { // 选择多选框的功能就拿来批量删除,所以不是草稿禁选
+        return false
+      } else {
+        return true;
+      }
+    },
     //获取填报时间
     getqueryArticleDate() {
       getqueryArticleDate().then(res => {
@@ -465,11 +481,6 @@ export default {
         this.$message.error('截止时间不能早于开始时间');
         return
       }
-      // this.form.beginTime = new Date(this.form.beginTime).getTime();
-      // this.form.endTime= new Date(this.form.endTime).getTime();
-      // console.log()
-      // this.form.beginTime= new Date(this.form.beginTime);
-      // this.form.endTime = new Date(this.form.endTime);
       const timeData = [new Date(this.form.beginTime).getTime(), new Date(this.form.endTime).getTime()];
 
       articleDate(timeData).then(res => {