pull/1/head
张同海 2 years ago
parent 17589ab6f5
commit 47fe0e9ab9

@ -177,7 +177,6 @@ export default {
this.ItemCodeDisabled = false
DJYTenantParamGetParamItem({ paraCode: e }).then(res => {
this.ItemData = res.data
console.log(res.data)
})
}
},
@ -190,8 +189,10 @@ export default {
},
//
edit(record) {
this.data = record
console.log(record)
this.FnChangeTypeCode(record.paraCode)
this.data = record
this.visible = true
const typeOption = this.$options
this.typeData = typeOption.filters['dictData']('edi_type')
@ -204,7 +205,6 @@ export default {
sort: record.sort,
tenantId: record.tenantId
})
console.log(this.form.getFieldsValue())
}, 100)
},
handleSubmit() {
@ -213,17 +213,15 @@ export default {
} = this
this.confirmLoading = true
validateFields((errors, values) => {
console.log(errors, values)
if (!errors) {
for (const key in values) {
console.log(key, 1)
if (typeof values[key] === 'object' && !(values[key] === null)) {
values[key] = JSON.stringify(values[key])
}
}
console.log(this.form, values.id)
values.id = this.data.id
console.log(values)
DJYTenantParamEditParamValue(values)
.then(res => {
if (res.success) {

@ -101,8 +101,10 @@
:align="item.align"
v-if="item.title != '租户'"
>
<template #default="{ row }" v-if="item.title == '租户参数类别'">
<span>{{ FnTurnD(row.paraCode) }}</span>
<template #default="{ row }">
<span v-if="item.title == '租户参数类别'">{{ FnTurnD(row.paraCode) }}</span>
<span v-if="item.title == '租户参数名称'">{{ FnRTypeCode(row) }}</span>
<span v-else>{{ row[item.dataIndex] }}</span>
</template>
</vxe-column>
<vxe-column title="操作" fixed="right" width="200" align="center">
@ -142,7 +144,8 @@ import {
DJYTenantParamGetParamValue,
SysTenantPage,
DJYTenantParamGet,
DJYTenantParamDeleteParamValue
DJYTenantParamDeleteParamValue,
DJYTenantParamGetParamItem
} from '@/api/modular/main/DJYTenantParam'
import addForm from './addItemForm.vue'
import editForm from './editItemForm.vue'
@ -182,7 +185,7 @@ export default {
dataIndex: 'paraCode'
},
{
title: '租户参数代码',
title: '租户参数名称',
align: 'center',
width: '80',
dataIndex: 'itemCode'
@ -212,6 +215,24 @@ export default {
this.init()
},
methods: {
FnRTypeCode(e) {
let RData = ''
this.TypeData.forEach(item => {
if (item.paraCode == e.paraCode) {
if (item.itemCodeData.length) {
item.itemCodeData.forEach(item2 => {
if (item2.itemCode == e.itemCode) {
console.log(item2, 'item2')
RData = item2.itemName
}
})
} else {
RData = e.itemCode
}
}
})
return RData
},
tenantIdSearch(value) {
if (value) {
SysTenantPage({ pageNo: 1, pageSize: 9999, name: value }).then(res => {
@ -265,6 +286,11 @@ export default {
}
})
this.WTypeData = data
this.TypeData.forEach(item => {
DJYTenantParamGetParamItem({ paraCode: item.paraCode }).then(res => {
item.itemCodeData = res.data
})
})
})
SysTenantPage({ pageNo: 1, pageSize: 9999, name: '' }).then(res => {
this.TenantData = res.data.rows

@ -94,7 +94,7 @@
</a-col>
<a-col :span="8">
<a-form-item label="发送类型" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select placeholder="请选择发送类型" v-decorator="['sendType']">
<a-select allowClear placeholder="请选择发送类型" v-decorator="['sendType']">
<a-select-option v-for="item in SendTypeData" :key="item.id" :value="item.code">
{{ item.name }}
</a-select-option>

@ -93,7 +93,7 @@
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="发送类型" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-form-item allowClear label="发送类型" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select placeholder="请选择发送类型" v-decorator="['sendType']">
<a-select-option v-for="item in SendTypeData" :key="item.id" :value="item.code">
{{ item.name }}

Loading…
Cancel
Save