333
schangxiang@126.com
2025-09-19 18966e02fb573c7e2bb0c6426ed792b38b910940
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<template>
  <div ref="container" class="page-list-container">
    <!--数据Table-->
    <yrt-data-list :ref="dataListRef" :editor-ref="editorRef" :data-options="dataOptions" :fields.sync="dataListOptions.fields" :buttons="dataListOptions.buttons" :button-click="buttonClick" :data-list-selections.sync="dataListSelections" :auth-nodes="authNodes">
    </yrt-data-list>
 
    <!--数据编辑器Editor-->
    <yrt-editor :ref="editorRef" :data-list-ref="dataListRef" v-bind="editorOptions" :data-options="dataOptions" :action.sync="editorOptions.action" :visible.sync="editorOptions.config.visible" :detail-button-click="detailButtonClick" :auth-nodes="authNodes">
    </yrt-editor>
 
    <!-- 预料回库 -->
    <picking-back-dialog ref="checkbackDialog" :visible.sync="checkbackVisible"></picking-back-dialog>
  </div>
</template>
<script>
import baseLayout from "@/components/common/base-layout.vue";
import pickingBackDialog from "./components/picking-back-dialog.vue";
export default {
  name: "outbound-sale-order",
  components: { pickingBackDialog },
  mixins: [baseLayout],
  data() {
    return { checkbackVisible: false };
  },
  methods: {
    // 列表页面按钮点击事件
    buttonClick(authNode) {
      switch (authNode) {
        // 拣选回库
        case "pickingBack":
          this.pickingBack();
          return false;
      }
    },
    pickingBack() {
      if (this.dataListSelections.length !== 1) {
        this.$message.error("请选择一条单据进行操作");
        return false;
      }
      const rowInfo = this.dataListSelections[0];
 
      const statusText = rowInfo.statusText;
      const statusList = ["部分出库"];
      if (statusList.indexOf(statusText) < 0) {
        this.$message.error(`只有【${statusList.join(",")}】的单据才允许入库!`);
        return false;
      }
      this.checkbackVisible = true; // 显示对话框
      var order_Id = rowInfo.order_Id;
      this.$refs.checkbackDialog.initData(order_Id);
    }
  }
};
</script>