Handy_Cao 7 ヶ月 前
コミット
6634d1efbd

+ 9 - 0
src/packages/pc/views/member/institution/broker/components/edit/index.vue

@@ -14,6 +14,15 @@
                     <app-select-member2 v-model="formData.userid" />
                 </el-form-item>
             </fieldset>
+            <fieldset class="g-fieldset el-form--vertical">
+                <legend class="g-fieldset__legend">权限信息</legend>
+                <el-form-item label="会员市场:" prop="marketid" >
+                    <el-checkbox-group v-model="formData.marketids">
+                        <el-checkbox v-for="item in data?.markets" v-bind:key="item.marketid" 
+                            :label="item.marketname" :value="item.marketid"/>
+                    </el-checkbox-group>
+                </el-form-item>
+            </fieldset> 
         </el-form>
         <template #footer>
             <el-button @click="onCancel(false)">{{ t('operation.cancel') }}</el-button>

+ 14 - 11
src/packages/pc/views/member/institution/industry/components/edit/index.vue

@@ -11,10 +11,15 @@
                     <el-button @click="openComponent('Roles')">查看</el-button>
                 </el-form-item>
             </fieldset>
-            <fieldset class="g-fieldset el-form--horizontal">
+            <fieldset class="g-fieldset el-form--vertical">
                 <legend class="g-fieldset__legend">权限信息</legend>
-                会员市场:
-            </fieldset>
+                <el-form-item label="会员市场:" prop="marketid" >
+                    <el-checkbox-group v-model="formData.marketids">
+                        <el-checkbox v-for="item in data?.markets" v-bind:key="item.marketid" 
+                            :label="item.marketname" :value="item.marketid"/>
+                    </el-checkbox-group>
+                </el-form-item>
+            </fieldset> 
         </el-form>
         <template #footer>
             <el-button @click="onCancel(false)">{{ t('operation.cancel') }}</el-button>
@@ -45,6 +50,11 @@ const props = defineProps({
     }
 })
 
+const componentMap = new Map<string, unknown>([
+    ['Roles', defineAsyncComponent(() => import('@pc/components/modules/roles/index.vue'))], // 角色权限信息
+])
+const { componentRef, componentId, openComponent, closeComponent } = useComponent()
+
 const { data, loading } = useRequest(initAdd, {
     params: {
         role: 'industry'
@@ -54,20 +64,13 @@ const { data, loading } = useRequest(initAdd, {
     }
 })
 
-const componentMap = new Map<string, unknown>([
-    ['Roles', defineAsyncComponent(() => import('@pc/components/modules/roles/index.vue'))], // 角色权限信息
-])
-const { componentRef, componentId, openComponent, closeComponent } = useComponent()
-
 const formData = ref<Partial<Member.RoleAddReq>>({
     roleid: 9
 })
 
 // 表单验证规则
 const formRules: FormRules = {
-    userid: [{ required: true }],
-    marketid: [{ required: true }],
-    goodsid: [{ required: true }],
+    userid: [{ required: true }]
 }
 
 const onSubmit = () => {

+ 9 - 2
src/packages/pc/views/member/institution/operation/components/edit/index.vue

@@ -11,8 +11,14 @@
                     <el-button @click="openComponent('Roles')">查看</el-button>
                 </el-form-item>
             </fieldset>
-            <fieldset class="g-fieldset el-form--horizontal">
+            <fieldset class="g-fieldset el-form--vertical">
                 <legend class="g-fieldset__legend">商品查询权限</legend>
+                <el-form-item v-for="item in data?.markets" v-bind:key="item.marketid" :label="item.marketname" prop="marketid" >
+                    <el-checkbox-group v-model="formData.goodsids">
+                        <el-checkbox v-for="goods in data?.goodsinfo.filter(e => e.marketid === item.marketid)" v-bind:key="goods.goodsid" 
+                            :label="goods.goodsname" :value="goods.goodsid"/>
+                    </el-checkbox-group>
+                </el-form-item>
             </fieldset>
         </el-form>
         <template #footer>
@@ -64,7 +70,8 @@ const formData = ref<Partial<Member.RoleAddReq>>({
 
 // 表单验证规则
 const formRules: FormRules = {
-    userid: [{ required: true }]
+    userid: [{ required: true }],
+    goodsids: [{ required: true }]
 }
 
 const onSubmit = () => {

+ 9 - 0
src/packages/pc/views/member/institution/self/components/edit/index.vue

@@ -11,6 +11,15 @@
                     <el-button @click="openComponent('Roles')">查看</el-button>
                 </el-form-item>
             </fieldset>
+            <fieldset class="g-fieldset el-form--vertical">
+                <legend class="g-fieldset__legend">权限信息</legend>
+                <el-form-item label="会员市场:" prop="marketid" >
+                    <el-checkbox-group v-model="formData.marketids">
+                        <el-checkbox v-for="item in data?.markets" v-bind:key="item.marketid" 
+                            :label="item.marketname" :value="item.marketid"/>
+                    </el-checkbox-group>
+                </el-form-item>
+            </fieldset> 
         </el-form>
         <template #footer>
             <el-button @click="onCancel(false)">{{ t('operation.cancel') }}</el-button>