顾客地址

zhc4dev
wangjiadong 2 years ago
parent 86108c4812
commit f08f7c430d
  1. 15
      ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/CustomerReceivingAddressList.vue
  2. 35
      ant-design-vue-jeecg/src/views/customerreceivingaddress/admin/modules/CustomerReceivingAddressForm.vue
  3. 58
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/entity/CustomerReceivingAddress.java

@ -101,19 +101,20 @@
<a @click="handleEdit(record)">编辑</a> <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-dropdown> <!-- <a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a> <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item> <a-menu-item>-->
<a @click="handleDetail(record)">详情</a> <a @click="handleDetail(record)">详情</a>
</a-menu-item> <a-divider type="vertical" />
<a-menu-item> <!-- </a-menu-item>
<a-menu-item>-->
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</a-menu-item> <!-- </a-menu-item>
</a-menu> </a-menu>
</a-dropdown> </a-dropdown>-->
</span> </span>
</a-table> </a-table>
@ -209,7 +210,7 @@
deleteBatch: "/customerreceivingaddress/customerReceivingAddress/deleteBatch", deleteBatch: "/customerreceivingaddress/customerReceivingAddress/deleteBatch",
exportXlsUrl: "/customerreceivingaddress/customerReceivingAddress/exportXls", exportXlsUrl: "/customerreceivingaddress/customerReceivingAddress/exportXls",
importExcelUrl: "customerreceivingaddress/customerReceivingAddress/importExcel", importExcelUrl: "customerreceivingaddress/customerReceivingAddress/importExcel",
}, },
dictOptions:{}, dictOptions:{},
pcaData:'', pcaData:'',

@ -28,7 +28,7 @@
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address"> <a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
<a-textarea style="max-width:none; width: 200%" v-model="model.address" rows="4" placeholder="请输入地址" /> <a-textarea style="max-width:none; width: 200% ;height: 55px" v-model="model.address" rows="4" placeholder="请输入地址" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
@ -76,6 +76,7 @@
import { httpAction, getAction } from '@/api/manage' import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util' import { validateDuplicateValue } from '@/utils/util'
import store from '@/store'
export default { export default {
name: 'CustomerReceivingAddressForm', name: 'CustomerReceivingAddressForm',
@ -92,6 +93,8 @@
data () { data () {
return { return {
model:{ model:{
mobile : store.getters.userInfo.phone,
receiver : store.getters.userInfo.realname
}, },
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
@ -103,14 +106,25 @@
}, },
confirmLoading: false, confirmLoading: false,
validatorRules: { validatorRules: {
zipCode: [ zipCode: [
{ required: true, message: '请输入邮编!'}, { required: true, message: '请输入邮编!'},
{ pattern: /^[1-9]\d{5}$/, message: '请输入正确的邮政编码!'}, { pattern: /^[1-9]\d{5}$/, message: '请输入正确的邮政编码!'},
], ],
mobile: [ receiver: [
{ required: true, message: '请输入联系电话!'}, { required: true, message: '请输入收货人!'},
{ pattern: /^1[3456789]\d{9}$/, 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: { url: {
add: "/customerreceivingaddress/customerReceivingAddress/add", add: "/customerreceivingaddress/customerReceivingAddress/add",
@ -125,6 +139,7 @@
}, },
}, },
created () { created () {
console.log(store.getters.userInfo)
//model //model
this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.modelDefault = JSON.parse(JSON.stringify(this.model));
}, },
@ -162,7 +177,7 @@
that.confirmLoading = false; that.confirmLoading = false;
}) })
} }
}) })
}, },
popupCallback(value,row){ popupCallback(value,row){

@ -31,65 +31,65 @@ import lombok.experimental.Accessors;
public class CustomerReceivingAddress implements Serializable { public class CustomerReceivingAddress implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**主键*/ /**主键*/
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "主键")
private java.lang.String id; private java.lang.String id;
/**创建人*/ /**创建人*/
@ApiModelProperty(value = "创建人") @ApiModelProperty(value = "创建人")
private java.lang.String createBy; 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") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期") @ApiModelProperty(value = "创建日期")
private java.util.Date createTime; private java.util.Date createTime;
/**更新人*/ /**更新人*/
@ApiModelProperty(value = "更新人") @ApiModelProperty(value = "更新人")
private java.lang.String updateBy; 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") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期") @ApiModelProperty(value = "更新日期")
private java.util.Date updateTime; private java.util.Date updateTime;
/**所属部门*/ /**所属部门*/
@ApiModelProperty(value = "所属部门") @ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode; private java.lang.String sysOrgCode;
/**用户*/ /**用户*/
@Excel(name = "用户", width = 15, 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") @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
@ApiModelProperty(value = "用户") @ApiModelProperty(value = "用户")
private java.lang.String userId; private java.lang.String userId;
/**用户*/ /**用户*/
@Excel(name = "用户", width = 15) @Excel(name = "用户", width = 15)
@ApiModelProperty(value = "用户") @ApiModelProperty(value = "用户")
private java.lang.String usernamme; private java.lang.String usernamme;
/**城市*/ /**城市*/
@Excel(name = "城市", width = 15) @Excel(name = "城市", width = 15)
@ApiModelProperty(value = "城市") @ApiModelProperty(value = "城市")
private java.lang.String cityId; private java.lang.String cityId;
/**地址*/ /**地址*/
@Excel(name = "地址", width = 15) @Excel(name = "地址", width = 15)
@ApiModelProperty(value = "地址") @ApiModelProperty(value = "地址")
private java.lang.String address; private java.lang.String address;
/**邮编*/ /**邮编*/
@Excel(name = "邮编", width = 15) @Excel(name = "邮编", width = 15)
@ApiModelProperty(value = "邮编") @ApiModelProperty(value = "邮编")
private java.lang.String zipCode; private java.lang.String zipCode;
/**收货人*/ /**收货人*/
@Excel(name = "收货人", width = 15) @Excel(name = "收货人", width = 15)
@ApiModelProperty(value = "收货人") @ApiModelProperty(value = "收货人")
private java.lang.String receiver; private java.lang.String receiver;
/**联系电话*/ /**联系电话*/
@Excel(name = "联系电话", width = 15) @Excel(name = "联系电话", width = 15)
@ApiModelProperty(value = "联系电话") @ApiModelProperty(value = "联系电话")
private java.lang.String mobile; private java.lang.String mobile;
/**排序*/ /**排序*/
@Excel(name = "排序", width = 15) @Excel(name = "排序", width = 15)
@ApiModelProperty(value = "排序") @ApiModelProperty(value = "排序")
private java.lang.Integer sort; private java.lang.Integer sort;
/**标识*/ /**标识*/
@Excel(name = "标识", width = 15, dicCode = "shdzbs") @Excel(name = "标识", width = 15, dicCode = "shdzbs")
@Dict(dicCode = "shdzbs") @Dict(dicCode = "shdzbs")
@ApiModelProperty(value = "标识") @ApiModelProperty(value = "标识")
private java.lang.String labelcl; private java.lang.String labelcl;
} }

Loading…
Cancel
Save