lilu 2 years ago
commit 00dfe31e4a

@ -0,0 +1,27 @@
import { axios } from '@/utils/request'
/**
* 获取签单方式信息
*
* @author Myshipping
*/
export function CommondbList(parameter) {
return axios({
url: '/commondb/codeissuetypelist',
method: 'get',
params: parameter
})
}
/**
* 新增签单方式
*
* @author Myshipping
*/
export function CommondbAdd(parameter) {
return axios({
url: '/commondb/addcodeissuetype',
method: 'post',
data: parameter
})
}

@ -0,0 +1,27 @@
import { axios } from '@/utils/request'
/**
* 获取箱型信息
*
* @author Myshipping
*/
export function CommondbList(parameter) {
return axios({
url: '/commondb/ctn',
method: 'get',
params: parameter
})
}
/**
* 新增箱型
*
* @author Myshipping
*/
export function CommondbAdd(parameter) {
return axios({
url: '/commondb/addctn',
method: 'post',
data: parameter
})
}

@ -1,45 +1,78 @@
<template>
<a-modal title="编辑数据列" :width="900" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
@cancel="handleCancel">
<a-modal
title="编辑数据列"
:width="900"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-divider orientation="left">数据列信息</a-divider>
<a-form :form="form">
<a-form-item label="列名" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入列名" v-decorator="['dbColumnName', { rules: [{ required: true, message: '' }] }]" />
<a-input
placeholder="请输入列名"
v-decorator="['dbColumnName', { rules: [{ required: true, message: '请输入列名!' }] }]"
/>
</a-form-item>
<a-form-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入描述" style="width: 100%"
v-decorator="['columnDescription', { rules: [{ required: true, message: '请输入描述!' }] }]" />
<a-input placeholder="请输入描述" style="width: 100%" v-decorator="['columnDescription']" />
</a-form-item>
<a-form-item label="主键" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select v-decorator="['isPrimarykey', { rules: [{ required: true, message: '' }] }]"
key="isPrimarykey" style="width: 100%" placeholder="请选择" has-feedback
@change="e => primarykeyHandleChange(e)">
<a-select-option v-for="(item, index) in selectData" :key="index" :value="item.value">{{ item.text }}
<a-select
v-decorator="['isPrimarykey', { rules: [{ required: true, message: '请选择是否为主键' }] }]"
key="isPrimarykey"
style="width: 100%"
placeholder="请选择"
has-feedback
@change="e => primarykeyHandleChange(e)"
>
<a-select-option v-for="(item, index) in selectData" :key="index" :value="item.value"
>{{ item.text }}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="自增" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select :disabled="enabledIsIdentity"
v-decorator="['isIdentity', { rules: [{ required: true, message: '请选择是否自增' }] }]" key="isIdentity"
style="width: 100%" placeholder="请选择" has-feedback>
<a-select-option v-for="(item, index) in selectData" :key="index" :value="item.value">{{ item.text }}
<a-select
:disabled="enabledIsIdentity"
v-decorator="['isIdentity', { rules: [{ required: true, message: '请选择是否自增' }] }]"
key="isIdentity"
style="width: 100%"
placeholder="请选择"
has-feedback
>
<a-select-option v-for="(item, index) in selectData" :key="index" :value="item.value"
>{{ item.text }}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="可空" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select :disabled="enabledIsNullabled"
v-decorator="['isNullable', { rules: [{ required: true, message: '请选择是否可空' }] }]" key="isNullable"
style="width: 100%" placeholder="请选择" has-feedback>
<a-select-option v-for="(item, index) in selectData" :key="index" :value="item.value">{{ item.text }}
<a-select
:disabled="enabledIsNullabled"
v-decorator="['isNullable', { rules: [{ required: true, message: '请选择是否可空' }] }]"
key="isNullable"
style="width: 100%"
placeholder="请选择"
has-feedback
>
<a-select-option v-for="(item, index) in selectData" :key="index" :value="item.value"
>{{ item.text }}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select v-decorator="['dataType', { rules: [{ required: true, message: '' }] }]" key="dataType"
style="width: 100%" placeholder="请选择" has-feedback @change="e => dataTypeHandleChange(e)">
<a-select
v-decorator="['dataType', { rules: [{ required: true, message: '请选择类型' }] }]"
key="dataType"
style="width: 100%"
placeholder="请选择"
has-feedback
@change="e => dataTypeHandleChange(e)"
>
<a-select-option v-for="(item, index) in dataTypeSelectData" :key="index" :value="item.value">
{{ item.value }}</a-select-option>
{{ item.value }}</a-select-option
>
</a-select>
</a-form-item>
<a-form-item label="长度" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
@ -54,9 +87,7 @@
</template>
<script>
import {
columnAdd
} from '@/api/modular/gen/databaseManage'
import { columnAdd } from '@/api/modular/gen/databaseManage'
export default {
data() {
return {
@ -79,7 +110,8 @@ export default {
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
dataTypeSelectData: [{
dataTypeSelectData: [
{
value: 'text',
hasLength: false,
hasDecimalDigits: false
@ -88,7 +120,8 @@ export default {
value: 'varchar',
hasLength: true,
hasDecimalDigits: false
}, {
},
{
value: 'nvarchar',
hasLength: true,
hasDecimalDigits: false
@ -97,51 +130,63 @@ export default {
value: 'char',
hasLength: true,
hasDecimalDigits: false
}, {
},
{
value: 'nchar',
hasLength: true,
hasDecimalDigits: false
}, {
},
{
value: 'timestamp',
hasLength: false,
hasDecimalDigits: false
}, {
},
{
value: 'int',
hasLength: false,
hasDecimalDigits: false
}, {
},
{
value: 'smallint',
hasLength: false,
hasDecimalDigits: false
}, {
},
{
value: 'tinyint',
hasLength: false,
hasDecimalDigits: false
}, {
},
{
value: 'bigint',
hasLength: false,
hasDecimalDigits: false
}, {
},
{
value: 'bit',
hasLength: false,
hasDecimalDigits: false
}, {
},
{
value: 'decimal',
hasLength: true,
hasDecimalDigits: true
}, {
},
{
value: 'datetime',
hasLength: false,
hasDecimalDigits: false
},
}
],
selectData: [{
selectData: [
{
text: '是',
value: 1
}, {
},
{
text: '否',
value: 0
}],
}
],
hasLength: true,
hasDecimalDigits: true,
enabledIsNullabled: false,
@ -152,71 +197,70 @@ export default {
{ required: this.lengthIsRequire, message: '请输入字段长度' },
{
validator: (rule, value, cbfn) => {
const form = this.form;
let dataType = form.getFieldValue('dataType');
const form = this.form
let dataType = form.getFieldValue('dataType')
if ((dataType == 'varchar' || dataType == 'nvarchar') && !value) {
cbfn('请输入长度');
return false;
cbfn('请输入长度')
return false
}
if ((dataType=="varchar" || dataType=="nvarchar") && value<=0) {
if ((dataType == 'varchar' || dataType == 'nvarchar') && value <= 0) {
cbfn('长度不能小于0')
}
cbfn()
},
},
}
}
]
}
}
},
methods: {
dataTypeHandleChange(value) {
let type = this.dataTypeSelectData.find(item => item.value == value);
let type = this.dataTypeSelectData.find(item => item.value == value)
if (type) {
this.hasLength = type.hasLength
this.hasDecimalDigits = type.hasDecimalDigits
if (!this.hasLength) {
this.form.setFieldsValue({
length: 0
});
})
}
if (!this.hasDecimalDigits) {
this.form.setFieldsValue({
decimalDigits: 0
});
})
}
}
},
primarykeyHandleChange(value) {
if (value == 1) {
this.enabledIsNullabled = true;
this.enabledIsIdentity = false;
this.enabledIsNullabled = true
this.enabledIsIdentity = false
this.form.setFieldsValue({
isNullable: 0
});
})
} else {
this.enabledIsNullabled = false;
this.enabledIsIdentity = true;
this.enabledIsNullabled = false
this.enabledIsIdentity = true
this.form.setFieldsValue({
isIdentity: 0
});
})
}
},
//
add(tableName) {
this.tableName = tableName;
this.tableName = tableName
this.visible = true
},
handleSubmit() {
const {
form: {
validateFields
}
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
if (!errors) {
values["tableName"] = this.tableName;
columnAdd(values).then((res) => {
values['tableName'] = this.tableName
columnAdd(values)
.then(res => {
if (res.success) {
this.$message.success('新增成功')
this.confirmLoading = false
@ -225,7 +269,8 @@ export default {
} else {
this.$message.error('新增失败') // + res.message
}
}).finally((res) => {
})
.finally(res => {
this.confirmLoading = false
})
} else {

@ -257,8 +257,14 @@
has-feedback
>
<div class="box-flex">
<a-input style="width:1000px !important; text-align: left;" :allowClear="true" v-model="initCabinFrom.orderUrl.urlVgm" />
<span style="margin-left:7px;"><i class="iconfont icon-fuzhi2"><!--复制--></i></span>
<a-input
style="width:1000px !important; text-align: left;"
:allowClear="true"
v-model="initCabinFrom.orderUrl.urlVgm"
/>
<span style="margin-left:7px;"
><i class="iconfont icon-fuzhi2"><!--复制--></i></span
>
</div>
</a-form-item>
</a-col>
@ -384,7 +390,11 @@
has-feedback
>
<div class="box-flex">
<a-input style="width:1000px !important; text-align: left;" :allowClear="true" v-model="initCabinFrom.remark" />
<a-input
style="width:1000px !important; text-align: left;"
:allowClear="true"
v-model="initCabinFrom.remark"
/>
</div>
</a-form-item>
</a-col>
@ -400,12 +410,7 @@
<template slot="footer">
<a-button @click="saveModel" :loading="SaveLoading">保存</a-button>
<a-button type="primary" @click="sendModel" :loading="SendLoading">发送</a-button>
<a-button
type="primary"
@click="removeModel"
:loading="DelLoading"
v-if="['initCabin'].includes(modelType)"
>
<a-button type="primary" @click="removeModel" :loading="DelLoading" v-if="['initCabin'].includes(modelType)">
删除
</a-button>
</template>
@ -430,7 +435,7 @@
<a-row class="PrintMainBox">
<a-col
v-for="(item, index) in templateType"
:key="item.id"
:key="item.typeCode"
@click="FnCilckTemplateType(item.typeCode)"
class="items"
:span="11"
@ -603,6 +608,7 @@ export default {
this.BCvData = [...this.CvData]
// this.templateType = this.$options.filters['dictData']('booking_template_type')
BookingOrderPrintTemplateList().then(res => {
console.log(res.data)
this.templateType = res.data
})
// if (this.id) {
@ -647,14 +653,14 @@ export default {
ctx.beginPath()
//线
ctx.strokeStyle = '#00ff00'
ctx.strokeStyle = '#e1271d'
// 线
ctx.lineWidth = 1
this.width = e.offsetX - x
this.height = e.offsetY - y
this.Bx = e.offsetX
this.By = e.offsetY
ctx.strokeRect(x, y, e.offsetX + 12 - x, e.offsetY + 12 - y)
ctx.strokeRect(x, y, e.offsetX + 5 - x, e.offsetY + 5 - y)
}
},
mousemove(e) {
@ -663,16 +669,20 @@ export default {
}
},
mousedown(e) {
this.$refs.myCanvas.getContext('2d').clearRect(0, 0, this.$refs.myCanvas.width, this.$refs.myCanvas.height)
if (this.imgSrc) {
this.flag = true
this.x = e.offsetX + 12 // X
this.y = e.offsetY + 12 // Y
this.x = e.offsetX + 5 // X
this.y = e.offsetY + 5 // Y
this.CvBoxType = false
this.width = 0
this.height = 0
}
},
mouseup() {
if (this.flag && this.imgSrc) {
// console.log(this.width, this.flag, this.imgSrc)
this.flag = false
if (this.imgSrc && this.width != 0 && this.height != 0) {
BookingOrderOcrGetText({
fileName: this.fileName,
x: this.x,
@ -835,7 +845,8 @@ export default {
}
},
sendBookingOrEDI(type) {
SendBookingOrClosingEDI(this.bookingModelFrom).then(res => {
SendBookingOrClosingEDI(this.bookingModelFrom)
.then(res => {
//
if (res.success) {
this.$message.success('发送成功')
@ -845,13 +856,15 @@ export default {
}
this.EDISloading = false
this.EDIUloading = false
}).catch(() => {
})
.catch(() => {
this.EDISloading = false
this.EDIUloading = false
})
},
downloadBookingOrEDI(type) {
DownloadBookingOrClosingEDI(this.bookingModelFrom).then(res => {
DownloadBookingOrClosingEDI(this.bookingModelFrom)
.then(res => {
if (res.message) {
this.$message.error(res.message)
return false
@ -866,7 +879,8 @@ export default {
this.handleModelCancel()
this.EDISloading = false
this.EDIUloading = false
}).catch(() => {
})
.catch(() => {
this.EDISloading = false
this.EDIUloading = false
})
@ -1218,6 +1232,7 @@ export default {
border: 1px solid #f0f0f0;
box-shadow: 0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017;
padding: 0;
background: #ffffff;
li {
width: 100%;
text-align: center;
@ -1404,6 +1419,7 @@ export default {
}
}
.PrintMainBox {
width: 100%;
max-height: 50vh;
overflow-y: auto;
margin-top: 5px;

@ -104,12 +104,12 @@ export default {
width: '80',
dataIndex: 'cnName'
},
{
title: 'EDI代码',
align: 'center',
width: '80',
dataIndex: 'ediCode'
},
// {
// title: 'EDI',
// align: 'center',
// width: '80',
// dataIndex: 'ediCode'
// },
{
title: '描述',
align: 'center',

@ -52,10 +52,7 @@
</a-col>
<a-col :span="12">
<a-form-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入描述"
v-decorator="['description', { rules: [{ required: true, message: '请输入描述!' }] }]"
/>
<a-input placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
<a-col :span="12">

@ -58,11 +58,7 @@
</a-col>
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea
:autosize="{ minRows: 3 }"
placeholder="请输入描述"
v-decorator="['description', { rules: [{ required: true, message: '请输入描述!' }] }]"
/>
<a-textarea :autosize="{ minRows: 3 }" placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
</a-row>

@ -0,0 +1,134 @@
<template>
<a-modal
title="新增配置"
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="12">
<a-form-item label="代码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入代码"
v-decorator="['code', { rules: [{ required: true, message: '请输入代码!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入英文名称"
v-decorator="['enName', { rules: [{ required: true, message: '请输入英文名称!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入中文名称"
v-decorator="['cnName', { rules: [{ required: true, message: '请输入中文名称!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input-number placeholder="请输入排序" v-decorator="['sort']" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea :autosize="{ minRows: 3 }" placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { CommondbAdd } from '@/api/modular/main/CommondbCodeIssueType'
export default {
data() {
return {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 3 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 20 }
},
visible: false,
confirmLoading: false,
form: this.$form.createForm(this)
}
},
mounted() {},
methods: {
//
add(record) {
this.visible = true
},
/**
* 提交表单
*/
FnChangeCtnCategory(e) {
console.log(e)
},
handleSubmit() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
if (!errors) {
for (const key in values) {
if (typeof values[key] === 'object' && !(values[key] === null)) {
values[key] = JSON.stringify(values[key])
}
}
CommondbAdd(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>

@ -0,0 +1,147 @@
<template>
<a-modal
title="编辑配置"
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="12">
<a-form-item label="代码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入代码"
:disabled="true"
v-decorator="['code', { rules: [{ required: true, message: '请输入代码!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入英文名称"
v-decorator="['enName', { rules: [{ required: true, message: '请输入英文名称!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入中文名称"
v-decorator="['cnName', { rules: [{ required: true, message: '请输入中文名称!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input-number placeholder="请输入排序" v-decorator="['sort']" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea :autosize="{ minRows: 3 }" placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { CommondbAdd } from '@/api/modular/main/CommondbCodeIssueType'
export default {
data() {
return {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 3 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 20 }
},
visible: false,
confirmLoading: false,
form: this.$form.createForm(this)
}
},
mounted() {},
methods: {
//
edit(record) {
this.data = record
console.log(record)
this.visible = true
setTimeout(() => {
this.form.setFieldsValue({
code: record.code,
enName: record.enName,
cnName: record.cnName,
description: record.description,
sort: record.sort,
remark: record.remark
})
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.gid)
values.gid = this.data.gid
console.log(values)
CommondbAdd(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>

@ -0,0 +1,180 @@
<template>
<div>
<a-card :bordered="false" :bodyStyle="tstyle">
<div
class="table-page-search-wrapper"
v-if="hasPerm('BookingTemplate:page')"
:class="advanced ? 'Open' : 'Close'"
>
<a-form layout="inline">
<a-row :gutter="48">
<a-col :md="18">
<a-row :gutter="48">
<a-col :md="8" :sm="24">
<a-form-item label="关键字:">
<a-input v-model="queryParam.KeyWord" allow-clear placeholder="请输入关键字" />
</a-form-item>
</a-col>
</a-row>
</a-col>
<a-col :md="6" :sm="24">
<span class="table-page-search-submitButtons">
<a-button type="primary" @click="FnGetData"></a-button>
<a-button style="margin-left: 8px" @click="init"></a-button>
<!-- <a @click="toggleAdvanced" style="margin-left: 8px">
{{ advanced ? '收起' : '展开' }}
<a-icon :type="advanced ? 'up' : 'down'" />
</a> -->
</span>
</a-col>
</a-row>
</a-form>
</div>
</a-card>
<a-card :bordered="false">
<vxe-toolbar>
<template #buttons>
<a-button type="primary" icon="plus" @click="$refs.addForm.add()">
新增配置
</a-button>
</template>
</vxe-toolbar>
<vxe-table :data="loadData" border :loading="loading" height="600px" empty-text="">
<vxe-column type="seq" width="50" fixed="left"></vxe-column>
<vxe-column
v-for="item in columns"
:key="`${item.dataIndex}3`"
:field="item.dataIndex"
:min-width="item.width"
:title="item.title"
:align="item.align"
:show-overflow="true"
>
</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>
</template>
</vxe-column>
</vxe-table>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
</a-card>
</div>
</template>
<script>
import { CommondbList } from '@/api/modular/main/CommondbServiceList'
import addForm from './addForm.vue'
import editForm from './editForm.vue'
export default {
components: {
addForm,
editForm
},
data() {
return {
TypeData: [],
// /
advanced: false,
loading: false,
setVisible: false,
setVisible1: false,
queryParam: {
// currentPage: 1,
// pageSize: 10,
// totalResult: 1
},
ColumnsQuery: [],
columns: [
{
title: '代码',
align: 'center',
width: '80',
dataIndex: 'code'
},
{
title: '英文名称',
align: 'center',
width: '80',
dataIndex: 'enName'
},
{
title: '中文名称',
align: 'center',
width: '80',
dataIndex: 'cnName'
},
{
title: '备注',
align: 'center',
width: '80',
dataIndex: 'remark'
},
{
title: '描述',
align: 'center',
width: '80',
dataIndex: 'description'
},
{
title: '排序',
align: 'center',
width: '80',
dataIndex: 'sort'
}
],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
// Promise
loadData: [],
CodeData: [],
WCodeData: [],
ModulesData: [],
carrierCodeData: []
}
},
created() {},
mounted() {
this.init()
},
methods: {
toggleAdvanced() {
this.advanced = !this.advanced
},
init() {
Object.assign(this.$data, this.$options.data())
this.ColumnsQuery = this.columns
this.FnGetData()
},
FnGetData() {
this.loading = true
CommondbList(this.queryParam).then(res => {
if (res.code == 200) {
this.loadData = res.data
} else {
this.loadData = []
this.$message.warning(res.message)
}
this.loading = false
})
},
handleOk() {
this.FnGetData()
}
}
}
</script>
<style lang="less">
.table-operator {
margin-bottom: 18px;
}
button {
margin-right: 8px;
}
.Open {
}
.Close {
height: 45px;
overflow: hidden;
}
</style>

@ -44,11 +44,7 @@
</a-col>
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea
:autosize="{ minRows: 3 }"
placeholder="请输入描述"
v-decorator="['description', { rules: [{ required: true, message: '请输入描述!' }] }]"
/>
<a-textarea :autosize="{ minRows: 3 }" placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
</a-row>

@ -45,11 +45,7 @@
</a-col>
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea
:autosize="{ minRows: 3 }"
placeholder="请输入描述"
v-decorator="['description', { rules: [{ required: true, message: '请输入描述!' }] }]"
/>
<a-textarea :autosize="{ minRows: 3 }" placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
</a-row>

@ -118,7 +118,7 @@ export default {
dataIndex: 'remark'
},
{
title: 'EDI代码',
// title: 'EDI',
align: 'center',
width: '80',
dataIndex: 'ediCode'

@ -28,20 +28,13 @@
</a-col>
<a-col :span="12">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入备注"
v-decorator="['remark', { rules: [{ required: true, message: '请输入备注!' }] }]"
/>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea
:autosize="{ minRows: 3 }"
placeholder="请输入描述"
v-decorator="['description', { rules: [{ required: true, message: '请输入描述!' }] }]"
/>
<a-textarea :autosize="{ minRows: 3 }" placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
</a-row>

@ -29,20 +29,13 @@
</a-col>
<a-col :span="12">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入备注"
v-decorator="['remark', { rules: [{ required: true, message: '请输入备注!' }] }]"
/>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea
:autosize="{ minRows: 3 }"
placeholder="请输入描述"
v-decorator="['description', { rules: [{ required: true, message: '请输入描述!' }] }]"
/>
<a-textarea :autosize="{ minRows: 3 }" placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
</a-row>
@ -87,8 +80,8 @@ export default {
this.visible = true
setTimeout(() => {
this.form.setFieldsValue({
code: record.code,
name: record.name,
ediCode: record.ediCode,
description: record.description,
remark: record.remark
})

@ -51,11 +51,11 @@
:show-overflow="true"
>
</vxe-column>
<!-- <vxe-column title="操作" fixed="right" width="200" align="center">
<vxe-column title="操作" fixed="right" width="200" align="center">
<template #default="{ row }">
<vxe-button type="text" @click="$refs.editForm.edit(row)"></vxe-button>
</template>
</vxe-column> -->
</vxe-column>
</vxe-table>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />

@ -0,0 +1,130 @@
<template>
<a-modal
title="新增配置"
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="12">
<a-form-item label="代码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入代码"
v-decorator="['code', { rules: [{ required: true, message: '请输入代码!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入英文名称"
v-decorator="['enName', { rules: [{ required: true, message: '请输入英文名称!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入中文名称"
v-decorator="['cnName', { rules: [{ required: true, message: '请输入中文名称!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea :autosize="{ minRows: 3 }" placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { CommondbAdd } from '@/api/modular/main/CommondbFrt'
export default {
data() {
return {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 3 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 20 }
},
visible: false,
confirmLoading: false,
form: this.$form.createForm(this)
}
},
mounted() {},
methods: {
//
add(record) {
this.visible = true
},
/**
* 提交表单
*/
FnChangeCtnCategory(e) {
console.log(e)
},
handleSubmit() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
if (!errors) {
for (const key in values) {
if (typeof values[key] === 'object' && !(values[key] === null)) {
values[key] = JSON.stringify(values[key])
}
}
CommondbAdd(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>

@ -0,0 +1,142 @@
<template>
<a-modal
title="编辑配置"
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="12">
<a-form-item label="代码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入代码"
:disabled="true"
v-decorator="['code', { rules: [{ required: true, message: '请输入代码!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入英文名称"
v-decorator="['enName', { rules: [{ required: true, message: '请输入英文名称!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入中文名称"
v-decorator="['cnName', { rules: [{ required: true, message: '请输入中文名称!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea :autosize="{ minRows: 3 }" placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { CommondbAdd } from '@/api/modular/main/CommondbFrt'
export default {
data() {
return {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 3 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 20 }
},
visible: false,
confirmLoading: false,
form: this.$form.createForm(this)
}
},
mounted() {},
methods: {
//
edit(record) {
this.data = record
console.log(record)
this.visible = true
setTimeout(() => {
this.form.setFieldsValue({
code: record.code,
enName: record.enName,
cnName: record.cnName,
description: record.description,
remark: record.remark
})
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.gid)
values.gid = this.data.gid
console.log(values)
CommondbAdd(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>

@ -0,0 +1,174 @@
<template>
<div>
<a-card :bordered="false" :bodyStyle="tstyle">
<div
class="table-page-search-wrapper"
v-if="hasPerm('BookingTemplate:page')"
:class="advanced ? 'Open' : 'Close'"
>
<a-form layout="inline">
<a-row :gutter="48">
<a-col :md="18">
<a-row :gutter="48">
<a-col :md="8" :sm="24">
<a-form-item label="关键字:">
<a-input v-model="queryParam.KeyWord" allow-clear placeholder="请输入关键字" />
</a-form-item>
</a-col>
</a-row>
</a-col>
<a-col :md="6" :sm="24">
<span class="table-page-search-submitButtons">
<a-button type="primary" @click="FnGetData"></a-button>
<a-button style="margin-left: 8px" @click="init"></a-button>
<!-- <a @click="toggleAdvanced" style="margin-left: 8px">
{{ advanced ? '收起' : '展开' }}
<a-icon :type="advanced ? 'up' : 'down'" />
</a> -->
</span>
</a-col>
</a-row>
</a-form>
</div>
</a-card>
<a-card :bordered="false">
<vxe-toolbar>
<template #buttons>
<a-button type="primary" icon="plus" @click="$refs.addForm.add()">
新增配置
</a-button>
</template>
</vxe-toolbar>
<vxe-table :data="loadData" border :loading="loading" height="600px" empty-text="">
<vxe-column type="seq" width="50" fixed="left"></vxe-column>
<vxe-column
v-for="item in columns"
:key="`${item.dataIndex}3`"
:field="item.dataIndex"
:min-width="item.width"
:title="item.title"
:align="item.align"
:show-overflow="true"
>
</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>
</template>
</vxe-column>
</vxe-table>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
</a-card>
</div>
</template>
<script>
import { CommondbList } from '@/api/modular/main/CommondbServiceList'
import addForm from './addForm.vue'
import editForm from './editForm.vue'
export default {
components: {
addForm,
editForm
},
data() {
return {
TypeData: [],
// /
advanced: false,
loading: false,
setVisible: false,
setVisible1: false,
queryParam: {
// currentPage: 1,
// pageSize: 10,
// totalResult: 1
},
ColumnsQuery: [],
columns: [
{
title: '代码',
align: 'center',
width: '80',
dataIndex: 'code'
},
{
title: '英文名称',
align: 'center',
width: '80',
dataIndex: 'enName'
},
{
title: '中文名称',
align: 'center',
width: '80',
dataIndex: 'cnName'
},
{
title: '备注',
align: 'center',
width: '80',
dataIndex: 'remark'
},
{
title: '描述',
align: 'center',
width: '80',
dataIndex: 'description'
}
],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
// Promise
loadData: [],
CodeData: [],
WCodeData: [],
ModulesData: [],
carrierCodeData: []
}
},
created() {},
mounted() {
this.init()
},
methods: {
toggleAdvanced() {
this.advanced = !this.advanced
},
init() {
Object.assign(this.$data, this.$options.data())
this.ColumnsQuery = this.columns
this.FnGetData()
},
FnGetData() {
this.loading = true
CommondbList(this.queryParam).then(res => {
if (res.code == 200) {
this.loadData = res.data
} else {
this.loadData = []
this.$message.warning(res.message)
}
this.loading = false
})
},
handleOk() {
this.FnGetData()
}
}
}
</script>
<style lang="less">
.table-operator {
margin-bottom: 18px;
}
button {
margin-right: 8px;
}
.Open {
}
.Close {
height: 45px;
overflow: hidden;
}
</style>

@ -105,7 +105,7 @@ export default {
dataIndex: 'remark'
},
{
title: 'EDI代码',
// title: 'EDI',
align: 'center',
width: '80',
dataIndex: 'ediCode'

@ -29,20 +29,13 @@
</a-col>
<a-col :span="12">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入备注"
v-decorator="['remark', { rules: [{ required: true, message: '请输入备注!' }] }]"
/>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea
:autosize="{ minRows: 3 }"
placeholder="请输入描述"
v-decorator="['description', { rules: [{ required: true, message: '请输入描述!' }] }]"
/>
<a-textarea :autosize="{ minRows: 3 }" placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
</a-row>

@ -135,7 +135,7 @@ export default {
dataIndex: 'remark'
},
{
title: 'EDI代码',
// title: 'EDI',
align: 'center',
width: '80',
dataIndex: 'ediCode'

@ -13,36 +13,45 @@
<a-col :span="12">
<a-form-item label="代码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入代码"
:disabled="true"
placeholder="请输入代码"
v-decorator="['code', { rules: [{ required: true, message: '请输入代码!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<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="['name', { rules: [{ required: true, message: '请输入名称!' }] }]"
placeholder="请输入英文名称"
v-decorator="['enName', { rules: [{ required: true, message: '请输入英文名称!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<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="['remark', { rules: [{ required: true, message: '请输入备注' }] }]"
placeholder="请输入中文名称"
v-decorator="['cnName', { rules: [{ required: true, message: '请输入中文名称' }] }]"
/>
</a-form-item>
</a-col>
<!-- <a-col :span="12">
<a-form-item label="EDI代码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入EDI代码"
v-decorator="['ediCode', { rules: [{ required: true, message: '请输入EDI代码' }] }]"
/>
</a-form-item>
</a-col> -->
<a-col :span="12">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea
:autosize="{ minRows: 3 }"
placeholder="请输入描述"
v-decorator="['description', { rules: [{ required: true, message: '请输入描述!' }] }]"
/>
<a-textarea :autosize="{ minRows: 3 }" placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
</a-row>
@ -87,8 +96,10 @@ export default {
this.visible = true
setTimeout(() => {
this.form.setFieldsValue({
name: record.name,
ediCode: record.ediCode,
code: record.code,
enName: record.enName,
cnName: record.cnName,
// ediCode: record.ediCode,
description: record.description,
remark: record.remark
})

@ -51,11 +51,11 @@
:show-overflow="true"
>
</vxe-column>
<!-- <vxe-column title="操作" fixed="right" width="200" align="center">
<vxe-column title="操作" fixed="right" width="200" align="center">
<template #default="{ row }">
<vxe-button type="text" @click="$refs.editForm.edit(row)"></vxe-button>
</template>
</vxe-column> -->
</vxe-column>
</vxe-table>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
@ -110,12 +110,12 @@ export default {
width: '80',
dataIndex: 'remark'
},
{
title: 'EDI代码',
align: 'center',
width: '80',
dataIndex: 'ediCode'
},
// {
// title: 'EDI',
// align: 'center',
// width: '80',
// dataIndex: 'ediCode'
// },
{
title: '描述',
align: 'center',

@ -105,7 +105,7 @@ export default {
dataIndex: 'remark'
},
{
title: 'EDI代码',
// title: 'EDI',
align: 'center',
width: '80',
dataIndex: 'ediCode'

@ -20,10 +20,7 @@
</a-col>
<a-col :span="12">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入备注"
v-decorator="['remark', { rules: [{ required: true, message: '请输入备注!' }] }]"
/>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<!-- <a-col :span="12">
@ -36,11 +33,7 @@
</a-col> -->
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea
:autosize="{ minRows: 3 }"
placeholder="请输入描述"
v-decorator="['description', { rules: [{ required: true, message: '请输入描述!' }] }]"
/>
<a-textarea :autosize="{ minRows: 3 }" placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
</a-row>

@ -20,10 +20,7 @@
</a-col>
<a-col :span="12">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入备注"
v-decorator="['remark', { rules: [{ required: true, message: '请输入备注!' }] }]"
/>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<!-- <a-col :span="12">
@ -36,11 +33,7 @@
</a-col> -->
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea
:autosize="{ minRows: 3 }"
placeholder="请输入描述"
v-decorator="['description', { rules: [{ required: true, message: '请输入描述!' }] }]"
/>
<a-textarea :autosize="{ minRows: 3 }" placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
</a-row>

@ -51,11 +51,11 @@
:show-overflow="true"
>
</vxe-column>
<!-- <vxe-column title="操作" fixed="right" width="200" align="center">
<vxe-column title="操作" fixed="right" width="200" align="center">
<template #default="{ row }">
<vxe-button type="text" @click="$refs.editForm.edit(row)"></vxe-button>
</template>
</vxe-column> -->
</vxe-column>
</vxe-table>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
@ -93,7 +93,7 @@ export default {
dataIndex: 'name'
},
{
title: 'EDI代码',
// title: 'EDI',
align: 'center',
width: '80',
dataIndex: 'ediCode'

@ -28,20 +28,13 @@
</a-col>
<a-col :span="12">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入备注"
v-decorator="['remark', { rules: [{ required: true, message: '请输入备注!' }] }]"
/>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea
:autosize="{ minRows: 3 }"
placeholder="请输入描述"
v-decorator="['description', { rules: [{ required: true, message: '请输入描述!' }] }]"
/>
<a-textarea :autosize="{ minRows: 3 }" placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
</a-row>

@ -29,20 +29,13 @@
</a-col>
<a-col :span="12">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入备注"
v-decorator="['remark', { rules: [{ required: true, message: '请输入备注!' }] }]"
/>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea
:autosize="{ minRows: 3 }"
placeholder="请输入描述"
v-decorator="['description', { rules: [{ required: true, message: '请输入描述!' }] }]"
/>
<a-textarea :autosize="{ minRows: 3 }" placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
</a-row>
@ -87,8 +80,8 @@ export default {
this.visible = true
setTimeout(() => {
this.form.setFieldsValue({
code: record.code,
name: record.name,
ediCode: record.ediCode,
description: record.description,
remark: record.remark
})

@ -51,11 +51,11 @@
:show-overflow="true"
>
</vxe-column>
<!-- <vxe-column title="操作" fixed="right" width="200" align="center">
<vxe-column title="操作" fixed="right" width="200" align="center">
<template #default="{ row }">
<vxe-button type="text" @click="$refs.editForm.edit(row)"></vxe-button>
</template>
</vxe-column> -->
</vxe-column>
</vxe-table>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />

Loading…
Cancel
Save