wwl
2024-12-07 d194f4cd74da499f741100e5e3da5bcc3a0dc387
src/views/system/tijianall/index.vue
@@ -225,6 +225,7 @@
                v-model="form.cusIdcard"
                placeholder="请输入身份证号"
                @input="inputChange"
                style="width: 190px"
              />
              <!-- <i
                style="font-size: 17px; margin-left: 3px"
@@ -249,7 +250,7 @@
                filterable
                v-model="form.cusNational"
                placeholder="请选择民族"
                style="width: 93%"
                style="width: 94%"
              >
                <el-option
                  v-for="dict in dict.type.dict_user_national"
@@ -269,7 +270,7 @@
              <el-select
                :disabled="isDisabled"
                v-model="form.ageUnit"
                style="width: 20%"
                style="width: 19%"
              >
                <el-option
                  v-for="dict in dict.type.dict_ageunit"
@@ -330,13 +331,15 @@
            :rules="rules"
            label-width="106px"
          >
            <el-form-item label="单位名称" prop="dictCompId">
            <el-form-item label="单位名称" prop="compName">
              <el-select
                :remote-method="getRemoteData"
                :disabled="isDisabled"
                v-model="form.compName"
                remote
                default-first-option
                allow-create
                filterable
                style="width: 300px"
                style="width: 200px"
                placeholder="请选择单位名称"
                clearable
                @change="idFn1"
@@ -345,16 +348,16 @@
                  v-for="dict in CompanyList"
                  :key="dict.cnName"
                  :label="dict.cnName"
                  :value="dict.drugManufacturerId"
                  :value="dict.cnName"
                />
              </el-select>
              <i class="el-icon-circle-plus-outline" @click="handleAdd1"></i>
              <!-- <i class="el-icon-circle-plus-outline" @click="handleAdd1"></i> -->
            </el-form-item>
            <el-form-item label="体检类别" prop="category">
            <el-form-item label="体检类别" prop="category" label-width="95px">
              <el-select
                v-model="form.category"
                placeholder="请选择体检类别"
                style="width: 95%"
                style="width: 94%"
              >
                <el-option
                  v-for="dict in dict.type.dict_tjtype"
@@ -366,7 +369,11 @@
              <!-- <el-input v-model="form.category" placeholder="请输入体检类别" /> -->
            </el-form-item>
            <el-form-item label="部门" prop="department">
              <el-input v-model="form.department" placeholder="请输入部门" />
              <el-input
                v-model="form.department"
                placeholder="请输入部门"
                style="width: 93%"
              />
            </el-form-item>
          </el-form>
          <el-form
@@ -818,7 +825,7 @@
            <el-form
              :model="form"
              :inline="true"
              label-width="100px"
              label-width="104px"
              style="margin-left: 10px"
            >
              <el-form-item label="应收金额" style="margin-right: 20px">
@@ -833,14 +840,15 @@
                <el-input-number style="width: 140px" v-model="discount" :precision="2" :step="0.1" :max="10" :min="1"
                  @change="numberChange" :disabled="isfalse"></el-input-number>
              </el-form-item> -->
              <el-form-item label="实收金额">
              <el-form-item label="实收金额" label-width="96px">
                <el-input
                  placeholder="实收金额"
                  v-model="TotalPrice"
                  disabled
                  style="width: 192px"
                ></el-input>
              </el-form-item>
              <el-form-item>
              <el-form-item style="margin-left: 50px">
                <el-button type="primary" @click="Package" size="mini"
                  >选择套餐</el-button
                >
@@ -1458,16 +1466,27 @@
      this.title = "添加体检单位信息维护";
    },
    idFn1(value) {
      console.log(value);
      if (value) {
        this.form.dictCompId = value;
        // 保存修改前的 dictCompId
        const originalCompId = this.form.dictCompId;
        // 更新公司名称
        this.form.compName = value;
        // 遍历公司列表,根据公司名称设置对应的 drugManufacturerId
        this.CompanyList.forEach((item) => {
          if (item.drugManufacturerId == this.form.dictCompId) {
            this.form.compName = item.cnName;
          if (item.cnName == this.form.compName) {
            this.form.dictCompId = item.drugManufacturerId;
          }
        });
        // 如果 dictCompId 没有变化,重置为空
        if (this.form.dictCompId === originalCompId) {
          this.form.dictCompId = '';
        }
      }
    },
    getRemoteData(query) {
      if (query) {
        let compName = query;