Merge remote-tracking branch 'origin/master'

zhc4dev
赵玉瑞 2 years ago
commit 35e868ae14
  1. 16
      ant-design-vue-jeecg/src/views/customermeasure/admin/CustomerMeasureList.vue
  2. 88
      ant-design-vue-jeecg/src/views/customermeasure/admin/modules/CustomerMeasureForm.vue
  3. 10
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customermeasure/entity/CustomerMeasure.java

@ -159,6 +159,11 @@
align:"center", align:"center",
dataIndex: 'userId_dictText' dataIndex: 'userId_dictText'
}, },
{
title:'登录名',
align:"center",
dataIndex: 'userdlm'
},
{ {
title:'排序', title:'排序',
align:"center", align:"center",
@ -250,11 +255,6 @@
align:"center", align:"center",
dataIndex: 'measurerId_dictText' dataIndex: 'measurerId_dictText'
}, },
{
title:'量体时间',
align:"center",
dataIndex: 'createTime'
},
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
@ -277,7 +277,7 @@
} }
}, },
created() { created() {
this.getSuperFieldList(); this.getSuperFieldList();
}, },
computed: { computed: {
importExcelUrl: function(){ importExcelUrl: function(){
@ -290,7 +290,8 @@
getSuperFieldList(){ getSuperFieldList(){
let fieldList=[]; let fieldList=[];
fieldList.push({type:'sel_search',value:'userId',text:'用户',dictTable:'sys_user', dictText:'realname', dictCode:'id'}) 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:'popup',value:'username',text:'用户', popup:{code:'findcust',field:'id',orgFields:'id',destFields:'user_id'}})
fieldList.push({type:'string',value:'userdlm',text:'登录名',dictCode:''})
fieldList.push({type:'int',value:'sort',text:'排序',dictCode:''}) fieldList.push({type:'int',value:'sort',text:'排序',dictCode:''})
fieldList.push({type:'double',value:'height',text:'身高(厘米)',dictCode:''}) fieldList.push({type:'double',value:'height',text:'身高(厘米)',dictCode:''})
fieldList.push({type:'double',value:'weight',text:'体重(千克)',dictCode:''}) fieldList.push({type:'double',value:'weight',text:'体重(千克)',dictCode:''})
@ -309,7 +310,6 @@
fieldList.push({type:'sel_depart',value:'storeId',text:'量体店铺'}) fieldList.push({type:'sel_depart',value:'storeId',text:'量体店铺'})
fieldList.push({type:'sel_search',value:'deviceId',text:'量体设备',dictTable:'se_equipmenttype', dictText:'name', dictCode:'id'}) fieldList.push({type:'sel_search',value:'deviceId',text:'量体设备',dictTable:'se_equipmenttype', dictText:'name', dictCode:'id'})
fieldList.push({type:'sel_user',value:'measurerId',text:'量体师'}) fieldList.push({type:'sel_user',value:'measurerId',text:'量体师'})
fieldList.push({type:'datetime',value:'measurementTime',text:'量体时间'})
this.superFieldList = fieldList this.superFieldList = fieldList
} }
} }

@ -4,26 +4,31 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="username"> <a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="username">
<j-popup <j-popup
v-model="model.username" v-model="model.username"
field="username" field="username"
org-fields="id,realname" org-fields="id,realname,username"
dest-fields="userId,username" dest-fields="userId,username,userdlm"
code="findcust" code="findcust"
:multi="true" :multi="true"
@input="popupCallback" @input="popupCallback"
/> />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="登录名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userdlm">
<a-input v-model="model.userdlm" placeholder="请输入登录名" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sort"> <a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sort">
<a-input-number v-model="model.sort" placeholder="请输入排序" style="width: 100%" /> <a-input-number v-model="model.sort" placeholder="请输入排序" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="身高(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="height"> <a-form-model-item label="身高(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="height">
<a-input-number v-model="model.height" placeholder="请输入身高(厘米)" style="width: 100%" /> <a-input-number v-model="model.height" placeholder="请输入身高(厘米)" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -78,17 +83,17 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="衣长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="length"> <a-form-model-item label="衣长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="length">
<a-input-number v-model="model.length" placeholder="请输入衣长(厘米)" style="width: 100%" /> <a-input-number v-model="model.length" placeholder="请输入衣长" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="胸距" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sternalDistance"> <a-form-model-item label="胸距" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sternalDistance">
<a-input-number v-model="model.sternalDistance" placeholder="请输入胸距(厘米)" style="width: 100%" /> <a-input-number v-model="model.sternalDistance" placeholder="请输入胸距" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="量体方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measurementMethod"> <a-form-model-item label="量体方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measurementMethod">
<j-dict-select-tag type="radio" v-model="model.measurementMethod" dictCode="ctfs" placeholder="请选择量体方式" /> <j-dict-select-tag type="radio" v-model="model.measurementMethod" dictCode="ctfs" placeholder="请选择量体方式" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -132,7 +137,8 @@
data () { data () {
return { return {
model:{ model:{
}, measurementMethod:1
},
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 5 }, sm: { span: 5 },
@ -143,6 +149,62 @@
}, },
confirmLoading: false, confirmLoading: false,
validatorRules: { validatorRules: {
sort: [
{ required: false},
{ validator: (rule, value, callback) => validateDuplicateValue('customer_measure', 'sort', value, this.model.id, callback)},
],
height: [
{ required: true, message: '请输入身高!'},
{pattern: /^\d*\.?\d$/,message:'请输入大于0的数,保留一位小数'},
],
weight: [
{ required: true, message: '请输入体重!'},
{pattern: /^\d*\.?\d$/,message:'请输入大于0的数,保留一位小数'},
],
cuff: [
{ required: true, message: '请输入袖口!'},
{pattern: /^\d*\.?\d$/,message:'请输入大于0的数,保留一位小数'},
],
sleeveLength: [
{ required: true, message: '请输入袖长!'},
{pattern: /^\d*\.?\d$/,message:'请输入大于0的数,保留一位小数'},
],
bust: [
{ required: true, message: '请输入胸围!'},
{pattern: /^\d*\.?\d$/,message:'请输入大于0的数,保留一位小数'},
],
theWaist: [
{ required: true, message: '请输入腰围!'},
{pattern: /^\d*\.?\d$/,message:'请输入大于0的数,保留一位小数'},
],
shoulderWidth: [
{ required: true, message: '请输入肩宽!'},
{pattern: /^\d*\.?\d$/,message:'请输入大于0的数,保留一位小数'},
],
forebodyLength: [
{ required: true, message: '请输入前身长!'},
{pattern: /^\d*\.?\d$/,message:'请输入大于0的数,保留一位小数'},
],
neck: [
{ required: true, message: '请输入领围!'},
{pattern: /^\d*\.?\d$/,message:'请输入大于0的数,保留一位小数'},
],
hipline: [
{ required: true, message: '请输入臀围!'},
{pattern: /^\d*\.?\d$/,message:'请输入大于0的数,保留一位小数'},
],
length: [
{ required: true, message: '请输入衣长!'},
{pattern: /^\d*\.?\d$/,message:'请输入大于0的数,保留一位小数'},
],
sternalDistance: [
{ required: true, message: '请输入胸距!'},
{pattern: /^\d*\.?\d$/,message:'请输入大于0的数,保留一位小数'},
],
hem: [
{ required: true, message: '请输入下摆!'},
{pattern: /^\d*\.?\d$/,message:'请输入大于0的数,保留一位小数'},
],
}, },
url: { url: {
add: "/customermeasure/customerMeasure/add", add: "/customermeasure/customerMeasure/add",
@ -157,7 +219,7 @@
}, },
}, },
created () { created () {
//model //model
this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.modelDefault = JSON.parse(JSON.stringify(this.model));
}, },
methods: { methods: {
@ -181,7 +243,7 @@
method = 'post'; method = 'post';
}else{ }else{
httpurl+=this.url.edit; httpurl+=this.url.edit;
method = 'put'; method = 'put';
} }
httpAction(httpurl,this.model,method).then((res)=>{ httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){ if(res.success){
@ -198,7 +260,7 @@
}) })
}, },
popupCallback(value,row){ popupCallback(value,row){
this.model = Object.assign(this.model, row); this.model = Object.assign(this.model, row);
}, },
} }
} }

@ -64,10 +64,14 @@ public class CustomerMeasure implements Serializable {
@Excel(name = "用户名", width = 15) @Excel(name = "用户名", width = 15)
@ApiModelProperty(value = "用户名") @ApiModelProperty(value = "用户名")
private String username; private String username;
/**排序*/ /**登录名*/
@Excel(name = "排序", width = 15) @Excel(name = "登录名", width = 15)
@ApiModelProperty(value = "登录名")
private java.lang.String userdlm;
/**排序*/
@Excel(name = "排序", width = 15)
@ApiModelProperty(value = "排序") @ApiModelProperty(value = "排序")
private Integer sort; private java.lang.Integer sort;
/**身高(厘米)*/ /**身高(厘米)*/
@Excel(name = "身高(厘米)", width = 15) @Excel(name = "身高(厘米)", width = 15)
@ApiModelProperty(value = "身高(厘米)") @ApiModelProperty(value = "身高(厘米)")

Loading…
Cancel
Save