<template>
|
<div 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>
|
<el-dialog :visible.sync="dialogFormVisible" width="500px" title="收货地址">
|
<el-alert :closable="false" title="提示:填写需要获得号段数。" type="warning">
|
</el-alert>
|
<el-form :model="form" class="el-alter-form">
|
<el-form-item :label-width="formLabelWidth" label="号段数">
|
<el-input v-model="form.txtLen" autocomplete="off"></el-input>
|
</el-form-item>
|
</el-form>
|
<div slot="footer" class="dialog-footer">
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
<el-button type="primary" @click="onConfirm()">确 定</el-button>
|
</div>
|
</el-dialog>
|
</div>
|
|
</template>
|
<script>
|
import baseLayout from "@/components/common/base-layout.vue";
|
|
export default {
|
name: "api-internal-spare-code-st",
|
components: {},
|
mixins: [baseLayout],
|
data() {
|
return {
|
dialogFormVisible: false,
|
form: {
|
txtLen: ""
|
},
|
formLabelWidth: "80px"
|
};
|
},
|
methods: {
|
// 列表页面按钮点击事件
|
buttonClick(authNode) {
|
switch (authNode) {
|
case "btnStoGetCode":
|
// 获取申通号段
|
this.getStoCode();
|
break;
|
}
|
},
|
// 获取申通号段
|
getStoCode() {
|
this.dialogFormVisible = true;
|
},
|
onConfirm() {
|
this.dialogFormVisible = false;
|
var len = this.form.txtLen;
|
if (!len) {
|
this.$message({
|
message: "请输入号段数量!",
|
type: "warning"
|
});
|
return;
|
}
|
|
var url = "/api/Base_ExpressSpareCode/GetStoCode";
|
var parsms = {
|
len: len
|
};
|
const ref = this.dataList;
|
this.common.ajax(url, parsms, res => {
|
this.common.showMsg(res);
|
if (res.result) {
|
ref.loadData();
|
}
|
});
|
}
|
}
|
};
|
</script>
|
<style lang="scss" scoped>
|
.el-form {
|
margin-top: 20px;
|
}
|
</style>
|