陈婷婷
2026-01-21 573d43ef42259db9581e54d7cddd4f290b4f379d
src/views/warehouse/barcodeMaster/Gy_BarCodeBillList.vue
@@ -127,6 +127,14 @@
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleBatchDelete(0)">批量作废
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-delete" size="mini" @click="handleBatchDelete(1)">批量反作废
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
      </el-col>
      <el-col :span="1.5">
@@ -348,7 +356,7 @@
    
    //#region 加载组织下拉列表数据
    fetchData() {
      axios.get(this.baseURL + "/Web/GetOrganizations", {
      axios.get(this.$baseUrl + "/Web/GetOrganizations", {
      }).then(response => {
        if (response.data.count == 1) {
          this.organizationList = response.data.data;//组织列表
@@ -462,7 +470,7 @@
      if (this.queryParams.HBarCode) {
        this.sWhere += " and 条码编号 like ''%" + this.queryParams.HBarCode + "%''";
      }
      if (this.queryParams.HSupName) {
      if (this.queryParams.HSourceBillNo) {
        this.sWhere += " and 源单单号 like ''%" + this.queryParams.HSourceBillNo + "%''";
      }
      if (this.queryParams.HMaterNumber) {
@@ -474,6 +482,12 @@
      if (this.queryParams.HOrgID) {
        this.sWhere += " and HStockOrgID = ''" + this.queryParams.HOrgID + "''";
      }
      //如果是自动登录,则只能查看供应商自己的条码。
      if (sessionStorage["HAutoLogin"] == "1") {
        this.sWhere += " and HSupID = ''" + sessionStorage["HUserName"] + "''";
      }
      this.getList()
    },
    //#endregion
@@ -488,7 +502,7 @@
      this.loading = true
      
      // 列表查询
      axios.get(this.baseURL + '/Gy_BarCodeBillList/page', {
      axios.get(this.$baseUrl + '/Gy_BarCodeBillList/page', {
        params: {
          "sWhere": this.sWhere,
          "user": sessionStorage["HUserName"],
@@ -584,9 +598,47 @@
        var HInterID = this.checkDataList[0].HItemID;
        // 列表查询
        axios.get(this.baseURL + '/Gy_BarCodeBillList/DeleteGy_BarCodeBillList', {
        axios.get(this.$baseUrl + '/Gy_BarCodeBillList/DeleteGy_BarCodeBillList', {
          params: {
            "HInterID": HInterID,
            "IsAudit": num,
            "CurUserName": sessionStorage["HUserName"],
          },
        }).then(response => {
          let data1 = response.data
          if (data1.count == 1) {
            this.handleQuery();
          }else{
            this.$modal.msgError(data1.Message);
          }
        }).catch(error => {
          this.$modal.msgError("接口请求失败!");
        });
      }
    },
    //#endregion
    //#region 批量作废
    handleBatchDelete(num) {
      if (this.checkDataList.length == 0) {
        this.$modal.msgError("请选择数据");
      }
      else if(this.checkDataList.length >100){
        this.$modal.msgError("选择数据不可大于100条!");
      }
      else {
        var HInterIDListStr = "";
        for(var i=0;i<this.checkDataList.length;i++){
          if(i==this.checkDataList.length-1){
            HInterIDListStr += this.checkDataList[i].hmainid.toString();
          }else{
            HInterIDListStr += this.checkDataList[i].hmainid.toString() + ",";
          }
        }
        // 列表查询
        axios.get(this.$baseUrl + '/Gy_BarCodeBillList/DeleteBatchGy_BarCodeBillList', {
          params: {
            "HInterID": HInterIDListStr,
            "IsAudit": num,
            "CurUserName": sessionStorage["HUserName"],
          },
@@ -617,7 +669,7 @@
    },
    DisPlay_HideColumn(HModName, user, option, dataOption) {
      this.totalNameList = []
      axios.get(this.baseURL + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
      axios.get(this.$baseUrl + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
        params: {
          "HModName": HModName,
          "user": user,