Explorar o código

20221026_sun项目申报模块

15143018065 %!s(int64=2) %!d(string=hai) anos
pai
achega
ef95ec9210

+ 3 - 0
ruoyi-modules/mz-business-xmsb/src/main/java/com/ruoyi/business/domain/ZwywXmsbCommon.java

@@ -195,6 +195,9 @@ public class ZwywXmsbCommon extends BaseEntity
     @TableField(exist = false)
     private String xmlxName;
 
+    @TableField(exist = false)
+    private String shFlg;
+
     /**
      * 用来存放关联项目申报备案信息
      */

+ 4 - 0
ruoyi-modules/mz-business-xmsb/src/main/java/com/ruoyi/business/service/impl/ZwywXmsbCommonServiceImpl.java

@@ -19,6 +19,7 @@ import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.system.api.RemoteDictDataService;
 import com.ruoyi.system.api.domain.SysDictData;
 import com.ruoyi.system.api.enums.DataStatus;
+import com.ruoyi.system.api.enums.ExamineStatus;
 import com.ruoyi.system.api.enums.XmsbStatus;
 import com.ruoyi.system.mapper.SysDeptJlMapper;
 import org.apache.commons.lang3.ObjectUtils;
@@ -127,6 +128,9 @@ public class ZwywXmsbCommonServiceImpl implements IZwywXmsbCommonService
         }
         List<ZwywXmsbCommon> res = zwywXmsbCommonMapper.selectList(lqw);
         res.forEach(r -> {
+            if (StringUtils.isEmpty(deptLevel.get(0))) {
+                r.setShFlg(ExamineStatus.SNO.getCode());
+            }
             r.setSzdqName(sysDeptJlMapper.getXzqhNames(r.getSzdq()));
             ZwywXmsbXmlx xmlx = xwywXmsbXmlxMapper.selectById(r.getXmlx());
             if (ObjectUtils.isNotEmpty(xmlx)) {

+ 11 - 5
ruoyi-modules/mz-business-xmsb/src/main/java/com/ruoyi/business/service/impl/ZwywXmsbFjlxServiceImpl.java

@@ -1,13 +1,16 @@
 package com.ruoyi.business.service.impl;
 
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import java.util.Arrays;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.ruoyi.business.mapper.ZwywXmsbFjlxMapper;
 import com.ruoyi.business.domain.ZwywXmsbFjlx;
+import com.ruoyi.business.mapper.ZwywXmsbFjlxMapper;
 import com.ruoyi.business.service.IZwywXmsbFjlxService;
+import com.ruoyi.common.core.exception.ServiceException;
+import com.ruoyi.common.core.utils.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Arrays;
+import java.util.List;
 
 /**
  * 项目申报附件类型信息Service业务层处理
@@ -42,6 +45,9 @@ public class ZwywXmsbFjlxServiceImpl implements IZwywXmsbFjlxService
     @Override
     public List<ZwywXmsbFjlx> selectZwywXmsbFjlxList(ZwywXmsbFjlx zwywXmsbFjlx)
     {
+        if (StringUtils.isEmpty(zwywXmsbFjlx.getXmlxId())){
+            throw new ServiceException("项目类型不能为空");
+        }
         return zwywXmsbFjlxMapper.selectList(new LambdaQueryWrapper<>(zwywXmsbFjlx));
     }
 

+ 11 - 5
ruoyi-modules/mz-business-xmsb/src/main/java/com/ruoyi/business/service/impl/ZwywXmsbXmbdpzServiceImpl.java

@@ -1,13 +1,16 @@
 package com.ruoyi.business.service.impl;
 
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import java.util.Arrays;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.ruoyi.business.mapper.ZwywXmsbXmbdpzMapper;
 import com.ruoyi.business.domain.ZwywXmsbXmbdpz;
+import com.ruoyi.business.mapper.ZwywXmsbXmbdpzMapper;
 import com.ruoyi.business.service.IZwywXmsbXmbdpzService;
+import com.ruoyi.common.core.exception.ServiceException;
+import com.ruoyi.common.core.utils.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Arrays;
+import java.util.List;
 
 /**
  * 项目申报项目类型单配置信息Service业务层处理
@@ -42,6 +45,9 @@ public class ZwywXmsbXmbdpzServiceImpl implements IZwywXmsbXmbdpzService
     @Override
     public List<ZwywXmsbXmbdpz> selectZwywXmsbXmbdpzList(ZwywXmsbXmbdpz zwywXmsbXmbdpz)
     {
+        if (StringUtils.isEmpty(zwywXmsbXmbdpz.getXmlxId())){
+            throw new ServiceException("项目类型不能为空");
+        }
         return zwywXmsbXmbdpzMapper.selectList(new LambdaQueryWrapper<>(zwywXmsbXmbdpz));
     }
 

+ 1 - 5
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywXmsbCommonController.java

@@ -3,7 +3,6 @@ package com.ruoyi.business.controller;
 import com.ruoyi.business.domain.ZwywXmsbCommon;
 import com.ruoyi.business.domain.ZwywXmsbXmbdpz;
 import com.ruoyi.business.service.IZwywXmsbCommonService;
-import com.ruoyi.common.core.exception.ServiceException;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.web.controller.BaseController;
@@ -42,9 +41,6 @@ public class ZwywXmsbCommonController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(ZwywXmsbCommon zwywXmsbCommon)
     {
-        if (zwywXmsbCommon.getXmlx() == null || "".equals(zwywXmsbCommon.getXmlx())){
-            throw new ServiceException("项目类型不能为空");
-        }
         startPage();
         List<ZwywXmsbCommon> list = zwywXmsbCommonService.selectZwywXmsbCommonList(zwywXmsbCommon);
         return getDataTable(list);
@@ -91,7 +87,7 @@ public class ZwywXmsbCommonController extends BaseController
     @PostMapping
     public AjaxResult add(@Validated({AddGroup.class}) @RequestBody ZwywXmsbCommon zwywXmsbCommon)
     {
-        if (zwywXmsbCommon.getXmlx() == null || "".equals(zwywXmsbCommon.getXmlx())){
+        if (StringUtils.isEmpty(zwywXmsbCommon.getXmlx())){
             return AjaxResult.error("项目类型不能为空");
         }
         return toAjax(zwywXmsbCommonService.insertZwywXmsbCommon(zwywXmsbCommon),zwywXmsbCommon.getId());

+ 2 - 5
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywXmsbFjlxController.java

@@ -2,7 +2,7 @@ package com.ruoyi.business.controller;
 
 import com.ruoyi.business.domain.ZwywXmsbFjlx;
 import com.ruoyi.business.service.IZwywXmsbFjlxService;
-import com.ruoyi.common.core.exception.ServiceException;
+import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
@@ -38,9 +38,6 @@ public class ZwywXmsbFjlxController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(ZwywXmsbFjlx zwywXmsbFjlx)
     {
-        if (zwywXmsbFjlx.getXmlxId() == null || "".equals(zwywXmsbFjlx.getXmlxId())){
-            throw  new ServiceException("项目类型不能为空");
-        }
         startPage();
         List<ZwywXmsbFjlx> list = zwywXmsbFjlxService.selectZwywXmsbFjlxList(zwywXmsbFjlx);
         return getDataTable(list);
@@ -77,7 +74,7 @@ public class ZwywXmsbFjlxController extends BaseController
     @PostMapping
     public AjaxResult add(@Validated({AddGroup.class}) @RequestBody ZwywXmsbFjlx zwywXmsbFjlx)
     {
-        if (zwywXmsbFjlx.getXmlxId() == null || "".equals(zwywXmsbFjlx.getXmlxId())){
+        if (StringUtils.isEmpty(zwywXmsbFjlx.getXmlxId())){
             return AjaxResult.error("项目类型不能为空");
         }
         return toAjax(zwywXmsbFjlxService.insertZwywXmsbFjlx(zwywXmsbFjlx),zwywXmsbFjlx.getId());

+ 4 - 0
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywXmsbXmbdpzController.java

@@ -2,6 +2,7 @@ package com.ruoyi.business.controller;
 
 import com.ruoyi.business.domain.ZwywXmsbXmbdpz;
 import com.ruoyi.business.service.IZwywXmsbXmbdpzService;
+import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
@@ -73,6 +74,9 @@ public class ZwywXmsbXmbdpzController extends BaseController
     @PostMapping
     public AjaxResult add(@Validated({AddGroup.class}) @RequestBody ZwywXmsbXmbdpz zwywXmsbXmbdpz)
     {
+        if (StringUtils.isEmpty(zwywXmsbXmbdpz.getXmlxId())){
+            return AjaxResult.error("项目类型不能为空");
+        }
         return toAjax(zwywXmsbXmbdpzService.insertZwywXmsbXmbdpz(zwywXmsbXmbdpz),zwywXmsbXmbdpz.getId());
     }
 

+ 133 - 62
ruoyi-ui/src/views/business/xmsb/xmsbCommon/index.vue

@@ -17,18 +17,23 @@
         />
       </el-form-item>
       <el-form-item label="所在地区" prop="szdq">
-        <RegionCascaderSelect endLevel="4" v-model="xzqh" :opts="{ placeholder: '请选择所在地区' }" style="width: 100%"
-          valueProp="code">
+        <RegionCascaderSelect
+          endLevel="4"
+          v-model="xzqh"
+          :opts="{ placeholder: '请选择所在地区' }"
+          style="width: 100%"
+          valueProp="code"
+        >
         </RegionCascaderSelect>
       </el-form-item>
       <el-form-item label="项目类型" prop="xmlx">
-        <BizDict :parmar="xmlxParam" :value="queryParams.xmlx" @changeData="changXmlx" :isCoom="true" :isLoding="false"></BizDict>
-        <!-- <el-input
-          v-model="queryParams.xmlx"
-          placeholder="请输入项目类型"
-          clearable
-          @keyup.enter.native="handleQuery"
-        /> -->
+        <BizDict
+          :parmar="xmlxParam"
+          :value="queryParams.xmlx"
+          @changeData="changXmlx"
+          :isCoom="true"
+          :isLoding="false"
+        ></BizDict>
       </el-form-item>
       <el-form-item label="申报日期" prop="sbrq">
         <el-date-picker
@@ -100,7 +105,7 @@
       >
         <template slot-scope="scope">
           <el-button
-            v-if="scope.row.sbzt=='1'"
+            v-if="scope.row.sbzt == '1' && scope.row.shFlg == '1'"
             size="mini"
             type="text"
             icon="el-icon-edit"
@@ -109,7 +114,25 @@
             >审核</el-button
           >
           <el-button
-            v-if="scope.row.sbzt=='0'"
+            v-if="scope.row.sbzt == '3'"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['business:xmsbCommon:second']"
+            >修改申请</el-button
+          >
+          <el-button
+            v-if="scope.row.sbzt == '3'"
+            size="mini"
+            type="text"
+            icon="el-icon-top"
+            @click="handleSub(scope.row)"
+            v-hasPermi="['business:xmsbCommon:second']"
+            >重新提交</el-button
+          >
+          <el-button
+            v-if="scope.row.sbzt == '0'"
             size="mini"
             type="text"
             icon="el-icon-top"
@@ -118,7 +141,7 @@
             >提交</el-button
           >
           <el-button
-            v-if="scope.row.sbzt=='0'"
+            v-if="scope.row.sbzt == '0'"
             size="mini"
             type="text"
             icon="el-icon-edit"
@@ -127,7 +150,7 @@
             >修改</el-button
           >
           <el-button
-            v-if="scope.row.sbzt=='0'"
+            v-if="scope.row.sbzt == '0'"
             size="mini"
             type="text"
             icon="el-icon-delete"
@@ -188,12 +211,23 @@
         </el-form-item>
 
         <el-form-item label="所在地区" prop="szdq">
-          <RegionCascaderSelect endLevel="4" v-model="form.szdq" :opts="{ placeholder: '请选择所在地区' }"
-              style="width: 100%" valueProp="code"></RegionCascaderSelect>
+          <RegionCascaderSelect
+            endLevel="4"
+            v-model="form.szdq"
+            :opts="{ placeholder: '请选择所在地区' }"
+            style="width: 100%"
+            valueProp="code"
+          ></RegionCascaderSelect>
         </el-form-item>
 
         <el-form-item label="项目类型" prop="xmlx">
-          <BizDict :parmar="xmlxParam" :value="form.xmlx" @changeData="changFormXmlx" style="width: 100%" :isCoom="true"></BizDict>
+          <BizDict
+            :parmar="xmlxParam"
+            :value="form.xmlx"
+            @changeData="changFormXmlx"
+            style="width: 100%"
+            :isCoom="true"
+          ></BizDict>
         </el-form-item>
 
         <el-form-item label="申报日期" prop="sbrq">
@@ -279,9 +313,24 @@
           <el-input v-model="form.xmssdw" placeholder="请输入项目实施单位" />
         </el-form-item>
 
-        <el-form-item v-for="kz in kzList" :key="kz.id" :label="kz.label" :rules="[{ required: kz.required=='1', message: kz.label + '不能为空' }]">
-          <el-input v-if="kz.type == 'input'" v-model="kz.value" placeholder="请输入" />
-          <el-select v-if="kz.type == 'select'" v-model="kz.value" placeholder="请选择">
+        <el-form-item
+          v-for="kz in kzList"
+          :key="kz.id"
+          :label="kz.label"
+          :rules="[
+            { required: kz.required == '1', message: kz.label + '不能为空' },
+          ]"
+        >
+          <el-input
+            v-if="kz.type == 'input'"
+            v-model="kz.value"
+            placeholder="请输入"
+          />
+          <el-select
+            v-if="kz.type == 'select'"
+            v-model="kz.value"
+            placeholder="请选择"
+          >
             <el-option
               v-for="dict in kz.dictData"
               :key="dict.dictValue"
@@ -303,7 +352,8 @@
               v-for="dict in kz.dictData"
               :key="dict.dictValue"
               :label="dict.dictValue"
-            >{{dict.dictLabel}}</el-radio>
+              >{{ dict.dictLabel }}</el-radio
+            >
           </el-radio-group>
         </el-form-item>
 
@@ -328,12 +378,16 @@
       </div>
     </el-dialog>
 
-
     <!-- 审核信息对话框 -->
-    <el-dialog v-dialog-drag :title="shTitle" :visible.sync="shOpen" width="500px" append-to-body>
+    <el-dialog
+      v-dialog-drag
+      :title="shTitle"
+      :visible.sync="shOpen"
+      width="500px"
+      append-to-body
+    >
       <el-form ref="shform" :model="shform" :rules="rules" label-width="80px">
-
-        <el-form-item label="主键标识" prop="sbId" style="display:none">
+        <el-form-item label="主键标识" prop="sbId" style="display: none">
           <el-input v-model="shform.sbId" placeholder="请输入主键标识" />
         </el-form-item>
 
@@ -353,16 +407,25 @@
         </el-form-item>
 
         <el-form-item label="备注" prop="bz">
-          <el-input v-model="shform.bz" type="textarea" maxlength="1000" show-word-limit placeholder="请输入备注" />
+          <el-input
+            v-model="shform.bz"
+            type="textarea"
+            maxlength="1000"
+            show-word-limit
+            placeholder="请输入备注"
+          />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitShForm" :loading="submitShFormLoading">确 定</el-button>
+        <el-button
+          type="primary"
+          @click="submitShForm"
+          :loading="submitShFormLoading"
+          >确 定</el-button
+        >
         <el-button @click="cancelSh">取 消</el-button>
       </div>
     </el-dialog>
-
-
   </div>
 </template>
 
@@ -375,7 +438,13 @@ import {
   updateXmsbCommon,
   getXmsbAddInfo,
 } from "@/api/business/xmsb/xmsbCommon";
-import {addBaxx, delBaxx, getBaxx, listBaxx, updateBaxx} from "@/api/business/xmsb/baxx";
+import {
+  addBaxx,
+  delBaxx,
+  getBaxx,
+  listBaxx,
+  updateBaxx,
+} from "@/api/business/xmsb/baxx";
 import xmsbFj from "../xmsbFj/index";
 import { chineseOne, idCard, Regular } from "@/utils/regular";
 
@@ -531,7 +600,7 @@ export default {
         ],
         shyj: [
           { required: true, message: "审核意见不能为空", trigger: "blur" },
-          { max: 100, message: '审核意见不能超过100个字符', trigger: 'blur'},
+          { max: 100, message: "审核意见不能超过100个字符", trigger: "blur" },
         ],
       },
     };
@@ -647,8 +716,8 @@ export default {
       const id = row.id || this.ids;
       const param = {
         id: id,
-        sbzt: '1',
-      }
+        sbzt: "1",
+      };
       this.submitFormLoading = true;
       updateXmsbCommon(param)
         .then((response) => {
@@ -689,23 +758,23 @@ export default {
       this.$refs["form"].validate((valid) => {
         if (valid) {
           this.submitFormLoading = true;
-          let szxzqh = ''
+          let szxzqh = "";
           if (Array.isArray(this.form.szdq)) {
-            szxzqh = this.form.szdq[this.form.szdq.length - 1]
+            szxzqh = this.form.szdq[this.form.szdq.length - 1];
           } else {
-            let data = JSON.parse(this.form.szdq)
-            szxzqh = data[data.length - 1]
+            let data = JSON.parse(this.form.szdq);
+            szxzqh = data[data.length - 1];
           }
-          let kzChar = '';
+          let kzChar = "";
           let kzCharList = [];
-          this.kzList.forEach((item,index)=>{
+          this.kzList.forEach((item, index) => {
             const param = {
               id: item.id,
               value: item.value,
-            }
-            if (item.required == '1') {
+            };
+            if (item.required == "1") {
               if (!item.value) {
-                this.$modal.msgError(item.label + "不能为空")
+                this.$modal.msgError(item.label + "不能为空");
                 this.submitFormLoading = false;
                 throw Error;
               }
@@ -716,15 +785,15 @@ export default {
             kzChar = JSON.stringify(kzCharList);
           }
           if (this.form.id != null) {
-              updateXmsbCommon({ ...this.form, szdq: szxzqh, kz: kzChar })
-                .then((response) => {
-                  this.$modal.msgSuccess("修改成功");
-                  this.open = false;
-                  this.getList();
-                })
-                .finally(() => (this.submitFormLoading = false));
+            updateXmsbCommon({ ...this.form, szdq: szxzqh, kz: kzChar })
+              .then((response) => {
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              })
+              .finally(() => (this.submitFormLoading = false));
           } else {
-            addXmsbCommon({...this.form, szdq: szxzqh, kz: kzChar})
+            addXmsbCommon({ ...this.form, szdq: szxzqh, kz: kzChar })
               .then((response) => {
                 this.$modal.msgSuccess("新增成功");
                 this.open = false;
@@ -737,15 +806,17 @@ export default {
     },
     /** 审核提交按钮 */
     submitShForm() {
-      this.$refs["shform"].validate(valid => {
+      this.$refs["shform"].validate((valid) => {
         if (valid) {
           this.submitShFormLoading = true;
-          addBaxx(this.shform).then(response => {
-            this.$modal.msgSuccess("审核成功");
-            this.shOpen = false;
-            this.getList();
-          }).finally(()=>this.submitShFormLoading =false);
-          }
+          addBaxx(this.shform)
+            .then((response) => {
+              this.$modal.msgSuccess("审核成功");
+              this.shOpen = false;
+              this.getList();
+            })
+            .finally(() => (this.submitShFormLoading = false));
+        }
       });
     },
     /** 删除按钮操作 */
@@ -790,21 +861,21 @@ export default {
         this.xmData = data;
       }
     },
-    changFormXmlx(xmIdData, data){
+    changFormXmlx(xmIdData, data) {
       this.form.xmlx = xmIdData;
       const param = {
         xmlx: this.form.xmlx,
-      }
+      };
       getXmsbAddInfo(param).then((res) => {
         this.kzList = res;
         if (this.form.id) {
-          this.kzList.map((t, i)=>{
-            this.form.kzList.map((item, index)=>{
+          this.kzList.map((t, i) => {
+            this.form.kzList.map((item, index) => {
               if (t.id == item.id) {
                 t.value = item.value;
               }
-            })
-          })
+            });
+          });
         }
         // this.kzList.map((item,index)=>{
         //   if (item.required == '1') {

+ 159 - 109
ruoyi-ui/src/views/business/xmsb/xmsbFj/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
       <el-form-item label="材料简称" prop="fjmc">
         <el-input
           v-model="queryParams.fjmc"
@@ -9,87 +16,89 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <!-- <el-form-item label="内附文件说明" prop="nfwjsm">
-        <el-input
-          v-model="queryParams.nfwjsm"
-          placeholder="请输入内附文件说明"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item> -->
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
       </el-form-item>
-    </el-form>  
+    </el-form>
 
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
-          v-if="sbzt=='0'"
+          v-if="['0', '3'].includes(sbzt)"
           type="primary"
           plain
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
           v-hasPermi="['business:xmsbFj:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
-      <!-- <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['business:xmsbFj:export']"
-        >导出</el-button>
-      </el-col> -->
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="xmsbFjList" >
+    <el-table v-loading="loading" :data="xmsbFjList">
       <el-table-column label="材料类型" align="center" prop="fjlxName" />
       <el-table-column label="材料简称" align="center" prop="fjmc" />
       <el-table-column label="内附文件说明" align="center" prop="nfwjsm" />
       <el-table-column label="备注" align="center" prop="bz" />
       <el-table-column label="创建人" align="center" prop="cjr" />
-      <el-table-column label="创建日期" align="center" prop="cjrq" >
+      <el-table-column label="创建日期" align="center" prop="cjrq">
         <template slot-scope="scope">
-          <span>{{ special(scope.row.cjrq, 'date') }}</span>
+          <span>{{ special(scope.row.cjrq, "date") }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+        fixed="right"
+      >
         <template slot-scope="scope">
           <el-button
-            v-if="sbzt=='0'"
+            v-if="['0', '3'].includes(sbzt)"
             size="mini"
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['business:xmsbFj:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
-            v-if="sbzt=='0'"
+            v-if="['0', '3'].includes(sbzt)"
             size="mini"
             type="text"
             icon="el-icon-delete"
-            @click="handleDelete(scope.row,scope.$index)"
+            @click="handleDelete(scope.row, scope.$index)"
             v-hasPermi="['business:xmsbFj:remove']"
-          >删除</el-button>
+            >删除</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-download"
-            @click="handleDownload(scope.row,scope.$index)"
+            @click="handleDownload(scope.row, scope.$index)"
             v-hasPermi="['business:xmsbFj:download']"
-          >下载</el-button>
+            >下载</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -97,10 +106,15 @@
     />
 
     <!-- 添加或修改项目申报附件信息对话框 -->
-    <el-dialog v-dialog-drag :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog
+      v-dialog-drag
+      :title="title"
+      :visible.sync="open"
+      width="500px"
+      append-to-body
+    >
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-
-        <el-form-item label="主键标识" prop="sbId" style="display:none">
+        <el-form-item label="主键标识" prop="sbId" style="display: none">
           <el-input v-model="form.sbId" placeholder="请输入主键标识" />
         </el-form-item>
 
@@ -109,7 +123,14 @@
         </el-form-item>
 
         <el-form-item label="材料类型" prop="fjlx">
-          <BizDict :parmar="fjlxParam" :value="form.fjlx" @changeData="changFormFjlx" style="width: 100%" :isCoom="true" :para1="xmId"></BizDict>
+          <BizDict
+            :parmar="fjlxParam"
+            :value="form.fjlx"
+            @changeData="changFormFjlx"
+            style="width: 100%"
+            :isCoom="true"
+            :para1="xmId"
+          ></BizDict>
         </el-form-item>
 
         <el-form-item label="内附文件说明" prop="nfwjsm">
@@ -117,15 +138,26 @@
         </el-form-item>
 
         <el-form-item label="备注" prop="bz">
-          <el-input v-model="form.bz" type="textarea" maxlength="1000" show-word-limit placeholder="请输入备注" />
+          <el-input
+            v-model="form.bz"
+            type="textarea"
+            maxlength="1000"
+            show-word-limit
+            placeholder="请输入备注"
+          />
         </el-form-item>
 
         <el-form-item label="附件地址" prop="fj">
-          <file-upload v-model="form.fj"/>
+          <file-upload v-model="form.fj" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm" :loading="submitFormLoading">确 定</el-button>
+        <el-button
+          type="primary"
+          @click="submitForm"
+          :loading="submitFormLoading"
+          >确 定</el-button
+        >
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
@@ -133,18 +165,24 @@
 </template>
 
 <script>
-  import {addXmsbFj, delXmsbFj, getXmsbFj, listXmsbFj, updateXmsbFj} from "@/api/business/xmsb/xmsbFj";
-  import {chineseOne, idCard, Regular} from '@/utils/regular'
+import {
+  addXmsbFj,
+  delXmsbFj,
+  getXmsbFj,
+  listXmsbFj,
+  updateXmsbFj,
+} from "@/api/business/xmsb/xmsbFj";
+import { chineseOne, idCard, Regular } from "@/utils/regular";
 
-  export default {
+export default {
   name: "XmsbFj",
-  props:{
-    xmId:{
-      type:String,
+  props: {
+    xmId: {
+      type: String,
       default: "",
     },
-    sbzt:{
-      type:String,
+    sbzt: {
+      type: String,
       default: "0",
     },
   },
@@ -181,9 +219,7 @@
       },
       // 表单校验
       rules: {
-        id: [
-          { required: true, message: "主键标识不能为空", trigger: "blur" },
-        ],
+        id: [{ required: true, message: "主键标识不能为空", trigger: "blur" }],
         sbId: [
           { required: true, message: "主键标识不能为空", trigger: "blur" },
         ],
@@ -192,26 +228,27 @@
         ],
         fjmc: [
           { required: true, message: "材料简称不能为空", trigger: "blur" },
-          { max: 100, message: '材料简称不能超过100个字符', trigger: 'blur'},
+          { max: 100, message: "材料简称不能超过100个字符", trigger: "blur" },
         ],
         nfwjsm: [
           { required: true, message: "内附文件说明不能为空", trigger: "blur" },
-          { max: 100, message: '内附文件说明不能超过100个字符', trigger: 'blur'},
-        ],
-        fj: [
-          { required: true, message: "附件地址不能为空", trigger: "blur" },
+          {
+            max: 100,
+            message: "内附文件说明不能超过100个字符",
+            trigger: "blur",
+          },
         ],
-      }
+        fj: [{ required: true, message: "附件地址不能为空", trigger: "blur" }],
+      },
     };
   },
   watch: {
-    xmId: 
-      {
-        handler (newName, oldName) {
-          this.getList();
-        },
-        immediate: true
-      }
+    xmId: {
+      handler(newName, oldName) {
+        this.getList();
+      },
+      immediate: true,
+    },
   },
   created() {
     this.getList();
@@ -220,7 +257,7 @@
     /** 查询项目申报附件信息列表 */
     getList() {
       this.loading = true;
-      listXmsbFj({...this.queryParams, sbId: this.xmId}).then(response => {
+      listXmsbFj({ ...this.queryParams, sbId: this.xmId }).then((response) => {
         this.xmsbFjList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -233,7 +270,7 @@
     },
     // 表单重置
     reset() {
-      this.submitFormLoading =false;
+      this.submitFormLoading = false;
       this.form = {
         id: null,
         sbId: null,
@@ -242,7 +279,7 @@
         nfwjsm: null,
         bz: null,
         fj: null,
-        state: null
+        state: null,
       };
       this.resetForm("form");
     },
@@ -258,9 +295,9 @@
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
@@ -272,8 +309,8 @@
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
-      getXmsbFj(id).then(response => {
+      const id = row.id || this.ids;
+      getXmsbFj(id).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改项目申报附件信息";
@@ -281,59 +318,72 @@
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           this.submitFormLoading = true;
-          console.log(this.form)
+          console.log(this.form);
           if (this.form.id != null) {
-              updateXmsbFj(this.form).then(response => {
+            updateXmsbFj(this.form)
+              .then((response) => {
                 this.$modal.msgSuccess("修改成功");
                 this.open = false;
                 this.getList();
-              }).finally(()=>this.submitFormLoading =false);
-            
+              })
+              .finally(() => (this.submitFormLoading = false));
           } else {
-            addXmsbFj(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            }).finally(()=>this.submitFormLoading =false);
+            addXmsbFj(this.form)
+              .then((response) => {
+                this.$modal.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              })
+              .finally(() => (this.submitFormLoading = false));
           }
         }
       });
     },
     /** 删除按钮操作 */
-    handleDelete(row,index) {
+    handleDelete(row, index) {
       const ids = row.id || this.ids;
-      const xh = (this.queryParams.pageNum-1)*this.queryParams.pageSize + index + 1;
-      this.$modal.confirm('确认删除' + this.changeDelData(row,'id','ID值',xh) + '的记录?').then(function() {
-        return delXmsbFj(ids);
-      }).then(() => {
-        // this.getList();
-        /****** sks 需要改动的地方 ind参数需要传进来 start ******/
-        this.xmsbFjList.splice(index,1);
-        if(this.xmsbFjList.length===0)
-        {
-          this.getList();
-        }else {
-          this.total--;
-        }
-        this.$modal.msgSuccess("删除成功");
-        /****** sks 需要改动的地方 end ******/
-      }).catch(() => {});
+      const xh =
+        (this.queryParams.pageNum - 1) * this.queryParams.pageSize + index + 1;
+      this.$modal
+        .confirm(
+          "确认删除" + this.changeDelData(row, "id", "ID值", xh) + "的记录?"
+        )
+        .then(function () {
+          return delXmsbFj(ids);
+        })
+        .then(() => {
+          // this.getList();
+          /****** sks 需要改动的地方 ind参数需要传进来 start ******/
+          this.xmsbFjList.splice(index, 1);
+          if (this.xmsbFjList.length === 0) {
+            this.getList();
+          } else {
+            this.total--;
+          }
+          this.$modal.msgSuccess("删除成功");
+          /****** sks 需要改动的地方 end ******/
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('business/xmsbFj/export', {
-        ...this.queryParams
-      }, `xmsbFj_${new Date().getTime()}.xlsx`)
+      this.download(
+        "business/xmsbFj/export",
+        {
+          ...this.queryParams,
+        },
+        `xmsbFj_${new Date().getTime()}.xlsx`
+      );
     },
-    changFormFjlx(fjId, data){
+    changFormFjlx(fjId, data) {
       this.form.fjlx = fjId;
     },
     handleDownload(row) {
       console.log(row);
     },
-  }
+  },
 };
 </script>