647556386
2026-01-12 300ca9810420efbf8468c9d6f47bd364c9c72d5f
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue
@@ -3,7 +3,7 @@
    <vol-box
      v-model="showDetialBox"
      :lazy="true"
      width="60%"
      width="80%"
      :padding="15"
      title="指定库存"
    >
@@ -11,6 +11,8 @@
        <el-alert :closable="false" style="width: 100%">
          <el-row>
            <el-col :span="16">
              <span class="less-style">单据编号:{{ mainOrderNo }}</span>
              <el-divider direction="vertical"></el-divider>
              <span class="less-style">物料名称: {{ row.materielName }} </span>
              <el-divider direction="vertical"></el-divider>
              <span class="less-style">物料编号: {{ row.materielCode }} </span>
@@ -24,13 +26,13 @@
              </span>
            </el-col>
            <el-col :span="8">
              <el-link
             <!--  <el-link
                type="primary"
                size="small"
                style="float: right; height: 20px"
                @click="getData(false)"
                >{{ kcname }}</el-link
              >
              > -->
              <el-link
                type="primary"
                size="small"
@@ -38,13 +40,13 @@
                @click="getData"
                >刷新</el-link
              >
              <el-link
      <!--         <el-link
                type="primary"
                size="small"
                style="float: right; height: 20px; margin-right: 10px"
                @click="revokeAssign"
                >撤销分配</el-link
              >
              > -->
            </el-col>
          </el-row>
        </el-alert>
@@ -92,12 +94,10 @@
        </el-table>
      </div>
      <template #footer>
        <el-button type="primary" size="small" @click="outbound"
       <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
        >
@@ -114,6 +114,7 @@
    return {
      row: null,
      kcname: "",
      mainOrderNo: '',
      pkcx: false,
      showDetialBox: false,
      tableData: [],
@@ -137,6 +138,12 @@
          width: 150,
        },
        {
          prop: "barcode",
          title: "条码",
          type: "string",
          width: 150,
        },
        {
          prop: "locationCode",
          title: "货位编号",
          type: "string",
@@ -147,6 +154,25 @@
          title: "可用数量",
          type: "string",
        },
        {
          prop: "supplyCode",
          title: "供应商",
          type: "string",
        },
        {
          prop: "batchNo",
          title: "批次号",
          type: "string",
        },
        {
          prop: "stockId",
          title: "库存主键",
          type: "string",
        },{
          prop: "orderDetailId",
          title: "单据明细主键",
          type: "string",
        },
      ],
      selection: [],
      selectionSum: 0,
@@ -155,13 +181,14 @@
    };
  },
  methods: {
    open(row) {
      console.log(row);
      this.row = row;
      this.showDetialBox = true;
    open(row, orderNo) {
    this.row = row;
    this.mainOrderNo = orderNo; // å­˜å‚¨ä¸»å•据编号
    this.showDetialBox = true;
      this.originalQuantity = this.row.lockQuantity;
      this.selectionSum = this.row.lockQuantity;
      this.getData();
      if (this.selectionSum == this.row.orderQuantity) {
        this.selectionClass = "equle-style";
      } else if (this.selectionSum < this.row.orderQuantity) {
@@ -191,7 +218,7 @@
        return this.$message.error("请勾选");
      }
      let url = this.pkcx
        ? "api/Task/GeneratePKOutboundTask?orderDetailId="
        ? "api/Task/GenerateOutboundTask?orderDetailId="
        : "api/Task/GenerateOutboundTask?orderDetailId=";
      this.http
        .post(url + this.row.id, this.selection, "数据处理中")
@@ -207,7 +234,7 @@
    getData(a) {
      if (!a) this.pkcx = !this.pkcx;
      let url = this.pkcx
        ? "api/StockInfo/GetPKStockSelectViews?materielCode="
        ? "api/StockInfo/GetStockSelectViews?materielCode="
        : "api/StockInfo/GetStockSelectViews?materielCode=";
      this.kcname = this.pkcx ? "立库库存" : "平库库存";
      this.http
@@ -220,23 +247,7 @@
          this.tableData = x;
        });
    },
    revokeAssign() {
      console.log(this.row);
      this.http
        .post(
          "api/OutboundOrderDetail/RevokeLockOutboundStock?id=" + this.row.id,
          null,
          "数据处理中"
        )
        .then((x) => {
          if (!x.status) return this.$message.error(x.message);
          this.$message.success("操作成功");
          this.showDetialBox = false;
          this.$emit("parentCall", ($vue) => {
            $vue.getData();
          });
        });
    },
    handleSelectionChange(val) {
      this.selection = val;
      this.selectionSum =