Pārlūkot izejas kodu

修改保税区信息管理

lcmxs 1 gadu atpakaļ
vecāks
revīzija
46c3fbc56a
1 mainītis faili ar 77 papildinājumiem un 16 dzēšanām
  1. 77 16
      src/views/BONDED/index.vue

+ 77 - 16
src/views/BONDED/index.vue

@@ -91,21 +91,41 @@
           {{ scope.row.warehouse }}
         </template>
       </el-table-column>
+      <el-table-column label="标仓使用面积(万平方米)" align="center" prop="warehouseUsable">
+        <template slot-scope="scope">
+          {{ scope.row.warehouseUsable }}
+        </template>
+      </el-table-column>
       <el-table-column label="油库面积(万平方米)" align="center" prop="oilDepot">
         <template slot-scope="scope">
           {{ scope.row.oilDepot }}
         </template>
       </el-table-column>
+      <el-table-column label="油库使用面积(万平方米)" align="center" prop="oilDepotUsable">
+        <template slot-scope="scope">
+          {{ scope.row.oilDepotUsable }}
+        </template>
+      </el-table-column>
       <el-table-column label="冷库面积(万平方米)" align="center" prop="refrigeratory">
         <template slot-scope="scope">
           {{ scope.row.refrigeratory }}
         </template>
       </el-table-column>
+      <el-table-column label="冷库使用面积(万平方米)" align="center" prop="refrigeratoryUsable">
+        <template slot-scope="scope">
+          {{ scope.row.refrigeratoryUsable }}
+        </template>
+      </el-table-column>
       <el-table-column label="厂房面积(万平方米)" align="center" prop="workshop">
         <template slot-scope="scope">
           {{ scope.row.workshop }}
         </template>
       </el-table-column>
+      <el-table-column label="厂房使用面积(万平方米)" align="center" prop="workshopUsable">
+        <template slot-scope="scope">
+          {{ scope.row.workshopUsable }}
+        </template>
+      </el-table-column>
       <el-table-column
         label="操作"
         align="center"
@@ -141,8 +161,8 @@
 <!--    />-->
 
     <!-- 添加或修改保税区管理对话框 -->
-    <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="50%" append-to-body novalidate>
-      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+    <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="60%" append-to-body novalidate>
+      <el-form ref="form" :model="form" :rules="rules" label-width="150px">
         <el-row>
           <el-col :span="12">
             <el-form-item label="保税区名称" prop="deptName">
@@ -174,41 +194,64 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
+            <el-form-item label="批复时间" prop="approvalTime">
+              <el-date-picker
+                style="width: 100%"
+                v-model="form.approvalTime"
+                type="date"
+                placeholder="选择日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
             <el-form-item label="标仓面积" prop="warehouse">
-              <el-input type="number" v-model="form.warehouse" placeholder="请输入(万平方米)"></el-input>
+              <el-input type="number" v-model="form.warehouse" @input="handleNumberInput('warehouse')" placeholder="请输入(万平方米)"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="标仓使用面积" prop="warehouseUsable">
+              <el-input type="number" v-model="form.warehouseUsable" @input="handleNumberInput('warehouseUsable')" placeholder="请输入(万平方米)"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">
             <el-form-item label="油库面积" prop="oilDepot">
-              <el-input type="number" v-model="form.oilDepot" placeholder="请输入(万平方米)"></el-input>
+              <el-input type="number" v-model="form.oilDepot" @input="handleNumberInput('oilDepot')" placeholder="请输入(万平方米)"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="油库使用面积" prop="oilDepotUsable">
+              <el-input type="number" v-model="form.oilDepotUsable" @input="handleNumberInput('oilDepotUsable')" placeholder="请输入(万平方米)"></el-input>
             </el-form-item>
           </el-col>
+        </el-row>
+        <el-row>
           <el-col :span="12">
             <el-form-item label="冷库面积" prop="refrigeratory">
-              <el-input type="number" v-model="form.refrigeratory" placeholder="请输入(万平方米)"></el-input>
+              <el-input type="number" v-model="form.refrigeratory" @input="handleNumberInput('refrigeratory')" placeholder="请输入(万平方米)"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="冷库使用面积" prop="refrigeratoryUsable">
+              <el-input type="number" v-model="form.refrigeratoryUsable" @input="handleNumberInput('refrigeratoryUsable')" placeholder="请输入(万平方米)"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">
             <el-form-item label="厂房面积" prop="workshop">
-              <el-input type="number" v-model="form.workshop" placeholder="请输入(万平方米)"></el-input>
+              <el-input type="number" v-model="form.workshop" @input="handleNumberInput('workshop')" placeholder="请输入(万平方米)"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="批复时间" prop="approvalTime">
-              <el-date-picker
-                style="width: 100%"
-                v-model="form.approvalTime"
-                type="date"
-                placeholder="选择日期">
-              </el-date-picker>
+            <el-form-item label="厂房使用面积" prop="workshopUsable">
+              <el-input type="number" v-model="form.workshopUsable" @input="handleNumberInput('workshopUsable')" placeholder="请输入(万平方米)"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
-
         <el-row>
           <el-col :span="12"></el-col>
           <el-col :span="12"></el-col>
@@ -283,9 +326,13 @@ export default {
         useArea: [{ required: true, message: "已使用面积不能为空", trigger: "blur" }],
         usageRate: [{ required: true, message: "使用率不能为空", trigger: "blur" }],
         warehouse: [{ required: true, message: "仓库面积不能为空", trigger: "blur" }],
+        warehouseUsable: [{ required: true, message: "仓库使用面积不能为空", trigger: "blur" }],
         oilDepot: [{ required: true, message: "油库面积不能为空", trigger: "blur" }],
+        oilDepotUsable: [{ required: true, message: "油库使用面积不能为空", trigger: "blur" }],
         refrigeratory: [{ required: true, message: "冷库面积不能为空", trigger: "blur" }],
+        refrigeratoryUsable: [{ required: true, message: "冷库使用面积不能为空", trigger: "blur" }],
         workshop: [{ required: true, message: "厂房面积不能为空", trigger: "blur" }],
+        workshopUsable: [{ required: true, message: "厂房使用面积不能为空", trigger: "blur" }],
         approvalTime: [{ required: true, message: "批复时间不能为空", trigger: "blur" }],
       },
     };
@@ -353,6 +400,15 @@ export default {
         this.title = "修改保税区信息管理";
       });
     },
+    handleNumberInput(key) {
+      // 将输入的值转换为整数
+      this.form[key] = parseInt(this.form[key]);
+
+      // 如果需要检查是否是数字,可以添加以下检查
+      if (isNaN(this.form[key])) {
+        this.form[key] = 0; // 或者设置为默认值
+      }
+    },
     /** 提交按钮 */
     submitForm() {
       // 验证输入是否是有效的数字
@@ -361,11 +417,16 @@ export default {
 
       if (isNumber(this.form.acceptanceArea) &&
         isNumber(this.form.useArea) &&
+        isNumber(this.form.warehouseUsable) &&
+        isNumber(this.form.oilDepotUsable) &&
+        isNumber(this.form.refrigeratoryUsable) &&
+        isNumber(this.form.workshopUsable) &&
+        isNumber(this.form.planningArea) &&
         isNumber(this.form.warehouse) &&
         isNumber(this.form.oilDepot) &&
         isNumber(this.form.refrigeratory) &&
-        isNumber(this.form.workshop) &&
-        isNumber(this.form.planningArea)) {
+        isNumber(this.form.workshop)
+      ) {
         this.$refs["form"].validate((valid) => {
           if (valid) {
             if (this.form.deptId != null) {