cuijian
2025-07-01 0211b730e5f0b1f10a8a3243e30fe599e22f2238
src/views/base/modules/warehouse/WarehouseModel.vue
@@ -15,12 +15,12 @@
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="{span:3}"
              :wrapperCol="{span:21}"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="线边库编号"
            >
              <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入线边库编号"
                v-decorator="['warehouseCode', validatorRules.warehouseCode ]"
@@ -32,12 +32,12 @@
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="{span:3}"
              :wrapperCol="{span:21}"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="线边库名称"
            >
              <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入线边库名称"
                v-decorator="['warehouseName', validatorRules.warehouseName ]"
@@ -46,19 +46,20 @@
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="12">
          <a-col :span="24">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="产线"
            >
            <j-dict-select-tag
                type="list"
            <j-select-factory
            :disabled="disableSubmit"
                v-model="model.factoryId"
                :trigger-change="true"
                dictCode="base_factory,factory_name,id"
                placeholder="请选择产线"
              />
            :multi="true"
            @back="backFactoryInfo"
            :backProduction="true"
            :treeProductOpera="true"
          ></j-select-factory>
            </a-form-item>
          </a-col>
        </a-row>
@@ -74,12 +75,14 @@
import moment from 'moment'
import { duplicateCheck } from '@/api/api'//重复校验
import JTreeDict from '@/components/jeecg/JTreeDict'//分类字典树形下拉组件
import JSelectFactory from '../../../../components/jeecgbiz/JSelectFactory'
export default {
  name: "WarehouseModal",
  components: {
    JDate,
    JTreeDict,
    JSelectFactory
  },
  data() {
    return {
@@ -91,11 +94,11 @@
      warehouseId: "", //保存线边库id
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 },
          sm: { span: 5 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 18 },
          sm: { span: 16 },
      },
      confirmLoading: false,
@@ -120,6 +123,7 @@
        add: "/base/lineSideWarehouse/add",
        edit: "/base/lineSideWarehouse/edit",
      },
      nextFactoryOptions: [],
    }
  },
  created() {
@@ -212,6 +216,17 @@
        }
      })
    },
     backFactoryInfo(info) {
        this.model.factoryIds = this.model.factoryId
        this.nextFactoryOptions = info.map((item, index, arr) => {
          let c = { label: item.text, value: item.value + '' }
          return c
        })
      },
      // 关闭弹窗时清除表单校验
    removeValidate() {
      if (this.$refs.form) this.$refs.form.clearValidate()
    }
  }
}
</script>