添加 租户

dev
张同海 2 years ago
parent e4d0b15fdc
commit af6cb29ac1

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

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

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

Loading…
Cancel
Save