duhe
2 天以前 345f540c0c23f25db5ac66fca8ac57147c558de3
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI
4个文件已修改
201 ■■■■ 已修改文件
src/views/basic/gyCar/gyCarEdit.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/gyCar/gyCarList.vue 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/user/GyDriver.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/user/GyDriverEdit.vue 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/gyCar/gyCarEdit.vue
@@ -64,7 +64,7 @@
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="16">
            <!-- <el-col :span="16">
              <el-form-item label="车辆行驶证照片" prop="HCarCardIDPic" label-width="8em">
                <div
                  class="image-input-outer"
@@ -104,7 +104,7 @@
                  >
                </el-upload>
              </el-form-item>
            </el-col>
            </el-col> -->
            <el-col :span="8">
              <el-form-item label="车辆年检日期" prop="HCarCheckDate" label-width="7em">
                <el-date-picker
@@ -116,7 +116,7 @@
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="16">
            <!-- <el-col :span="16">
              <el-form-item label="车辆照片" prop="HCarPric" label-width="8em">
                <div class="image-input-outer" @click="openImagePreview('HCarPric')">
                  <el-input v-model="form.HCarPric"> </el-input>
@@ -153,7 +153,7 @@
                  >
                </el-upload>
              </el-form-item>
            </el-col>
            </el-col> -->
            <el-col :span="8">
              <el-form-item label="车型" prop="HCarTypeName">
                <el-input v-model="form.HCarTypeName" placeholder="请选择车型" disabled>
@@ -169,8 +169,8 @@
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="所属公司" prop="HCompName">
                <el-input v-model="form.HCompName" placeholder="请选择所属公司" disabled>
              <el-form-item label="所属供应商" prop="HCompName">
                <el-input v-model="form.HCompName" placeholder="请选择所属供应商" disabled>
                  <el-button
                    slot="append"
                    icon="el-icon-search"
@@ -814,6 +814,8 @@
      //新增获取单据号
      // this.getHBillNo();
      let date = new Date();
      this.form.HCompID = sessionStorage["HSupID"];
      this.form.HCompName = sessionStorage["HSupName"];
      this.form.HDate = moment(date).format("YYYY-MM-DDTHH:mm:ss");
      this.resetForm();
      if (this.OperationType == 1) {
@@ -853,7 +855,7 @@
                HCarPric: data.车辆照片,
                HCarCardIDPic: data.车辆行驶证照片,
                HCompID: data.HCompID,
                HCompName: data.所属公司,
                HCompName: data.所属供应商,
                HModel: data.车辆型号,
                HColor: data.车辆颜色,
                HBuyDate: data.购买日期 ? dayjs(data.购买日期).format("YYYY-MM-DD") : "",
@@ -1159,7 +1161,7 @@
        // 所属公司
        this.iframeUrl = "/iframe/GySupplier";
        this.dialogTitle = "所属公司";
        this.dialogTitle = "所属供应商";
        // this.materialShow = true;
        this.openData = true;
      }
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; // 记录上一次选中的行
src/views/system/user/GyDriver.vue
@@ -461,6 +461,7 @@
      this.tableShow = false;
      this.loading = true;
      console.log("获取列表数据...", this.sWhere);
      await this.set_ModCheck("GyDriver_SUPQuery")
      try {
        const params = {
          sWhere: this.sWhere || "",
@@ -617,8 +618,27 @@
        console.error("加载列配置失败:", error);
      }
    },
   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 所属公司ID ="+sessionStorage["HSupID"]
                }
            }).catch(error => {
                this.$modal.msgError("接口请求失败!");
            });
        },
    handleQuery() {
  async handleQuery() {
      this.sWhere = "";
      const conditions = [];
src/views/system/user/GyDriverEdit.vue
@@ -67,18 +67,17 @@
              />
            </el-form-item>
            <el-form-item label="所属公司" prop="HDeptID">
            <el-form-item label="所属承运商" prop="HCompID">
              <div class="dept-select">
                <el-input
                  v-model="formData.HDeptName"
                  placeholder="请选择所属公司"
                  placeholder="请选择所属承运商"
                  readonly
                  clearable
                  :disabled="isViewMode"
                />
                <el-input
                  type="hidden"
                  v-model="formData.HDeptID"
                  v-model="formData.HCompID"
                  style="display: none"
                />
                <el-button
@@ -87,6 +86,7 @@
                  @click="openDeptDialog"
                  :disabled="isViewMode"
                  style="margin-left: 10px"
                  disabled
                >
                </el-button>
              </div>
@@ -253,13 +253,14 @@
    <!-- 部门选择弹窗 -->
    <el-dialog
      title="dialogTitle"
      title="承运商"
      :visible.sync="openData"
      width="90%"
      top="5vh"
      append-to-body
      disabled
    >
    <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="deptShow" />
    <GySupplier  ref="supplierRef"@deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="deptShow" />
      
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="deptClickSub">确 定</el-button>
@@ -272,10 +273,10 @@
<script>
import axios from "axios";
import Dept from "@/views/component/dept";
import GySupplier from '@/views/basic/gy/gySupplier.vue'
export default {
  name: "GyDriverEdit",
  components: { Dept},
  components: { GySupplier},
  props: {
    OperationType: {
      type: Number,
@@ -313,8 +314,8 @@
        HNumber: "",
        HName: "",
        HHelpCode: "",
        HDeptName: "",
        HDeptID: "0",
        HDeptName:sessionStorage["HSupName"],
        HCompID: sessionStorage["HSupID"],
        HDepNumber: "",
        HIDCard: "",
        HPhone: "",
@@ -399,14 +400,19 @@
        this.openData = false;
    },
    deptClickSub() {
      if (this.deptform && this.deptform.HItemID) {
      this.formData.HDeptName = this.deptform.部门名称;
      this.formData.HDeptID = this.deptform.HItemID;
      this.openData = false;
      this.deptShow = false;
    } else {
      this.$modal.msgWarning("请先选择一个部门");
    }
      // 直接从子组件获取当前选中的行数据
      const selectedRow = this.$refs.supplierRef?.rowForm;
      if (selectedRow && selectedRow.HItemID) {
        // 设置表单数据
        this.formData.HDeptName = selectedRow.供应商名称 || selectedRow.HName;
        this.formData.HCompID = selectedRow.HItemID;
        this.openData = false;
        this.deptShow = false;
        this.$modal.msgSuccess("已选择承运商:" + this.formData.HDeptName);
      } else {
        this.$modal.msgWarning("请先选择一个承运商");
      }
    },
    deptDialogVisible() {
      this.deptform = {};
@@ -438,6 +444,8 @@
        case 1: // 新增
          this.orgDisabled = true;
          this.formData.HItemID = "0";
          this.formData.HDeptName =sessionStorage["HSupName"];
          this.formData.HCompID = sessionStorage["HSupID"];
          break;
          
        case 2: // 复制
@@ -637,8 +645,8 @@
  
    openDeptDialog() {
        this.deptShow = false;
       this.dialogTitle = "部门列表";
        this.deptShow = true;
        this.dialogTitle = "承运商列表";
        this.deptShow = false;
        this.openData = true;
    },