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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
 
<template>
  <el-dialog :visible.sync="currentVisible" title="一次性收费项" width="500px">
    <el-form :label-width="formLabelWidth">
      <el-form-item label="一次性收费项">
        <el-select v-model="feeItem_Ids" multiple placeholder="请选择">
          <el-option v-for="item in feeTtemList" :key="item.value" :label="item.label" :value="item.value">
          </el-option>
        </el-select>
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="currentVisible=false">取 消</el-button>
      <el-button type="primary" @click="modifyfeeItems()">确 定</el-button>
    </div>
  </el-dialog>
</template>
 
<script>
export default {
  props: {
    visible: {
      type: Boolean,
      default: false,
      required: true
    }
  },
  data() {
    return {
      formLabelWidth: "120px", // 弹出框显示的宽度
      // 收费项下拉值
      feeTtemList: [],
      // 选中的收费项
      feeItem_Ids: [],
      // 订单ID
      order_Id: 0
    };
  },
  computed: {
    currentVisible: {
      get: function() {
        return this.visible;
      },
      set: function(val) {
        this.$emit("update:visible", val);
      }
    }
  },
  methods: {
    // 接受预到货单主表信息
    initData(Id) {
      this.order_Id = Id;
      this.feeItem_Ids = [];
      this.getFeeTtemList();
      this.getFeeTtemList();
    },
    // 获取一次性收费项值
    getFeeTtemList() {
      var url = "/api/common/loadDropDown";
      var params = {
        openNodeApi: true,
        where: [722]
      };
      var callBack = res => {
        this.common.showMsg(res);
        if (res.result) {
          if (res.data) {
            this.feeTtemList = res.data["dropdown722"];
          }
        }
      };
      this.common.ajax(url, params, callBack, true);
    },
    // 修改一次性收费项
    modifyfeeItems() {
      const url = "/api/inbound/order/modifyfeeItems";
      const params = {
        order_Id: this.order_Id,
        feeItem_Ids: this.feeItem_Ids.join("/")
      };
      this.common.ajax(url, params, res => {
        this.common.showMsg(res);
        if (res.result) {
          // 关闭弹出框
          this.currentVisible = false;
          // this.editor.reload();
          this.reload();
        }
      });
    },
    reload() {}
  }
};
</script>
 
<style lang="scss" scoped>
.upload-demo {
  text-align: center;
  margin-top: 100px;
}
.download {
  margin: 50px 0px 0px 80px;
  text-decoration: underline;
}
</style>