修复 单据超链接打开编辑页面关闭后 单据错误选中的问题
收料通知单 发货通知单 单据编辑 子表物料 f7打开页面修改为iframe方式打开物料模块
15个文件已修改
283 ■■■■ 已修改文件
src/router/index.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ICMO/ScICMOBillEdit.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ICMO/ScICMOBillList.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/gyEmployee/gyEmployee.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/gyStockPlace/gyStockPlace.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/gyWarehouse/gyWarehouse.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/gyMaterial/GyMaterial.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/cgPoInStockBill/cgPoInStockBill.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/cgPoInStockBill/cgPoInStockBillEdit.vue 102 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/cgPoOrderBill/cgPoOrderBill.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sell/XsSeOutStockBackBillEdit.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sell/XsSeOutStockBackBillList.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sell/XsSeOutStockBill.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sell/XsSeOutStockBillEdit.vue 87 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sell/xsSeOrderBill/xsSeOrderBill.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js
@@ -558,7 +558,12 @@
        name: 'IframeGyWarehouse',
        meta: { title: '仓库列表', noCache: true, noLoading: true }
      },
      {
        path: 'GyMaterial',
        component: () => import("@/views/gyMaterial/GyMaterial"), // 物料
        name: 'IframeGyMaterial',
        meta: { title: '物料列表', noCache: true, noLoading: true }
      },
    ]
  },    // 客户
  {
src/views/ICMO/ScICMOBillEdit.vue
@@ -952,7 +952,8 @@
    close() {
      this.reset();
      if (window.self != window.top) {
        window.parent.editGyClose;
        // iframe页面
        window.parent.editGyClose();
      } else if (!this.OperationType2 && !this.copyType) {
        // this.$router.back()
        window.close();
src/views/ICMO/ScICMOBillList.vue
@@ -576,7 +576,7 @@
                }}</span>
                <el-button
                  type="text"
                  @click="handleEdit(row, (OperationType = 3))"
                  @click.stop="handleEdit(row, (OperationType = 3))"
                  v-else-if="column.property == '单据号'"
                  >{{ row.单据号 }}</el-button
                >
@@ -625,7 +625,7 @@
          @editCloseGy="editGyClose"
          v-if="editShow"
        /> -->
        <div style="height: 80vh" v-if="openEdit">
        <div style="height: 70vh" v-if="openEdit">
          <iframe :src="iframeUrl" width="100%" height="100%" frameborder="0"></iframe>
        </div>
      </el-dialog>
src/views/basic/gyEmployee/gyEmployee.vue
@@ -353,7 +353,7 @@
                }}</span>
                <el-button
                  type="text"
                  @click="handleEdit(row, (OperationType = 3))"
                  @click.stop="handleEdit(row, (OperationType = 3))"
                  v-else-if="column.property == '职员代码'"
                  >{{ row.职员代码 }}</el-button
                >
@@ -1055,7 +1055,7 @@
      if (this.openPage) {
        this.$emit("deptEmitDb", row, 4);
      } else {
        this.handleEdit();
        this.handleEdit(row);
      }
    },
    // 多选框选中数据
@@ -1250,7 +1250,8 @@
      });
    },
    //打开修改组件弹窗
    handleEdit() {
    handleEdit(row) {
      this.rowForm = row
      this.$nextTick(() => {
        this.openEdit = true;
        this.editShow = true;
src/views/basic/gyStockPlace/gyStockPlace.vue
@@ -302,7 +302,7 @@
                }}</span>
                <el-button
                  type="text"
                  @click="handleEdit(row, (OperationType = 3))"
                  @click.stop="handleEdit(row, (OperationType = 3))"
                  v-else-if="column.property == '仓位代码'"
                  >{{ row.仓位代码 }}</el-button
                >
@@ -989,7 +989,7 @@
      if (this.openPage) {
        this.$emit("deptEmitDb", row, 9);
      } else {
        this.handleEdit();
        this.handleEdit(row);
      }
    },
    // 多选框选中数据
@@ -1188,7 +1188,8 @@
      });
    },
    //打开修改组件弹窗
    handleEdit() {
    handleEdit(row) {
      this.rowForm = row
      this.$nextTick(() => {
        this.openEdit = true;
        this.editShow = true;
src/views/basic/gyWarehouse/gyWarehouse.vue
@@ -362,7 +362,7 @@
                }}</span>
                <el-button
                  type="text"
                  @click="handleEdit(row, (OperationType = 3))"
                  @click.stop="handleEdit(row, (OperationType = 3))"
                  v-else-if="column.property == '仓库代码'"
                  >{{ row.仓库代码 }}</el-button
                >
@@ -1066,7 +1066,7 @@
      if (this.openPage) {
        this.$emit("deptEmitDb", row, 2);
      } else {
        this.handleEdit();
        this.handleEdit(row);
      }
    },
    // 多选框选中数据
@@ -1263,7 +1263,8 @@
      });
    },
    //打开修改组件弹窗
    handleEdit() {
    handleEdit(row) {
      this.rowForm = row
      this.$nextTick(() => {
        this.openEdit = true;
        this.editShow = true;
src/views/gyMaterial/GyMaterial.vue
@@ -1190,7 +1190,7 @@
    },
    
    // 物料代码点击
     handleMaterialCodeClick(row) {
    handleMaterialCodeClick(row) {
    this.selectedRow = row;
    this.OperationType = 3;
    this.currentEditId = row.HItemID;
@@ -1201,6 +1201,10 @@
    
    handleRowClick(row, column, event) {
      if (this.checkIsIframe()) {
        // 将当前选中的数据暴露到window中
        window.selectedRow = row;
      }
      this.$refs.tableData.toggleRowSelection(row);
      this.selectedRow = row;
      this.getFileList(row.物料代码);
@@ -1269,6 +1273,11 @@
    
    // 双击行
    handleDblclick(row, column, cell, event) {
      if (this.checkIsIframe()) {
        // IFrame 双击 返回当前双击的数据
        window.parent.iFrameMaterialCallback(row);
        return;
      }
      this.handleMaterialCodeClick(row);
    },
@@ -1384,7 +1393,13 @@
    
    getDefaultFilterScheme() {
      this.currentFilterScheme = "当前过滤方案:默认方案";
    }
    },
    checkIsIframe() {
      if (window.self == window.top) {
        return false;
      }
      return true;
    },
  },
};
</script>
src/views/purchase/cgPoInStockBill/cgPoInStockBill.vue
@@ -461,7 +461,7 @@
                }}</span>
                <el-button
                  type="text"
                  @click="handleEdit(row, (OperationType = 3), (copyType = 1))"
                  @click.stop="handleEdit(row, (OperationType = 3), (copyType = 1))"
                  v-else-if="column.property == '单据号'"
                  >{{ row.单据号 }}</el-button
                >
@@ -510,7 +510,7 @@
          @editCloseGy="editGyClose"
          v-if="editShow"
        /> -->
        <div style="height: 80vh" v-if="openEdit">
        <div style="height: 70vh" v-if="openEdit">
          <iframe :src="iframeUrl" frameborder="0" width="100%" height="100%"></iframe>
        </div>
      </el-dialog>
src/views/purchase/cgPoInStockBill/cgPoInStockBillEdit.vue
@@ -1,13 +1,13 @@
<template>
  <div v-loading="formLoading" v-if="formShow" style="padding: 20px">
    <div style="margin-bottom: 10px; border-bottom: 1px solid #f6f6f6">
      <el-button type="primary" @click="handleAdd((OperationType = 1))" v-if="addBtnShow"
      <!-- <el-button type="primary" @click="handleAdd((OperationType = 1))" v-if="addBtnShow"
        >新增</el-button
      >
      <el-button type="primary" @click="submitForm" :disabled="subDisabled"
        >保 存</el-button
      >
      <el-button type="primary" @click="set_CheckBill(0, form)">审 核</el-button>
      <el-button type="primary" @click="set_CheckBill(0, form)">审 核</el-button> -->
      <el-button type="primary" @click="close">退 出</el-button>
      <!-- <el-button @click="cancel">取 消</el-button> -->
    </div>
@@ -20,7 +20,7 @@
          <el-row>
            <el-col :span="6">
              <el-form-item label="单据号" prop="HBillNo">
                <el-input v-model="form.HBillNo" placeholder="请输入单据编号" />
                <el-input v-model="form.HBillNo" placeholder="请输入单据编号" disabled />
              </el-form-item>
            </el-col>
            <el-col :span="6">
@@ -53,17 +53,13 @@
            <el-col :span="6">
              <el-form-item label="供应商" prop="HSupName">
                <el-input v-model="form.HSupName" placeholder="请选择供应商" disabled>
                  <el-button
                    slot="append"
                    icon="el-icon-search"
                    @click="openDataDialog(1)"
                  ></el-button>
                  <el-button slot="append" icon="el-icon-search"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="币别" prop="HCurName">
                <el-input v-model="form.HCurName" placeholder="请输入联系电话">
                <el-input v-model="form.HCurName" placeholder="请选择币别" disabled>
                  <el-button slot="append" icon="el-icon-search"></el-button>
                </el-input>
              </el-form-item>
@@ -82,7 +78,7 @@
          <el-row>
            <el-col :span="6">
              <el-form-item label="仓库" prop="HWHName">
                <el-input v-model="form.HWHName" placeholder="请选择仓库">
                <el-input v-model="form.HWHName" placeholder="请选择仓库" disabled>
                  <el-button slot="append" icon="el-icon-search"></el-button>
                </el-input>
              </el-form-item>
@@ -309,6 +305,21 @@
            <span>{{ scope.row.HMoney }}</span>
          </template>
        </el-table-column>
         <el-table-column align="center" label="收料仓库" width="120">
          <template slot-scope="scope">
            <span>{{ scope.row['收料仓库'] }}</span>
          </template>
        </el-table-column>
        <el-table-column align="center" label="税率" width="120">
          <template slot-scope="scope">
            <span>{{ scope.row.HTaxRate }}</span>
          </template>
        </el-table-column>
        <el-table-column align="center" label="价税合计" width="120">
          <template slot-scope="scope">
            <span>{{ scope.row.HTaxMoney }}</span>
          </template>
        </el-table-column>
        <el-table-column align="center" label="备注" width="120">
          <template slot-scope="scope">
            <el-input v-model="scope.row.HRemark" placeholder="请输入备注" />
@@ -334,9 +345,18 @@
      width="1280px"
      append-to-body
    >
      <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="deptShow" />
      <!-- <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="deptShow" />
      <Warehouse @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="warehouseShow" />
      <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="materialShow" />
      <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="materialShow" /> -->
      <div style="height: 70vh" v-if="openData">
        <iframe
          :src="iframeUrl"
          frameborder="0"
          width="100%"
          height="100%"
          ref="iframeInstance"
        ></iframe>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="deptClickSub">确 定</el-button>
        <el-button @click="deptClose">取 消</el-button>
@@ -379,6 +399,9 @@
  },
  data() {
    return {
      dialogEnabledNum: -1,
      iframeUrl: "",
      iframeInstance: null,
      OperationType2: 1,
      HInterID2: 0,
      CopyType2: 1,
@@ -457,13 +480,33 @@
    // this.fetchData();
    this.getdata();
  },
  mounted() {
    window.iFrameMaterialCallback = (data) => {
      this.iFrameMaterialCallback(data); // 组件内的方法绑定到windows
    };
  },
  beforeDestroy() {
    if (window.parent) {
    delete window.iFrameMaterialCallback;
    if (window.parent != window.top) {
      // 通过IFrame打开
    } else {
      this.$destroy();
    }
  },
  methods: {
    iFrameMaterialCallback(data) {
      // 物料列表返回监听函数
      console.log("iFrameMaterialCallbackData: ", data);
      this.editData[this.zbIndex].HMaterID = data.HItemID;
      this.editData[this.zbIndex].物料代码 = data.物料代码;
      this.editData[this.zbIndex].物料名称 = data.物料名称;
      this.editData[this.zbIndex].HUnitID = data.HUnitID;
      this.editData[this.zbIndex].规格型号 = data.规格型号;
      this.editData[this.zbIndex].计量单位 = data.计量单位名称;
      this.editData[this.zbIndex].HTaxPrice = data.含税成本价;
      this.editData[this.zbIndex].HTaxRate = data.默认税率;
      this.deptClose();
    },
    fetchData() {
      axios
        .get(this.baseURL + "/Web/GetOrganizations", {})
@@ -548,7 +591,7 @@
                    HMoney: dataArray[i].金额.toFixed(2),
                    HTaxMoney: dataArray[i].价税合计.toFixed(2),
                    HWHID: dataArray[i].HWHID,
                    发货仓库: dataArray[i].HWHName,
                    收料仓库: dataArray[i].HWHName,
                    HRemark: "",
                    HQty_Full: "0",
                    HQty_Empty: "0",
@@ -664,7 +707,7 @@
        this.openData = false;
      } else if (num == 2) {
        this.editData[this.zbIndex].HWHID = deptRow.HItemID;
        this.editData[this.zbIndex].发货仓库 = deptRow.仓库名称;
        this.editData[this.zbIndex].收料仓库 = deptRow.仓库名称;
        this.openData = false;
      } else if (num == 3) {
        this.editData[this.zbIndex].HMaterID = deptRow.HItemID;
@@ -683,8 +726,25 @@
      this.deptform = deptRow;
    },
    deptClickSub() {
      this.dbEmitData(this.deptform, this.dialogTypeNum);
      this.deptform = {};
      // this.dbEmitData(this.deptform, this.dialogTypeNum);
      // this.deptform = {};
      let selectedRow = this.$refs.iframeInstance.contentWindow.selectedRow;
      console.log(selectedRow);
      if (this.dialogEnabledNum == 3) {
        // 修改选中物料对应子表数据
        this.editData[this.zbIndex].HMaterID = selectedRow.HItemID;
        this.editData[this.zbIndex].物料代码 = selectedRow.物料代码;
        this.editData[this.zbIndex].物料名称 = selectedRow.物料名称;
        this.editData[this.zbIndex].HUnitID = selectedRow.HUnitID;
        this.editData[this.zbIndex].规格型号 = selectedRow.规格型号;
        this.editData[this.zbIndex].计量单位 = selectedRow.计量单位名称;
        this.editData[this.zbIndex].HTaxPrice = selectedRow.含税成本价;
        this.editData[this.zbIndex].HTaxRate = selectedRow.默认税率;
      }
      selectedRow = null; // 手动置空,方便GC回收,防止泄露
      this.deptClose();
    },
    deptClose() {
      this.deptform = {};
@@ -1024,7 +1084,7 @@
          HMoney: 0,
          HTaxMoney: 0,
          HWHID: 0,
          发货仓库: "",
          收料仓库: "",
          HRemark: "",
          HQty_Full: 0,
          HQty_Empty: 0,
@@ -1158,9 +1218,9 @@
        if (valid) {
          let fhck = false;
          this.editData.map((item, index) => {
            if (!item.发货仓库) {
            if (!item.收料仓库) {
              fhck = true;
              this.$modal.msgError("第" + (index + 1) + "行:发货仓库未选择!");
              this.$modal.msgError("第" + (index + 1) + "行:收料仓库未选择!");
            }
          });
          this.$nextTick(() => {
@@ -1233,6 +1293,7 @@
    },
    //  打开数据列表弹窗
    openDataDialog(num, row) {
      this.dialogEnabledNum = num;
      if (row) {
        this.zbIndex = row.index - 1;
      }
@@ -1247,6 +1308,7 @@
        this.openData = true;
      } else if (num == 3) {
        this.dialogTitle = "物料列表";
        this.iframeUrl = `/iframe/GyMaterial?openType=2`;
        this.materialShow = true;
        this.openData = true;
      }
src/views/purchase/cgPoOrderBill/cgPoOrderBill.vue
@@ -475,7 +475,7 @@
                }}</span>
                <el-button
                  type="text"
                  @click="handleEdit(row, (OperationType = 3), (copyType = 1))"
                  @click.stop="handleEdit(row, (OperationType = 3), (copyType = 1))"
                  v-else-if="column.property == '单据号'"
                  >{{ row.单据号 }}</el-button
                >
@@ -515,7 +515,7 @@
        class="xsckdBox"
        :before-close="close"
      >
        <div style="height: 80vh" v-if="openEdit">
        <div style="height: 70vh" v-if="openEdit">
          <iframe :src="iframeUrl" frameborder="0" width="100%" height="100%"></iframe>
        </div>
      </el-dialog>
src/views/sell/XsSeOutStockBackBillEdit.vue
@@ -56,7 +56,6 @@
                  <el-button
                    slot="append"
                    icon="el-icon-search"
                    @click="openDataDialog(1)"
                  ></el-button>
                </el-input>
              </el-form-item>
@@ -84,14 +83,14 @@
          <el-row>
            <el-col :span="6">
              <el-form-item label="仓库" prop="HWHName">
                <el-input v-model="form.HWHName" placeholder="请选择仓库">
                <el-input v-model="form.HWHName" placeholder="请选择仓库" disabled>
                  <el-button slot="append" icon="el-icon-search"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="客户" prop="HCusName">
                <el-input v-model="form.HCusName" placeholder="请选择客户">
                <el-input v-model="form.HCusName" placeholder="请选择客户" disabled>
                  <el-button slot="append" icon="el-icon-search"></el-button>
                </el-input>
              </el-form-item>
@@ -104,7 +103,6 @@
            <el-col :span="6">
              <el-form-item label="备注" prop="HRemark">
                <el-input v-model="form.HRemark" placeholder="">
                  <el-button slot="append" icon="el-icon-search"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
@@ -135,7 +133,7 @@
            </el-col>
            <el-col :span="6">
              <el-form-item label="项目代码" prop="HProjectNumber">
                <el-input v-model="form.HProjectNumber" placeholder="请选择项目代码">
                <el-input v-model="form.HProjectNumber" placeholder="请选择项目代码" disabled>
                  <el-button slot="append" icon="el-icon-search"></el-button>
                </el-input>
              </el-form-item>
src/views/sell/XsSeOutStockBackBillList.vue
@@ -478,7 +478,7 @@
                }}</span>
                <el-button
                  type="text"
                  @click="handleEdit(row, (OperationType = 3), (copyType = 1))"
                  @click.stop="handleEdit(row, (OperationType = 3), (copyType = 1))"
                  v-else-if="column.property == '单据号'"
                  >{{ row.单据号 }}</el-button
                >
@@ -527,7 +527,7 @@
          @editCloseGy="editGyClose"
          v-if="editShow"
        /> -->
        <div style="height: 80vh">
        <div style="height: 70vh">
          <iframe :src="iframeUrl" frameborder="0" width="100%" height="100%"></iframe>
        </div>
      </el-dialog>
src/views/sell/XsSeOutStockBill.vue
@@ -290,7 +290,7 @@
          >编辑</el-button
        >
      </el-col>
      <el-col :span="1.5">
      <!-- <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-edit"
@@ -329,7 +329,7 @@
          @click="set_CheckBill(2, (form = rowForm))"
          >反审核</el-button
        >
      </el-col>
      </el-col> -->
      <!-- <el-col :span="1.5">
        <el-button
          type="success"
@@ -352,7 +352,7 @@
          >反禁用</el-button
        >
      </el-col> -->
      <el-col :span="1.5">
      <!-- <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-edit"
@@ -411,7 +411,7 @@
          @click="set_DropBill(2, (form = rowForm))"
          >反作废</el-button
        >
      </el-col>
      </el-col> -->
      <el-col :span="1.5">
        <el-button
@@ -431,7 +431,7 @@
          >隐藏列设置</el-button
        >
      </el-col>
      <el-col :span="1.5">
      <!-- <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-help" size="mini" @click="handleSearch"
          >搜 索</el-button
        >
@@ -440,7 +440,7 @@
        <el-button type="primary" icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重 置</el-button
        >
      </el-col>
      </el-col> -->
      <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
    </el-row>
    <div class="tableBox" v-loading="loading">
@@ -485,7 +485,7 @@
                }}</span>
                <el-button
                  type="text"
                  @click="handleEdit(row, (OperationType = 3), (copyType = 1))"
                  @click.stop="handleEdit(row, (OperationType = 3), (copyType = 1))"
                  v-else-if="column.property == '单据号'"
                  >{{ row.单据号 }}</el-button
                >
@@ -534,7 +534,7 @@
          @editCloseGy="editGyClose"
          v-if="editShow"
        /> -->
        <div style="height: 80vh">
        <div style="height: 70vh" v-if="openEdit">
          <iframe :src="iframeUrl" frameborder="0" width="100%" height="100%"></iframe>
        </div>
      </el-dialog>
src/views/sell/XsSeOutStockBillEdit.vue
@@ -4,10 +4,10 @@
      <el-button type="primary" @click="handleAdd((OperationType = 1))" v-if="addBtnShow"
        >新增</el-button
      >
      <el-button type="primary" @click="submitForm" :disabled="subDisabled"
      <!-- <el-button type="primary" @click="submitForm" :disabled="subDisabled"
        >保 存</el-button
      >
      <el-button type="primary" @click="set_CheckBill(0, form)">审 核</el-button>
      <el-button type="primary" @click="set_CheckBill(0, form)">审 核</el-button> -->
      <el-button type="primary" @click="close">退 出</el-button>
      <!-- <el-button @click="cancel">取 消</el-button> -->
    </div>
@@ -20,7 +20,7 @@
          <el-row>
            <el-col :span="6">
              <el-form-item label="单据编号" prop="HBillNo">
                <el-input v-model="form.HBillNo" placeholder="请输入单据编号" />
                <el-input v-model="form.HBillNo" placeholder="请输入单据编号" disabled />
              </el-form-item>
            </el-col>
            <el-col :span="6">
@@ -53,11 +53,7 @@
            <el-col :span="6">
              <el-form-item label="仓库" prop="HWHName">
                <el-input v-model="form.HWHName" placeholder="请选择仓库" disabled>
                  <el-button
                    slot="append"
                    icon="el-icon-search"
                    @click="openDataDialog(1)"
                  ></el-button>
                  <el-button slot="append" icon="el-icon-search"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
@@ -87,22 +83,26 @@
                <el-input v-model="form.HLinkPhone" placeholder="请输入联系电话" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="备注" prop="HRemark">
                <el-input v-model="form.HRemark" placeholder="请输入备注" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="项目代码" prop="HProjectNumber">
                <el-input v-model="form.HProjectNumber" placeholder="请选择项目代码">
                <el-input
                  v-model="form.HProjectNumber"
                  placeholder="请选择项目代码"
                  disabled
                >
                  <el-button slot="append" icon="el-icon-search"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="项目名称" prop="HProjectName">
              <el-form-item label="项目名称" prop="HProjectName" class="zy-hidden">
                <el-input v-model="form.HProjectName" disabled> </el-input>
              </el-form-item>
            </el-col>
@@ -357,7 +357,7 @@
            ></el-input-number>
          </template>
        </el-table-column>
        <el-table-column align="center" label="当前库存" width="120">
        <el-table-column align="center" label="当前库存" width="120" v-if="false">
          <template slot-scope="scope">
            <span>{{ scope.row.HInventoryQty }}</span>
          </template>
@@ -397,9 +397,15 @@
      width="1280px"
      append-to-body
    >
      <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="deptShow" />
      <Warehouse @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="warehouseShow" />
      <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="materialShow" />
      <div style="height: 70vh" v-if="openData">
        <iframe
          :src="iframeUrl"
          frameborder="0"
          width="100%"
          height="100%"
          ref="iframeInstance"
        ></iframe>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="deptClickSub">确 定</el-button>
        <el-button @click="deptClose">取 消</el-button>
@@ -442,6 +448,9 @@
  },
  data() {
    return {
      dialogEnabledNum: -1,
      iframeUrl: "",
      iframeInstance: null,
      OperationType2: 1,
      HInterID2: 0,
      CopyType2: 1,
@@ -521,7 +530,13 @@
    this.getdata();
    this.getHSourceBillType();
  },
  mounted() {
    window.iFrameMaterialCallback = (data) => {
      this.iFrameMaterialCallback(data); // 组件内的方法绑定到windows
    };
  },
  beforeDestroy() {
    delete window.iFrameMaterialCallback;
    if (window.parent) {
      console.log(window.parent);
    } else {
@@ -529,6 +544,19 @@
    }
  },
  methods: {
    iFrameMaterialCallback(data) {
      // 物料列表返回监听函数
      console.log("iFrameMaterialCallbackData: ", data);
      this.editData[this.zbIndex].HMaterID = data.HItemID;
      this.editData[this.zbIndex].物料代码 = data.物料代码;
      this.editData[this.zbIndex].物料名称 = data.物料名称;
      this.editData[this.zbIndex].HUnitID = data.HUnitID;
      this.editData[this.zbIndex].规格型号 = data.规格型号;
      this.editData[this.zbIndex].计量单位 = data.计量单位名称;
      this.editData[this.zbIndex].HTaxPrice = data.含税成本价;
      this.editData[this.zbIndex].HTaxRate = data.默认税率;
      this.deptClose();
    },
    getHSourceBillType() {
      axios
        .get(`${this.baseURL}/Web/GetHSourceBillType`, {
@@ -774,8 +802,25 @@
      this.deptform = deptRow;
    },
    deptClickSub() {
      this.dbEmitData(this.deptform, this.dialogTypeNum);
      this.deptform = {};
      // this.dbEmitData(this.deptform, this.dialogTypeNum);
      // this.deptform = {};
      let selectedRow = this.$refs.iframeInstance.contentWindow.selectedRow;
      console.log(selectedRow);
      if (this.dialogEnabledNum == 3) {
        // 修改选中物料对应子表数据
        this.editData[this.zbIndex].HMaterID = selectedRow.HItemID;
        this.editData[this.zbIndex].物料代码 = selectedRow.物料代码;
        this.editData[this.zbIndex].物料名称 = selectedRow.物料名称;
        this.editData[this.zbIndex].HUnitID = selectedRow.HUnitID;
        this.editData[this.zbIndex].规格型号 = selectedRow.规格型号;
        this.editData[this.zbIndex].计量单位 = selectedRow.计量单位名称;
        this.editData[this.zbIndex].HTaxPrice = selectedRow.含税成本价;
        this.editData[this.zbIndex].HTaxRate = selectedRow.默认税率;
      }
      selectedRow = null; // 手动置空,方便GC回收,防止泄露
      this.deptClose();
    },
    deptClose() {
      this.deptform = {};
@@ -1323,6 +1368,7 @@
    },
    //  打开数据列表弹窗
    openDataDialog(num, row) {
      this.dialogEnabledNum = num;
      if (row) {
        this.zbIndex = row.index - 1;
      }
@@ -1337,6 +1383,7 @@
        this.openData = true;
      } else if (num == 3) {
        this.dialogTitle = "物料列表";
        this.iframeUrl = `/iframe/GyMaterial?openType=2`;
        this.materialShow = true;
        this.openData = true;
      }
@@ -1348,4 +1395,8 @@
.xsckdBox .el-date-editor.el-input {
  width: 100%;
}
.zy-hidden {
  display: none;
}
</style>
src/views/sell/xsSeOrderBill/xsSeOrderBill.vue
@@ -469,7 +469,7 @@
                }}</span>
                <el-button
                  type="text"
                  @click="handleEdit(row, (OperationType = 3), (copyType = 1))"
                  @click.stop="handleEdit(row, (OperationType = 3), (copyType = 1))"
                  v-else-if="column.property == '单据号'"
                  >{{ row.单据号 }}</el-button
                >
@@ -518,7 +518,7 @@
          @editCloseGy="editGyClose"
          v-if="editShow"
        /> -->
        <div style="height: 80vh">
        <div style="height: 70vh" v-if="openEdit">
          <iframe :src="iframeUrl" frameborder="0" width="100%" height="100%"></iframe>
        </div>
      </el-dialog>