chenhaozhe
2025-11-20 f8ddb1cdc0caafa8aa74a214fffa552aac1d04a7
src/views/basic/gyWarehouse/gyWarehouse.vue
@@ -1,4 +1,5 @@
<template>
  <div style="padding: 10px; position: relative">
    <el-form
      :model="queryParams"
@@ -9,6 +10,7 @@
    >
      <el-row>
        <el-form-item label="仓库代码" prop="HNumber" style="padding-left: 100px">
          <el-input
            v-model="queryParams.HNumber"
            placeholder="请输入仓库代码"
@@ -17,6 +19,7 @@
          />
        </el-form-item>
        <el-form-item label="仓库名称" prop="HName">
          <el-input
            v-model="queryParams.HName"
            placeholder="请输入仓库名称"
@@ -25,6 +28,7 @@
          />
        </el-form-item>
        <el-form-item label="组织">
          <el-select
            v-model="queryParams.HOrgID"
            placeholder="请选择"
@@ -40,6 +44,7 @@
          </el-select>
        </el-form-item>
        <el-form-item label="同步" :inline="true">
          <el-input
            v-model="queryParams.HSyncNumber"
            placeholder="请输入仓库代码"
@@ -65,6 +70,7 @@
              <el-row>
                <el-form-item label-width="0">
                  <el-col :span="7">
                    <el-select
                      v-model="queryParams.ColName1"
                      placeholder="请选择"
@@ -72,6 +78,7 @@
                      class="ForFilteringSchemes"
                    >
                      <span v-for="(item, index) in btList" :key="index">
                        <el-option
                          :label="item.field"
                          :value="item.field"
@@ -81,6 +88,7 @@
                    </el-select>
                  </el-col>
                  <el-col :span="6" style="padding: 0 10px">
                    <el-select v-model="queryParams.Comparator1" placeholder="请选择" @change="riqiChange"
                    <el-select
                      v-model="queryParams.Comparator1"
                      placeholder="请选择"
@@ -96,6 +104,7 @@
                    </el-select>
                  </el-col>
                  <el-col :span="11">
                    <el-input
                      v-model="queryParams.ColContent1"
                      placeholder="请输入"
@@ -109,6 +118,7 @@
              <el-row>
                <el-form-item label-width="0">
                  <el-col :span="7">
                    <el-select
                      v-model="queryParams.ColName2"
                      placeholder="请选择"
@@ -116,6 +126,7 @@
                      class="ForFilteringSchemes"
                    >
                      <span v-for="(item, index) in btList" :key="index">
                        <el-option
                          :label="item.field"
                          :value="item.field"
@@ -125,6 +136,7 @@
                    </el-select>
                  </el-col>
                  <el-col :span="6" style="padding: 0 10px">
                    <el-select
                      v-model="queryParams.Comparator2"
                      placeholder="请选择"
@@ -132,6 +144,7 @@
                      class="ForFilteringSchemes"
                    >
                      <span v-for="(item, index) in comparatorList" :key="index">
                        <el-option
                          :label="item.label"
                          :value="item.value"
@@ -141,6 +154,7 @@
                    </el-select>
                  </el-col>
                  <el-col :span="11">
                    <el-input
                      v-model="queryParams.ColContent2"
                      placeholder="请输入"
@@ -154,6 +168,7 @@
              <el-row>
                <el-form-item label-width="0">
                  <el-col :span="7">
                    <el-select
                      v-model="queryParams.ColName"
                      placeholder="请选择"
@@ -169,6 +184,7 @@
                    </el-select>
                  </el-col>
                  <el-col :span="6" style="padding: 0 10px">
                    <el-select
                      v-model="queryParams.Comparator"
                      placeholder="请选择"
@@ -184,6 +200,7 @@
                    </el-select>
                  </el-col>
                  <el-col :span="11">
                    <el-input
                      v-model="queryParams.ColContent"
                      placeholder="请输入"
@@ -202,6 +219,7 @@
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-download"
@@ -211,6 +229,7 @@
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-plus"
@@ -221,6 +240,7 @@
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-edit"
@@ -231,6 +251,7 @@
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-edit"
@@ -241,6 +262,7 @@
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-delete"
@@ -251,6 +273,7 @@
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-edit"
@@ -261,6 +284,7 @@
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-edit"
@@ -271,6 +295,7 @@
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-edit"
@@ -281,6 +306,7 @@
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-edit"
@@ -291,6 +317,7 @@
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-download"
@@ -300,6 +327,7 @@
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-download"
@@ -309,6 +337,7 @@
        >
      </el-col>
      <el-col :span="1.5" class="zy-hidden">
        <el-button type="primary" icon="el-icon-help" size="mini" @click="handleSearch"
          >搜 索</el-button
        >
@@ -321,6 +350,7 @@
      <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
    </el-row>
    <div class="tableBox" v-loading="loading">
      <el-table
        :data="tableData"
        ref="tableData"
@@ -335,6 +365,7 @@
        v-if="tableShow"
      >
        <template v-for="(item, index) in btList">
          <el-table-column
            type="selection"
            width="55"
@@ -372,6 +403,7 @@
          </el-table-column>
        </template>
      </el-table>
      <pagination
        v-show="total > 0"
        :total="total"
@@ -413,6 +445,7 @@
          ref="editRef"
        />
      </el-dialog>
      <el-dialog
        :title="upload.title"
        :visible.sync="upload.open"
@@ -422,6 +455,7 @@
        <div style="margin-top: -20px">
          <el-button type="primary" @click="set_AddNew">导入数据</el-button>
          <el-button type="primary" @click="upload.open = false">退 出</el-button>
          <el-upload
            ref="upload"
            :limit="1"
@@ -435,6 +469,7 @@
            <el-button type="primary">文件上传</el-button>
          </el-upload>
        </div>
        <el-table
          :data="uploadData"
          v-loading="uploadTableLoading"
@@ -451,6 +486,7 @@
          <el-table-column label="备注" prop="备注" align="center" width="120" />
          <el-table-column label="操作" align="center">
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="text"
@@ -461,6 +497,7 @@
            </template>
          </el-table-column>
        </el-table>
        <pagination
          v-show="uploadTotal > 0"
          :total="uploadTotal"
@@ -491,6 +528,7 @@
      editRef: null,
      activeSeach: "",
      HModName: "Gy_Warehouse",
      activeSeach: "",
      editShow: false,
      openEdit: false,
@@ -544,11 +582,13 @@
      openData: false, //数据弹窗
      dialogTitle: "",
      zuzhiId: "",
      organizationList: JSON.parse(sessionStorage["organizationList"]), //组织列表
      subDisabled: false, //编辑页面保存按钮是否禁用(true禁用,false可用)
      OperationType: null, //保存类型(新增1修改3)
      HInterID: null,
      baseURL: process.env.VUE_APP_BASE_API,
      currentRow: [],
      lastSelectedRowIndex: null, // 用于记录上次点击的行索引
      lastSelectedRow: null, // 上一次选中的行
@@ -769,6 +809,8 @@
      this.dbEmitData(this.deptform, this.dialogTypeNum);
      this.deptform = {};
    },
    getList() {
      this.tableShow = false;
      this.loading = true;
@@ -1057,13 +1099,15 @@
    },
    //双击行
    handleDblclick(row, column, cell, event) {
      if (this.checkIsIframe) {
        // IFrame 双击 返回当前双击的数据
        window.parent.iframeWareHouseCallBack(row);
        return;
      }
      // if (this.checkIsIframe) {
      //   // IFrame 双击 返回当前双击的数据
      //   window.parent.iframeWareHouseCallBack(row);
      //   return;
      // }
      this.OperationType = 3;
      if (this.openPage) {
        this.$emit("deptEmitDb", row, 2);
      } else {
        this.handleEdit();
@@ -1075,19 +1119,23 @@
      if (this.openPage) {
        //列表单选
        if (selection.length > 1) {
          const del_row = selection.shift();
          this.$refs.tableData.toggleRowSelection(del_row, false); //设置这一行取消选中
        }
        this.rowForm = {};
        this.ids = selection.map((item) => item.HItemID);
        this.rowForm = selection[0];
      } else {
        //多选
        this.ids = selection.map((item) => item.HItemID);
        this.single = selection.length != 1;
        this.multiple = !selection.length;
        if (!this.single) {
          this.rowForm = selection[0];
        }
      }
      }
    },
    //打开侧边搜索弹窗
@@ -1173,6 +1221,7 @@
      if (this.queryParams.HName) {
        this.sWhere += " and 仓库名称 like '%" + this.queryParams.HName + "%'";
      }
      if (this.queryParams.HOrgID) {
        let OrgName = this.organizationList.find((e) => e.ID == this.queryParams.HOrgID)
          ?.Name;
@@ -1283,6 +1332,7 @@
          if (!this.rowForm.审核人) {
            axios
              .get(this.baseURL + "/DeltetGy_Warehouse", {
                params: {
                  HItemID: this.rowForm.HItemID.toString(),
                  user: sessionStorage["HUserName"],
@@ -1303,6 +1353,7 @@
            this.$modal.msgError("此条数据不是创建状态,无法删除!");
          }
        })
        .catch(() => {});
    },
    // 反审核/审核数据
@@ -1311,6 +1362,7 @@
      //逻辑审核方法
      axios
        .get(this.baseURL + "/Gy_Warehouse/AuditGy_Warehouse", {
          params: {
            HInterID: InterID,
            IsAudit: num,
@@ -1336,6 +1388,7 @@
      //逻辑审核方法
      axios
        .get(this.baseURL + "/Gy_Warehouse/StopGy_Warehouse", {
          params: {
            HInterID: InterID,
            IsStop: num,
@@ -1406,6 +1459,7 @@
        }
      }
      var sSubStr = JSON.stringify(num);
      var sMainSub = sSubStr + "&和" + sessionStorage["HUserName"];
      axios({
        method: "post",
@@ -1442,6 +1496,7 @@
            return deleteList.indexOf(item.index) == -1;
          });
        })
        .catch(() => {});
    },
    getPage(page, list) {
@@ -1457,7 +1512,6 @@
        this.uploadData = this.getPage(this.uploadPage, this.alluploadList);
      }, 100);
    },
  },
};
</script>
<style>
@@ -1465,6 +1519,7 @@
  width: 100%;
}
.form-item-inline > .el-form-item__content {
  display: flex;
  flex-direction: row;