wangyi
2026-01-19 7fb0a8f0ab16c149484bf043754cd10cfa94de2f
src/views/basic/gy/gyDepartment.vue
@@ -1,5 +1,5 @@
<template>
  <div style="padding: 10px;position: relative;">
  <div style="padding: 10px; position: relative;">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="98px" class="searchBox">
      <el-row>
        <el-form-item label="部门代码" prop="HNumber" style="margin-left: 100px;">
@@ -109,7 +109,7 @@
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
          @click="handleEdit(row = rowForm, OperationType = 2)">复制</el-button>
          @click="handleEdit(row = rowForm, copyType = 1)">复制</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">删除
@@ -168,8 +168,7 @@
        <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose" v-if="rowHideShow" />
      </el-dialog>
      <!-- 编辑 -->
      <el-dialog title="编辑生产资料" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox"
        @close="close">
      <el-dialog title="编辑部门资料" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
        <edit :OperationType=OperationType :linterid=this.rowForm.HItemID :HSouceBillType=this.rowForm.HSourceBillType
          :copyType="copyType" @editCloseGy="editGyClose" v-if="editShow" />
      </el-dialog>
@@ -264,7 +263,7 @@
      open: false,
      // 查询参数
      queryParams: {
        HOrgID: null,
        HOrgID: sessionStorage["OrganizationID"] - 0,
        HName: null,
        HNumber: null,
        Comparator1: '',
@@ -373,10 +372,9 @@
      if (this.pageSize == 0) {
        this.pageSize = 50
      }
      this.queryParams.HOrgID = sessionStorage["OrganizationID"]-0
      this.sWhere += " and HUSEORGID = '" + this.queryParams.HOrgID + "'"
      //生产资料列表
      axios.get(this.baseURL + '/Gy_Department/list', {
      axios.get(this.$baseUrl + '/Gy_Department/list', {
        params: {
          "sWhere": this.sWhere,
          "user": sessionStorage["HUserName"],
@@ -448,7 +446,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,
@@ -707,6 +705,7 @@
      }
      // this.sWhere += this.addSWhereByOpenType()
      // this.sWhere += this.getOrgIDByUser()
      this.clearData()
      this.getList()
    },
@@ -724,7 +723,7 @@
    //根据用户获取用户关联组织的过滤条件
    getOrgIDByUser() {
      var res = "";
      axios.get(this.baseURL + '/Xt_User/getOrgIDListByUser', {
      axios.get(this.$baseUrl + '/Xt_User/getOrgIDListByUser', {
        params: {
          HModName: this.HModName,
          user: sessionStorage["HUserName"],
@@ -759,15 +758,23 @@
        ColContent2: '',
        ColContent: '',
      }
      this.clearData()
      this.resetForm("queryForm")
      this.getList()
    },
    clearData() {
      this.single = true
      this.multiple = true
      this.OperationType = 0
      this.copyType = 0
      this.ids = []
    },
    //退出
    close() {
      this.tableShow = true
      this.openEdit = false
       this.editShow= false
      this.editShow = false
      this.clearData()
      this.getList()
    },
    //打开新增组件弹窗
@@ -790,15 +797,15 @@
    editGyClose(val) {
      this.editShow = false
      this.openEdit = false
      this.multiple = true,
        this.getList()
      this.clearData()
      this.getList()
    },
    /** 删除按钮操作 */
    handleDelete() {
      this.$modal.confirm('确认要删除吗,删除后不能恢复').then(() => {
        if (!this.rowForm.审核人) {
          axios.get(this.baseURL + "DeltetGy_Source", {
            params: { 'HItemID': this.rowForm.HItemID.toString(), 'user': sessionStorage["HUserName"] }
          axios.get(this.$baseUrl + "DeltetGy_Department", {
            params: { 'HItemID': this.rowForm.HItemID, 'user': sessionStorage["HUserName"] }
          }).then(response => {
            if (response.data.count == 1) {
              this.getList()
@@ -818,7 +825,7 @@
    set_CheckBill(num, form) {
      var InterID = form.HItemID || form.HInterID
      //逻辑审核方法
      axios.get(this.baseURL + "/Gy_Source/AuditGy_Source", {
      axios.get(this.$baseUrl + "/Gy_Department/AuditGy_Department", {
        params: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] }
      }).then(response => {
        let result = response.data
@@ -829,15 +836,16 @@
        else {
          this.$modal.msgError("错误:" + result.code + result.Message,);
        }
        this.clearData()
      }).catch(error => {
        this.$modal.msgError("接口请求失败!");
      });
    },
    // 反禁用/禁用数据
    set_De_Stop(num, form) {
      var InterID = form.HItemID || form.HInterID
      var InterID = form.HItemID.toString() || form.HInterID.toString()
      //逻辑审核方法
      axios.get(this.baseURL + "/Gy_Source/StopGy_Source", {
      axios.get(this.$baseUrl + "/Gy_Department/StopGy_Department", {
        params: { "HInterID": InterID, "IsStop": num, "CurUserName": sessionStorage["HUserName"] }
      }).then(response => {
        let result = response.data
@@ -848,6 +856,7 @@
        else {
          this.$modal.msgError("错误:" + result.code + result.Message,);
        }
        this.clearData()
      }).catch(error => {
        this.$modal.msgError("接口请求失败!");
      });
@@ -901,7 +910,7 @@
      var sMainSub = sSubStr + '&和' + sessionStorage["HUserName"];
      axios({
        method: 'post',
        url: this.baseURL + "/Gy_Source/Gy_Source_btnSave",
        url: this.$baseUrl + "/Gy_Source/Gy_Source_btnSave",
        data: {
          'sMainSub': sMainSub
        },