收藏商品

zhc4dev
wangjiadong 2 years ago
parent 74f5a76cae
commit c10f3b3c02
  1. 16
      ant-design-vue-jeecg/src/views/customercollectgoods/admin/CustomercollectgoodsList.vue
  2. 32
      ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsForm.vue
  3. 48
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/entity/Customercollectgoods.java

@ -1,12 +1,12 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="用户">
<j-select-user-by-dep placeholder="请选择用户" v-model="queryParam.userId"/>
<j-search-select-tag placeholder="请选择用户" v-model="queryParam.userId" dict="sys_user,realname,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
@ -157,11 +157,6 @@
align:"center",
dataIndex: 'price'
},
{
title:'数量',
align:"center",
dataIndex: 'number'
},
{
title:'收藏夹',
align:"center",
@ -201,10 +196,11 @@
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'sel_user',value:'userId',text:'用户'})
fieldList.push({type:'sel_search',value:'goodsId',text:'商品',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'sel_search',value:'userId',text:'用户',dictTable:'sys_user', dictText:'realname', dictCode:'id'})
fieldList.push({type:'popup',value:'username',text:'用户', popup:{code:'findcust',field:'id',orgFields:'id',destFields:'user_id'}})
fieldList.push({type:'sel_search',value:'goodsId',text:'商品',dictTable:'zy_goods', dictText:'goods_name', dictCode:'id'})
fieldList.push({type:'popup',value:'goodsname',text:'商品', popup:{code:'findgoods',field:'id',orgFields:'id',destFields:'goods_id'}})
fieldList.push({type:'string',value:'price',text:'当前单价',dictCode:''})
fieldList.push({type:'string',value:'number',text:'数量',dictCode:''})
fieldList.push({type:'sel_search',value:'collectTypeId',text:'收藏夹',dictTable:'collect_type', dictText:'collect_type_name', dictCode:'id'})
this.superFieldList = fieldList
}

@ -4,13 +4,29 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-select-user-by-dep v-model="model.userId" />
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="username">
<j-popup
v-model="model.username"
field="username"
org-fields="id,realname"
dest-fields="userId,username"
code="findcust"
:multi="true"
@input="popupCallback"
/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="商品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsId">
<j-search-select-tag v-model="model.goodsId" dict="zy_goods,goods_name,id" />
<a-form-model-item label="商品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsname">
<j-popup
v-model="model.goodsname"
field="goodsname"
org-fields="id,goods_name,unit_price"
dest-fields="goodsId,goodsname,price"
code="findgoods"
:multi="true"
@input="popupCallback"
/>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -18,11 +34,6 @@
<a-input v-model="model.price" placeholder="请输入当前单价" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="number">
<a-input v-model="model.number" placeholder="请输入数量" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="收藏夹" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="collectTypeId">
<j-search-select-tag v-model="model.collectTypeId" dict="collect_type,collect_type_name,id" />
@ -119,6 +130,9 @@
})
},
popupCallback(value,row){
this.model = Object.assign(this.model, row);
},
}
}
</script>

@ -20,7 +20,7 @@ import lombok.experimental.Accessors;
/**
* @Description: 收藏商品衣橱
* @Author: jeecg-boot
* @Date: 2022-12-08
* @Date: 2023-01-04
* @Version: V1.0
*/
@Data
@ -31,50 +31,54 @@ import lombok.experimental.Accessors;
public class Customercollectgoods 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 = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
/**用户*/
@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)
@ApiModelProperty(value = "用户")
private java.lang.String username;
/**商品*/
@Excel(name = "商品", width = 15, dictTable = "zy_goods", dicText = "goods_name", dicCode = "id")
@Dict(dictTable = "zy_goods", dicText = "goods_name", dicCode = "id")
@ApiModelProperty(value = "商品")
private java.lang.String goodsId;
/**当前单价*/
@Excel(name = "当前单价", width = 15)
/**商品*/
@Excel(name = "商品", width = 15)
@ApiModelProperty(value = "商品")
private java.lang.String goodsname;
/**当前单价*/
@Excel(name = "当前单价", width = 15)
@ApiModelProperty(value = "当前单价")
private java.lang.String price;
/**数量*/
@Excel(name = "数量", width = 15)
@ApiModelProperty(value = "数量")
private java.lang.String number;
/**收藏夹*/
@Excel(name = "收藏夹", width = 15, dictTable = "collect_type", dicText = "collect_type_name", dicCode = "id")
@Dict(dictTable = "collect_type", dicText = "collect_type_name", dicCode = "id")
/**收藏夹*/
@Excel(name = "收藏夹", width = 15, dictTable = "collect_type", dicText = "collect_type_name", dicCode = "id")
@Dict(dictTable = "collect_type", dicText = "collect_type_name", dicCode = "id")
@ApiModelProperty(value = "收藏夹")
private java.lang.String collectTypeId;
}

Loading…
Cancel
Save