Browse Source

Merge remote-tracking branch 'origin/bjcz_his_scrm' into bjcz_his_scrm

# Conflicts:
#	src/views/hisStore/storeOrder/healthStoreList.vue
吴树波 1 day ago
parent
commit
ed89b8f77f
1 changed files with 26 additions and 19 deletions
  1. 26 19
      src/views/hisStore/storeOrder/healthStoreList.vue

+ 26 - 19
src/views/hisStore/storeOrder/healthStoreList.vue

@@ -217,10 +217,10 @@
       <el-form-item label="小程序" prop="appId">
       <el-form-item label="小程序" prop="appId">
         <el-select v-model="queryParams.appId" placeholder="请选择所属小程序" clearable size="small">
         <el-select v-model="queryParams.appId" placeholder="请选择所属小程序" clearable size="small">
           <el-option
           <el-option
-            v-for="dict in appMallOptions"
-            :key="dict.appid"
-            :label="dict.name + '(' + dict.appid + ')'"
-            :value="dict.appid"
+            v-for="dict in miniAppList"
+            :key="dict.appId"
+            :label="dict.appName + '(' + dict.appId + ')'"
+            :value="dict.appId"
           />
           />
         </el-select>
         </el-select>
       </el-form-item>
       </el-form-item>
@@ -1021,6 +1021,7 @@ import Treeselect from '@riophae/vue-treeselect'
 import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 import { getConfigByKey } from '@/api/system/config'
 import { getConfigByKey } from '@/api/system/config'
 import { listStoreProduct } from '@/api/hisStore/storeProduct'
 import { listStoreProduct } from '@/api/hisStore/storeProduct'
+import { getMiniProgramList } from '@/api/hisStore/storePayment'
 import {list as getAppMallOptions} from '@/api/course/coursePlaySourceConfig';
 import {list as getAppMallOptions} from '@/api/course/coursePlaySourceConfig';
 import {checkPermi} from "@/utils/permission";
 import {checkPermi} from "@/utils/permission";
 
 
@@ -1124,7 +1125,6 @@ export default {
         { key: 'erpAccount', label: 'ERP账号', checked: false },
         { key: 'erpAccount', label: 'ERP账号', checked: false },
 
 
       ],
       ],
-      appMallOptions:[],
 
 
       importMsgOpen: false,
       importMsgOpen: false,
       importMsg: '',
       importMsg: '',
@@ -1338,7 +1338,7 @@ export default {
 
 
     this.getList()
     this.getList()
     this.getErpAccountList();
     this.getErpAccountList();
-    this.getAppMallOptions();
+    this.getAppList();
     this.getProduct()
     this.getProduct()
   },
   },
   methods: {
   methods: {
@@ -1901,10 +1901,19 @@ export default {
       this.erpPhone.open = false;
       this.erpPhone.open = false;
     },
     },
 
 
-    // 获取小程序选项列表
-    getAppMallOptions() {
-      getAppMallOptions({pageNum:1,pageSize:100,isMall:1}).then(response => {
-        this.appMallOptions = response.rows;
+    // 获取小程序列表
+    getAppList() {
+      this.miniAppList = []
+      getMiniProgramList().then(response => {
+        const { code, data } = response
+        if (code === 200) {
+          this.miniAppList = data.map(v => {
+            return { appId: v.appid, appName: v.name }
+          })
+        }
+      }).catch(error => {
+        console.error('获取小程序列表失败:', error)
+        this.$message.error('获取小程序列表失败')
       })
       })
     },
     },
     // 获取已选择字段数量
     // 获取已选择字段数量
@@ -2460,18 +2469,16 @@ export default {
     },
     },
     getAppList() {
     getAppList() {
       this.miniAppList = []
       this.miniAppList = []
-      const key = 'courseMa.config'
-      getConfigByKey(key).then(response => {
+      getMiniProgramList().then(response => {
         const { code, data } = response
         const { code, data } = response
         if (code === 200) {
         if (code === 200) {
-          let value = data?.configValue
-          if (value) {
-            const appList = JSON.parse(value)
-            this.miniAppList = appList.filter(v => v.type === '1').map(v => {
-              return { appId: v.appid, appName: v.name }
-            })
-          }
+          this.miniAppList = data.map(v => {
+            return { appId: v.appid, appName: v.name }
+          })
         }
         }
+      }).catch(error => {
+        console.error('获取小程序列表失败:', error)
+        this.$message.error('获取小程序列表失败')
       })
       })
     },
     },
     // 提交发货单
     // 提交发货单