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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<template>
  <el-dialog v-dialogDrag :visible.sync="currentVisible" title="生成上架单">
    <el-alert title="提示:请筛选好需要生产上架单的入库明细数据。" type="warning"></el-alert>
    <el-form :inline="true" :model="form" class="demo-form-inline">
      <el-form-item :label-width="formLabelWidth" label="每个入库单按">
        <el-col :span="4">
          <el-input v-model.number="form.number" auto-complete="off"></el-input>
        </el-col>
        <el-col :span="20">
          个物料分组。
        </el-col>
      </el-form-item>
    </el-form>
    <el-form :inline="true" :model="form" class="demo-form-inline">
      <el-form-item label="注意:默认填0或者空着将按照每个入库单生成一个上架单。">
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="currentVisible=false">取 消</el-button>
      <el-button type="primary" @click="shelvecreate">确 定</el-button>
    </div>
  </el-dialog>
</template>
 
<script>
export default {
  name: "shelve-create",
  components: {},
  props: {
    visible: {
      type: Boolean,
      default: false,
      required: true
    }
  },
  data() {
    return {
      dialogFormVisible: false,
      id: "",
      form: {
        number: 0
      },
      formLabelWidth: "120px",
      ids: ""
    };
  },
  computed: {
    currentVisible: {
      get: function() {
        return this.visible;
      },
      set: function(val) {
        this.$emit("update:visible", val);
      }
    }
  },
  methods: {
    // 设置条件为,选中数据生成上架单
    addwhere(ids) {
      this.ids = ids;
    },
    // 生成上架单
    shelvecreate() {
      const num = this.form.number;
      const url = "/api/inbound/enter/createShelve";
      const params = {
        openNodeApi: true,
        enterList_Ids: this.ids,
        num: num
      };
      var callback = res => {
        this.common.showMsg(res);
        if (res.result) {
          this.currentVisible = false;
          this.$emit("closed");
        }
      };
      this.common.ajax(url, params, callback, null);
    }
  }
};
</script>