src/views/purchase/cgPoOrderBill/cgPoOrderBill.vue
@@ -9,15 +9,23 @@
      class="searchBox"
    >
      <el-row>
        <el-form-item label="日期" style="margin-left: 100px">
        <el-form-item label="开始日期" style="margin-left: 100px">
          <el-date-picker
            v-model="dateRange"
            value-format="yyyy-MM-dd"
            type="daterange"
            range-separator="-"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
            v-model="sTime"
            type="date"
            placeholder="开始日期"
            style="width: 150px"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="结束日期">
          <el-date-picker
            v-model="eTime"
            type="date"
            placeholder="结束日期"
            style="width: 150px"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="日期间隔">
          <el-select
@@ -50,8 +58,8 @@
            <el-option
              v-for="(item, index) in organizationList"
              :key="index"
              :label="item.Name"
              :value="item.ID"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
@@ -264,7 +272,7 @@
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleEdit((row = rowForm), (OperationType = 3))"
          @click="handleEdit((row = rowForm), (OperationType = 3), (copyType = -1))"
          >编辑</el-button
        >
      </el-col>
@@ -274,7 +282,7 @@
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleEdit((row = rowForm), (OperationType = 2))"
          @click="handleEdit((row = rowForm), (OperationType = 2), (copyType = 1))"
          >复制</el-button
        >
      </el-col>
@@ -463,7 +471,7 @@
                }}</span>
                <el-button
                  type="text"
                  @click="handleEdit(row, (OperationType = 3))"
                  @click="handleEdit(row, (OperationType = 3), (copyType = 1))"
                  v-else-if="column.property == '单据号'"
                  >{{ row.单据号 }}</el-button
                >
@@ -496,22 +504,16 @@
      </el-dialog>
      <!-- 编辑 -->
      <el-dialog
        title="编辑职员"
        title="编辑采购订单"
        :visible.sync="openEdit"
        width="1480px"
        append-to-body
        class="xsckdBox"
        :before-close="close"
      >
        <edit
          :OperationType="OperationType"
          :linterid="this.rowForm.HItemID"
          :HSouceBillType="this.rowForm.HSourceBillType"
          :HOrgID="this.queryParams.HOrgID"
          :copyType="copyType"
          @editCloseGy="editGyClose"
          v-if="editShow"
        />
        <div style="height: 80vh" v-if="openEdit">
          <iframe :src="iframeUrl" frameborder="0" width="100%" height="100%"></iframe>
        </div>
      </el-dialog>
      <el-dialog
        :title="upload.title"
@@ -618,6 +620,7 @@
  },
  data() {
    return {
      iframeUrl: "",
      activeSeach: "",
      HModName: "Cg_POOrderBillList",
      editShow: false,
@@ -778,6 +781,15 @@
    this.getList();
  },
  methods: {
    handleTabActive() {
      window.editGyClose = () => {
        this.editGyClose(); // 组件内的方法绑定到windows
      };
    },
    handleTabInactive() {
      // 组件销毁时清理全局方法,避免内存泄漏
      delete window.editGyClose;
    },
    onDateScanOptionChangerHandler(e) {
      this.queryParams.timeSpan = e;
      if (e == -1) {
@@ -863,7 +875,6 @@
      const ddE = String(end.getDate()).padStart(2, "0");
      this.sTime = yyyyS + "-" + mmS + "-" + ddS;
      this.eTime = yyyyE + "-" + mmE + "-" + ddE;
      this.dateRange = [this.sTime, this.eTime];
    },
    organizationChange(val) {
      // let options=undefined
@@ -908,11 +919,9 @@
      if (this.pageSize == 0) {
        this.pageSize = 50;
      }
      if (this.dateRange.length > 0) {
        this.sWhere +=
          " and CONVERT(varchar(100),日期, 23) >= '" + this.dateRange[0] + "'";
        this.sWhere +=
          " and CONVERT(varchar(100),日期, 23) <= '" + this.dateRange[1] + "'";
      if (this.sTime) {
        this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.sTime + "'";
        this.sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + this.eTime + "'";
      }
      // this.sWhere += ` and CONVERT(varchar(100),日期, 23) >= '2020-01-01' and CONVERT(varchar(100),日期, 23) <= '2030-01-01'`;
      //生产资料列表
@@ -1177,7 +1186,7 @@
    //双击行
    handleDblclick(row, column, cell, event) {
      this.OperationType = 3;
      this.handleEdit();
      this.handleEdit(row, 3, 1);
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
@@ -1366,13 +1375,15 @@
    //打开新增组件弹窗
    handleAddEdit() {
      this.rowForm.HItemID = 0;
      this.iframeUrl = `/iframe/CgPoOrderBillEdit?HInterID=${0}&OperationType=${1}&copyType=${-1}`;
      this.$nextTick(() => {
        this.openEdit = true;
        this.editShow = true;
      });
    },
    //打开修改组件弹窗
    handleEdit() {
    handleEdit(row, OperationType, copyType) {
      this.iframeUrl = `/iframe/CgPoOrderBillEdit?HInterID=${row.hmainid}&OperationType=${OperationType}&copyType=${copyType}`;
      this.$nextTick(() => {
        this.openEdit = true;
        this.editShow = true;