wangxinhui
2025-09-26 9ae0890dd74771ba9edd44d4830e0de37f8d9938
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/extend/outSGOrderDetail.vue
ÎļþÃû´Ó ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/outbound/extend/outOrderDetail.vue ÐÞ¸Ä
@@ -3,7 +3,7 @@
    <vol-box
      v-model="showDetialBox"
      :lazy="true"
      width="75%"
      width="80%"
      :padding="15"
      title="单据明细信息"
    >
@@ -12,6 +12,8 @@
          <el-row>
            <el-col :span="16">
              <span>已选中 {{ selection.length }} é¡¹</span>
              <el-divider direction="vertical"></el-divider>
              <span>单号 {{ row.orderId }} </span>
            </el-col>
            <el-col :span="8">
              <!-- <el-link
@@ -103,10 +105,9 @@
<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";
export default {
  components: { VolBox, VolForm, StockSelect, SelectedStock },
  components: { VolBox, VolForm, SelectedStock },
  data() {
    return {
      row: null,
@@ -124,17 +125,18 @@
          hidden: true,
        },
        {
          prop: "outBSTOrderId",
          prop: "outSGOrderId",
          title: "出库单主键",
          type: "string",
          type: "int",
          width: 90,
          hidden: true,
        },
        {
          prop: "materialId",
          title: "上游物料ID",
          type: "string",
          width: 120,
          prop: "关联的明细ID(上游)",
          title: "出库单号",
          type: "int",
          width: 90,
          hidden: true,
        },
        {
          prop: "materialNo",
@@ -143,11 +145,22 @@
          width: 150,
        },
        {
          prop: "materielName",
          prop: "materialName",
          title: "物料名称",
          type: "string",
          width: 150,
          hidden: true,
        },
        {
          prop: "boardFluteNo",
          title: "楞别",
          type: "string",
          width: 110,
        },
        {
          prop: "machineName",
          title: "机台",
          type: "string",
          width: 110,
        },
        {
          prop: "width",
@@ -180,7 +193,7 @@
          width: 130,
        },
        {
          prop: "outBSTOrderDetailStatus",
          prop: "outSGOrderDetailStatus",
          title: "订单明细状态",
          type: "tag",
          width: 180,
@@ -206,12 +219,12 @@
          type: "datetime",
          width: 170,
        },
        {
          prop: "modifyDate",
          title: "修改时间",
          type: "datetime",
          width: 170,
        },
        // {
        //   prop: "modifyDate",
        //   title: "修改时间",
        //   type: "datetime",
        //   width: 170,
        // },
      ],
      paginations: {
        sort: "id",
@@ -219,7 +232,7 @@
        Foots: "",
        total: 0,
        // 2020.08.29增加自定义分页条大小
        sizes: [60, 100, 120],
        sizes: [60],
        size: 60, // é»˜è®¤åˆ†é¡µå¤§å°
        Wheres: [],
        page: 1,
@@ -260,6 +273,7 @@
    open(row) {
      this.row = row;
      this.showDetialBox = true;
      console.log(row);
      this.getDictionaryData();
      this.getData();
    },
@@ -276,12 +290,11 @@
        // ä»…对数值列求和
        if (column.property === 'xqLen' || column.property === 'assignTotalUsage' || column.property === 'outTotalUsage' || column.property === 'totalUsage') {
          const values = data.map(item => Number(item[column.property]))
        console.log(values);
        if (!values.every(value => isNaN(value))) {
          sums[index] = values.reduce((prev, curr) => {
            return prev + (isNaN(curr) ? 0 : curr)
          }, 0);
          //保留两位小数
          //保留4位小数
          sums[index] = sums[index].toFixed(4)
        } else {
          sums[index] = '-'
@@ -293,7 +306,7 @@
      return sums
    },
    getData() {
      var wheres = [{ name: "outBSTOrderId", value: this.row.id }];
      var wheres = [{ name: "outSGOrderId", value: this.row.id }];
      var param = {
        page: this.paginations.page,
        rows: this.paginations.rows,
@@ -302,7 +315,7 @@
        wheres: JSON.stringify(wheres), // æŸ¥è¯¢æ¡ä»¶ï¼Œæ ¼å¼ä¸º[{ name: "字段", value: "xx" }]
      };
      this.http
        .post("api/OutBSTOrderDetail/GetPageData", param, "查询中")
        .post("api/OutSGOrderDetail/GetPageData", param, "查询中")
        .then((x) => {
          this.tableData = x.rows;
        });
@@ -315,22 +328,6 @@
        this.$refs.selectedStock.open(row,this.row.outBSTOrderNo);
      }
    },
    // lockstocks() {
    //   if (this.selection.length === 0) {
    //     return this.$message.error("请选择单据明细");
    //   }
    //   var keys = this.selection.map((item) => item.id); // èŽ·å–é€‰ä¸­è¡Œçš„id
    //   this.http
    //     .post("api/OutboundOrderDetail/LockOutboundStocks", keys, "数据处理中")
    //     .then((x) => {
    //       if (!x.status) return this.$message.error(x.message);
    //       this.$message.success("操作成功");
    //       this.showDetialBox = false;
    //       this.$emit("parentCall", ($vue) => {
    //         $vue.getData();
    //       });
    //     });
    // },
    outbound() {
      if (this.selection.length === 0) {
        return this.$message.error("请选择单据明细");
@@ -357,10 +354,10 @@
    getButtonEnable(propName, row) {
      if (propName == "assignStock") {
        if (
          row.orderDetailStatus !== 0 &&
          row.orderDetailStatus !== 60 &&
          row.orderDetailStatus !== 70 &&
          row.orderDetailStatus !== 80
          row.outSGOrderDetailStatus !== 0 &&
          row.outSGOrderDetailStatus !== 60 &&
          row.outSGOrderDetailStatus !== 70 &&
          row.outSGOrderDetailStatus !== 80
        ) {
          return true;
        } else {
@@ -404,7 +401,7 @@
        var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey);
        if (item) {
          var dicItem = item.data.find((x) => x.key == row[column.prop]);
          console.log(dicItem);
          // console.log(dicItem);
          if (dicItem) {
            return dicItem.value;
          } else {