瀏覽代碼

大小型修改

gks 1 年之前
父節點
當前提交
4ed50de631

+ 0 - 1
src/utils/request.js

@@ -24,7 +24,6 @@ const service = axios.create({
 
 // request拦截器
 service.interceptors.request.use(config => {
-  console.log(config);
   Vue.prototype.$layer.loading({content:'请稍等!'});
   // 是否需要设置 token
   const isToken = (config.headers || {}).isToken === false

+ 6 - 1
src/views/ARTICLE/edit.vue

@@ -12,13 +12,14 @@
         <el-select
           v-model="form.scale"
           placeholder="请选择建设规模"
+          @change="typeSelect"
           style="width: 50%"
         >
           <el-option
             v-for="item in scaleList"
             :key="item.value + 'typeList'"
             :label="item.label"
-            :value="item.value"
+            :value="item.label"
           ></el-option>
         </el-select>
       </el-form-item>
@@ -126,6 +127,10 @@ export default {
     }
   },
   methods: {
+
+    typeSelect(val){
+      this.form.scale = val;
+    },
     /** 提交按钮 */
     submitForm(type) {
       this.$refs["form"].validate((valid) => {

+ 3 - 3
src/views/ARTICLE/index.vue

@@ -21,7 +21,7 @@
             v-for="item in scaleList"
             :key="item.value + 'typeList'"
             :label="item.label"
-            :value="item.value"
+            :value="item.label"
           ></el-option>
         </el-select>
       </el-form-item>
@@ -98,11 +98,11 @@
         </template>
       </el-table-column>
       <el-table-column label="建设规模" align="center" prop="scale">
-        <template slot-scope="scope">
+        <!-- <template slot-scope="scope">
           <el-tag v-if="scope.row.scale == 1" type="success">小型</el-tag>
           <el-tag v-else-if="scope.row.scale == 2" type="success">中型</el-tag>
           <el-tag v-else-if="scope.row.scale == 3" type="success">大型</el-tag>
-        </template>
+        </template> -->
       </el-table-column>
       <el-table-column label="年度投资计划(万)" align="center" prop="plan">
         <template slot-scope="scope">

+ 14 - 6
src/views/ENTERPRISETRADEPERFORMANCE/index.vue

@@ -69,8 +69,8 @@
       </el-table-column>
       <el-table-column label="部门id" align="center" prop="deptId">
       </el-table-column>
-      <!-- <el-table-column label="部门名称" align="center" prop="deptName">
-      </el-table-column> -->
+      <el-table-column label="部门名称" align="center" prop="deptName">
+      </el-table-column>
       <el-table-column label="规模以上工业产值" align="center" prop="gmysgycz">
       </el-table-column>
       <el-table-column label="固定资产投资" align="center" prop="gdzctz">
@@ -173,12 +173,16 @@
         </el-form-item>
         <el-form-item label="部门" prop="gdzctz">
           <!-- <el-input v-model="form.gdzctz" placeholder="请选择部门"></el-input> -->
-          <el-select v-model="form.deptId" placeholder="请选择">
+          <el-select
+            v-model="deptValue"
+            @change="deptSelect"
+            placeholder="请选择"
+          >
             <el-option
               v-for="(item, index) in deptList"
               :key="index"
               :label="item.deptName"
-              :value="item.deptId"
+              :value="index"
             >
             </el-option>
           </el-select>
@@ -301,6 +305,7 @@ export default {
     return {
       // 部门列表
       deptList: [],
+      deptValue: null,
       // 根路径
       baseURL: process.env.VUE_APP_BASE_API,
       // 遮罩层
@@ -470,8 +475,6 @@ export default {
     getDeptList().then((res) => {
       this.deptList = res.data;
     });
-
-
   },
   methods: {
     /** 查询企业贸易绩效数据(每个月填报)列表 */
@@ -547,6 +550,11 @@ export default {
         this.title = "修改企业贸易绩效数据(每个月填报)";
       });
     },
+
+    deptSelect(index) {
+      this.form.deptId = this.deptList[index].deptId;
+      this.form.deptName = this.deptList[index].deptName;
+    },
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate((valid) => {

+ 41 - 11
src/views/GARDENBASEDATA/index.vue

@@ -84,6 +84,8 @@
       </el-table-column>
       <el-table-column label="部门主键" align="center" prop="deptId">
       </el-table-column>
+      <el-table-column label="部门名称" align="center" prop="deptName">
+      </el-table-column>
       <el-table-column label="法定代表人 " align="center" prop="fddbr">
       </el-table-column>
       <el-table-column label="企业代表联系方式 " align="center" prop="qydblxfs">
@@ -194,6 +196,18 @@
             placeholder="请输入法定代表人"
           ></el-input>
         </el-form-item>
+
+        <el-form-item label="部门" prop="fddbr">
+          <el-select v-model="detpValue" @change="deptSelect" placeholder="请选择部门">
+            <el-option
+              v-for="(item,index) in detpList"
+              :key="index"
+              :label="item.deptName"
+              :value="index"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="企业代表联系方式 " prop="qydblxfs">
           <el-input
             v-model="form.qydblxfs"
@@ -257,12 +271,24 @@
         </el-form-item>
         <el-form-item label="成立日期 " prop="clrq">
           <!-- <el-input  v-model="form.clrq" placeholder="请输入成立日期 "></el-input> -->
-          <el-date-picker value-format="yyyy-MM-dd" @change="setUpTimeSelect" v-model="form.clrq" type="date" placeholder="选择日期">
+          <el-date-picker
+            value-format="yyyy-MM-dd"
+            @change="setUpTimeSelect"
+            v-model="form.clrq"
+            type="date"
+            placeholder="选择日期"
+          >
           </el-date-picker>
         </el-form-item>
         <el-form-item label="投产时间 " prop="tcsj">
           <!-- <el-input  v-model="form.tcsj" placeholder="请输入投产时间 "></el-input> -->
-          <el-date-picker value-format="yyyy-MM-dd" @change="putTimeSelect"  v-model="form.tcsj" type="date" placeholder="选择日期">
+          <el-date-picker
+            value-format="yyyy-MM-dd"
+            @change="putTimeSelect"
+            v-model="form.tcsj"
+            type="date"
+            placeholder="选择日期"
+          >
           </el-date-picker>
         </el-form-item>
         <el-form-item label="经营期限自 " prop="jyqxz">
@@ -358,9 +384,10 @@ export default {
   name: "GARDENBASEDATA",
   data() {
     return {
-      // 企业列表
-      enterpriseList:[],
-      
+      // 部门列表
+      detpList: [],
+      detpValue:null,
+
       // 根路径
       baseURL: process.env.VUE_APP_BASE_API,
       // 遮罩层
@@ -531,16 +558,19 @@ export default {
   },
   created() {
     this.getList();
-    getEnterprise().then(res=>{
-      // console.log(res.data);
-    })
+    getEnterprise().then((res) => {
+      this.detpList = res.data;
+    });
   },
   methods: {
-    setUpTimeSelect(val){
+    deptSelect(val){
+      this.form.deptId = this.detpList[val].deptId;
+      this.form.deptName = this.detpList[val].deptName;
+    },
+    setUpTimeSelect(val) {
       this.form.clrq = val;
-
     },
-    putTimeSelect(val){
+    putTimeSelect(val) {
       this.form.tcsj = val;
     },
     /** 查询园区内企业基础数据列表 */

+ 178 - 85
src/views/TOTEXP/index.vue

@@ -1,19 +1,56 @@
 <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>
         <el-form-item label="保税区名称" prop="type" label-width="110">
-          <el-select v-model="queryParams.deptId" placeholder="请选择保税区" clearable filterable class="se">
-            <el-option v-for="item in deptList" :key="item.id" :label="item.deptName" :value="item.deptId" />
+          <el-select
+            v-model="queryParams.deptId"
+            placeholder="请选择保税区"
+            clearable
+            filterable
+            class="se"
+          >
+            <el-option
+              v-for="item in deptList"
+              :key="item.id"
+              :label="item.deptName"
+              :value="item.deptId"
+            />
           </el-select>
         </el-form-item>
         <el-form-item label="年份" prop="type" label-width="110">
-          <el-select v-model="queryParams.year" placeholder="请选择年份" clearable filterable class="se">
-            <el-option v-for="item in nearYearList" :key="item" :label="item" :value="item" />
+          <el-select
+            v-model="queryParams.year"
+            placeholder="请选择年份"
+            clearable
+            filterable
+            class="se"
+          >
+            <el-option
+              v-for="item in nearYearList"
+              :key="item"
+              :label="item"
+              :value="item"
+            />
           </el-select>
         </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>
 
@@ -26,7 +63,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['totexp:TOTEXP:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -37,7 +75,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['totexp:TOTEXP:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -48,7 +87,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['totexp:TOTEXP:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -58,44 +98,52 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['totexp:TOTEXP:export']"
-        >导出</el-button>
+          >导出</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="TOTEXPList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-<!--      <el-table-column label="主键" align="center" prop="id">-->
-<!--        <template slot-scope="scope">-->
-<!--          {{scope.row.id}}-->
-<!--        </template>-->
-<!--      </el-table-column>-->
+      <!--      <el-table-column label="主键" align="center" prop="id">-->
+      <!--        <template slot-scope="scope">-->
+      <!--          {{scope.row.id}}-->
+      <!--        </template>-->
+      <!--      </el-table-column>-->
       <el-table-column label="保税区" align="center" prop="deptName">
         <template slot-scope="scope">
-          {{scope.row.deptName}}
+          {{ scope.row.deptName }}
         </template>
       </el-table-column>
       <el-table-column label="进出口值" align="center" prop="imExport">
         <template slot-scope="scope">
-          {{scope.row.imExport}}
+          {{ scope.row.imExport }}
         </template>
       </el-table-column>
-<!--      <el-table-column label="创建时间" align="center" prop="createTime">-->
-<!--        <template slot-scope="scope">-->
-<!--          {{scope.row.deptId}}-->
-<!--        </template>-->
-<!--      </el-table-column>-->
-<!--      <el-table-column label="录入人" align="center" prop="createBy">-->
-<!--        <template slot-scope="scope">-->
-<!--          {{scope.row.deptId}}-->
-<!--        </template>-->
-<!--      </el-table-column>-->
+      <!--      <el-table-column label="创建时间" align="center" prop="createTime">-->
+      <!--        <template slot-scope="scope">-->
+      <!--          {{scope.row.deptId}}-->
+      <!--        </template>-->
+      <!--      </el-table-column>-->
+      <!--      <el-table-column label="录入人" align="center" prop="createBy">-->
+      <!--        <template slot-scope="scope">-->
+      <!--          {{scope.row.deptId}}-->
+      <!--        </template>-->
+      <!--      </el-table-column>-->
       <el-table-column label="年份" align="center" prop="year">
         <template slot-scope="scope">
-          {{scope.row.year}}
+          {{ scope.row.year }}
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -103,20 +151,22 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['totexp:TOTEXP:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['totexp:TOTEXP:remove']"
-          >删除</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"
@@ -126,30 +176,59 @@
     <!-- 添加或修改保税区进出口总值数据对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form :ref="'form'" :model="form" :rules="rules" label-width="80px">
-        <el-form-item prop="deptId"  label-width="100px" label="保税区名称">
-          <el-select v-model="form.deptId" filterable default-first-option clearable placeholder="请选择保税区">
+        <el-form-item prop="deptId" label-width="100px" label="保税区名称">
+          <el-select
+            v-model="form.deptId"
+            filterable
+            default-first-option
+            clearable
+            placeholder="请选择保税区"
+          >
             <el-option
               v-for="item in deptList"
               :key="item.deptId"
               :label="item.deptName"
-              :value="item.deptId">
+              :value="item.deptId"
+            >
             </el-option>
           </el-select>
         </el-form-item>
         <el-form-item prop="year" label-width="100px" label="年份">
-          <el-select v-model="form.year" filterable default-first-option clearable placeholder="请选择年份">
+          <!-- <el-select v-model="form.year" filterable default-first-option clearable placeholder="请选择年份">
             <el-option
               v-for="(item,index) in nearYearList"
               :key="index"
               :label="item"
+              type="month"
               :value="item">
             </el-option>
-          </el-select>
+          </el-select> -->
+          <el-date-picker
+            v-model="form.year"
+            type="month"
+            placeholder="请选择年月"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <!-- <el-form-item label="分类" prop="typeName" label-width="110">
+          <el-cascader
+            clearable
+            v-model="seleValue"
+            :options="deptListSele"
+            :props="propOpt"
+            @change="handleChange"
+          >
+          </el-cascader>
+        </el-form-item> -->
+        <el-form-item prop="ratio" label-width="100px" label="同比">
+          <el-input v-model="form.ratio" placeholder="请输入同比"></el-input>
         </el-form-item>
         <el-form-item prop="imExport" label-width="100px" label="进出口总值">
-          <el-input  v-model="form.imExport" placeholder="请输入进出口总值" ></el-input>
+          <el-input
+            v-model="form.imExport"
+            placeholder="请输入进出口总值"
+          ></el-input>
         </el-form-item>
-
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -160,8 +239,14 @@
 </template>
 
 <script>
-import { listTOTEXP, getTOTEXP, delTOTEXP, addTOTEXP, updateTOTEXP } from "@/api/totexp/TOTEXP";
-import { listDept } from '@/api/system/dept'
+import {
+  listTOTEXP,
+  getTOTEXP,
+  delTOTEXP,
+  addTOTEXP,
+  updateTOTEXP,
+} from "@/api/totexp/TOTEXP";
+import { listDept } from "@/api/system/dept";
 
 export default {
   name: "TOTEXP",
@@ -200,23 +285,21 @@ export default {
         imExport: null,
         createTime: null,
         createBy: null,
-        year: null
+        year: null,
       },
       // 表单参数
       form: {},
       // 表单校验
       rules: {
         deptId: [
-          { required: true, message: "保税区不能为空", trigger: "blur" }
+          { required: true, message: "保税区不能为空", trigger: "blur" },
         ],
         imExport: [
           { required: true, message: "进出口值不能为空", trigger: "blur" },
-          { trigger: 'blur', validator: this.validatorFloatNum }
+          { trigger: "blur", validator: this.validatorFloatNum },
         ],
-        year: [
-          { required: true, message: "年份不能为空", trigger: "blur" }
-        ]
-      }
+        year: [{ required: true, message: "年份不能为空", trigger: "blur" }],
+      },
     };
   },
   created() {
@@ -227,18 +310,18 @@ export default {
     /** 查询保税区进出口总值数据列表 */
     getList() {
       this.loading = true;
-      listTOTEXP(this.queryParams).then(response => {
+      listTOTEXP(this.queryParams).then((response) => {
         this.TOTEXPList = response.rows;
         this.total = response.total;
         this.loading = false;
       });
-      this.getDeptList()
+      this.getDeptList();
     },
     // 获取保税区列表
     getDeptList() {
       this.loading = true;
-      listDept({parentId: '100'}).then(response => {
-        this.deptList = response.data
+      listDept({ parentId: "100" }).then((response) => {
+        this.deptList = response.data;
         this.loading = false;
       });
     },
@@ -249,12 +332,12 @@ export default {
 
       // 获取近三年
       let nearYearArr = [];
-      nearYearArr.push(curYear)
+      nearYearArr.push(curYear);
       for (let i = 1; i <= 4; i++) {
-        nearYearArr.push(curYear - i + '');
+        nearYearArr.push(curYear - i + "");
       }
 
-      this.nearYearList = nearYearArr
+      this.nearYearList = nearYearArr;
     },
     // 取消按钮
     cancel() {
@@ -267,7 +350,7 @@ export default {
         id: null,
         deptId: null,
         imExport: null,
-        year: null
+        year: null,
       };
       this.resetForm("form");
     },
@@ -283,9 +366,9 @@ export default {
     },
     // 多选框选中数据
     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() {
@@ -296,27 +379,27 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
-      getTOTEXP(id).then(response => {
+      const id = row.id || this.ids;
+      getTOTEXP(id).then((response) => {
         this.form = response.data;
-        this.form.deptId = Number(this.form.deptId)
+        this.form.deptId = Number(this.form.deptId);
         this.open = true;
         this.title = "修改保税区进出口总值数据";
       });
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
-        console.log(valid)
+      this.$refs["form"].validate((valid) => {
+        console.log(valid);
         if (valid) {
           if (this.form.id != null) {
-            updateTOTEXP(this.form).then(response => {
+            updateTOTEXP(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addTOTEXP(this.form).then(response => {
+            addTOTEXP(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -328,33 +411,43 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除保税区进出口总值数据编号为"' + ids + '"的数据项?').then(function() {
-        return delTOTEXP(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm(
+          '是否确认删除保税区进出口总值数据编号为"' + ids + '"的数据项?'
+        )
+        .then(function () {
+          return delTOTEXP(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('totexp/TOTEXP/export', {
-        ...this.queryParams
-      }, `TOTEXP_${new Date().getTime()}.xlsx`)
+      this.download(
+        "totexp/TOTEXP/export",
+        {
+          ...this.queryParams,
+        },
+        `TOTEXP_${new Date().getTime()}.xlsx`
+      );
     },
     // 校验参数
     validatorFloatNum(rule, value, callback) {
       let reg = /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g;
       if (!reg.test(value)) {
-        callback(new Error('请输入数字和正确格式的数字'));
-      } else if (value.split('.').length > 2) {
-        callback(new Error('请输入正确格式的数字')); //防止输入多个小数点
-      }  else {
+        callback(new Error("请输入数字和正确格式的数字"));
+      } else if (value.split(".").length > 2) {
+        callback(new Error("请输入正确格式的数字")); //防止输入多个小数点
+      } else {
         callback();
       }
-    // else if (value.indexOf('.') != -1 && value.split('.')[1].length > 6) {
-    //     callback(new Error('最多只能输入两位小数')); //小数点后两位
-    //   }
+      // else if (value.indexOf('.') != -1 && value.split('.')[1].length > 6) {
+      //     callback(new Error('最多只能输入两位小数')); //小数点后两位
+      //   }
     },
-  }
+  },
 };
 </script>