|
|
@ -4,27 +4,46 @@ |
|
|
|
<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="enterpriseId"> |
|
|
|
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId" v-if="this.model.id==null"> |
|
|
|
<j-select-depart v-model="model.enterpriseId" @change="kuanshi" /> |
|
|
|
<j-select-depart v-model="model.enterpriseId" @change="kuanshi" /> |
|
|
|
</a-form-model-item> |
|
|
|
</a-form-model-item> |
|
|
|
|
|
|
|
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId" v-else> |
|
|
|
|
|
|
|
<j-select-depart v-model="model.enterpriseId" @change="kuanshi" disabled /> |
|
|
|
|
|
|
|
</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" v-if="this.model.id==null"> |
|
|
|
<j-dict-select-tag v-model="model.styleId" placeholder="请输入款式" |
|
|
|
<j-dict-select-tag v-model="model.styleId" placeholder="请输入款式" |
|
|
|
:dict-code="dict" @change="xiugai"></j-dict-select-tag> |
|
|
|
:dict-code="dict" @change="xiugai"></j-dict-select-tag> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</a-form-model-item> |
|
|
|
|
|
|
|
<a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId" v-else> |
|
|
|
|
|
|
|
<j-dict-select-tag v-model="model.styleId" placeholder="请输入款式" |
|
|
|
|
|
|
|
:dict-code="dict" @change="xiugai" disabled></j-dict-select-tag> |
|
|
|
|
|
|
|
|
|
|
|
</a-form-model-item> |
|
|
|
</a-form-model-item> |
|
|
|
<!-- 编码也是唯一的,和id一样 --> |
|
|
|
<!-- 编码也是唯一的,和id一样 --> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
|
|
|
|
|
|
|
|
<a-col :span="24"> |
|
|
|
<a-col :span="24"> |
|
|
|
<a-form-model-item label="款式型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stylemodelId"> |
|
|
|
<a-form-model-item label="款式型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stylemodelId" v-if="this.model.id==null"> |
|
|
|
<!-- <a-input v-model="model.stylemodelId" placeholder="请输入款式型号" @change="(vaule) => handletypeSelect(value)"></a-input>--> |
|
|
|
<!-- <a-input v-model="model.stylemodelId" placeholder="请输入款式型号" @change="(vaule) => handletypeSelect(value)"></a-input>--> |
|
|
|
<!-- <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" @change="gaibian"></j-dict-select-tag> |
|
|
|
:dictCode="modenumber" @change="gaibian"></j-dict-select-tag> |
|
|
|
|
|
|
|
</a-form-model-item> |
|
|
|
|
|
|
|
<a-form-model-item label="款式型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stylemodelId" v-else> |
|
|
|
|
|
|
|
<!-- <a-input v-model="model.stylemodelId" placeholder="请输入款式型号" @change="(vaule) => handletypeSelect(value)"></a-input>--> |
|
|
|
|
|
|
|
<!-- <j-dict-select-tag v-model="model.stylemodelId" placeholder="请输入款式型号"--> |
|
|
|
|
|
|
|
<!-- dict-code="zy_style_model,model_number,model_number"></j-dict-select-tag>--> |
|
|
|
|
|
|
|
<j-dict-select-tag v-model="model.stylemodelId" placeholder="请选择款式型号" |
|
|
|
|
|
|
|
:dictCode="modenumber" @change="gaibian" disabled></j-dict-select-tag> |
|
|
|
</a-form-model-item> |
|
|
|
</a-form-model-item> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
<a-col :span="24"> |
|
|
|
<a-col :span="24"> |
|
|
@ -90,7 +109,8 @@ export default { |
|
|
|
model: { |
|
|
|
model: { |
|
|
|
nums:'', |
|
|
|
nums:'', |
|
|
|
}, |
|
|
|
}, |
|
|
|
dict:"zy_cloths_style,style_names,nums", |
|
|
|
dict:"zy_cloths_style,style_names,id", |
|
|
|
|
|
|
|
modenumber:'zy_style_model,model_number,id', |
|
|
|
labelCol: { |
|
|
|
labelCol: { |
|
|
|
xs: {span: 24}, |
|
|
|
xs: {span: 24}, |
|
|
|
sm: {span: 5}, |
|
|
|
sm: {span: 5}, |
|
|
@ -152,30 +172,34 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// |
|
|
|
// |
|
|
|
kuanshi(){ |
|
|
|
kuanshi(){ |
|
|
|
this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.enterpriseId+"'"; |
|
|
|
this.dict="zy_cloths_style,style_names,id,enterprise_id="+"'"+this.model.enterpriseId+"'"; |
|
|
|
this.model.styleId=null |
|
|
|
this.model.styleId=null |
|
|
|
|
|
|
|
this.model.nums=null |
|
|
|
}, |
|
|
|
}, |
|
|
|
xiugai(){ |
|
|
|
xiugai(){ |
|
|
|
if(this.model.stylemodelId!=null&&this.model.enterpriseId!=null){ |
|
|
|
this.modenumber="zy_style_model,model_number,id,style_id="+"'"+this.model.styleId+"'" |
|
|
|
this.gaibian() |
|
|
|
this.model.stylemodelId=null |
|
|
|
} |
|
|
|
this.model.nums=null |
|
|
|
|
|
|
|
// if(this.model.stylemodelId!=null&&this.model.enterpriseId!=null){ |
|
|
|
|
|
|
|
// this.gaibian() |
|
|
|
|
|
|
|
// } |
|
|
|
}, |
|
|
|
}, |
|
|
|
gaibian(){ |
|
|
|
gaibian(){ |
|
|
|
var n=3; |
|
|
|
var n=3; |
|
|
|
console.log(this.model) |
|
|
|
console.log(this.model) |
|
|
|
getAction(this.url.sort,this.model).then((res)=>{ |
|
|
|
getAction(this.url.sort,this.model).then((res)=>{ |
|
|
|
console.log(res) |
|
|
|
console.log(res.result[1]) |
|
|
|
if(this.model.id==null||parseInt(res.result,10)==0){ |
|
|
|
if(this.model.id==null||parseInt(res.result[1],10)==0){ |
|
|
|
var num=parseInt(res.result,10)+1 |
|
|
|
var num=parseInt(res.result[1],10)+1 |
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
var num=parseInt(res.result,10) |
|
|
|
var num=parseInt(res.result[1],10) |
|
|
|
} |
|
|
|
} |
|
|
|
num=num.toString() |
|
|
|
num=num.toString() |
|
|
|
while(num.length<n){ |
|
|
|
while(num.length<n){ |
|
|
|
num="0"+num |
|
|
|
num="0"+num |
|
|
|
} |
|
|
|
} |
|
|
|
this.model.nums=this.model.styleId+this.model.stylemodelId+num; |
|
|
|
this.model.nums=res.result[2]+res.result[0]+num; |
|
|
|
console.log( this.model.nums) |
|
|
|
console.log( this.model.nums) |
|
|
|
})}, |
|
|
|
})}, |
|
|
|
// 款式select改变的回调 |
|
|
|
// 款式select改变的回调 |
|
|
@ -189,6 +213,7 @@ export default { |
|
|
|
edit(record) { |
|
|
|
edit(record) { |
|
|
|
this.model = Object.assign({}, record); |
|
|
|
this.model = Object.assign({}, record); |
|
|
|
this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.enterpriseId+"'"; |
|
|
|
this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.enterpriseId+"'"; |
|
|
|
|
|
|
|
this.modenumber="zy_style_model,model_number,id,style_id="+"'"+this.model.styleId+"'" |
|
|
|
this.visible = true; |
|
|
|
this.visible = true; |
|
|
|
} |
|
|
|
} |
|
|
|
, |
|
|
|
, |
|
|
|