|
|
@ -0,0 +1,245 @@
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
|
|
<a-modal
|
|
|
|
|
|
|
|
title="编辑EDI参数设置"
|
|
|
|
|
|
|
|
:width="1100"
|
|
|
|
|
|
|
|
:visible="visible"
|
|
|
|
|
|
|
|
:confirmLoading="confirmLoading"
|
|
|
|
|
|
|
|
@ok="handleSubmit"
|
|
|
|
|
|
|
|
@cancel="handleCancel"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<a-spin :spinning="confirmLoading">
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
</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="['username', { 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="['password', { 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="['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-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: '请输入通知人电话!' }] }]"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
</a-row>
|
|
|
|
|
|
|
|
</a-form>
|
|
|
|
|
|
|
|
</a-spin>
|
|
|
|
|
|
|
|
</a-modal>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
import { DjyEdiSettingEdit } from '@/api/modular/main/EDIParameterSettingService'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
labelCol: {
|
|
|
|
|
|
|
|
xs: { span: 24 },
|
|
|
|
|
|
|
|
sm: { span: 7 }
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
wrapperCol: {
|
|
|
|
|
|
|
|
xs: { span: 24 },
|
|
|
|
|
|
|
|
sm: { span: 15 }
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
typeData: [],
|
|
|
|
|
|
|
|
visible: false,
|
|
|
|
|
|
|
|
confirmLoading: false,
|
|
|
|
|
|
|
|
form: this.$form.createForm(this)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
// 初始化方法
|
|
|
|
|
|
|
|
edit(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,
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
console.log(this.form.getFieldsValue())
|
|
|
|
|
|
|
|
}, 100)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleSubmit() {
|
|
|
|
|
|
|
|
const {
|
|
|
|
|
|
|
|
form: { validateFields }
|
|
|
|
|
|
|
|
} = 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)
|
|
|
|
|
|
|
|
DjyEdiSettingEdit(values)
|
|
|
|
|
|
|
|
.then(res => {
|
|
|
|
|
|
|
|
if (res.success) {
|
|
|
|
|
|
|
|
this.$message.success('编辑成功')
|
|
|
|
|
|
|
|
this.confirmLoading = false
|
|
|
|
|
|
|
|
this.$emit('ok', values)
|
|
|
|
|
|
|
|
this.handleCancel()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error('编辑失败') // + res.message
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.finally(res => {
|
|
|
|
|
|
|
|
this.confirmLoading = false
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.confirmLoading = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleCancel() {
|
|
|
|
|
|
|
|
this.form.resetFields()
|
|
|
|
|
|
|
|
this.visible = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|