|
<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>
|