Browse Source

支持分页等优化功能

caojunjie 4 years ago
parent
commit
6ded923e62

+ 2 - 2
src/router/index.js

@@ -48,8 +48,8 @@ export default new Router({
         footer:true
       }
     },{
-      path: '/contractPlacing/index',
-      name: 'contractPlacing',
+      path: '/eontractPlaCing',
+      name: 'eontractPlaCing',
       component: () => import('../views/contractPlacing/index'),
       meta: {
         keepAlive: true,

+ 12 - 3
src/views/contractPlacing/index.vue

@@ -172,7 +172,7 @@
                      :disabled="!form.fLoadportid || !form.fDestportid">查看船期
           </el-button>
         </div>
-        <span style="color:red;display: block;margin-bottom: -40px;">{{estimaTe.pidName}}&nbsp;&nbsp;&nbsp;{{estimaTe.fNo}}</span>
+        <span style="color:red;display: block;margin:0 auto;margin-bottom: -20px;">{{estimaTe.pidName}}&nbsp;&nbsp;&nbsp;{{estimaTe.fNo}}</span>
         <!--        步骤条-->
         <div style="width: 100%;" v-if="!estimaTe">
           <div style="width: 80%;margin: 0 auto;padding-bottom: 10px">
@@ -182,8 +182,8 @@
         </div>
         <div class="stepBarIcon" v-if="estimaTe">
           <div class="iconShip">
-            <img src="@/assets/ship.png" alt="">
-            <img src="@/assets/ship.png" alt="">
+            <img src="@/assets/ship.png" style="height: 100%;" alt="">
+            <img src="@/assets/ship.png" style="height: 100%;" alt="">
           </div>
           <div class="stepBarLine">
             <div v-for="item in 5"></div>
@@ -439,6 +439,7 @@
             <el-table-column
               prop="fCntrno"
               align="center"
+              width="160"
               label="箱号">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.fCntrno" placeholder="请输入箱号"></el-input>
@@ -447,6 +448,7 @@
             <el-table-column
               prop="fSealno"
               align="center"
+              width="160"
               label="铅封号">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.fSealno" placeholder="请输入铅封号"></el-input>
@@ -455,6 +457,7 @@
             <el-table-column
               prop="fCntrweight"
               align="center"
+              width="170"
               label="单箱重量(吨)">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.fCntrweight" placeholder="请输入单箱重量(吨)"></el-input>
@@ -463,6 +466,7 @@
             <el-table-column
               prop="fGoodsid"
               align="center"
+              width="160"
               label="货名">
               <template slot-scope="scope">
                 <!--                <el-input v-model="scope.row.fGoodsid" placeholder="请输入货名"></el-input>-->
@@ -489,6 +493,7 @@
             <el-table-column
               prop="fPackageid"
               align="center"
+              width="160"
               label="包装类型">
               <template slot-scope="scope">
                 <!--                <el-input v-model="scope.row.fGoodsid" placeholder="请输入货名"></el-input>-->
@@ -506,6 +511,7 @@
             <el-table-column
               prop="fCntrid"
               align="center"
+              width="160"
               label="箱型">
               <template slot-scope="scope">
                 <!--                <el-input v-model="scope.row.fGoodsid" placeholder="请输入货名"></el-input>-->
@@ -801,6 +807,9 @@ export default {
         .then(res => {
           console.log(res.data.rows[0]);
           this.form = res.data.rows[0];
+          this.form.fPaymode = this.form.fPaymode +''
+          this.form.fSign = this.form.fSign +''
+          this.form.fDetentioncargo = this.form.fDetentioncargo +''
           this.estimaTe = res.data.rows[0].tVoyageL;
           this.list = res.data.rows[0].tWarehousebillsCntrList[0];
           this.typeGoods = res.data.rows[0].tWarehousebillsCntrList[0].typeidName;

+ 1 - 1
src/views/inquiryAndOrder/index.vue

@@ -415,7 +415,7 @@ export default {
         });
     },
     placeAnOrder(res){
-      this.$router.push({ path: '/contractPlacing/index',query: { res:JSON.stringify(res) }})
+      this.$router.push({ path: '/eontractPlaCing',query: { res:JSON.stringify(res) }})
     },
     handleQuery() {
       // this.fMblnoOptions

+ 48 - 24
src/views/management/myorder.vue

@@ -1,5 +1,5 @@
 <template>
-  <div style="width: 70%;margin: 0 auto;display:flex;justify-content: space-around">
+  <div style="width: 85%;margin: 0 auto;display:flex;justify-content: space-around">
     <div style="width: 20%;height: 392px; margin-top: 60px;border: 1px solid #e7e7e7">
       <el-menu
         default-active="3"
@@ -63,7 +63,7 @@
         <div style="width: 20%;">
           <el-input placeholder="收货人" v-model="filterAll.fConsigneername"></el-input>
           <el-input placeholder="航次" v-model="filterAll.voyidName"></el-input>
-          <el-input placeholder="条数"></el-input>
+          <el-input placeholder="条数" v-model="filterAll.pageSize"></el-input>
         </div>
         <div style="width: 50%;">
           <div style="display:flex;justify-content: space-between">
@@ -72,9 +72,23 @@
             <el-input placeholder="目的港" style="width: 45%;"></el-input>
           </div>
           <div style="display:flex;justify-content: space-between;">
-            <el-input placeholder="创建开始时间" style="width: 45%;" v-model="filterAll.startTime"></el-input>
+<!--            <el-input placeholder="创建开始时间" style="width: 45%;" v-model="filterAll.startTime"></el-input>-->
+            <el-date-picker
+              v-model="filterAll.startTime"
+              style="width: 45%;"
+              type="date"
+              value-format="yyyy-MM-dd"
+              placeholder="创建开始时间">
+            </el-date-picker>
             <span style="margin-top: 20px">至</span>
-            <el-input placeholder="创建结束时间" style="width: 45%;" v-model="filterAll.endTime"></el-input>
+<!--            <el-input placeholder="创建结束时间" style="width: 45%;" v-model="filterAll.endTime"></el-input>-->
+            <el-date-picker
+              v-model="filterAll.endTime"
+              style="width: 45%;"
+              type="date"
+              value-format="yyyy-MM-dd"
+              placeholder="创建结束时间">
+            </el-date-picker>
           </div>
           <div style="display:flex;justify-content: space-between;">
             <el-input placeholder="单据有效期结束" style="width: 45%;"></el-input>
@@ -157,24 +171,16 @@
           </div>
         </div>
       </div>
-<!--      <div style="float: right;height: 40px;padding-top: 30px;margin-right: 20px">-->
-<!--        <el-pagination-->
-<!--          @size-change="handleSizeChange"-->
-<!--          @current-change="handleCurrentChange"-->
-<!--          :current-page="currentPage4"-->
-<!--          :page-sizes="[100, 200, 300, 400]"-->
-<!--          :page-size="100"-->
-<!--          layout="total, sizes, prev, pager, next, jumper"-->
-<!--          :total="400">-->
-<!--        </el-pagination>-->
-<!--        <pagination-->
-<!--          v-show="total>0"-->
-<!--          :total="total"-->
-<!--          :page.sync="queryParams.pageNum"-->
-<!--          :limit.sync="queryParams.pageSize"-->
-<!--          @pagination="getList"-->
-<!--        />-->
-<!--      </div>-->
+      <div style="float: right;height: 40px;padding-top: 30px;margin-right: 20px">
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="10"
+          layout="sizes, prev, pager, next"
+          :total="total">
+        </el-pagination>
+      </div>
     </div>
   </div>
 </template>
@@ -188,14 +194,31 @@ export default {
     return {
       activeIndex: '1',
       checked: true,
-      filterAll: {},
+      total:0,
+      filterAll: {
+        pageNum:1,
+        pageSize:10
+      },
       dataList: []
     };
   },
   created() {
+    let myDate = new Date();
+    this.filterAll.startTime = myDate.getFullYear() + '-' + myDate.getMonth() + '-' +myDate.getDate()
+    console.log(this.filterAll.startTime);
     this.getList()
   },
   methods: {
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+      this.filterAll.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      console.log(`当前页: ${val}`);
+      this.filterAll.pageNum = val
+      this.getList()
+    },
     getList() {
       request({
         url: '/khwarehouse/warehousebills/webVersionOrderMessage',
@@ -205,6 +228,7 @@ export default {
         .then(res => {
           console.log(res);
           this.dataList = res.data.rows;
+          this.total = res.data.total
         })
         .catch(err => {
           console.log(err);
@@ -214,7 +238,7 @@ export default {
       // console.log(fId);
       // this.$router.push({ path: '/contractPlacing/index', query: { userId: fId } });
       this.$router.push({
-        path: '/contractPlacing/index',
+        path: '/eontractPlaCing',
         query: { data:JSON.stringify(fId) },
       });
     },