From f08f7c430d44fe12e112d6fd370290659d4c9fc5 Mon Sep 17 00:00:00 2001 From: wangjiadong <1654135867@qq.com> Date: Thu, 29 Dec 2022 15:19:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=BE=E5=AE=A2=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/CustomerReceivingAddressList.vue | 15 ++--- .../modules/CustomerReceivingAddressForm.vue | 35 +++++++---- .../entity/CustomerReceivingAddress.java | 58 +++++++++---------- 3 files changed, 62 insertions(+), 46 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/CustomerReceivingAddressList.vue b/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/CustomerReceivingAddressList.vue index 7d9f95f0..81a099c0 100644 --- a/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/CustomerReceivingAddressList.vue +++ b/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/CustomerReceivingAddressList.vue @@ -101,19 +101,20 @@ 编辑 - + 详情 - - + + 删除 - + @@ -209,7 +210,7 @@ deleteBatch: "/customerreceivingaddress/customerReceivingAddress/deleteBatch", exportXlsUrl: "/customerreceivingaddress/customerReceivingAddress/exportXls", importExcelUrl: "customerreceivingaddress/customerReceivingAddress/importExcel", - + }, dictOptions:{}, pcaData:'', diff --git a/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/modules/CustomerReceivingAddressForm.vue b/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/modules/CustomerReceivingAddressForm.vue index 7efbc7bf..e3fbe59b 100644 --- a/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/modules/CustomerReceivingAddressForm.vue +++ b/ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/modules/CustomerReceivingAddressForm.vue @@ -28,7 +28,7 @@ - + @@ -76,6 +76,7 @@ import { httpAction, getAction } from '@/api/manage' import { validateDuplicateValue } from '@/utils/util' + import store from '@/store' export default { name: 'CustomerReceivingAddressForm', @@ -92,6 +93,8 @@ data () { return { model:{ + mobile : store.getters.userInfo.phone, + receiver : store.getters.userInfo.realname }, labelCol: { xs: { span: 24 }, @@ -103,14 +106,25 @@ }, confirmLoading: false, validatorRules: { - zipCode: [ - { required: true, message: '请输入邮编!'}, - { pattern: /^[1-9]\d{5}$/, message: '请输入正确的邮政编码!'}, - ], - mobile: [ - { required: true, message: '请输入联系电话!'}, - { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'}, - ], + zipCode: [ + { required: true, message: '请输入邮编!'}, + { pattern: /^[1-9]\d{5}$/, message: '请输入正确的邮政编码!'}, + ], + receiver: [ + { required: true, message: '请输入收货人!'}, + ], + mobile: [ + { required: true, message: '请输入联系电话!'}, + { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'}, + ], + sort: [ + { required: false}, + { validator: (rule, value, callback) => validateDuplicateValue('customer_receiving_address', 'sort', value, this.model.id, callback)}, + ], + labelcl: [ + { required: false}, + { validator: (rule, value, callback) => validateDuplicateValue('customer_receiving_address', 'labelcl', value, this.model.id, callback)}, + ], }, url: { add: "/customerreceivingaddress/customerReceivingAddress/add", @@ -125,6 +139,7 @@ }, }, created () { + console.log(store.getters.userInfo) //备份model原始值 this.modelDefault = JSON.parse(JSON.stringify(this.model)); }, @@ -162,7 +177,7 @@ that.confirmLoading = false; }) } - + }) }, popupCallback(value,row){ diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/entity/CustomerReceivingAddress.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/entity/CustomerReceivingAddress.java index 3670e37a..3055361c 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/entity/CustomerReceivingAddress.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/entity/CustomerReceivingAddress.java @@ -31,65 +31,65 @@ import lombok.experimental.Accessors; public class CustomerReceivingAddress implements Serializable { private static final long serialVersionUID = 1L; - /**主键*/ - @TableId(type = IdType.ASSIGN_ID) + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) @ApiModelProperty(value = "主键") private java.lang.String id; - /**创建人*/ + /**创建人*/ @ApiModelProperty(value = "创建人") private java.lang.String createBy; - /**创建日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "创建日期") private java.util.Date createTime; - /**更新人*/ + /**更新人*/ @ApiModelProperty(value = "更新人") private java.lang.String updateBy; - /**更新日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "更新日期") private java.util.Date updateTime; - /**所属部门*/ + /**所属部门*/ @ApiModelProperty(value = "所属部门") private java.lang.String sysOrgCode; - /**用户*/ - @Excel(name = "用户", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "id") - @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id") + /**用户*/ + @Excel(name = "用户", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "id") + @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id") @ApiModelProperty(value = "用户") private java.lang.String userId; - /**用户*/ - @Excel(name = "用户", width = 15) + /**用户*/ + @Excel(name = "用户", width = 15) @ApiModelProperty(value = "用户") private java.lang.String usernamme; - /**城市*/ - @Excel(name = "城市", width = 15) + /**城市*/ + @Excel(name = "城市", width = 15) @ApiModelProperty(value = "城市") private java.lang.String cityId; - /**地址*/ - @Excel(name = "地址", width = 15) + /**地址*/ + @Excel(name = "地址", width = 15) @ApiModelProperty(value = "地址") private java.lang.String address; - /**邮编*/ - @Excel(name = "邮编", width = 15) + /**邮编*/ + @Excel(name = "邮编", width = 15) @ApiModelProperty(value = "邮编") private java.lang.String zipCode; - /**收货人*/ - @Excel(name = "收货人", width = 15) + /**收货人*/ + @Excel(name = "收货人", width = 15) @ApiModelProperty(value = "收货人") private java.lang.String receiver; - /**联系电话*/ - @Excel(name = "联系电话", width = 15) + /**联系电话*/ + @Excel(name = "联系电话", width = 15) @ApiModelProperty(value = "联系电话") private java.lang.String mobile; - /**排序*/ - @Excel(name = "排序", width = 15) + /**排序*/ + @Excel(name = "排序", width = 15) @ApiModelProperty(value = "排序") private java.lang.Integer sort; - /**标识*/ - @Excel(name = "标识", width = 15, dicCode = "shdzbs") - @Dict(dicCode = "shdzbs") + /**标识*/ + @Excel(name = "标识", width = 15, dicCode = "shdzbs") + @Dict(dicCode = "shdzbs") @ApiModelProperty(value = "标识") private java.lang.String labelcl; }