1
wangxinhui
2025-01-09 4e41edc947ddf4516224016299b324b63bad9fa4
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue
@@ -1,6 +1,12 @@
<template>
  <div>
    <vol-box v-model="showDetialBox" :lazy="true" width="60%" :padding="15" title="指定库存">
    <vol-box
      v-model="showDetialBox"
      :lazy="true"
      width="60%"
      :padding="15"
      title="指定库存"
    >
      <div class="box-head">
        <el-alert :closable="false" style="width: 100%">
          <el-row>
@@ -9,41 +15,87 @@
              <el-divider direction="vertical"></el-divider>
              <span class="less-style">物料编号: {{ row.materielCode }} </span>
              <el-divider direction="vertical"></el-divider>
              <span class="less-style">需求数量: {{ row.orderQuantity }}
              <span class="less-style"
                >需求数量: {{ row.orderQuantity }}
              </span>
              <el-divider direction="vertical"></el-divider>
              <span :class="selectionClass">已选数量: {{ selectionSum }}
              <span :class="selectionClass"
                >已选数量: {{ selectionSum }}
              </span>
            </el-col>
            <el-col :span="2">
              <el-link type="primary" size="small" style="float: right; height: 20px"
                @click="getData">刷新</el-link></el-col>
              <el-link
                type="primary"
                size="small"
                style="float: right; height: 20px"
                @click="getData"
                >刷新</el-link
              ></el-col
            >
            <el-col :span="2">
              <el-link type="primary" size="small" style="float: right; height: 20px"
                @click="revokeAssign">撤销分配</el-link></el-col>
              <el-link
                type="primary"
                size="small"
                style="float: right; height: 20px"
                @click="revokeAssign"
                >撤销分配</el-link
              ></el-col
            >
          </el-row>
        </el-alert>
      </div>
      <div class="box-table" style="margin-top: 1%">
        <el-table ref="singleTable" :data="tableData" style="width: 100%; height: 100%" highlight-current-row
          @row-click="handleRowClick" height="500px" @selection-change="handleSelectionChange">
        <el-table
          ref="singleTable"
          :data="tableData"
          style="width: 100%; height: 100%"
          highlight-current-row
          @row-click="handleRowClick"
          height="500px"
          @selection-change="handleSelectionChange"
        >
          >
          <el-table-column type="selection" width="55"> </el-table-column>
          <el-table-column label="序号" type="index" fixed="left" width="55" align="center"></el-table-column>
          <el-table-column v-for="(item, index) in tableColumns.filter((x) => !x.hidden)" :key="index" :prop="item.prop"
            :label="item.title" :width="item.width" align="center">
          <el-table-column
            label="序号"
            type="index"
            fixed="left"
            width="55"
            align="center"
          ></el-table-column>
          <el-table-column
            v-for="(item, index) in tableColumns.filter((x) => !x.hidden)"
            :key="index"
            :prop="item.prop"
            :label="item.title"
            :width="item.width"
            align="center"
          >
            <template #default="scoped" v-if="item.type == 'icon'">
              <el-tooltip class="item" effect="dark" :content="item.title" placement="bottom"><el-button type="text"
                  @click="tableButtonClick(scoped.row, item)"><i :class="item.icon"
                    style="font-size: 22px"></i></el-button></el-tooltip>
              <el-tooltip
                class="item"
                effect="dark"
                :content="item.title"
                placement="bottom"
                ><el-button
                  type="text"
                  @click="tableButtonClick(scoped.row, item)"
                  ><i :class="item.icon" style="font-size: 22px"></i></el-button
              ></el-tooltip>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <template #footer>
        <el-button type="primary" size="small" @click="outbound">直接出库</el-button>
        <el-button type="primary" size="small" @click="lockStock">锁定库存</el-button>
        <el-button type="danger" size="small" @click="showDetialBox = false">关闭</el-button>
        <el-button type="primary" size="small" @click="outbound"
          >直接出库</el-button
        >
        <el-button type="primary" size="small" @click="lockStock"
          >锁定库存</el-button
        >
        <el-button type="danger" size="small" @click="showDetialBox = false"
          >关闭</el-button
        >
      </template>
    </vol-box>
  </div>
@@ -96,6 +148,7 @@
  },
  methods: {
    open(row) {
      console.log(row);
      this.row = row;
      this.showDetialBox = true;
      this.originalQuantity = this.row.lockQuantity;
@@ -126,9 +179,12 @@
        });
    },
    outbound() {
      if(this.selection.length<=0){
        return this.$message.error("请勾选");
      }
      this.http
        .post(
          "api/Task/GenerateOutboundTask?id=" + this.row.id,
          "api/Task/GenerateOutboundTask?orderDetailId=" + this.row.id,
          this.selection,
          "数据处理中"
        )
@@ -145,7 +201,9 @@
      this.http
        .post(
          "api/StockInfo/GetStockSelectViews?materielCode=" +
          this.row.materielCode,
            this.row.materielCode +
            "&orderId=" +
            this.row.orderId,
          null,
          "查询中"
        )
@@ -227,12 +285,12 @@
  background: oldlace;
}
.box-table .el-table tbody tr:hover>td {
.box-table .el-table tbody tr:hover > td {
  background-color: #d8e0d4 !important;
  /* color: #ffffff; */
}
.box-table .el-table tbody tr.current-row>td {
.box-table .el-table tbody tr.current-row > td {
  background-color: #f0f9eb !important;
  /* color: #ffffff; */
}