cuilei
2025-05-08 6e3153f560b32a31caf930ba0338daf238d6bd6a
工具管理-库位货架管理页面开发、仓库管理页面优化
已添加4个文件
已修改3个文件
687 ■■■■■ 文件已修改
src/views/tms/GoodsShelves.vue 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tms/GoodsShelvesList.vue 305 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tms/WarehouseList.vue 84 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tms/WarehouseTree.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tms/modules/GoodsShelvesForm.vue 164 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tms/modules/GoodsShelvesModal.vue 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tms/modules/WarehouseForm.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tms/GoodsShelves.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
<template>
  <a-card :bordered="false">
    <a-row type="flex" :gutter="16">
      <a-col :md="5">
        <WarehouseTree/>
      </a-col>
      <a-col :md="19">
        <GoodsShelvesList/>
      </a-col>
    </a-row>
  </a-card>
</template>
<script>
  import GoodsShelvesList from './GoodsShelvesList.vue'
  import WarehouseTree from './WarehouseTree.vue'
  export default {
    name: 'GoodsShelves',
    components: {
      GoodsShelvesList,
      WarehouseTree
    },
    data() {
      return {}
    },
    methods: {}
  }
</script>
<style scoped lang="less">
  /deep/ .ant-card-body {
    padding: 8px;
  }
</style>
src/views/tms/GoodsShelvesList.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,305 @@
<template>
  <a-card :bordered="false">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col
            :md="6"
            :sm="8"
          >
            <a-form-item label="仓库名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input
                placeholder="请输入仓库名称"
                v-model="queryParam.warehouseName"
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col
            :md="6"
            :sm="8"
          >
            <a-form-item label="库位号" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input
                placeholder="请输入库位号"
                v-model="queryParam.locationCode"
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col
            :md="6"
            :sm="8"
          >
            <a-form-item label="货架编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input
                placeholder="请输入货架编号"
                v-model="queryParam.shelfNumber"
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col
            :md="7"
            :sm="8"
          >
            <a-form-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-date-picker
                show-time
                placeholder="请选择开始时间"
                format="YYYY-MM-DD HH:mm"
                valueFormat="YYYY-MM-DD HH:mm"
                v-model="queryParam.beginTime"
              ></a-date-picker>
              <!-- :triggerChange="false" -->
            </a-form-item>
          </a-col>
          <a-col
            :md="7"
            :sm="8"
          >
            <a-form-item label="结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-date-picker
                show-time
                placeholder="请选择结束时间"
                format="YYYY-MM-DD HH:mm"
                valueFormat="YYYY-MM-DD HH:mm"
                v-model="queryParam.endTime"
              ></a-date-picker>
              <!-- :triggerChange="false" -->
            </a-form-item>
          </a-col>
          <a-col :md="4" :sm="4">
            <a-space>
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload">重置</a-button>
            </a-space>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- æŸ¥è¯¢åŒºåŸŸ-END -->
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator">
      <a-button @click="handleAdd" :disabled="addFlag" type="primary" icon="plus">新增</a-button>
<!--      <a-button type="primary" icon="download" @click="handleExportXls('tms_goods_shelves')">导出</a-button>-->
<!--      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!--        <a-button type="primary" icon="import">导入</a-button>-->
<!--      </a-upload>-->
<!--      <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!--        <a-menu slot="overlay">-->
<!--          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
<!--        </a-menu>-->
<!--        <a-button style="margin-left: 8px"> æ‰¹é‡æ“ä½œ <a-icon type="down" /></a-button>-->
<!--      </a-dropdown>-->
    </div>
    <!-- table区域-begin -->
    <div>
<!--      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
<!--        <i class="anticon anticon-info-circle ant-alert-icon"></i> å·²é€‰æ‹© <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项-->
<!--        <a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
<!--      </div>-->
      <a-table
        ref="table"
        size="middle"
        :scroll="{x:true}"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="null"
        class="j-table-force-nowrap"
        @change="handleTableChange">
        <span slot="action" slot-scope="text, record">
          <a @click="handleDetail(record)">详情</a>
          <a-divider type="vertical" />
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a @click="handleEdit(record)">编辑</a>
              </a-menu-item>
              <a-menu-item>
                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
      </a-table>
    </div>
    <goods-shelves-modal ref="modalForm" :treeSelected="treeSelected" @ok="modalFormOk"></goods-shelves-modal>
  </a-card>
</template>
<script>
  import '@/assets/less/TableExpand.less'
  import { mixinDevice } from '@/utils/mixin'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import GoodsShelvesModal from './modules/GoodsShelvesModal'
  export default {
    name: 'GoodsShelvesList',
    mixins:[JeecgListMixin, mixinDevice],
    components: {
      GoodsShelvesModal
    },
    data () {
      return {
        description: 'tms_goods_shelves',
        labelCol: { xs: { span: 24 }, sm: { span: 8 } },
        wrapperCol: { xs: { span: 24 }, sm: { span: 16 } },
        // è¡¨å¤´
        columns: [
          {
            title: '#',
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
          },
          {
            title:'仓库编号',
            align:"center",
            dataIndex: 'warehouseNum'
          },
          {
            title:'仓库名称',
            align:"center",
            dataIndex: 'warehouseName'
          },
          {
            title:'库位号',
            align:"center",
            dataIndex: 'locationCode'
          },
          {
            title:'层数',
            align:"center",
            dataIndex: 'storey'
          },
          {
            title:'排数',
            align:"center",
            dataIndex: 'arrange'
          },
          {
            title:'列数',
            align:"center",
            dataIndex: 'columnNumber'
          },
          {
            title:'货架编号',
            align:"center",
            dataIndex: 'shelfNumber'
          },
          {
            title:'货架名称',
            align:"center",
            dataIndex: 'shelfName'
          },
          {
            title:'备注',
            align:"center",
            dataIndex: 'remark'
          },
          {
            title:'创建人',
            align:"center",
            dataIndex: 'createBy'
          },
          {
            title:'创建时间',
            align:"center",
            dataIndex: 'createTime'
          },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            fixed:"right",
            width:147,
            scopedSlots: { customRender: 'action' }
          }
        ],
        url: {
          list: "/tms/goodsShelves/list",
          delete: "/tms/goodsShelves/delete",
          deleteBatch: "/tms/goodsShelves/deleteBatch",
          exportXlsUrl: "/tms/goodsShelves/exportXls",
          importExcelUrl: "tms/goodsShelves/importExcel",
        },
        dictOptions:{},
        superFieldList:[],
        treeSelected: {}
      }
    },
    created() {
    this.getSuperFieldList();
    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      },
      addFlag: function(){
        return !(this.treeSelected.key && this.treeSelected.entity.leafFlag === '1')
      }
    },
    mounted() {
      this.handleGetCurrSelected = (data) => {
        this.treeSelected = data;
        if (data.entity && data.entity.leafFlag === '1') {
          this.queryParam.warehouseId = data.key;
          this.loadData();
        } else {
          this.dataSource = []
        }
      }
      this.$bus.$on('getCurrSelected', this.handleGetCurrSelected);
    },
    beforeDestroy() {
      this.$bus.$off('getCurrSelected', this.handleGetCurrSelected);
    },
    methods: {
      searchReset() {
        this.queryParam = {
          warehouseId: this.treeSelected.key
        }
        this.loadData(1)
      },
      initDictConfig(){
      },
      getSuperFieldList(){
        let fieldList=[];
        fieldList.push({type:'string',value:'warehouseId',text:'仓库编号',dictCode:''})
        fieldList.push({type:'string',value:'locationCode',text:'库位号',dictCode:''})
        fieldList.push({type:'string',value:'storey',text:'层数',dictCode:''})
        fieldList.push({type:'string',value:'arrange',text:'排数',dictCode:''})
        fieldList.push({type:'string',value:'columnNumber',text:'列数',dictCode:''})
        fieldList.push({type:'string',value:'shelfNumber',text:'货架编号',dictCode:''})
        fieldList.push({type:'string',value:'shelfName',text:'货架名称',dictCode:''})
        fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''})
        fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''})
        fieldList.push({type:'date',value:'createTime',text:'创建时间'})
        this.superFieldList = fieldList
      }
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less';
</style>
src/views/tms/WarehouseList.vue
@@ -144,7 +144,6 @@
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import WarehouseModal from './modules/WarehouseModal'
  import { getAction, putAction, deleteAction } from '../../api/manage'
  import moment from 'moment'
  export default {
    name: 'WarehouseList',
@@ -153,16 +152,8 @@
      WarehouseModal
    },
    data () {
      const now = moment()
      const lastWeek = now.clone().subtract(7,'days')
      return {
        description: '仓库管理',
        queryParam: {
          beginTime: lastWeek.format('YYYY-MM-DD HH:mm'),
          endTime: now.format('YYYY-MM-DD HH:mm'),
          warehouseName: '',
          parentId: ''
        },
        // è¡¨å¤´
        columns: [
          {
@@ -188,12 +179,26 @@
          {
            title:'父节点编号',
            align:"center",
            dataIndex: 'parentWarehouseId'
            dataIndex: 'parentWarehouseId',
            customRender:function (text,r) {
              if (r.parentId === '-1') {
                return '-1';
              } else {
                return text;
              }
            }
          },
          {
            title:'父节点名称',
            align:"center",
            dataIndex: 'parentWarehouseName'
            dataIndex: 'parentWarehouseName',
            customRender:function (text,r) {
              if (r.parentId === '-1') {
                return '航宇救生';
              } else {
                return text;
              }
            }
          },
          {
            title:'状态',
@@ -214,10 +219,7 @@
          {
            title:'创建时间',
            align:"center",
            dataIndex: 'createTime',
            customRender:function (text) {
              return !text?"":(text.length>10?text.substr(0,10):text)
            }
            dataIndex: 'createTime'
          },
          {
            title: '操作',
@@ -254,30 +256,41 @@
      }
    },
    mounted() {
      this.$bus.$on('getCurrSelected', (data) => {
        console.log(data)
      this.handleGetCurrSelected = (data) => {
        this.treeSelected = data;
        this.queryParam.parentId = data.key;
        this.loadData();
      });
      }
      this.$bus.$on('getCurrSelected', this.handleGetCurrSelected);
    },
    beforeDestroy() {
      this.$bus.$off('getCurrSelected', {});
      this.$bus.$off('getCurrSelected', this.handleGetCurrSelected);
    },
    methods: {
      handleStatus(record) {
        const params = {
          id: record.id,
          status: record.status === '1' ? '2' : '1'
        }
        putAction(this.url.edit, params).then((res) => {
        getAction(this.url.list, { parentId: record.id }).then((res) => {
          if (res.success) {
            this.$message.success(res.message)
            this.loadData()
            if (res.result.total > 0) {
              this.$message.warning('该节点下存在子节点,不能变更状态!')
            } else {
              const params = {
                id: record.id,
                status: record.status === '1' ? '2' : '1'
              }
              putAction(this.url.edit, params).then((res) => {
                if (res.success) {
                  this.$message.success(res.message)
                  this.loadData()
                } else {
                  this.$message.warning(res.message)
                }
              })
            }
          } else {
            this.$message.warning(res.message)
            this.$message.warning(res.message);
          }
        })
        });
      },
      handleDelete(id) {
        getAction(this.url.list, { parentId: id }).then((res) => {
@@ -301,24 +314,11 @@
          }
        })
      },
      // onBeginTimeChange(date, dateString) {
      //   this.queryParam.begin_time = dateString[0]
      // },
      // onEndTimeChange(date, dateString) {
      //   this.queryParam.end_time = dateString[0]
      // },
      searchReset() {
        const now = moment()
        const lastWeek = now.clone().subtract(7,'days')
        this.queryParam = {
          beginTime: lastWeek.format('YYYY-MM-DD HH:mm'),
          endTime: now.format('YYYY-MM-DD HH:mm'),
          warehouseName: '',
          parentId: ''
          parentId: this.treeSelected.key
        }
        this.treeSelected = {}
        this.loadData(1)
        this.$bus.$emit('clearTreeSelection')
      },
      modalFormOk() {
        this.loadData()
src/views/tms/WarehouseTree.vue
@@ -295,11 +295,9 @@
  },
  mounted() {
    this.$bus.$on('queryTreeData', this.queryTreeData);
    this.$bus.$on('clearTreeSelection', this.onClearSelected)
  },
  beforeDestroy() {
    this.$bus.$off('queryTreeData', this.queryTreeData);
    this.$bus.$off('clearTreeSelection', this.onClearSelected)
  },
  //监听
  watch: {
src/views/tms/modules/GoodsShelvesForm.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,164 @@
<template>
  <a-spin :spinning="confirmLoading">
    <j-form-container :disabled="formDisabled">
      <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">
              <a-input :disabled="true" v-model="model.warehouseNum" placeholder="请输入仓库编号"  ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="仓库名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input :disabled="true" v-model="model.warehouseName" placeholder="请输入仓库名称"  ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="库位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationCode">
              <a-input v-model="model.locationCode" placeholder="请输入库位号"  ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="层数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="storey">
              <a-input v-model="model.storey" placeholder="请输入层数"  ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="排数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="arrange">
              <a-input v-model="model.arrange" placeholder="请输入排数"  ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="列数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="columnNumber">
              <a-input v-model="model.columnNumber" placeholder="请输入列数"  ></a-input>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row>
          <a-col :span="12">
            <a-form-model-item label="货架编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shelfNumber">
              <a-input v-model="model.shelfNumber" placeholder="请输入货架编号"  ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="货架名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shelfName">
              <a-input v-model="model.shelfName" placeholder="请输入货架名称"  ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
              <a-textarea v-model="model.remark" rows="4" placeholder="请输入备注" />
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-form-model>
    </j-form-container>
  </a-spin>
</template>
<script>
  import { httpAction, getAction } from '@/api/manage'
  import { validateDuplicateValue } from '@/utils/util'
  export default {
    name: 'GoodsShelvesForm',
    components: {
    },
    props: {
      //表单禁用
      disabled: {
        type: Boolean,
        default: false,
        required: false
      }
    },
    data () {
      return {
        model:{
         },
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
        },
        confirmLoading: false,
        validatorRules: {
           warehouseId: [
              { required: true, message: '请输入仓库编号!'},
           ],
           locationCode: [
              { required: true, message: '请输入库位号!'},
           ],
           storey: [
              { required: true, message: '请输入层数!'},
           ],
           arrange: [
              { required: true, message: '请输入排数!'},
           ],
           columnNumber: [
              { required: true, message: '请输入列数!'},
           ],
        },
        url: {
          add: "/tms/goodsShelves/add",
          edit: "/tms/goodsShelves/edit",
          queryById: "/tms/goodsShelves/queryById"
        }
      }
    },
    computed: {
      formDisabled(){
        return this.disabled
      },
    },
    created () {
       //备份model原始值
      this.modelDefault = JSON.parse(JSON.stringify(this.model));
    },
    methods: {
      add (treeSelected) {
        this.modelDefault.warehouseId = treeSelected.key
        this.modelDefault.warehouseNum = treeSelected.entity.warehouseId
        this.modelDefault.warehouseName = treeSelected.entity.warehouseName
        this.edit(this.modelDefault);
      },
      edit (record) {
        this.model = Object.assign({}, record);
        this.visible = true;
      },
      submitForm () {
        const that = this;
        // è§¦å‘表单验证
        this.$refs.form.validate(valid => {
          if (valid) {
            that.confirmLoading = true;
            let httpurl = '';
            let method = '';
            if(!this.model.id){
              httpurl+=this.url.add;
              method = 'post';
            }else{
              httpurl+=this.url.edit;
               method = 'put';
            }
            httpAction(httpurl,this.model,method).then((res)=>{
              if(res.success){
                that.$message.success(res.message);
                that.$emit('ok');
              }else{
                that.$message.warning(res.message);
              }
            }).finally(() => {
              that.confirmLoading = false;
            })
          }
        })
      },
    }
  }
</script>
src/views/tms/modules/GoodsShelvesModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,66 @@
<template>
  <j-modal
    :title="title"
    :width="width"
    :visible="visible"
    switchFullscreen
    @ok="handleOk"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    @cancel="handleCancel"
    cancelText="关闭">
    <goods-shelves-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></goods-shelves-form>
  </j-modal>
</template>
<script>
  import GoodsShelvesForm from './GoodsShelvesForm'
  export default {
    name: 'GoodsShelvesModal',
    components: {
      GoodsShelvesForm
    },
    props: {
      treeSelected: {
        type: Object,
        default: {}
      }
    },
    data () {
      return {
        title:'',
        width:896,
        visible: false,
        disableSubmit: false
      }
    },
    methods: {
      add () {
        this.visible=true
        this.$nextTick(()=>{
          this.$refs.realForm.add(this.treeSelected);
        })
      },
      edit (record) {
        this.visible=true
        this.$nextTick(()=>{
          this.$refs.realForm.edit(record);
        })
      },
      close () {
        this.$emit('close');
        this.visible = false;
      },
      handleOk () {
        this.$refs.realForm.submitForm();
      },
      submitCallback(){
        this.$emit('ok');
        this.visible = false;
      },
      handleCancel () {
        this.close()
      }
    }
  }
</script>
src/views/tms/modules/WarehouseForm.vue
@@ -25,7 +25,7 @@
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="叶子节点标识" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leafFlag">
              <a-radio-group v-model="model.leafFlag" placeholder="请选择是否叶子节点">
              <a-radio-group :disabled="leafDisableFlag" v-model="model.leafFlag" placeholder="请选择是否叶子节点">
                <a-radio :value="'2'">有子节点</a-radio>
                <a-radio :value="'1'">是叶子节点</a-radio>
              </a-radio-group>
@@ -66,6 +66,7 @@
    },
    data () {
      return {
        leafDisableFlag: false,
        model:{
         },
        labelCol: {
@@ -80,6 +81,7 @@
        validatorRules: {
           warehouseId: [
              { required: true, message: '请输入仓库编号!'},
              { validator: (rule, value, callback) => validateDuplicateValue('tms_warehouse', 'warehouse_id', value, this.model.id, callback)}
           ],
           warehouseName: [
              { required: true, message: '请输入仓库名称!'},
@@ -95,6 +97,7 @@
           ],
        },
        url: {
          list: "/tms/warehouse/list",
          add: "/tms/warehouse/add",
          edit: "/tms/warehouse/edit",
          queryById: "/tms/warehouse/queryById"
@@ -104,13 +107,24 @@
    computed: {
      formDisabled(){
        return this.disabled
      },
      }
    },
    created () {
       //备份model原始值
      this.modelDefault = JSON.parse(JSON.stringify(this.model));
    },
    methods: {
      async updateLeafDisableFlag() {
        const parentId = this.model.id;
        try {
          const res = await getAction(this.url.list, { parentId: parentId });
          if (res.success) {
            this.leafDisableFlag = res.result.total > 0;
          }
        } catch (e) {
          console.error(e);
        }
      },
      add (treeSelected) {
        this.modelDefault.parentId = treeSelected.key
        this.modelDefault.parentWarehouseId = treeSelected.entity.warehouseId
@@ -118,6 +132,10 @@
        this.edit(this.modelDefault);
      },
      edit (record) {
        if (record.parentId === '-1') {
          record.parentWarehouseId = '-1'
          record.parentWarehouseName = '航宇救生'
        }
        this.model = Object.assign({}, record);
        this.visible = true;
      },
@@ -137,7 +155,6 @@
              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);
@@ -152,6 +169,13 @@
        })
      },
    },
    watch: {
      'model.id': function(newVal) {
        if (newVal) {
          this.updateLeafDisableFlag()
        }
      }
    }
  }
</script>