|
|
|
@ -5,7 +5,12 @@ |
|
|
|
|
<a-row> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId"> |
|
|
|
|
<j-select-depart v-model="model.enterpriseId" /> |
|
|
|
|
<j-select-depart v-model="model.enterpriseId" @change="bianhao" /> |
|
|
|
|
</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" placeholder="请输入编号" disabled ></a-input> |
|
|
|
|
</a-form-model-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="24"> |
|
|
|
@ -18,11 +23,7 @@ |
|
|
|
|
{{ typeId }} |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<!-- <a-col :span="24">--> |
|
|
|
|
<!-- <a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">--> |
|
|
|
|
<!-- <a-input v-model="model.nums" placeholder="请输入编号" ></a-input>--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
|
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<a-form-model-item label="类型名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeName"> |
|
|
|
|
<a-input v-model="model.typeName" placeholder="请输入类型名称" ></a-input> |
|
|
|
@ -62,6 +63,7 @@ |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
model:{ |
|
|
|
|
nums:'' |
|
|
|
|
}, |
|
|
|
|
typeId:"", |
|
|
|
|
labelCol: { |
|
|
|
@ -88,7 +90,8 @@ |
|
|
|
|
url: { |
|
|
|
|
add: "/base/zyClothsType/add", |
|
|
|
|
edit: "/base/zyClothsType/edit", |
|
|
|
|
queryById: "/base/zyClothsType/queryById" |
|
|
|
|
queryById: "/base/zyClothsType/queryById", |
|
|
|
|
weiyi:"/base/zyClothsType/weiyi" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -102,6 +105,20 @@ |
|
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
bianhao(){ |
|
|
|
|
var n=6 |
|
|
|
|
getAction(this.url.weiyi,null).then((res)=>{ |
|
|
|
|
var num=parseInt(res.result,10)+1 |
|
|
|
|
console.log(num) |
|
|
|
|
num=num.toString() |
|
|
|
|
while(num.length<n){ |
|
|
|
|
num="0"+num |
|
|
|
|
} |
|
|
|
|
console.log(num) |
|
|
|
|
this.model.nums="QIYE"+num; |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
add () { |
|
|
|
|
this.edit(this.modelDefault); |
|
|
|
|
}, |
|
|
|
|