|
|
|
@ -5,15 +5,15 @@ |
|
|
|
|
<a-row> |
|
|
|
|
<a-col :span="48"> |
|
|
|
|
<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"/> |
|
|
|
|
</a-form-model-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
<a-row> |
|
|
|
|
<a-col :span="48"> |
|
|
|
|
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">--> |
|
|
|
|
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择衣服类型" />--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">--> |
|
|
|
|
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择衣服类型" />--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<a-form-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId"> |
|
|
|
|
<j-tree-select v-model="model.clothsTypeId" |
|
|
|
|
dict="zy_cloths_type,type_name,id" |
|
|
|
@ -36,17 +36,17 @@ |
|
|
|
|
<a-row> |
|
|
|
|
<a-col :span="48"> |
|
|
|
|
<a-form-model-item label="部件名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partsName"> |
|
|
|
|
<a-input v-model="model.partsName" placeholder="请输入部件名称" ></a-input> |
|
|
|
|
<a-input v-model="model.partsName" placeholder="请输入部件名称"></a-input> |
|
|
|
|
</a-form-model-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
<!-- <a-row>--> |
|
|
|
|
<!-- <a-col :span="48">--> |
|
|
|
|
<!-- <a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularId">--> |
|
|
|
|
<!-- <j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块" />--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!-- </a-row>--> |
|
|
|
|
<!--<a-row>--> |
|
|
|
|
<!-- <a-col :span="48">--> |
|
|
|
|
<!-- <a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularId">--> |
|
|
|
|
<!-- <j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块" />--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!--</a-row>--> |
|
|
|
|
|
|
|
|
|
<a-row> |
|
|
|
|
<a-col :span="48"> |
|
|
|
@ -67,54 +67,43 @@ |
|
|
|
|
<a-row> |
|
|
|
|
<a-col :span="48"> |
|
|
|
|
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pictureUrl"> |
|
|
|
|
<j-image-upload isMultiple v-model="model.pictureUrl" ></j-image-upload> |
|
|
|
|
<j-image-upload isMultiple v-model="model.pictureUrl"></j-image-upload> |
|
|
|
|
</a-form-model-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
<a-row> |
|
|
|
|
<!-- <a-col :span="24">--> |
|
|
|
|
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">--> |
|
|
|
|
<!-- <j-select-depart v-model="model.enterpriseId" />--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!--<a-col :span="24">--> |
|
|
|
|
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">--> |
|
|
|
|
<!-- <j-select-depart v-model="model.enterpriseId" />--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!--</a-col>--> |
|
|
|
|
|
|
|
|
|
<!-- <a-col :span="24">--> |
|
|
|
|
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">--> |
|
|
|
|
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择衣服类型" />--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!-- <a-col :span="24">--> |
|
|
|
|
<!-- <a-form-model-item label="部件名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partsName">--> |
|
|
|
|
<!-- <a-input v-model="model.partsName" placeholder="请输入部件名称" ></a-input>--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!-- <a-col :span="24">--> |
|
|
|
|
<!-- <a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularId">--> |
|
|
|
|
<!-- <j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块" />--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!-- <a-col :span="24">--> |
|
|
|
|
<!-- <a-form-model-item label="部件类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="componentType">--> |
|
|
|
|
<!-- <a-input v-model="model.componentType" placeholder="请输入部件类型" ></a-input>--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!-- <a-col :span="24">--> |
|
|
|
|
<!-- <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">--> |
|
|
|
|
<!-- <a-textarea v-model="model.description" rows="4" placeholder="请输入描述"/>--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!-- <a-col :span="24">--> |
|
|
|
|
<!-- <a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pictureUrl">--> |
|
|
|
|
<!-- <j-image-upload isMultiple v-model="model.pictureUrl" ></j-image-upload>--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!--<a-col :span="24">--> |
|
|
|
|
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">--> |
|
|
|
|
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择衣服类型" />--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!--</a-col>--> |
|
|
|
|
<!--<a-col :span="24">--> |
|
|
|
|
<!-- <a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularId">--> |
|
|
|
|
<!-- <j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块" />--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!--</a-col>--> |
|
|
|
|
<!--<a-col :span="24">--> |
|
|
|
|
<!-- <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">--> |
|
|
|
|
<!-- <a-textarea v-model="model.description" rows="4" placeholder="请输入描述"/>--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!--</a-col>--> |
|
|
|
|
<!--<a-col :span="24">--> |
|
|
|
|
<!-- <a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pictureUrl">--> |
|
|
|
|
<!-- <j-image-upload isMultiple v-model="model.pictureUrl" ></j-image-upload>--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!--</a-col>--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <a-col :span="24">--> |
|
|
|
|
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">--> |
|
|
|
|
<!-- <a-input v-model="model.enterpriseId" placeholder="请输入企业" ></a-input>--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!--<a-col :span="24">--> |
|
|
|
|
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">--> |
|
|
|
|
<!-- <a-input v-model="model.enterpriseId" placeholder="请输入企业" ></a-input>--> |
|
|
|
|
<!-- </a-form-model-item>--> |
|
|
|
|
<!--</a-col>--> |
|
|
|
|
|
|
|
|
|
</a-row> |
|
|
|
|
</a-form-model> |
|
|
|
@ -124,11 +113,11 @@ |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
|
|
|
|
|
import { httpAction, getAction } from '@/api/manage' |
|
|
|
|
import { validateDuplicateValue } from '@/utils/util' |
|
|
|
|
import JTreeSelect from '@/components/jeecg/JTreeSelect' |
|
|
|
|
import {httpAction, getAction} from '@/api/manage' |
|
|
|
|
import {validateDuplicateValue} from '@/utils/util' |
|
|
|
|
import JTreeSelect from '@/components/jeecg/JTreeSelect' |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
export default { |
|
|
|
|
name: 'ZyClothsComponentForm', |
|
|
|
|
components: { |
|
|
|
|
JTreeSelect |
|
|
|
@ -141,18 +130,18 @@ |
|
|
|
|
required: false |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
data () { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
model:{ |
|
|
|
|
model: { |
|
|
|
|
nums: '', |
|
|
|
|
}, |
|
|
|
|
labelCol: { |
|
|
|
|
xs: { span: 24 }, |
|
|
|
|
sm: { span: 4 }, |
|
|
|
|
xs: {span: 24}, |
|
|
|
|
sm: {span: 4}, |
|
|
|
|
}, |
|
|
|
|
wrapperCol: { |
|
|
|
|
xs: { span: 24 }, |
|
|
|
|
sm: { span: 16 }, |
|
|
|
|
xs: {span: 24}, |
|
|
|
|
sm: {span: 16}, |
|
|
|
|
}, |
|
|
|
|
confirmLoading: false, |
|
|
|
|
validatorRules: { |
|
|
|
@ -160,16 +149,16 @@ |
|
|
|
|
// { required: true, message: '请输入编号!'}, |
|
|
|
|
// ], |
|
|
|
|
clothsTypeId: [ |
|
|
|
|
{ required: true, message: '请选择服装类型!'}, |
|
|
|
|
{required: true, message: '请选择服装类型!'}, |
|
|
|
|
], |
|
|
|
|
partsName: [ |
|
|
|
|
{ required: true, message: '请输入部件名称!'}, |
|
|
|
|
{required: true, message: '请输入部件名称!'}, |
|
|
|
|
], |
|
|
|
|
// modularId: [ |
|
|
|
|
// { required: true, message: '请选择模块!'}, |
|
|
|
|
// ], |
|
|
|
|
modularType: [ |
|
|
|
|
{ required: true, message: '请选择制衣模块类型!'}, |
|
|
|
|
{required: true, message: '请选择制衣模块类型!'}, |
|
|
|
|
], |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
@ -183,11 +172,11 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
formDisabled(){ |
|
|
|
|
formDisabled() { |
|
|
|
|
return this.disabled |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
created () { |
|
|
|
|
created() { |
|
|
|
|
//备份model原始值 |
|
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
|
|
|
|
}, |
|
|
|
@ -201,15 +190,14 @@ |
|
|
|
|
message: '未查询到数据!' |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
this.model.nums = res.result |
|
|
|
|
this.model.nums = res.result; |
|
|
|
|
console.log("制衣部件 编号: " + this.model.nums); |
|
|
|
|
//console.log('res.result') |
|
|
|
|
//console.log(res.result) |
|
|
|
|
//this.confirmLoading = false |
|
|
|
|
// if (this.data.length === 0) { |
|
|
|
|
// this.data.push(res.result) |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
console.log("制衣部件 编号: "+this.model.nums); |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// bianHao() { |
|
|
|
@ -220,14 +208,14 @@ |
|
|
|
|
// this.model.nums = number; |
|
|
|
|
// }) |
|
|
|
|
// }, |
|
|
|
|
add () { |
|
|
|
|
add() { |
|
|
|
|
this.edit(this.modelDefault); |
|
|
|
|
}, |
|
|
|
|
edit (record) { |
|
|
|
|
edit(record) { |
|
|
|
|
this.model = Object.assign({}, record); |
|
|
|
|
this.visible = true; |
|
|
|
|
}, |
|
|
|
|
submitForm () { |
|
|
|
|
submitForm() { |
|
|
|
|
const that = this; |
|
|
|
|
// 触发表单验证 |
|
|
|
|
this.$refs.form.validate(valid => { |
|
|
|
@ -235,18 +223,18 @@ |
|
|
|
|
that.confirmLoading = true; |
|
|
|
|
let httpurl = ''; |
|
|
|
|
let method = ''; |
|
|
|
|
if(!this.model.id){ |
|
|
|
|
httpurl+=this.url.add; |
|
|
|
|
if (!this.model.id) { |
|
|
|
|
httpurl += this.url.add; |
|
|
|
|
method = 'post'; |
|
|
|
|
}else{ |
|
|
|
|
httpurl+=this.url.edit; |
|
|
|
|
} else { |
|
|
|
|
httpurl += this.url.edit; |
|
|
|
|
method = 'put'; |
|
|
|
|
} |
|
|
|
|
httpAction(httpurl,this.model,method).then((res)=>{ |
|
|
|
|
if(res.success){ |
|
|
|
|
httpAction(httpurl, this.model, method).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
that.$message.success(res.message); |
|
|
|
|
that.$emit('ok'); |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
that.$message.warning(res.message); |
|
|
|
|
} |
|
|
|
|
}).finally(() => { |
|
|
|
@ -257,10 +245,10 @@ |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
<style scoped> |
|
|
|
|
.ant-form-item{ |
|
|
|
|
.ant-form-item { |
|
|
|
|
margin-bottom: 16px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |