wangxinhui
2025-05-13 ad4d32dc4e162ba7fb71cd3bc213f1d71c964551
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/proOutboundOrderDetail.vue
@@ -1,13 +1,82 @@
<template>
  <div>
    <vol-box
      v-model="dialogFormVisible"
      :on-model-close="closeCustomModel"
      :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="75%"
      width="85%"
      :padding="15"
      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 +94,7 @@
                type="primary"
                size="small"
                style="float: right; height: 20px; margin-right: 10px"
                @click="outbound"
                @click="outSelect"
                >直接出库</el-link
              >
              <el-link
@@ -91,7 +160,7 @@
        </el-table>
      </div>
    </vol-box>
    <pp-stock-select ref="childs" ></pp-stock-select>
    <stock-select ref="childs" ></stock-select>
    <selected-stock
      ref="SelectedStock"
      @parentCall="parentCall"
@@ -101,8 +170,8 @@
<script>
import VolBox from "@/components/basic/VolBox.vue";
import VolForm from "@/components/basic/VolForm.vue";
import StockSelect from "./StockSelect.vue";
import SelectedStock from "./SelectedStock.vue";
import StockSelect from "./ProStockSelect.vue";
import SelectedStock from "./ProSelectedStock.vue";
export default {
  components: { VolBox, VolForm, StockSelect, SelectedStock },
  data() {
@@ -113,6 +182,47 @@
      currentRow: null,
      selection: [],
      tableData: [],
      dialogFormVisible:false,
      formLabelWidth: '160px',
      formFields1: {
        LineCode: "",
        Grade: "0",
      },
      formRules1:[[
          {
            dataKey: "line",
            title: "选择线体",
            required: true,
            field: "LineCode",
            data: [
              { key: "5236", value: "1号线" },
              { key: "5243", value: "2号线" },
              { key: "5250", value: "3号线" },
            ],
            type: "select",
            extra: {
            },
          }],
          [
          {
            title: "是否优先",
            field: "Grade",
            data: [],
            required: false,
            type: "switch",
          },
        ]],
      form: {
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: '',
      },
      tableColumns: [
        {
          prop: "id",
@@ -178,6 +288,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,25 +337,12 @@
          type: "string",
          width: 120,
        },
        {
          prop: "spareQty",
          title: "备品数",
          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: "creater",
@@ -269,11 +380,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 +418,12 @@
    };
  },
  methods: {
    outSelect(){
      if (this.selection.length === 0) {
        return this.$message.error("请选择单据明细");
      }
      this.dialogFormVisible=true;
    },
    open(row) {
      this.row = row;
      this.showDetialBox = true;
@@ -314,7 +431,7 @@
      this.getData();
    },
    getData() {
      var wheres = [{ name: "orderId", value: this.row.id }];
      var wheres = [{ name: "proOrderId", value: this.row.id }];
      var param = {
        page: this.paginations.page,
        rows: this.paginations.rows,
@@ -359,13 +476,21 @@
      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 +"&grade="+this.formFields1.Grade, keys, "数据处理中")
        .then((x) => {
          if (!x.status) return this.$message.error(x.message);
          this.$message.success("操作成功");
          this.formFields1.LineCode="";
          this.formFields1.Grade="0";
          this.dialogFormVisible=false;
          this.$parent.refresh();
          this.showDetialBox = false;
          this.$emit("parentCall", ($vue) => {
            $vue.getData();
@@ -379,12 +504,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 {
@@ -423,6 +549,12 @@
          }
        });
    },
    closeCustomModel() {
      this.formFields1.LineCode="";
      this.formFields1.Grade="0";
          this.dialogFormVisible=false;
          this.$parent.refresh();
    },
    getDictionary(row, column) {
      if (this.dictionaryList) {
        var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey);