添加 租户

dev
张同海 2 years ago
parent e4d0b15fdc
commit af6cb29ac1

@ -58,98 +58,77 @@
</a-col>
<a-col :span="8">
<a-form-item label="发送方名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入发送方名称"
v-decorator="['sendname', { rules: [{ required: true, message: '请输入发送方名称!' }] }]"
/>
<a-input placeholder="请输入发送方名称" v-decorator="['sendname']" />
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-item label="发送方联系人" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入发送方联系人"
v-decorator="['sendattn', { rules: [{ required: true, message: '请输入发送方联系人!' }] }]"
/>
<a-input placeholder="请输入发送方联系人" v-decorator="['sendattn']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="发送方电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入发送方电话"
v-decorator="['sendtel', { rules: [{ required: true, message: '请输入发送方电话!' }] }]"
/>
<a-input placeholder="请输入发送方电话" v-decorator="['sendtel']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="发送方邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入发送方邮箱"
v-decorator="['sendemail', { rules: [{ required: true, message: '请输入发送方邮箱!' }] }]"
/>
<a-input placeholder="请输入发送方邮箱" v-decorator="['sendemail']" />
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-item label="接收方邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入接收方邮箱"
v-decorator="['receiveemail', { rules: [{ required: true, message: '请输入接收方邮箱!' }] }]"
/>
<a-input placeholder="请输入接收方邮箱" v-decorator="['receiveemail']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="接收方操作" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入接收方操作"
v-decorator="['receiveop', { rules: [{ required: true, message: '请输入接收方操作!' }] }]"
/>
<a-input placeholder="请输入接收方操作" v-decorator="['receiveop']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="接收方销售" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入接收方销售"
v-decorator="['receivesale', { rules: [{ required: true, message: '请输入接收方销售!' }] }]"
/>
<a-input placeholder="请输入接收方销售" v-decorator="['receivesale']" />
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-item label="接收方部门" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入接收方部门"
v-decorator="['receivedept', { rules: [{ required: true, message: '请输入接收方部门!' }] }]"
/>
<a-input placeholder="请输入接收方部门" v-decorator="['receivedept']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="发送人电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入发送人电话"
v-decorator="['shippertel', { rules: [{ required: true, message: '请输入发送人电话!' }] }]"
/>
<a-input placeholder="请输入发送人电话" v-decorator="['shippertel']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="收货人电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入收货人电话"
v-decorator="['consigneetel', { rules: [{ required: true, message: '请输入收货人电话!' }] }]"
/>
<a-input placeholder="请输入收货人电话" v-decorator="['consigneetel']" />
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-item label="通知人电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入通知人电话"
v-decorator="['notifypartytel', { rules: [{ required: true, message: '请输入通知人电话!' }] }]"
/>
<a-input placeholder="请输入通知人电话" v-decorator="['notifypartytel']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="租户名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请输入租户名称"
v-decorator="['tenantName', { rules: [{ required: true, message: '请输入租户名称!' }] }]"
>
<a-select-option v-for="item in SysTenantData" :key="item.id" :value="item.name">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
@ -161,9 +140,11 @@
<script>
import { DjyEdiSettingAdd } from '@/api/modular/main/EDIParameterSettingService'
import { sysDictDataPage } from '@/api/modular/system/dictDataManage'
import { SysTenantPage } from '@/api/modular/main/bookingprinttemplate'
export default {
data() {
return {
SysTenantData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
@ -183,6 +164,9 @@ export default {
sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '346564507062341' }).then(res => {
this.EdiNameData = res.data.rows
})
SysTenantPage().then(res => {
this.SysTenantData = res.data.rows
})
},
methods: {
//
@ -222,6 +206,12 @@ export default {
values[key] = JSON.stringify(values[key])
}
}
this.SysTenantData.forEach(item => {
console.log(item)
if (values.tenantName == item.name) {
values.tenantId = item.id
}
})
DjyEdiSettingAdd(values)
.then(res => {
if (res.success) {

@ -58,98 +58,77 @@
</a-col>
<a-col :span="8">
<a-form-item label="发送方名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入发送方名称"
v-decorator="['sendname', { rules: [{ required: true, message: '请输入发送方名称!' }] }]"
/>
<a-input placeholder="请输入发送方名称" v-decorator="['sendname']" />
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-item label="发送方联系人" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入发送方联系人"
v-decorator="['sendattn', { rules: [{ required: true, message: '请输入发送方联系人!' }] }]"
/>
<a-input placeholder="请输入发送方联系人" v-decorator="['sendattn']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="发送方电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入发送方电话"
v-decorator="['sendtel', { rules: [{ required: true, message: '请输入发送方电话!' }] }]"
/>
<a-input placeholder="请输入发送方电话" v-decorator="['sendtel']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="发送方邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入发送方邮箱"
v-decorator="['sendemail', { rules: [{ required: true, message: '请输入发送方邮箱!' }] }]"
/>
<a-input placeholder="请输入发送方邮箱" v-decorator="['sendemail']" />
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-item label="接收方邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入接收方邮箱"
v-decorator="['receiveemail', { rules: [{ required: true, message: '请输入接收方邮箱!' }] }]"
/>
<a-input placeholder="请输入接收方邮箱" v-decorator="['receiveemail']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="接收方操作" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入接收方操作"
v-decorator="['receiveop', { rules: [{ required: true, message: '请输入接收方操作!' }] }]"
/>
<a-input placeholder="请输入接收方操作" v-decorator="['receiveop']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="接收方销售" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入接收方销售"
v-decorator="['receivesale', { rules: [{ required: true, message: '请输入接收方销售!' }] }]"
/>
<a-input placeholder="请输入接收方销售" v-decorator="['receivesale']" />
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-item label="接收方部门" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入接收方部门"
v-decorator="['receivedept', { rules: [{ required: true, message: '请输入接收方部门!' }] }]"
/>
<a-input placeholder="请输入接收方部门" v-decorator="['receivedept']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="发送人电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入发送人电话"
v-decorator="['shippertel', { rules: [{ required: true, message: '请输入发送人电话!' }] }]"
/>
<a-input placeholder="请输入发送人电话" v-decorator="['shippertel']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="收货人电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入收货人电话"
v-decorator="['consigneetel', { rules: [{ required: true, message: '请输入收货人电话!' }] }]"
/>
<a-input placeholder="请输入收货人电话" v-decorator="['consigneetel']" />
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-item label="通知人电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入通知人电话"
v-decorator="['notifypartytel', { rules: [{ required: true, message: '请输入通知人电话!' }] }]"
/>
<a-input placeholder="请输入通知人电话" v-decorator="['notifypartytel']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="租户名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请选择租户名称"
v-decorator="['tenantName', { rules: [{ required: true, message: '请选择租户名称!' }] }]"
>
<a-select-option v-for="item in SysTenantData" :key="item.id" :value="item.name">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
@ -161,9 +140,11 @@
<script>
import { DjyEdiSettingEdit } from '@/api/modular/main/EDIParameterSettingService'
import { sysDictDataPage } from '@/api/modular/system/dictDataManage'
import { SysTenantPage } from '@/api/modular/main/bookingprinttemplate'
export default {
data() {
return {
SysTenantData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
@ -184,6 +165,9 @@ export default {
sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '346564507062341' }).then(res => {
this.EdiNameData = res.data.rows
})
SysTenantPage().then(res => {
this.SysTenantData = res.data.rows
})
},
methods: {
//
@ -209,7 +193,8 @@ export default {
receivedept: record.receivedept,
shippertel: record.shippertel,
consigneetel: record.consigneetel,
notifypartytel: record.notifypartytel
notifypartytel: record.notifypartytel,
tenantName: record.tenantName
})
console.log(this.form.getFieldsValue())
}, 100)
@ -228,6 +213,12 @@ export default {
values[key] = JSON.stringify(values[key])
}
}
this.SysTenantData.forEach(item => {
console.log(item)
if (values.tenantName == item.name) {
values.tenantId = item.id
}
})
// console.log(this.form, values.id)
let data = { ...values, id: this.data.id }
DjyEdiSettingEdit(data)

@ -10,9 +10,27 @@
<a-row :gutter="48">
<a-col :md="18">
<a-row :gutter="48">
<a-col :md="8" :sm="24" v-for="item in ColumnsQuery" :key="`${item.dataIndex}1`">
<a-form-item :label="item.title">
<a-input v-model="queryParam[item.dataIndex]" allow-clear :placeholder="`请输入${item.title}`" />
<a-col
:md="8"
:sm="24"
v-for="item in ColumnsQuery"
:key="`${item.dataIndex}1`"
v-if="item.title == 'EDI类型' || item.title == '租户'"
>
<a-form-item :label="item.title" v-if="item.title == 'EDI类型'">
<a-select v-model="queryParam[item.dataIndex]" allow-clear :placeholder="`请选择${item.title}`">
<a-select-option v-for="item in EdiNameData" :key="item.id" :value="item.code">{{
item.value
}}</a-select-option>
</a-select>
</a-form-item>
<a-form-item :label="item.title" v-if="item.title == '租户'">
<a-select v-model="queryParam[item.dataIndex]" allow-clear :placeholder="`请选择${item.title}`">
<a-select-option v-for="item in SysTenantData" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
<!-- <a-input v-model="queryParam[item.dataIndex]" allow-clear :placeholder="`请输入${item.title}`" /> -->
</a-form-item>
</a-col>
</a-row>
@ -49,8 +67,10 @@
:title="item.title"
:align="item.align"
>
<template #default="{ row }" v-if="item.title == 'EDI类型'">
<span>{{ FnREdiName(row.edicode) }}</span>
<template #default="{ row }">
<span v-if="item.title == 'EDI类型'">{{ FnREdiName(row[item.dataIndex]) }}</span>
<span v-else-if="item.title == ''">{{ FnRName(row[item.dataIndex]) }}</span>
<span v-else>{{ row[item.dataIndex] }}</span>
</template>
</vxe-column>
<vxe-column title="操作" fixed="right" width="200" align="center">
@ -88,6 +108,7 @@
<script>
import { DjyEdiSettingPage, DjyEdiSettingDelete } from '@/api/modular/main/EDIParameterSettingService'
import { sysDictDataPage } from '@/api/modular/system/dictDataManage'
import { SysTenantPage } from '@/api/modular/main/bookingprinttemplate'
import addForm from './addForm.vue'
import editForm from './editForm.vue'
import columnSetting from '@/components/tableColumnSetting'
@ -99,6 +120,7 @@ export default {
},
data() {
return {
SysTenantData: [],
// /
advanced: false,
loading: false,
@ -206,6 +228,12 @@ export default {
align: 'center',
width: '100',
dataIndex: 'notifypartytel'
},
{
title: '租户',
align: 'center',
width: '100',
dataIndex: 'tenantId'
}
],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
@ -217,6 +245,10 @@ export default {
created() {},
mounted() {
this.init()
SysTenantPage().then(res => {
console.log(res.data)
this.SysTenantData = res.data.rows
})
sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '346564507062341' }).then(res => {
this.EdiNameData = res.data.rows
})
@ -231,6 +263,15 @@ export default {
})
return data
},
FnRName(code) {
let data = ''
this.SysTenantData.forEach(item => {
if (item.id == code) {
data = `${item.name}`
}
})
return data
},
toggleAdvanced() {
this.advanced = !this.advanced
},

Loading…
Cancel
Save