schangxiang@126.com
2024-04-25 0e394ed580b09329ecaa8476bbb6334f8212b009
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue
@@ -1,12 +1,12 @@
<template>
  <a-modal title="新增基础物料信息" :width="900" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
  <a-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
    @cancel="handleCancel">
    <a-spin :spinning="confirmLoading">
      <!-- tab -->
      <a-tabs default-active-key="1" @change="callbacktab">
        <a-tab-pane key="1" tab="基本信息">
          <!-- <add-form ref="addFormRef" @ok="handleOk" /> -->
          <!-- 基本信息 -->
          <!-- 基本信息  layout="inline"  layout="vertical" -->
          <a-form :form="form">
            <a-form-item label="物料名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
              <a-input placeholder="请输入物料名称"
@@ -142,9 +142,12 @@
  },
  created() {
    this.materialTypeDataList()
    const materialTypeOption = this.$options
    this.materialTypeData2 = materialTypeOption.filters['dictData']('abc_class_type')
  },
  data() {
    return {
      title: '',
      labelCol: {
        // xs: { span: 24 },
        // sm: { span: 5 }
@@ -161,7 +164,8 @@
      stationNameParameterData: [],
      visible: false,
      confirmLoading: false,
      form: this.$form.createForm(this)
      form: this.$form.createForm(this),
      materialTypeData2:[]
    }
  },
  methods: {
@@ -207,14 +211,20 @@
    handleOk() { },
    // 初始化方法
    add(record) {
      this.visible = true
      // this.$nextTick(() => {
      //   // this.getSelects()
      // })
      const materialTypeOption = this.$options
      this.materialTypeData2 = materialTypeOption.filters['dictData']('abc_class')
      // const inspectionMethodOption = this.$options
      // this.inspectionMethodData = inspectionMethodOption.filters['dictData']('material_inspection')
      if (record) {//编辑
        this.title = '编辑基础物料信息';
        this.$nextTick(() => {
          this.form.setFieldsValue({
            ...record
          })
        })
      } else { // 新增
        this.title = '新增基础物料信息';
      }
    },
    getSelects() {
      if (this.areaNameParameterData.length <= 0 || this.stationNameParameterData.length <= 0) {
@@ -274,7 +284,7 @@
            BaseCustomerList = this.$refs.addFormBaseCustomer.list
          }
          console.log(6666666666666 + '客户档案集合')
          console.log(6666666666666 + '往来关系集合')
          // console.log(6666666666666 + '包装关系')
          // console.log(this.$refs.addFormContainerPackagingRef.list)
@@ -283,7 +293,7 @@
            MaterialInput: values,
            ControlRuleld: ControlRuleld, //控制属性
            SubstituteGoodList: SubstituteGoodList, //替代品
            BaseCustomerList: BaseCustomerList, //客户档案集合
            BaseCustomerList: BaseCustomerList, //往来关系集合
            // ContainerPackagingList: this.$refs.addFormContainerPackagingRef.list //包装关系
          }
          this.confirmLoading = true
@@ -327,3 +337,10 @@
  }
}
</script>
<style lang="less" scoped>
.ant-row.ant-form-item {
  width: 50% !important;
  display: inline-block;
}
</style>