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

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

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

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

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

Loading…
Cancel
Save