|
|
|
@ -4,26 +4,31 @@ |
|
|
|
|
<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="username"> |
|
|
|
|
<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" |
|
|
|
|
org-fields="id,realname,username" |
|
|
|
|
dest-fields="userId,username,userdlm" |
|
|
|
|
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="userdlm"> |
|
|
|
|
<a-input v-model="model.userdlm" placeholder="请输入登录名" ></a-input> |
|
|
|
|
</a-form-model-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<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-col> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<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-col> |
|
|
|
|
<a-col :span="24"> |
|
|
|
@ -78,17 +83,17 @@ |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<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-col> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<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-col> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<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-col> |
|
|
|
|
<a-col :span="24"> |
|
|
|
@ -132,7 +137,8 @@ |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
model:{ |
|
|
|
|
}, |
|
|
|
|
measurementMethod:1 |
|
|
|
|
}, |
|
|
|
|
labelCol: { |
|
|
|
|
xs: { span: 24 }, |
|
|
|
|
sm: { span: 5 }, |
|
|
|
@ -143,6 +149,62 @@ |
|
|
|
|
}, |
|
|
|
|
confirmLoading: false, |
|
|
|
|
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: { |
|
|
|
|
add: "/customermeasure/customerMeasure/add", |
|
|
|
@ -157,7 +219,7 @@ |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
created () { |
|
|
|
|
//备份model原始值 |
|
|
|
|
//备份model原始值 |
|
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
@ -181,7 +243,7 @@ |
|
|
|
|
method = 'post'; |
|
|
|
|
}else{ |
|
|
|
|
httpurl+=this.url.edit; |
|
|
|
|
method = 'put'; |
|
|
|
|
method = 'put'; |
|
|
|
|
} |
|
|
|
|
httpAction(httpurl,this.model,method).then((res)=>{ |
|
|
|
|
if(res.success){ |
|
|
|
@ -194,11 +256,11 @@ |
|
|
|
|
that.confirmLoading = false; |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
popupCallback(value,row){ |
|
|
|
|
this.model = Object.assign(this.model, row); |
|
|
|
|
this.model = Object.assign(this.model, row); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|