Bläddra i källkod

Merge branch 'master' of http://62.234.61.92:3000/wjm/mec-cloud_IntelligentManufacturing_CLIENT

lph 1 år sedan
förälder
incheckning
eb7dbf2e33

+ 11 - 0
zkqy-ui/src/api/system/ProductInventory.js

@@ -0,0 +1,11 @@
+import request from '@/utils/request'
+
+// 查询成品综合库列表
+export function comprehensiveInventoryList(query) {
+  return request({
+    url: '/system/ProductInventory/comprehensiveInventoryList',
+    method: 'get',
+    params: query
+  })
+}
+

+ 303 - 0
zkqy-ui/src/views/orderMange/comprehensiveInventory/index.vue

@@ -0,0 +1,303 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
+      <el-form-item label="批号" prop="lotNum">
+        <el-input
+          v-model="queryParams.lotNum"
+          placeholder="请输入批号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="色泽" prop="productColor">
+        <el-input
+          v-model="queryParams.productColor"
+          placeholder="请输入色泽"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+        >搜索
+        </el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+        >重置
+        </el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="comprehensiveInventoryList">
+      <el-table-column label="品名" align="center" prop="productName" />
+      <el-table-column label="规格" align="center" prop="productSpecifications"/>
+      <el-table-column label="类型" align="center" prop="productType"/>
+      <el-table-column label="色泽" align="center" prop="productColor" />
+      <el-table-column label="等级" align="center" prop="levels" />
+      <el-table-column label="箱数" align="center" prop="totalBoxNum" />
+      <el-table-column label="筒数" align="center" prop="totalCanisterNum" />
+      <el-table-column label="重量" align="center" prop="totalSuttle" />
+
+      <el-table-column label="批号" align="left" prop="lotNum" >
+        <template slot-scope="scope">
+          <el-tooltip class="item" effect="dark" :content="scope.row.lotNum" placement="top">
+            <span class="cell-content">{{ scope.row.lotNum }}</span>
+          </el-tooltip>
+        </template>
+      </el-table-column>
+
+
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+
+  </div>
+</template>
+
+<script>
+import {
+  comprehensiveInventoryList,
+} from "@/api/system/ProductInventory";
+import { getDictLabel } from "@/utils/other";
+
+export default {
+  name: "ProductWarehousingRecord",
+  // dicts: ["packaging_type"],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 成品入库记录表格数据
+      comprehensiveInventoryList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        qrCode: null,
+        qrCodeId: null,
+        lotNum: null,
+        productId: null,
+        levels: null,
+        canisterNum: null,
+        boxNum: null,
+        suttle: null,
+        productionDate: null,
+        machineTool: null,
+        grossWeight: null,
+        packaging: null,
+        workShifts: null,
+        foreignTradeNumber: null,
+        canisterWeight: null,
+        boxWeight: null,
+        tubeColor: null,
+        comPort: null,
+        printFormat: null,
+        packagingType: null,
+        storageLocation: null,
+        warehouseregionId: null,
+        warehousingTime: null,
+        depositor: null,
+        productColor:null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {},
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    // 根据字典值获取字典描述
+    getDictLabel(value, dicts) {
+      return getDictLabel(value, dicts);
+    },
+    /** 查询成品入库记录列表 */
+    getList() {
+      this.loading = true;
+      comprehensiveInventoryList(this.queryParams).then((response) => {
+        this.comprehensiveInventoryList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        qrCode: null,
+        qrCodeId: null,
+        lotNum: null,
+        productId: null,
+        levels: null,
+        canisterNum: null,
+        boxNum: null,
+        suttle: null,
+        productionDate: null,
+        machineTool: null,
+        grossWeight: null,
+        packaging: null,
+        workShifts: null,
+        foreignTradeNumber: null,
+        canisterWeight: null,
+        boxWeight: null,
+        tubeColor: null,
+        comPort: null,
+        printFormat: null,
+        packagingType: null,
+        storageLocation: null,
+        warehouseregionId: null,
+        remark: null,
+        delFlag: null,
+        createBy: null,
+        createById: null,
+        createTime: null,
+        updateBy: null,
+        updateById: null,
+        updateTime: null,
+        warehousingTime: null,
+        depositor: null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    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;
+    //   getProductWarehousingRecord(id).then((response) => {
+    //     this.form = response.data;
+    //     this.open = true;
+    //     this.title = "修改成品入库记录";
+    //   });
+    // },
+    // /** 提交按钮 */
+    // submitForm() {
+    //   this.$refs["form"].validate((valid) => {
+    //     if (valid) {
+    //       if (this.form.id != null) {
+    //         updateProductWarehousingRecord(this.form).then((response) => {
+    //           this.$modal.msgSuccess("修改成功");
+    //           this.open = false;
+    //           this.getList();
+    //         });
+    //       } else {
+    //         addProductWarehousingRecord(this.form).then((response) => {
+    //           this.$modal.msgSuccess("新增成功");
+    //           this.open = false;
+    //           this.getList();
+    //         });
+    //       }
+    //     }
+    //   });
+    // },
+    // /** 删除按钮操作 */
+    // handleDelete(row) {
+    //   // const ids = row.id || this.ids;
+    //   this.$modal
+    //     .confirm(
+    //       '是否确认删除码单号为"' +
+    //       row.qrCode +
+    //       "箱号为:" +
+    //       row.boxNum +
+    //       '"的数据项?'
+    //     )
+    //     .then(function () {
+    //       return deleteProductInventory(row);
+    //     })
+    //     .then(() => {
+    //       this.getList();
+    //       this.$modal.msgSuccess("删除成功");
+    //     })
+    //     .catch(() => {
+    //       this.$modal.msgError("删除失败!请检查库存");
+    //     });
+    // },
+    // /** 导出按钮操作 */
+    // handleExport() {
+    //   this.download(
+    //     "system/ProductWarehousingRecord/export",
+    //     {
+    //       ...this.queryParams,
+    //     },
+    //     `ProductWarehousingRecord_${new Date().getTime()}.xlsx`
+    //   );
+    // },
+  },
+};
+</script>
+<style scoped lang="scss">
+.cell-content {
+  display: inline-block;
+  max-width: 100px; /* 根据需要调整宽度 */
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+</style>