dytyqx
2 天以前 f49106c0e22fdfca082743a610ffb4e1f24090a0
增加车辆列表组织过滤供应商过滤
2个文件已修改
114 ■■■■■ 已修改文件
src/views/basic/gyCar/gyCarEdit.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/gyCar/gyCarList.vue 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/gyCar/gyCarEdit.vue
@@ -175,6 +175,7 @@
                    slot="append"
                    icon="el-icon-search"
                    class="select-btn-disabled"
                    disabled
                    @click.stop="openDataDialog(3)"
                  ></el-button>
                </el-input>
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">
@@ -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; // 记录上一次选中的行