Browse Source

托书列表分页查询

jbb 2 năm trước cách đây
mục cha
commit
eb21994645
2 tập tin đã thay đổi với 57 bổ sung37 xóa
  1. 7 0
      src/api/document/book.js
  2. 50 37
      src/views/book/book-list.vue

+ 7 - 0
src/api/document/book.js

@@ -1 +1,8 @@
 /** 单证 -- 托书 **/
+import { getAction,deleteAction,postAction} from '@/api/manage'
+
+//分页查询
+const bookList = params => getAction('/syShippingOrder/syShippingOrder/list', params)
+
+export {bookList}
+

+ 50 - 37
src/views/book/book-list.vue

@@ -8,7 +8,7 @@
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-item label="订单号">
-                <a-input placeholder="请输入订单号" v-model="queryParam.orderNum"></a-input>
+                <a-input placeholder="请输入订单号" v-model="queryParam.orderNumber"></a-input>
               </a-form-item>
             </a-col>
 
@@ -20,26 +20,26 @@
 
             <a-col :md="6" :sm="8">
               <a-form-item label="客户简称">
-                <a-input placeholder="请输入客户简称" v-model="queryParam.customerShortName"></a-input>
+                <a-input placeholder="请输入客户简称" v-model="queryParam.clientAbbreviation"></a-input>
               </a-form-item>
             </a-col>
 
             <template v-if="toggleSearchStatus">
               <a-col :md="6" :sm="8">
                 <a-form-item label="箱号">
-                  <a-input placeholder="请输入箱号" v-model="queryParam.boxNo"></a-input>
+                  <a-input placeholder="请输入箱号" v-model="queryParam.containerNumber"></a-input>
                 </a-form-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-item label="小po号">
-                  <a-input placeholder="请输入小po号" v-model="queryParam.smallPo"></a-input>
+                  <a-input placeholder="请输入小po号" v-model="queryParam.smailPo"></a-input>
                 </a-form-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-item label="托书号">
-                  <a-input placeholder="请输入托书号" v-model="queryParam.preBookNum"></a-input>
+                  <a-input placeholder="请输入托书号" v-model="queryParam.shippingOrderNumber"></a-input>
                 </a-form-item>
               </a-col>
             </template>
@@ -67,7 +67,6 @@
       <!-- 子表 -->
       <a-table
         bordered
-        :row-key="record => record.id"
         :columns="bookListColumns"
         :data-source="bookListData"
         :loading="loading"
@@ -76,12 +75,12 @@
         @change="handleTableChange"
         :scroll="{ x: 1500 }"
       >
-        <!-- 金额 输入框-->
+        <!-- 金额 输入框
         <template slot="money" slot-scope="text, record, index">
           <a-form-model-item prop="money" :rules="rules.money" required>
             <a-input style="width:100%" type="text" v-model="record.money" />
           </a-form-model-item>
-        </template>
+        </template> -->
 
         <!-- 单据状态 -->
         <span slot="documentStateSlot">
@@ -130,6 +129,7 @@ import moment from 'moment'
 import addBookDrawer from '@views/book/addBookDrawer.vue'
 import detailsBookDrawer from '@views/book/detailsBookDrawer.vue'
 import editBookDrawer from '@views/book/editBookDrawer.vue'
+import {bookList} from '@api/document/book.js'
 
 export default {
   name: 'BookList', // 托书列表
@@ -140,10 +140,10 @@ export default {
     return {
       // 表头
       bookListColumns: [
-        { title: '托书号', width: 120, dataIndex: 'bookNum', fixed: 'left', className: 'replacecolor' },
-        { title: '订单号', width: 120, dataIndex: 'orderNum', fixed: 'left', className: 'replacecolor' },
+        { title: '托书号', width: 120, dataIndex: 'shippingOrderNumber', fixed: 'left', className: 'replacecolor' },
+        { title: '订单号', width: 120, dataIndex: 'orderNumber', fixed: 'left', className: 'replacecolor' },
         { title: '外销发票号码', dataIndex: 'exportInvoiceNo', width: 120, className: 'replacecolor' },
-        { title: '客户简称', dataIndex: 'customerShortName', width: 120, className: 'replacecolor' },
+        { title: '客户简称', dataIndex: 'clientAbbreviation', width: 120, className: 'replacecolor' },
         {
           title: '分销点',
           dataIndex: 'distributionPoint',
@@ -153,32 +153,32 @@ export default {
         },
         {
           title: '经营单位',
-          dataIndex: 'unitOperation',
+          dataIndex: 'unitInOperation',
           width: 150,
           customRender: t => ellipsis(t),
           className: 'replacecolor'
         },
-        { title: '总箱数', dataIndex: 'totalBoxes', width: 120, className: 'replacecolor' },
-        { title: '总毛重', dataIndex: 'totalRoughWeigh', width: 120, className: 'replacecolor' },
+        { title: '总箱数', dataIndex: 'boxNumber', width: 120, className: 'replacecolor' },
+        { title: '总毛重', dataIndex: 'totalGrossWeight', width: 120, className: 'replacecolor' },
         { title: '总体积', dataIndex: 'totalVolume', width: 100, className: 'replacecolor' },
         {
           title: '金额',
           dataIndex: 'money',
-          scopedSlots: { customRender: 'money' },
+          // scopedSlots: { customRender: 'money' },
           width: 140,
           className: 'replacecolor'
         },
 
         {
           title: '实际船期',
-          dataIndex: 'actualShipDate',
+          dataIndex: 'theActualShippingDate',
           width: 120,
           // customRender: text => { 有问题 显示当日日期
           //   return moment(text).format('YYYY-MM-DD')
           // },
           className: 'replacecolor'
         },
-        { title: '收汇方式', dataIndex: 'collectionMethod', width: 120, className: 'replacecolor' },
+        { title: '收汇方式', dataIndex: 'exchangeEarningsValue', width: 120, className: 'replacecolor' },
         {
           title: '收货人',
           dataIndex: 'consignee',
@@ -188,20 +188,20 @@ export default {
         },
         {
           title: '提单或承运收据',
-          dataIndex: 'billLadingOrCarriageReceipt',
+          dataIndex: 'billOfLadingOrCarriageReceipt',
           width: 140,
           customRender: t => ellipsis(t),
           className: 'replacecolor'
         },
         {
           title: '抬头人',
-          dataIndex: 'headPerson',
+          dataIndex: 'addressee',
           width: 120,
           customRender: t => ellipsis(t),
           className: 'replacecolor'
         },
         { title: '贸易国别', dataIndex: 'tradeCountry', width: 100, className: 'replacecolor' },
-        { title: '运抵国别', dataIndex: 'arriveCountry', width: 100, className: 'replacecolor' },
+        { title: '运抵国别', dataIndex: 'arriveInCountry', width: 100, className: 'replacecolor' },
         { title: '出口口岸', dataIndex: 'exportPort', width: 100, className: 'replacecolor' },
         {
           title: '通知人',
@@ -210,12 +210,12 @@ export default {
           customRender: t => ellipsis(t),
           className: 'replacecolor'
         },
-        { title: 'NOTIFY', dataIndex: 'NOTIFY', width: 150, className: 'replacecolor' },
+        { title: 'NOTIFY', dataIndex: 'nottfy', width: 150, className: 'replacecolor' },
         { title: '目的港', dataIndex: 'destinationPort', width: 100, className: 'replacecolor' },
-        { title: '装运期限', dataIndex: 'latestShipmentDate', width: 100, className: 'replacecolor' },
+        { title: '装运期限', dataIndex: 'latestDateOfShipment', width: 100, className: 'replacecolor' },
         {
           title: '单据状态',
-          dataIndex: 'documentState',
+          dataIndex: 'theDocumentsState',
           width: 90,
           scopedSlots: { customRender: 'documentStateSlot' },
           fixed: 'right',
@@ -230,33 +230,46 @@ export default {
           className: 'replacecolor'
         }
       ],
-      bookListData: [{ orderNum: 'AA002200001' }, {}, {}],
+      bookListData: [],
       id: '',
       loading: false, // 表格加载
 
       // 查询条件
       queryParam: {
-        orderNum: '',
-        orderDate: '',
-        customerShortName: '',
-        boxNo: '',
-        smallPo: '',
-        bookNum: ''
+        pageNo:''
       }
     }
   },
 
   created() {
-    // this.getOrderList() // 渲染预托书
+    this.getBookList( )
   },
   methods: {
+    //获取表格数据
+    getBookList(){
+      this.$nextTick(() => {
+        bookList(this.queryParam).then(res => {
+          if (res.success) {
+            debugger
+           this.bookListData = res.result.records
+          }else {
+             this.$message.error(res.message);
+          }
+        })
+      })
+    },
     // 查询按钮
     searchQuery() {
+      this.queryParam.pageNo = ''
+      this.getBookList()
       // this.getpreBookList() // 渲染渲染预托书
     },
     // 重置
     searchReset() {
-      this.queryParam = {}
+      this.queryParam = {
+        pageNo:''
+      }
+      this.getBookList()
       // this.getpreBookList()
     },
     // 新增
@@ -289,11 +302,11 @@ export default {
     },
 
     // // 分页、排序、筛选变化时触发
-    // handleTableChange(pagination, filters, sorter) {
-    //   // console.log('当前页信息>>>>',pagination)
-    //   this.queryParam.pageNo = pagination.current
-    //   this.getOrderList()
-    // }
+    handleTableChange(pagination, filters, sorter) {
+      // console.log('当前页信息>>>>',pagination)
+      this.queryParam.pageNo = pagination.current
+      this.getBookList()
+    },
     aa() {},
     bb() {},
     cc() {}