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