Ver Fonte

数据采集添加保税区筛选

liusungtsun há 1 ano atrás
pai
commit
5ff870111a
1 ficheiros alterados com 29 adições e 54 exclusões
  1. 29 54
      src/views/GATHER/index.vue

+ 29 - 54
src/views/GATHER/index.vue

@@ -7,6 +7,17 @@
       :inline="true"
       v-show="showSearch"
     >
+    <el-form-item label="保税区">
+        <el-select v-model="queryParams.deptId" placeholder="请选择保税区">
+          <el-option
+            v-for="item in regionList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </el-form-item>
+
       <el-form-item label="采集状态" prop="collStatus">
         <el-select
           v-model="queryParams.collStatus"
@@ -719,6 +730,7 @@ import { saveAs } from "file-saver";
 import { getToken } from "@/utils/auth";
 import axios from "axios";
 import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+import { bondedList } from '@/api/portal/figure/figure.js';
 
 export default {
   name: "GATHER",
@@ -778,6 +790,7 @@ export default {
       openDetail: false,
       // 查询参数
       queryParams: {
+        deptId: '',
         pageNum: 1,
         pageSize: 10,
         id: null,
@@ -795,6 +808,7 @@ export default {
         approveStatus: null,
         audit: null,
       },
+      regionList:[],  //保税区列表
       // 表单参数
       form: {},
       // 表单校验
@@ -820,6 +834,7 @@ export default {
 
   created() {
     this.getList();
+    this.bondedList()
     // getInfo().then((res) => {
     //   console.log(res);
     //   //  this.data = res;
@@ -895,60 +910,6 @@ export default {
           ],
         };
       }
-      /*if (
-        name.includes("增幅") ||
-        name.includes("验收率") ||
-        name.includes("开发率") ||
-        name.includes("比重")
-      ) {
-        return {
-          collCalue: [
-            { required: true, message: "不能为空", trigger: "blur" },
-            { trigger: "blur", validator: this.validatorFloatNum },
-          ],
-        };
-      }*/
-
-      // if (name == '期末单位面积企业从业人员' || name == '活跃企业数' || name == '期末企业从业人员') {
-      //   return {
-      //     collCalue: [
-      //       { required: true, message: '不能为空', trigger: 'blur' },
-      //       { pattern: /^[1-9]\d*$/, message: '请输入正整数', trigger: 'blur' }
-      //     ]
-      //   };
-      // } else {
-      //   return {
-      //     collCalue: [
-      //       { required: true, message: '不能为空', trigger: 'blur' },
-      //       { trigger: 'blur', validator: this.validatorNum }
-      //     ]
-      //   };
-      // }
-      /*switch (name) {
-        case "期末单位面积企业从业人员":
-        case "活跃企业数":
-        case "期末企业从业人员":
-          return {
-            collCalue: [
-              { required: true, message: "不能为空", trigger: "blur" },
-              {
-                pattern: /^[1-9]\d*$/,
-                message: "请输入正整数",
-                trigger: "blur",
-              },
-            ],
-          };
-          break;
-
-        default:
-          return {
-            collCalue: [
-              { required: true, message: "不能为空", trigger: "blur" },
-              { trigger: "blur", validator: this.validatorNum },
-            ],
-          };
-          break;
-      }*/
     },
     importFile(param) {
       let title = param.mark == "1" ? "海关一般数据导入" : "海关特殊数据导入";
@@ -967,6 +928,18 @@ export default {
     getCurrentRow(val) {
       console.log(val);
     },
+    // 获取保税区列表
+    bondedList(){
+      this.regionList = []
+      bondedList().then(res=>{
+        for (const i in res.data) {
+          this.regionList.push({ 
+            label:res.data[i].deptName,
+            value:res.data[i].deptId,
+           })
+        }
+      })
+    },
     handleCurrentChange(val, index) {
       this.currentRow = val;
       this.$emit("data", val.pkg);
@@ -1129,6 +1102,7 @@ export default {
     getList() {
       this.loading = true;
       listGATHER(this.queryParams).then((response) => {
+        console.log('response', response);
         this.GATHERList = response.rows;
         this.load = false;
         this.total = response.total;
@@ -1168,6 +1142,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptId = ''
       this.resetForm("queryForm");
       this.handleQuery();
     },