schangxiang@126.com
2024-04-24 1d5806bb69891d4045438b12c15cd42cc937e5a2
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue
@@ -1,32 +1,27 @@
<template>
  <a-modal
    title="新增物料信息"
    :width="900"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @ok="handleSubmit"
    @cancel="handleCancel"
  >
  <a-modal title="新增物料信息" :width="900" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
    @cancel="handleCancel">
    <a-spin :spinning="confirmLoading">
      <!-- tab -->
      <a-tabs default-active-key="1" @change="callback">
      <!-- tab @change="callback"-->
      <a-tabs default-active-key="1">
        <a-tab-pane key="1" tab="基本信息">
         <add-form ref="addForm" @ok="handleOk" />
          <add-form ref="addForm" @ok="handleOk" />
        </a-tab-pane>
        <a-tab-pane key="2" tab="控制属性" force-render>
          Content of Tab Pane 2
          <add-control-rule ref="WmsControlRule" @ok="handleOk" />
        </a-tab-pane>
        <a-tab-pane key="3" tab="批次属性">
          Content of Tab Pane 3
          需求待定
        </a-tab-pane>
        <a-tab-pane key="4" tab="替代品管理">
          Content of Tab Pane 4
          <add-form-sub ref="addFormWmsSubstituteGood" @ok="handleOk" />
        </a-tab-pane>
        <a-tab-pane key="5" tab="客户">
          Content of Tab Pane 5
          <add-form-base-customer ref="addFormBaseCustomer" @ok="handleOk" />
        </a-tab-pane>
        <a-tab-pane key="7" tab="包装关系">
          Content of Tab Pane 6
          <add-form-container-packaging ref="addFormContainerPackaging" @ok="handleOk" />
        </a-tab-pane>
      </a-tabs>
@@ -37,13 +32,18 @@
<script>
import { WmsMaterialAdd, GetAreas, GetStations } from '@/api/modular/main/WmsMaterialManage'
import addForm from './tabItem/addForm.vue'
import addFormBaseCustomer from './tabItem/addFormBaseCustomer/addFormBaseCustomer.vue'
import addFormContainerPackaging from './tabItem/WmsContainerPackaging/addFormContainerPackaging.vue'
import addFormSub from './tabItem/WmsSubstituteGood/addFormWmsSubstituteGood.vue'
import addControlRule from './tabItem/WmsControlRule/index.vue'
export default {
  components: {
    // STable,
    addForm,
    // editForm,
    // excelForm
    addFormBaseCustomer,
    addFormContainerPackaging,
    addFormSub,
    addControlRule
  },
  data() {
    return {
@@ -67,6 +67,9 @@
    }
  },
  methods: {
    handleOk() {
    },
    // 初始化方法
    add(record) {
      this.visible = true
@@ -116,7 +119,27 @@
            })
            values.stationNameParameter = values.stationNameParameterArr.join(',')
          }
          WmsMaterialAdd(values)
          console.log(6666666666666)
          console.log()
          console.log(6666666666666 + '控制属性')
          console.log(this.$refs.WmsControlRule.selectedRows)
          var ControlRuleld = this.$refs.WmsControlRule.selectedRows[0].id;
          console.log(6666666666666 + '替代品')
          console.log(this.$refs.addFormWmsSubstituteGood.list)
          console.log(6666666666666 + '客户档案集合')
          console.log(this.$refs.addFormBaseCustomer.list)
          var param = {
            value1: values,
            ControlRuleld: ControlRuleld, //控制属性
            BaseCustomerList: this.$refs.addFormBaseCustomer.list, //客户档案集合
            SubstituteGoodLis: this.$refs.addFormWmsSubstituteGood.list, //替代品
            value5: {},
            value6: {},
          }
          WmsMaterialAdd(param)
            .then(res => {
              if (res.success) {
                this.$message.success('新增成功')