wangyi
2026-01-19 7fb0a8f0ab16c149484bf043754cd10cfa94de2f
src/views/warehouse/barcodeMaster/Gy_BarCodeBillList.vue
@@ -114,8 +114,16 @@
      </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">
@@ -161,8 +169,8 @@
      </el-dialog>
      <!-- 打印 -->
      <el-dialog title="打印模板选择" :visible.sync="openPrintList" width="800px" append-to-body>
        <PrintList :linterid="rowSel.toString()" :MyMsg="rowSel.toString()" Type="HGy_BarCodeBillList"
          HModName="HGy_BarCodeBillList" @rowEditClose="rowSetClose" v-if="printListShow" />
        <PrintList :linterid="rowSel.toString()" :MyMsg="rowSel.toString()" Type="HGy_BarCodeBill"
          HModName="HGy_BarCodeBill" @rowEditClose="rowSetClose" v-if="printListShow" />
      </el-dialog>
    </div>
  </div>
@@ -182,7 +190,6 @@
      baseURL: process.env.VUE_APP_BASE_API,                //后端接口前缀(后端服务器ip地址)
      HInterID: null,
      checkDataList: [],                                    //表格选中数据集合
      rowSel: [],                                           //用于打印的数据集合
      
      rqsgList: [                                           //日期间隔下拉列表数据
@@ -262,6 +269,7 @@
      lastSelectedRow: null,                                        // 上一次选中的行
      selectedRow: null,                                            // 当前选中的行
      rowForm: {},                                                  // 当选中的只有一行时,更新数据为该选中的行。
      checkDataList: [],                                            // 表格选中数据集合
      tyResList: [],                                                // 列表数据,用于导出
      titleData: [],                                                // 不需要显示的字段 可扩展
@@ -312,7 +320,7 @@
    //#region 多选框选中数据
    handleSelectionChange(selection) {
      // this.rowForm = {}
      checkDataList = selection;
      this.checkDataList = selection;
      this.ids = selection.map(item => item.hmainid)
      this.single = selection.length != 1
      this.multiple = !selection.length
@@ -340,7 +348,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;//组织列表
@@ -466,6 +474,12 @@
      if (this.queryParams.HOrgID) {
        this.sWhere += " and HStockOrgID = ''" + this.queryParams.HOrgID + "''";
      }
      //如果是自动登录,则只能查看供应商自己的条码。
      if (sessionStorage["HAutoLogin"] == "1") {
        this.sWhere += " and 供应商 = ''" + sessionStorage["HUserName"] + "''";
      }
      this.getList()
    },
    //#endregion
@@ -480,7 +494,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"],
@@ -518,6 +532,7 @@
          option.data = data1.data;
          var result = data1.data;
          option.data = result;
          this.checkDataList = [];
          let HModName = "Gy_BarCodeBillList"
          this.DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option, this.dataList);
        }
@@ -559,7 +574,39 @@
    //#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
@@ -576,7 +623,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,
@@ -727,8 +774,8 @@
       this.$modal.msgError("请选择数据");
      } else {
        this.rowSel = [];
        for (var i = 0; i < this.selection.length; i++) {
          this.rowSel.push(this.selection[i].HItemID.toString());
        for (var i = 0; i < this.checkDataList.length; i++) {
          this.rowSel.push(this.checkDataList[i].HItemID.toString());
        }
        this.printListShow = true;
        this.openPrintList = true;