| | |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="父节点编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="parentId"> |
| | | <a-input v-model="model.parentId" placeholder="请输入父节点编号" ></a-input> |
| | | <a-form-model-item label="父节点编号" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="true" v-model="model.parentWarehouseId" placeholder="请输入父节点编号" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="父节点名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="parentName"> |
| | | <a-input v-model="model.parentName" placeholder="请输入父节点名称" ></a-input> |
| | | <a-form-model-item label="父节点名称" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="true" v-model="model.parentWarehouseName" placeholder="请输入父节点名称" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="叶子节点标识" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leafFlag"> |
| | | <a-radio-group v-model="model.leafFlag" @change="onChange" placeholder="请选择是否叶子节点"> |
| | | <a-radio :value="2">有子节点</a-radio> |
| | | <a-radio :value="1">是叶子节点</a-radio> |
| | | <a-radio-group v-model="model.leafFlag" placeholder="请选择是否叶子节点"> |
| | | <a-radio :value="'2'">有子节点</a-radio> |
| | | <a-radio :value="'1'">是叶子节点</a-radio> |
| | | </a-radio-group> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | sm: { span: 8 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
| | | }, |
| | | methods: { |
| | | add () { |
| | | add (treeSelected) { |
| | | this.modelDefault.parentId = treeSelected.key |
| | | this.modelDefault.parentWarehouseId = treeSelected.entity.warehouseId |
| | | this.modelDefault.parentWarehouseName = treeSelected.entity.warehouseName |
| | | this.edit(this.modelDefault); |
| | | }, |
| | | edit (record) { |
| | |
| | | if(!this.model.id){ |
| | | httpurl+=this.url.add; |
| | | method = 'post'; |
| | | this.model.status = '1' |
| | | }else{ |
| | | httpurl+=this.url.edit; |
| | | method = 'put'; |
| | | } |
| | | console.log(this.model) |
| | | httpAction(httpurl,this.model,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |