网站账号

dev
张同海 2 years ago
parent d6b83674e0
commit 1ccdc1a0b2

@ -0,0 +1,53 @@
import { axios } from '@/utils/request'
/**
* 分页查询网站账号维护
*
* @author Myshipping
*/
export function DjyWebsiteAccountConfigPage(parameter) {
return axios({
url: '/DjyWebsiteAccountConfig/page',
method: 'get',
params: parameter
})
}
/**
* 增加网站账号维护同一用户同类型账号不会重复插入
*
* @author Myshipping
*/
export function DjyWebsiteAccountConfigAdd(parameter) {
return axios({
url: '/DjyWebsiteAccountConfig/add',
method: 'post',
data: parameter
})
}
/**
* 更新EDI参数设置
*
* @author Myshipping
*/
export function DjyWebsiteAccountConfigEdit(parameter) {
return axios({
url: '/DjyWebsiteAccountConfig/edit',
method: 'post',
data: parameter
})
}
/**
* 删除EDI参数设置
*
* @author Myshipping
*/
export function DjyWebsiteAccountConfigDelete(parameter) {
return axios({
url: '/DjyWebsiteAccountConfig/delete',
method: 'post',
data: parameter
})
}

@ -13,7 +13,7 @@
<a-col :span="8">
<a-form-item label="类型名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请输入类型名称"
placeholder="请选择类型名称"
v-decorator="['typeCode', { rules: [{ required: true, message: '请输入类型名称!' }] }]"
>
<a-select-option v-for="item in TypeData" :key="item.code" :value="item.code">

@ -1,6 +1,6 @@
<template>
<a-modal
title="新增EDI参数设置"
title="新增账号"
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ -11,36 +11,26 @@
<a-form :form="form">
<a-row>
<a-col :span="8">
<a-form-item label="EDI类型名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入EDI类型名称"
v-decorator="['ediname', { rules: [{ required: true, message: '请输入EDI类型名称' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="服务器IP" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入服务器IP"
v-decorator="['serverip', { rules: [{ required: true, message: '请输入服务器IP' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="文件夹" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入文件夹"
v-decorator="['foldername', { rules: [{ required: true, message: '请输入文件夹!' }] }]"
/>
<a-form-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<!-- <a-input
placeholder="请选择类型"
v-decorator="['typeCode', { rules: [{ required: true, message: '请输入EDI类型名称' }] }]"
/> -->
<a-select
placeholder="请选择类型"
v-decorator="['typeCode', { rules: [{ required: true, message: '请选择类型!' }] }]"
>
<a-select-option v-for="item in TypeData" :key="item.code" :value="item.code">
{{ item.value }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
<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-input
placeholder="请输入用户名"
v-decorator="['username', { rules: [{ required: true, message: '请输入用户名' }] }]"
placeholder="请输入账号"
v-decorator="['account', { rules: [{ required: true, message: '请输入账号!' }] }]"
/>
</a-form-item>
</a-col>
@ -52,99 +42,11 @@
/>
</a-form-item>
</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-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-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-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="发送方邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-col :span="19">
<a-form-item label="备注" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input
placeholder="请输入发送方邮箱"
v-decorator="['sendemail', { rules: [{ required: true, message: '请输入发送方邮箱!' }] }]"
/>
</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-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-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-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-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-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-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: '请输入通知人电话!' }] }]"
placeholder="请输入备注"
v-decorator="['remark', { rules: [{ required: true, message: '请输入备注!' }] }]"
/>
</a-form-item>
</a-col>
@ -155,11 +57,12 @@
</template>
<script>
import { DjyEdiSettingAdd } from '@/api/modular/main/EDIParameterSettingService'
import { DjyWebsiteAccountConfigAdd } from '@/api/modular/main/WebSiteaccount'
import { sysDictDataPage } from '@/api/modular/system/dictDataManage'
export default {
data() {
return {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
@ -168,12 +71,26 @@ export default {
xs: { span: 24 },
sm: { span: 15 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 3 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 21 }
},
typeData: [],
visible: false,
confirmLoading: false,
form: this.$form.createForm(this)
}
},
mounted() {
sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '349716496130117' }).then(res => {
this.TypeData = res.data.rows
console.log(this.TypeData)
})
},
methods: {
//
add(record) {
@ -212,7 +129,7 @@ export default {
values[key] = JSON.stringify(values[key])
}
}
DjyEdiSettingAdd(values)
DjyWebsiteAccountConfigAdd(values)
.then(res => {
if (res.success) {
this.$message.success('新增成功')

@ -11,36 +11,22 @@
<a-form :form="form">
<a-row>
<a-col :span="8">
<a-form-item label="EDI类型名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入EDI类型名称"
v-decorator="['ediname', { rules: [{ required: true, message: '请输入EDI类型名称' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="服务器IP" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入服务器IP"
v-decorator="['serverip', { rules: [{ required: true, message: '请输入服务器IP' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="文件夹" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入文件夹"
v-decorator="['foldername', { rules: [{ required: true, message: '请输入文件夹!' }] }]"
/>
<a-form-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请选择类型"
v-decorator="['typeCode', { rules: [{ required: true, message: '请选择类型!' }] }]"
>
<a-select-option v-for="item in TypeData" :key="item.code" :value="item.code">
{{ item.value }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
<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-input
placeholder="请输入用户名"
v-decorator="['username', { rules: [{ required: true, message: '请输入用户名' }] }]"
placeholder="请输入账号"
v-decorator="['account', { rules: [{ required: true, message: '请输入账号!' }] }]"
/>
</a-form-item>
</a-col>
@ -52,99 +38,11 @@
/>
</a-form-item>
</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-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-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-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-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-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-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="接收方销售" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-col :span="19">
<a-form-item label="备注" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input
placeholder="请输入接收方销售"
v-decorator="['receivesale', { rules: [{ required: true, message: '请输入接收方销售!' }] }]"
/>
</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-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-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-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: '请输入通知人电话!' }] }]"
placeholder="请输入备注"
v-decorator="['remark', { rules: [{ required: true, message: '请输入备注!' }] }]"
/>
</a-form-item>
</a-col>
@ -155,10 +53,12 @@
</template>
<script>
import { DjyEdiSettingEdit } from '@/api/modular/main/EDIParameterSettingService'
import { DjyWebsiteAccountConfigEdit } from '@/api/modular/main/WebSiteaccount'
import { sysDictDataPage } from '@/api/modular/system/dictDataManage'
export default {
data() {
return {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
@ -167,37 +67,41 @@ export default {
xs: { span: 24 },
sm: { span: 15 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 3 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 21 }
},
typeData: [],
visible: false,
confirmLoading: false,
form: this.$form.createForm(this)
form: this.$form.createForm(this),
data: {}
}
},
mounted() {
sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '349716496130117' }).then(res => {
this.TypeData = res.data.rows
console.log(this.TypeData)
})
},
methods: {
//
edit(record) {
this.data = record
console.log(record)
this.visible = true
const typeOption = this.$options
this.typeData = typeOption.filters['dictData']('edi_type')
setTimeout(() => {
this.form.setFieldsValue({
ediname: record.ediname,
serverip: record.serverip,
foldername: record.foldername,
username: record.username,
typeCode: record.typeCode,
account: record.account,
password: record.password,
sendname: record.sendname,
sendattn: record.sendattn,
sendtel: record.sendtel,
sendemail: record.sendemail,
receiveemail: record.receiveemail,
receiveop: record.receiveop,
receivesale: record.receivesale,
receivedept: record.receivedept,
shippertel: record.shippertel,
consigneetel: record.consigneetel,
notifypartytel: record.notifypartytel
remark: record.remark
})
console.log(this.form.getFieldsValue())
}, 100)
@ -217,7 +121,9 @@ export default {
}
}
console.log(this.form, values.id)
DjyEdiSettingEdit(values)
values.id = this.data.id
console.log(values)
DjyWebsiteAccountConfigEdit(values)
.then(res => {
if (res.success) {
this.$message.success('编辑成功')

@ -35,7 +35,7 @@
<vxe-toolbar>
<template #buttons>
<a-button type="primary" icon="plus" @click="$refs.addForm.add()">
新增EDI参数
新增账号
</a-button>
</template>
</vxe-toolbar>
@ -48,7 +48,11 @@
:min-width="item.width"
:title="item.title"
:align="item.align"
></vxe-column>
>
<template #default="{ row }" v-if="item.title == '类型'">
<span>{{ FnTurnD(row.typeCode) }}</span>
</template>
</vxe-column>
<vxe-column title="操作" fixed="right" width="200" align="center">
<template #default="{ row }">
<vxe-button type="text" @click="$refs.editForm.edit(row)"></vxe-button>
@ -82,7 +86,8 @@
</div>
</template>
<script>
import { DjyEdiSettingPage, DjyEdiSettingDelete } from '@/api/modular/main/EDIParameterSettingService'
import { DjyWebsiteAccountConfigPage, DjyWebsiteAccountConfigDelete } from '@/api/modular/main/WebSiteaccount'
import { sysDictDataPage } from '@/api/modular/system/dictDataManage'
import addForm from './addForm.vue'
import editForm from './editForm.vue'
import columnSetting from '@/components/tableColumnSetting'
@ -94,6 +99,7 @@ export default {
},
data() {
return {
TypeData: [],
// /
advanced: false,
loading: false,
@ -107,100 +113,28 @@ export default {
ColumnsQuery: [],
columns: [
{
title: 'EDI类型名称',
title: '类型',
align: 'center',
width: '100',
dataIndex: 'ediname'
},
{
title: '服务器IP',
align: 'center',
width: '80',
dataIndex: 'serverip'
},
{
title: '文件夹',
align: 'center',
width: '80',
dataIndex: 'foldername'
dataIndex: 'typeCode'
},
{
title: '用户名',
title: '账号',
align: 'center',
width: '80',
dataIndex: 'username'
dataIndex: 'account'
},
{
title: '密码',
align: 'center',
width: '100',
width: '80',
dataIndex: 'password'
},
{
title: '发送方名称',
align: 'center',
width: '100',
dataIndex: 'sendname'
},
{
title: '发送方联系人',
align: 'center',
width: '120',
dataIndex: 'sendattn'
},
{
title: '发送方电话',
align: 'center',
width: '100',
dataIndex: 'sendtel'
},
{
title: '发送方邮箱',
align: 'center',
width: '100',
dataIndex: 'sendemail'
},
{
title: '接收方邮箱',
align: 'center',
width: '100',
dataIndex: 'receiveemail'
},
{
title: '接收方操作',
align: 'center',
width: '100',
dataIndex: 'receiveop'
},
{
title: '接收方销售',
align: 'center',
width: '100',
dataIndex: 'receivesale'
},
{
title: '接收方部门',
align: 'center',
width: '100',
dataIndex: 'receivedept'
},
{
title: '发送人电话',
align: 'center',
width: '100',
dataIndex: 'shippertel'
},
{
title: '收货人电话',
align: 'center',
width: '100',
dataIndex: 'consigneetel'
},
{
title: '通知人电话',
title: '备注',
align: 'center',
width: '100',
dataIndex: 'notifypartytel'
width: '80',
dataIndex: 'remark'
}
],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
@ -211,8 +145,21 @@ export default {
created() {},
mounted() {
this.init()
sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '349716496130117' }).then(res => {
this.TypeData = res.data.rows
console.log(this.TypeData)
})
},
methods: {
FnTurnD(data) {
let Rdata = ''
this.TypeData.forEach(item => {
if (item.code == data) {
Rdata = item.value
}
})
return Rdata
},
toggleAdvanced() {
this.advanced = !this.advanced
},
@ -228,7 +175,7 @@ export default {
},
FnGetData() {
this.loading = true
DjyEdiSettingPage(this.queryParam).then(res => {
DjyWebsiteAccountConfigPage(this.queryParam).then(res => {
this.loadData = res.data.rows
this.loading = false
this.queryParam.currentPage = res.data.pageNo
@ -244,10 +191,10 @@ export default {
return obj
},
confirm(e, data) {
this.DjyEdiSettingDelete(data)
this.DjyWebsiteAccountConfigDelete(data)
},
DjyEdiSettingDelete(record) {
DjyEdiSettingDelete(record).then(res => {
DjyWebsiteAccountConfigDelete(record) {
DjyWebsiteAccountConfigDelete(record).then(res => {
if (res.success) {
this.$message.success('删除成功')
this.FnGetData()

Loading…
Cancel
Save