|
|
@ -4,17 +4,18 @@ |
|
|
|
<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="nums"> |
|
|
|
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId"> |
|
|
|
<!-- <a-input v-model="model.nums || this.nums" placeholder="请输入编号"></a-input>--> |
|
|
|
<j-select-depart v-model="model.userId" /> |
|
|
|
<a-input v-model="model.nums" placeholder="请输入编号"></a-input> |
|
|
|
|
|
|
|
</a-form-model-item> |
|
|
|
</a-form-model-item> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
|
|
|
|
|
|
|
|
<!--关联服装款式表 zy_cloths_style 关联列:名称 传值id--> |
|
|
|
<!--关联服装款式表 zy_cloths_style 关联列:名称 传值id--> |
|
|
|
<a-col :span="24"> |
|
|
|
<a-col :span="24"> |
|
|
|
<a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId"> |
|
|
|
<a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId"> |
|
|
|
<j-dict-select-tag v-model="model.styleId" placeholder="请输入款式" |
|
|
|
<j-dict-select-tag v-model="model.styleId" placeholder="请输入款式" |
|
|
|
dict-code="zy_cloths_style,style_names,id"></j-dict-select-tag> |
|
|
|
dict-code="zy_cloths_style,style_names,nums"></j-dict-select-tag> |
|
|
|
</a-form-model-item> |
|
|
|
</a-form-model-item> |
|
|
|
|
|
|
|
<!-- 编码也是唯一的,和id一样 --> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
|
|
|
|
|
|
|
|
<a-col :span="24"> |
|
|
|
<a-col :span="24"> |
|
|
@ -23,22 +24,27 @@ |
|
|
|
<!-- <j-dict-select-tag v-model="model.stylemodelId" placeholder="请输入款式型号"--> |
|
|
|
<!-- <j-dict-select-tag v-model="model.stylemodelId" placeholder="请输入款式型号"--> |
|
|
|
<!-- dict-code="zy_style_model,model_number,model_number"></j-dict-select-tag>--> |
|
|
|
<!-- dict-code="zy_style_model,model_number,model_number"></j-dict-select-tag>--> |
|
|
|
<j-dict-select-tag v-model="model.stylemodelId" placeholder="请选择款式型号" |
|
|
|
<j-dict-select-tag v-model="model.stylemodelId" placeholder="请选择款式型号" |
|
|
|
dictCode="modenumber"></j-dict-select-tag> |
|
|
|
dictCode="modenumber" @change="gaibian"></j-dict-select-tag> |
|
|
|
|
|
|
|
</a-form-model-item> |
|
|
|
|
|
|
|
</a-col> |
|
|
|
|
|
|
|
<a-col :span="24"> |
|
|
|
|
|
|
|
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums"> |
|
|
|
|
|
|
|
<!-- <a-input v-model="model.nums || this.nums" placeholder="请输入编号"></a-input>--> |
|
|
|
|
|
|
|
<a-input v-model="model.nums" placeholder="请输入编号" disabled></a-input> |
|
|
|
</a-form-model-item> |
|
|
|
</a-form-model-item> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
|
|
|
|
|
|
|
|
<!--<j-dict-select-tag v-model="model.modelSample" placeholder="请选择模块样板"--> |
|
|
|
<!--<j-dict-select-tag v-model="model.modelSample" placeholder="请选择模块样板"--> |
|
|
|
<!-- dict-code="zy_module_sample, module_name, id"></j-dict-select-tag>--> |
|
|
|
<!-- dict-code="zy_module_sample, module_name, id"></j-dict-select-tag>--> |
|
|
|
<!-- <j-search-select-tag v-model="model.modelSample" dict="zy_module_sample" dictText="module_name", dictCode="id" />--> |
|
|
|
<!-- <j-search-select-tag v-model="model.modelSample" dict="zy_module_sample" dictText="module_name", dictCode="id" />--> |
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
|
|
|
|
|
|
|
<a-col :span="24"> |
|
|
|
<!-- <a-col :span="24">--> |
|
|
|
<a-form-model-item label="用户名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId"> |
|
|
|
<!-- <a-form-model-item label="用户名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">--> |
|
|
|
<!-- <a-input v-model="model.userId" placeholder="请输入用户名"></a-input>--> |
|
|
|
<!-- <!– <a-input v-model="model.userId" placeholder="请输入用户名"></a-input>–>--> |
|
|
|
<j-dict-select-tag v-model="model.userId" placeholder="请输入用户名" |
|
|
|
<!-- <j-dict-select-tag v-model="model.userId" placeholder="请输入用户名"--> |
|
|
|
dict-code="sys_user,username,username"></j-dict-select-tag> |
|
|
|
<!-- dict-code="sys_user,username,username"></j-dict-select-tag>--> |
|
|
|
</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="descr"> |
|
|
|
<a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="descr"> |
|
|
@ -81,7 +87,9 @@ export default { |
|
|
|
selectedKey: '', // 款式id |
|
|
|
selectedKey: '', // 款式id |
|
|
|
typeid: '', // 型号, |
|
|
|
typeid: '', // 型号, |
|
|
|
serialNumber: '', // 顺序号 |
|
|
|
serialNumber: '', // 顺序号 |
|
|
|
model: {}, |
|
|
|
model: { |
|
|
|
|
|
|
|
nums:'', |
|
|
|
|
|
|
|
}, |
|
|
|
labelCol: { |
|
|
|
labelCol: { |
|
|
|
xs: {span: 24}, |
|
|
|
xs: {span: 24}, |
|
|
|
sm: {span: 5}, |
|
|
|
sm: {span: 5}, |
|
|
@ -93,12 +101,12 @@ export default { |
|
|
|
confirmLoading: false, |
|
|
|
confirmLoading: false, |
|
|
|
/*效验规则*/ |
|
|
|
/*效验规则*/ |
|
|
|
validatorRules: { |
|
|
|
validatorRules: { |
|
|
|
nums: [ |
|
|
|
// nums: [ |
|
|
|
//{pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{4}$/, message: '4wei'}, |
|
|
|
// //{pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{4}$/, message: '4wei'}, |
|
|
|
{ required:true, message: '编号不能为空'}, |
|
|
|
// { required:true, message: '编号不能为空'}, |
|
|
|
{ pattern: /^[0-9A-Za-z]{0,10}$/, message: '编号太长'}, |
|
|
|
// { pattern: /^[0-9A-Za-z]{0,20}$/, message: '编号太长'}, |
|
|
|
//{pattern: /^(?=.*([0-9a-zA-Z]){5}).[A-Za-z0-9]+$/, message: '编号为四位'}, |
|
|
|
// //{pattern: /^(?=.*([0-9a-zA-Z]){5}).[A-Za-z0-9]+$/, message: '编号为四位'}, |
|
|
|
], |
|
|
|
// ], |
|
|
|
styleId: [ |
|
|
|
styleId: [ |
|
|
|
{required: true, message: '款式不能为空'}, |
|
|
|
{required: true, message: '款式不能为空'}, |
|
|
|
], |
|
|
|
], |
|
|
@ -117,6 +125,7 @@ export default { |
|
|
|
add: "/zyclothsample/zyClothSample/add", |
|
|
|
add: "/zyclothsample/zyClothSample/add", |
|
|
|
edit: "/zyclothsample/zyClothSample/edit", |
|
|
|
edit: "/zyclothsample/zyClothSample/edit", |
|
|
|
queryById: "/zyclothsample/zyClothSample/queryById", |
|
|
|
queryById: "/zyclothsample/zyClothSample/queryById", |
|
|
|
|
|
|
|
sort:"/zyclothsample/zyClothSample/sort" |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -141,7 +150,19 @@ export default { |
|
|
|
this.edit(this.modelDefault); |
|
|
|
this.edit(this.modelDefault); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// |
|
|
|
// |
|
|
|
|
|
|
|
gaibian(){ |
|
|
|
|
|
|
|
var n=3; |
|
|
|
|
|
|
|
console.log(this.model) |
|
|
|
|
|
|
|
getAction(this.url.sort,this.model).then((res)=>{ |
|
|
|
|
|
|
|
console.log(res) |
|
|
|
|
|
|
|
var num=parseInt(res.result,10)+1 |
|
|
|
|
|
|
|
num=num.toString() |
|
|
|
|
|
|
|
while(num.length<n){ |
|
|
|
|
|
|
|
num="0"+num |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.model.nums=this.model.styleId+this.model.stylemodelId+num; |
|
|
|
|
|
|
|
console.log( this.model.nums) |
|
|
|
|
|
|
|
})}, |
|
|
|
// 款式select改变的回调 |
|
|
|
// 款式select改变的回调 |
|
|
|
handleSelect(selectedKeys) { |
|
|
|
handleSelect(selectedKeys) { |
|
|
|
this.selectedKey = selectedKeys; |
|
|
|
this.selectedKey = selectedKeys; |
|
|
|