wangxinhui
2025-04-29 95e39ae7aecd6e1016c71cf5ae70a680d8f569bb
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/proOutboundOrderDetail.vue
@@ -1,6 +1,31 @@
<template>
  <div>
    <vol-box
      v-model="dialogFormVisible"
      :lazy="true"
      width="20%"
      :padding="15"
      title="选择出库线体"
    >
        <div>
          <VolForm
            ref="myform"
            :label-width="120"
            :loadKey="true"
            :formFields="formFields1"
            :formRules="formRules1"
          >
          </VolForm>
        </div>
        <template #footer>
          <!-- <el-button type="primary" size="small" @click="submit">确认</el-button> -->
          <el-button type="danger" size="small" @click="outbound"
            >出库</el-button
          >
        </template>
    </vol-box>
    <vol-box
      v-model="showDetialBox"
      :lazy="true"
      width="85%"
@@ -8,6 +33,49 @@
      title="单据明细信息"
    >
      <div class="box-head">
        <!-- <el-dialog v-model="dialogFormVisible" title="选择出库线体" width="500" center>
          <span>
            It should be noted that the content will not be aligned in center by
            default
          </span>
          <template #footer>
            <div class="dialog-footer">
              <el-button @click="outbound">出库</el-button>
            </div>
          </template>
        </el-dialog> -->
        <!-- <el-dialog
          v-model="dialogFormVisible"
          title="Warning"
          width="500"
          align-center
        >
          <span>Open the dialog from the center from the screen</span>
          <template #footer>
            <div class="dialog-footer">
              <el-button @click="outbound">出库</el-button>
            </div>
          </template>
        </el-dialog> -->
        <!-- <el-dialog v-model="dialogFormVisible" title="选择出库线体" width="500">
          <el-form :model="form" width="500">
            <div style="width: 300px;margin: 0px auto;">
              <el-form-item label="请选择线体" :label-width="formLabelWidth">
                <el-select v-model="form.region" placeholder="选择线体">
                  <el-option label="1号线" value="5236" />
                  <el-option label="2号线" value="5243" />
                  <el-option label="3号线" value="5250" />
                </el-select>
              </el-form-item>
            </div>
          </el-form>
          <template #footer>
            <div class="dialog-footer">
              <el-button @click="outbound">出库</el-button>
            </div>
          </template>
        </el-dialog> -->
        <el-alert :closable="false" style="width: 100%">
          <el-row>
            <el-col :span="16">
@@ -25,7 +93,7 @@
                type="primary"
                size="small"
                style="float: right; height: 20px; margin-right: 10px"
                @click="outbound"
                @click="outSelect"
                >直接出库</el-link
              >
              <el-link
@@ -113,6 +181,37 @@
      currentRow: null,
      selection: [],
      tableData: [],
      dialogFormVisible:false,
      formLabelWidth: '160px',
      formFields1: {
        LineCode: "",
      },
      formRules1:[[
          {
            dataKey: "line",
            title: "选择线体",
            required: true,
            field: "LineCode",
            data: [
              { key: "5236", value: "1号线" },
              { key: "5243", value: "2号线" },
              { key: "5250", value: "3号线" },
            ],
            type: "select",
            extra: {
            },
          }]],
      form: {
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: '',
      },
      tableColumns: [
        {
          prop: "id",
@@ -178,6 +277,20 @@
          width: 150,
        },
        {
          prop: "assignStock",
          title: "指定库存",
          type: "icon",
          width: 90,
          icon: "el-icon-s-grid",
        },
        {
          prop: "viewDetail",
          title: "出库详细",
          type: "icon",
          width: 90,
          icon: "el-icon-s-operation",
        },
        {
          prop: "qtyPcs",
          title: "合格PCS数",
          type: "string",
@@ -213,20 +326,7 @@
          type: "string",
          width: 120,
        },
        {
          prop: "assignStock",
          title: "指定库存",
          type: "icon",
          width: 90,
          icon: "el-icon-s-grid",
        },
        {
          prop: "viewDetail",
          title: "出库详细",
          type: "icon",
          width: 90,
          icon: "el-icon-s-operation",
        },
        {
          prop: "spareQty",
          title: "备品数",
@@ -269,11 +369,11 @@
        Foots: "",
        total: 0,
        // 2020.08.29增加自定义分页条大小
        sizes: [30, 60, 100, 120],
        size: 30, // é»˜è®¤åˆ†é¡µå¤§å°
        sizes: [60, 100, 120],
        size: 60, // é»˜è®¤åˆ†é¡µå¤§å°
        Wheres: [],
        page: 1,
        rows: 30,
        rows: 60,
      },
      searchFormOptions: [
        [
@@ -307,6 +407,12 @@
    };
  },
  methods: {
    outSelect(){
      if (this.selection.length === 0) {
        return this.$message.error("请选择单据明细");
      }
      this.dialogFormVisible=true;
    },
    open(row) {
      this.row = row;
      this.showDetialBox = true;
@@ -359,10 +465,14 @@
      if (this.selection.length === 0) {
        return this.$message.error("请选择单据明细");
      }
      //请选择单条数据
      if (this.selection.length > 1) {
        return this.$message.error("请选择单条数据");
      }
      var keys = this.selection.map((item) => item.id); // èŽ·å–é€‰ä¸­è¡Œçš„id
      this.http
        .post("api/Task/OutProductTask?stationCode=5236", keys, "数据处理中")
        .post("api/Task/OutProductTask?stationCode="+this.formFields1.LineCode, keys, "数据处理中")
        .then((x) => {
          if (!x.status) return this.$message.error(x.message);
          this.$message.success("操作成功");
@@ -370,6 +480,9 @@
          this.$emit("parentCall", ($vue) => {
            $vue.getData();
          });
          this.formFields1.LineCode="";
          this.dialogFormVisible=false;
          this.$parent.refresh();
        });
    },
    setCurrent(row) {
@@ -379,12 +492,13 @@
      this.currentRow = val;
    },
    getButtonEnable(propName, row) {
      console.log(row)
      if (propName == "assignStock") {
        if (
          row.proOrderDetailStatus !== 0 &&
          (row.proOrderDetailStatus !== 0 &&
          row.proOrderDetailStatus !== 60 &&
          row.proOrderDetailStatus !== 70 &&
          row.proOrderDetailStatus !== 80
          row.proOrderDetailStatus !== 80) || row.qtyPcs==row.lockQtyPcs
        ) {
          return true;
        } else {