chenhaozhe
2026-01-20 3e049efc6eb3970bb200058e41468f0a38de1a7e
src/views/warehouse/barcodeMaster/Gy_BarCodeBillList.vue
@@ -114,8 +114,24 @@
      </el-collapse>
    </el-form>
    <el-row :gutter="10" class="mb8" style="margin-top: 10px;">
      <!-- <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDrop">删除
        </el-button>
      </el-col> -->
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">删除
        <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete(0)">作废
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete(1)">反作废
        </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">
@@ -340,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;//组织列表
@@ -454,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) {
@@ -466,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
@@ -480,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"],
@@ -560,7 +582,77 @@
    //#endregion
    //#region 删除
    handleDelete() {
    handleDrop() {
    },
    //#endregion
    //#region 作废
    handleDelete(num) {
      if (this.checkDataList.length != 1) {
        this.$modal.msgError("请选择一行数据");
      } else {
        // this.rowSel = [];
        // for (var i = 0; i < this.checkDataList.length; i++) {
        //   this.rowSel.push(this.checkDataList[i].HItemID.toString());
        // }
        var HInterID = this.checkDataList[0].HItemID;
        // 列表查询
        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"],
          },
        }).then(response => {
          let data1 = response.data
          if (data1.count == 1) {
            this.handleQuery();
          }else{
            this.$modal.msgError(data1.Message);
          }
        }).catch(error => {
          this.$modal.msgError("接口请求失败!");
        });
      }
    },
    //#endregion
@@ -577,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,