|
|
|
@ -94,12 +94,12 @@
|
|
|
|
|
<!-- 表单模块 --> |
|
|
|
|
<el-dialog :title="title" |
|
|
|
|
v-model="box" |
|
|
|
|
width="50%" |
|
|
|
|
width="20%" |
|
|
|
|
:before-close="beforeClose" |
|
|
|
|
append-to-body> |
|
|
|
|
<el-form :disabled="view" ref="form" :model="form" label-width="80px"> |
|
|
|
|
<el-form :disabled="view" ref="form" :model="form" label-width="80px" :rules="rules"> |
|
|
|
|
<!-- 表单字段 --> |
|
|
|
|
<el-form-item label="编码类型:" prop="codeType" > |
|
|
|
|
<el-form-item label="编码类型:" prop="codeType" > |
|
|
|
|
<el-select v-model="form.codeType" clearable placeholder="请选择状态"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in codeType" |
|
|
|
@ -109,7 +109,7 @@
|
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="展示类型:" prop="showType" > |
|
|
|
|
<el-form-item label="展示类型:" prop="showType" label-width="80px"> |
|
|
|
|
<el-select v-model="form.showType" clearable placeholder="请选择状态"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in showType" |
|
|
|
@ -119,8 +119,8 @@
|
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="租户编码:" prop="code"> |
|
|
|
|
<el-input v-model="form.code"/> |
|
|
|
|
<el-form-item label="租户编码:" prop="code" label-width="80px"> |
|
|
|
|
<el-input v-model="form.code" placeholder="请选择状态" style="width: 77%"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- <el-form-item label="预留1" prop="reserve1">--> |
|
|
|
|
<!-- <el-input v-model="form.reserve1" placeholder="请输入预留1"/>--> |
|
|
|
@ -191,6 +191,20 @@ export default {
|
|
|
|
|
data: [], |
|
|
|
|
codeType: [], |
|
|
|
|
showType: [], |
|
|
|
|
rules:{ |
|
|
|
|
codeType:[ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
trigger: "change", |
|
|
|
|
message: "请选择编码类型" |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
showType:[{ |
|
|
|
|
required: true, |
|
|
|
|
trigger: "change", |
|
|
|
|
message: "请选择展示类型" |
|
|
|
|
}] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
@ -214,11 +228,9 @@ export default {
|
|
|
|
|
init () { |
|
|
|
|
getDictionaryBiz("basic_tenant_code").then(res=>{ |
|
|
|
|
this.codeType = res.data.data |
|
|
|
|
console.log(res.data.data) |
|
|
|
|
}) |
|
|
|
|
getDictionaryBiz("basic_tenant_code_show").then(res=>{ |
|
|
|
|
this.showType = res.data.data |
|
|
|
|
console.log(res.data.data) |
|
|
|
|
}) |
|
|
|
|
this.height = this.setPx(document.body.clientHeight - 340); |
|
|
|
|
}, |
|
|
|
@ -235,33 +247,56 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
handleSubmit () { |
|
|
|
|
if (!this.form.id) { |
|
|
|
|
add(this.form).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
this.$refs.form.validate(valid=>{ |
|
|
|
|
if (valid){ |
|
|
|
|
add(this.form).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}else { |
|
|
|
|
this.$message({ |
|
|
|
|
type: "error", |
|
|
|
|
message: "操作失败!" |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
update(this.form).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
this.$refs.form.validate(valid=>{ |
|
|
|
|
if (valid){ |
|
|
|
|
update(this.form).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}else { |
|
|
|
|
this.$message({ |
|
|
|
|
type: "error", |
|
|
|
|
message: "操作失败!" |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
handleAdd () { |
|
|
|
|
this.title = '新增' |
|
|
|
|
this.form = {} |
|
|
|
|
this.box = true |
|
|
|
|
this.$refs['form'].resetFields(); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
handleEdit (row) { |
|
|
|
|
this.title = '编辑' |
|
|
|
|
this.box = true |
|
|
|
|
this.$refs['form'].resetFields(); |
|
|
|
|
|
|
|
|
|
getDetail(row.id).then(res => { |
|
|
|
|
res.data.data.codeType = parseInt(res.data.data.codeType); |
|
|
|
|
res.data.data.showType = parseInt(res.data.data.showType); |
|
|
|
|