Browse Source

调整弹窗的大小

QuKatie 3 years ago
parent
commit
d6fa0d01c7

+ 2 - 5
src/components/crop-dialog/main.vue

@@ -2,6 +2,7 @@
   <div>
     <el-dialog
       title="客户信息"
+      top="5vh"
       class="el-dialogDeep"
       :visible.sync="portinfoVisible"
       width="60%"
@@ -70,7 +71,6 @@ export default {
       search: {},
       treeDeptId: "",
       treeDeptName: "",
-      height: window.innerHeight - 500,
       page: {
         currentPage: 1,
         total: 0,
@@ -108,7 +108,6 @@ export default {
   },
   created() {},
   mounted() {
-    option.height = window.innerHeight - 500;
   },
   methods: {
     cellStyle() {
@@ -138,9 +137,7 @@ export default {
         this.dataList = res.data.data.records;
         this.page.total = res.data.data.total;
         if (this.page.total) {
-          this.tableOption.height = window.innerHeight - 500;
-        } else {
-          this.tableOption.height = window.innerHeight - 200;
+          this.tableOption.height = window.innerHeight - 350;
         }
       });
     },

+ 2 - 5
src/components/customer-dialog/main.vue

@@ -11,6 +11,7 @@
     </div>
     <el-dialog
       title="客户信息"
+      top="5vh"
       :visible.sync="portinfoVisible"
       width="60%"
       append-to-body
@@ -79,7 +80,6 @@ export default {
       search: {},
       treeDeptId: "",
       treeDeptName: "",
-      height: window.innerHeight - 500,
       page: {
         currentPage: 1,
         total: 0,
@@ -126,7 +126,6 @@ export default {
   },
   created() {},
   mounted() {
-    option.height = window.innerHeight - 500;
   },
   methods: {
     closed() {
@@ -151,9 +150,7 @@ export default {
         this.dataList = res.data.data.records;
         this.page.total = res.data.data.total;
         if (this.page.total) {
-          this.tableOption.height = window.innerHeight - 500;
-        } else {
-          this.tableOption.height = window.innerHeight - 200;
+          this.tableOption.height = window.innerHeight - 350;
         }
       });
     },

+ 7 - 4
src/components/fee-info/main.vue

@@ -61,7 +61,7 @@
             @getCorpData="getCorpData"
             corpType="KH"
           ></crop-select>
-          <span  v-show="!row.$cellEdit">{{ row.corpName }}</span>
+          <span v-show="!row.$cellEdit">{{ row.corpName }}</span>
         </template>
         <template slot="feeName" slot-scope="{ row, index }">
           <el-button
@@ -137,6 +137,7 @@
       title="导入费用"
       append-to-body
       :visible.sync="feeDialog"
+      top="5vh"
       width="60%"
       :close-on-click-modal="false"
       @closed="feeClose"
@@ -377,7 +378,7 @@ export default {
         index: index
       };
       this.feeDialog = true;
-      this.option.height = window.innerHeight - 500;
+
       this.onLoad(this.page);
     },
     //费用编辑
@@ -405,6 +406,9 @@ export default {
         this.page.total = data.total;
         this.data = data.records;
         this.loading = false;
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 350;
+        }
       });
     },
     //导入页左费用类型查询
@@ -449,8 +453,7 @@ export default {
             });
           });
         }
-      }
-      else {
+      } else {
         this.selectionList.forEach(e => {
           this.feeData.push({
             itemId: e.id,

+ 2 - 3
src/components/goodsSelect/index.vue

@@ -31,6 +31,7 @@
     :visible.sync="dialogVisible"
     class="el-dialogDeep"
     append-to-body
+    top="5vh"
     width="80%">
     <template slot="title">
       <span class="el-dialog__title">
@@ -246,9 +247,7 @@ export default {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
         if (this.page.total) {
-          this.option.height = window.innerHeight - 500;
-        } else {
-          this.option.height = window.innerHeight - 200;
+          this.option.height = window.innerHeight - 350;
         }
       })
     },

+ 0 - 1
src/components/part-dialog/main.vue

@@ -95,7 +95,6 @@ export default {
       loading: true,
       data: [],
       tableOption: option,
-      height: window.innerHeight - 500,
       page: {
         currentPage: 1,
         total: 0,

+ 4 - 2
src/components/port-info/index.vue

@@ -26,6 +26,7 @@
     </div>
     <el-dialog
       title="港口信息"
+      top="5vh"
       :visible.sync="portinfoVisible"
       width="60%"
       append-to-body
@@ -107,7 +108,6 @@ export default {
       search: {},
       treeDeptId: "",
       treeDeptName: "",
-      height: window.innerHeight - 500,
       page: {
         currentPage: 1,
         total: 0,
@@ -161,7 +161,6 @@ export default {
     reportDialog
   },
   mounted() {
-    option.height = window.innerHeight - 500;
     //查询服务类别字典项
     getTypeTree().then(res => {
       this.findObject(this.tableOption.column, "typeId").dicData =
@@ -191,6 +190,9 @@ export default {
           this.data = res.data.data.records;
           this.page.total = res.data.data.total;
           this.loading = false;
+          if (this.page.total) {
+            this.tableOption.height = window.innerHeight - 350;
+          }
         }
       );
     },

+ 4 - 1
src/components/report-dialog/main.vue

@@ -2,6 +2,7 @@
   <el-dialog
     title="提报列表"
     :visible.sync="visible"
+    top="5vh"
     width="60%"
     :before-close="onClose"
     append-to-body
@@ -45,7 +46,6 @@ export default {
         total: 0
       },
       option: {
-        height: window.innerHeight - 500,
         addBtn: false,
         border: true,
         index: true,
@@ -111,6 +111,9 @@ export default {
         this.page.total = data.total;
         this.data = data.records;
         this.loading = false;
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 350;
+        }
       });
     },
     goReport(name) {

+ 2 - 4
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -385,7 +385,7 @@
       :destroy-on-close="true"
       :close-on-press-escape="false"
       @close="closeGoods"
-      top="10vh"
+      top="5vh"
       v-dialog-drag
     >
       <span>
@@ -1232,9 +1232,7 @@ export default {
           this.page.total = data.total;
           this.goodsList = data.records;
           if (this.page.total) {
-            this.goodsOption.height = window.innerHeight - 550;
-          } else {
-            this.goodsOption.height = window.innerHeight - 475;
+            this.goodsOption.height = window.innerHeight - 350;
           }
         })
         .finally(() => {

+ 6 - 7
src/views/exportTrade/invoice/detailsPage.vue

@@ -50,11 +50,11 @@
           :option="option"
         >
           <template slot="corpId">
-            <select-component
+            <crop-select
               v-model="form.corpId"
-              :configuration="configuration"
+              corpType="KH"
               :disabled="detailData.status == 1"
-            ></select-component>
+            ></crop-select>
           </template>
           <template slot="storageId">
             <warehouse-select
@@ -202,7 +202,8 @@
       :destroy-on-close="true"
       :close-on-press-escape="false"
       @close="closeGoods"
-      top="10vh"
+      top="5vh"
+      v-dialog-drag
     >
       <span>
         <el-row>
@@ -661,9 +662,7 @@ export default {
         this.goodsList = data.records;
         this.loading = false;
         if (this.page.total) {
-          this.goodsOption.height = window.innerHeight - 550;
-        } else {
-          this.goodsOption.height = window.innerHeight - 475;
+          this.goodsOption.height = window.innerHeight - 350;
         }
       });
     },

+ 8 - 6
src/views/exportTrade/invoice/index.vue

@@ -72,10 +72,7 @@
           <el-button type="info" size="small">报表</el-button>
         </template>
         <template slot="corpIdSearch">
-          <select-component
-            v-model="search.corpId"
-            :configuration="configuration"
-          ></select-component>
+          <crop-select v-model="search.corpId" corpType="KH"></crop-select>
         </template>
         <template slot-scope="scope" slot="menu">
           <el-button
@@ -95,7 +92,11 @@
         </template>
       </avue-crud>
     </basic-container>
-    <detail-page @goBack="goBack" :detailData="detailData" v-show="!show"></detail-page>
+    <detail-page
+      @goBack="goBack"
+      :detailData="detailData"
+      v-if="!show"
+    ></detail-page>
   </div>
 </template>
 
@@ -135,7 +136,7 @@ export default {
         pageSize: 10,
         currentPage: 1,
         total: 0,
-        pageSizes:[10,50,100,200,300,400,500]
+        pageSizes: [10, 50, 100, 200, 300, 400, 500]
       },
       show: true,
       detailData: {},
@@ -261,6 +262,7 @@ export default {
       }
       this.show = true;
       this.$store.commit("OUT_OUT_DETAIL");
+      this.onLoad(this.page, this.search);
     },
     summaryMethod({ columns, data }) {
       const sums = [];

+ 6 - 7
src/views/exportTrade/purchaseContract/detailsPage.vue

@@ -35,11 +35,11 @@
           :option="option"
         >
           <template slot="corpId">
-            <select-component
+            <crop-select
               v-model="form.corpId"
-              :configuration="configuration"
+              corpType="KH"
               :disabled="detailData.status == 1"
-            ></select-component>
+            ></crop-select>
           </template>
           <template slot="exchangeRate">
             <el-input
@@ -211,7 +211,8 @@
       :destroy-on-close="true"
       :close-on-press-escape="false"
       @close="closeGoods"
-      top="10vh"
+      top="5vh"
+      v-dialog-drag
     >
       <span>
         <el-row>
@@ -765,9 +766,7 @@ export default {
         this.goodsList = data.records;
         this.loading = false;
         if (this.page.total) {
-          this.goodsOption.height = window.innerHeight - 550;
-        } else {
-          this.goodsOption.height = window.innerHeight - 475;
+          this.goodsOption.height = window.innerHeight - 350;
         }
       });
     },

+ 5 - 7
src/views/exportTrade/purchaseContract/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <basic-container v-if="show" class="page-crad">
+    <basic-container v-show="show" class="page-crad">
       <avue-crud
         ref="crud"
         :option="option"
@@ -41,10 +41,7 @@
           <el-button type="info" size="small">报表</el-button>
         </template>
         <template slot="corpIdSearch">
-          <select-component
-            v-model="search.corpId"
-            :configuration="configuration"
-          ></select-component>
+          <crop-select v-model="search.corpId" corpType="KH"></crop-select>
         </template>
         <template slot="businesDateSearch">
           <el-date-picker
@@ -106,7 +103,7 @@
         </template>
       </avue-crud>
     </basic-container>
-    <detail-page @goBack="goBack" :detailData="detailData" v-else></detail-page>
+    <detail-page @goBack="goBack" :detailData="detailData" v-if="!show"></detail-page>
   </div>
 </template>
 
@@ -137,7 +134,7 @@ export default {
         pageSize: 10,
         currentPage: 1,
         total: 0,
-        pageSizes:[10,50,100,200,300,400,500]
+        pageSizes: [10, 50, 100, 200, 300, 400, 500]
       },
       show: true,
       detailData: {},
@@ -249,6 +246,7 @@ export default {
     goBack() {
       this.detailData = this.$options.data().detailData;
       this.show = true;
+      this.onLoad(this.page, this.search);
     },
     async saveColumn() {
       const inSave = await this.saveColumnData(

+ 7 - 8
src/views/exportTrade/purchaseInquiry/detailsPage.vue

@@ -41,11 +41,11 @@
           :option="option"
         >
           <template slot="corpId">
-            <select-component
+            <crop-select
               v-model="form.corpId"
-              :configuration="configuration"
+              corpType="KH"
               :disabled="detailData.status == 1"
-            ></select-component>
+            ></crop-select>
           </template>
         </avue-form>
       </basic-container>
@@ -180,7 +180,7 @@
               :cropIndex="index"
               @getcorpId="getcorpId"
             ></customer-dialog>
-             <!-- <select-component
+            <!-- <select-component
                 v-if="row.$cellEdit"
               v-model="form.corpId"
               :configuration="configuration"
@@ -240,7 +240,8 @@
       :destroy-on-close="true"
       :close-on-press-escape="false"
       @close="closeGoods"
-      top="10vh"
+      top="5vh"
+      v-dialog-drag
     >
       <span>
         <el-row>
@@ -729,9 +730,7 @@ export default {
         this.goodsList = data.records;
         this.loading = false;
         if (this.page.total) {
-          this.goodsOption.height = window.innerHeight - 550;
-        } else {
-          this.goodsOption.height = window.innerHeight - 475;
+          this.goodsOption.height = window.innerHeight - 350;
         }
       });
     },

+ 4 - 6
src/views/exportTrade/purchaseInquiry/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <basic-container v-if="show" class="page-crad">
+    <basic-container v-show="show" class="page-crad">
       <avue-crud
         ref="crud"
         :option="option"
@@ -29,10 +29,7 @@
           <el-button type="info" size="small">报表</el-button>
         </template>
         <template slot="corpIdSearch">
-          <select-component
-            v-model="search.corpId"
-            :configuration="configuration"
-          ></select-component>
+          <crop-select v-model="search.corpId" corpType="KH"></crop-select>
         </template>
         <template slot="businesDateSearch">
           <el-date-picker
@@ -94,7 +91,7 @@
         </template>
       </avue-crud>
     </basic-container>
-    <detail-page @goBack="goBack" :detailData="detailData" v-else></detail-page>
+    <detail-page @goBack="goBack" :detailData="detailData" v-if="!show"></detail-page>
   </div>
 </template>
 
@@ -246,6 +243,7 @@ export default {
     goBack() {
       this.detailData = this.$options.data().detailData;
       this.show = true;
+      this.onLoad(this.page, this.search);
     },
     summaryMethod({ columns, data }) {
       const sums = [];

+ 6 - 7
src/views/exportTrade/receipt/detailsPage.vue

@@ -50,11 +50,11 @@
           :option="option"
         >
           <template slot="corpId">
-            <select-component
+            <crop-select
               v-model="form.corpId"
-              :configuration="configuration"
+              corpType="KH"
               :disabled="detailData.status == 1"
-            ></select-component>
+            ></crop-select>
           </template>
           <template slot="storageId">
             <warehouse-select
@@ -187,7 +187,8 @@
       :destroy-on-close="true"
       :close-on-press-escape="false"
       @close="closeGoods"
-      top="10vh"
+      top="5vh"
+      v-dialog-drag
     >
       <span>
         <el-row>
@@ -676,9 +677,7 @@ export default {
         this.goodsList = data.records;
         this.loading = false;
         if (this.page.total) {
-          this.goodsOption.height = window.innerHeight - 550;
-        } else {
-          this.goodsOption.height = window.innerHeight - 475;
+          this.goodsOption.height = window.innerHeight - 350;
         }
       });
     },

+ 6 - 8
src/views/exportTrade/receipt/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <basic-container v-if="show" class="page-crad">
+    <basic-container v-show="show" class="page-crad">
       <avue-crud
         ref="crud"
         :option="option"
@@ -60,10 +60,7 @@
           </el-date-picker>
         </template>
         <template slot="corpIdSearch">
-          <select-component
-            v-model="search.corpId"
-            :configuration="configuration"
-          ></select-component>
+          <crop-select v-model="search.corpId" corpType="KH"></crop-select>
         </template>
         <template slot-scope="scope" slot="corpId">
           {{ scope.row.corpsName }}
@@ -86,13 +83,13 @@
         </template>
       </avue-crud>
     </basic-container>
-    <detail-page @goBack="goBack" :detailData="detailData" v-else></detail-page>
+    <detail-page @goBack="goBack" :detailData="detailData" v-if="!show"></detail-page>
   </div>
 </template>
 
 <script>
 import option from "./config/mainList.json";
-import { getList, remove,gainUser } from "@/api/exportTrade/receipt";
+import { getList, remove, gainUser } from "@/api/exportTrade/receipt";
 import detailPage from "./detailsPage.vue";
 import { micrometerFormat } from "@/util/validate";
 import { defaultDate } from "@/util/date";
@@ -119,7 +116,7 @@ export default {
         pageSize: 10,
         currentPage: 1,
         total: 0,
-        pageSizes:[10,50,100,200,300,400,500]
+        pageSizes: [10, 50, 100, 200, 300, 400, 500]
       },
       show: true,
       detailData: {},
@@ -245,6 +242,7 @@ export default {
       }
       this.show = true;
       this.$store.commit("REC_OUT_DETAIL");
+      this.onLoad(this.page, this.search);
     },
     summaryMethod({ columns, data }) {
       const sums = [];

+ 8 - 9
src/views/exportTrade/salesContract/detailsPage.vue

@@ -50,12 +50,12 @@
             />
           </template>
           <template slot="corpId">
-            <select-component
+            <crop-select
               v-model="form.corpId"
-              :configuration="configuration"
+              @getCorpData="getCorpData"
+              corpType="KH"
               :disabled="detailData.status == 1"
-              @getRow="rowCorpdata"
-            ></select-component>
+            ></crop-select>
           </template>
           <template slot="priceTerms">
             <el-select
@@ -422,7 +422,8 @@
       :destroy-on-close="true"
       :close-on-press-escape="false"
       @close="closeGoods"
-      top="10vh"
+      top="5vh"
+      v-dialog-drag
     >
       <span>
         <el-row>
@@ -935,7 +936,7 @@ export default {
         }
       });
     },
-    rowCorpdata(row) {
+    getCorpData(row) {
       this.form.coefficient = row.coefficient;
     },
     cnameChange(row) {
@@ -1220,9 +1221,7 @@ export default {
         this.goodsList = data.records;
         this.loading = false;
         if (this.page.total) {
-          this.goodsOption.height = window.innerHeight - 550;
-        } else {
-          this.goodsOption.height = window.innerHeight - 475;
+          this.goodsOption.height = window.innerHeight - 350;
         }
       });
     },

+ 5 - 7
src/views/exportTrade/salesContract/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <basic-container v-if="show" class="page-crad">
+    <basic-container v-show="show" class="page-crad">
       <avue-crud
         ref="crud"
         :option="option"
@@ -35,10 +35,7 @@
           <el-button type="info" size="small">报表</el-button>
         </template>
         <template slot="corpIdSearch">
-          <select-component
-            v-model="search.corpId"
-            :configuration="configuration"
-          ></select-component>
+          <crop-select v-model="search.corpId" corpType="KH"></crop-select>
         </template>
         <template slot="portOfLoadSearch">
           <port-info v-model="search.portOfLoad" />
@@ -103,7 +100,7 @@
         </template>
       </avue-crud>
     </basic-container>
-    <detail-page @goBack="goBack" :detailData="detailData" v-else></detail-page>
+    <detail-page @goBack="goBack" :detailData="detailData" v-if="!show"></detail-page>
   </div>
 </template>
 
@@ -141,7 +138,7 @@ export default {
         pageSize: 10,
         currentPage: 1,
         total: 0,
-        pageSizes:[10,50,100,200,300,400,500]
+        pageSizes: [10, 50, 100, 200, 300, 400, 500]
       },
       show: true,
       detailData: {},
@@ -258,6 +255,7 @@ export default {
     goBack() {
       this.detailData = this.$options.data().detailData;
       this.show = true;
+      this.onLoad(this.page, this.search);
     },
     summaryMethod({ columns, data }) {
       const sums = [];

+ 3 - 4
src/views/exportTrade/shippingInquiry/detailsPage.vue

@@ -155,7 +155,8 @@
       :destroy-on-close="true"
       :close-on-press-escape="false"
       @close="closeGoods"
-      top="10vh"
+      top="5vh"
+      v-dialog-drag
     >
       <span>
         <el-row>
@@ -481,9 +482,7 @@ export default {
         this.goodsList = data.records;
         this.loading = false;
         if (this.page.total) {
-          this.goodsOption.height = window.innerHeight - 550;
-        } else {
-          this.goodsOption.height = window.innerHeight - 475;
+          this.goodsOption.height = window.innerHeight - 350;
         }
       });
     },

+ 4 - 9
src/views/exportTrade/shippingInquiry/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <basic-container v-if="show" class="page-crad">
+    <basic-container v-show="show" class="page-crad">
       <avue-crud
         ref="crud"
         :option="option"
@@ -19,12 +19,6 @@
         <template slot="menuLeft">
           <el-button type="info" size="small">报表</el-button>
         </template>
-        <template slot="corpIdSearch">
-          <select-component
-            v-model="search.corpId"
-            :configuration="configuration"
-          ></select-component>
-        </template>
         <template slot="portOfLoadSearch">
           <port-info v-model="search.portOfLoad" />
         </template>
@@ -84,7 +78,7 @@
         </template>
       </avue-crud>
     </basic-container>
-    <detail-page @goBack="goBack" :detailData="detailData" v-else></detail-page>
+    <detail-page @goBack="goBack" :detailData="detailData" v-if="!show"></detail-page>
   </div>
 </template>
 
@@ -112,7 +106,7 @@ export default {
         pageSize: 10,
         currentPage: 1,
         total: 0,
-        pageSizes:[10,50,100,200,300,400,500]
+        pageSizes: [10, 50, 100, 200, 300, 400, 500]
       },
       show: true,
       detailData: {},
@@ -201,6 +195,7 @@ export default {
     goBack() {
       this.detailData = this.$options.data().detailData;
       this.show = true;
+      this.onLoad(this.page, this.search);
     },
     async saveColumn() {
       const inSave = await this.saveColumnData(