liuying
2024-04-24 d86353384f4071a3cea77e6151e1a7bda4486501
物料tab
已修改7个文件
218 ■■■■ 文件已修改
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/addForm.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/WmsContainerPackaging/addFormContainerPackaging.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/WmsControlRule/details.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/WmsSubstituteGood/addForm.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/WmsSubstituteGood/addFormWmsSubstituteGood.vue 89 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/addForm.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/addForm.vue
@@ -1,18 +1,15 @@
<template>
  <a-modal
    title="新增物料信息表"
    :width="900"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @ok="handleSubmit"
  <a-modal title="新增物料信息表" :width="900" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
    @cancel="handleCancel">
    <a-spin :spinning="confirmLoading">
        <a-form :form="form">
        <a-form-item label="物料名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入物料名称" v-decorator="['materialName', {rules: [{required: true, message: '请输入物料名称!'}]}]" />
          <a-input placeholder="请输入物料名称"
            v-decorator="['materialName', { rules: [{ required: true, message: '请输入物料名称!' }] }]" />
        </a-form-item>
        <a-form-item label="物料编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入物料编号" v-decorator="['materialCode', {rules: [{required: true, message: '请输入物料编号!'}]}]" />
          <a-input placeholder="请输入物料编号"
            v-decorator="['materialCode', { rules: [{ required: true, message: '请输入物料编号!' }] }]" />
        </a-form-item>
        <a-form-item label="ERP编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入ERP编号" v-decorator="['erpCode']" />
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue
@@ -1,12 +1,6 @@
<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="callbacktab">
@@ -16,16 +10,12 @@
          <!-- 基本信息 -->
          <a-form :form="form">
            <a-form-item label="物料名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
              <a-input
                placeholder="请输入物料名称"
                v-decorator="['materialName', { rules: [{ required: true, message: '请输入物料名称!' }] }]"
              />
              <a-input placeholder="请输入物料名称"
                v-decorator="['materialName', { rules: [{ required: true, message: '请输入物料名称!' }] }]" />
            </a-form-item>
            <a-form-item label="物料编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
              <a-input
                placeholder="请输入物料编号"
                v-decorator="['materialCode', { rules: [{ required: true, message: '请输入物料编号!' }] }]"
              />
              <a-input placeholder="请输入物料编号"
                v-decorator="['materialCode', { rules: [{ required: true, message: '请输入物料编号!' }] }]" />
            </a-form-item>
            <a-form-item label="ERP编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
              <a-input placeholder="请输入ERP编号" v-decorator="['erpCode']" />
@@ -93,7 +83,7 @@
          需求待定
        </a-tab-pane>
        <a-tab-pane key="4" tab="替代品管理">
          <add-form-sub ref="addFormWmsSubstituteGood" @ok="handleOk" />
          <add-form-sub ref="addFormWmsSubstituteGoodRef" @ok="handleOk" />
        </a-tab-pane>
        <a-tab-pane key="5" tab="客户">
          <add-form-base-customer ref="addFormBaseCustomer" @ok="handleOk" />
@@ -149,8 +139,6 @@
      if (e == 6) {
        this.$nextTick(() => {
          // 调接口 传物料类型
          console.log(99999999999999)
          console.log(this.data)
          const {
            form: { validateFields }
          } = this
@@ -162,37 +150,39 @@
                  values[key] = JSON.stringify(values[key])
                }
              }
              console.log(22222222222222222)
              console.log(values)
              this.confirmLoading = false
              // var res1 = this.$refs.addFormRef.handleSubmit2()
              // console.log("5555555")
              // console.log( res1 )
              // console.log(this.$refs.addFormRef.data)
              // console.log(this.$refs.addFormRef.form.materialType)
              this.$refs.addFormContainerPackagingRef.initShow(values.materialType)
              // WmsMaterialAdd(values).then((res) => {
              //   if (res.success) {
              //     this.$message.success('新增成功')
              //     this.confirmLoading = false
              //     this.$emit('ok', values)
              //     this.handleCancel()
              //   } else {
              //     this.$message.error('新增失败:' + JSON.stringify(res.message))
              //   }
              // }).finally((res) => {
              //   this.confirmLoading = false
              // })
              // return values
            } else {
              this.confirmLoading = false
            }
          })
        })
      }
      // 替代品
      if (e == 4) {
          const {
            form: { validateFields }
          } = this
          this.confirmLoading = true
          validateFields((errors, values) => {
            if (!errors) {
              for (const key in values) {
                if (typeof values[key] === 'object') {
                  values[key] = JSON.stringify(values[key])
                }
              }
              console.log(66666666666)
              console.log(values)
              this.confirmLoading = false
              debugger
              // materialName  materialCode
              this.$refs.addFormWmsSubstituteGoodRef.initShow(values.materialCode,values.materialName)
            } else {
              this.confirmLoading = false
            }
        })
      }
    },
@@ -252,7 +242,7 @@
          var ControlRuleld = this.$refs.WmsControlRule.selectedRows[0].id
          console.log(6666666666666 + '替代品')
          console.log(this.$refs.addFormWmsSubstituteGood.list)
          console.log(this.$refs.addFormWmsSubstituteGoodRef.list)
          console.log(6666666666666 + '客户档案集合')
          console.log(this.$refs.addFormBaseCustomer.list)
@@ -263,7 +253,7 @@
          var param = {
            MaterialInput: values,
            ControlRuleld: ControlRuleld, //控制属性
            SubstituteGoodLis: this.$refs.addFormWmsSubstituteGood.list, //替代品
            SubstituteGoodLis: this.$refs.addFormWmsSubstituteGoodRef.list, //替代品
            BaseCustomerList: this.$refs.addFormBaseCustomer.list, //客户档案集合
            ContainerPackagingList: this.$refs.addFormContainerPackagingRef.list //包装关系
          }
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/WmsContainerPackaging/addFormContainerPackaging.vue
@@ -202,7 +202,6 @@
      }
    },
    initShow(materialType) {
      alert(1)
      if(materialType==''||materialType==null||materialType==undefined){
        this.$message.warning("请选择物料类型")
        return
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/WmsControlRule/details.vue
@@ -61,7 +61,6 @@
      })
    },
    handleOk(){
      alert("2")
    },
    handleSubmit() {
      const {
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/WmsSubstituteGood/addForm.vue
@@ -1,10 +1,5 @@
<template>
 <a-modal
    title="新增替代品管理"
    :width="900"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @ok="handleSubmit"
  <a-modal title="新增物料-替代品管理" :width="900" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
    @cancel="handleCancel">
    <a-spin :spinning="confirmLoading">
@@ -13,12 +8,14 @@
        <a-input placeholder="请输入替代编号"
          v-decorator="['substituteCode', { rules: [{ required: true, message: '请输入替代编号!' }] }]" />
      </a-form-item>
      <a-form-item label="物料编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
        <a-input placeholder="请输入物料编号" v-decorator="['materialCode', { rules: [{ required: true, message: '请输入物料编号!' }] }]" />
      <!-- <a-form-item label="物料编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
        <a-input placeholder="请输入物料编号"
          v-decorator="['materialCode', { rules: [{ required: true, message: '请输入物料编号!' }] }]" />
      </a-form-item>
      <a-form-item label="物料名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
        <a-input placeholder="请输入物料名称" v-decorator="['materialName', { rules: [{ required: true, message: '请输入物料名称!' }] }]" />
      </a-form-item>
        <a-input placeholder="请输入物料名称"
          v-decorator="['materialName', { rules: [{ required: true, message: '请输入物料名称!' }] }]" />
      </a-form-item> -->
      <a-form-item label="替代品物料编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
        <a-input placeholder="请输入替代品物料编号"
          v-decorator="['substituteMaterialCode', { rules: [{ required: true, message: '请输入替代品物料编号!' }] }]" />
@@ -64,9 +61,23 @@
    // 初始化方法
    add(record) {
      this.visible = true
      this.$nextTick(() => {
      });
      this.$nextTick(() => {
        this.form.setFieldsValue(
          {
            materialCode: record.materialCode,
            materialName: record.materialName,
            // id: record.id,
            substituteCode: "",
            substituteMaterialCode: "",
            substituteMaterialName: "",
            substituteIndex: "",
            isDisabled: ""
          }
        )
      })
    },
    /**
     * 提交表单
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/WmsSubstituteGood/addFormWmsSubstituteGood.vue
@@ -7,6 +7,9 @@
        <!-- <span style="font-weight:bold;cursor:default;">
          <a style="cursor:default;">{{ row.no }}</a>单据详情
        </span> -->
        物料编号: {{  materialCode }}
        物料名称: {{    materialName }}
        <div style="margin-top: 10px;">
          <a-table :columns="columns" :data-source="list" row-key="id" :pagination="false" :scroll="{ x: true }">
            <template slot="index" slot-scope="text, record, index">{{ index + 1 }}</template>
@@ -89,46 +92,46 @@
                    sorter: true,
                    dataIndex: 'substituteCode'
                },
                {
                    title: '物料编号',
                    align: 'center',
                    customHeaderCell: () => {
                        return {
                            style: {
                                'min-width': '120px'//最小列宽设置
                            }
                        }
                    },
                    customCell: () => {
                        return {
                            style: {
                                'min-width': '120px'//最小列宽设置
                            }
                        }
                    },
                    sorter: true,
                    dataIndex: 'materialCode'
                },
                {
                    title: '物料名称',
                    align: 'center',
                    customHeaderCell: () => {
                        return {
                            style: {
                                'min-width': '120px'//最小列宽设置
                            }
                        }
                    },
                    customCell: () => {
                        return {
                            style: {
                                'min-width': '120px'//最小列宽设置
                            }
                        }
                    },
                    sorter: true,
                    dataIndex: 'materialName'
                },
                // {
                //     title: '物料编号',
                //     align: 'center',
                //     customHeaderCell: () => {
                //         return {
                //             style: {
                //                 'min-width': '120px'//最小列宽设置
                //             }
                //         }
                //     },
                //     customCell: () => {
                //         return {
                //             style: {
                //                 'min-width': '120px'//最小列宽设置
                //             }
                //         }
                //     },
                //     sorter: true,
                //     dataIndex: 'materialCode'
                // },
                // {
                //     title: '物料名称',
                //     align: 'center',
                //     customHeaderCell: () => {
                //         return {
                //             style: {
                //                 'min-width': '120px'//最小列宽设置
                //             }
                //         }
                //     },
                //     customCell: () => {
                //         return {
                //             style: {
                //                 'min-width': '120px'//最小列宽设置
                //             }
                //         }
                //     },
                //     sorter: true,
                //     dataIndex: 'materialName'
                // },
                {
                    title: '替代品物料编号',
                    align: 'center',
@@ -231,7 +234,10 @@
        this.afterClsoe()
      }
    },
    initShow() {
    initShow(materialCode,materialName) {
      this.materialCode = materialCode
      this.materialName = materialName
      this.loading = true
      this.getList(() => {
        this.loading = false
@@ -258,7 +264,6 @@
    },
    handleSubmit(item) {
      alert(1)
      this.list.push(item) 
      this.visible = false
    },
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/addForm.vue
@@ -98,7 +98,6 @@
      });
    },
    handleSubmit2(){
      alert(this.form)
      console.log( 99999999999999)
      console.log( this.data)
      const { form: { validateFields } } = this