陈婷婷
昨天 a4989ac2090626b23c630a097f5f773f08f8f949
src/views/basic/gyCar/gyCarList.vue
@@ -112,11 +112,11 @@
        </el-collapse-item>
      </el-collapse>
      <!-- <el-form-item label-width="78px">
      <el-form-item label-width="78px">
        <el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">
          搜 索</el-button>
        <el-button icon="el-icon-circle-close" size="small" @click="searchOpen = false">取 消</el-button>
      </el-form-item> -->
      </el-form-item>
    </el-form>
    <el-row :gutter="10" class="mb8">
@@ -138,10 +138,10 @@
        <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
          @click="handleEdit((row = rowForm), (OperationType = 3))">编辑</el-button>
      </el-col>
      <el-col :span="1.5">
      <!-- <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>
      </el-col>
      </el-col> -->
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">删除
        </el-button>
@@ -207,12 +207,12 @@
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-download" size="mini" @click="handleRowHide">隐藏列设置</el-button>
      </el-col>
      <el-col :span="1.5">
      <!-- <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-help" size="mini" @click="handleSearch">搜 索</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" icon="el-icon-refresh" size="mini" @click="resetQuery">重 置</el-button>
      </el-col>
      </el-col> -->
      <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
    </el-row>
    <div class="tableBox" v-loading="loading">
@@ -513,6 +513,109 @@
      return sums;
    },
    //#region 权限判断
        async set_ModCheck(ModRightNameCheck)
        {
            var Permission = false;
            const res=await axios.get(this.$baseUrl + '/LMES/getReportByModRightNameCheck', {
                params: {
                    "ModRightNameCheck": ModRightNameCheck,
                    "user": sessionStorage["HUserName"],
                },
            }).then(result=>{
                if (result.data.count != 1) {
                   Permission = true;
                   this.sWhere=this.sWhere+"and HCompID ="+sessionStorage["HSupID"]
                }
            }).catch(error => {
                this.$modal.msgError("接口请求失败!");
            });
        },
        //#endregion
        //#region 快速过滤
        async handleQuery() {
            this.sWhere = ''
            if (this.queryParams.ColName && this.queryParams.Comparator) {
                var com = "";
                switch (this.queryParams.Comparator) {
                    case "7":
                        com = "like'%" + this.queryParams.ColContent + "%'";
                        break;
                    case "8":
                        com = "like'%" + this.queryParams.ColContent + "'";
                        break;
                    case "9":
                        com = "like'" + this.queryParams.ColContent + "%'";
                        break;
                    case "10":
                        com = "not like'%" + this.queryParams.ColContent + "%'";
                        break;
                    default:
                        com = "" + this.queryParams.Comparator + "'" + this.queryParams.ColContent + "'";
                        break;
                }
                this.sWhere += " and " + this.queryParams.ColName + " " + com;
            }
            if (this.queryParams.ColName1 && this.queryParams.Comparator1) {
                var com1 = "";
                switch (this.queryParams.Comparator1) {
                    case "7":
                        com1 = "like'%" + this.queryParams.ColContent1 + "%'";
                        break;
                    case "8":
                        com1 = "like'%" + this.queryParams.ColContent1 + "'";
                        break;
                    case "9":
                        com1 = "like'" + this.queryParams.ColContent1 + "%'";
                        break;
                    case "10":
                        com1 = "not like'%" + this.queryParams.ColContent1 + "%'";
                        break;
                    default:
                        com1 = "" + this.queryParams.Comparator1 + "'" + this.queryParams.ColContent1 + "'";
                        break;
                }
                this.sWhere += " and " + this.queryParams.ColName1 + " " + com1;
            }
            if (this.queryParams.ColName2 && this.queryParams.Comparator2) {
                var com2 = "";
                switch (this.queryParams.Comparator2) {
                    case "7":
                        com2 = "like'%" + this.queryParams.ColContent2 + "%'";
                        break;
                    case "8":
                        com2 = "like'%" + this.queryParams.ColContent2 + "'";
                        break;
                    case "9":
                        com2 = "like'" + this.queryParams.ColContent2 + "%'";
                        break;
                    case "10":
                        com2 = "not like'%" + this.queryParams.ColContent2 + "%'";
                        break;
                    default:
                        com2 = "" + this.queryParams.Comparator + "'" + this.queryParams.ColContent + "'";
                        break;
                }
                this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
            }
            if (this.queryParams.sTime) {
                this.queryParams.sTime = moment(this.queryParams.sTime).format('YYYY-MM-DD')
                this.queryParams.eTime = moment(this.queryParams.eTime).format('YYYY-MM-DD')
                this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.queryParams.sTime + "'" + " and CONVERT(varchar(100),日期, 23) <= '" + this.queryParams.eTime + "'";
            }
            if (this.queryParams.HBillNo) {
                this.sWhere += " and 单据号 like '%" + this.queryParams.HBillNo + "%'";
            }
            // if (this.queryParams.HOrgID) {
            //     this.sWhere += " and HOrgID = '" + this.queryParams.HOrgID + "'";
            // }
            console.log("swhere",this.sWhere)
            this.clearData()
            this.getList()
        },
        //#endregion
    //#region 获取公司名,根据公司进行定制化开发
    defaintOperationByCompanyName() {
      var result = false;
@@ -607,6 +710,7 @@
      this.deptform = {};
    },
    async getList() {
      await this.set_ModCheck("Gy_Car_SUBQuery");
      this.tableShow = false;
      this.loading = true;
      if (this.pageSize == 0) {
@@ -865,6 +969,7 @@
      document.body.removeChild(span);
      return h(span, column.label);
    },
    //点击行
    handleRowClick(row, column, event) {
      this.lastSelectedRow = this.selectedRow; // 记录上一次选中的行
@@ -1111,9 +1216,9 @@
        .then(() => {
          if (!this.rowForm.审核人) {
            axios
              .get(this.$baseUrl + "Xs_SeOrderBill/DropXs_SeOrderBill", {
              .get(this.$baseUrl + "Gy_CarController/DropGy_Car", {
                params: {
                  HInterID: this.rowForm.hmainid.toString(),
                  HItemID: this.rowForm.hmainid.toString(),
                  user: sessionStorage["HUserName"],
                },
              })