li.shaoyi 7 달 전
부모
커밋
598929cb53

+ 6 - 3
src/filters/index.ts

@@ -276,7 +276,10 @@ export function extractFilePaths(uploadFiles: UploadUserFile[]) {
  * @returns 
  */
 export function getFirstPathFullUrl(path?: string) {
-    const baseUrl = service.getConfig('apiUrl')
-    const paths = path?.split(',')
-    return paths?.length ? new URL(paths[0], baseUrl).href : ''
+    if (path) {
+        const baseUrl = service.getConfig('apiUrl')
+        const paths = path?.split(',')
+        return new URL(paths[0], baseUrl).href
+    }
+    return ''
 }

+ 14 - 1
src/packages/pc/views/investor/manage/user/components/details/view.vue

@@ -38,6 +38,13 @@
         <app-table-details
             :title="oldData?.userinfoDetailVo.userinfoType === UserInfoType.Personal ? t('investor.manage.user.details.subtitle1') : t('investor.manage.user.details.subtitle2')"
             :data="oldData?.userinfoDetailVo" :label-width="160" :cell-props="detailProps2" :column="2">
+            <!-- 法人姓名 -->
+            <template #legalPersonName="{ value }">
+                <p>{{ value }}</p>
+                <p class="g-red" v-if="newData && newData.userinfoDetailVo.legalPersonName !== value">
+                    {{ newData.userinfoDetailVo.legalPersonName }}
+                </p>
+            </template>
             <!-- 企业名称 -->
             <template #customerName="{ value }">
                 <p>{{ value }}</p>
@@ -108,6 +115,13 @@
                     {{ handleNoneValue(newData.userinfoDetailVo.pathName + newData.userinfoDetailVo.address) }}
                 </p>
             </template>
+            <!-- 微信 -->
+            <template #wechat="{ value }">
+                <p>{{ handleNoneValue(value) }}</p>
+                <p class="g-red" v-if="newData && newData.userinfoDetailVo.wechat !== value">
+                    {{ handleNoneValue(newData.userinfoDetailVo.wechat) }}
+                </p>
+            </template>
             <!-- 邮政编码 -->
             <template #postalCode="{ value }">
                 <p>{{ handleNoneValue(value) }}</p>
@@ -305,7 +319,6 @@ const detailProps2 = computed<CellProp[]>(() => {
     }
     if (type === UserInfoType.Company) {
         return [
-            { prop: 'needInvoice', label: 'investor.manage.user.details.needInvoice', formatValue: (val) => flagEnum.getEnumTypeName(val) },
             { prop: 'cardTypeId', label: 'investor.manage.user.details.cardTypeId' },
             { prop: 'cardNum', label: 'investor.manage.user.details.cardNum' },
             { prop: 'customerName', label: 'investor.manage.user.details.customerName' },

+ 1 - 1
src/packages/pc/views/investor/manage/user/components/edit/index.vue

@@ -75,7 +75,7 @@
                         :placeholder="t('common.pleaseenter')" />
                 </el-form-item>
                 <el-form-item :label="t('investor.manage.user.edit.telPhone')" prop="telPhone">
-                    <el-input type="number" v-model="formData.userinfoDetailVo.telPhone" maxlength="50"
+                    <el-input v-model="formData.userinfoDetailVo.telPhone" maxlength="50"
                         :placeholder="t('common.pleaseenter')" />
                 </el-form-item>
                 <el-form-item class="el-form-item--row" :label="t('investor.manage.user.edit.region')" prop="region">

+ 1 - 2
src/packages/pc/views/investor/user/open/components/edit/index.vue

@@ -116,8 +116,7 @@
                     :placeholder="t('common.pleaseenter')" />
             </el-form-item>
             <el-form-item :label="t('investor.user.open.edit.telphone')" prop="telphone">
-                <el-input type="number" v-model="formData.telphone" maxlength="50"
-                    :placeholder="t('common.pleaseenter')" />
+                <el-input v-model="formData.telphone" maxlength="50" :placeholder="t('common.pleaseenter')" />
             </el-form-item>
             <el-form-item :label="t('investor.user.open.edit.postalcode')" prop="postalcode">
                 <el-input v-model="formData.postalcode" maxlength="50" :placeholder="t('common.pleaseenter')" />

+ 16 - 3
src/packages/pc/views/member/institution/goodscfg/components/edit/index.vue

@@ -4,7 +4,7 @@
         <el-form ref="formRef" class="el-form--horizontal" label-width="140px" :model="formData" :rules="formRules"
             :show-message="false">
             <el-form-item label="经纪会员" prop="userid">
-                <app-select-member v-model="formData.userid" :params="{ usertype: '2', roles: '7' }" />
+                <app-select-member ref="useridRef" v-model="formData.userid" :params="{ usertype: '2', roles: '7' }" />
             </el-form-item>
             <el-form-item label="市场" prop="marketid">
                 <el-select v-model="formData.marketid" @change="goodsRef.onReset()">
@@ -68,7 +68,9 @@ const flagEnum = useEnum('flag') // 确认状态
 const { getMarketOptions } = useMarket()
 const { global: { t } } = i18n
 const formRef = ref<FormInstance>()
+const useridRef = ref() // 会员组件实例
 const goodsRef = ref() // 商品组件实例
+
 const show = ref(true)
 const refresh = ref(false)
 const loading = shallowRef(false)
@@ -112,9 +114,20 @@ const onSubmit = () => {
 }
 
 onMounted(() => {
-    const { autoid, } = props.record ?? {}
+    const { autoid, goodsid, marketid, userid, iscannotbuy, iscannotsell, isnodisplay } = props.record ?? {}
     if (autoid) {
-        formData.value.autoid = autoid
+        formData.value = {
+            autoid,
+            goodsid,
+            marketid,
+            roletype: 7,
+            userid,
+            iscannotbuy,
+            iscannotsell,
+            isnodisplay
+        }
+        useridRef.value.onReset(userid)
+        goodsRef.value.onReset()
     }
 })
 </script>

+ 33 - 20
src/packages/pc/views/member/institution/open/components/edit/index.vue

@@ -1,6 +1,7 @@
 <!-- 会员机构管理-机构管理-机构开户申请-编辑 -->
 <template>
-    <app-drawer :title="t('member.institution.open.edit.title')" width="900" v-model:show="show" :refresh="refresh" :loading="loading">
+    <app-drawer :title="t('member.institution.open.edit.title')" width="900" v-model:show="show" :refresh="refresh"
+        :loading="loading">
         <el-form ref="formRef" label-width="140px" :model="formData" :rules="formRules" :show-message="false">
             <fieldset class="g-fieldset el-form--horizontal">
                 <legend class="g-fieldset__legend">{{ t('common.baseinfo') }}</legend>
@@ -19,7 +20,9 @@
                 </el-form-item>
             </fieldset>
             <fieldset class="g-fieldset el-form--horizontal">
-                <legend class="g-fieldset__legend">{{ isPerson ? t('member.institution.open.edit.person') : t('member.institution.open.edit.companny') }}{{ t('member.institution.open.edit.profile') }}</legend>
+                <legend class="g-fieldset__legend">{{ isPerson ? t('member.institution.open.edit.person') :
+                    t('member.institution.open.edit.companny') }}{{ t('member.institution.open.edit.profile') }}
+                </legend>
                 <el-form-item :label="t('member.institution.open.edit.customername')" prop="customername">
                     <el-input v-model="formData.customername" maxlength="50" :placeholder="t('common.pleaseenter')" />
                 </el-form-item>
@@ -38,26 +41,31 @@
                 </el-form-item>
                 <el-form-item :label="t('member.institution.open.edit.cardfrontphotourl')" prop="cardfrontphotourl">
                     <app-upload v-model="uploadFiles.cardfrontphotourl" :file-types="['image']"
-                    :type-message="t('common.tips21')" />
+                        :type-message="t('common.tips21')" />
                 </el-form-item>
-                <el-form-item :label="t('member.institution.open.edit.cardbackphotourl')" prop="cardbackphotourl" v-if="isPerson">
+                <el-form-item :label="t('member.institution.open.edit.cardbackphotourl')" prop="cardbackphotourl"
+                    v-if="isPerson">
                     <app-upload v-model="uploadFiles.cardbackphotourl" :file-types="['image']"
-                    :type-message="t('common.tips21')" />
+                        :type-message="t('common.tips21')" />
                 </el-form-item>
                 <template v-if="!isPerson">
                     <el-form-item :label="t('member.institution.open.edit.legalpersonname')" prop="legalpersonname">
-                        <el-input v-model="formData.legalpersonname" maxlength="50" :placeholder="t('common.pleaseenter')" />
+                        <el-input v-model="formData.legalpersonname" maxlength="50"
+                            :placeholder="t('common.pleaseenter')" />
                     </el-form-item>
-                    <el-form-item :label="t('member.institution.open.edit.legalcardfrontphotourl')" prop="legalcardfrontphotourl">
+                    <el-form-item :label="t('member.institution.open.edit.legalcardfrontphotourl')"
+                        prop="legalcardfrontphotourl">
                         <app-upload v-model="uploadFiles.legalcardfrontphotourl" :file-types="['image']"
-                        :type-message="t('common.tips21')" />
+                            :type-message="t('common.tips21')" />
                     </el-form-item>
-                    <el-form-item :label="t('member.institution.open.edit.legalcardbackphotourl')" prop="legalcardbackphotourl">
+                    <el-form-item :label="t('member.institution.open.edit.legalcardbackphotourl')"
+                        prop="legalcardbackphotourl">
                         <app-upload v-model="uploadFiles.legalcardbackphotourl" :file-types="['image']"
-                        :type-message="t('common.tips21')" />
+                            :type-message="t('common.tips21')" />
                     </el-form-item>
                     <el-form-item :label="t('member.institution.open.edit.contactname')" prop="contactname">
-                        <el-input v-model="formData.contactname" maxlength="50" :placeholder="t('common.pleaseenter')" />
+                        <el-input v-model="formData.contactname" maxlength="50"
+                            :placeholder="t('common.pleaseenter')" />
                     </el-form-item>
                 </template>
                 <el-form-item :label="t('member.institution.open.edit.sex')" prop="sex">
@@ -68,16 +76,20 @@
                     </el-radio-group>
                 </el-form-item>
                 <el-form-item :label="t('member.institution.open.edit.mobilephone')" prop="mobilephone">
-                    <el-input type="number" v-model="formData.mobilephone" maxlength="50" :placeholder="t('common.pleaseenter')" />
+                    <el-input type="number" v-model="formData.mobilephone" maxlength="50"
+                        :placeholder="t('common.pleaseenter')" />
                 </el-form-item>
                 <el-form-item :label="t('member.institution.open.edit.telphone')" prop="telphone">
-                    <el-input type="number" v-model="formData.telphone" maxlength="50" :placeholder="t('common.pleaseenter')" />
+                    <el-input v-model="formData.telphone" maxlength="50" :placeholder="t('common.pleaseenter')" />
                 </el-form-item>
-                <el-form-item class="el-form-item--row" :label="t('member.institution.open.edit.provinceid')" prop="provinceid">
-                    <app-region class="el-form-item--col" v-model:country="formData.countryid" v-model:province="formData.provinceid"
-                        v-model:city="formData.cityid" v-model:district="formData.districtid" />
+                <el-form-item class="el-form-item--row" :label="t('member.institution.open.edit.provinceid')"
+                    prop="provinceid">
+                    <app-region class="el-form-item--col" v-model:country="formData.countryid"
+                        v-model:province="formData.provinceid" v-model:city="formData.cityid"
+                        v-model:district="formData.districtid" />
                 </el-form-item>
-                <el-form-item class="el-form-item--row" :label="t('member.institution.open.edit.cardaddress')" prop="cardaddress">
+                <el-form-item class="el-form-item--row" :label="t('member.institution.open.edit.cardaddress')"
+                    prop="cardaddress">
                     <el-input v-model="formData.cardaddress" maxlength="50" :placeholder="t('common.pleaseenter')" />
                 </el-form-item>
                 <el-form-item :label="t('member.institution.open.edit.postalcode')" prop="postalcode">
@@ -87,18 +99,19 @@
                     <el-input v-model="formData.email" maxlength="50" :placeholder="t('common.pleaseenter')" />
                 </el-form-item>
                 <el-form-item class="el-form-item--row" :label="t('member.institution.open.edit.remark')" prop="remark">
-                    <el-input type="textarea" v-model="formData.remark" maxlength="200" :rows="3" :placeholder="t('common.pleaseenter')" />
+                    <el-input type="textarea" v-model="formData.remark" maxlength="200" :rows="3"
+                        :placeholder="t('common.pleaseenter')" />
                 </el-form-item>
             </fieldset>
             <fieldset class="g-fieldset el-form--horizontal">
                 <legend class="g-fieldset__legend">{{ t('common.annex') }}</legend>
                 <el-form-item :label="t('common.annex1')" prop="attachment1">
                     <app-upload v-model="uploadFiles.attachment1" :file-types="['image', 'pdf']"
-                    :type-message="t('common.tips21')" />
+                        :type-message="t('common.tips21')" />
                 </el-form-item>
                 <el-form-item :label="t('common.annex1')" prop="attachment2">
                     <app-upload v-model="uploadFiles.attachment2" :file-types="['image', 'pdf']"
-                    :type-message="t('common.tips21')" />
+                        :type-message="t('common.tips21')" />
                 </el-form-item>
             </fieldset>
         </el-form>

+ 31 - 13
src/packages/pc/views/member/institution/role/components/details/index.vue

@@ -7,7 +7,9 @@
             </template>
             <template #menuids>
                 <el-scrollbar max-height="300px" style="width: 100%; border: 1px solid #f2f2f2;">
-                    <el-tree :data="filteredRoutes" :props="{ label: (data: Model.MenusRsp)=> t('routes.'+data.resourceCode) }" node-key="resourceCode" />
+                    <el-tree :data="filteredRoutes"
+                        :props="{ label: (data: Model.MenusRsp) => t('routes.' + data.resourceCode) }"
+                        node-key="resourceCode" />
                 </el-scrollbar>
             </template>
         </app-table-details>
@@ -58,16 +60,32 @@ const { data, loading } = useRequest(queryDetail, {
     },
     onSuccess: (res) => {
         const codeSet = new Set(res.data.menuids)
+
+        function filterMenu(data: Model.MenusRsp[]) {
+            return data.reduce<Model.MenusRsp[]>((result, item) => {
+                const { resourceCode, children } = item
+                if (codeSet.has(resourceCode)) {
+                    // 当前菜单项符合条件
+                    result.push({
+                        ...item,
+                        children: children ? filterMenu(children) : [],
+                    })
+                } else if (children?.length) {
+                    // 当前菜单项不符合条件,但有子菜单,递归过滤子菜单
+                    const filteredChildren = filterMenu(children)
+                    if (filteredChildren.length) {
+                        result.push({
+                            ...item,
+                            children: filteredChildren,
+                        })
+                    }
+                }
+                return result
+            }, [])
+        }
+
         // 递归过滤菜单
-        filteredRoutes.value = routerStore.userRoutes.filter(menu => {
-            if (codeSet.has(menu.resourceCode)) {
-                return true
-            }
-            if (menu.children && menu.children.length) {
-                return menu.children.some(child => codeSet.has(child.resourceCode))
-            }
-            return false
-        })
+        filteredRoutes.value = filterMenu(routerStore.userRoutes)
     },
     onError: (err) => {
         ElMessage.error(err)
@@ -75,9 +93,9 @@ const { data, loading } = useRequest(queryDetail, {
 })
 
 const detailProps: CellProp[] = [
-    { prop: 'rolename', label: t('admin.role.edit.rolename') },
-    { prop: 'sensitivefields', label: t('admin.role.edit.sensitivefields') },
-    { prop: 'menuids', label: t('admin.role.edit.menuids') },
+    { prop: 'rolename', label: 'admin.role.edit.rolename' },
+    { prop: 'sensitivefields', label: 'admin.role.edit.sensitivefields' },
+    { prop: 'menuids', label: 'admin.role.edit.menuids' },
 ]
 
 const onCancel = () => {

+ 1 - 2
src/packages/pc/views/member/institution/user/components/edit/index.vue

@@ -82,8 +82,7 @@
                         :placeholder="t('common.pleaseenter')" />
                 </el-form-item>
                 <el-form-item :label="t('member.institution.user.edit.telphone')" prop="telphone">
-                    <el-input type="number" v-model="formData.telphone" maxlength="50"
-                        :placeholder="t('common.pleaseenter')" />
+                    <el-input v-model="formData.telphone" maxlength="50" :placeholder="t('common.pleaseenter')" />
                 </el-form-item>
                 <el-form-item class="el-form-item--row" :label="t('member.institution.user.edit.provinceid')"
                     prop="provinceid">

+ 1 - 2
src/packages/pc/views/member/subinstitution/manage/components/edit/index.vue

@@ -99,8 +99,7 @@
                         :placeholder="t('common.pleaseenter')" />
                 </el-form-item>
                 <el-form-item :label="t('member.subinstitution.manage.edit.telphone')" prop="telphone">
-                    <el-input type="number" v-model="formData.telphone" maxlength="50"
-                        :placeholder="t('common.pleaseenter')" />
+                    <el-input v-model="formData.telphone" maxlength="50" :placeholder="t('common.pleaseenter')" />
                 </el-form-item>
                 <el-form-item class="el-form-item--row" :label="t('member.subinstitution.manage.edit.provinceid')"
                     prop="provinceid">