|
|
|
@ -11,31 +11,55 @@
|
|
|
|
|
<a-form :form="form">
|
|
|
|
|
<a-row>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="租户参数类别" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-form-item label="租户" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-select
|
|
|
|
|
placeholder="请选择租户参数类别"
|
|
|
|
|
v-decorator="['typeCode', { rules: [{ required: true, message: '请选择租户参数类别!' }] }]"
|
|
|
|
|
show-search
|
|
|
|
|
v-decorator="['tenantId', { rules: [{ required: true, message: '请选择租户!' }] }]"
|
|
|
|
|
placeholder="请选择租户"
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
:default-active-first-option="false"
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
:filter-option="false"
|
|
|
|
|
:not-found-content="null"
|
|
|
|
|
@search="tenantIdSearch"
|
|
|
|
|
>
|
|
|
|
|
<a-select-option v-for="item in TypeData" :key="item.id" :value="item.id">
|
|
|
|
|
{{ item.paraCode }}
|
|
|
|
|
<a-select-option v-for="item in TenantData" :key="item.id" :value="item.id">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="账号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入账号"
|
|
|
|
|
v-decorator="['account', { rules: [{ required: true, message: '请输入账号!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
<a-form-item label="租户参数类别" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-select
|
|
|
|
|
placeholder="请选择租户参数类别"
|
|
|
|
|
v-decorator="['paraCode', { rules: [{ required: true, message: '请选择租户参数类别!' }] }]"
|
|
|
|
|
@change="FnChangeTypeCode"
|
|
|
|
|
>
|
|
|
|
|
<a-select-option v-for="item in TypeData" :key="item.id" :value="item.paraCode">
|
|
|
|
|
{{ item.paraCode }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="密码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-form-item label="租户参数名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback disabled>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入密码"
|
|
|
|
|
v-decorator="['password', { rules: [{ required: true, message: '请输入密码!' }] }]"
|
|
|
|
|
placeholder="请输入租户参数名称"
|
|
|
|
|
v-decorator="['itemCode', { rules: [{ required: true, message: '请输入租户参数名称!' }] }]"
|
|
|
|
|
:disabled="ItemCodeDisabled"
|
|
|
|
|
v-if="ItemData.length == 0"
|
|
|
|
|
/>
|
|
|
|
|
<a-select
|
|
|
|
|
placeholder="请选择租户参数名称"
|
|
|
|
|
v-decorator="['itemCode', { rules: [{ required: true, message: '请选择租户参数名称!' }] }]"
|
|
|
|
|
:disabled="ItemCodeDisabled"
|
|
|
|
|
v-else
|
|
|
|
|
>
|
|
|
|
|
<a-select-option v-for="item in ItemData" :key="item.id" :value="item.itemCode">
|
|
|
|
|
{{ item.itemName }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="19">
|
|
|
|
@ -50,7 +74,12 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { DJYTenantParamEditParamValue, DJYTenantParamGet } from '@/api/modular/main/DJYTenantParam'
|
|
|
|
|
import {
|
|
|
|
|
DJYTenantParamEditParamValue,
|
|
|
|
|
DJYTenantParamGet,
|
|
|
|
|
SysTenantPage,
|
|
|
|
|
DJYTenantParamGetParamItem
|
|
|
|
|
} from '@/api/modular/main/DJYTenantParam'
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
@ -75,7 +104,10 @@ export default {
|
|
|
|
|
visible: false,
|
|
|
|
|
confirmLoading: false,
|
|
|
|
|
form: this.$form.createForm(this),
|
|
|
|
|
data: {}
|
|
|
|
|
data: {},
|
|
|
|
|
TenantData: [],
|
|
|
|
|
ItemData: [],
|
|
|
|
|
ItemCodeDisabled: true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
@ -85,6 +117,22 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
FnChangeTypeCode(e) {
|
|
|
|
|
if (e) {
|
|
|
|
|
this.ItemCodeDisabled = false
|
|
|
|
|
DJYTenantParamGetParamItem({ paraCode: e }).then(res => {
|
|
|
|
|
this.ItemData = res.data
|
|
|
|
|
console.log(res.data)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
tenantIdSearch(value) {
|
|
|
|
|
if (value) {
|
|
|
|
|
SysTenantPage({ pageNo: 1, pageSize: 9999, name: value }).then(res => {
|
|
|
|
|
this.TenantData = res.data.rows
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 初始化方法
|
|
|
|
|
edit(record) {
|
|
|
|
|
this.data = record
|
|
|
|
@ -94,9 +142,9 @@ export default {
|
|
|
|
|
this.typeData = typeOption.filters['dictData']('edi_type')
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.form.setFieldsValue({
|
|
|
|
|
typeCode: record.typeCode,
|
|
|
|
|
account: record.account,
|
|
|
|
|
password: record.password,
|
|
|
|
|
paraCode: record.paraCode,
|
|
|
|
|
itemCode: record.itemCode,
|
|
|
|
|
itemName: record.itemName,
|
|
|
|
|
remark: record.remark
|
|
|
|
|
})
|
|
|
|
|
console.log(this.form.getFieldsValue())
|
|
|
|
|