Procházet zdrojové kódy

修改重点项目数据校验

sakura před 1 rokem
rodič
revize
8684eceb03

+ 52 - 191
src/views/ENTERPRISETRADEPERFORMANCE/index.vue

@@ -9,61 +9,25 @@
 
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE:add']"
-          >新增</el-button
-        >
+        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
+          v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE:add']">新增</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE:edit']"
-          >修改</el-button
-        >
+        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
+          v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE:edit']">修改</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE:remove']"
-          >删除</el-button
-        >
+        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
+          v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE:remove']">删除</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:ENTERPRISETRADEPERFORMANCE:export']"
-          >导出</el-button
-        >
+        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
+          v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE: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
-      :data="ENTERPRISETRADEPERFORMANCEList"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table :data="ENTERPRISETRADEPERFORMANCEList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <!-- <el-table-column label="企业贸易绩效数据" align="center" prop="id">
       </el-table-column> -->
@@ -107,11 +71,7 @@
       </el-table-column>
       <el-table-column label="租赁贸易进出口值 " align="center" prop="zlmyjckz">
       </el-table-column>
-      <el-table-column
-        label="跨境电商业务进出口值 "
-        align="center"
-        prop="kjdsywjckz"
-      >
+      <el-table-column label="跨境电商业务进出口值 " align="center" prop="kjdsywjckz">
       </el-table-column>
       <el-table-column label="创建时间" align="center" prop="createTime">
       </el-table-column>
@@ -121,66 +81,29 @@
       </el-table-column>
       <el-table-column label="更新人" align="center" prop="updateBy">
       </el-table-column>
-      <el-table-column
-        fixed="right"
-        label="操作"
-        align="center"
-        class-name="small-padding fixed-width"
-      >
+      <el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE:edit']"
-            >修改</el-button
-          >
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE:remove']"
-            >删除</el-button
-          >
+          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
+            v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE:edit']">修改</el-button>
+          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
+            v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE:remove']">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
 
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+      @pagination="getList" />
 
     <!-- 添加或修改企业贸易绩效数据(每个月填报)对话框 -->
-    <el-dialog
-      :title="title"
-      :visible.sync="open"
-      :close-on-click-modal="false"
-      width="60%"
-      append-to-body
-    >
+    <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="60%" append-to-body>
       <el-tabs v-model="activeName">
         <el-tab-pane label="基本信息" name="first">
           <el-form ref="forms" :model="form" :rules="rules" label-width="180px">
             <el-row>
               <el-col :span="12">
                 <el-form-item label="部门" prop="deptName">
-                  <el-select
-                    v-model="form.deptName"
-                    @change="deptSelect"
-                    placeholder="请选择"
-                  >
-                    <el-option
-                      v-for="(item, index) in deptList"
-                      :key="index"
-                      :label="item.deptName"
-                      :value="index"
-                    >
+                  <el-select v-model="form.deptName" @change="deptSelect" placeholder="请选择">
+                    <el-option v-for="(item, index) in deptList" :key="index" :label="item.deptName" :value="index">
                     </el-option>
                   </el-select>
                 </el-form-item>
@@ -188,80 +111,50 @@
 
               <el-col :span="12">
                 <el-form-item label="年月" prop="dateValue">
-                  <el-date-picker
-                    v-model="form.dateValue"
-                    type="month"
-                    @change="changeDate"
-                    value-format="yyyy-MM"
-                    format="yyyy 年 MM 月"
-                    placeholder="选择年月"
-                  >
+                  <el-date-picker v-model="form.dateValue" type="month" @change="changeDate" value-format="yyyy-MM"
+                    format="yyyy 年 MM 月" placeholder="选择年月">
                   </el-date-picker>
                 </el-form-item>
               </el-col>
 
               <el-col :span="12">
                 <el-form-item label="资产分类 " prop="zcfl">
-                  <el-input
-                    v-model="form.zcfl"
-                    placeholder="请输入资产分类 "
-                  ></el-input>
+                  <el-input v-model="form.zcfl" placeholder="请输入资产分类 "></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="主要贸易国家 " prop="zymygj">
-                  <el-input
-                    v-model="form.zymygj"
-                    placeholder="请输入主要贸易国家 "
-                  ></el-input>
+                  <el-input v-model="form.zymygj" placeholder="请输入主要贸易国家 "></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="电子账册分类 " prop="dzzcfl">
-                  <el-input
-                    v-model="form.dzzcfl"
-                    placeholder="请输入电子账册分类 "
-                  ></el-input>
+                  <el-input v-model="form.dzzcfl" placeholder="请输入电子账册分类 "></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="海关税收" prop="hgss">
-                  <el-input
-                    v-model="form.hgss"
-                    placeholder="请输入海关税收"
-                  ></el-input>
+                  <el-input v-model="form.hgss" placeholder="请输入海关税收"></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="税务部门税收" prop="swbmss">
-                  <el-input
-                    v-model="form.swbmss"
-                    placeholder="请输入税务部门税收"
-                  ></el-input>
+                  <el-input v-model="form.swbmss" placeholder="请输入税务部门税收"></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="期末企业从业人员" prop="qmqycyry">
-                  <el-input
-                    v-model="form.qmqycyry"
-                    placeholder="请输入期末企业从业人员"
-                  ></el-input>
+                  <el-input v-model="form.qmqycyry" placeholder="请输入期末企业从业人员"></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="实际使用外资金额" prop="sjsywzje">
-                  <el-input
-                    v-model="form.sjsywzje"
-                    placeholder="请输入实际使用外资金额"
-                  ></el-input>
+                  <el-input v-model="form.sjsywzje" placeholder="请输入实际使用外资金额"></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="固定资产投资" prop="gdzctz">
-                  <el-input
-                    v-model="form.gdzctz"
-                    placeholder="请输入固定资产投资"
-                  ></el-input>
+                  <el-input v-model="form.gdzctz" placeholder="请输入固定资产投资"></el-input>
                 </el-form-item>
               </el-col>
             </el-row>
@@ -272,90 +165,57 @@
             <el-row>
               <el-col :span="12">
                 <el-form-item label="规模以上工业产值" prop="gmysgycz">
-                  <el-input
-                    v-model="form.gmysgycz"
-                    placeholder="请输入规模以上工业产值"
-                  ></el-input>
+                  <el-input type="number" v-model="form.gmysgycz" placeholder="请输入规模以上工业产值"></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="进出口总值" prop="jckzz">
-                  <el-input
-                    v-model="form.jckzz"
-                    placeholder="请输入进出口总值"
-                  ></el-input>
+                  <el-input type="number" v-model="form.jckzz" placeholder="请输入进出口总值"></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="进口总值" prop="jkzz">
-                  <el-input
-                    v-model="form.jkzz"
-                    placeholder="请输入进口总值"
-                  ></el-input>
+                  <el-input type="number" v-model="form.jkzz" placeholder="请输入进口总值"></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="出口总值" prop="ckzz">
-                  <el-input
-                    v-model="form.ckzz"
-                    placeholder="请输入出口总值"
-                  ></el-input>
+                  <el-input type="number" v-model="form.ckzz" placeholder="请输入出口总值"></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="加工贸易进出口值 " prop="jgmyjckz">
-                  <el-input
-                    v-model="form.jgmyjckz"
-                    placeholder="请输入加工贸易进出口值 "
-                  ></el-input>
+                  <el-input type="number" v-model="form.jgmyjckz" placeholder="请输入加工贸易进出口值 "></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="物流货物进出口值 " prop="wlhwjckz">
-                  <el-input
-                    v-model="form.wlhwjckz"
-                    placeholder="请输入物流货物进出口值 "
-                  ></el-input>
+                  <el-input type="number" v-model="form.wlhwjckz" placeholder="请输入物流货物进出口值 "></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="一般贸易进出口值 " prop="ybmyjckz">
-                  <el-input
-                    v-model="form.ybmyjckz"
-                    placeholder="请输入一般贸易进出口值 "
-                  ></el-input>
+                  <el-input type="number" v-model="form.ybmyjckz" placeholder="请输入一般贸易进出口值 "></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="维修业务进出口值 " prop="wxyejckz">
-                  <el-input
-                    v-model="form.wxyejckz"
-                    placeholder="请输入维修业务进出口值 "
-                  ></el-input>
+                  <el-input type="number" v-model="form.wxyejckz" placeholder="请输入维修业务进出口值 "></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="研发业务进出口值 " prop="yfywjckz">
-                  <el-input
-                    v-model="form.yfywjckz"
-                    placeholder="请输入研发业务进出口值 "
-                  ></el-input>
+                  <el-input type="number" v-model="form.yfywjckz" placeholder="请输入研发业务进出口值 "></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="租赁贸易进出口值 " prop="zlmyjckz">
-                  <el-input
-                    v-model="form.zlmyjckz"
-                    placeholder="请输入租赁贸易进出口值 "
-                  ></el-input>
+                  <el-input type="number" v-model="form.zlmyjckz" placeholder="请输入租赁贸易进出口值 "></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="跨境电商业务进出口值 " prop="kjdsywjckz">
-                  <el-input
-                    v-model="form.kjdsywjckz"
-                    placeholder="请输入跨境电商业务进出口值 "
-                  ></el-input>
+                  <el-input type="number" v-model="form.kjdsywjckz" placeholder="请输入跨境电商业务进出口值 "></el-input>
                 </el-form-item>
               </el-col>
             </el-row>
@@ -461,6 +321,7 @@ export default {
             message: "规模以上工业产值不能为空",
             trigger: "blur",
           },
+
         ],
         deptName: [
           { required: true, message: "部门信息不能为空", trigger: "blur" },
@@ -604,8 +465,8 @@ export default {
         zlmyjckz: null,
         kjdsywjckz: null,
         dateValue: null,
-        year:null,
-        month:null
+        year: null,
+        month: null
       };
       this.resetForm("form");
     },
@@ -625,11 +486,11 @@ export default {
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
-    changeDate(val){
-      this.form.year = this.form.dateValue.slice(0,4)
-      console.log('年'+this.form.year);
+    changeDate(val) {
+      this.form.year = this.form.dateValue.slice(0, 4)
+      console.log('年' + this.form.year);
       this.form.month = this.form.dateValue.slice(5)
-      console.log('月'+this.form.month);
+      console.log('月' + this.form.month);
     },
     /** 新增按钮操作 */
     handleAdd() {
@@ -691,8 +552,8 @@ export default {
       this.$modal
         .confirm(
           '是否确认删除企业贸易绩效数据(每个月填报)编号为"' +
-            ids +
-            '"的数据项?'
+          ids +
+          '"的数据项?'
         )
         .then(function () {
           return delENTERPRISETRADEPERFORMANCE(ids);
@@ -701,7 +562,7 @@ export default {
           this.getList();
           this.$modal.msgSuccess("删除成功");
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     /** 导出按钮操作 */
     handleExport() {

+ 10 - 2
src/views/IMPORTANTPROJECT/index.vue

@@ -217,8 +217,6 @@
             </el-form-item>
           </el-col>
 
-         
-
           <el-col :span="12">
             <el-form-item label="建设内容 " prop="jsnr">
               <el-input
@@ -393,6 +391,11 @@ export default {
             message: "实际完成投资额 不能为空",
             trigger: "blur",
           },
+          {
+            pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
+            message: "不能为负数",
+            trigger: "blur"
+          }
         ],
         ndtzwcbfb: [
           {
@@ -400,6 +403,11 @@ export default {
             message: "年度投资完成百分比 不能为空",
             trigger: "blur",
           },
+          {
+            pattern: /^(?:0(?:\.\d+)?|1(?:\.0+)?)$/,
+            message: "请输入正确的百分比数值",
+            trigger: "blur"
+          },
         ],
         deptId: [
           {