cuilei
2025-05-07 da5bd5596b1f0f7a27cd0791a17a7fc3b608f523
src/views/tms/modules/WarehouseForm.vue
@@ -4,13 +4,13 @@
      <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">
@@ -25,9 +25,9 @@
          </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>
@@ -70,7 +70,7 @@
         },
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
          sm: { span: 8 },
        },
        wrapperCol: {
          xs: { span: 24 },
@@ -111,7 +111,10 @@
      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) {
@@ -129,10 +132,12 @@
            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);