lmx před 1 dnem
rodič
revize
278ce590f1

+ 41 - 1
src/views/his/company/index.vue

@@ -488,6 +488,22 @@
               </el-option>
             </el-select>
           </el-form-item>
+         <el-form-item label="公司行业" prop="companyTrade">
+            <el-select
+              v-model="form.companyTrade"
+              filterable
+              clearable
+              size="small"
+              placeholder="请选择公司行业"
+            >
+              <el-option
+                v-for="item in tradeTypeOptions"
+                :key="item.dictValue"
+                :label="item.dictLabel"
+                :value="item.dictValue"
+              />
+            </el-select>
+          </el-form-item>
       </el-form>
 
 
@@ -824,6 +840,10 @@ export default {
       statusOptions: [],
       // 企业类型字典
       companyTypeOptions: [],
+      // 公司行业字典(trade_type)
+      tradeTypeOptions: [],
+      // 新增公司时公司行业默认值(来源: his.config 配置中的 tenantTrade)
+      tenantTradeDefault: null,
       //部门字典
       deptOptions: [],
       // 查询参数
@@ -969,6 +989,22 @@ export default {
     this.getDicts('sys_company_type').then(response => {
       this.companyTypeOptions = response.data
     })
+    this.getDicts('trade_type').then(response => {
+      this.tradeTypeOptions = response.data
+    })
+    // 读取系统配置 his.config 中的 tenantTrade,作为新增公司时"公司行业"的默认值
+    getConfigByKey('his.config').then(response => {
+      if (response.data && response.data.configValue) {
+        try {
+          const hisConfig = JSON.parse(response.data.configValue)
+          if (hisConfig && hisConfig.tenantTrade != null && hisConfig.tenantTrade !== '') {
+            this.tenantTradeDefault = hisConfig.tenantTrade
+          }
+        } catch (e) {
+          console.warn('解析 his.config 失败', e)
+        }
+      }
+    })
     getVoiceApiList().then((response) => {
       this.voiceApis = response.data
     })
@@ -1184,7 +1220,8 @@ export default {
         miniAppList: [],
         isDel: null,
         courseMaAppId: null,
-        courseMiniAppId: null
+        courseMiniAppId: null,
+        companyTrade: this.tenantTradeDefault
       }
       this.resetForm('form')
     },
@@ -1243,6 +1280,9 @@ export default {
         if (this.form.status != null) {
           this.form.status = String(this.form.status)
         }
+        if (this.form.companyTrade != null) {
+          this.form.companyTrade = String(this.form.companyTrade)
+        }
         if (this.form.doctorIds != null) {
           this.doctorIds = ((this.form.doctorIds).split(',')).map(Number)
         }

+ 17 - 1
src/views/system/config/config.vue

@@ -1234,6 +1234,17 @@
           <el-form-item label="hook地址" prop="hookUrl">
             <el-input v-model="form13.hookUrl" label="请输入hook域名"></el-input>
           </el-form-item>
+          <el-form-item label="租户行业" prop="tenantTrade">
+           <el-select filterable v-model="form13.tenantTrade" placeholder="请选择租户行业" clearable size="small"
+            >
+              <el-option
+                v-for="item in tenantTradeList"
+                :key="item.dictValue"
+                :label="item.dictLabel"
+                :value="item.dictValue"
+              />
+            </el-select>
+          </el-form-item>
           <div class="footer">
             <el-button type="primary" @click="submitForm13">提 交</el-button>
           </div>
@@ -2729,6 +2740,7 @@ export default {
       },
       tempOptions: [],
       integralLogTypeOptions: [],
+      tenantTradeList: [],
       companyOptions: [],
       activeName: 'sys.oss.cloudStorage',
       configId: null,
@@ -2744,7 +2756,8 @@ export default {
       form10: [],
       form12: [],
       form13: {
-        dfAccounts: [] // 初始化代付管家账户数组
+        dfAccounts: [], // 初始化代付管家账户数组
+        tenantTrade: [] // 初始化租户行业数组
       },
       form14: {},
       form15: {},
@@ -2871,6 +2884,9 @@ export default {
     this.getDicts('sys_integral_log_type').then(response => {
       this.integralLogTypeOptions = response.data
     })
+    this.getDicts('trade_type').then(response => {
+      this.tenantTradeList = response.data
+    })
     // getStoreProductColumns().then( response => {
     //   this.storeProductScrmColumns = response.data
     // })