ソースを参照

feat:化纤打印日志分页失效问题

lucky 2 ヶ月 前
コミット
29d3409b87

+ 5 - 0
zkqy-common/src/main/java/com/zkqy/common/utils/SecurityUtils.java

@@ -78,6 +78,11 @@ public class SecurityUtils {
         }
     }
 
+    public static LoginUser getLoginUser2() {
+      return (LoginUser) getAuthentication().getPrincipal();
+
+    }
+
     /**
      * 获取Authentication
      */

+ 28 - 3
zkqy-custom-business/src/main/java/com/zkqy/business/controller/ProductCodeListController.java

@@ -1,5 +1,7 @@
 package com.zkqy.business.controller;
 
+import java.text.DecimalFormat;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
@@ -8,7 +10,9 @@ import com.zkqy.business.domain.ProductCodeLog;
 import com.zkqy.business.domain.ProductWarehousingRecord;
 import com.zkqy.business.domain.vo.NewOldProductCodeListVO;
 import com.zkqy.business.domain.vo.ProductCodeListVO;
+import com.zkqy.business.mapper.ProductCodeListMapper;
 import com.zkqy.business.service.*;
+import com.zkqy.common.utils.PageUtils;
 import com.zkqy.common.utils.SecurityUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -47,6 +51,9 @@ public class ProductCodeListController extends BaseController {
 
     @Autowired // 修改日志
     private IProductCodeLogService productCodeLogService;
+
+    @Autowired
+    private ProductCodeListMapper productCodeListMapper;
     /**
      * 查询产品码单列表
      */
@@ -54,11 +61,29 @@ public class ProductCodeListController extends BaseController {
     @GetMapping("/list")
     @ApiOperation(value = "查询产品码单列表")
     public TableDataInfo list(ProductCodeListVO vo) {
-        startPage();
-        List<ProductCodeListVO> list = productCodeListService.selectProductCodeListList(vo);
-        return getDataTable(list);
+//        List<ProductCodeListVO> list = productCodeListService.selectProductCodeListList(vo);
+        List<ProductCodeListVO> productCodeListVOS = new ArrayList<>();
+        if (vo.getOtherStates() == 1) {  // 已打印总码单
+            startPage();
+            productCodeListVOS = productCodeListMapper.selectProductCodeListList1(vo);
+//            productCodeListVOS.addAll(productCodeListVOS1);
+        } else { // 未打印总码单
+            startPage();;
+            productCodeListVOS = productCodeListMapper.selectProductCodeListList1(vo);
+//            productCodeListVOS.addAll(productCodeListVOS1);
+        }
+        for (ProductCodeListVO vo1 : productCodeListVOS) {
+            // 处理总净重小数位
+            vo1.setTotalSuttle(handlingWeight(vo1.getTotalSuttle()));
+        }
+        return getDataTable(productCodeListVOS);
     }
 
+    public Double handlingWeight(Double weight) {
+        if (weight == null) return 0.00;
+        DecimalFormat df = new DecimalFormat("0.00");
+        return Double.parseDouble(df.format(weight));
+    }
     @GetMapping("/listBySaleProductID")
     @ApiOperation(value = "接续操作")
     public TableDataInfo list(ProductCodeList productCodeList) {

+ 7 - 2
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductCodeListServiceImpl.java

@@ -19,6 +19,7 @@ import com.zkqy.common.core.domain.AjaxResult;
 import com.zkqy.common.core.domain.entity.SysDictData;
 import com.zkqy.common.core.redis.RedisCache;
 import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.PageUtils;
 import com.zkqy.common.utils.SecurityUtils;
 import com.zkqy.common.utils.StringUtils;
 import com.zkqy.system.mapper.SysDictDataMapper;
@@ -177,9 +178,13 @@ public class ProductCodeListServiceImpl implements IProductCodeListService {
     public List<ProductCodeListVO> selectProductCodeListList(ProductCodeListVO vo) {
         List<ProductCodeListVO> productCodeListVOS = new ArrayList<>();
         if (vo.getOtherStates() == 1) {  // 已打印总码单
-            productCodeListVOS.addAll(productCodeListMapper.selectProductCodeListList(vo));
+            PageUtils.startPage();
+            List<ProductCodeListVO> productCodeListVOS1 = productCodeListMapper.selectProductCodeListList1(vo);
+            productCodeListVOS.addAll(productCodeListVOS1);
         } else { // 未打印总码单
-            productCodeListVOS.addAll(productCodeListMapper.selectProductCodeListList1(vo));
+            PageUtils.startPage();
+            List<ProductCodeListVO> productCodeListVOS1 = productCodeListMapper.selectProductCodeListList1(vo);
+            productCodeListVOS.addAll(productCodeListVOS1);
         }
         for (ProductCodeListVO vo1 : productCodeListVOS) {
             // 处理总净重小数位

+ 1 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductInventoryServiceImpl.java

@@ -5,6 +5,7 @@ import java.util.*;
 import java.util.stream.Collectors;
 
 import cn.hutool.core.util.RandomUtil;
+import com.github.pagehelper.PageHelper;
 import com.zkqy.business.domain.*;
 import com.zkqy.business.domain.vo.ProductCodeListVO;
 import com.zkqy.business.domain.vo.ProductInventoryTypeTotalSubCodeList;

+ 0 - 2
zkqy-custom-business/src/main/resources/mapper/business/ProductCodeListMapper.xml

@@ -230,8 +230,6 @@
     <select id="selectProductCodeListBySaleProductId" parameterType="com.zkqy.business.domain.ProductCodeList"
             resultMap="ProductCodeListResult">
         <include refid="selectProductCodeListVo"/>
-
-
         where sale_product_id = #{saleProductId}
         and lot_num = #{lotNum}
         and levels = #{levels}

+ 592 - 477
zkqy-ui/src/views/orderMange/lineSideCabin/InboundManagement.vue

@@ -1,477 +1,592 @@
-<template>
-  <el-card shadow="always" :body-style="{ padding: '10px' }">
-    <div class="app-container">
-      <div class="main-wrap">
-        <div class="left">
-          <el-form ref="form" :model="form" :rules="rules" label-width="80px" >
-            <el-form-item prop="machineTool" label="机台" style="width: 500px">
-              <el-select
-                v-model="form.machineTool"
-                filterable
-                @change="machineToolChange"
-              >
-                <el-option
-                  v-for="(item, index) in lineOptions"
-                  :key="index"
-                  :label="item.productionLineName"
-                  :value="item.id"
-                >
-                  <span class="discribe" style="float: left">{{item.productionLineName }}</span>
-                  <span
-                    style="float: right; color: #8492a6; font-size: 13px"
-                  >{{ item.productionLineDepartment }}</span
-                  >
-                </el-option>
-              </el-select>
-            </el-form-item>
-            <el-form-item prop="scid" label="丝车">
-              <el-select
-                v-model="form.scid"
-                filterable
-              >
-                <el-option
-                  v-for="(item, index) in silkcartList"
-                  :key="index"
-                  :label="item.scname"
-                  :value="item.id"
-                >
-                  <span class="discribe" style="float: left">{{item.scname }}</span>
-                  <span
-                    style="float: right; color: #8492a6; font-size: 13px"
-                  >{{ item.scWeight }}</span
-                  >
-                </el-option>
-              </el-select>
-            </el-form-item>
-            <el-form-item label="卷数" prop="js" style="width: 278px">
-              <el-input v-model="form.js" placeholder="请输入卷数"/>
-            </el-form-item>
-            <el-form-item label="毛重" prop="standby" style="width: 278px">
-              <el-input v-model="form.standby" placeholder="请输入毛重" />
-            </el-form-item>
-          </el-form>
-          <div slot="footer" class="dialog-footer">
-            <el-button type="primary" @click="submitForm">确 定</el-button>
-            <el-button @click="cancel">取 消</el-button>
-          </div>
-        </div>
-        <div class="right">
-          <div class="table-wrap">
-            <el-table
-              ref="proTableRef"
-              :data="batchTableData"
-              border
-              stripe
-              width="100%"
-              max-height="260"
-              highlight-current-row
-              @row-click="handleCurrentChange"
-            >
-              <!-- <el-table-column
-                  type="index"
-                  label="序号"
-                  width="50"
-                ></el-table-column> -->
-              <el-table-column
-                v-for="col in columns"
-                :prop="col.id"
-                :key="col.id"
-                :label="col.label"
-              >
-              </el-table-column>
-            </el-table>
-          </div>
-        </div>
-      </div>
-
-
-
-
-
-<!--      <pagination-->
-<!--        v-show="total>0"-->
-<!--        :total="total"-->
-<!--        :page.sync="queryParams.pageNum"-->
-<!--        :limit.sync="queryParams.pageSize"-->
-<!--        @pagination="getList"-->
-<!--      />-->
-
-      <!-- 添加或修改线边舱库存对话框 -->
-
-    </div>
-  </el-card>
-</template>
-
-<script>
-import { listLineSideCabin, getLineSideCabin, delLineSideCabin, addLineSideCabin, updateLineSideCabin,  getLineOptionLsit,  finishedProductList, listSilkcart,} from "@/api/lineSideCabin/lineSideCabin";
-import {getSilkcart} from "@/api/silkcart/silkcart";
-
-export default {
-  name: "LineSideCabin",
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 线边舱库存表格数据
-      lineSideCabinList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        productNo: null,
-        productName: null,
-        productSpecifications: null,
-        productId: null,
-        batchNumber: null,
-        colours: null,
-        machineTool: null,
-        js: null,
-        status: null,
-        standby: null,
-        standby1: null,
-        standby2: null,
-        standby3: null,
-        workshop: null,
-        recipient: null,
-        collectTime: null,
-        confirm: null,
-        confirmTime: null,
-        scid:null
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-      },
-      batchData: [], //所有批号数据
-      batchTableData: [], //批号表格数据
-      lineOptions: [], //机台选项数据
-      silkcartList: [], //丝车列表
-      xzbatchTableData: [], //选中的批号表格数据
-      columns: [
-        {
-          id: "productNo",
-          label: this.$t('printIndex.columns.productNo'),
-        },
-        {
-          id: "productName",
-          label: this.$t('printIndex.columns.productName'),
-        },
-        {
-          id: "productSpecifications",
-          label: this.$t('printIndex.columns.productSpecifications'),
-        },
-        {
-          id: "lotNum",
-          label: this.$t('printIndex.columns.lotNum'),
-        },
-        {
-          id: "productColor",
-          label: this.$t('printIndex.columns.productColor'),
-        },
-        // {
-        //   id: "productName",
-        //   label: "订单号",
-        // },
-      ],
-    };
-  },
-  created() {
-    this.getList();
-  },
-  mounted() {
-    this.getLineOptionLsit(); //获取机台选项数据
-  },
-  methods: {
-    /** 查询线边舱库存列表 */
-    getList() {
-      this.loading = true;
-      listLineSideCabin(this.queryParams).then(response => {
-        this.lineSideCabinList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        productNo: null,
-        productName: null,
-        productSpecifications: null,
-        productId: null,
-        batchNumber: null,
-        colours: null,
-        machineTool: null,//机台号
-        js: null,
-        status: null,
-        standby: null,
-        standby1: null,
-        standby2: null,
-        standby3: null,
-        workshop: null,
-        recipient: null,
-        collectTime: null,
-        confirm: null,
-        confirmTime: null,
-        scid:null
-      };
-      this.resetForm("form");
-    },
-    /** 机台相关 */
-    // 机台改变回调
-    machineToolChange(id) {
-      console.log("================选中机台")
-      if (id) {
-        this.form.machineToolNo = this.lineOptions.find(
-          (item) => item.id == id
-        ).productionLineNo;
-      }
-      this.getAllBatchData(id);
-    },
-    // 获取机台选项数据
-    async getLineOptionLsit() {
-      let payLoad = {
-        isEnablePaging: false,
-      };
-      try {
-        let res = await getLineOptionLsit(payLoad);
-        let scres = await listSilkcart(payLoad);
-        if (res.code == 200) {
-          this.lineOptions = res.rows;
-          this.silkcartList = scres.rows;
-          if (this.lineOptions.length > 0 && this.excuteType == 1) {
-            this.form.machineTool = this.lineOptions[0].id;
-            this.machineToolChange(this.form.machineTool);
-          }
-        } else {
-        }
-      } catch (error) {}
-
-      console.log("------------------",this.silkcartList)
-    },
-    // 获取所有批次数据
-    async getAllBatchData(id) {
-
-      try {
-        console.log('===================获取批次数据')
-        let payload = { machineTool: id };
-        let res = await finishedProductList(payload);
-        if (res.code == 200) {
-          this.batchData = res.data;
-          this.batchTableData = res.data;
-        } else {
-        }
-      } catch (error) {}
-    },
-    // 表格点击回调
-    async handleCurrentChange(val) {
-
-      this.xzbatchTableData = val;
-      console.log("表格点击回调",this.xzbatchTableData)
-      //判断是否为纺丝部如果是则不做处理
-      if( val?.productionlinedepartment && val.productionlinedepartment !== undefined && val.productionlinedepartment !== "纺丝部" && val.productionlinedepartment !== ""){
-        this.form.tubeColor = val.tubeColor;//管色
-        this.form.boxWeight = val.boxWeight;//箱重
-        this.form.canisterWeight = val.canisterWeight;//筒重
-      }
-
-      if (!val) return;
-      if (this.isStartReadNum || this.excuteType != 1) {
-        this.$refs.proTableRef.setCurrentRow(this.currentRow);
-        return;
-      }
-      if (val.id != this.currentRow.id) {
-        this.tableData = [];
-        // this.$refs.form.resetFields();
-        this.nowWeight = 0;
-        // if (!this.printAuto) {
-        // 手动打印  获取码单号
-        this.getQrCodeHandle();
-        // }
-        this.summertId = new Date().getTime(); //总码单id重新生成
-      }
-      this.currentRow = val;
-      // this.continuePrintHandler(); //产品选择后,自动执行接续逻辑
-    },
-    /** 机台相关 */
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加线边舱库存";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const id = row.id || this.ids
-      getLineSideCabin(id).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改线边舱库存";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        this.form.productNo = this.xzbatchTableData.productNo;
-        this.form.productName = this.xzbatchTableData.productName;
-        this.form.productSpecifications = this.xzbatchTableData.productSpecifications;
-        this.form.productId = this.xzbatchTableData.productId;//类型字段变更为存储产品id
-        this.form.batchNumber = this.xzbatchTableData.lotNum;
-        this.form.colours = this.xzbatchTableData.productColor;
-        this.form.standby3 = this.xzbatchTableData.id;//任务id
-        if (valid) {
-          if (this.form.id != null) {
-            updateLineSideCabin(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addLineSideCabin(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除线边舱库存编号为"' + ids + '"的数据项?').then(function() {
-        return delLineSideCabin(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('lineSideCabin/lineSideCabin/export', {
-        ...this.queryParams
-      }, `lineSideCabin_${new Date().getTime()}.xlsx`)
-    }
-  }
-};
-</script>
-<style lang="scss" scoped>
-.main-wrap {
-  width: 100%;
-  display: flex;
-  justify-content: space-between;
-
-  .left {
-    width: 30%;
-
-    .top-area {
-      display: flex;
-      justify-content: space-between;
-
-      .msg {
-        display: flex;
-        align-items: center;
-        font-size: 16px;
-        font-weight: 700;
-      }
-
-      .btn-list {
-        width: 100%;
-        display: flex;
-        justify-content: space-between;
-      }
-    }
-
-    .count-area {
-      display: flex;
-      flex-wrap: wrap;
-
-      .count-item {
-        display: flex;
-        margin-bottom: 10px;
-        width: 50%;
-      }
-    }
-  }
-
-  .right {
-    width: 70%;
-    // flex: 1;
-    .queryForm {
-      width: 100%;
-      padding: 0 10px;
-      display: flex;
-
-      .label {
-        text-align: right;
-        color: #606266;
-        line-height: 30px;
-        display: block;
-        width: 100px;
-        font-weight: 700;
-        text-decoration: aliceblue;
-        margin-right: 10px;
-      }
-    }
-
-    .table-wrap {
-      margin-top: 5px;
-      width: 100%;
-      overflow-x: scroll;
-    }
-  }
-}
-
-::v-deep .el-date-editor.el-input {
-  width: 100%;
-}
-
-::v-deep .el-input-number--mini {
-  width: 99%;
-}
-
-::v-deep .el-table .current-row {
-  background-color: #55e905 !important;
-}
-
-::v-deep .el-table__body tr.current-row > td.el-table__cell {
-  background-color: #55e905 !important;
-}
-</style>
+<template>
+  <el-card shadow="always" :body-style="{ padding: '10px' }">
+    <div class="app-container">
+      <div class="main-wrap">
+        <div class="left">
+          <el-form ref="form" :model="form" :rules="rules" label-width="80px" >
+            <el-form-item prop="machineTool" label="机台" style="width: 500px">
+              <el-select
+                v-model="form.machineTool"
+                filterable
+                @change="machineToolChange"
+              >
+                <el-option
+                  v-for="(item, index) in lineOptions"
+                  :key="index"
+                  :label="item.productionLineName"
+                  :value="item.id"
+                >
+                  <span class="discribe" style="float: left">{{item.productionLineName }}</span>
+                  <span
+                    style="float: right; color: #8492a6; font-size: 13px"
+                  >{{ item.productionLineDepartment }}</span
+                  >
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item prop="scid" label="丝车">
+              <el-select
+                v-model="form.scid"
+                filterable
+              >
+                <el-option
+                  v-for="(item, index) in silkcartList"
+                  :key="index"
+                  :label="item.scname"
+                  :value="item.id"
+                >
+                  <span class="discribe" style="float: left">{{item.scname }}</span>
+                  <span
+                    style="float: right; color: #8492a6; font-size: 13px"
+                  >{{ item.scWeight }}</span
+                  >
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="卷数" prop="js" style="width: 278px">
+              <el-input v-model="form.js" placeholder="请输入卷数"/>
+            </el-form-item>
+            <el-form-item label="毛重" prop="standby" style="width: 278px">
+              <el-input v-model="form.standby" placeholder="请输入毛重" />
+            </el-form-item>
+          </el-form>
+          <div slot="footer" class="dialog-footer">
+            <el-button type="primary" @click="submitForm">确 定</el-button>
+            <el-button @click="cancel">取 消</el-button>
+          </div>
+        </div>
+        <div class="right">
+          <div class="table-wrap">
+            <el-table
+              ref="proTableRef"
+              :data="batchTableData"
+              border
+              stripe
+              width="100%"
+              max-height="260"
+              highlight-current-row
+              :row-class-name="tableRowClassName"
+              @row-click="handleCurrentChange"
+            >
+              <!-- <el-table-column
+                  type="index"
+                  label="序号"
+                  width="50"
+                ></el-table-column> -->
+              <el-table-column
+                v-for="col in columns"
+                :prop="col.id"
+                :key="col.id"
+                :label="col.label"
+              >
+              </el-table-column>
+            </el-table>
+          </div>
+        </div>
+      </div>
+
+
+
+
+
+<!--      <pagination-->
+<!--        v-show="total>0"-->
+<!--        :total="total"-->
+<!--        :page.sync="queryParams.pageNum"-->
+<!--        :limit.sync="queryParams.pageSize"-->
+<!--        @pagination="getList"-->
+<!--      />-->
+
+      <!-- 添加或修改线边舱库存对话框 -->
+
+    </div>
+  </el-card>
+</template>
+
+<script>
+import { listLineSideCabin, getLineSideCabin, delLineSideCabin, addLineSideCabin, updateLineSideCabin,  getLineOptionLsit,  finishedProductList, listSilkcart,} from "@/api/lineSideCabin/lineSideCabin";
+import {getSilkcart} from "@/api/silkcart/silkcart";
+
+export default {
+  name: "LineSideCabin",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 线边舱库存表格数据
+      lineSideCabinList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        productNo: null,
+        productName: null,
+        productSpecifications: null,
+        productId: null,
+        batchNumber: null,
+        colours: null,
+        machineTool: null,
+        js: null,
+        status: null,
+        standby: null,
+        standby1: null,
+        standby2: null,
+        standby3: null,
+        workshop: null,
+        recipient: null,
+        collectTime: null,
+        confirm: null,
+        confirmTime: null,
+        scid:null
+      },
+      // 表单参数
+      form: {
+        id: null,
+        productNo: null,
+        productName: null,
+        productSpecifications: null,
+        productId: null,
+        batchNumber: null,
+        colours: null,
+        machineTool: null,//机台号
+        js: null,
+        status: null,
+        standby: '',  // 确保初始化为空字符串
+        standby1: null,
+        standby2: null,
+        standby3: null,
+        workshop: null,
+        recipient: null,
+        collectTime: null,
+        confirm: null,
+        confirmTime: null,
+        scid: null
+      },
+      // 表单校验
+      rules: {
+      },
+      batchData: [], //所有批号数据
+      batchTableData: [], //批号表格数据
+      lineOptions: [], //机台选项数据
+      silkcartList: [], //丝车列表
+      xzbatchTableData: [], //选中的批号表格数据
+      currentRow: null, // 添加当前选中行
+      columns: [
+        {
+          id: "productNo",
+          label: this.$t('printIndex.columns.productNo'),
+        },
+        {
+          id: "productName",
+          label: this.$t('printIndex.columns.productName'),
+        },
+        {
+          id: "productSpecifications",
+          label: this.$t('printIndex.columns.productSpecifications'),
+        },
+        {
+          id: "lotNum",
+          label: this.$t('printIndex.columns.lotNum'),
+        },
+        {
+          id: "productColor",
+          label: this.$t('printIndex.columns.productColor'),
+        },
+        // {
+        //   id: "productName",
+        //   label: "订单号",
+        // },
+      ],
+      websocket: null,
+      wsUrl: 'ws://localhost:8721/DBCc',
+    };
+  },
+  created() {
+    // 确保在创建新连接前关闭旧连接
+    if (this.websocket) {
+      this.closeWebSocket();
+    }
+    this.getList();
+    this.initWebSocket();
+  },
+  mounted() {
+    this.getLineOptionLsit();
+  },
+  beforeDestroy() {
+    this.closeWebSocket();
+  },
+  beforeRouteLeave(to, from, next) {
+    // 路由离开时关闭连接
+    this.closeWebSocket();
+    next();
+  },
+  methods: {
+    /** 查询线边舱库存列表 */
+    getList() {
+      this.loading = true;
+      listLineSideCabin(this.queryParams).then(response => {
+        this.lineSideCabinList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        productNo: null,
+        productName: null,
+        productSpecifications: null,
+        productId: null,
+        batchNumber: null,
+        colours: null,
+        machineTool: null,
+        js: null,
+        status: null,
+        standby: '', // 确保重置时也初始化为空字符串
+        standby1: null,
+        standby2: null,
+        standby3: null,
+        workshop: null,
+        recipient: null,
+        collectTime: null,
+        confirm: null,
+        confirmTime: null,
+        scid: null
+      };
+      this.resetForm("form");
+    },
+    /** 机台相关 */
+    // 机台改变回调
+    machineToolChange(id) {
+      console.log("================选中机台")
+      if (id) {
+        this.form.machineToolNo = this.lineOptions.find(
+          (item) => item.id == id
+        ).productionLineNo;
+      }
+      this.getAllBatchData(id);
+    },
+    // 获取机台选项数据
+    async getLineOptionLsit() {
+      let payLoad = {
+        isEnablePaging: false,
+      };
+      try {
+        let res = await getLineOptionLsit(payLoad);
+        let scres = await listSilkcart(payLoad);
+        if (res.code == 200) {
+          this.lineOptions = res.rows;
+          this.silkcartList = scres.rows;
+          if (this.lineOptions.length > 0 && this.excuteType == 1) {
+            this.form.machineTool = this.lineOptions[0].id;
+            this.machineToolChange(this.form.machineTool);
+          }
+        } else {
+        }
+      } catch (error) {}
+
+      console.log("------------------",this.silkcartList)
+    },
+    // 获取所有批次数据
+    async getAllBatchData(id) {
+
+      try {
+        console.log('===================获取批次数据')
+        let payload = { machineTool: id };
+        let res = await finishedProductList(payload);
+        if (res.code == 200) {
+          this.batchData = res.data;
+          this.batchTableData = res.data;
+        } else {
+        }
+      } catch (error) {}
+    },
+    // 表格点击回调
+    async handleCurrentChange(val) {
+      if (!val) return;
+      
+      // 设置当前选中行的高亮
+      this.$refs.proTableRef.setCurrentRow(val);
+      
+      this.xzbatchTableData = val;
+      console.log("表格点击回调",this.xzbatchTableData)
+      
+      //判断是否为纺丝部如果是则不做处理
+      if(val?.productionlinedepartment && val.productionlinedepartment !== undefined && val.productionlinedepartment !== "纺丝部" && val.productionlinedepartment !== ""){
+        this.form.tubeColor = val.tubeColor;//管色
+        this.form.boxWeight = val.boxWeight;//箱重
+        this.form.canisterWeight = val.canisterWeight;//筒重
+      }
+
+      if (this.isStartReadNum || this.excuteType != 1) {
+        return;
+      }
+      
+      if (!this.currentRow || val.id != this.currentRow.id) {
+        this.tableData = [];
+        this.nowWeight = 0;
+        this.getQrCodeHandle();
+        this.summertId = new Date().getTime(); //总码单id重新生成
+      }
+      
+      this.currentRow = val;
+    },
+    /** 机台相关 */
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加线边舱库存";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getLineSideCabin(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改线边舱库存";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        this.form.productNo = this.xzbatchTableData.productNo;
+        this.form.productName = this.xzbatchTableData.productName;
+        this.form.productSpecifications = this.xzbatchTableData.productSpecifications;
+        this.form.productId = this.xzbatchTableData.productId;//类型字段变更为存储产品id
+        this.form.batchNumber = this.xzbatchTableData.lotNum;
+        this.form.colours = this.xzbatchTableData.productColor;
+        this.form.standby3 = this.xzbatchTableData.id;//任务id
+        if (valid) {
+          if (this.form.id != null) {
+            updateLineSideCabin(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addLineSideCabin(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除线边舱库存编号为"' + ids + '"的数据项?').then(function() {
+        return delLineSideCabin(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('lineSideCabin/lineSideCabin/export', {
+        ...this.queryParams
+      }, `lineSideCabin_${new Date().getTime()}.xlsx`)
+    },
+    /** 初始化 WebSocket 连接 */
+    initWebSocket() {
+      this.closeWebSocket();
+
+      try {
+        console.log('开始连接WebSocket:', this.wsUrl);
+        this.websocket = new WebSocket(this.wsUrl);
+        
+        this.websocket.onopen = () => {
+          console.log('WebSocket 连接成功');
+        };
+        
+        this.websocket.onmessage = this.handleWebSocketMessage;
+        
+        this.websocket.onerror = () => {
+          console.log('WebSocket 连接错误');
+          this.closeWebSocket();
+        };
+        
+        this.websocket.onclose = () => {
+          console.log('WebSocket 连接关闭');
+          this.websocket = null;
+        };
+        
+      } catch (e) {
+        console.error('WebSocket 连接错误:', e);
+        this.closeWebSocket();
+      }
+    },
+    /** 关闭 WebSocket 连接 */
+    closeWebSocket() {
+      if (this.websocket) {
+        try {
+          this.websocket.close();
+          this.websocket = null;
+          console.log('WebSocket 连接已关闭');
+        } catch (error) {
+          console.error('关闭 WebSocket 连接失败:', error);
+        }
+      }
+    },
+    /** 处理WebSocket消息 */
+    handleWebSocketMessage(e) {
+      try {
+        const data = JSON.parse(e.data);
+        // 处理权重数据
+        if (data.weight !== undefined) {
+          const weight = parseFloat(data.weight);
+          if (!isNaN(weight)) {
+            this.$set(this.form, 'standby', weight.toFixed(2));
+            console.log('更新重量数据:', weight.toFixed(2), '是否稳定:', data.isStable);
+            
+            // 如果重量稳定,显示提示
+            if (data.isStable) {
+              this.$message({
+                type: 'success',
+                message: `重量已稳定: ${weight.toFixed(2)}kg`,
+                duration: 2000
+              });
+            }
+          }
+        }
+      } catch (error) {
+        console.error('处理WebSocket消息失败:', error);
+      }
+    },
+    // 表格行的类名
+    tableRowClassName({row, rowIndex}) {
+      if (this.currentRow && row.id === this.currentRow.id) {
+        return 'current-row';
+      }
+      return '';
+    },
+  }
+};
+</script>
+<style lang="scss" scoped>
+.main-wrap {
+  width: 100%;
+  display: flex;
+  justify-content: space-between;
+
+  .left {
+    width: 30%;
+
+    .top-area {
+      display: flex;
+      justify-content: space-between;
+
+      .msg {
+        display: flex;
+        align-items: center;
+        font-size: 16px;
+        font-weight: 700;
+      }
+
+      .btn-list {
+        width: 100%;
+        display: flex;
+        justify-content: space-between;
+      }
+    }
+
+    .count-area {
+      display: flex;
+      flex-wrap: wrap;
+
+      .count-item {
+        display: flex;
+        margin-bottom: 10px;
+        width: 50%;
+      }
+    }
+  }
+
+  .right {
+    width: 70%;
+    // flex: 1;
+    .queryForm {
+      width: 100%;
+      padding: 0 10px;
+      display: flex;
+
+      .label {
+        text-align: right;
+        color: #606266;
+        line-height: 30px;
+        display: block;
+        width: 100px;
+        font-weight: 700;
+        text-decoration: aliceblue;
+        margin-right: 10px;
+      }
+    }
+
+    .table-wrap {
+      margin-top: 5px;
+      width: 100%;
+      overflow-x: scroll;
+    }
+  }
+}
+
+::v-deep .el-date-editor.el-input {
+  width: 100%;
+}
+
+::v-deep .el-input-number--mini {
+  width: 99%;
+}
+
+::v-deep .el-table__body tr.current-row > td.el-table__cell {
+  background-color: #55e905 !important;
+}
+
+::v-deep .el-table__body tr.hover-row.current-row > td.el-table__cell {
+  background-color: #55e905 !important;
+}
+
+::v-deep .el-table__body tr.hover-row > td.el-table__cell {
+  background-color: #55e905 !important;
+}
+</style>

+ 233 - 139
zkqy-ui/src/views/orderMange/lineSideCabin/index.vue

@@ -205,38 +205,43 @@
       <el-table-column label="领料时间" align="center" prop="collectTime" />
       <el-table-column label="确认人" align="center" prop="confirm" />
       <el-table-column label="确认时间" align="center" prop="confirmTime" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
-          <el-button
-            v-if="scope.row.status==1"
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['lineSideCabin:lineSideCabin:edit']"
-          >领料出库</el-button>
-          <el-button
-            v-if="scope.row.status==2"
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdateConfirm(scope.row)"
-            v-hasPermi="['lineSideCabin:lineSideCabin:edit']"
-          >出库确认</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdateConfirmPrint(scope.row)"
-            v-hasPermi="['lineSideCabin:lineSideCabin:edit']"
-          >打印流转单</el-button>
-<!--          <el-button-->
-<!--            size="mini"-->
-<!--            type="text"-->
-<!--            icon="el-icon-delete"-->
-<!--            @click="handleDelete(scope.row)"-->
-<!--            v-hasPermi="['lineSideCabin:lineSideCabin:remove']"-->
-<!--          >删除</el-button>-->
+          <el-dropdown>
+            <el-button type="warning" plain size="small">
+              操作<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item>
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-edit"
+                  @click="handleUpdate(scope.row)"
+                >修改</el-button>
+              </el-dropdown-item>
+              <el-dropdown-item>
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-delete"
+                  @click="handleDelete(scope.row)"
+                >删除</el-button>
+              </el-dropdown-item>
+              <el-dropdown-item>
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-printer"
+                  @click="handlePrint(scope.row)"
+                >打印</el-button>
+              </el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
         </template>
       </el-table-column>
     </el-table>
@@ -379,110 +384,66 @@
       </div>
     </el-dialog>
 
-    <el-dialog :title="title" :visible.sync="prinopens" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="机台" prop="machineTool">
-          <!--          <el-input v-model="form.machineTool" placeholder="请输入机台" />-->
-          <span>{{form.machineTool}}</span>
-        </el-form-item>
-        <el-form-item label="产品:" prop="productNo">
-          <!--          <el-input v-model="form.productNo" placeholder="请输入产品编号" />-->
-          <span>{{form.productName}}--{{form.productSpecifications}}</span>
-        </el-form-item>
-        <el-form-item label="色泽:" prop="colours">
-          <!--          <el-input v-model="form.colours" placeholder="请输入色泽" />-->
-          <span>{{form.colours}}</span>
-        </el-form-item>
-        <el-form-item label="批号" prop="batchNumber">
-          <!--          <el-input v-model="form.batchNumber" placeholder="请输入批号" />-->
-          <span>{{form.batchNumber}}</span>
-        </el-form-item>
-        <el-form-item label="卷数" prop="js">
-          <!--          <el-input v-model="form.js" placeholder="请输入卷数" />-->
-          <span>{{form.js}}</span>
-        </el-form-item>
-        <el-form-item label="净重" prop="standby2">
-          <!--          <el-input v-model="form.standby2" placeholder="请输入净重" />-->
-          <span>{{form.standby2}}</span>
-        </el-form-item>
-        <el-form-item label="丝车" prop="scid">
-          <!--          <el-input v-model="form.standby2" placeholder="请输入净重" />-->
-          <span>{{form.scid}}</span>
-        </el-form-item>
-        <el-form-item label="领料车间" prop="workshop">
-          <span>{{form.workshop}}</span>
-        </el-form-item>
-        <el-form-item label="领料人" prop="recipient">
-<!--          <el-input v-model="form.recipient" placeholder="请输入领料人" />-->
-          <span>{{form.recipient}}</span>
-        </el-form-item>
-        <el-form-item label="确认人" prop="recipient">
-          <span>{{form.confirm}}</span>
-<!--          <el-input v-model="form.confirm" placeholder="请输入领料人" />-->
-        </el-form-item>
-        <!--        <el-form-item label="领料时间" prop="collectTime">-->
-        <!--          <el-input v-model="form.collectTime" placeholder="请输入领料时间" />-->
-        <!--        </el-form-item>-->
-
-        <!--        <el-form-item label="确认时间" prop="confirmTime">-->
-        <!--          <el-input v-model="form.confirmTime" placeholder="请输入确认时间" />-->
-        <!--        </el-form-item>-->
-      </el-form>
+    <el-dialog :title="title" :visible.sync="prinopens" width="800px" height="500px" append-to-body>
+      <div class="print-preview" id="printSection">
+        <div class="label-container">
+          <div class="title">物料流转单</div>
+          <div class="content">
+            <div class="info-item">
+              <span class="label">丝车号</span>
+              <span class="value">{{form.scid}}</span>
+            </div>
+            <div class="info-item">
+              <span class="label">机台号:</span>
+              <span class="value">{{form.machineTool}}</span>
+            </div>
+            <div class="info-item">
+              <span class="label">产品信息:</span>
+              <span class="value">{{form.productName}} - {{form.productSpecifications}}</span>
+            </div>
+            <div class="info-item">
+              <span class="label">色泽:</span>
+              <span class="value">{{form.colours}}</span>
+            </div>
+            <div class="info-item">
+              <span class="label">批号:</span>
+              <span class="value">{{form.batchNumber}}</span>
+            </div>
+            <div class="info-item">
+              <span class="label">卷数:</span>
+              <span class="value">{{form.js}}</span>
+            </div>
+            <div class="info-item">
+              <span class="label">净重:</span>
+              <span class="value">{{form.standby2}} KG</span>
+            </div>
+            <div class="info-item">
+              <span class="label">领料车间:</span>
+              <span class="value">{{form.workshop}}</span>
+            </div>
+            <div class="info-item">
+              <span class="label">送达人:</span>
+              <span class="value-line"></span>
+            </div>
+            <div class="info-item">
+              <span class="label">接收人:</span>
+              <span class="value-line"></span>
+            </div>
+            <div class="info-item">
+              <span class="label">日期:</span>
+              <span class="value-line"></span>
+              <span class="shift">(日班/夜班)</span>
+            </div>
+          </div>
+        </div>
+      </div>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="printDetails">打 印</el-button>
+        <el-button type="primary" v-print="printViewInfo">打 印</el-button>
         <el-button @click="cancelprint">取 消</el-button>
       </div>
     </el-dialog>
 
-    <div id="printSection" v-show="false">
-      <el-form :model="form" :rules="rules" label-width="80px">
-      <table border="1px" style="width: 400px;height: 650px">
-        <tr>
-          <td colspan="2" style="text-align: center;">流转单</td>
-        </tr>
-        <tr>
-          <td style="text-align: center;">机台</td>
-          <td style="text-align: center;">{{form.machineTool}}</td>
-        </tr>
-        <tr>
-          <td style="text-align: center;">产品</td>
-          <td style="text-align: center;">{{form.productName}}---{{form.productSpecifications}}</td>
-        </tr>
-        <tr>
-          <td style="text-align: center;">色泽</td>
-          <td style="text-align: center;">{{form.colours}}</td>
-        </tr>
-        <tr>
-          <td style="text-align: center;">批号</td>
-          <td style="text-align: center;">{{form.batchNumber}}</td>
-        </tr>
-        <tr>
-          <td style="text-align: center;">卷数</td>
-          <td style="text-align: center;">{{form.js}}</td>
-        </tr>
-        <tr>
-          <td style="text-align: center;">净重</td>
-          <td style="text-align: center;">{{form.standby2}}</td>
-        </tr>
-        <tr>
-          <td style="text-align: center;">领料车间</td>
-          <td style="text-align: center;">{{form.workshop}}</td>
-        </tr>
-        <tr>
-          <td style="text-align: center;">送达人</td>
-          <td ></td>
-        </tr>
-        <tr>
-          <td style="text-align: center;">接收人</td>
-          <td ></td>
-        </tr>
-        <tr>
-          <td style="text-align: center;">日期</td>
-          <td style="text-align: right;">(日夜)</td>
-        </tr>
-      </table>
-      </el-form>
-    </div>
+   
   </div>
 </template>
 
@@ -493,6 +454,7 @@ export default {
   name: "LineSideCabin",
   data() {
     return {
+      abc:false,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -543,6 +505,33 @@ export default {
       form: {},
       // 表单校验
       rules: {
+      },
+      msg: "打印",
+      printViewInfo: {
+        id: "printSection", //打印区域的唯一的id属性
+        // popTitle: '配置页眉标题', // 页眉文字 (不设置时显示undifined)(页眉页脚可以在打印页面的更多设置的选项中取消勾选)
+        // extraHead: '打印,印刷', // 最左上方的头部文字,附加在head标签上的额外标签,使用逗号分割
+        preview: false, // 是否启动预览模式,默认是false (开启预览模式ture会占满整个屏幕,不建议开启,除非业务需要)
+        // previewTitle: '预览的标题', // 打印预览的标题(预览模式preview为true时才显示)
+        // previewPrintBtnLabel: '预览结束,开始打印', // 打印预览的标题下方的按钮文本,点击可进入打印(预览模式preview为true时才显示)
+        zIndex: 20002, // 预览窗口的z-index,默认是20002,最好比默认值更高
+        previewBeforeOpenCallback (that) { console.log('正在加载预览窗口!'); console.log(that.msg, this) 
+        }, // 预览窗口打开之前的callback (预览模式preview为true时才执行) (that可以取到data里的变量值)
+        previewOpenCallback () { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback (预览模式preview为true时才执行)
+        beforeOpenCallback () { console.log('开始打印之前!') }, // 开始打印之前的callback
+        openCallback () { console.log('执行打印了!') 
+        }, // 调用打印时的callback
+        closeCallback () { console.log('关闭了打印工具!') ;}, // 关闭打印的callback(无法区分确认or取消)
+        clickMounted () { console.log('点击v-print绑定的按钮了!')},
+        // url: 'http://localhost:8080/', // 打印指定的URL,确保同源策略相同
+        // asyncUrl (reslove) {
+        //   setTimeout(() => {
+        //     reslove('http://localhost:8080/')
+        //   }, 2000)
+        // },
+        standard: '',
+        extarCss: '',
+        isDataLoaded: false,
       }
     };
   },
@@ -559,15 +548,6 @@ export default {
         this.loading = false;
       });
     },
-    printDetails() {
-      const printContents = document.getElementById('printSection');
-      const originalContents = document.body.innerHTML;
-      document.body.innerHTML = printContents.innerHTML;
-      window.print();
-      document.body.innerHTML = originalContents;
-      window.location.reload();
-      return false;
-    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -723,7 +703,121 @@ export default {
       this.download('lineSideCabin/lineSideCabin/export', {
         ...this.queryParams
       }, `lineSideCabin_${new Date().getTime()}.xlsx`)
+    },
+    /** 打印按钮操作 */
+    handlePrint(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getLineSideCabin(id).then(response => {
+        this.form = response.data;
+        this.prinopens = true;
+        this.title = "物料流转转打印";
+      });
     }
   }
 };
 </script>
+
+<style lang="scss" scoped>
+.print-preview {
+  background: #fff;
+  padding: 20px;
+  
+  .label-container {
+    width: 100%;
+    min-height: 280mm;
+    border: 2px solid #000;
+    padding: 15mm;
+    box-sizing: border-box;
+    
+    .title {
+      font-size: 22px;
+      font-weight: bold;
+      text-align: center;
+      margin-bottom: 15mm;
+      padding-bottom: 8px;
+      border-bottom: 2px solid #000;
+    }
+    
+    .content {
+      padding: 0 10mm;
+      
+      .info-item {
+        margin-bottom: 12mm;
+        display: flex;
+        align-items: center;
+        min-height: 25px;
+        
+        .label {
+          min-width: 85px;
+          font-weight: bold;
+        }
+        
+        .value {
+          flex: 1;
+          font-size: 16px;
+        }
+        
+        .value-line {
+          flex: 1;
+          border-bottom: 1px solid #000;
+          height: 20px;
+          margin-right: 10px;
+        }
+        
+        .shift {
+          margin-left: 10px;
+          font-size: 14px;
+        }
+      }
+    }
+  }
+}
+
+@media print {
+  .print-preview {
+    width: 210mm;
+    height: 297mm;
+    padding: 0;
+    margin: 0 auto;
+    
+    .label-container {
+      width: 100%;
+      height: 100%;
+      border: 2px solid #000;
+      padding: 20mm;
+      
+      .title {
+        font-size: 24px;
+        margin-bottom: 20mm;
+      }
+      
+      .content {
+        padding: 0 15mm;
+        
+        .info-item {
+          margin-bottom: 15mm;
+          font-size: 16px;
+          
+          .label {
+            min-width: 90px;
+          }
+          
+          .value {
+            font-size: 16px;
+          }
+          
+          .value-line {
+            height: 25px;
+          }
+        }
+      }
+    }
+  }
+  
+  @page {
+    size: A4;
+    margin: 0;
+  }
+}
+</style>

+ 4 - 2
zkqy-ui/src/views/orderMange/oldOutStock/index.vue

@@ -473,8 +473,10 @@ export default {
       this.productCode=row.productCode;
       this.productSpecifications=row.productSpecifications;
       //产品编码,产品名称,规格,颜色.
-      //查询老库存列表信息
-      let res1 = await queryTheOldInventoryDeliveryList(row);
+      //查询老库存列表信息  pageNum: 1, // 第几页
+
+      let rowtj={...row,"pageSize":this.queryParams.ckpageSize,"pageNum":this.queryParams.ckpageNum}
+      let res1 = await queryTheOldInventoryDeliveryList(rowtj);
       res1.rows = res1.rows.map(item=>{return{...item,deleted:0}});//增加出库按钮是否显示标识,点击过出库后则不显示出库按钮
       //打开老库存列表弹窗
       this.cktotal=res1.total;