瀏覽代碼

染损、发运明细分页数据展示+面损超链接字段更改

liangy 3 年之前
父節點
當前提交
36129bd63b

+ 22 - 27
src/views/reportForms/dye-loss-table.vue

@@ -158,14 +158,13 @@ export default {
         cvenName: '', //供应商
         planLotNumber: '', //计划单号
         csocode: '', //销售订单号
-        pageNo: '1' // 初始页
-        // pageSize: '10' // 为了显示数据总计数
+        pageNo: '' //  点击的页数
       },
       // 分页
       pagination: {
-        total: 0,
-        current: 0,
-        pageSize: 0
+        // total: '', //总条数
+        // current: '', //当前页
+        // pageSize: '' //一页多少
       },
       cvenNameArr: [], //供应商数组 chart
       cinvNameArr: [], //物料名称数组chart
@@ -196,36 +195,30 @@ export default {
     // 分页查询 染损列表
     getdyeLossList() {
       this.$nextTick(() => {
-        console.log('111')
         dyeLossList(this.queryParam).then(res => {
-          console.log('查询接口调成')
-          console.log(res.result)
+          // console.log(res.result)
           if (res.success) {
-            console.log('333')
             this.dyeLossRateData = res.result.records
             console.log('染损列表', this.dyeLossRateData)
-            console.log('染损列表cvenName', this.dyeLossRateData.cinvCode)
-            // 分页信息赋值
             this.pagination = {
               total: res.result.total,
               current: res.result.current,
               pageSize: res.result.size
             }
-            console.log('this.pagination:', this.pagination)
-            console.log('res.result.total', res.result.total)
+            console.log('分页器赋值:', this.pagination.total, this.pagination.current, this.pagination.pageSize)
           }
         })
       })
     },
-    // 分页、排序、筛选变化时触发
+    // 分页变化时触发
     handleTableChange(pagination, filters, sorter) {
-      console.log('当前页信息>>>>', pagination)
+      console.log('分页器信息>>>>', pagination)
       if (Object.keys(sorter).length > 0) {
         this.isorter.column = sorter.field
         this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
       }
       this.queryParam.pageNo = pagination.current
-      console.log('this.queryParam.pageNo', this.queryParam.pageNo)
+      // console.log('this.queryParam.pageNo', this.queryParam.pageNo)
       this.getdyeLossList()
     },
     // 查询按钮
@@ -248,17 +241,19 @@ export default {
     },
     // 合计行 TODO: table 单元格合并
     totalFooterShow(data) {
-      console.log('需合计数据(合计行)data', data)
-      return (
-        <a-table
-          rowKey={Math.random}
-          bordered={false}
-          pagination={false}
-          columns={this.dyeLossRateColumns}
-          dataSource={this.dyeLossRateDataSource || []}
-          showHeader={false}
-        ></a-table>
-      )
+      if (data) {
+        console.log('需合计数据(合计行)data', data)
+        return (
+          <a-table
+            rowKey={Math.random}
+            bordered={false}
+            pagination={false}
+            columns={this.dyeLossRateColumns}
+            dataSource={this.dyeLossRateDataSource || []}
+            showHeader={false}
+          ></a-table>
+        )
+      }
     }
   },
   computed: {

+ 6 - 20
src/views/reportForms/fabric-loss-table/purchaseInQuantityModal.vue

@@ -14,14 +14,14 @@
         <a-form layout="inline" @keyup.enter.native="searchQuery">
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
-              <a-form-item label="下游委外订单号">
-                <a-input placeholder="请输入下游委外订单号" v-model="queryParam.downAboardorderNum"></a-input>
+              <a-form-item label="委外订单号">
+                <a-input placeholder="请输入委外订单号" v-model="queryParam.aboardorderNum"></a-input>
               </a-form-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
-              <a-form-item label="委外订单号">
-                <a-input placeholder="请输入委外订单号" v-model="queryParam.aboardorderNum"></a-input>
+              <a-form-item label="下游委外订单号">
+                <a-input placeholder="请输入下游委外订单号" v-model="queryParam.downAboardorderNum"></a-input>
               </a-form-item>
             </a-col>
 
@@ -77,15 +77,8 @@ export default {
       // 表头
       purchaseInQuantityColumns: [
         {
-          title: '下游委外订单号',
-          dataIndex: 'DownAboardOrderNo',
-          width: 120,
-          key: '',
-          className: 'replacecolor'
-        },
-        {
-          title: '下游供应商',
-          dataIndex: 'downSupplier',
+          title: '批号',
+          dataIndex: '',
           width: 120,
           key: '',
           className: 'replacecolor'
@@ -104,13 +97,6 @@ export default {
           key: '',
           className: 'replacecolor'
         },
-        {
-          title: '使用数量',
-          dataIndex: 'usageQuantity',
-          width: 120,
-          key: '',
-          className: 'replacecolor'
-        },
         {
           title: '单个物料成本',
           dataIndex: 'costPerMaterial',

+ 17 - 31
src/views/shipment-details/shipmentList.vue

@@ -24,29 +24,7 @@
                 />
               </a-form-item>
             </a-col>
-            <!-- <a-col :md="6" :sm="8">
-              <a-form-item label="开始时间">
-                <a-date-picker
-                  placeholder="请选择开始时间"
-                  format="YYYY-MM-DD"
-                  style="width: 100%"
-                  v-model="queryParam.startTime"
-                  @change="startTimeChange"
-                />
-              </a-form-item>
-            </a-col> -->
 
-            <!-- <a-col :md="6" :sm="8">
-              <a-form-item label="结束时间" style="width:100%;">
-                <a-date-picker
-                  placeholder="请选择结束时间"
-                  format="YYYY-MM-DD"
-                  style="width: 100%"
-                  v-model="queryParam.endTime"
-                  @change="endTimeChange"
-                />
-              </a-form-item>
-            </a-col> -->
             <a-col :md="6" :sm="8">
               <a-form-item label="预发货日期">
                 <a-date-picker
@@ -104,7 +82,7 @@
         <a-button type="primary" @click.stop="addShipDet" icon="plus">新增</a-button>
       </div>
 
-      <!-- 子表  :row-key="record => record.id"-->
+      <!-- 子表  :row-key="record => record.id"  :pagination="ipagination-->
       <a-table
         v-if="shipmentListData"
         bordered
@@ -112,7 +90,7 @@
         :columns="shipmentListColumns"
         :data-source="shipmentListData"
         :loading="loading"
-        :pagination="ipagination"
+        :pagination="pagination"
         :scroll="{ x: 1500 }"
         @change="handleTableChange"
       >
@@ -479,14 +457,13 @@ export default {
         salesman: '',
         itemNumber: '', // 款号
         refer: '',
-        pageNo: '', // 初始页
-        pageSize: '-1' // 为了显示数据总计数
+        pageNo: '' // 点击的页数
       },
       // 分页
       pagination: {
-        total: '',
-        current: 0,
-        pageSize: 0
+        // total: '',
+        // current: 0,
+        // pageSize: 0
       },
       dateFormat: 'YYYY-MM-DD'
     }
@@ -502,17 +479,26 @@ export default {
           if (res.success) {
             this.shipmentListData = res.result.records
             console.log('发运明细列表', this.shipmentListData)
-            // 分页信息赋值
             this.pagination = {
               total: res.result.total,
               current: res.result.current,
               pageSize: res.result.size
             }
+            console.log('分页器赋值:', this.pagination.total, this.pagination.current, this.pagination.pageSize)
           }
         })
       })
     },
-
+    // 分页变化时触发
+    handleTableChange(pagination, filters, sorter) {
+      console.log('分页器信息', pagination)
+      if (Object.keys(sorter).length > 0) {
+        this.isorter.column = sorter.field
+        this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
+      }
+      this.queryParam.pageNo = pagination.current
+      this.getShipmentList()
+    },
     // 查询按钮
     searchQuery() {
       this.getShipmentList()